import type React from 'react'; import type { VisualKindOption, VisualPatternOption } from '../adapters/visual/protocol-contract.js'; /** * The kind palette (#295): the profile's concept kinds, listed to be picked up. * * The kinds are the same vocabulary the Add-subject dialog's Kind select * compiles from - `vocabulary.conceptKinds`, sent with every model frame - so * nothing here decides what a workspace may contain. A row is a thing to drag * onto the canvas, and a thing to click for the same result without a pointer * gesture: either way the details dialog opens with the kind already chosen, * and the palette itself holds nothing afterwards (ADR 0116). */ /** * The drag payload's type. Custom rather than `text/plain`, so the canvas * accepts exactly what the palette offers and a stray text drop onto the * diagram stays inert. The payload is the kind's LABEL, not its full identity: * a document names a kind the short way, and `apply` refuses the identity as * an unknown kind (`YM401`) - the same rule the dialog's own select follows. */ export declare const KIND_MIME = "application/x-yarramate-kind"; export interface PaletteGroup { readonly layer: string; readonly kinds: readonly VisualKindOption[]; /** * Kinds this band holds that exist to be BOUND rather than dropped (#473 * phase 4): a ruling a pattern slot admits is authored by filling the slot, * not by dragging it onto the canvas, and there are 48 of them on the * ApertureX reference crowding the top of the motivation band. * * Keyed on constraint LINEAGE and slot admission together, never on "appears * as a slot kind" alone: `dataObject` is a slot kind on that same reference * and is a first-class thing to draw (review F14). */ readonly boundThroughSlot: readonly VisualKindOption[]; } /** One pattern document's patterns, as a band of its own. */ export interface PalettePatternGroup { readonly document: string; readonly patterns: readonly VisualPatternOption[]; } /** * The pattern bands, one per DOCUMENT, in document order. * * Above the layer bands because a pattern is the unit a reader reaches for * first: dropping "System API" is one gesture that mints an instance and its * parts, where assembling the same thing from the layer bands is five. */ export declare const palettePatternGroups: (patterns?: readonly VisualPatternOption[]) => readonly PalettePatternGroup[]; /** * Rows grouped by layer, in the profile's own layer order - the same bands the * model tree groups subjects by, so the palette and the rail read as one * organisation. Within a group the wire's order is kept: the vocabulary * arrives sorted and re-sorting it here would be a second opinion. */ export declare const paletteGroups: (kinds: readonly VisualKindOption[], patterns?: readonly VisualPatternOption[]) => readonly PaletteGroup[]; export declare const KindPalette: ({ kinds, patterns, onPick, }: { readonly kinds: readonly VisualKindOption[]; /** The patterns this workspace declares, if the frame carried any. */ readonly patterns?: readonly VisualPatternOption[]; /** A kind chosen without the drag - a click, a keyboard - which opens the * same dialog a drop does. */ readonly onPick: (kindLabel: string) => void; }) => React.ReactElement;