@diagrammo/dgmo 0.61.0 → 0.62.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.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +382 -396
  3. package/dist/advanced.js +152 -38
  4. package/dist/auto.js +143 -142
  5. package/dist/block.js +9 -8
  6. package/dist/{chart-meta-gUwAzi7N.d.ts → chart-meta-D98NbYDp.d.ts} +1 -1
  7. package/dist/chart-meta.d.ts +2 -2
  8. package/dist/chart-meta.js +1 -1
  9. package/dist/{charts-d3-MN6QCYKU.js → charts-d3-M76E4TZU.js} +5 -5
  10. package/dist/{chunk-6CWNVQPW.js → chunk-2LN5C6FH.js} +3 -3
  11. package/dist/{chunk-FXLGBUIQ.js → chunk-34HQALZ5.js} +2 -2
  12. package/dist/{chunk-OPBZYISB.js → chunk-37EHGTQ2.js} +2204 -2018
  13. package/dist/{chunk-ZDFIY6WX.js → chunk-3PVUGECM.js} +1 -2
  14. package/dist/{chunk-XJZCXNWR.js → chunk-BGITRLTR.js} +2 -2
  15. package/dist/{chunk-3OLO2MZ6.js → chunk-BPINSP65.js} +2 -2
  16. package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
  17. package/dist/{chunk-DZZWR6GT.js → chunk-DUHKYKI7.js} +2 -2
  18. package/dist/{chunk-4B5YISOR.js → chunk-EOYPX6SF.js} +24 -1
  19. package/dist/{chunk-MOT3NXB5.js → chunk-FVYHDZ6Q.js} +2 -2
  20. package/dist/{chunk-7FTGNJQ2.js → chunk-GCVTU64J.js} +17 -5
  21. package/dist/{chunk-S23HOUJS.js → chunk-JU2VMFYC.js} +2 -2
  22. package/dist/{chunk-CQ7Y3O67.js → chunk-KHTKMVKT.js} +2 -2
  23. package/dist/{chunk-7BJQUII6.js → chunk-KK5LQIN7.js} +2 -2
  24. package/dist/{chunk-L43KTQTW.js → chunk-L26ZAPNJ.js} +2 -2
  25. package/dist/{chunk-LRKGF7RN.js → chunk-L4B4GRVS.js} +2 -2
  26. package/dist/{chunk-5PWIV7ZF.js → chunk-LFAQ4BLZ.js} +2 -2
  27. package/dist/{chunk-7QCYHZVO.js → chunk-NQH2Q2RR.js} +2 -2
  28. package/dist/{chunk-PFGJ7SCM.js → chunk-PUFWYDWP.js} +2 -2
  29. package/dist/{chunk-BSJIPMPG.js → chunk-QDPMTFB4.js} +45 -32
  30. package/dist/chunk-RU2HHHYA.js +23 -0
  31. package/dist/{chunk-SMHTYVMK.js → chunk-RZRMSNO7.js} +2 -2
  32. package/dist/{chunk-HJ6TMHQG.js → chunk-SV7F363F.js} +2 -2
  33. package/dist/{chunk-YJCILMEA.js → chunk-U22TKD3L.js} +2 -2
  34. package/dist/{chunk-2WPLOS4Q.js → chunk-USHDV2AF.js} +2 -2
  35. package/dist/{chunk-DNSEG6P2.js → chunk-WMHHNK44.js} +2 -2
  36. package/dist/{chunk-4BEAHH6G.js → chunk-XXDEQSW4.js} +2 -2
  37. package/dist/{chunk-NEV5IW33.js → chunk-YVI3JL3S.js} +2 -2
  38. package/dist/{registry-Ch0Umdi1.d.ts → dgmo-router-Dd5PTjxl.d.ts} +98 -98
  39. package/dist/{dgmo-router-UVYAJCAF.js → dgmo-router-Z5N6QLIC.js} +2 -2
  40. package/dist/{dimensions-QCPOPPKE.js → dimensions-ES6O2T4H.js} +4 -4
  41. package/dist/element.js +144 -143
  42. package/dist/{flowchart-renderer-XFDCX7MZ.js → flowchart-renderer-BCVCIZHF.js} +3 -3
  43. package/dist/index.d.ts +21 -10
  44. package/dist/index.js +13 -23
  45. package/dist/{renderer-CXRSD26Q.js → renderer-4VDSMPYU.js} +4 -4
  46. package/dist/{renderer-62FFDWMY.js → renderer-5HYDLCMX.js} +3 -3
  47. package/dist/{renderer-XSHOMUJQ.js → renderer-726UVOKE.js} +3 -3
  48. package/dist/{renderer-IYMA5W7X.js → renderer-A5GFW2XH.js} +4 -4
  49. package/dist/{renderer-VYMTBSF4.js → renderer-HPQJRSON.js} +3 -3
  50. package/dist/{renderer-GESKWINV.js → renderer-K3TH5PP7.js} +4 -4
  51. package/dist/{renderer-4RQ5PGHY.js → renderer-KHVAM4IY.js} +3 -3
  52. package/dist/{renderer-2PGIIOFN.js → renderer-KKNXTTFE.js} +5 -5
  53. package/dist/{renderer-IG5PQXEM.js → renderer-PKST5W6U.js} +4 -4
  54. package/dist/{renderer-R6OKKSVR.js → renderer-Q2YHQQSN.js} +4 -4
  55. package/dist/{renderer-6QW5OAJG.js → renderer-TTMBG2N6.js} +2 -2
  56. package/dist/{renderer-AS6LLDZM.js → renderer-XDL6PRLN.js} +3 -3
  57. package/dist/{renderer-63MLWS6L.js → renderer-XIJO7DYS.js} +3 -3
  58. package/dist/{resolver-W3WKLWDP.js → resolver-B3TXWNWF.js} +3 -3
  59. package/dist/{state-renderer-GBHDOEXR.js → state-renderer-MCWCZ76U.js} +3 -3
  60. package/dist/{themes-DC6u80yr.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
  61. package/docs/ai-integration.md +5 -5
  62. package/fonts/Inter-Bold.ttf +0 -0
  63. package/fonts/Inter-Bold.woff2 +0 -0
  64. package/fonts/Inter-Regular.ttf +0 -0
  65. package/fonts/Inter-Regular.woff2 +0 -0
  66. package/package.json +8 -23
  67. package/.claude/commands/dgmo-codebase-report.md +0 -172
  68. package/.claude/commands/dgmo-diagram-this.md +0 -60
  69. package/.claude/commands/dgmo-document-project.md +0 -128
  70. package/.claude/commands/dgmo.md +0 -313
  71. package/.cursorrules +0 -587
  72. package/.github/copilot-instructions.md +0 -597
  73. package/.windsurfrules +0 -587
  74. package/SKILL.md +0 -573
  75. package/dist/auto.d.ts +0 -60
  76. package/dist/auto.mjs +0 -88466
  77. package/dist/chunk-6MTWIQVO.js +0 -121
  78. package/dist/chunk-NZ5QVASG.js +0 -20
  79. package/dist/cli.cjs +0 -489
  80. package/dist/element.d.ts +0 -68
  81. package/dist/element.mjs +0 -88332
  82. package/dist/load-data-EHDDZ5ZS.js +0 -8
package/dist/advanced.js CHANGED
@@ -1,7 +1,3 @@
1
- import {
2
- renderClock,
3
- renderClockForExport
4
- } from "./chunk-MD2KWAXJ.js";
5
1
  import {
6
2
  layoutBracket,
7
3
  renderBracket,
@@ -21,10 +17,6 @@ import {
21
17
  groupMessagesBySection,
22
18
  renderSequenceDiagram
23
19
  } from "./chunk-OIK6Y2EJ.js";
24
- import {
25
- renderPyramid,
26
- renderPyramidForExport
27
- } from "./chunk-TJCHULP5.js";
28
20
  import {
29
21
  renderRing,
30
22
  renderRingForExport
@@ -41,7 +33,7 @@ import {
41
33
  } from "./chunk-3HYRJAXO.js";
42
34
  import {
43
35
  renderLiveLinkCard
44
- } from "./chunk-MOT3NXB5.js";
36
+ } from "./chunk-FVYHDZ6Q.js";
45
37
  import {
46
38
  authoredCollapsedIds,
47
39
  layoutBlock,
@@ -57,6 +49,10 @@ import {
57
49
  renderCountdown,
58
50
  renderCountdownForExport
59
51
  } from "./chunk-BIWMOFSE.js";
52
+ import {
53
+ renderClock,
54
+ renderClockForExport
55
+ } from "./chunk-MD2KWAXJ.js";
60
56
  import {
61
57
  computeRadarLayout,
62
58
  getRadarGeometry,
@@ -68,7 +64,7 @@ import {
68
64
  import {
69
65
  renderJourneyMap,
70
66
  renderJourneyMapForExport
71
- } from "./chunk-PFGJ7SCM.js";
67
+ } from "./chunk-PUFWYDWP.js";
72
68
  import {
73
69
  layoutJourneyMap
74
70
  } from "./chunk-KRTO7NRK.js";
@@ -79,29 +75,30 @@ import {
79
75
  } from "./chunk-DY4VJYG7.js";
80
76
  import {
81
77
  resolveMap
82
- } from "./chunk-DNSEG6P2.js";
78
+ } from "./chunk-WMHHNK44.js";
83
79
  import {
84
80
  renderMap,
85
81
  renderMapForExport
86
- } from "./chunk-2WPLOS4Q.js";
82
+ } from "./chunk-USHDV2AF.js";
87
83
  import "./chunk-FWVKPEG3.js";
88
84
  import {
89
85
  mapContentAspect,
90
86
  mapExportDimensions
91
- } from "./chunk-S23HOUJS.js";
87
+ } from "./chunk-JU2VMFYC.js";
92
88
  import {
93
89
  albersSkewFallback,
94
90
  layoutMap,
95
91
  mapBackgroundColor,
96
92
  mapNeutralLandColor
97
- } from "./chunk-OPBZYISB.js";
93
+ } from "./chunk-37EHGTQ2.js";
98
94
  import {
99
95
  decodeFeatures,
100
96
  regionAt
101
97
  } from "./chunk-4QV26TEG.js";
102
98
  import {
103
- loadMapData
104
- } from "./chunk-6MTWIQVO.js";
99
+ renderPyramid,
100
+ renderPyramidForExport
101
+ } from "./chunk-TJCHULP5.js";
105
102
  import {
106
103
  collectDiagramRoles,
107
104
  computeInfraLegendGroups,
@@ -114,7 +111,7 @@ import {
114
111
  renderPert,
115
112
  renderPertAnalysisBlock,
116
113
  renderPertForExport
117
- } from "./chunk-HJ6TMHQG.js";
114
+ } from "./chunk-SV7F363F.js";
118
115
  import {
119
116
  analyzePert,
120
117
  buildSimulationContext,
@@ -139,7 +136,7 @@ import {
139
136
  import {
140
137
  renderState,
141
138
  renderStateForExport
142
- } from "./chunk-7QCYHZVO.js";
139
+ } from "./chunk-NQH2Q2RR.js";
143
140
  import {
144
141
  collapseStateGroups
145
142
  } from "./chunk-SQ7IY53Q.js";
@@ -157,7 +154,7 @@ import {
157
154
  renderC4ContextForExport,
158
155
  renderC4Deployment,
159
156
  renderC4DeploymentForExport
160
- } from "./chunk-SMHTYVMK.js";
157
+ } from "./chunk-RZRMSNO7.js";
161
158
  import {
162
159
  layoutC4Components,
163
160
  layoutC4Containers,
@@ -168,7 +165,7 @@ import {
168
165
  import {
169
166
  renderFlowchart,
170
167
  renderFlowchartForExport
171
- } from "./chunk-XJZCXNWR.js";
168
+ } from "./chunk-BGITRLTR.js";
172
169
  import "./chunk-PDKUANDZ.js";
173
170
  import {
174
171
  layoutGraph
@@ -200,21 +197,21 @@ import {
200
197
  import {
201
198
  renderMindmap,
202
199
  renderMindmapForExport
203
- } from "./chunk-DZZWR6GT.js";
200
+ } from "./chunk-DUHKYKI7.js";
204
201
  import {
205
202
  layoutMindmap
206
203
  } from "./chunk-U42ZEK7L.js";
207
204
  import {
208
205
  renderClassDiagram,
209
206
  renderClassDiagramForExport
210
- } from "./chunk-YJCILMEA.js";
207
+ } from "./chunk-U22TKD3L.js";
211
208
  import {
212
209
  layoutClassDiagram
213
210
  } from "./chunk-PCWPYOT4.js";
214
211
  import {
215
212
  renderERDiagram,
216
213
  renderERDiagramForExport
217
- } from "./chunk-4BEAHH6G.js";
214
+ } from "./chunk-XXDEQSW4.js";
218
215
  import {
219
216
  layoutERDiagram
220
217
  } from "./chunk-5H2LIQIH.js";
@@ -261,8 +258,8 @@ import {
261
258
  import {
262
259
  renderOrg,
263
260
  renderOrgForExport
264
- } from "./chunk-7BJQUII6.js";
265
- import "./chunk-L43KTQTW.js";
261
+ } from "./chunk-KK5LQIN7.js";
262
+ import "./chunk-L26ZAPNJ.js";
266
263
  import {
267
264
  layoutOrg
268
265
  } from "./chunk-RKTIIU7Z.js";
@@ -276,20 +273,20 @@ import "./chunk-BS7SV7C3.js";
276
273
  import {
277
274
  renderSitemap,
278
275
  renderSitemapForExport
279
- } from "./chunk-LRKGF7RN.js";
276
+ } from "./chunk-L4B4GRVS.js";
280
277
  import {
281
278
  computeCardArchive,
282
279
  computeCardMove,
283
280
  isArchiveColumn,
284
281
  renderKanban,
285
282
  renderKanbanForExport
286
- } from "./chunk-FXLGBUIQ.js";
283
+ } from "./chunk-34HQALZ5.js";
287
284
  import {
288
285
  clearEventLineMuted,
289
286
  focusEventLine,
290
287
  renderEventLine,
291
288
  renderEventLineForExport
292
- } from "./chunk-NEV5IW33.js";
289
+ } from "./chunk-YVI3JL3S.js";
293
290
  import "./chunk-NCT22MOD.js";
294
291
  import "./chunk-H3HFC3SQ.js";
295
292
  import {
@@ -300,14 +297,13 @@ import "./chunk-3CIOJ5YJ.js";
300
297
  import {
301
298
  renderBody,
302
299
  renderBodyForExport
303
- } from "./chunk-7FTGNJQ2.js";
300
+ } from "./chunk-GCVTU64J.js";
304
301
  import {
305
302
  completeMapPlaces,
306
303
  completeMapRegions,
307
304
  searchMapLocations,
308
305
  themes
309
306
  } from "./chunk-SQAG3UXH.js";
310
- import "./chunk-4B5YISOR.js";
311
307
  import {
312
308
  orderArcNodes,
313
309
  render,
@@ -317,26 +313,27 @@ import {
317
313
  renderSlopeChart,
318
314
  renderVenn,
319
315
  renderWordCloud
320
- } from "./chunk-BSJIPMPG.js";
321
- import "./chunk-5PWIV7ZF.js";
316
+ } from "./chunk-QDPMTFB4.js";
317
+ import "./chunk-LFAQ4BLZ.js";
318
+ import "./chunk-EOYPX6SF.js";
322
319
  import {
323
320
  renderLegendSvg,
324
321
  renderLegendSvgFromConfig
325
- } from "./chunk-6CWNVQPW.js";
326
- import "./chunk-VHO3YBTB.js";
322
+ } from "./chunk-2LN5C6FH.js";
323
+ import "./chunk-CVVICCSB.js";
327
324
  import {
328
325
  formatDateLabel,
329
326
  renderTimeline
330
- } from "./chunk-3OLO2MZ6.js";
327
+ } from "./chunk-BPINSP65.js";
331
328
  import {
332
329
  computeTimeTicks
333
330
  } from "./chunk-YRYKTYMQ.js";
334
331
  import {
335
332
  ScaleContext
336
333
  } from "./chunk-YYVTBZZC.js";
337
- import "./chunk-CQ7Y3O67.js";
334
+ import "./chunk-KHTKMVKT.js";
338
335
  import "./chunk-6VJCURWU.js";
339
- import "./chunk-NZ5QVASG.js";
336
+ import "./chunk-RU2HHHYA.js";
340
337
  import "./chunk-A4GOY3PE.js";
341
338
  import {
342
339
  renderLegendD3
@@ -372,7 +369,7 @@ import {
372
369
  parseDgmo,
373
370
  parseDgmoChartType,
374
371
  parseVisualization
375
- } from "./chunk-ZDFIY6WX.js";
372
+ } from "./chunk-3PVUGECM.js";
376
373
  import {
377
374
  normalizePlace,
378
375
  parseClock,
@@ -1309,6 +1306,123 @@ function startClocks(root = document) {
1309
1306
  window.setInterval(() => tickClocks(document), 1e3);
1310
1307
  }
1311
1308
 
1309
+ // src/map/load-data.ts
1310
+ async function loadNodeBuiltins() {
1311
+ const [{ readFile }, { fileURLToPath }, { dirname, resolve }] = await Promise.all([
1312
+ import("fs/promises"),
1313
+ import("url"),
1314
+ import("path")
1315
+ ]);
1316
+ return { readFile, fileURLToPath, dirname, resolve };
1317
+ }
1318
+ var FILES = {
1319
+ worldCoarse: "world-coarse.json",
1320
+ worldDetail: "world-detail.json",
1321
+ usStates: "us-states.json",
1322
+ lakes: "lakes.json",
1323
+ rivers: "rivers.json",
1324
+ mountainRanges: "mountain-ranges.json",
1325
+ naLand: "na-land.json",
1326
+ naLakes: "na-lakes.json",
1327
+ waterBodies: "water-bodies.json",
1328
+ airports: "airports.json",
1329
+ gazetteer: "gazetteer.json"
1330
+ };
1331
+ var CANDIDATE_DIRS = [
1332
+ "./data",
1333
+ "./map-data",
1334
+ "../map-data",
1335
+ "../src/map/data"
1336
+ ];
1337
+ var cache;
1338
+ async function readJson(nb, dir, name) {
1339
+ return JSON.parse(await nb.readFile(nb.resolve(dir, name), "utf8"));
1340
+ }
1341
+ async function firstExistingDir(nb, baseDir) {
1342
+ for (const rel of CANDIDATE_DIRS) {
1343
+ const dir = nb.resolve(baseDir, rel);
1344
+ try {
1345
+ await nb.readFile(nb.resolve(dir, FILES.gazetteer), "utf8");
1346
+ return dir;
1347
+ } catch {
1348
+ }
1349
+ }
1350
+ throw new Error(
1351
+ `map data assets not found near ${baseDir} (looked in ${CANDIDATE_DIRS.join(", ")}). If you installed this from npm, the package is missing its map data \u2014 please report it. In a dgmo checkout, run \`pnpm build:map-data\` and \`pnpm build\`.`
1352
+ );
1353
+ }
1354
+ function validate(data) {
1355
+ const topoOk = (t) => !!t && t.type === "Topology" && !!t.objects;
1356
+ if (!topoOk(data.worldCoarse) || !topoOk(data.worldDetail) || !topoOk(data.usStates) || !data.gazetteer || !Array.isArray(data.gazetteer.cities) || !data.gazetteer.byName) {
1357
+ throw new Error("map data assets are malformed (failed shape validation)");
1358
+ }
1359
+ return data;
1360
+ }
1361
+ function moduleBaseDir(nb) {
1362
+ try {
1363
+ const url = import.meta.url;
1364
+ if (url) return nb.dirname(nb.fileURLToPath(url));
1365
+ } catch {
1366
+ }
1367
+ if (typeof __dirname !== "undefined") return __dirname;
1368
+ return process.cwd();
1369
+ }
1370
+ function loadMapData() {
1371
+ cache ??= (async () => {
1372
+ const nb = await loadNodeBuiltins();
1373
+ const dir = await firstExistingDir(nb, moduleBaseDir(nb));
1374
+ const [
1375
+ worldCoarse,
1376
+ worldDetail,
1377
+ usStates,
1378
+ lakes,
1379
+ rivers,
1380
+ mountainRanges,
1381
+ naLand,
1382
+ naLakes,
1383
+ waterBodies,
1384
+ airports,
1385
+ gazetteer
1386
+ ] = await Promise.all([
1387
+ // worldCoarse (110m) is LOAD-BEARING but NOT a render source: the world
1388
+ // basemap renders from worldDetail (50m) at all scales (resolver pins
1389
+ // basemaps.world = 'detail'). Coarse stays as the authoritative region
1390
+ // name index + dominant-landmass bbox source in resolver.ts. Do not drop it.
1391
+ readJson(nb, dir, FILES.worldCoarse),
1392
+ readJson(nb, dir, FILES.worldDetail),
1393
+ readJson(nb, dir, FILES.usStates),
1394
+ // Lakes/rivers/mountain/NA/water assets are optional — older bundles may predate them.
1395
+ readJson(nb, dir, FILES.lakes).catch(() => void 0),
1396
+ readJson(nb, dir, FILES.rivers).catch(() => void 0),
1397
+ readJson(nb, dir, FILES.mountainRanges).catch(
1398
+ () => void 0
1399
+ ),
1400
+ readJson(nb, dir, FILES.naLand).catch(() => void 0),
1401
+ readJson(nb, dir, FILES.naLakes).catch(() => void 0),
1402
+ readJson(nb, dir, FILES.waterBodies).catch(() => void 0),
1403
+ readJson(nb, dir, FILES.airports).catch(() => void 0),
1404
+ readJson(nb, dir, FILES.gazetteer)
1405
+ ]);
1406
+ return validate({
1407
+ worldCoarse,
1408
+ worldDetail,
1409
+ usStates,
1410
+ gazetteer,
1411
+ ...lakes && { lakes },
1412
+ ...rivers && { rivers },
1413
+ ...mountainRanges && { mountainRanges },
1414
+ ...naLand && { naLand },
1415
+ ...naLakes && { naLakes },
1416
+ ...waterBodies && { waterBodies },
1417
+ ...airports && { airports }
1418
+ });
1419
+ })().catch((e) => {
1420
+ cache = void 0;
1421
+ throw e;
1422
+ });
1423
+ return cache;
1424
+ }
1425
+
1312
1426
  // src/map/invert.ts
1313
1427
  function inInsetFrame(inset, px, py) {
1314
1428
  return px >= inset.x && px <= inset.x + inset.w && py >= inset.y && py <= inset.y + inset.h;