UNPKG

trellis

Version:

Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications

27 lines 1.67 kB
/** * TML shell registry — named templates cloned into projection slots before mount. * @module trellis/ui */ export type ShellId = 'issue.card' | 'lane.card' | 'lane.row'; export type EntityKind = 'issue' | 'lane'; export type ProjectionHost = 'kanban' | 'grid' | 'table'; export type AdminView = 'kanban' | 'grid' | 'table'; /** Register a `<template>` or element as the canonical shell body. */ export declare function registerShell(id: ShellId, source: HTMLTemplateElement | Element): void; /** Test helper — clear registry between tests. */ export declare function clearShellRegistry(): void; export declare function hostFromView(view: AdminView): ProjectionHost; /** Read `--ui-vantage` / `data-ui-vantage` from root (default 8). */ export declare function readUiVantage(root: Element): number; export declare function applyUiVantage(root: Element, vantage?: number): number; /** Resolve shell id from entity kind + vantage + projection host. */ export declare function shellForVantage(kind: EntityKind, _vantage: number, host?: ProjectionHost): ShellId | null; /** Clear hydration markers so slots can be re-filled. */ export declare function clearShellHydration(root: Element): void; /** Clone registered shells into every `[data-shell-slot="<id>"]` under root. Idempotent. */ export declare function hydrateShellSlots(root: Element): void; /** Apply vantage + hydrate before TML mount. */ export declare function prepareShellsBeforeMount(root: Element): void; /** Re-hydrate shells after view toggle (no page reload). */ export declare function rehydrateShellsForView(root: Element, _view: AdminView): void; //# sourceMappingURL=tml-shell-registry.d.ts.map