@diagrammo/dgmo 0.2.20 → 0.2.22

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.
package/dist/index.d.cts CHANGED
@@ -982,9 +982,11 @@ interface OrgContainerBounds {
982
982
  interface OrgLegendEntry {
983
983
  value: string;
984
984
  color: string;
985
+ isDefault?: boolean;
985
986
  }
986
987
  interface OrgLegendGroup {
987
988
  name: string;
989
+ alias?: string;
988
990
  entries: OrgLegendEntry[];
989
991
  x: number;
990
992
  y: number;
@@ -1009,6 +1011,75 @@ declare function renderOrg(container: HTMLDivElement, parsed: ParsedOrg, layout:
1009
1011
  }, activeTagGroup?: string | null, hiddenAttributes?: Set<string>): void;
1010
1012
  declare function renderOrgForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
1011
1013
 
1014
+ interface KanbanTagEntry {
1015
+ value: string;
1016
+ color: string;
1017
+ lineNumber: number;
1018
+ }
1019
+ interface KanbanTagGroup {
1020
+ name: string;
1021
+ alias?: string;
1022
+ entries: KanbanTagEntry[];
1023
+ defaultValue?: string;
1024
+ lineNumber: number;
1025
+ }
1026
+ interface KanbanCard {
1027
+ id: string;
1028
+ title: string;
1029
+ tags: Record<string, string>;
1030
+ details: string[];
1031
+ lineNumber: number;
1032
+ endLineNumber: number;
1033
+ color?: string;
1034
+ }
1035
+ interface KanbanColumn {
1036
+ id: string;
1037
+ name: string;
1038
+ wipLimit?: number;
1039
+ color?: string;
1040
+ cards: KanbanCard[];
1041
+ lineNumber: number;
1042
+ }
1043
+ interface ParsedKanban {
1044
+ type: 'kanban';
1045
+ title?: string;
1046
+ titleLineNumber?: number;
1047
+ columns: KanbanColumn[];
1048
+ tagGroups: KanbanTagGroup[];
1049
+ options: Record<string, string>;
1050
+ diagnostics: DgmoError[];
1051
+ error?: string;
1052
+ }
1053
+
1054
+ declare function parseKanban(content: string, palette?: PaletteColors): ParsedKanban;
1055
+
1056
+ /**
1057
+ * Compute new file content after moving a card to a different position.
1058
+ *
1059
+ * @param content - original file content string
1060
+ * @param parsed - parsed kanban board
1061
+ * @param cardId - id of the card to move
1062
+ * @param targetColumnId - id of the destination column
1063
+ * @param targetIndex - position within target column (0 = first card)
1064
+ * @returns new content string, or null if move is invalid
1065
+ */
1066
+ declare function computeCardMove(content: string, parsed: ParsedKanban, cardId: string, targetColumnId: string, targetIndex: number): string | null;
1067
+ /**
1068
+ * Move a card to the Archive section at the end of the file.
1069
+ * Creates `== Archive ==` if it doesn't exist.
1070
+ *
1071
+ * @returns new content string, or null if the card is not found
1072
+ */
1073
+ declare function computeCardArchive(content: string, parsed: ParsedKanban, cardId: string): string | null;
1074
+ /** Check if a column name is the archive column (case-insensitive). */
1075
+ declare function isArchiveColumn(name: string): boolean;
1076
+
1077
+ declare function renderKanban(container: HTMLElement, parsed: ParsedKanban, palette: PaletteColors, isDark: boolean, _onNavigateToLine?: (line: number) => void, exportDims?: {
1078
+ width: number;
1079
+ height: number;
1080
+ }, activeTagGroup?: string | null): void;
1081
+ declare function renderKanbanForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
1082
+
1012
1083
  interface CollapsedOrgResult {
1013
1084
  /** ParsedOrg with collapsed subtrees pruned (deep-cloned, never mutates original) */
1014
1085
  parsed: ParsedOrg;
@@ -1221,4 +1292,4 @@ declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
1221
1292
  */
1222
1293
  declare function injectBranding(svgHtml: string, mutedColor: string): string;
1223
1294
 
1224
- export { type Activation, type ArcLink, type ArcNodeGroup, type ChartDataPoint, type ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedOrgResult, type D3ChartType, type D3ExportDimensions, DGMO_CHART_TYPE_MAP, type DecodedDiagramUrl, type DgmoError, type DgmoFramework, type DgmoSeverity, type DiagramViewState, type EChartsChartType, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutResult, type MemberVisibility, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, type OrgTagEntry, type OrgTagGroup, type PaletteColors, type PaletteConfig, type ParsedChart, type ParsedClassDiagram, type ParsedD3, type ParsedEChart, type ParsedERDiagram, type ParsedGraph, type ParsedOrg, type ParsedQuadrant, type ParsedSequenceDgmo, type ParticipantType, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderStep, type ResolveImportsResult, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, addDurationToDate, applyGroupOrdering, applyPositionOverrides, boldPalette, buildEChartsOption, buildEChartsOptionFromChart, buildMermaidQuadrant, buildMermaidThemeVars, buildNoteMessageMap, buildRenderSequence, buildThemeCSS, catppuccinPalette, collapseOrgTree, colorNames, computeActivations, computeTimeTicks, contrastText, decodeDiagramUrl, encodeDiagramUrl, formatDateLabel, formatDgmoError, getAvailablePalettes, getDgmoFramework, getPalette, getSeriesColors, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, injectBranding, isSequenceBlock, isSequenceNote, isValidHex, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutOrg, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, makeDgmoError, mute, nord, nordPalette, oneDarkPalette, orderArcNodes, parseChart, parseClassDiagram, parseD3, parseDgmo, parseDgmoChartType, parseEChart, parseERDiagram, parseFlowchart, parseOrg, parseQuadrant, parseSequenceDgmo, parseTimelineDate, registerPalette, render, renderArcDiagram, renderClassDiagram, renderClassDiagramForExport, renderD3ForExport, renderEChartsForExport, renderERDiagram, renderERDiagramForExport, renderFlowchart, renderFlowchartForExport, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSlopeChart, renderTimeline, renderVenn, renderWordCloud, resolveColor, resolveOrgImports, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette };
1295
+ export { type Activation, type ArcLink, type ArcNodeGroup, type ChartDataPoint, type ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedOrgResult, type D3ChartType, type D3ExportDimensions, DGMO_CHART_TYPE_MAP, type DecodedDiagramUrl, type DgmoError, type DgmoFramework, type DgmoSeverity, type DiagramViewState, type EChartsChartType, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutResult, type MemberVisibility, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, type OrgTagEntry, type OrgTagGroup, type PaletteColors, type PaletteConfig, type ParsedChart, type ParsedClassDiagram, type ParsedD3, type ParsedEChart, type ParsedERDiagram, type ParsedGraph, type ParsedKanban, type ParsedOrg, type ParsedQuadrant, type ParsedSequenceDgmo, type ParticipantType, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderStep, type ResolveImportsResult, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, addDurationToDate, applyGroupOrdering, applyPositionOverrides, boldPalette, buildEChartsOption, buildEChartsOptionFromChart, buildMermaidQuadrant, buildMermaidThemeVars, buildNoteMessageMap, buildRenderSequence, buildThemeCSS, catppuccinPalette, collapseOrgTree, colorNames, computeActivations, computeCardArchive, computeCardMove, computeTimeTicks, contrastText, decodeDiagramUrl, encodeDiagramUrl, formatDateLabel, formatDgmoError, getAvailablePalettes, getDgmoFramework, getPalette, getSeriesColors, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, injectBranding, isArchiveColumn, isSequenceBlock, isSequenceNote, isValidHex, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutOrg, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, makeDgmoError, mute, nord, nordPalette, oneDarkPalette, orderArcNodes, parseChart, parseClassDiagram, parseD3, parseDgmo, parseDgmoChartType, parseEChart, parseERDiagram, parseFlowchart, parseKanban, parseOrg, parseQuadrant, parseSequenceDgmo, parseTimelineDate, registerPalette, render, renderArcDiagram, renderClassDiagram, renderClassDiagramForExport, renderD3ForExport, renderEChartsForExport, renderERDiagram, renderERDiagramForExport, renderFlowchart, renderFlowchartForExport, renderKanban, renderKanbanForExport, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSlopeChart, renderTimeline, renderVenn, renderWordCloud, resolveColor, resolveOrgImports, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette };
package/dist/index.d.ts CHANGED
@@ -982,9 +982,11 @@ interface OrgContainerBounds {
982
982
  interface OrgLegendEntry {
983
983
  value: string;
984
984
  color: string;
985
+ isDefault?: boolean;
985
986
  }
986
987
  interface OrgLegendGroup {
987
988
  name: string;
989
+ alias?: string;
988
990
  entries: OrgLegendEntry[];
989
991
  x: number;
990
992
  y: number;
@@ -1009,6 +1011,75 @@ declare function renderOrg(container: HTMLDivElement, parsed: ParsedOrg, layout:
1009
1011
  }, activeTagGroup?: string | null, hiddenAttributes?: Set<string>): void;
1010
1012
  declare function renderOrgForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
1011
1013
 
1014
+ interface KanbanTagEntry {
1015
+ value: string;
1016
+ color: string;
1017
+ lineNumber: number;
1018
+ }
1019
+ interface KanbanTagGroup {
1020
+ name: string;
1021
+ alias?: string;
1022
+ entries: KanbanTagEntry[];
1023
+ defaultValue?: string;
1024
+ lineNumber: number;
1025
+ }
1026
+ interface KanbanCard {
1027
+ id: string;
1028
+ title: string;
1029
+ tags: Record<string, string>;
1030
+ details: string[];
1031
+ lineNumber: number;
1032
+ endLineNumber: number;
1033
+ color?: string;
1034
+ }
1035
+ interface KanbanColumn {
1036
+ id: string;
1037
+ name: string;
1038
+ wipLimit?: number;
1039
+ color?: string;
1040
+ cards: KanbanCard[];
1041
+ lineNumber: number;
1042
+ }
1043
+ interface ParsedKanban {
1044
+ type: 'kanban';
1045
+ title?: string;
1046
+ titleLineNumber?: number;
1047
+ columns: KanbanColumn[];
1048
+ tagGroups: KanbanTagGroup[];
1049
+ options: Record<string, string>;
1050
+ diagnostics: DgmoError[];
1051
+ error?: string;
1052
+ }
1053
+
1054
+ declare function parseKanban(content: string, palette?: PaletteColors): ParsedKanban;
1055
+
1056
+ /**
1057
+ * Compute new file content after moving a card to a different position.
1058
+ *
1059
+ * @param content - original file content string
1060
+ * @param parsed - parsed kanban board
1061
+ * @param cardId - id of the card to move
1062
+ * @param targetColumnId - id of the destination column
1063
+ * @param targetIndex - position within target column (0 = first card)
1064
+ * @returns new content string, or null if move is invalid
1065
+ */
1066
+ declare function computeCardMove(content: string, parsed: ParsedKanban, cardId: string, targetColumnId: string, targetIndex: number): string | null;
1067
+ /**
1068
+ * Move a card to the Archive section at the end of the file.
1069
+ * Creates `== Archive ==` if it doesn't exist.
1070
+ *
1071
+ * @returns new content string, or null if the card is not found
1072
+ */
1073
+ declare function computeCardArchive(content: string, parsed: ParsedKanban, cardId: string): string | null;
1074
+ /** Check if a column name is the archive column (case-insensitive). */
1075
+ declare function isArchiveColumn(name: string): boolean;
1076
+
1077
+ declare function renderKanban(container: HTMLElement, parsed: ParsedKanban, palette: PaletteColors, isDark: boolean, _onNavigateToLine?: (line: number) => void, exportDims?: {
1078
+ width: number;
1079
+ height: number;
1080
+ }, activeTagGroup?: string | null): void;
1081
+ declare function renderKanbanForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
1082
+
1012
1083
  interface CollapsedOrgResult {
1013
1084
  /** ParsedOrg with collapsed subtrees pruned (deep-cloned, never mutates original) */
1014
1085
  parsed: ParsedOrg;
@@ -1221,4 +1292,4 @@ declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
1221
1292
  */
1222
1293
  declare function injectBranding(svgHtml: string, mutedColor: string): string;
1223
1294
 
1224
- export { type Activation, type ArcLink, type ArcNodeGroup, type ChartDataPoint, type ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedOrgResult, type D3ChartType, type D3ExportDimensions, DGMO_CHART_TYPE_MAP, type DecodedDiagramUrl, type DgmoError, type DgmoFramework, type DgmoSeverity, type DiagramViewState, type EChartsChartType, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutResult, type MemberVisibility, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, type OrgTagEntry, type OrgTagGroup, type PaletteColors, type PaletteConfig, type ParsedChart, type ParsedClassDiagram, type ParsedD3, type ParsedEChart, type ParsedERDiagram, type ParsedGraph, type ParsedOrg, type ParsedQuadrant, type ParsedSequenceDgmo, type ParticipantType, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderStep, type ResolveImportsResult, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, addDurationToDate, applyGroupOrdering, applyPositionOverrides, boldPalette, buildEChartsOption, buildEChartsOptionFromChart, buildMermaidQuadrant, buildMermaidThemeVars, buildNoteMessageMap, buildRenderSequence, buildThemeCSS, catppuccinPalette, collapseOrgTree, colorNames, computeActivations, computeTimeTicks, contrastText, decodeDiagramUrl, encodeDiagramUrl, formatDateLabel, formatDgmoError, getAvailablePalettes, getDgmoFramework, getPalette, getSeriesColors, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, injectBranding, isSequenceBlock, isSequenceNote, isValidHex, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutOrg, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, makeDgmoError, mute, nord, nordPalette, oneDarkPalette, orderArcNodes, parseChart, parseClassDiagram, parseD3, parseDgmo, parseDgmoChartType, parseEChart, parseERDiagram, parseFlowchart, parseOrg, parseQuadrant, parseSequenceDgmo, parseTimelineDate, registerPalette, render, renderArcDiagram, renderClassDiagram, renderClassDiagramForExport, renderD3ForExport, renderEChartsForExport, renderERDiagram, renderERDiagramForExport, renderFlowchart, renderFlowchartForExport, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSlopeChart, renderTimeline, renderVenn, renderWordCloud, resolveColor, resolveOrgImports, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette };
1295
+ export { type Activation, type ArcLink, type ArcNodeGroup, type ChartDataPoint, type ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedOrgResult, type D3ChartType, type D3ExportDimensions, DGMO_CHART_TYPE_MAP, type DecodedDiagramUrl, type DgmoError, type DgmoFramework, type DgmoSeverity, type DiagramViewState, type EChartsChartType, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutResult, type MemberVisibility, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, type OrgTagEntry, type OrgTagGroup, type PaletteColors, type PaletteConfig, type ParsedChart, type ParsedClassDiagram, type ParsedD3, type ParsedEChart, type ParsedERDiagram, type ParsedGraph, type ParsedKanban, type ParsedOrg, type ParsedQuadrant, type ParsedSequenceDgmo, type ParticipantType, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderStep, type ResolveImportsResult, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, addDurationToDate, applyGroupOrdering, applyPositionOverrides, boldPalette, buildEChartsOption, buildEChartsOptionFromChart, buildMermaidQuadrant, buildMermaidThemeVars, buildNoteMessageMap, buildRenderSequence, buildThemeCSS, catppuccinPalette, collapseOrgTree, colorNames, computeActivations, computeCardArchive, computeCardMove, computeTimeTicks, contrastText, decodeDiagramUrl, encodeDiagramUrl, formatDateLabel, formatDgmoError, getAvailablePalettes, getDgmoFramework, getPalette, getSeriesColors, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, injectBranding, isArchiveColumn, isSequenceBlock, isSequenceNote, isValidHex, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutOrg, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, makeDgmoError, mute, nord, nordPalette, oneDarkPalette, orderArcNodes, parseChart, parseClassDiagram, parseD3, parseDgmo, parseDgmoChartType, parseEChart, parseERDiagram, parseFlowchart, parseKanban, parseOrg, parseQuadrant, parseSequenceDgmo, parseTimelineDate, registerPalette, render, renderArcDiagram, renderClassDiagram, renderClassDiagramForExport, renderD3ForExport, renderEChartsForExport, renderERDiagram, renderERDiagramForExport, renderFlowchart, renderFlowchartForExport, renderKanban, renderKanbanForExport, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSlopeChart, renderTimeline, renderVenn, renderWordCloud, resolveColor, resolveOrgImports, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette };