import { P as PaletteConfig, D as DgmoError } from './tag-groups-DrHT2tEc.js'; /** Validate that a hex string is well-formed (#RGB or #RRGGBB). */ declare function isValidHex(value: string): boolean; /** * Register a palette. Called at module initialization. * Validates that all 19 color fields per mode are present and valid hex. * Throws on malformed palettes to catch errors at startup, not at render time. */ declare function registerPalette(palette: PaletteConfig): void; /** Get palette by id. Silently returns the default palette if id is unrecognized. */ declare function getPalette(id: string): PaletteConfig; /** * Resolve a palette by id, falling back to the default palette when the id is * unregistered. If a `warn` callback is supplied, it is invoked once with a * human-readable fallback message on a miss — the single place the "resolve, * fall back, warn" policy lives, so each host can surface it its own way * (console.warn, Obsidian Notice, MCP response). Silent when the id resolves or * when no callback is passed. */ declare function resolvePaletteOrFallback(id: string, warn?: (message: string) => void): PaletteConfig; /** List all registered palettes alphabetically (for the selector UI). */ declare function getAvailablePalettes(): PaletteConfig[]; interface ChartTypeMeta { readonly id: string; readonly description: string; readonly fallback?: true; /** * Routable but never OFFERED. The type parses, routes and renders like any * other, but no surface that enumerates types for a human or a model may list * it — nobody hand-authors one, so a picker entry would produce a file the * user cannot complete. * * Honoured at five edges, and deliberately NOT inside `getAllChartTypes()`, * which keeps meaning "everything routable": * 1. `cli.ts` — `dgmo types` (plain and `--json`) * 2. `completion-registry.ts` — the chart-type completion popup * 3. `dgmo-mcp/src/index.ts` — the `list_chart_types` tool * 4. `dgmo-mcp/src/suggest/scoring.ts` — the suggester's candidate pool * 5. `scripts/gen-ai-core.mjs` — the generated AI core every model reads * `tests/internal-chart-types.test.ts` is this flag's specification; without * it the flag is a convention and the next refactor drops an edge silently. */ readonly internal?: true; /** * Offered, but not finished — expect rough edges and syntax changes. * * Unlike `internal`, a beta type IS listed everywhere; the flag only adds a * mark beside it, so somebody choosing one knows what they are choosing. * * 🔴 It lives HERE rather than in the app because the app and the marketing * site each held their own hand-written id set, kept in step by a comment, * and neither reached the CLI, the MCP server or anything else that names a * chart type. `sketch` shipped unmarked on every one of those surfaces while * being marked in two (issue #221). The original reasoning — "which charts * are beta is a product decision, not a parser concern" — was sound about * ownership and wrong about location: a fact every surface needs belongs * where every surface can read it. It costs a dgmo release to change, which * is the right price for something that moves once or twice in a type's life. * * Honoured at the same kind of edge `internal` is, and for the same reason * — an unlisted edge is a surface that silently stops telling the truth: * 1. `cli.ts` — `dgmo types` (plain and `--json`) * 2. `dgmo-mcp` — `list_chart_types`, so a model says so before choosing * 3. `diagrammo-app` — the New File dialog and the docs * 4. `diagrammo_app_site` — the docs nav and page headers * `tests/beta-chart-types.test.ts` is this flag's specification. */ readonly beta?: true; } declare const chartTypesData: readonly [{ readonly id: "journey-map"; readonly description: "User experience flow with emotion scores, phases, and annotations"; }, { readonly id: "c4"; readonly description: "System architecture (context, container, component, deployment)"; readonly beta: true; }, { readonly id: "er"; readonly description: "Database schemas and relationships"; }, { readonly id: "class"; readonly description: "UML class hierarchies"; }, { readonly id: "sequence"; readonly description: "Message request and response interaction flows"; readonly fallback: true; }, { readonly id: "state"; readonly description: "State machine / lifecycle transitions"; }, { readonly id: "infra"; readonly description: "Infrastructure traffic flow with RPS computation"; }, { readonly id: "gantt"; readonly description: "Project scheduling with task dependencies and milestones"; }, { readonly id: "pert"; readonly description: "Project network with three-point estimates, critical path, and uncertainty (Beta-PERT, Monte Carlo)"; }, { readonly id: "swimlane"; readonly description: "Cross-functional process flow with lanes, phases and gateways (BPMN-style)"; }, { readonly id: "version-control"; readonly description: "Git / version-control branch-and-merge graph: commits, branches, merges, rebase, HEAD and remote-tracking (gitGraph-style)"; }, { readonly id: "timeline"; readonly description: "Events, eras, and date ranges"; }, { readonly id: "event-line"; readonly description: "Annotated narrative timeline — events on a horizontal line with descriptions (not the date-scaled timeline)"; }, { readonly id: "body"; readonly description: "Human anatomy figure annotated by muscle/bone/joint name — for medical, exercise, and educational diagrams"; }, { readonly id: "org"; readonly description: "Reporting hierarchy"; }, { readonly id: "family"; readonly description: "Family tree / genealogy: unions (couples), children, remarriage, adoption, and GEDCOM-style metadata"; }, { readonly id: "sitemap"; readonly description: "Site / app navigation structure"; }, { readonly id: "bracket"; readonly description: "Single-elimination tournament bracket: winners auto-advance up a tree; seed the field for a day-0 skeleton or list results for a casual bracket, with two sides mirroring inward to a championship"; }, { readonly id: "kanban"; readonly description: "Task board columns"; }, { readonly id: "raci"; readonly description: "Tasks × roles responsibility matrix with constraint linting"; }, { readonly id: "tech-radar"; readonly description: "Technology adoption quadrants (adopt/trial/assess/hold)"; }, { readonly id: "mindmap"; readonly description: "Radial hierarchy of ideas branching from a central topic"; }, { readonly id: "wireframe"; readonly description: "Low-fidelity UI layout with panels, controls, and annotations"; }, { readonly id: "cycle"; readonly description: "Cyclical process visualization (PDCA, OODA, DevOps loops)"; }, { readonly id: "pyramid"; readonly description: "Stacked hierarchy of layers with descriptions (Maslow, DIKW)"; }, { readonly id: "ring"; readonly description: "Concentric rings showing nested or hierarchical categories (read core-out)"; }, { readonly id: "treemap"; readonly description: "Nested rectangles sized by value — show a hierarchy’s proportions (budgets, disk usage, portfolios) with color by category, value heatmap, or branch"; }, { readonly id: "block"; readonly description: "Block diagram: an author-controlled grid of rectangular blocks with nested, collapsible containers — system/hardware/architecture layouts where the 2-D arrangement is the meaning"; }, { readonly id: "sketch"; readonly description: "GUI-first constrained canvas: uniformly-sized shapes placed freely on a snap grid, arrows between them, meaning through tags — the markup is generated by the canvas editor"; readonly beta: true; }, { readonly id: "goal"; readonly description: "Single progress-toward-a-target value (now vs target) as a progress bar, thermometer, or gauge — KPIs, fundraising, quotas, completion"; }, { readonly id: "countdown"; readonly description: "Live \"N days until X\" that ticks every second and is accurate on every load — trip dates, launches, deadlines; the only dynamic chart type"; }, { readonly id: "clock"; readonly description: "Live world-clock board: current time for people/places across time zones, ticking every second, with optional working-hours status and sundown line"; }, { readonly id: "map"; readonly description: "Geographic concept map: highlight/score regions, drop points of interest, connect with routes or edges"; }, { readonly id: "quadrant"; readonly description: "2x2 positioning matrix"; }, { readonly id: "venn"; readonly description: "Set overlaps"; readonly beta: true; }, { readonly id: "funnel"; readonly description: "Conversion pipeline"; }, { readonly id: "slope"; readonly description: "Change between 2 time periods"; }, { readonly id: "sankey"; readonly description: "Flow / allocation visualization"; }, { readonly id: "arc"; readonly description: "Network relationships (linear or circular via `layout`)"; }, { readonly id: "wordcloud"; readonly description: "Term frequency visualization"; }, { readonly id: "heatmap"; readonly description: "Matrix intensity visualization"; }, { readonly id: "function"; readonly description: "Mathematical expressions"; }, { readonly id: "bar"; readonly description: "Categorical comparisons for 3 - 5 figures"; readonly fallback: true; }, { readonly id: "line"; readonly description: "Trends over time"; readonly fallback: true; }, { readonly id: "pie"; readonly description: "Part-to-whole proportions"; }, { readonly id: "radar"; readonly description: "Multi-dimensional metrics"; }, { readonly id: "polar-area"; readonly description: "Radial bar chart"; }, { readonly id: "scatter"; readonly description: "2D data points or bubble chart"; }, { readonly id: "flowchart"; readonly description: "Decision trees and process flows"; readonly fallback: true; }, { readonly id: "boxes-and-lines"; readonly description: "General-purpose node-edge diagrams with groups and tags"; readonly fallback: true; }, { readonly id: "live-link"; readonly description: "A pointer to a diagram published at Diagrammo Cloud"; readonly internal: true; }]; /** * Every chart type the router can dispatch — the "routable" set. * * Distinct from the "offered" set (`utils/offered-types.ts`), which drops the * `internal` types nobody hand-authors. A live link is routable but never * offered. * * This union is the reason the id list lives here: `chart-type-registry.ts` * keys its `Record` by it, so a chart type missing from the registry is a * compile error, and `ALL_CHART_TYPES` / the editor's `CHART_TYPES` derive from * the same array rather than restating it. */ type ChartTypeId = (typeof chartTypesData)[number]['id']; declare const chartTypes: readonly ChartTypeMeta[]; /** User-visible rendering category for dispatch and routing. */ type RenderCategory = 'data-chart' | 'visualization' | 'diagram'; /** * Extracts the chart type from raw file content. * First tries the first non-empty, non-comment line as a bare chart type name * (e.g., `gantt Product Launch`). * Falls back to inference when no explicit chart type is found. */ declare function parseDgmoChartType(content: string): string | null; /** * Returns the render category for a given chart type, or `null` if unknown. * Use this instead of the internal framework map for dispatch in consumers. */ declare function getRenderCategory(chartType: string): RenderCategory | null; /** * Returns true if the chart type is an extended chart type * handled by parseExtendedChart (scatter, sankey, function, heatmap, funnel). * Returns false for standard chart types and all other types. */ declare function isExtendedChartType(chartType: string): boolean; /** * Returns all supported chart type identifiers in canonical (tier) order, * derived from `chartTypes`. Consumers that need alphabetical order should * call `.sort()` explicitly. */ declare function getAllChartTypes(): string[]; /** * Canonical descriptions for every supported chart type. Derived from * `chartTypes` so there is exactly one place to update when adding a new * type. Consumed by the CLI `dgmo types` command, the editor autocomplete * popup, and the MCP `list_chart_types` tool. */ declare const CHART_TYPE_DESCRIPTIONS: Record; type ParseResult = { diagnostics: readonly DgmoError[]; }; type ParseFn = (content: string) => ParseResult; /** * Maps every chart-type id to the parser that handles it, DERIVED from * `CHART_TYPE_REGISTRY` (src/chart-type-registry.ts). Adding a new chart type * means adding ONE descriptor there plus its `chartTypes` metadata entry; the * `chart-type-registry.test.ts` cross-check asserts the registry, `chartTypes`, * the render-category sites, and the export handlers all stay in sync. */ declare const chartTypeParsers: ReadonlyArray; /** Ids in the same order as `chartTypeParsers`; used for cross-checks. */ declare const knownChartTypeIds: readonly string[]; /** * Parse DGMO content and return diagnostics without rendering. * Useful for the CLI and editor to surface all errors before attempting render. */ declare function parseDgmo(content: string): { diagnostics: DgmoError[]; chartType: string | null; }; export { type ChartTypeId as C, type RenderCategory as R, type ChartTypeMeta as a, CHART_TYPE_DESCRIPTIONS as b, chartTypes as c, chartTypeParsers as d, getAllChartTypes as e, getAvailablePalettes as f, getPalette as g, getRenderCategory as h, isExtendedChartType as i, isValidHex as j, knownChartTypeIds as k, parseDgmoChartType as l, registerPalette as m, parseDgmo as p, resolvePaletteOrFallback as r };