/** * Static completion registries — the LIGHT completion surface * (`@diagrammo/dgmo/completion`). * * Pure data: chart-type directive registries, structural keywords, entity-type * vocabularies, the reference-grammar descriptor, closed value enums, pipe / * same-line metadata keys, and the derived metadata key set. * * Split out of `./completion` (which additionally owns the symbol *extractors*) * so editor front-ends can import the registries without dragging the chart * parsers — notably `body/parser`, whose figure-asset catalog is ~290 KB — onto * their startup path. Same rationale and rule as `./chart-meta`: only symbols * whose transitive imports are parser-constant-only live here. * * Closed enum sets (`ALL_MARKERS`, wireframe `STATE_KEYWORDS` / * `GROUP_ONLY_METADATA`) are imported from their owning parsers — never * hand-copied — so completion can't drift from the grammar (one-oracle rule). */ /** Specification for a single directive: description + optional enumerated values. */ interface DirectiveValueSpec { description: string; values?: string[]; } /** Specification for a chart type's directives. */ interface DirectiveSpec { directives: Record; } /** Chart-type → directive specifications. Every chart type has at least palette + theme. */ declare const COMPLETION_REGISTRY: Map; declare const CHART_TYPES: ReadonlyArray<{ name: string; description: string; }>; /** * Entity types for `Name is a ` declarations, keyed by chart type. * Values are sourced from parser constants (VALID_PARTICIPANT_TYPES, * C4_IS_A_RE). */ declare const ENTITY_TYPES: Map; /** * Chart-type-specific structural keywords offered on an empty/start-of-line in * the data zone (block openers like `loop`, section headers like `containers`, * the `tag` block declaration, etc.). This is the single source of truth for * the editor's structural-keyword popup — every entry MUST be a token the * corresponding parser actually recognizes (validated by the * completion-conformance suite). Do NOT add removed/diagnostic-only tokens * (e.g. cycle's `no-descriptions`) or tokens the parser ignores. * * Chart types not listed here have no structural keywords (most data charts). */ declare const STRUCTURAL_KEYWORDS: Map; /** * Chart types that support `tag` block declarations (and thus the * `alias`/`default` sub-keywords inside a tag block). Derived from * STRUCTURAL_KEYWORDS so the two can never drift — a chart supports tag blocks * iff it offers the `tag` keyword. */ declare const TAG_SUPPORTING_TYPES: ReadonlySet; /** Whether a chart type has a reference position (arrow/operator → a prior * declaration) and which operators open it. The single oracle that drives * the library extractor audit, the app's entity-trigger map, and the * conformance drift-guard — so the three can never disagree. v1 models * reference-after-operator only (NOT metadata-target references). */ interface ReferenceGrammar { hasReferenceGrammar: boolean; /** Literal operator tokens that introduce a reference (e.g. `->`, `<->`, * `~>`, `+`). The app derives its trigger regex from these (allowing the * labeled `-label->` / `~label~>` variants where applicable). */ referenceOperators: string[]; } /** * Per-type reference grammar. Grounded in each parser's arrow/operator * grammar — NOT hand-typed blind. Types with no reference position (org, * kanban, mindmap, all data charts, the radial/visualization types) declare * `hasReferenceGrammar: false`. `map` references (`route A ~> B`) are owned by * the app's bespoke geo-completion path, so it stays `false` here to avoid * double-handling. */ declare const REFERENCE_GRAMMAR: Map; /** * RACI marker alphabet (slot-7 enum in the role-assignment value position). * Consumed by editor completion. The chart type is always `raci`; the variant * (RACI / RASCI / DACI) is inferred from the markers used, so completion offers * the full union (R / A / S / C / I / D) sourced from `raci/variants.ts`'s * `ALL_MARKERS` — the marker set can never drift from the parser. */ declare const RACI_MARKER_ALPHABETS: ReadonlyMap; /** * Closed set of wireframe element state flags (slot-7 trailing enum, e.g. * `(Submit) primary destructive`). Sourced from the wireframe parser's * `STATE_KEYWORDS` — exported there and consumed here, never re-typed. */ declare const WIREFRAME_FLAGS: readonly string[]; /** * The subset of `WIREFRAME_FLAGS` that only make sense on group elements * (`[...]`). Editor completion drops these for non-group elements (buttons * `(...)`, dropdowns `{...}`). Sourced from the wireframe parser's * `GROUP_ONLY_METADATA` — exported there and consumed here, never re-typed. */ declare const WIREFRAME_GROUP_ONLY_FLAGS: readonly string[]; /** Specification for a single pipe metadata key. */ interface PipeKeySpec { description: string; values?: string[]; } /** * Pipe metadata keys for inline `| key value` on data lines. * Keyed by chart type → { context-name: keys }. * * Contexts are open-ended. The two universal ones are: * - `node` — the default for any non-arrow line * - `edge` — lines containing an arrow (`->`, `--`) * * Charts with richer line types declare additional contexts: * - raci: `role`, `phase`, `assignment` * - ring / pyramid: `layer` * - tech-radar: `quadrant`, `blip` * - journey-map: `step` * * IMPORTANT: NEVER add 'sequence' here. The `|` character in sequence * diagrams separates display names from identifiers and tag metadata. * Adding sequence would trigger false pipe-metadata completions on every `|`. */ type PipeContextMap = Record>; declare const PIPE_METADATA: Map; /** All known directive keys, derived from COMPLETION_REGISTRY. Includes implicit keys. */ declare const METADATA_KEY_SET: ReadonlySet; export { CHART_TYPES, COMPLETION_REGISTRY, type DirectiveSpec, type DirectiveValueSpec, ENTITY_TYPES, METADATA_KEY_SET, PIPE_METADATA, type PipeContextMap, type PipeKeySpec, RACI_MARKER_ALPHABETS, REFERENCE_GRAMMAR, type ReferenceGrammar, STRUCTURAL_KEYWORDS, TAG_SUPPORTING_TYPES, WIREFRAME_FLAGS, WIREFRAME_GROUP_ONLY_FLAGS };