@runic-artifex/svelte
CollectionViewportre-exportexport { CollectionViewport } from '@runic-artifex/views'Re-exported from
CollectionViewport.CollectionViewportHandleinterfaceCollectionViewportOptionsre-exportexport { CollectionViewportOptions } from '@runic-artifex/views'Re-exported from
CollectionViewportOptions.CommandHandleinterfaceuseCollectionViewportfunctionfunction useCollectionViewport(options: () => CollectionViewportOptions): CollectionViewportHandle;Follows a fixed-row-height scroll container and returns the rows to request from .NET. Call it during component initialization with a getter, such as
useCollectionViewport(() => ({ totalCount: rows.state?.totalCount ?? 0, rowHeight: 32 })), and sendviewport.startandviewport.sizeto the ViewModel from an effect.useCommandfunctionfunction useCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn): CommandHandle<TArgs, Awaited<TReturn>>;Tracks a command's pending state and failure as reactive properties. The command may close over reactive values:
const increment = useCommand(() => counter.client?.increment()); <button disabled={!counter.client || increment.pending} onclick={() => increment.run()}>…</button>useViewfunctionfunction useView<TClient extends ViewClient>(source: () => ViewSource<TClient>): ViewHandle<TClient>;Connects a generated View reference while the calling component is mounted and exposes its state as reactive properties. Call it during component initialization with a getter, such as
useView(() => page), so a changed prop disposes the previous client and connects the new one. A reference is identified by itsconnectfunction, so a getter returning a new{ connect: connectShell }object does not reconnect.ViewClientre-exportexport { ViewClient } from '@runic-artifex/views'Re-exported from
ViewClient.ViewConnectorre-exportexport { ViewConnector } from '@runic-artifex/views'Re-exported from
ViewConnector.ViewHandleinterfaceViewOutletconstantconst ViewOutlet: $$IsomorphicComponent; type ViewOutlet<R extends ViewReference> = InstanceType<typeof ViewOutlet<R>>;No documentation.
ViewReferencere-exportexport { ViewReference } from '@runic-artifex/views'Re-exported from
ViewReference.ViewRegistrytype aliastype ViewRegistry<R extends ViewReference> = { readonly [K in R["kind"]]: Component<{ page: Extract<R, { readonly kind: K; }>; }>; };Compile-time check that every View kind has a component with a matching page prop.
ViewSourcere-exportexport { ViewSource } from '@runic-artifex/views'Re-exported from
ViewSource.
@runic-artifex/svelte/views
CollectionViewportre-exportexport { CollectionViewport } from '@runic-artifex/views'Re-exported from
CollectionViewport.CollectionViewportHandleinterfaceCollectionViewportOptionsre-exportexport { CollectionViewportOptions } from '@runic-artifex/views'Re-exported from
CollectionViewportOptions.CommandHandleinterfaceuseCollectionViewportfunctionfunction useCollectionViewport(options: () => CollectionViewportOptions): CollectionViewportHandle;Follows a fixed-row-height scroll container and returns the rows to request from .NET. Call it during component initialization with a getter, such as
useCollectionViewport(() => ({ totalCount: rows.state?.totalCount ?? 0, rowHeight: 32 })), and sendviewport.startandviewport.sizeto the ViewModel from an effect.useCommandfunctionfunction useCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn): CommandHandle<TArgs, Awaited<TReturn>>;Tracks a command's pending state and failure as reactive properties. The command may close over reactive values:
const increment = useCommand(() => counter.client?.increment()); <button disabled={!counter.client || increment.pending} onclick={() => increment.run()}>…</button>useViewfunctionfunction useView<TClient extends ViewClient>(source: () => ViewSource<TClient>): ViewHandle<TClient>;Connects a generated View reference while the calling component is mounted and exposes its state as reactive properties. Call it during component initialization with a getter, such as
useView(() => page), so a changed prop disposes the previous client and connects the new one. A reference is identified by itsconnectfunction, so a getter returning a new{ connect: connectShell }object does not reconnect.ViewClientre-exportexport { ViewClient } from '@runic-artifex/views'Re-exported from
ViewClient.ViewConnectorre-exportexport { ViewConnector } from '@runic-artifex/views'Re-exported from
ViewConnector.ViewHandleinterfaceViewOutletconstantconst ViewOutlet: $$IsomorphicComponent; type ViewOutlet<R extends ViewReference> = InstanceType<typeof ViewOutlet<R>>;No documentation.
ViewReferencere-exportexport { ViewReference } from '@runic-artifex/views'Re-exported from
ViewReference.ViewRegistrytype aliastype ViewRegistry<R extends ViewReference> = { readonly [K in R["kind"]]: Component<{ page: Extract<R, { readonly kind: K; }>; }>; };Compile-time check that every View kind has a component with a matching page prop.
ViewSourcere-exportexport { ViewSource } from '@runic-artifex/views'Re-exported from
ViewSource.