@diagrammo/dgmo 0.8.1 → 0.8.3
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/cli.cjs +189 -194
- package/dist/index.cjs +450 -596
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +450 -596
- package/dist/index.js.map +1 -1
- package/docs/language-reference.md +821 -1060
- package/package.json +1 -1
- package/src/c4/parser.ts +19 -13
- package/src/chart.ts +69 -47
- package/src/class/parser.ts +46 -19
- package/src/class/renderer.ts +2 -2
- package/src/cli.ts +11 -16
- package/src/completion.ts +29 -25
- package/src/d3.ts +173 -174
- package/src/dgmo-router.ts +1 -1
- package/src/echarts.ts +42 -22
- package/src/er/parser.ts +9 -17
- package/src/gantt/parser.ts +108 -40
- package/src/graph/flowchart-parser.ts +7 -55
- package/src/graph/state-parser.ts +7 -10
- package/src/infra/parser.ts +6 -126
- package/src/infra/types.ts +0 -1
- package/src/initiative-status/parser.ts +7 -13
- package/src/kanban/parser.ts +4 -7
- package/src/org/parser.ts +5 -8
- package/src/org/resolver.ts +3 -3
- package/src/render.ts +1 -2
- package/src/sequence/parser.ts +22 -45
- package/src/sitemap/parser.ts +10 -17
- package/src/utils/parsing.ts +9 -43
- package/src/utils/tag-groups.ts +4 -41
- package/src/infra/serialize.ts +0 -67
package/dist/index.d.cts
CHANGED
|
@@ -25,8 +25,7 @@ declare function formatDgmoError(err: DgmoError): string;
|
|
|
25
25
|
* ```ts
|
|
26
26
|
* import { render } from '@diagrammo/dgmo';
|
|
27
27
|
*
|
|
28
|
-
* const svg = await render(`
|
|
29
|
-
* title: Languages
|
|
28
|
+
* const svg = await render(`pie Languages
|
|
30
29
|
* TypeScript: 45
|
|
31
30
|
* Python: 30
|
|
32
31
|
* Rust: 25`);
|
|
@@ -45,7 +44,7 @@ declare function render(content: string, options?: {
|
|
|
45
44
|
/**
|
|
46
45
|
* Extracts the chart type from raw file content.
|
|
47
46
|
* First tries the first non-empty, non-comment line as a bare chart type name
|
|
48
|
-
* (e.g., `gantt Product Launch`).
|
|
47
|
+
* (e.g., `gantt Product Launch`).
|
|
49
48
|
* Falls back to inference when no explicit chart type is found.
|
|
50
49
|
*/
|
|
51
50
|
declare function parseDgmoChartType(content: string): string | null;
|
|
@@ -238,7 +237,9 @@ interface ParsedChart {
|
|
|
238
237
|
orientation?: 'horizontal' | 'vertical';
|
|
239
238
|
color?: string;
|
|
240
239
|
label?: string;
|
|
241
|
-
|
|
240
|
+
noLabelName?: boolean;
|
|
241
|
+
noLabelValue?: boolean;
|
|
242
|
+
noLabelPercent?: boolean;
|
|
242
243
|
data: ChartDataPoint[];
|
|
243
244
|
eras?: ChartEra[];
|
|
244
245
|
diagnostics: DgmoError[];
|
|
@@ -353,6 +354,7 @@ interface ParsedExtendedChart {
|
|
|
353
354
|
ylabelLineNumber?: number;
|
|
354
355
|
sizelabel?: string;
|
|
355
356
|
showLabels?: boolean;
|
|
357
|
+
shade?: boolean;
|
|
356
358
|
categoryColors?: Record<string, string>;
|
|
357
359
|
categoryLineNumbers?: Record<string, number>;
|
|
358
360
|
nodeColors?: Record<string, string>;
|
|
@@ -887,7 +889,7 @@ declare const CHART_TYPES: ReadonlyArray<{
|
|
|
887
889
|
/**
|
|
888
890
|
* Entity types for `Name is a <type>` declarations, keyed by chart type.
|
|
889
891
|
* Values are sourced from parser constants (VALID_PARTICIPANT_TYPES,
|
|
890
|
-
*
|
|
892
|
+
* C4_IS_A_RE).
|
|
891
893
|
*/
|
|
892
894
|
declare const ENTITY_TYPES: Map<string, string[]>;
|
|
893
895
|
/** Specification for a single pipe metadata key. */
|
|
@@ -1745,7 +1747,6 @@ interface InfraNode {
|
|
|
1745
1747
|
groupId: string | null;
|
|
1746
1748
|
tags: Record<string, string>;
|
|
1747
1749
|
isEdge: boolean;
|
|
1748
|
-
nodeType?: string;
|
|
1749
1750
|
description?: string;
|
|
1750
1751
|
lineNumber: number;
|
|
1751
1752
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,7 @@ declare function formatDgmoError(err: DgmoError): string;
|
|
|
25
25
|
* ```ts
|
|
26
26
|
* import { render } from '@diagrammo/dgmo';
|
|
27
27
|
*
|
|
28
|
-
* const svg = await render(`
|
|
29
|
-
* title: Languages
|
|
28
|
+
* const svg = await render(`pie Languages
|
|
30
29
|
* TypeScript: 45
|
|
31
30
|
* Python: 30
|
|
32
31
|
* Rust: 25`);
|
|
@@ -45,7 +44,7 @@ declare function render(content: string, options?: {
|
|
|
45
44
|
/**
|
|
46
45
|
* Extracts the chart type from raw file content.
|
|
47
46
|
* First tries the first non-empty, non-comment line as a bare chart type name
|
|
48
|
-
* (e.g., `gantt Product Launch`).
|
|
47
|
+
* (e.g., `gantt Product Launch`).
|
|
49
48
|
* Falls back to inference when no explicit chart type is found.
|
|
50
49
|
*/
|
|
51
50
|
declare function parseDgmoChartType(content: string): string | null;
|
|
@@ -238,7 +237,9 @@ interface ParsedChart {
|
|
|
238
237
|
orientation?: 'horizontal' | 'vertical';
|
|
239
238
|
color?: string;
|
|
240
239
|
label?: string;
|
|
241
|
-
|
|
240
|
+
noLabelName?: boolean;
|
|
241
|
+
noLabelValue?: boolean;
|
|
242
|
+
noLabelPercent?: boolean;
|
|
242
243
|
data: ChartDataPoint[];
|
|
243
244
|
eras?: ChartEra[];
|
|
244
245
|
diagnostics: DgmoError[];
|
|
@@ -353,6 +354,7 @@ interface ParsedExtendedChart {
|
|
|
353
354
|
ylabelLineNumber?: number;
|
|
354
355
|
sizelabel?: string;
|
|
355
356
|
showLabels?: boolean;
|
|
357
|
+
shade?: boolean;
|
|
356
358
|
categoryColors?: Record<string, string>;
|
|
357
359
|
categoryLineNumbers?: Record<string, number>;
|
|
358
360
|
nodeColors?: Record<string, string>;
|
|
@@ -887,7 +889,7 @@ declare const CHART_TYPES: ReadonlyArray<{
|
|
|
887
889
|
/**
|
|
888
890
|
* Entity types for `Name is a <type>` declarations, keyed by chart type.
|
|
889
891
|
* Values are sourced from parser constants (VALID_PARTICIPANT_TYPES,
|
|
890
|
-
*
|
|
892
|
+
* C4_IS_A_RE).
|
|
891
893
|
*/
|
|
892
894
|
declare const ENTITY_TYPES: Map<string, string[]>;
|
|
893
895
|
/** Specification for a single pipe metadata key. */
|
|
@@ -1745,7 +1747,6 @@ interface InfraNode {
|
|
|
1745
1747
|
groupId: string | null;
|
|
1746
1748
|
tags: Record<string, string>;
|
|
1747
1749
|
isEdge: boolean;
|
|
1748
|
-
nodeType?: string;
|
|
1749
1750
|
description?: string;
|
|
1750
1751
|
lineNumber: number;
|
|
1751
1752
|
}
|