@diagrammo/dgmo 0.8.23 → 0.8.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.claude/commands/dgmo.md +60 -72
  2. package/dist/cli.cjs +119 -114
  3. package/dist/editor.cjs +0 -2
  4. package/dist/editor.cjs.map +1 -1
  5. package/dist/editor.js +0 -2
  6. package/dist/editor.js.map +1 -1
  7. package/dist/highlight.cjs +0 -2
  8. package/dist/highlight.cjs.map +1 -1
  9. package/dist/highlight.js +0 -2
  10. package/dist/highlight.js.map +1 -1
  11. package/dist/index.cjs +690 -278
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +105 -18
  14. package/dist/index.d.ts +105 -18
  15. package/dist/index.js +680 -277
  16. package/dist/index.js.map +1 -1
  17. package/dist/internal.cjs +348 -51
  18. package/dist/internal.cjs.map +1 -1
  19. package/dist/internal.d.cts +93 -5
  20. package/dist/internal.d.ts +93 -5
  21. package/dist/internal.js +334 -38
  22. package/dist/internal.js.map +1 -1
  23. package/docs/guide/chart-area.md +17 -17
  24. package/docs/guide/chart-bar-stacked.md +12 -12
  25. package/docs/guide/chart-doughnut.md +10 -10
  26. package/docs/guide/chart-funnel.md +9 -9
  27. package/docs/guide/chart-heatmap.md +10 -10
  28. package/docs/guide/chart-kanban.md +2 -0
  29. package/docs/guide/chart-line.md +19 -19
  30. package/docs/guide/chart-multi-line.md +16 -16
  31. package/docs/guide/chart-pie.md +11 -11
  32. package/docs/guide/chart-polar-area.md +10 -10
  33. package/docs/guide/chart-radar.md +9 -9
  34. package/docs/guide/chart-scatter.md +24 -27
  35. package/docs/guide/index.md +3 -3
  36. package/docs/language-reference.md +46 -25
  37. package/fonts/Inter-Bold.ttf +0 -0
  38. package/fonts/Inter-Regular.ttf +0 -0
  39. package/fonts/LICENSE-Inter.txt +92 -0
  40. package/gallery/fixtures/bar-stacked.dgmo +12 -6
  41. package/gallery/fixtures/heatmap.dgmo +12 -6
  42. package/gallery/fixtures/multi-line.dgmo +11 -7
  43. package/gallery/fixtures/quadrant.dgmo +8 -8
  44. package/gallery/fixtures/scatter.dgmo +12 -12
  45. package/package.json +4 -2
  46. package/src/boxes-and-lines/parser.ts +13 -2
  47. package/src/boxes-and-lines/renderer.ts +22 -13
  48. package/src/chart-type-scoring.ts +162 -0
  49. package/src/chart-types.ts +437 -0
  50. package/src/cli.ts +147 -66
  51. package/src/completion.ts +0 -4
  52. package/src/d3.ts +9 -2
  53. package/src/dgmo-router.ts +85 -130
  54. package/src/editor/keywords.ts +0 -2
  55. package/src/fonts.ts +3 -2
  56. package/src/gantt/parser.ts +5 -1
  57. package/src/index.ts +24 -1
  58. package/src/infra/parser.ts +1 -1
  59. package/src/internal.ts +6 -2
  60. package/src/journey-map/layout.ts +7 -3
  61. package/src/journey-map/parser.ts +5 -1
  62. package/src/kanban/parser.ts +5 -1
  63. package/src/org/collapse.ts +1 -4
  64. package/src/org/parser.ts +1 -1
  65. package/src/org/renderer.ts +26 -17
  66. package/src/sequence/parser.ts +2 -2
  67. package/src/sequence/participant-inference.ts +0 -1
  68. package/src/sequence/renderer.ts +95 -263
  69. package/src/sharing.ts +0 -1
  70. package/src/sitemap/parser.ts +1 -1
  71. package/src/utils/tag-groups.ts +35 -5
  72. package/src/wireframe/parser.ts +3 -1
package/dist/index.d.cts CHANGED
@@ -103,7 +103,6 @@ interface CompactViewState {
103
103
  rm?: string;
104
104
  htv?: Record<string, string[]>;
105
105
  ha?: string[];
106
- enl?: number[];
107
106
  sem?: boolean;
108
107
  cm?: boolean;
109
108
  c4l?: string;
@@ -206,6 +205,86 @@ declare function render(content: string, options?: {
206
205
  diagnostics: DgmoError[];
207
206
  }>;
208
207
 
208
+ interface ChartTypeMeta {
209
+ readonly id: string;
210
+ readonly description: string;
211
+ readonly triggers: readonly string[];
212
+ readonly fallback?: true;
213
+ }
214
+ declare const chartTypes: readonly ChartTypeMeta[];
215
+
216
+ /** Normalize a string to lowercase ASCII-ish tokens for matching. */
217
+ declare function normalize(s: string): string[];
218
+ /**
219
+ * True if `triggerTokens` appears as a contiguous slice of `promptTokens`.
220
+ * Token-based (not substring) — prevents "scatter plot" matching "scattered
221
+ * the plot", "ER diagram" matching "water diagram", and similar traps.
222
+ */
223
+ declare function matchesContiguously(promptTokens: readonly string[], triggerTokens: readonly string[]): boolean;
224
+ interface ChartTypeScore {
225
+ readonly type: ChartTypeMeta;
226
+ readonly score: number;
227
+ readonly matched: string[];
228
+ }
229
+ /**
230
+ * Score a single chart type against a prompt.
231
+ *
232
+ * Primary signal: contiguous trigger-phrase matches weighted by token count
233
+ * (longer phrases beat shorter ones). Secondary signal: description-word
234
+ * overlap at 0.25× weight — a tiebreak-only hint that rescues prompts which
235
+ * miss every trigger but touch description vocabulary. Triggers always win
236
+ * over descriptions because any trigger match is ≥1.0 and descriptions
237
+ * contribute ≤0.25 per token.
238
+ */
239
+ declare function scoreChartType(prompt: string, type: ChartTypeMeta): {
240
+ score: number;
241
+ matched: string[];
242
+ };
243
+ /**
244
+ * Minimum trigger-based score for a confident match. A result below this
245
+ * floor means no actual trigger fired — only description-rescue tokens
246
+ * contributed — so the caller should drop to the fallback list instead of
247
+ * returning a confident-looking wrong answer.
248
+ *
249
+ * 1.0 is the weight of a single-token trigger. Anything less came entirely
250
+ * from 0.25× description hits.
251
+ */
252
+ declare const MIN_PRIMARY_SCORE = 1;
253
+ /**
254
+ * Minimum absolute score gap required before calling a match
255
+ * non-ambiguous. 0.5 ≈ two description-rescue tokens' worth, or half a
256
+ * trigger-token difference. Below this, the cliff between "medium" and
257
+ * "ambiguous" is effectively noise.
258
+ */
259
+ declare const AMBIGUITY_THRESHOLD = 0.5;
260
+ type Confidence = 'high' | 'medium' | 'ambiguous';
261
+ /**
262
+ * Confidence from the top two scores. Rules:
263
+ * 1. top < MIN_PRIMARY_SCORE → ambiguous (no real trigger matched)
264
+ * 2. second === 0 → high (nothing competes)
265
+ * 3. top ≥ 2 × second → high (top dominates)
266
+ * 4. top − second < AMBIGUITY_THRESHOLD → ambiguous (gap is noise)
267
+ * 5. otherwise → medium
268
+ */
269
+ declare function confidence(top: number, second: number): Confidence;
270
+ interface SuggestionResult {
271
+ readonly ranked: readonly ChartTypeScore[];
272
+ readonly fallback: readonly ChartTypeMeta[];
273
+ readonly confidence: Confidence;
274
+ readonly fellBack: boolean;
275
+ }
276
+ /**
277
+ * Score every chart type against `prompt` and return a ranked suggestion
278
+ * bundle. Types with score 0 are filtered out. When the top score is below
279
+ * `MIN_PRIMARY_SCORE` (no real trigger fired), the caller should present
280
+ * the fallback list — `fellBack` is set to true in that case.
281
+ *
282
+ * Array order is preserved: scoring iterates `chartTypes` in source order
283
+ * and `.sort` is stable in V8, so ties go to the earlier entry — specialized
284
+ * types beat generic catch-alls by construction.
285
+ */
286
+ declare function suggestChartTypes(prompt: string): SuggestionResult;
287
+
209
288
  /**
210
289
  * Extracts the chart type from raw file content.
211
290
  * First tries the first non-empty, non-comment line as a bare chart type name
@@ -227,16 +306,34 @@ declare function getRenderCategory(chartType: string): RenderCategory | null;
227
306
  */
228
307
  declare function isExtendedChartType(chartType: string): boolean;
229
308
  /**
230
- * Returns all supported chart type identifiers.
231
- * Useful for CLI enumeration and autocomplete.
309
+ * Returns all supported chart type identifiers in canonical (tier) order,
310
+ * derived from `chartTypes`. Consumers that need alphabetical order should
311
+ * call `.sort()` explicitly.
232
312
  */
233
313
  declare function getAllChartTypes(): string[];
234
314
  /**
235
- * Canonical descriptions for every supported chart type. Shared by the CLI
236
- * `--chart-types` flag, the editor autocomplete popup, and the MCP
237
- * `list_chart_types` tool so all three surfaces stay in sync.
315
+ * Canonical descriptions for every supported chart type. Derived from
316
+ * `chartTypes` so there is exactly one place to update when adding a new
317
+ * type. Consumed by the CLI `--chart-types` flag, the editor autocomplete
318
+ * popup, and the MCP `list_chart_types` tool.
238
319
  */
239
320
  declare const CHART_TYPE_DESCRIPTIONS: Record<string, string>;
321
+ type ParseResult = {
322
+ diagnostics: DgmoError[];
323
+ };
324
+ type ParseFn = (content: string) => ParseResult;
325
+ /**
326
+ * Maps every chart-type id to the parser that handles it. Adding a new
327
+ * chart type means:
328
+ * 1. Add an entry here.
329
+ * 2. Add an entry to `chartTypes` in `chart-types.ts`.
330
+ *
331
+ * The `chart-types.test.ts` cross-check asserts both sets are identical;
332
+ * forgetting either side trips the test.
333
+ */
334
+ declare const chartTypeParsers: ReadonlyArray<readonly [string, ParseFn]>;
335
+ /** Ids in the same order as `chartTypeParsers`; used for cross-checks. */
336
+ declare const knownChartTypeIds: readonly string[];
240
337
  /**
241
338
  * Parse DGMO content and return diagnostics without rendering.
242
339
  * Useful for the CLI and editor to surface all errors before attempting render.
@@ -3226,13 +3323,8 @@ interface SectionMessageGroup {
3226
3323
  interface SequenceRenderOptions {
3227
3324
  collapsedSections?: Set<number>;
3228
3325
  collapsedGroups?: Set<number>;
3229
- expandedNoteLines?: Set<number>;
3230
3326
  exportWidth?: number;
3231
3327
  activeTagGroup?: string | null;
3232
- expandAllNotes?: boolean;
3233
- onExpandAllNotes?: (expand: boolean) => void;
3234
- controlsExpanded?: boolean;
3235
- onToggleControlsExpand?: () => void;
3236
3328
  }
3237
3329
  /**
3238
3330
  * Group messages by the top-level section that precedes them.
@@ -3288,14 +3380,9 @@ declare function renderSequenceDiagram(container: HTMLDivElement, parsed: Parsed
3288
3380
  /**
3289
3381
  * Build a mapping from each note's lineNumber to the lineNumber of its
3290
3382
  * associated message (the last message before the note in document order).
3291
- * Used by the app to expand notes when cursor is on the associated message.
3383
+ * Used by the app to highlight the associated message when cursor is on a note.
3292
3384
  */
3293
3385
  declare function buildNoteMessageMap(elements: SequenceElement[]): Map<number, number>;
3294
- /**
3295
- * Collect all note line numbers from a sequence diagram's elements.
3296
- * Used by the app to compute the "expand all" set.
3297
- */
3298
- declare function collectNoteLineNumbers(elements: SequenceElement[]): number[];
3299
3386
 
3300
3387
  interface CollapsedView {
3301
3388
  participants: SequenceParticipant[];
@@ -3387,4 +3474,4 @@ declare function parseFirstLine(line: string): {
3387
3474
  title: string | undefined;
3388
3475
  } | null;
3389
3476
 
3390
- export { ALL_CHART_TYPES, ARROW_DIAGNOSTIC_CODES, type Activation, type AncestorInfo, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type BlipTrend, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, CHART_TYPE_DESCRIPTIONS, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedMindmapResult, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type CycleEdge, type CycleLayoutEdge, type CycleLayoutNode, type CycleLayoutResult, type CycleNode, type CycleRenderOptions, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type FocusOrgResult, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type JourneyMapAnnotation, type JourneyMapInteractiveOptions, type JourneyMapLayout, type JourneyMapPersona, type JourneyMapPhase, type JourneyMapStep, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutOptions, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, type MemberVisibility, type MindmapLayoutEdge, type MindmapLayoutNode, type MindmapLayoutResult, type MindmapNode, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParseInArrowLabelResult, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedCycle, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedJourneyMap, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedPyramid, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedTechRadar, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, type PyramidLayer, type QuadrantPosition, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type StateCollapseResult, type TagEntry, type TagGroup, type TechRadarBlip, type TechRadarLayoutPoint, type TechRadarQuadrant, type TechRadarRing, type VisualizationType, type WireframeElement, type WireframeElementType, type WireframeFormFactor, type WireframeLayout, type WireframeLayoutNode, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, calculateSchedule, catppuccinPalette, collapseBoxesAndLines, collapseMindmapTree, collapseOrgTree, collapseSitemapTree, collapseStateGroups, collectDiagramRoles, collectNoteLineNumbers, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeCycleLayout, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeRadarLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, focusOrgTree, formatDateLabel, formatDgmoError, getAllChartTypes, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRadarGeometry, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutJourneyMap, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, mix, monokaiPalette, nord, nordPalette, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseCycle, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseJourneyMap, parseKanban, parseMindmap, parseOrg, parsePyramid, parseSequenceDgmo, parseSequenceDgmo as parseSequenceDiagram, parseSitemap, parseState, parseTechRadar, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderCycle, renderCycleForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderJourneyMap, renderJourneyMapForExport, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderPyramid, renderPyramidForExport, renderQuadrant, renderQuadrantFocus, renderQuadrantFocusForExport, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTechRadar, renderTechRadarForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };
3477
+ export { ALL_CHART_TYPES, AMBIGUITY_THRESHOLD, ARROW_DIAGNOSTIC_CODES, type Activation, type AncestorInfo, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type BlipTrend, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, CHART_TYPE_DESCRIPTIONS, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type Confidence as ChartTypeConfidence, type ChartTypeMeta, type ChartTypeScore, type SuggestionResult as ChartTypeSuggestionResult, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedMindmapResult, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type CycleEdge, type CycleLayoutEdge, type CycleLayoutNode, type CycleLayoutResult, type CycleNode, type CycleRenderOptions, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type FocusOrgResult, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type JourneyMapAnnotation, type JourneyMapInteractiveOptions, type JourneyMapLayout, type JourneyMapPersona, type JourneyMapPhase, type JourneyMapStep, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutOptions, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, MIN_PRIMARY_SCORE, type MemberVisibility, type MindmapLayoutEdge, type MindmapLayoutNode, type MindmapLayoutResult, type MindmapNode, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParseInArrowLabelResult, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedCycle, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedJourneyMap, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedPyramid, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedTechRadar, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, type PyramidLayer, type QuadrantPosition, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type StateCollapseResult, type TagEntry, type TagGroup, type TechRadarBlip, type TechRadarLayoutPoint, type TechRadarQuadrant, type TechRadarRing, type VisualizationType, type WireframeElement, type WireframeElementType, type WireframeFormFactor, type WireframeLayout, type WireframeLayoutNode, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, calculateSchedule, catppuccinPalette, confidence as chartTypeConfidence, chartTypeParsers, chartTypes, collapseBoxesAndLines, collapseMindmapTree, collapseOrgTree, collapseSitemapTree, collapseStateGroups, collectDiagramRoles, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeCycleLayout, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeRadarLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, focusOrgTree, formatDateLabel, formatDgmoError, getAllChartTypes, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRadarGeometry, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, knownChartTypeIds, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutJourneyMap, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, matchesContiguously, mix, monokaiPalette, nord, nordPalette, normalize as normalizeChartTypePrompt, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseCycle, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseJourneyMap, parseKanban, parseMindmap, parseOrg, parsePyramid, parseSequenceDgmo, parseSequenceDgmo as parseSequenceDiagram, parseSitemap, parseState, parseTechRadar, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderCycle, renderCycleForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderJourneyMap, renderJourneyMapForExport, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderPyramid, renderPyramidForExport, renderQuadrant, renderQuadrantFocus, renderQuadrantFocusForExport, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTechRadar, renderTechRadarForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, scoreChartType, seriesColors, shade, solarizedPalette, suggestChartTypes, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };
package/dist/index.d.ts CHANGED
@@ -103,7 +103,6 @@ interface CompactViewState {
103
103
  rm?: string;
104
104
  htv?: Record<string, string[]>;
105
105
  ha?: string[];
106
- enl?: number[];
107
106
  sem?: boolean;
108
107
  cm?: boolean;
109
108
  c4l?: string;
@@ -206,6 +205,86 @@ declare function render(content: string, options?: {
206
205
  diagnostics: DgmoError[];
207
206
  }>;
208
207
 
208
+ interface ChartTypeMeta {
209
+ readonly id: string;
210
+ readonly description: string;
211
+ readonly triggers: readonly string[];
212
+ readonly fallback?: true;
213
+ }
214
+ declare const chartTypes: readonly ChartTypeMeta[];
215
+
216
+ /** Normalize a string to lowercase ASCII-ish tokens for matching. */
217
+ declare function normalize(s: string): string[];
218
+ /**
219
+ * True if `triggerTokens` appears as a contiguous slice of `promptTokens`.
220
+ * Token-based (not substring) — prevents "scatter plot" matching "scattered
221
+ * the plot", "ER diagram" matching "water diagram", and similar traps.
222
+ */
223
+ declare function matchesContiguously(promptTokens: readonly string[], triggerTokens: readonly string[]): boolean;
224
+ interface ChartTypeScore {
225
+ readonly type: ChartTypeMeta;
226
+ readonly score: number;
227
+ readonly matched: string[];
228
+ }
229
+ /**
230
+ * Score a single chart type against a prompt.
231
+ *
232
+ * Primary signal: contiguous trigger-phrase matches weighted by token count
233
+ * (longer phrases beat shorter ones). Secondary signal: description-word
234
+ * overlap at 0.25× weight — a tiebreak-only hint that rescues prompts which
235
+ * miss every trigger but touch description vocabulary. Triggers always win
236
+ * over descriptions because any trigger match is ≥1.0 and descriptions
237
+ * contribute ≤0.25 per token.
238
+ */
239
+ declare function scoreChartType(prompt: string, type: ChartTypeMeta): {
240
+ score: number;
241
+ matched: string[];
242
+ };
243
+ /**
244
+ * Minimum trigger-based score for a confident match. A result below this
245
+ * floor means no actual trigger fired — only description-rescue tokens
246
+ * contributed — so the caller should drop to the fallback list instead of
247
+ * returning a confident-looking wrong answer.
248
+ *
249
+ * 1.0 is the weight of a single-token trigger. Anything less came entirely
250
+ * from 0.25× description hits.
251
+ */
252
+ declare const MIN_PRIMARY_SCORE = 1;
253
+ /**
254
+ * Minimum absolute score gap required before calling a match
255
+ * non-ambiguous. 0.5 ≈ two description-rescue tokens' worth, or half a
256
+ * trigger-token difference. Below this, the cliff between "medium" and
257
+ * "ambiguous" is effectively noise.
258
+ */
259
+ declare const AMBIGUITY_THRESHOLD = 0.5;
260
+ type Confidence = 'high' | 'medium' | 'ambiguous';
261
+ /**
262
+ * Confidence from the top two scores. Rules:
263
+ * 1. top < MIN_PRIMARY_SCORE → ambiguous (no real trigger matched)
264
+ * 2. second === 0 → high (nothing competes)
265
+ * 3. top ≥ 2 × second → high (top dominates)
266
+ * 4. top − second < AMBIGUITY_THRESHOLD → ambiguous (gap is noise)
267
+ * 5. otherwise → medium
268
+ */
269
+ declare function confidence(top: number, second: number): Confidence;
270
+ interface SuggestionResult {
271
+ readonly ranked: readonly ChartTypeScore[];
272
+ readonly fallback: readonly ChartTypeMeta[];
273
+ readonly confidence: Confidence;
274
+ readonly fellBack: boolean;
275
+ }
276
+ /**
277
+ * Score every chart type against `prompt` and return a ranked suggestion
278
+ * bundle. Types with score 0 are filtered out. When the top score is below
279
+ * `MIN_PRIMARY_SCORE` (no real trigger fired), the caller should present
280
+ * the fallback list — `fellBack` is set to true in that case.
281
+ *
282
+ * Array order is preserved: scoring iterates `chartTypes` in source order
283
+ * and `.sort` is stable in V8, so ties go to the earlier entry — specialized
284
+ * types beat generic catch-alls by construction.
285
+ */
286
+ declare function suggestChartTypes(prompt: string): SuggestionResult;
287
+
209
288
  /**
210
289
  * Extracts the chart type from raw file content.
211
290
  * First tries the first non-empty, non-comment line as a bare chart type name
@@ -227,16 +306,34 @@ declare function getRenderCategory(chartType: string): RenderCategory | null;
227
306
  */
228
307
  declare function isExtendedChartType(chartType: string): boolean;
229
308
  /**
230
- * Returns all supported chart type identifiers.
231
- * Useful for CLI enumeration and autocomplete.
309
+ * Returns all supported chart type identifiers in canonical (tier) order,
310
+ * derived from `chartTypes`. Consumers that need alphabetical order should
311
+ * call `.sort()` explicitly.
232
312
  */
233
313
  declare function getAllChartTypes(): string[];
234
314
  /**
235
- * Canonical descriptions for every supported chart type. Shared by the CLI
236
- * `--chart-types` flag, the editor autocomplete popup, and the MCP
237
- * `list_chart_types` tool so all three surfaces stay in sync.
315
+ * Canonical descriptions for every supported chart type. Derived from
316
+ * `chartTypes` so there is exactly one place to update when adding a new
317
+ * type. Consumed by the CLI `--chart-types` flag, the editor autocomplete
318
+ * popup, and the MCP `list_chart_types` tool.
238
319
  */
239
320
  declare const CHART_TYPE_DESCRIPTIONS: Record<string, string>;
321
+ type ParseResult = {
322
+ diagnostics: DgmoError[];
323
+ };
324
+ type ParseFn = (content: string) => ParseResult;
325
+ /**
326
+ * Maps every chart-type id to the parser that handles it. Adding a new
327
+ * chart type means:
328
+ * 1. Add an entry here.
329
+ * 2. Add an entry to `chartTypes` in `chart-types.ts`.
330
+ *
331
+ * The `chart-types.test.ts` cross-check asserts both sets are identical;
332
+ * forgetting either side trips the test.
333
+ */
334
+ declare const chartTypeParsers: ReadonlyArray<readonly [string, ParseFn]>;
335
+ /** Ids in the same order as `chartTypeParsers`; used for cross-checks. */
336
+ declare const knownChartTypeIds: readonly string[];
240
337
  /**
241
338
  * Parse DGMO content and return diagnostics without rendering.
242
339
  * Useful for the CLI and editor to surface all errors before attempting render.
@@ -3226,13 +3323,8 @@ interface SectionMessageGroup {
3226
3323
  interface SequenceRenderOptions {
3227
3324
  collapsedSections?: Set<number>;
3228
3325
  collapsedGroups?: Set<number>;
3229
- expandedNoteLines?: Set<number>;
3230
3326
  exportWidth?: number;
3231
3327
  activeTagGroup?: string | null;
3232
- expandAllNotes?: boolean;
3233
- onExpandAllNotes?: (expand: boolean) => void;
3234
- controlsExpanded?: boolean;
3235
- onToggleControlsExpand?: () => void;
3236
3328
  }
3237
3329
  /**
3238
3330
  * Group messages by the top-level section that precedes them.
@@ -3288,14 +3380,9 @@ declare function renderSequenceDiagram(container: HTMLDivElement, parsed: Parsed
3288
3380
  /**
3289
3381
  * Build a mapping from each note's lineNumber to the lineNumber of its
3290
3382
  * associated message (the last message before the note in document order).
3291
- * Used by the app to expand notes when cursor is on the associated message.
3383
+ * Used by the app to highlight the associated message when cursor is on a note.
3292
3384
  */
3293
3385
  declare function buildNoteMessageMap(elements: SequenceElement[]): Map<number, number>;
3294
- /**
3295
- * Collect all note line numbers from a sequence diagram's elements.
3296
- * Used by the app to compute the "expand all" set.
3297
- */
3298
- declare function collectNoteLineNumbers(elements: SequenceElement[]): number[];
3299
3386
 
3300
3387
  interface CollapsedView {
3301
3388
  participants: SequenceParticipant[];
@@ -3387,4 +3474,4 @@ declare function parseFirstLine(line: string): {
3387
3474
  title: string | undefined;
3388
3475
  } | null;
3389
3476
 
3390
- export { ALL_CHART_TYPES, ARROW_DIAGNOSTIC_CODES, type Activation, type AncestorInfo, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type BlipTrend, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, CHART_TYPE_DESCRIPTIONS, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedMindmapResult, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type CycleEdge, type CycleLayoutEdge, type CycleLayoutNode, type CycleLayoutResult, type CycleNode, type CycleRenderOptions, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type FocusOrgResult, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type JourneyMapAnnotation, type JourneyMapInteractiveOptions, type JourneyMapLayout, type JourneyMapPersona, type JourneyMapPhase, type JourneyMapStep, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutOptions, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, type MemberVisibility, type MindmapLayoutEdge, type MindmapLayoutNode, type MindmapLayoutResult, type MindmapNode, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParseInArrowLabelResult, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedCycle, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedJourneyMap, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedPyramid, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedTechRadar, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, type PyramidLayer, type QuadrantPosition, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type StateCollapseResult, type TagEntry, type TagGroup, type TechRadarBlip, type TechRadarLayoutPoint, type TechRadarQuadrant, type TechRadarRing, type VisualizationType, type WireframeElement, type WireframeElementType, type WireframeFormFactor, type WireframeLayout, type WireframeLayoutNode, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, calculateSchedule, catppuccinPalette, collapseBoxesAndLines, collapseMindmapTree, collapseOrgTree, collapseSitemapTree, collapseStateGroups, collectDiagramRoles, collectNoteLineNumbers, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeCycleLayout, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeRadarLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, focusOrgTree, formatDateLabel, formatDgmoError, getAllChartTypes, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRadarGeometry, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutJourneyMap, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, mix, monokaiPalette, nord, nordPalette, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseCycle, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseJourneyMap, parseKanban, parseMindmap, parseOrg, parsePyramid, parseSequenceDgmo, parseSequenceDgmo as parseSequenceDiagram, parseSitemap, parseState, parseTechRadar, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderCycle, renderCycleForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderJourneyMap, renderJourneyMapForExport, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderPyramid, renderPyramidForExport, renderQuadrant, renderQuadrantFocus, renderQuadrantFocusForExport, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTechRadar, renderTechRadarForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };
3477
+ export { ALL_CHART_TYPES, AMBIGUITY_THRESHOLD, ARROW_DIAGNOSTIC_CODES, type Activation, type AncestorInfo, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type BlipTrend, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, CHART_TYPE_DESCRIPTIONS, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type Confidence as ChartTypeConfidence, type ChartTypeMeta, type ChartTypeScore, type SuggestionResult as ChartTypeSuggestionResult, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedMindmapResult, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type CycleEdge, type CycleLayoutEdge, type CycleLayoutNode, type CycleLayoutResult, type CycleNode, type CycleRenderOptions, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type FocusOrgResult, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type JourneyMapAnnotation, type JourneyMapInteractiveOptions, type JourneyMapLayout, type JourneyMapPersona, type JourneyMapPhase, type JourneyMapStep, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutOptions, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, MIN_PRIMARY_SCORE, type MemberVisibility, type MindmapLayoutEdge, type MindmapLayoutNode, type MindmapLayoutResult, type MindmapNode, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParseInArrowLabelResult, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedCycle, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedJourneyMap, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedPyramid, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedTechRadar, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, type PyramidLayer, type QuadrantPosition, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type StateCollapseResult, type TagEntry, type TagGroup, type TechRadarBlip, type TechRadarLayoutPoint, type TechRadarQuadrant, type TechRadarRing, type VisualizationType, type WireframeElement, type WireframeElementType, type WireframeFormFactor, type WireframeLayout, type WireframeLayoutNode, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, calculateSchedule, catppuccinPalette, confidence as chartTypeConfidence, chartTypeParsers, chartTypes, collapseBoxesAndLines, collapseMindmapTree, collapseOrgTree, collapseSitemapTree, collapseStateGroups, collectDiagramRoles, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeCycleLayout, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeRadarLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, focusOrgTree, formatDateLabel, formatDgmoError, getAllChartTypes, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRadarGeometry, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, knownChartTypeIds, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutJourneyMap, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, matchesContiguously, mix, monokaiPalette, nord, nordPalette, normalize as normalizeChartTypePrompt, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseCycle, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseJourneyMap, parseKanban, parseMindmap, parseOrg, parsePyramid, parseSequenceDgmo, parseSequenceDgmo as parseSequenceDiagram, parseSitemap, parseState, parseTechRadar, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderCycle, renderCycleForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderJourneyMap, renderJourneyMapForExport, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderPyramid, renderPyramidForExport, renderQuadrant, renderQuadrantFocus, renderQuadrantFocusForExport, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTechRadar, renderTechRadarForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, scoreChartType, seriesColors, shade, solarizedPalette, suggestChartTypes, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };