@diagrammo/dgmo 0.4.4 → 0.5.1

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;
@@ -381,12 +397,13 @@ interface ArcNodeGroup {
381
397
  color: string | null;
382
398
  lineNumber: number;
383
399
  }
384
- type TimelineSort = 'time' | 'group';
400
+ type TimelineSort = 'time' | 'group' | 'tag';
385
401
  interface TimelineEvent {
386
402
  date: string;
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,7 +475,9 @@ interface ParsedD3 {
458
475
  timelineGroups: TimelineGroup[];
459
476
  timelineEras: TimelineEra[];
460
477
  timelineMarkers: TimelineMarker[];
478
+ timelineTagGroups: TagGroup[];
461
479
  timelineSort: TimelineSort;
480
+ timelineDefaultSwimlaneTG?: string;
462
481
  timelineScale: boolean;
463
482
  timelineSwimlanes: boolean;
464
483
  vennSets: VennSet[];
@@ -527,7 +546,7 @@ declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d
527
546
  * Renders a timeline chart into the given container using D3.
528
547
  * Supports horizontal (default) and vertical orientation.
529
548
  */
530
- declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions): void;
549
+ declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, activeTagGroup?: string | null, swimlaneTagGroup?: string | null, onTagStateChange?: (activeTagGroup: string | null, swimlaneTagGroup: string | null) => void): void;
531
550
  /**
532
551
  * Renders a word cloud into the given container using d3-cloud.
533
552
  */
@@ -546,6 +565,7 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
546
565
  collapsedNodes?: Set<string>;
547
566
  activeTagGroup?: string | null;
548
567
  hiddenAttributes?: Set<string>;
568
+ swimlaneTagGroup?: string | null;
549
569
  }, options?: {
550
570
  branding?: boolean;
551
571
  c4Level?: 'context' | 'containers' | 'components' | 'deployment';
@@ -554,22 +574,6 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
554
574
  scenario?: string;
555
575
  }): Promise<string>;
556
576
 
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
577
  /**
574
578
  * Participant types that can be declared via "Name is a type" syntax.
575
579
  */
@@ -924,6 +928,7 @@ interface ERTable {
924
928
  name: string;
925
929
  color?: string;
926
930
  columns: ERColumn[];
931
+ metadata: Record<string, string>;
927
932
  lineNumber: number;
928
933
  }
929
934
  interface ERRelationship {
@@ -944,6 +949,7 @@ interface ParsedERDiagram {
944
949
  options: Record<string, string>;
945
950
  tables: ERTable[];
946
951
  relationships: ERRelationship[];
952
+ tagGroups: TagGroup[];
947
953
  diagnostics: DgmoError[];
948
954
  error: string | null;
949
955
  }
@@ -988,7 +994,7 @@ declare function layoutERDiagram(parsed: ParsedERDiagram): ERLayoutResult;
988
994
  declare function renderERDiagram(container: HTMLDivElement, parsed: ParsedERDiagram, layout: ERLayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
989
995
  width?: number;
990
996
  height?: number;
991
- }): void;
997
+ }, activeTagGroup?: string | null): void;
992
998
  declare function renderERDiagramForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
993
999
 
994
1000
  interface InlineSpan {
@@ -1970,6 +1976,7 @@ declare const seriesColors: string[];
1970
1976
  interface DiagramViewState {
1971
1977
  activeTagGroup?: string;
1972
1978
  collapsedGroups?: string[];
1979
+ swimlaneTagGroup?: string;
1973
1980
  }
1974
1981
  interface DecodedDiagramUrl {
1975
1982
  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;
@@ -381,12 +397,13 @@ interface ArcNodeGroup {
381
397
  color: string | null;
382
398
  lineNumber: number;
383
399
  }
384
- type TimelineSort = 'time' | 'group';
400
+ type TimelineSort = 'time' | 'group' | 'tag';
385
401
  interface TimelineEvent {
386
402
  date: string;
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,7 +475,9 @@ interface ParsedD3 {
458
475
  timelineGroups: TimelineGroup[];
459
476
  timelineEras: TimelineEra[];
460
477
  timelineMarkers: TimelineMarker[];
478
+ timelineTagGroups: TagGroup[];
461
479
  timelineSort: TimelineSort;
480
+ timelineDefaultSwimlaneTG?: string;
462
481
  timelineScale: boolean;
463
482
  timelineSwimlanes: boolean;
464
483
  vennSets: VennSet[];
@@ -527,7 +546,7 @@ declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d
527
546
  * Renders a timeline chart into the given container using D3.
528
547
  * Supports horizontal (default) and vertical orientation.
529
548
  */
530
- declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions): void;
549
+ declare function renderTimeline(container: HTMLDivElement, parsed: ParsedD3, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, activeTagGroup?: string | null, swimlaneTagGroup?: string | null, onTagStateChange?: (activeTagGroup: string | null, swimlaneTagGroup: string | null) => void): void;
531
550
  /**
532
551
  * Renders a word cloud into the given container using d3-cloud.
533
552
  */
@@ -546,6 +565,7 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
546
565
  collapsedNodes?: Set<string>;
547
566
  activeTagGroup?: string | null;
548
567
  hiddenAttributes?: Set<string>;
568
+ swimlaneTagGroup?: string | null;
549
569
  }, options?: {
550
570
  branding?: boolean;
551
571
  c4Level?: 'context' | 'containers' | 'components' | 'deployment';
@@ -554,22 +574,6 @@ declare function renderD3ForExport(content: string, theme: 'light' | 'dark' | 't
554
574
  scenario?: string;
555
575
  }): Promise<string>;
556
576
 
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
577
  /**
574
578
  * Participant types that can be declared via "Name is a type" syntax.
575
579
  */
@@ -924,6 +928,7 @@ interface ERTable {
924
928
  name: string;
925
929
  color?: string;
926
930
  columns: ERColumn[];
931
+ metadata: Record<string, string>;
927
932
  lineNumber: number;
928
933
  }
929
934
  interface ERRelationship {
@@ -944,6 +949,7 @@ interface ParsedERDiagram {
944
949
  options: Record<string, string>;
945
950
  tables: ERTable[];
946
951
  relationships: ERRelationship[];
952
+ tagGroups: TagGroup[];
947
953
  diagnostics: DgmoError[];
948
954
  error: string | null;
949
955
  }
@@ -988,7 +994,7 @@ declare function layoutERDiagram(parsed: ParsedERDiagram): ERLayoutResult;
988
994
  declare function renderERDiagram(container: HTMLDivElement, parsed: ParsedERDiagram, layout: ERLayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
989
995
  width?: number;
990
996
  height?: number;
991
- }): void;
997
+ }, activeTagGroup?: string | null): void;
992
998
  declare function renderERDiagramForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
993
999
 
994
1000
  interface InlineSpan {
@@ -1970,6 +1976,7 @@ declare const seriesColors: string[];
1970
1976
  interface DiagramViewState {
1971
1977
  activeTagGroup?: string;
1972
1978
  collapsedGroups?: string[];
1979
+ swimlaneTagGroup?: string;
1973
1980
  }
1974
1981
  interface DecodedDiagramUrl {
1975
1982
  dsl: string;