trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
24 lines • 992 B
TypeScript
/**
* Palette Vanilla — framework-free bindings (ADR 0034).
*
* Import from `trellis/palette/vanilla`:
*
* const palette = createVanillaPalette({ items, onSelect });
* palette.subscribe(() => render(palette.state));
* document.addEventListener('keydown', (e) => {
* if (e.key === 'Escape') palette.actions.close();
* if (e.key === 'ArrowDown') palette.actions.moveSelection(1);
* if (e.key === 'Enter') palette.actions.select();
* });
*
* @module trellis/palette/vanilla
*/
import type { PaletteConfig, UsePaletteReturn } from '../core/index.js';
/** Accept either a config (fresh core) or an existing core (shared mount). */
export type PaletteInput = PaletteConfig | UsePaletteReturn;
/**
* Create a framework-free palette from a config or an existing core (to
* share one mount across adapters) with the standard core surface.
*/
export declare function createVanillaPalette(input: PaletteInput): UsePaletteReturn;
//# sourceMappingURL=index.d.ts.map