@diagrammo/dgmo 0.4.3 → 0.5.0

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
@@ -348,6 +348,22 @@ declare function renderEChartsForExport(content: string, theme: 'light' | 'dark'
348
348
  branding?: boolean;
349
349
  }): Promise<string>;
350
350
 
351
+ /** A single entry inside a tag group: `Value(color)` */
352
+ interface TagEntry {
353
+ value: string;
354
+ color: string;
355
+ lineNumber: number;
356
+ }
357
+ /** A tag group block: heading + entries */
358
+ interface TagGroup {
359
+ name: string;
360
+ alias?: string;
361
+ entries: TagEntry[];
362
+ /** Value of the entry marked `default` (nodes without metadata get this) */
363
+ defaultValue?: string;
364
+ lineNumber: number;
365
+ }
366
+
351
367
  type D3ChartType = 'slope' | 'wordcloud' | 'arc' | 'timeline' | 'venn' | 'quadrant' | 'sequence';
352
368
  interface D3DataItem {
353
369
  label: string;
@@ -387,6 +403,7 @@ interface TimelineEvent {
387
403
  endDate: string | null;
388
404
  label: string;
389
405
  group: string | null;
406
+ metadata: Record<string, string>;
390
407
  lineNumber: number;
391
408
  uncertain?: boolean;
392
409
  }
@@ -458,6 +475,7 @@ interface ParsedD3 {
458
475
  timelineGroups: TimelineGroup[];
459
476
  timelineEras: TimelineEra[];
460
477
  timelineMarkers: TimelineMarker[];
478
+ timelineTagGroups: TagGroup[];
461
479
  timelineSort: TimelineSort;
462
480
  timelineScale: boolean;
463
481
  timelineSwimlanes: boolean;
@@ -527,7 +545,7 @@ declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d
527
545
  * Renders a timeline chart into the given container using D3.
528
546
  * Supports horizontal (default) and vertical orientation.
529
547
  */
530
- declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions): void;
548
+ declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, activeTagGroup?: string | null): void;
531
549
  /**
532
550
  * Renders a word cloud into the given container using d3-cloud.
533
551
  */
@@ -554,22 +572,6 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
554
572
  scenario?: string;
555
573
  }): Promise<string>;
556
574
 
557
- /** A single entry inside a tag group: `Value(color)` */
558
- interface TagEntry {
559
- value: string;
560
- color: string;
561
- lineNumber: number;
562
- }
563
- /** A tag group block: heading + entries */
564
- interface TagGroup {
565
- name: string;
566
- alias?: string;
567
- entries: TagEntry[];
568
- /** Value of the entry marked `default` (nodes without metadata get this) */
569
- defaultValue?: string;
570
- lineNumber: number;
571
- }
572
-
573
575
  /**
574
576
  * Participant types that can be declared via "Name is a type" syntax.
575
577
  */
@@ -924,6 +926,7 @@ interface ERTable {
924
926
  name: string;
925
927
  color?: string;
926
928
  columns: ERColumn[];
929
+ metadata: Record<string, string>;
927
930
  lineNumber: number;
928
931
  }
929
932
  interface ERRelationship {
@@ -944,6 +947,7 @@ interface ParsedERDiagram {
944
947
  options: Record<string, string>;
945
948
  tables: ERTable[];
946
949
  relationships: ERRelationship[];
950
+ tagGroups: TagGroup[];
947
951
  diagnostics: DgmoError[];
948
952
  error: string | null;
949
953
  }
@@ -988,7 +992,7 @@ declare function layoutERDiagram(parsed: ParsedERDiagram): ERLayoutResult;
988
992
  declare function renderERDiagram(container: HTMLDivElement, parsed: ParsedERDiagram, layout: ERLayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
989
993
  width?: number;
990
994
  height?: number;
991
- }): void;
995
+ }, activeTagGroup?: string | null): void;
992
996
  declare function renderERDiagramForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
993
997
 
994
998
  interface InlineSpan {
@@ -1786,7 +1790,7 @@ interface InfraLayoutResult {
1786
1790
  width: number;
1787
1791
  height: number;
1788
1792
  }
1789
- declare function layoutInfra(computed: ComputedInfraModel, selectedNodeId?: string | null): InfraLayoutResult;
1793
+ declare function layoutInfra(computed: ComputedInfraModel, selectedNodeId?: string | null, collapsedNodes?: Set<string> | null): InfraLayoutResult;
1790
1794
 
1791
1795
  interface InfraLegendEntry {
1792
1796
  value: string;
@@ -1811,7 +1815,7 @@ interface InfraPlaybackState {
1811
1815
  speed: number;
1812
1816
  speedOptions: readonly number[];
1813
1817
  }
1814
- declare function renderInfra(container: HTMLDivElement, layout: InfraLayoutResult, palette: PaletteColors, isDark: boolean, title: string | null, titleLineNumber: number | null, tagGroups?: InfraTagGroup[], activeGroup?: string | null, animate?: boolean, playback?: InfraPlaybackState | null, selectedNodeId?: string | null, exportMode?: boolean): void;
1818
+ declare function renderInfra(container: HTMLDivElement, layout: InfraLayoutResult, palette: PaletteColors, isDark: boolean, title: string | null, titleLineNumber: number | null, tagGroups?: InfraTagGroup[], activeGroup?: string | null, animate?: boolean, playback?: InfraPlaybackState | null, selectedNodeId?: string | null, exportMode?: boolean, collapsedNodes?: Set<string> | null): void;
1815
1819
  declare function parseAndLayoutInfra(content: string): {
1816
1820
  parsed: ParsedInfra;
1817
1821
  computed: null;
@@ -1969,6 +1973,7 @@ declare const seriesColors: string[];
1969
1973
 
1970
1974
  interface DiagramViewState {
1971
1975
  activeTagGroup?: string;
1976
+ collapsedGroups?: string[];
1972
1977
  }
1973
1978
  interface DecodedDiagramUrl {
1974
1979
  dsl: string;
package/dist/index.d.ts CHANGED
@@ -348,6 +348,22 @@ declare function renderEChartsForExport(content: string, theme: 'light' | 'dark'
348
348
  branding?: boolean;
349
349
  }): Promise<string>;
350
350
 
351
+ /** A single entry inside a tag group: `Value(color)` */
352
+ interface TagEntry {
353
+ value: string;
354
+ color: string;
355
+ lineNumber: number;
356
+ }
357
+ /** A tag group block: heading + entries */
358
+ interface TagGroup {
359
+ name: string;
360
+ alias?: string;
361
+ entries: TagEntry[];
362
+ /** Value of the entry marked `default` (nodes without metadata get this) */
363
+ defaultValue?: string;
364
+ lineNumber: number;
365
+ }
366
+
351
367
  type D3ChartType = 'slope' | 'wordcloud' | 'arc' | 'timeline' | 'venn' | 'quadrant' | 'sequence';
352
368
  interface D3DataItem {
353
369
  label: string;
@@ -387,6 +403,7 @@ interface TimelineEvent {
387
403
  endDate: string | null;
388
404
  label: string;
389
405
  group: string | null;
406
+ metadata: Record<string, string>;
390
407
  lineNumber: number;
391
408
  uncertain?: boolean;
392
409
  }
@@ -458,6 +475,7 @@ interface ParsedD3 {
458
475
  timelineGroups: TimelineGroup[];
459
476
  timelineEras: TimelineEra[];
460
477
  timelineMarkers: TimelineMarker[];
478
+ timelineTagGroups: TagGroup[];
461
479
  timelineSort: TimelineSort;
462
480
  timelineScale: boolean;
463
481
  timelineSwimlanes: boolean;
@@ -527,7 +545,7 @@ declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d
527
545
  * Renders a timeline chart into the given container using D3.
528
546
  * Supports horizontal (default) and vertical orientation.
529
547
  */
530
- declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions): void;
548
+ declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, activeTagGroup?: string | null): void;
531
549
  /**
532
550
  * Renders a word cloud into the given container using d3-cloud.
533
551
  */
@@ -554,22 +572,6 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
554
572
  scenario?: string;
555
573
  }): Promise<string>;
556
574
 
557
- /** A single entry inside a tag group: `Value(color)` */
558
- interface TagEntry {
559
- value: string;
560
- color: string;
561
- lineNumber: number;
562
- }
563
- /** A tag group block: heading + entries */
564
- interface TagGroup {
565
- name: string;
566
- alias?: string;
567
- entries: TagEntry[];
568
- /** Value of the entry marked `default` (nodes without metadata get this) */
569
- defaultValue?: string;
570
- lineNumber: number;
571
- }
572
-
573
575
  /**
574
576
  * Participant types that can be declared via "Name is a type" syntax.
575
577
  */
@@ -924,6 +926,7 @@ interface ERTable {
924
926
  name: string;
925
927
  color?: string;
926
928
  columns: ERColumn[];
929
+ metadata: Record<string, string>;
927
930
  lineNumber: number;
928
931
  }
929
932
  interface ERRelationship {
@@ -944,6 +947,7 @@ interface ParsedERDiagram {
944
947
  options: Record<string, string>;
945
948
  tables: ERTable[];
946
949
  relationships: ERRelationship[];
950
+ tagGroups: TagGroup[];
947
951
  diagnostics: DgmoError[];
948
952
  error: string | null;
949
953
  }
@@ -988,7 +992,7 @@ declare function layoutERDiagram(parsed: ParsedERDiagram): ERLayoutResult;
988
992
  declare function renderERDiagram(container: HTMLDivElement, parsed: ParsedERDiagram, layout: ERLayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
989
993
  width?: number;
990
994
  height?: number;
991
- }): void;
995
+ }, activeTagGroup?: string | null): void;
992
996
  declare function renderERDiagramForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
993
997
 
994
998
  interface InlineSpan {
@@ -1786,7 +1790,7 @@ interface InfraLayoutResult {
1786
1790
  width: number;
1787
1791
  height: number;
1788
1792
  }
1789
- declare function layoutInfra(computed: ComputedInfraModel, selectedNodeId?: string | null): InfraLayoutResult;
1793
+ declare function layoutInfra(computed: ComputedInfraModel, selectedNodeId?: string | null, collapsedNodes?: Set<string> | null): InfraLayoutResult;
1790
1794
 
1791
1795
  interface InfraLegendEntry {
1792
1796
  value: string;
@@ -1811,7 +1815,7 @@ interface InfraPlaybackState {
1811
1815
  speed: number;
1812
1816
  speedOptions: readonly number[];
1813
1817
  }
1814
- declare function renderInfra(container: HTMLDivElement, layout: InfraLayoutResult, palette: PaletteColors, isDark: boolean, title: string | null, titleLineNumber: number | null, tagGroups?: InfraTagGroup[], activeGroup?: string | null, animate?: boolean, playback?: InfraPlaybackState | null, selectedNodeId?: string | null, exportMode?: boolean): void;
1818
+ declare function renderInfra(container: HTMLDivElement, layout: InfraLayoutResult, palette: PaletteColors, isDark: boolean, title: string | null, titleLineNumber: number | null, tagGroups?: InfraTagGroup[], activeGroup?: string | null, animate?: boolean, playback?: InfraPlaybackState | null, selectedNodeId?: string | null, exportMode?: boolean, collapsedNodes?: Set<string> | null): void;
1815
1819
  declare function parseAndLayoutInfra(content: string): {
1816
1820
  parsed: ParsedInfra;
1817
1821
  computed: null;
@@ -1969,6 +1973,7 @@ declare const seriesColors: string[];
1969
1973
 
1970
1974
  interface DiagramViewState {
1971
1975
  activeTagGroup?: string;
1976
+ collapsedGroups?: string[];
1972
1977
  }
1973
1978
  interface DecodedDiagramUrl {
1974
1979
  dsl: string;