@diagrammo/dgmo 0.16.0 → 0.17.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/advanced.cjs +133 -280
- package/dist/advanced.d.cts +9 -2
- package/dist/advanced.d.ts +9 -2
- package/dist/advanced.js +133 -280
- package/dist/auto.cjs +135 -269
- package/dist/auto.js +96 -96
- package/dist/auto.mjs +135 -269
- package/dist/cli.cjs +125 -125
- package/dist/index.cjs +132 -266
- package/dist/index.js +132 -266
- package/dist/internal.cjs +133 -280
- package/dist/internal.d.cts +9 -2
- package/dist/internal.d.ts +9 -2
- package/dist/internal.js +133 -280
- package/docs/language-reference.md +14 -18
- package/docs/migration-sequence-color-to-tags.md +1 -1
- package/gallery/fixtures/sequence-tags-protocols.dgmo +3 -3
- package/gallery/fixtures/sequence-tags.dgmo +3 -3
- package/gallery/fixtures/sequence.dgmo +4 -4
- package/package.json +7 -3
- package/src/auto/index.ts +2 -2
- package/src/boxes-and-lines/layout.ts +1 -2
- package/src/c4/parser.ts +1 -1
- package/src/class/parser.ts +1 -1
- package/src/cli.ts +2 -2
- package/src/completion.ts +1 -14
- package/src/cycle/parser.ts +1 -1
- package/src/d3.ts +2 -3
- package/src/diagnostics.ts +20 -0
- package/src/echarts.ts +2 -2
- package/src/editor/dgmo.grammar.d.ts +1 -1
- package/src/er/parser.ts +1 -1
- package/src/graph/flowchart-renderer.ts +3 -0
- package/src/infra/renderer.ts +1 -2
- package/src/journey-map/parser.ts +1 -1
- package/src/kanban/parser.ts +1 -1
- package/src/mindmap/parser.ts +2 -3
- package/src/org/parser.ts +1 -1
- package/src/pert/analyzer.ts +10 -10
- package/src/pert/layout.ts +1 -1
- package/src/pert/parser.ts +1 -1
- package/src/pyramid/parser.ts +1 -1
- package/src/raci/parser.ts +2 -2
- package/src/ring/parser.ts +1 -1
- package/src/sequence/parser.ts +66 -14
- package/src/sequence/participant-inference.ts +18 -181
- package/src/sequence/renderer.ts +47 -136
- package/src/sitemap/parser.ts +1 -1
- package/src/tech-radar/parser.ts +2 -2
- package/src/utils/extract-alias.ts +1 -1
- package/src/utils/inline-markdown.ts +1 -1
- package/src/utils/time-ticks.ts +1 -1
- package/src/wireframe/parser.ts +1 -1
package/src/tech-radar/parser.ts
CHANGED
|
@@ -62,7 +62,7 @@ export function parseTechRadar(content: string): ParsedTechRadar {
|
|
|
62
62
|
result.diagnostics.push(makeDgmoError(line, message, 'warning'));
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
if (!content
|
|
65
|
+
if (!content?.trim()) {
|
|
66
66
|
return fail(0, 'No content provided');
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -115,7 +115,7 @@ export function parseTechRadar(content: string): ParsedTechRadar {
|
|
|
115
115
|
// --- First line: chart type + title ---
|
|
116
116
|
if (!headerParsed) {
|
|
117
117
|
const firstLine = parseFirstLine(trimmed);
|
|
118
|
-
if (firstLine
|
|
118
|
+
if (firstLine?.chartType === 'tech-radar') {
|
|
119
119
|
result.title = firstLine.title ?? '';
|
|
120
120
|
result.titleLineNumber = lineNumber;
|
|
121
121
|
headerParsed = true;
|
|
@@ -32,7 +32,7 @@ export const ALIAS_TOKEN_RE = /^[A-Za-z][A-Za-z0-9_]{0,11}$/;
|
|
|
32
32
|
* DGMO grammar keywords with all chart-type tokens (per F5).
|
|
33
33
|
*
|
|
34
34
|
* Articles (`a`, `an`, `the`) are intentionally NOT reserved — the
|
|
35
|
-
* spec's worked examples use `Alice is
|
|
35
|
+
* spec's worked examples use `Alice is an actor as a`, where `a`
|
|
36
36
|
* is a perfectly fine single-letter alias. Reserving English
|
|
37
37
|
* articles would break the canonical example pattern.
|
|
38
38
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Inline Markdown — shared parsing + SVG rendering for text fields
|
|
3
3
|
// ============================================================
|
|
4
4
|
|
|
5
|
-
import * as d3Selection from 'd3-selection';
|
|
5
|
+
import type * as d3Selection from 'd3-selection';
|
|
6
6
|
import type { PaletteColors } from '../palettes';
|
|
7
7
|
import { safeHref } from './safe-href';
|
|
8
8
|
|
package/src/utils/time-ticks.ts
CHANGED
package/src/wireframe/parser.ts
CHANGED
|
@@ -668,7 +668,7 @@ export function parseWireframe(content: string): ParsedWireframe {
|
|
|
668
668
|
if (phase === 'header') {
|
|
669
669
|
// First line: chart type declaration
|
|
670
670
|
const firstLineResult = parseFirstLine(trimmed);
|
|
671
|
-
if (firstLineResult
|
|
671
|
+
if (firstLineResult?.chartType === 'wireframe') {
|
|
672
672
|
title = firstLineResult.title || null;
|
|
673
673
|
titleLineNumber = lineNumber;
|
|
674
674
|
continue;
|