@runic-artifex/vue
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: MaybeRefOrGetter<CollectionViewportOptions>): CollectionViewportHandle;Follows a fixed-row-height scroll container and returns the rows to request from .NET. Pass a getter such as
() => ({ totalCount: state.value?.totalCount ?? 0, rowHeight: 32 })and watchviewportto sendstartandsizeto the ViewModel.useCommandfunctionfunction useCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn): CommandHandle<TArgs, Awaited<TReturn>>;Tracks a command's pending state and failure. The result is a reactive object, so templates read
increment.pendingdirectly; do not destructurepending,errororfailure. ```vue const increment = useCommand(() => client.value?.increment()); <button :disabled="!client || increment.pending"useViewfunctionfunction useView<TClient extends ViewClient>(source: MaybeRefOrGetter<ViewSource<TClient>>): ViewHandle<TClient>;Connects a generated View reference while the current effect scope (for example a component) is active and exposes its state as shallow refs. A changed reference disposes the previous client; disposing the scope disposes the current one. Pass a getter such as
() => props.pageto follow a prop. A reference is identified by itsconnectfunction, so a getter returning a new{ connect: connectWorkspace }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: new <R extends ViewReference>(props: (ViewOutletProps<R> & ({ [x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined; } | { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; })) & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps) => import("vue").CreateComponentPublicInstanceWithMixins<ViewOutletProps<R> & ({ [x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined; } | { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, import("vue").PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import("vue").ComponentProvideOptions, { P: {}; B: {}; D: {}; C: {}; M: {}; Defaults: {}; }, (ViewOutletProps<R> & { [x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined; }) | (ViewOutletProps<R> & { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }), {}, {}, {}, {}, {}>;Renders the registered component for a generated View reference and passes the reference as its
pageprop. A different reference remounts the component. A kind without a component renders an alert; the default slot renders while there is no content.ViewOutletPropsinterfaceViewReferencere-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; }>; }>; };A build-known map checks each generated reference kind against its component's
pageprop.ViewSourcere-exportexport { ViewSource } from '@runic-artifex/views'Re-exported from
ViewSource.