跳到主要内容

ui/build/collection-runtime

ui/build/collection-runtime

Interfaces

CollectionSurface

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:4

Properties

readonly optional banner?: string | null;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:7

Static bolt:banner URL declared on the collection's +representation.svelte, if any.

representation?
readonly optional representation?: Component<{
}, {
}, string>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:5


CollectionSurfaceRuntime

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:10

Properties

appId
readonly appId: () => string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:11

Returns

string

surfaces
readonly surfaces: CollectionSurfaceRegistry;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:12

Methods

claimView()
claimView(view): () => void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:13

Parameters
Parameter Type
view string
Returns

() => void

Type Aliases

CollectionClientGetter

type CollectionClientGetter = () => CollectionClient<ErasedCollectionRegistry>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:3

Returns

CollectionClient<ErasedCollectionRegistry>


CollectionSurfaceRegistry

type CollectionSurfaceRegistry = Readonly<Record<string, CollectionSurface>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:9

Functions

getCollectionClientContext()

function getCollectionClientContext(): CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:15

Returns

CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>


getCollectionClientForSurface()

function getCollectionClientForSurface(candidate, surfaceName): CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:26

Parameters

Parameter Type
candidate object
surfaceName string

Returns

CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>


getCollectionRecordScope()

function getCollectionRecordScope(): (() => string | undefined) | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:45

Returns

(() => string | undefined) | undefined


getCollectionSurfaceRuntime()

function getCollectionSurfaceRuntime():
  | CollectionSurfaceRuntime
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:30

Returns

| CollectionSurfaceRuntime | undefined


getOptionalCollectionClientContext()

function getOptionalCollectionClientContext():
  | CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:16

Returns

| CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>> | undefined


getOptionalCollectionClientGetter()

function getOptionalCollectionClientGetter():
  | CollectionClientGetter
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:24

Captures the context capability without freezing the client it currently resolves.

Host projections can replace their in-memory client when asynchronously loaded rows arrive. A record detail therefore keeps this getter and reads it inside derived state, while ordinary callers retain getOptionalCollectionClientContext() as the one-shot convenience.

Returns

| CollectionClientGetter | undefined


resolveCollectionClient()

function resolveCollectionClient<TCollections>(candidate): CollectionClient<TCollections> | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:25

Type Parameters

Type Parameter Default type
TCollections extends Readonly<Record<string, CollectionType<object, object, object, CollectionRecord>>> Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>

Parameters

Parameter Type
candidate object

Returns

CollectionClient<TCollections> | undefined


resolveCollectionSurface()

function resolveCollectionSurface(registry, collectionName):
  | CollectionSurface
  | undefined;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:28

Parameters

Parameter Type
registry | Readonly<Record<string, CollectionSurface>> | undefined
collectionName string

Returns

| CollectionSurface | undefined


resolveCollectionViewKey()

function resolveCollectionViewKey(
   view,
   fallback,
   recordScope): string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:52

The persistence key a collection surface saves its view state under.

Composed rather than concatenated at each call site so the table and the board agree on the shape, and so a nested surface inside a record detail cannot accidentally share the outer key.

Parameters

Parameter Type
view string | undefined
fallback string
recordScope string | undefined

Returns

string


setCollectionClientContext()

function setCollectionClientContext(context): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:27

Parameters

Parameter Type
context () => CollectionClient<Readonly<Record<string, CollectionType<CollectionRecord, CollectionRecord, CollectionRecord, CollectionRecord>>>>

Returns

void


setCollectionRecordScope()

function setCollectionRecordScope(scope): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:44

The record a detail surface is currently mounted for, as a view-persistence scope segment.

A table nested inside a +representation.svelte shows one record's children, so its saved columns/filters/sort must be keyed per parent record — otherwise every employee shares one "employments" view. Authored source used to build that key by interpolating the parent's id, which is exactly the system column authored code must not reach into. The surface that mounts the representation already knows the id, so it publishes it here and view stays a readable, stable name the author chose.

A getter rather than a value: the mounting surface's active record is reactive state, and the scope has to follow it without the consumer re-reading context.

Parameters

Parameter Type
scope () => string | undefined

Returns

void


setCollectionSurfaceRuntime()

function setCollectionSurfaceRuntime(runtime): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-runtime/index.d.ts:29

Parameters

Parameter Type
runtime CollectionSurfaceRuntime

Returns

void