@diagrammo/dgmo 0.11.2 → 0.12.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/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/auto.mjs +1 -1
- package/dist/index.cjs +126 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -5
- package/dist/index.d.ts +16 -5
- package/dist/index.js +126 -67
- package/dist/index.js.map +1 -1
- package/docs/language-reference.md +0 -19
- package/package.json +1 -1
- package/src/completion.ts +153 -71
package/dist/index.d.cts
CHANGED
|
@@ -1382,16 +1382,27 @@ interface PipeKeySpec {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Pipe metadata keys for inline `| key value` on data lines.
|
|
1385
|
-
* Keyed by chart type → {
|
|
1385
|
+
* Keyed by chart type → { context-name: keys }.
|
|
1386
|
+
*
|
|
1387
|
+
* Contexts are open-ended. The two universal ones are:
|
|
1388
|
+
* - `node` — the default for any non-arrow line
|
|
1389
|
+
* - `edge` — lines containing an arrow (`->`, `--`)
|
|
1390
|
+
*
|
|
1391
|
+
* Charts with richer line types declare additional contexts:
|
|
1392
|
+
* - raci: `role`, `phase`, `assignment`
|
|
1393
|
+
* - ring / pyramid: `layer`
|
|
1394
|
+
* - tech-radar: `quadrant`, `blip`
|
|
1395
|
+
* - journey-map: `step`
|
|
1396
|
+
*
|
|
1397
|
+
* Consumers that don't classify lines beyond node/edge can fall back to
|
|
1398
|
+
* the union of all contexts via `unionPipeKeys(spec)` below.
|
|
1386
1399
|
*
|
|
1387
1400
|
* IMPORTANT: NEVER add 'sequence' here. The `|` character in sequence
|
|
1388
1401
|
* diagrams separates display names from identifiers and tag metadata.
|
|
1389
1402
|
* Adding sequence would trigger false pipe-metadata completions on every `|`.
|
|
1390
1403
|
*/
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
edge: Record<string, PipeKeySpec>;
|
|
1394
|
-
}>;
|
|
1404
|
+
type PipeContextMap = Record<string, Record<string, PipeKeySpec>>;
|
|
1405
|
+
declare const PIPE_METADATA: Map<string, PipeContextMap>;
|
|
1395
1406
|
/** All known directive keys, derived from COMPLETION_REGISTRY. Includes implicit keys. */
|
|
1396
1407
|
declare const METADATA_KEY_SET: ReadonlySet<string>;
|
|
1397
1408
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1382,16 +1382,27 @@ interface PipeKeySpec {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
/**
|
|
1384
1384
|
* Pipe metadata keys for inline `| key value` on data lines.
|
|
1385
|
-
* Keyed by chart type → {
|
|
1385
|
+
* Keyed by chart type → { context-name: keys }.
|
|
1386
|
+
*
|
|
1387
|
+
* Contexts are open-ended. The two universal ones are:
|
|
1388
|
+
* - `node` — the default for any non-arrow line
|
|
1389
|
+
* - `edge` — lines containing an arrow (`->`, `--`)
|
|
1390
|
+
*
|
|
1391
|
+
* Charts with richer line types declare additional contexts:
|
|
1392
|
+
* - raci: `role`, `phase`, `assignment`
|
|
1393
|
+
* - ring / pyramid: `layer`
|
|
1394
|
+
* - tech-radar: `quadrant`, `blip`
|
|
1395
|
+
* - journey-map: `step`
|
|
1396
|
+
*
|
|
1397
|
+
* Consumers that don't classify lines beyond node/edge can fall back to
|
|
1398
|
+
* the union of all contexts via `unionPipeKeys(spec)` below.
|
|
1386
1399
|
*
|
|
1387
1400
|
* IMPORTANT: NEVER add 'sequence' here. The `|` character in sequence
|
|
1388
1401
|
* diagrams separates display names from identifiers and tag metadata.
|
|
1389
1402
|
* Adding sequence would trigger false pipe-metadata completions on every `|`.
|
|
1390
1403
|
*/
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
edge: Record<string, PipeKeySpec>;
|
|
1394
|
-
}>;
|
|
1404
|
+
type PipeContextMap = Record<string, Record<string, PipeKeySpec>>;
|
|
1405
|
+
declare const PIPE_METADATA: Map<string, PipeContextMap>;
|
|
1395
1406
|
/** All known directive keys, derived from COMPLETION_REGISTRY. Includes implicit keys. */
|
|
1396
1407
|
declare const METADATA_KEY_SET: ReadonlySet<string>;
|
|
1397
1408
|
/**
|
package/dist/index.js
CHANGED
|
@@ -46249,6 +46249,15 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46249
46249
|
"no-value": { description: "Hide value labels at each point" }
|
|
46250
46250
|
})
|
|
46251
46251
|
],
|
|
46252
|
+
[
|
|
46253
|
+
"multi-line",
|
|
46254
|
+
withGlobals({
|
|
46255
|
+
series: { description: "Series name(s)" },
|
|
46256
|
+
"x-label": { description: "X-axis label" },
|
|
46257
|
+
"y-label": { description: "Y-axis label" },
|
|
46258
|
+
"no-value": { description: "Hide value labels at each point" }
|
|
46259
|
+
})
|
|
46260
|
+
],
|
|
46252
46261
|
[
|
|
46253
46262
|
"polar-area",
|
|
46254
46263
|
withGlobals({
|
|
@@ -46352,8 +46361,15 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46352
46361
|
],
|
|
46353
46362
|
[
|
|
46354
46363
|
"flowchart",
|
|
46364
|
+
// Spec §5 §4.6: direction-lr, orientation-vertical, no-color, solid-fill
|
|
46355
46365
|
withGlobals({
|
|
46356
|
-
"direction-lr": { description: "Switch to left-to-right layout" }
|
|
46366
|
+
"direction-lr": { description: "Switch to left-to-right layout" },
|
|
46367
|
+
"orientation-vertical": {
|
|
46368
|
+
description: "Use vertical orientation for ranks"
|
|
46369
|
+
},
|
|
46370
|
+
"no-color": {
|
|
46371
|
+
description: "Resolve all nodes to muted neutral fill"
|
|
46372
|
+
}
|
|
46357
46373
|
})
|
|
46358
46374
|
],
|
|
46359
46375
|
[
|
|
@@ -46366,85 +46382,73 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46366
46382
|
],
|
|
46367
46383
|
[
|
|
46368
46384
|
"er",
|
|
46385
|
+
// Spec §9 §8.5: notation (chen/crow), active-tag.
|
|
46369
46386
|
withGlobals({
|
|
46387
|
+
notation: {
|
|
46388
|
+
description: "ER notation style",
|
|
46389
|
+
values: ["chen", "crow"]
|
|
46390
|
+
},
|
|
46370
46391
|
"active-tag": { description: "Active tag group name" }
|
|
46371
46392
|
})
|
|
46372
46393
|
],
|
|
46373
46394
|
[
|
|
46374
46395
|
"org",
|
|
46396
|
+
// Spec §7 §6.5: direction-tb, sub-node-label, show-sub-node-count,
|
|
46397
|
+
// hide, active-tag. solid-fill via SOLID_FILL_CAPABLE.
|
|
46375
46398
|
withGlobals({
|
|
46399
|
+
"direction-tb": { description: "Switch to top-to-bottom layout" },
|
|
46376
46400
|
"sub-node-label": { description: "Label for sub-nodes" },
|
|
46377
46401
|
"show-sub-node-count": { description: "Show sub-node counts" },
|
|
46402
|
+
hide: { description: "Hide tag:value pairs" },
|
|
46378
46403
|
"active-tag": { description: "Active tag group name" }
|
|
46379
46404
|
})
|
|
46380
46405
|
],
|
|
46381
46406
|
[
|
|
46382
46407
|
"kanban",
|
|
46408
|
+
// Spec §11 §10.4: no-auto-color, hide, active-tag.
|
|
46383
46409
|
withGlobals({
|
|
46384
46410
|
"no-auto-color": { description: "Disable automatic card coloring" },
|
|
46411
|
+
hide: { description: "Hide tag:value pairs" },
|
|
46385
46412
|
"active-tag": { description: "Active tag group name" }
|
|
46386
46413
|
})
|
|
46387
46414
|
],
|
|
46388
|
-
// RACI / RASCI / DACI —
|
|
46415
|
+
// RACI / RASCI / DACI — one chart type (`raci`), variant inferred from
|
|
46416
|
+
// markers or locked via `variant-*` bare directive. `rasci`/`daci` are
|
|
46417
|
+
// not first-line keywords so they get no separate registry entry.
|
|
46389
46418
|
[
|
|
46390
46419
|
"raci",
|
|
46391
46420
|
withGlobals({
|
|
46392
|
-
variant: {
|
|
46393
|
-
description: "
|
|
46394
|
-
values: ["raci", "rasci", "daci"]
|
|
46395
|
-
},
|
|
46396
|
-
roles: {
|
|
46397
|
-
description: "Comma-separated role list (declares column order; enables unknown-role linting)"
|
|
46398
|
-
},
|
|
46399
|
-
draft: {
|
|
46400
|
-
description: "Suppress missing-A / missing-R warnings during authoring"
|
|
46401
|
-
},
|
|
46402
|
-
"active-tag": { description: "Active tag group name" }
|
|
46403
|
-
})
|
|
46404
|
-
],
|
|
46405
|
-
[
|
|
46406
|
-
"rasci",
|
|
46407
|
-
withGlobals({
|
|
46408
|
-
variant: {
|
|
46409
|
-
description: "Variant rule set",
|
|
46410
|
-
values: ["raci", "rasci", "daci"]
|
|
46421
|
+
"variant-raci": {
|
|
46422
|
+
description: "Lock chart to RACI variant (R / A / C / I markers)"
|
|
46411
46423
|
},
|
|
46412
|
-
|
|
46413
|
-
description: "
|
|
46424
|
+
"variant-rasci": {
|
|
46425
|
+
description: "Lock chart to RASCI variant (adds Support \u2014 R / A / S / C / I)"
|
|
46414
46426
|
},
|
|
46415
|
-
|
|
46416
|
-
description: "
|
|
46417
|
-
},
|
|
46418
|
-
"active-tag": { description: "Active tag group name" }
|
|
46419
|
-
})
|
|
46420
|
-
],
|
|
46421
|
-
[
|
|
46422
|
-
"daci",
|
|
46423
|
-
withGlobals({
|
|
46424
|
-
variant: {
|
|
46425
|
-
description: "Variant rule set",
|
|
46426
|
-
values: ["raci", "rasci", "daci"]
|
|
46427
|
+
"variant-daci": {
|
|
46428
|
+
description: "Lock chart to DACI variant (Driver / Approver / Contributor / Informed)"
|
|
46427
46429
|
},
|
|
46428
46430
|
roles: {
|
|
46429
|
-
description: "
|
|
46430
|
-
},
|
|
46431
|
-
draft: {
|
|
46432
|
-
description: "Suppress missing-A / missing-R warnings during authoring"
|
|
46431
|
+
description: "Declare role column order (inline `roles A, B, C` or indented block with per-role pipe metadata)"
|
|
46433
46432
|
},
|
|
46434
46433
|
"active-tag": { description: "Active tag group name" }
|
|
46435
46434
|
})
|
|
46436
46435
|
],
|
|
46437
46436
|
[
|
|
46438
46437
|
"c4",
|
|
46438
|
+
// Spec §8 §7.7: direction-tb, active-tag.
|
|
46439
46439
|
withGlobals({
|
|
46440
|
+
"direction-tb": { description: "Switch to top-to-bottom layout" },
|
|
46440
46441
|
"active-tag": { description: "Active tag group name" }
|
|
46441
46442
|
})
|
|
46442
46443
|
],
|
|
46443
46444
|
[
|
|
46444
46445
|
"state",
|
|
46446
|
+
// Spec §6 §5.5: direction-tb, no-color, solid-fill.
|
|
46445
46447
|
withGlobals({
|
|
46446
46448
|
"direction-tb": { description: "Switch to top-to-bottom layout" },
|
|
46447
|
-
color: {
|
|
46449
|
+
"no-color": {
|
|
46450
|
+
description: "Resolve all states to muted neutral fill"
|
|
46451
|
+
}
|
|
46448
46452
|
})
|
|
46449
46453
|
],
|
|
46450
46454
|
[
|
|
@@ -46471,6 +46475,7 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46471
46475
|
],
|
|
46472
46476
|
[
|
|
46473
46477
|
"gantt",
|
|
46478
|
+
// Spec §13 §12.2 Options.
|
|
46474
46479
|
withGlobals({
|
|
46475
46480
|
start: { description: "Project start date (YYYY-MM-DD)" },
|
|
46476
46481
|
"today-marker": {
|
|
@@ -46478,8 +46483,14 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46478
46483
|
},
|
|
46479
46484
|
sort: { description: "Sort order", values: ["time", "group", "tag"] },
|
|
46480
46485
|
"critical-path": { description: "Show critical path" },
|
|
46481
|
-
dependencies: { description: "
|
|
46482
|
-
"
|
|
46486
|
+
"no-dependencies": { description: "Hide dependency arrows" },
|
|
46487
|
+
"sprint-length": { description: "Sprint duration (e.g. 2w)" },
|
|
46488
|
+
"sprint-number": { description: "Starting sprint number" },
|
|
46489
|
+
"sprint-start": { description: "Sprint start date (YYYY-MM-DD)" },
|
|
46490
|
+
"active-tag": { description: "Active tag group name" },
|
|
46491
|
+
// Legacy positive form `dependencies` — kept for back-compat. Use
|
|
46492
|
+
// `no-dependencies` to suppress dependency arrows in new code.
|
|
46493
|
+
dependencies: { description: "Show dependencies (legacy form)" }
|
|
46483
46494
|
})
|
|
46484
46495
|
],
|
|
46485
46496
|
[
|
|
@@ -46506,14 +46517,13 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46506
46517
|
],
|
|
46507
46518
|
[
|
|
46508
46519
|
"tech-radar",
|
|
46520
|
+
// Spec §20 documents one directive: `show-blip-legend`. `rings` is a
|
|
46521
|
+
// structural block keyword; quadrant/ring/trend/color are pipe metadata
|
|
46522
|
+
// that live in PIPE_METADATA.
|
|
46509
46523
|
withGlobals({
|
|
46510
|
-
|
|
46511
|
-
|
|
46512
|
-
|
|
46513
|
-
},
|
|
46514
|
-
ring: { description: "Ring assignment for a blip" },
|
|
46515
|
-
trend: { description: "Blip trend (new, up, down, stable)" },
|
|
46516
|
-
color: { description: "Override quadrant color" }
|
|
46524
|
+
"show-blip-legend": {
|
|
46525
|
+
description: "Render the four-column blip listing alongside the radar"
|
|
46526
|
+
}
|
|
46517
46527
|
})
|
|
46518
46528
|
],
|
|
46519
46529
|
[
|
|
@@ -46530,29 +46540,29 @@ var COMPLETION_REGISTRY = /* @__PURE__ */ new Map([
|
|
|
46530
46540
|
],
|
|
46531
46541
|
[
|
|
46532
46542
|
"journey-map",
|
|
46543
|
+
// Spec §22 directives: `no-legend`, `active-tag`. `persona` is a
|
|
46544
|
+
// structural keyword (like `tag` / `roles`), not a directive.
|
|
46545
|
+
// `solid-fill` is added via SOLID_FILL_CAPABLE below.
|
|
46533
46546
|
withGlobals({
|
|
46534
46547
|
"no-legend": { description: "Hide the score legend" },
|
|
46535
|
-
|
|
46548
|
+
"active-tag": { description: "Active tag group name" }
|
|
46536
46549
|
})
|
|
46537
46550
|
],
|
|
46538
46551
|
[
|
|
46539
46552
|
"pyramid",
|
|
46553
|
+
// Spec §23.5 documents `inverted`; `solid-fill` is added via
|
|
46554
|
+
// SOLID_FILL_CAPABLE below (working but not yet in spec §23.5).
|
|
46555
|
+
// `color`/`description` are layer pipe-metadata, not directives.
|
|
46540
46556
|
withGlobals({
|
|
46541
|
-
inverted: { description: "Flip apex to the bottom (funnel orientation)" }
|
|
46542
|
-
color: { description: "Override layer color (pipe metadata)" },
|
|
46543
|
-
description: { description: "Layer description (pipe or indented body)" }
|
|
46557
|
+
inverted: { description: "Flip apex to the bottom (funnel orientation)" }
|
|
46544
46558
|
})
|
|
46545
46559
|
],
|
|
46546
46560
|
[
|
|
46547
46561
|
"ring",
|
|
46548
|
-
|
|
46549
|
-
|
|
46550
|
-
|
|
46551
|
-
|
|
46552
|
-
description: {
|
|
46553
|
-
description: "Ring description (pipe shorthand or indented body)"
|
|
46554
|
-
}
|
|
46555
|
-
})
|
|
46562
|
+
// Per spec §24.5 the only chart-specific directive is `solid-fill`,
|
|
46563
|
+
// applied via SOLID_FILL_CAPABLE below. `color`/`description` are
|
|
46564
|
+
// layer pipe-metadata, not directives — they live in PIPE_METADATA.
|
|
46565
|
+
withGlobals({})
|
|
46556
46566
|
]
|
|
46557
46567
|
]);
|
|
46558
46568
|
var SOLID_FILL_CAPABLE = /* @__PURE__ */ new Set([
|
|
@@ -46692,21 +46702,25 @@ var PIPE_METADATA = /* @__PURE__ */ new Map([
|
|
|
46692
46702
|
}
|
|
46693
46703
|
],
|
|
46694
46704
|
[
|
|
46705
|
+
// Tech-radar pipe metadata (spec §20). Two contexts:
|
|
46706
|
+
// - quadrant: top-level quadrant headers (`Tools | quadrant: top-left, color: blue`)
|
|
46707
|
+
// - blip: indented blip lines (` Vite | ring: Adopt, trend: up`)
|
|
46695
46708
|
"tech-radar",
|
|
46696
46709
|
{
|
|
46697
|
-
|
|
46710
|
+
quadrant: {
|
|
46698
46711
|
quadrant: {
|
|
46699
46712
|
description: "Quadrant position",
|
|
46700
46713
|
values: ["top-left", "top-right", "bottom-left", "bottom-right"]
|
|
46701
46714
|
},
|
|
46702
|
-
|
|
46715
|
+
color: { description: "Override quadrant color" }
|
|
46716
|
+
},
|
|
46717
|
+
blip: {
|
|
46718
|
+
ring: { description: "Ring assignment (must match a declared ring)" },
|
|
46703
46719
|
trend: {
|
|
46704
46720
|
description: "Blip trend indicator",
|
|
46705
46721
|
values: ["new", "up", "down", "stable"]
|
|
46706
|
-
}
|
|
46707
|
-
|
|
46708
|
-
},
|
|
46709
|
-
edge: {}
|
|
46722
|
+
}
|
|
46723
|
+
}
|
|
46710
46724
|
}
|
|
46711
46725
|
],
|
|
46712
46726
|
[
|
|
@@ -46722,6 +46736,51 @@ var PIPE_METADATA = /* @__PURE__ */ new Map([
|
|
|
46722
46736
|
width: { description: "Edge stroke width in pixels" }
|
|
46723
46737
|
}
|
|
46724
46738
|
}
|
|
46739
|
+
],
|
|
46740
|
+
[
|
|
46741
|
+
// RACI pipe metadata (spec §24A). Two contexts:
|
|
46742
|
+
// - role: declarations inside the `roles` block (`Cap | color: red`)
|
|
46743
|
+
// - phase: bracketed phase headers (`[Departure] | color: teal`)
|
|
46744
|
+
"raci",
|
|
46745
|
+
{
|
|
46746
|
+
role: {
|
|
46747
|
+
color: { description: "Role column tint (palette name)" }
|
|
46748
|
+
},
|
|
46749
|
+
phase: {
|
|
46750
|
+
color: { description: "Phase bar tint (palette name)" }
|
|
46751
|
+
}
|
|
46752
|
+
}
|
|
46753
|
+
],
|
|
46754
|
+
[
|
|
46755
|
+
// Ring layer pipe metadata (spec §24.4). One context: `layer`.
|
|
46756
|
+
"ring",
|
|
46757
|
+
{
|
|
46758
|
+
layer: {
|
|
46759
|
+
color: { description: "Ring color (palette name)" },
|
|
46760
|
+
description: { description: "Layer description (one-liner shorthand)" }
|
|
46761
|
+
}
|
|
46762
|
+
}
|
|
46763
|
+
],
|
|
46764
|
+
[
|
|
46765
|
+
// Pyramid layer pipe metadata (spec §23.4). Identical surface to ring.
|
|
46766
|
+
"pyramid",
|
|
46767
|
+
{
|
|
46768
|
+
layer: {
|
|
46769
|
+
color: { description: "Layer color (palette name)" },
|
|
46770
|
+
description: { description: "Layer description (one-liner shorthand)" }
|
|
46771
|
+
}
|
|
46772
|
+
}
|
|
46773
|
+
],
|
|
46774
|
+
[
|
|
46775
|
+
// Journey-map step pipe metadata (spec §22). One static key: `score`.
|
|
46776
|
+
// Tag aliases (e.g. `ch: Web`) are user-defined via the `tag` block
|
|
46777
|
+
// and resolved dynamically — not part of the static map.
|
|
46778
|
+
"journey-map",
|
|
46779
|
+
{
|
|
46780
|
+
step: {
|
|
46781
|
+
score: { description: "Step score (1\u20135 integer; high = good)" }
|
|
46782
|
+
}
|
|
46783
|
+
}
|
|
46725
46784
|
]
|
|
46726
46785
|
]);
|
|
46727
46786
|
var METADATA_KEY_SET = /* @__PURE__ */ new Set([
|