trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
32 lines • 1.15 kB
TypeScript
/**
* Table Vue — `useTableVue` composable (ADR 0034 wedge 6).
*
* Import from `trellis/table/vue`:
*
* const table = useTableVue({
* data: tasks,
* columns: [{ id: 'title', accessorKey: 'title', header: 'Title' }],
* });
* // <tbody>
* // <tr v-for="row in table.state.rows" :key="row.id">
* // <td v-for="col in table.state.columns" :key="col.id">
* // {{ row.cells[col.id] }}
* // </td>
* // </tr>
* // </tbody>
*
* State is a Vue `reactive` object mirrored from the core via the shared
* `syncFromCore` bridge (same pattern as `trellis/undo-history/vue`).
* Generic over the row type.
*
* @module trellis/table/vue
*/
import type { TableConfig, UseTableReturn } from '../core/index.js';
/** Accept either a config (fresh core) or an existing core (shared mount). */
export type TableInput<T> = TableConfig<T> | UseTableReturn<T>;
/**
* Create a reactive Vue table. The core's state is mirrored into a
* `reactive()` object on every mutation.
*/
export declare function useTableVue<T extends object>(input: TableInput<T>): UseTableReturn<T>;
//# sourceMappingURL=index.d.ts.map