@diagrammo/dgmo 0.8.2 → 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/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(`chart: pie
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`). Falls back to old `chart: type` syntax.
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
- labels?: 'name' | 'value' | 'percent' | 'full';
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
- * VALID_NODE_TYPES, C4_IS_A_RE).
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(`chart: pie
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`). Falls back to old `chart: type` syntax.
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
- labels?: 'name' | 'value' | 'percent' | 'full';
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
- * VALID_NODE_TYPES, C4_IS_A_RE).
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
  }