/** * `wicked.editor/2` surfaces (DES-EDITOR-PLUGIN-CONTRACT-001 §5): the declaration a protocol-2 editor makes for its * three surfaces (the card in the thread, the options tabs in the host panel, full screen), parsed strictly. * * A port of studio's `src/editors/surfaces.ts` (`parseSurfaces`, the word and bound rules, `canonicalSurfaces`) and * garden's `scripts/editor/_surfaces.py`: the registry refuses exactly what the host and `pack check` refuse. The * value checks (`controlValueOk`) stay studio's, where values flow. The parsed shape is the wire's * `EditorSurfaces` (api-types), so `GET /editors` carries it with its defaults filled. */ import type { EditorSurfaces } from '../core/types.js'; type Surfaces = EditorSurfaces; export declare const SURFACE_LIMITS: { readonly actions: 4; readonly tabs: 5; readonly controls: 12; readonly options: 8; readonly labelChars: 24; readonly maxChars: 200; readonly values: 16; readonly cardMinPx: 120; readonly cardMaxPx: 560; }; /** * The host's decision words: they appear only on host-owned controls (§5.2; EP §5.5 "gate actions stay in the * host"). A label is folded (NFKC, lower case, common look-alike letters mapped to ASCII) before the check, so a * homoglyph "Аpprove" is refused like "Approve". */ export declare const DECISION_WORDS: readonly ["approve", "accept", "deliver", "merge", "send", "launch", "delete", "remove", "stop", "deny", "allow", "grant", "install"]; /** The ASCII skeleton words the decision-word check reads: NFKC, lower case, look-alikes folded, split on * anything that is not a letter. */ export declare function skeleton(label: string): string[]; /** A word that starts with a decision word ("Approve", "approved", "ApproveAll", "Аpprove") is refused; * one that only contains it ("Shallow") is not. */ export declare function usesDecisionWord(label: string): boolean; export type Parsed = { ok: true; value: T; } | { ok: false; reason: string; }; /** Parse a `surfaces` declaration strictly: any violation refuses the whole of it, with the reason. */ export declare function parseSurfaces(raw: unknown): Parsed; /** The canonical JSON of parsed surfaces (fields in a fixed order, defaults filled): what "the same" means. */ export declare function canonicalSurfaces(s: Surfaces): string; export declare function sameSurfaces(a: Surfaces, b: Surfaces): boolean; export {}; //# sourceMappingURL=surfaces.d.ts.map