/** * Editor layer types. Sync-backend-specific payloads live beside each editor * under `editors//`; only that editor reads `EditorBinding.payload`. */ import type { ComponentType } from 'react'; /** Sync/editor backend id. */ export type EditorKind = 'automerge'; export type EditorBinding = { kind: EditorKind; payload: unknown; }; /** Props passed from workspaces into every registered editor component. */ export type EditorProps = { binding: EditorBinding; className?: string; placeholder?: string; }; /** * A registered editor: UI for one sync method, keyed by `kind`. * Implementations live under `editors//` and are listed in `registry.ts`. */ export type Editor = { readonly kind: EditorKind; readonly Component: ComponentType; };