@runic-artifex/views
appearancefunctionThe appearance of the current instance (the page's, outside
RunicInstance.run) now: the colour scheme, contrast and reduced motion of the page's engine combined with the desktop's appearance that a Runic host pushes (appearance/1,RunicDesktopHostin .NET), which also carries the text scale, the accent colour and the forced-colours palette;engineandhostreport each source alone.AppearanceinterfaceThe page's appearance.
AppearanceColorSchemetype aliasA light or dark colour scheme.
AppearanceContrasttype aliasThe contrast preference: none, more contrast with the page's own colours, or colours that the desktop forces on the page (CSS
forced-colors: active).appearanceFeatureconstantappearance/1: the desktop's appearance that the host pushes to its pages.AppearanceSystemColorsinterfaceThe palette a desktop forces while
contrastis"forced-colors", as#rrggbbcolours named after the CSS system colours.attachFieldfunctionWires an
<input>,<textarea>or<select>to a field controller until the returned function is called: it writes the text typed (inputevents;changeof a<select>or a checkbox, whosecheckedis the value), writes nothing during IME composition, commits on blur, keeps the element's text (a checkbox'schecked) equal to the field's without moving the caret while it already shows it, and setsaria-invalidwhile the field haserrorsor anerror.Options of
installBackNavigation.bindFieldfunctionBinds an element to one member of a connected client: creates a
createFieldControllerfor a generated descriptor such asEditorFields.title(or any definition withreadandwrite), follows the client's state and wires the element asattachFielddoes.BlobRefinterfaceA file the page uploaded with
upload(): pass it to a command whose .NET parameter is aRunicUpload.blobsFeatureconstantThe feature name of blobs and uploads.
BoundFieldinterfaceA field that
bindFieldwired to an element and a client.BridgeCallChannelinterfaceThe value at
globalThis[Symbol.for("runic.views.calls")](an instance's slots).BridgeCallEventtype aliasWhat the Bridge-call channel reports.
BridgeCallHandlerinterfaceThe C# handler of a call, from a .NET host in Development (handler-timing/1): its name, such as
EditorViewModel.Save, and its duration in milliseconds as .NET measured it.BridgeCallIdentityinterfaceWhat identifies one call in both of its events.
BridgeCallKindtype aliasWhat a generated client call does:
command(also a command with a declared failure),set(a property setter),write(a checked field write),can(command availability),region(select or close a region),operation(the start or recovery of a long-running command),query(a query collection's query, rows or index).BridgeCallListenertype aliasA reader of the Bridge-call channel.
BridgeCallOutcometype aliasHow a call ended:
ok;error(it rejected, or a command answered with its declared failure);cancelled(nothing ran for it, or its answer no longer applies: superseded, released, aborted or cancelled).BridgeCallTraceinterfaceA call's W3C trace context: the page's span for the call, as
traceparentand optionallytracestate.BridgeConnectionOptionsinterfaceBridgeConnectionStatetype aliasThe connection between this page and its .NET host. -
connecting: the Bridge has not connected yet. -connected: the Bridge is connected. -reconnecting: the connection dropped and the host transport is trying to restore it. -lost: the Bridge has not been connected forlostAftermilliseconds, or never connected in that time.BridgeConnectOptionsinterfaceOptions of a generated
connect<Name>()function.BridgeDiagnosticinterfaceA failure or terminal event the Views runtime observed.
BridgeDiagnosticCodetype aliasWhat a
BridgeDiagnosticreports: aBridgeErrorKindother thanreleased(a call of a released View is expected after navigation and is not reported),uncertainfor aBridgeOperationUncertainError,timed-outfor an operation wait that passed its timeout,protocolfor a host that speaks another Views protocol version,versionfor a .NETRunic.Application.Viewsof another release than this@runic-artifex/views(no other producer is compared),revision-timeoutfor a reply whose revision the route did not reach within 5 seconds (a producer bug: the client then reads a snapshot),stale-inputfor script that wrote an older value into a focused input while a request was in flight (@runic-artifex/vite-plugin-runicin development), orreportedfor an application error the runtime caught.BridgeDiagnosticListenertype aliasBridgeErrorclassA Bridge call that .NET or the transport did not complete.
BridgeErrorKindtype aliasWhy a Bridge call did not complete.
BridgeErrorOptionsinterfaceBridgeErrorReasontype aliasRefines a
BridgeErrorkind (specs/application, "Errors").bridgeFailurefunctionAn outcome with the declared
failure.BridgeFailureDetailinterfaceFailure detail that a producer adds to an error reply only in development (.NET: host environment
Development, or the window optionIncludeFailureDetail).BridgeFieldinterfaceA generated descriptor of one settable View member, such as
EditorFields.title: how a field reads it from the View's state, writes it, and finds its validation messages.BridgeFieldConstraintsinterfaceThe C# validation attributes of a member (DataAnnotations), which a page can mirror on its input, such as
maxlengthandrequired.BridgeFieldKindtype aliasHow a field's value is edited, which selects its text form and input wiring: -
text: a TypeScriptstring(strings,Guid, durations, and dates of releases before 0.16); -number: anumber;integeris set for integer CLR types; -decimal: astringin thedecimalwire form ("-1234.50"), exact; its text uses the field's locale; -bigint: abigint(long,ulong,BigInteger); -date: astringYYYY-MM-DD(DateOnly), the form of<input type="date">; -time: astringhh:mm:ss[.f](TimeOnly); its text drops zero seconds, as<input type="time">does; -datetime: astringdate and time (DateTime, andDateTimeOffsetwithoffset); its text is the page's local date and time, the form of<input type="datetime-local">; -boolean: aboolean, edited with a checkbox; -choice: an enum name, one ofchoices; -value: any other value (objects, lists, unions, custom codecs), which has no text form.BridgeInteractionContextinterfaceBridgeOperationinterfaceA recoverable command execution identified by its request id (the protocol's operation id).
BridgeOperationCancelKindtype aliasBridgeOperationCancelResultinterfaceBridgeOperationDeliveryFailureinterfaceWhy a completed operation's result or failure could not be delivered.
BridgeOperationDeliveryFailureKindtype aliasWhy a completed operation's result or failure could not be delivered (specs/application, "Status").
BridgeOperationStartOptionsinterfaceOptions of a generated
start{Command}()call.BridgeOperationStatustype aliasThe status of an operation, discriminated by
kind.BridgeOperationStatusKindtype aliasdomain-failedmeans the command failed with its declared failure type.BridgeOperationStatusOftype aliasEvery operation status, including
domain-failed.BridgeOperationStreamIteminterfaceBridgeOperationStreamPageinterfaceOne page of a stream operation's items.
BridgeOperationUncertainErrorclassThe client could not observe whether .NET admitted or completed an operation, so its outcome is unknown: do not retry it blindly.
BridgeOperationUncertainErrorOptionsinterfaceThe identity of an operation whose outcome the client could not observe.
BridgeOperationWaitOptionsinterfaceBridgeOutcometype aliasHow a command or operation that declares a failure type ended:
okwith its value, or notokwith the declaredfailure.BridgeOutcomeFailuretype aliasThe declared failure type of a command result:
Ffor aBridgeOutcome<_, F>, otherwisenever.BridgeRowFieldsinterfaceThe cells of a keyed collection's rows, such as
InvoiceFields.lines:at(key)returns the descriptors of one row's cells, the same object for the same key, so a framework binding keeps its field across renders.BridgeStreamOperationinterfaceAn operation whose command yields a stream of
TItemvalues, read throughstream().bridgeSuccessfunctionA successful outcome with
value.BridgeValidationMessageinterfaceBridgeValidationStateinterfaceBridgeViewRequestContextinterfaceWhat a view request handler receives besides its input.
BridgeViewRequestHandlertype aliasHandles one view request of a View: a one-way presentation action the ViewModel raised, such as focusing a field or showing a toast.
ClientErrorReportinterfaceOne error as it is sent to the host, after trimming and redaction.
ClientErrorSourcetype aliasWhere a reported error came from.
ClientLanguagesOptionsinterfaceOptions of
configureClientLanguages.collectionViewportfunctionComputes a bounded viewport for fixed-height rows in any web framework.
CollectionViewportinterfaceCollectionViewportControllerinterfaceFollows a scroll container and publishes its
CollectionViewport.CollectionViewportOptionsinterfaceThe list a viewport controller measures: its row count, fixed row height and overscan.
CommandControllerinterfaceRuns a command and tracks whether it is pending and why it last failed.
CommandStateinterfaceOne consistent reading of a
CommandController.commitAllFieldsfunctionCommits every field of the current instance (the page's, outside
RunicInstance.run) that holds a draft, such as acommit: "pause"draft not written yet, and resolves once their writes settled.commitFieldsfunctionCommits fields and waits for their writes, so a command that depends on them, such as Save, can follow.
configureClientLanguagesfunctionConfigures what the current instance (the page, outside
RunicInstance.run) reports inhelloforclient-languages/1.configureFieldErrorTextfunctionSets the application's text for field errors (
FieldState.error):resolveText, the framework packages'useTextandrunicText, anddescribeBridgeErrorshow aFieldErrorwith it, in the window's language.configureRunicTextfunctionSets the text of Runic's own page text (
RunicTextKey): the sentencesdescribeBridgeErrorwrites and the key namesformatShortcutwrites, in the window's language.configureTranslatedTextfunctionConnects the Translations runtime of the current instance (the page's, outside
RunicInstance.run):resolveText,useTextand the framework helpers format references with it, and the window's locale, when the application sets one, is passed to itssetLocale.createCollectionViewportControllerfunctionCreates the framework-neutral viewport tracker behind each binding's
useCollectionViewport.createCommandControllerfunctionCreates the framework-neutral command runner behind
useCommandandinjectCommand.createFieldControllerfunctionCreates a
FieldControllerfor a generatedBridgeField, such asEditorFields.title, or any definition withreadandwrite.createFormControllerfunctionCreates a
FormControllerover field controllers, such ascreateFieldControllerresults:createLatestOperationControllerfunctionSerializes read admission, coalescing input received during delayed Start receipts and cancellation.
createMenuBarControllerfunctionFollows the host's in-page menu bar: the declared
DesktopHost.MenuBarwith the commands' availability, for the application's own menubar component.createOperationControllerfunctionFramework-neutral operation feedback.
createQueryCollectionfunctionCreates the rows of a query collection for one presentation.
createQueryViewportControllerfunctionCreates the variable-height viewport of a query collection.
createRowSizesfunctionCreates the sizes of
countrows, eachestimateuntil measured.createRunicInstancefunctionCreates a Runic instance on
options.bridge.createTextFieldControllerfunctionCreates a
TextFieldController:createFieldControllerfor a string member read and written by the given functions.createViewControllerfunctionCreates the framework-neutral controller behind
useViewandinjectView.currentInstancefunctionThe current instance: that of the innermost
RunicInstance, or thedefaultInstance.defaultInstancefunctionThe instance that code uses outside
RunicInstanceand outside a framework binding's instance provider.describeBridgeErrorfunctionOne sentence that tells a user what went wrong, for a status line or an alert, instead of
String(error)("BridgeError: …"), in the window's language when the page has Runic's text (configureRunicText, whichconfigureRunicViewsText()of@runic-artifex/views-translationssets).DocumentLocaleOptionsinterfaceWhere
syncDocumentLocalesets the language.EngineAppearanceinterfaceWhat the page's engine reports through its CSS media queries, which is what the page's CSS sees.
ErrorReportingOptionsinterfaceOptions of
installErrorReporting.FieldBaselinetype aliasFieldCommittype aliasWhen a field writes what the user typed.
FieldControllerinterfaceA framework-neutral binding of one View member to an input (
@runic-artifex/angular,react,vueandsveltewrap it asuseField/injectField).FieldDefinitiontype aliasWhat a field controller needs of a member: a generated
BridgeField, orreadandwritewith any of the other members.FieldElementtype aliasThe elements
attachFieldandbindFieldwire.FieldErrorclassA checked write's receipt that is not a plain success, or a text that does not parse.
FieldErrorArgumentsinterfaceThe parts of an
invalid-textmessage (FieldErrorReason); each reason sets the ones its row lists.FieldErrorDetailinterfaceThe reason and arguments of a
FieldError, for its constructor.FieldErrorExpectedtype aliasThe value a
requiredtext names (Enter a number.,Enter a date and time.).FieldErrorKindtype aliasWhy a field's write or text did not take effect (
FieldState.error): -rejected: the checked write's setter refused the value; the field is unchanged and the draft is kept; -conflict: another writer changed the field since the draft started;currentis its value and version, the draft is kept and nothing is written untilretry()orreset(); -committed-with-error: the value was committed, then the setter or its validation failed;currentis the committed field; -invalid-text: the text typed into the field is not a value of its kind, such as1efor a number; nothing is written.FieldErrorReasontype aliasWhy a text does not parse (
invalid-text), for an application that shows its own text: the error'sFieldErrorcarry the parts of the message, andmessagestays the English text. | Reason | English message | Arguments | | --- | --- | --- | |required|Enter a number.|expected| |not-a-number|1e is not a number.|text| |not-a-whole-number|1.5 is not a whole number.|text| |too-many-fraction-digits|1.234 has more than 2 digits after the decimal separator.|text,scale| |out-of-range|…9 is too large.(adecimalof 2⁹⁶ or more) |text| |not-a-boolean|yes is not true or false.|text| |not-a-choice|Large is not one of Small, Medium.|text,choices| |not-a-date|31.02.2026 is not a date.,x is not a date (DD.MM.YYYY or YYYY-MM-DD).|text,patterns? | |not-a-time|25:00 is not a time.,x is not a time (hh:mm or hh:mm:ss).|text,patterns? | |not-a-date-time|x is not a date and time (YYYY-MM-DDThh:mm).|text,patterns| |offset-out-of-range|…+15:00 has an offset beyond ±14:00.|text| |no-text-form|This field has no text form.| none |not-a-dateandnot-a-timewithoutpatternsare a text of the right form that names no day or time, such as 31 February.fieldErrorsAtfunctionThe validation messages of the value at a validation path and below it, in
validationorder, such as["lines", 2, "quantity"]for a cell of the third row (generated code calls it for a field path'serrors).fieldErrorTextfunctionThe text to show for a field error: the text
configureFieldErrorTextgives it intextLocale, or its Englishmessage.FieldErrorTexttype aliasThe application's text for a field error, as
configureFieldErrorTexttakes it: the text to show forerrorinlocale(the locale references are shown in,textLocale), orundefinedto show its Englishmessage.FieldOptionsinterfaceFieldSourceinterfaceThe View a field reads and writes: its latest state and the client to write with.
FieldStateinterfaceWhat a field shows.
fieldValidatingAtfunctionWhether the validation of the value at a validation path, or of a value below it, is in progress: a
validation.pendingpath starts withpath(validation-pending/1).FieldWriteOptionstype aliasFieldWriteReceipttype aliasformatShortcutfunctionThe shortcut as the platform shows it, such as
⇧⌘Son Apple platforms andCtrl+Shift+Selsewhere;""for invalid text.FormControllerinterfaceOne state over a View's fields (
createFieldController): whether the form is dirty, settled and valid, and asubmitthat writes every field before its command, so Save never runs before the last keystroke reached .NET.FormFieldinterfaceWhat a form needs of a field: a field controller, or a framework binding's field handle.
FormFieldControllertype aliasA field controller as a form reads it.
formFieldListfunctionThe fields of a list or record, in order.
FormFieldstype aliasThe fields of a form: a list, or a record such as
{ title, body }.FormFieldStatetype aliasWhat
submitreads of a field's state now.FormOptionsinterfaceFormStateinterfaceThe state of a form: what its fields show, combined.
formStateOffunctionCombines field states into a
FormState.FormSubmitOptionsinterfaceFormSubmitResulttype aliasHow a
submitended: -submitted: the fields' writes settled and the command ran;resultis what it returned; -field-failed: a field's value did not reach the View, so the command did not run;erroris the first such field'serror: a text that does not parse (invalid-text), arejectedorconflictchecked write, or a transport failure of this submit's writes.HostAppearanceinterfaceThe desktop's appearance as the host pushed it (
appearance/1).HostUploadRequestinterfaceOne upload as a host bridge sends it itself (
HostUploads).HostUploadsinterfaceAn optional member of the host bridge (
globalThis.__runicBridge): a host that sends uploads itself, such as the mock Bridge, implements it.Maps the mouse's Back button (button 3), Alt+Left, Cmd+[ on macOS and the keyboard's Browser Back key to the window's Back, so they go back in its innermost presented region on Runic Desktop and CS-WebUI alike.
installErrorReportingfunctionReports the page's uncaught errors, unhandled promise rejections and the errors the Views runtime catches to the .NET host, which logs them through
ILoggerin the categoryRunic.Application.Views.Page(event 1150).Keeps the URL's fragment and the browser's history in step with the window's route path (
navigation-path/1): - A change of the path region pushes a history entry, goes back to the previous one, or replaces the current one.InteractionSurfaceinterfaceisApplePlatformfunctionWhether the page runs on macOS, iOS or iPadOS, where
Primaryis Command.isBridgeErrorfunctionTrue when
erroris aBridgeError, ofkindor one of the kinds when given.isBridgeOutcomefunctionTrue for an outcome created by
bridgeSuccessorbridgeFailure, including by another copy of this package.LatestOperationControllerinterfaceLatestOperationIntentinterfaceA captured selection, including the connection/session against which it is valid.
LatestOperationStateinterfacematchCasefunctionHandles every case of a
$caseunion, such as a declared failure:matchesShortcutfunctionWhether a
keydownevent is the shortcut, with exactly its modifiers.maximumQueryRangeconstantThe most rows one range has.
MenuBarControllerinterfaceThe headless in-page menu bar.
MenuBarControllerOptionsinterfaceOptions of
createMenuBarController.MenuBarEntrytype aliasAn entry of a menu.
MenuBarInvokeResulttype aliasWhat
MenuBarControllerdid:executedthe command ran;disabledit cannot run now;stalethe bar changed since the item was rendered.MenuBarIteminterfaceA menu item.
MenuBarMenuinterfaceA menu of the bar, or a submenu.
MenuBarRequesttype aliasA keyboard request for the page's menubar component:
focusits first menu (an Alt tap or F10) oropena menu (Alt plus the menu's access key).MenuBarSeparatorinterfaceA separator line.
MenuBarStateinterfaceThe menu bar as the page renders it.
Goes back in the window as its Back button does: the .NET
RunicNavigator.BackAsync, in the innermost presented region that can go back, through its departure guards.A change of the window's route path.
navigation-path/1(specs/application/README.md, "Navigation paths"): the window's Back and its route path.How the page changes its history for a new route path: a new entry, back to the previous one, or in place.
Options of
installNavigationPath.The reply to
navigateBackandopenNavigationPath.The parts of the page's
windowthat the navigation installs use; tests pass a stand-in.normalizeQueryfunctionThe canonical wire form of a query:
sortandfilterspresent, members in the producer's order.onAppearancefunctionCalls
listenerwith the current instance's appearance each time it changes, from the engine's media queries or a host push, until the returned function is called.onBridgeConnectionfunctionObserves the current instance's connection to its .NET host (the page's, outside
RunicInstance.run).onBridgeDiagnosticfunctionObserves Views runtime failures of the current instance (the page's, outside
RunicInstance.run): failed routes (with their .NET detail in development), a missing or unconnected Bridge, operation timeouts and errors the runtime caught from listeners.onBridgeDrainingfunctionThe close drain (0.19, stable since 0.22): observes whether the application closed the current instance's window (the page's, outside
RunicInstance.run) with a close drain.Calls
listenerwith the window's route path: once the connection'shelloreports it (withoperation: "replace"), and after each change of the path region.onWindowLocalefunctionCalls
listenerwith the window's locale each time the application changes it, until the returned function is called.Opens a route path, such as
customers/42, in the window's path region, as a browser's Back, Forward or address bar does: back to the page with that route when the region's history has one, otherwise a push, through the departure guards.OperationControllerinterfaceOperationControllerOptionsinterfaceOperationStateinterfaceFeedback for the latest run;
pendingincludes every run still being observed.pageInstancefunctionThe page instance: the document's own, on
globalThis.__runicBridgeand the shared global keys.PageReferenceinterfaceA generated content reference: a View presented in a content slot, such as a ViewModel slot of .NET
PageReference.parseShortcutfunctionReads a shortcut such as
Primary+Shift+S;nullwhen the text is not one.preloadViewfunctionConnects a connector ahead of the component that shows it, such as in a router's
loadfunction, and keeps the client forkeepAlivemilliseconds: the firstuseView/injectViewthat follows the connector takes it over with its state, so the component renders the View at once instead of "Connecting…".PreloadViewOptionsinterfaceQueryCollectioninterfaceThe rows of one query collection for one presentation.
QueryCollectionQueryinterfaceA query as the producer publishes it: every member present.
QueryCollectionSnapshotinterfaceWhat a query collection shows for its range.
QueryCollectionStateinterfaceThe state member of a query collection: its query, the number of matching rows, and its version.
QueryRowinterfaceOne row of a query collection's range: loaded, or a placeholder.
QueryViewportinterfaceWhat a query viewport shows.
QueryViewportControllerinterfaceFollows a scroll container for a query collection: it asks the collection for the rows the container shows and lays them out with variable heights.
QueryViewportIteminterfaceA row of a query viewport, with its layout.
QueryViewportOptionsinterfaceRegionCollectioninterfaceA region collection member of generated state, such as
state.documents: the regions in order and the selected index.regionCollectionsFeatureconstantregion-collections/1: region collection members, andregionrequests that select or close a region by key.regionEntriesfunctionThe regions of
collectionwith their index and whether each is selected; empty fornullorundefined.RegionEntryinterfaceOne region of a collection with its position, as
regionEntrieslists it for an outlet or a tab bar.RegionOutcomeinterfaceHow a
select{Name}(key)orclose{Name}(key)ended: the .NETNavigationOutcomeof the request.RegionSlotinterfaceOne region of a
RegionCollection.registryEntriesfunctionOne entry per kind with the same component, to spread into a
ViewRegistry, such as{ ...registryEntries(resultPageKinds, ResultPageView), settings: SettingsView } satisfies ViewRegistry<State["main"]>for a generated shared client's kinds.resolveTextfunctionThe text to show for a value of a
TextReferencemember: the reference formatted in the window's language (textLocale), itsfallbackTextwhen it cannot be formatted or no Translations runtime is configured, thenfallback, then its key.RowSizeEstimatetype aliasAn estimated row size: a number, or one per row.
RowSizesinterfaceThe size of every row of a list, measured or estimated.
RunicBlobinterfaceBinary content that a ViewModel exposes: a .NET
RunicBlob.RunicBridgeClientinterfaceThe host bridge a host script installs as
globalThis.__runicBridge(Views protocol 4, specs/application, "Host bridge"), or thatcreateRunicInstanceis given.RunicFiltertype aliasOne filter of a
RunicQuery.RunicInstanceinterfaceOne Runic page runtime: a Views connection over one Bridge, with its own connection state, diagnostics, translated text, window locale, appearance, fields and kept clients.
RunicInstanceOptionsinterfaceOptions of
createRunicInstance.RunicQueryinterfaceThe sort and filter of a query collection.
RunicSortKeyinterfaceOne sort key of a
RunicQuery.runicTextfunctionRunic's text for
keyintextLocale: the textconfigureRunicTextgives it, or Runic's English text.RunicTexttype aliasThe application's text for Runic's own page text, as
configureRunicTexttakes it: the text ofkeyinlocale(the locale references are shown in,textLocale), orundefinedfor Runic's English text.RunicTextKeytype aliasA text Runic writes on the page itself, named after its message in the
runic-viewscatalog (bridge.failedis the messagefailedof the groupbridge).runicTextKeysconstantEvery
RunicTextKey, for a test that checks that an application's hook covers them.selectedRegionfunctionThe selected region of
collection, orundefinedwhen it has none.The type-only key under which a generated
{Name}PageReferencenames the shared page references it extends, such asResultPagePageReferencefor a ViewModel that implements a .NET[RunicSharedClient]interfaceIResultPage.The shared page references (
[RunicSharedClient]) that a generated page reference extends;neverwhen it has none.ShortcutinterfaceA shortcut read by
parseShortcut: its normalized key and modifiers.ShortcutEventinterfaceThe parts of a
KeyboardEventa shortcut reads.shortcutFromEventfunctionThe shortcut text that
DesktopShortcut.Parsereads for akeydownevent, such asPrimary+Shift+S, so a page can record the key a user chooses and send it through an ordinary command;nullfor a press that is not a shortcut.ShortcutModifiertype aliasA modifier of a shortcut.
ShortcutOptionsinterfaceWhich platform's rule
matchesShortcutandformatShortcutapply.shortcutTextfunctionThe shortcut as
parseShortcutreads it, in canonical order:Primary+Control+Alt+Shift+Key.splitAccessKeyfunctionSplits an entry's label around its access key, to underline the key while
accessKeyHintsis true.submitFieldsfunctionCommits every field, waits for their writes and, unless a value did not reach the View, runs
command.subscribeTextfunctionCalls
listenerwhenever text resolves differently: the window's locale or the page's Translations locale changed, or a runtime or the field error text was configured.syncDocumentLocalefunctionSets
langanddirof the page's root element to the language that text references are shown in (textLocale,textDirection), now and after every language switch, until the returned function is called.textDirectionfunctionThe writing direction of the text locale (
textLocale): the Translations runtime'sdirection, or the direction of the locale's script.TextFieldControllertype aliasA framework-neutral text input binding for one View member: the string case of
FieldController, which@runic-artifex/angular,react,vueandsveltewrap asinjectTextField/useTextField.TextFieldControllerOptionsinterfaceTextFieldSourcetype aliasThe View a text field reads and writes: its latest state and the client to write with.
TextFieldStatetype aliasWhat a text field shows: a
FieldStateof a string.textLocalefunctionThe locale in which references are shown: the Translations runtime's locale, or the window's locale when the runtime cannot follow it.
TextReferenceinterfaceA text reference of Runic Translations (the
text-referencewire type, values.md): a catalog, a message key, typed arguments and an optional fallback text, as the Translations transport writes it.TextTranslationsinterfaceThe application's Translations runtime, as
configureTranslatedTexttakes it.textVersionfunctionA number that changes whenever text resolves differently, for framework snapshots.
unknownAppearanceconstantThe appearance with every member
null: whatappearancereports under server rendering, and the server snapshot of the framework hooks.uploadfunctionUploads a file to the .NET host of the current instance (the page's window, outside
RunicInstance.run) and resolves with its reference, which a command whose .NET parameter is aRunicUploadtakes.UploadOptionsinterfaceOptions of
upload.UploadProgressinterfaceThe progress of an
upload.ViewClientinterfaceThe framework-neutral surface every generated client shares.
ViewConnectorinterfaceAnything that connects a client: a generated page reference or
{ connect: connect<Name> }.ViewControllerinterfaceThe connect, observe and release state machine that every framework binding shares.
ViewControllerOptionsinterfaceViewControllerStateinterfaceOne consistent reading of a
ViewController.ViewRegistryPagetype aliasThe page types that a
ViewRegistryentry for kindKofRmay accept: the kind's own reference and each shared page reference it extends.ViewRequestSurfaceinterfaceOne view request of a generated client:
client.requests.<name>.ViewSourcetype aliasWhat a framework binding follows.
waitForBridgefunctionWaits for the current instance's host Bridge (the installed
__runicBridgeon the page) to report a connection to .NET.WaitForBridgeOptionsinterfacewindowLocalefunctionThe window's locale, a BCP 47 tag such as
"de", which the application set for this window (IRunicWindowLocalein .NET), ornullwhile it sets none and the page keeps its own (a producer of 0.16 or later,translation-text/1).
@runic-artifex/views/bindings
checkKeepAlivefunctionChecks a
keepAliveoption: a whole number of milliseconds from 0 to 2147483647, where 0 releases a client at once.defaultKeepAliveconstantThe grace period, in milliseconds, of a binding without a
keepAliveoption.describeViewClientfunctionThe View of a connected client, for a binding's DevTools labels: its view model, route and revision.
isViewClientfunctionTrue for a connected client; false for a connector.
missingViewMessagefunctionThe developer-facing text for a reference kind without a registered web component.
reportMissingViewfunctionReports a reference kind without a registered web component through the page's error reporting (
installErrorReporting,onBridgeDiagnostic, the console) after the current task, once per kind and page.translationsTextRevisionfunctionThe revision of the Runic Translations text channel, which changes with each message the Translations Vite plugin updates in place during development, for framework bindings whose text locale snapshot must change then (
useTextLocale). 0 without the channel, and always in the production build, which has none.ViewDescriptioninterfaceA connected View client as the development tools describe it.
viewSourceIdentityfunctionThe identity a binding compares to decide whether a source changed: the client itself or the connect function.
viewSourcePreviewfunctionWhat a binding shows for a source before its controller follows it, as in the render before an effect: an observed client and its state, or the client and state that a released controller kept for the connector.
@runic-artifex/views/experimental
connectComponentBridgefunctionConnects a component to its guest with the endpoint that the host page received for it (
hosted-region-contentwith the embeddingcomponent).defineHostedRegionfunctionDefines
<runic-hosted-region>in the page's custom element registry, once: a later call, also of another copy of this package, does nothing.defineRunicComponentfunctionDefines the custom element of a component and returns its definition.
HostedRegionSizingtype aliasHow the region's height is set:
fill, by the page's own layout (the default), orcontent-height, by the guest.HostedRegionStatetype aliasWhat a hosted region shows, reflected in its
stateattribute: -waiting: no Window shows in the region yet, or the page is not connected to its host yet; -loading: the region's frame loads the guest's page; -attached: the frame shows the guest's page; -detached: the guest's Window is detached from the region and may come back, as after a lost connection; -ended: the guest's Window closed or its application went away; -unsupported: the host does not implement hosted regions, the region's name is invalid, or the host pushed an embedding this page does not know.HostedRegionStateChangeDetailinterfaceThe detail of
runicregionstatechange.hostedRegionTagconstantThe tag of the element.
HostedRegionTitleChangeDetailinterfaceThe detail of
runicregiontitlechange: the guest page's title, ornullwhen it has none.RunicComponentBridgeinterfaceThe Bridge of a component: a
RunicBridgeClientthat the element closes when it ends.RunicComponentConnectiontype aliasWhat an element connects with: a Bridge, or the endpoint that
RunicComponentOptionsturns into one.RunicComponentContextinterfaceWhat a component's
mountfunction gets for one element.RunicComponentDefinitioninterfaceA defined component.
RunicComponentElementinterfaceAn element of a component.
RunicComponentEndpointinterfaceWhere a component's Bridge connects: the guest's surface and the component token (
region-component/1).RunicComponentMounttype aliasRenders the guest's Views into
context.containerwithincontext.instance, and returns a function that removes them.RunicComponentOptionsinterfaceOptions of
defineRunicComponent.RunicComponentStyleinterfaceA stylesheet of the bundle: its text and the address that its relative
url()references resolve against.RunicHostedRegionElementinterface<runic-hosted-region name="check">: a region where the host application shows a guest's Window.
@runic-artifex/views/generated
BridgeCollectionDefinitioninterfaceGenerated row codec and key of a keyed collection, or an append-only text field (
defineText).BridgeCollectionsinterfaceThe keyed collections and text fields of one generated client, passed to
connectViewascollections.BridgeFieldWriteRequestinterfaceA checked write's request members, with the values already encoded as the field's wire type.
BridgeInteractionstype aliasThe interactions of one generated client, passed to
connectViewasinteractions.BridgeMemberDecoderstype aliasOne decoder per state member, by wire name: it validates the member's wire value and returns the client value, and throws for an invalid one.
BridgeOperationCodecinterfaceHow generated code decodes the values of one operation.
BridgeOperationRuntimeHandletype aliasWhat the runtime returns for a started or recovered operation: either handle shape.
bridgeOperationsconstantBridgeOperationsinterfaceThe operation protocol, passed to
connectViewasoperationsby a generated client with operations.BridgeViewRequestHandlertype aliasHandles one view request of a View: a one-way presentation action the ViewModel raised, such as focusing a field or showing a toast.
BridgeViewRequeststype aliasThe view requests of one generated client, passed to
connectViewasrequests.connectViewfunctionConnects one generated client presentation to its route: sends
openwith a new presentation id and returns the connection once the state arrived.decodeBridgeValidationfunctionDecodes the
validationstate of a ViewModel with validation.decodeQueryCollectionStatefunctionDecodes a query collection's state member.
defineCollectionfunctionKeeps collection codecs typed in generated clients.
defineCollectionsfunctionBinds the collection codecs of a generated client to the code that applies their changes.
defineInteractionsfunctionBinds the interaction codecs of a generated client to the interaction protocol.
defineQueryCollectionfunctionDescribes a query collection's rows for
connectView.defineRequestsfunctionBinds the view request decoders of a generated client to the view request protocol.
defineTextfunctionAn append-only text field, such as a C#
[RunicAppendOnlyText]string: its frames drop characters from its start and append text, instead of resending it.disposablefunctionDefines
[Symbol.dispose]()asvalue.dispose()where the engine hasSymbol.dispose.fieldErrorsfunctionThe validation messages of the member
name(generated code calls it forBridgeField.errors): the member's own messages,own(its{name}Errors) when the View has them and none of thevalidationmessages at[name]has a text reference, and otherwise thevalidationmessages at[name], followed by thevalidationmessages whose path continues below[name], invalidationorder.fieldErrorsAtfunctionThe validation messages of the value at a validation path and below it, in
validationorder, such as["lines", 2, "quantity"]for a cell of the third row (generated code calls it for a field path'serrors).fieldPathfunctionA descriptor of one field path.
FieldPathClientinterfaceWhat a generated client with field paths offers their descriptors.
FieldPathSpecinterfaceHow generated code describes one field path.
fieldValidatingfunctionWhether the validation of the member
name, or of a value below it, is in progress invalidation(generated code calls it forBridgeField.validating): avalidation.pendingpath starts with[name].fieldValidatingAtfunctionWhether the validation of the value at a validation path, or of a value below it, is in progress: a
validation.pendingpath starts withpath(validation-pending/1).InteractionDefinitioninterfaceGenerated codec and contract of one interaction.
InteractionScopeinterfaceThe presentation one set of interaction handlers belongs to.
InteractionSessioninterfaceThe interaction handlers of one open presentation.
OperationScopeinterfaceThe connection an operation starts on.
QueryCollectionDefinitioninterfaceHow a generated client decodes a query collection's rows, and the factory of its collections, which the generated client passes in so a View without query collections does not bundle them.
regionCollectionfunctionDecodes a region collection member;
contentdecodes one region's non-null content reference.rowFieldsfunctionGenerated code: the cells of a keyed collection, created per row key on first use.
rowIndexfunctionThe index of the row with
keyinrows, or -1.uploadfunctionUploads a file to the .NET host of the current instance (the page's window, outside
RunicInstance.run) and resolves with its reference, which a command whose .NET parameter is aRunicUploadtakes.ViewConnectioninterfaceThe runtime half of a generated client: one presentation of a route, registered with
open.ViewConnectOptionsinterfaceHow a generated module connects one View route.
viewReferencesfunctionReturns a per-module cache of content references.
ViewRequestDefinitioninterfaceGenerated decoder and contract of one view request.
ViewRequestScopeinterfaceThe presentation one set of view request handlers belongs to.
ViewRequestSessioninterfaceThe view request handlers of one presentation.
@runic-artifex/views/generated/mock
MockMethodNametype aliasA client method name a failure can target, such as
save,startSave,setTitleorcanSetViewport.mockTypedViewfunctionRegisters a typed mock View.
MockTypedViewDefinitioninterfaceThe loose shape of a generated mock definition.
MockTypedViewSpecinterfaceWhat a generated
mock{Name}()knows about its client.
@runic-artifex/views/generated/wire
arrayfunctionAn array of
T: each element decoded withdecode.bigintfunctionblobfunctionblob:{url, type, size, name};sizeandnamemay be null.blobReffunctionupload:{id, name, type, size}.booleanfunctiondateTimefunctiondate-time: a local date and time, followed by nothing,Z(UTC) or an offset within ±14:00, as read.decimalfunctiondecimal: a decimal string with at most 28 fraction digits and 96 bits of digits; a negative zero loses its sign.durationfunctionduration: an ISO 8601 duration[-]P[nD][T[nH][nM][n[.f]S]]within ±2^63 100-ns units; returns the normal form, such asP1DT12HforPT36H, whichTemporal.Duration.fromreads.encodeBlobfunctionThe wire form of a blob the page sends back, such as through a mock: its members as they are.
encodeBlobReffunctionThe wire form of an upload reference:
{id, name, type, size}.encodeUnionfunctionA union written to the wire: an object whose
$casemember names the case.enumNamefunctionenum: one of the names the contract defines, compared exactly; the name is returned as it is.finiteNumberfunctionfloat64: any finite number; negative zero is returned as zero.float32functionfloat32: a number whose nearest single-precision value is finite; returns the shortest decimal that rounds to it.int64Stringfunctionint64: an integer string within −2^63 … 2^63−1; returns the decimal digits, with-0as0.integerfunctionAn integer wire type (
int8…uint32): a number whose value is an integer withinminimum…maximum.isTextReferencefunctionWhether a value has the shape of a
TextReference, as the Translations readers check it: an integerversionof at least 1 (a later one than the page's runtime reads still decodes, and shows its fallback text), stringcatalogandcontractFingerprint, a nonemptykey, anargumentsobject, and a stringfallbackTextwhen present, ornullin version 1.jsonfunctionAny JSON value, for a C#
JsonElementorJsonNode: null, a boolean, a finite number, a string, an array or a plain object of such values.localDatefunctionlocal-date: an RFC 3339full-datefrom 0001-01-01 to 9999-12-31.localTimefunctionlocal-time:hh:mm:sswith 0 to 7 fraction digits; returns the normal form without trailing zeros.objectfunctionoffsetDateTimefunctionoffset-date-time: a date-time with a required offset; a zero offset becomesZ.stringfunctionstringRecordfunctionA map of
T: each member value decoded withdecode, with any member name.textReferencefunctionA
text-referencevalue of the shapeisTextReferencechecks, of JSON values.TextReferenceinterfaceA text reference of Runic Translations (the
text-referencewire type, values.md): a catalog, a message key, typed arguments and an optional fallback text, as the Translations transport writes it.unionfunctionA union: an object whose
$casemember names the case.uuidfunctionuuid: 8-4-4-4-12 hexadecimal digits in either case; returns the lowercase normal form.
@runic-artifex/views/mock
createMockBridgefunctioninstallMockBridgefunctionInstalls a mock as
window.__runicBridge, so generated clients connect to it instead of waiting for a .NET host.installMockMenuBarfunctionServes the in-page menu bar (menu bar page protocol 2) with
menuson a mock Bridge, for tests of a page's menu bar.MockAvailabilitytype aliasWhether a command is available for a wire input (
can, and the check before the command runs).mockBlobfunctionA
RunicBlobfor a mock's state or a command result, as .NET'sRunicBlobarrives on the page.MockBlobOptionsinterfaceOptions of
mockBlob.MockBridgeinterfaceAn in-memory
__runicBridge: a Views protocol 4 producer for generated clients without .NET.MockBridgeOptionsinterfaceMockCallinterfaceOne request the client sent, in order.
MockCollectioninterfaceEdits one keyed collection of a mock View and pushes each edit as a frame with indexed changes, like a producer's keyed collection.
MockCollectionChangeinterfaceOne keyed collection change of a frame (specs/application/state-changes.md).
MockCommandtype aliasRuns a command with its wire input (
undefinedfor a command without input) and returns the state changes it makes.MockCommandHandlertype aliasRuns a command and returns the state changes it makes.
MockDomainFailureinterfaceA declared failure (
domain-failed) the mock answers instead of running a handler.MockErrorFailureinterfaceAn unexpected failure the mock answers instead of running a handler.
mockFailurefunctionAn error that a mock command or operation handler throws to fail with its declared failure:
throw mockFailure({ $case: "titleRequired" }).MockFailuretype aliasA failure the mock answers instead of running a handler.
MockFailureOftype aliasThe declared failure type of a client method:
Ffor a command that resolvesBridgeOutcome<_, F>or astart{Command}whose operation declaresF.MockInteractionOptionsinterfaceMockInteractionReplytype aliasHow the browser answered an interaction request.
MockInterceptortype aliasAnswers a request before the mock does: return a reply object to answer it (as
{ ok: true, … }or{ ok: false, error }), orundefinedto let the mock answer.MockLatencytype aliasHow long each request, reply and push travels: a number of milliseconds, a range
{ min, max }from which each message draws its own delay, or"slow"(30 to 120 ms), which makes key-by-key typing race its echoes.MockMenuBarinterfaceThe host side of a mock in-page menu bar.
MockMenuBarOptionsinterfaceOptions of
installMockMenuBar.The window's navigation in a mock (navigation-path/1).
A
navigationrequest (navigation-path/1): the window's Back, or a route path to open.The answer to a
MockNavigationRequest: the outcome (nullwhen no route matched) and the path after it.MockOperationinterfaceAn operation a client started with
start{Command}().MockOperationHandlertype aliasRuns a started operation with its wire input.
MockOperationKindtype aliasAn operation's status kind, as the protocol names it.
MockOperationOutcomeinterfaceWhat an operation handler's completion means.
MockQueryCollectioninterfaceA query collection of a mock View, from
view.query(member).MockQueryLoadinterfaceOne
query-rowsrequest the mock served.MockQuerySourceinterfaceThe rows of a mock query collection, in wire form, and how the mock serves them.
MockReferenceinterfaceThe wire form of a content reference in a mock state, such as
{ kind: "editor", id: "1" }.MockRegionCollectioninterfaceA region collection in a mock state (region-collections/1): each region's content as a
MockReference.MockRegionDecisioninterfaceWhat a region collection decides about a request: its
outcome(Committedby default) and more state changes.MockRegionDefinitioninterfaceA region collection of a mock View (region-collections/1).
MockRegionHandlertype aliasDecides a region request of a mock region collection, standing in for its departure guards.
MockRegionRequestinterfaceA page's request to select or close the region with
key;indexis its position in the collection.MockRegionResultinterfaceWhat a region handler decides: the request's
outcome(Committedby default) and more state changes.MockRequestMatchinterfaceWhich requests
failNextanswers: a request kind of a route, optionally of one member.MockSchedulingtype aliasWhen the mock delivers replies and pushes.
MockSettertype aliasRuns before a
setappliesvalue(a wire value) to its member.MockSetterHandlertype aliasRuns before a setter or checked write applies
value.MockStatetype aliasA View's wire state: one member per state member, by wire name, encoded as on the wire.
MockTypedCollectioninterfaceA keyed collection of a typed mock.
MockTypedInteractioninterfaceAn interaction that the producer asks the browser to handle.
MockTypedOperationinterfaceAn operation that a client started with
start{Command}(), with typed input and results.MockTypedOperationHandlertype aliasRuns a started operation.
MockTypedOperationOutcomeinterfaceMockTypedQueryCollectioninterfaceA query collection of a typed mock: its rows, and the loads the page asked for.
MockTypedQuerySourceinterfaceThe rows a typed mock serves for a query collection (query-collections/1).
MockTypedViewinterfaceThe typed mock of one generated client, created by a generated
mock{Name}().MockTypedViewRequestinterfaceA view request (view-requests/1) that the ViewModel raises for the browser to handle.
MockUploadinterfaceAn upload the mock received (blobs/1).
MockUploadFailureinterfaceHow the mock answers the next upload instead of storing it (
MockBridge).MockViewinterfaceMockViewDefinitioninterfacereleaseKeptViewsfunctionReleases at once the clients that framework bindings (
useView,injectView,createViewController,preloadView) keep for theirkeepAliveperiod in the current instance (the page's, or that of theRunicInstance.runit is called in), and returns how many it released.