@runic-artifex/views-effect
appearancesfunctionThe page's appearance (
appearancefrom@runic-artifex/views): the appearance now, then each new one.catchCasefunctionHandles every case of a declared
$casefailure in the error channel: theViewDomainFailureof acommandoroperationwhose .NET command declares a[RunicUnion]failure.clientLayerfunctionA layer that provides a connected client as
service.commandfunctionRuns a command, setter, query or checked write.
CommandValuetype aliasThe success value of a command: for one that declares a failure, the value of its
BridgeOutcome, otherwise what the client method resolves to.connectfunctionConnects a generated client for the lifetime of the current
Scopeand disposes it when the scope closes.connectionStatesfunctionThe page's connection to its .NET host: the current
BridgeConnectionState(connecting,connected,reconnecting,lostorclosed), then each change, asonBridgeConnectionfrom@runic-artifex/viewsreports it.createEffectActionfunctionCreates the framework-neutral runner behind
useEffectAction.CurrentRunicInstanceconstantThe Runic instance that the Effects and streams of this package connect and read through: the default instance (
defaultInstance()from@runic-artifex/views, the page instance or in a component bundle its element's) unless one is provided.EffectActioninterfaceA latest-wins Effect workflow projected into framework-neutral state.
EffectActionOptionsinterfaceEffectActionStateinterfaceOne consistent reading of an
EffectAction.EffectActionStatustype aliasfollowViewportfunctionSends each new row range of a viewport controller to .NET, interrupting the request for a range the user already scrolled past.
fromBridgeErrorfunctionMaps a
BridgeErrorto its tagged error.indexOfKeyfunctionThe position of the row with
keyin a query collection's current query, orundefinedwhen no row has it: what a search scrolls to withQueryViewportController.scrollToIndex.operationfunctionStarts a .NET operation and waits for its terminal status.
OperationOptionsinterfacequeryCollectionChangesfunctionThe rows a query collection (
client.queries.{name}) shows for its range: its current snapshot, then each change, keeping only the latest one a slow consumer has not read.queryViewportChangesfunctionThe layout of a query viewport (
createQueryViewportController): the rows a scroll container shows, with variable heights.RetryOperationOptionsinterfacesetQueryfunctionChanges a query collection's sort and filter, which every presentation of the ViewModel shares.
statesfunctionThe client's current state, then each accepted state.
StatesOptionsinterfacetextChangesfunctionEach change of the language that text references resolve in (
subscribeTextfrom@runic-artifex/views): the window's locale or the page's Translations locale changed, or a runtime was configured.textLocalesfunctionThe locale that text is shown in (
textLocalefrom@runic-artifex/views: the page's Translations locale, which follows the window's locale): the locale now, then each new one.textsfunctionA text reference that a ViewModel produced, in the window's language (
resolveText): its text now, then its text after each language switch.uploadfunctionUploads a file to the window's .NET host (blobs/1) and succeeds with the reference that a command's
RunicUploadinput takes.ViewCancelledclass.NET cancelled the call (
cancelled).ViewDisconnectedclassThe Bridge is not connected to .NET: the transport closed or the host ended (
disconnected).ViewDomainFailureclassThe declared failure of a command or operation (
[RunicFailure]in .NET):failureis the value the generated client decoded, such as{ $case: "titleRequired" }.ViewDomainFailureOftype aliasThe
ViewDomainFailurea command or operation with failure typeFadds; nothing whenFisnever.ViewErrortype aliasThe failures of a command, setter, query or connection.
ViewFailedclassA connect, command, setter or query failed: the .NET handler threw, the reply was invalid, or the .NET host speaks another Views protocol version (
failed).ViewFailureFieldsinterfaceFields shared by the errors that map one
BridgeErrorkind.ViewOperationCancelledclassThe operation ended as
cancelled, by this client or another one.ViewOperationErrortype aliasThe failures of an operation: starting it, observing it, or its terminal status.
ViewOperationFailedclassThe operation ended as
failed, or succeeded without a deliverable result.ViewOperationTimedOutclassThe operation did not complete in time: the
timeoutoption of operation passed and the operation was cancelled, or the plain client'swait({ timeout })resolved to its client-sidetimed-outstatus (.NET never reports one).ViewOperationUncertainclassThe client could not observe whether .NET admitted or completed an operation, or .NET no longer knows its outcome (
expiredorunknown).viewportChangesfunctionThe controller's current viewport, then each change.
ViewportRangeinterfaceThe rows a viewport request asks .NET for.
ViewRejectedclass.NET refused the call, for example a command whose
CanExecuteis false (rejected).ViewReleasedclassThe Bridge is connected, but this View was released: the client was disposed, or .NET released the View, for example because navigation replaced it (
released).ViewTimeoutclassA Bridge exists but did not connect in time, or a call did not complete in time (
timeout).No host installed
window.__runicBridge, for example a page opened from a plain Vite server (unavailable).
@runic-artifex/views-effect/react
EffectActionHandleinterfaceuseEffectActionfunctionRuns an Effect workflow from a component and renders its status, value and typed error.