createA2uiSurfaceStore
Create an A2uiSurfaceStore — the per-conversation store that buffers streamed A2UI v0.9 envelopes, tracks each surface's data model + lifecycle state, and exposes them as signals for rendering. One store backs a chat thread's A2UI surfaces.
A surface becomes visible once its createSurface envelope has arrived AND
a component with id root has been defined (the v0.9 progressive-rendering
rule). Everything received earlier is buffered; afterwards, components merge
incrementally by id and data-model updates apply immediately.
import { createA2uiSurfaceStore } from '@threadplane/chat';Declaration · overload 1
export declare function createA2uiSurfaceStore(): A2uiSurfaceStore;Returns
A2uiSurfaceStoreA fresh, empty A2uiSurfaceStore.
Examples
const store = createA2uiSurfaceStore();
const surfaces = store.surfaces; // Signal<Map<string, A2uiSurface>>