@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
@@ -1,121 +0,0 @@
1
- // src/map/load-data.ts
2
- async function loadNodeBuiltins() {
3
- const [{ readFile }, { fileURLToPath }, { dirname, resolve }] = await Promise.all([
4
- import("fs/promises"),
5
- import("url"),
6
- import("path")
7
- ]);
8
- return { readFile, fileURLToPath, dirname, resolve };
9
- }
10
- var FILES = {
11
- worldCoarse: "world-coarse.json",
12
- worldDetail: "world-detail.json",
13
- usStates: "us-states.json",
14
- lakes: "lakes.json",
15
- rivers: "rivers.json",
16
- mountainRanges: "mountain-ranges.json",
17
- naLand: "na-land.json",
18
- naLakes: "na-lakes.json",
19
- waterBodies: "water-bodies.json",
20
- airports: "airports.json",
21
- gazetteer: "gazetteer.json"
22
- };
23
- var CANDIDATE_DIRS = [
24
- "./data",
25
- "./map-data",
26
- "../map-data",
27
- "../src/map/data"
28
- ];
29
- var cache;
30
- async function readJson(nb, dir, name) {
31
- return JSON.parse(await nb.readFile(nb.resolve(dir, name), "utf8"));
32
- }
33
- async function firstExistingDir(nb, baseDir) {
34
- for (const rel of CANDIDATE_DIRS) {
35
- const dir = nb.resolve(baseDir, rel);
36
- try {
37
- await nb.readFile(nb.resolve(dir, FILES.gazetteer), "utf8");
38
- return dir;
39
- } catch {
40
- }
41
- }
42
- throw new Error(
43
- `map data assets not found near ${baseDir} (looked in ${CANDIDATE_DIRS.join(", ")}). Run \`pnpm build:map-data\` and \`pnpm build\`.`
44
- );
45
- }
46
- function validate(data) {
47
- const topoOk = (t) => !!t && t.type === "Topology" && !!t.objects;
48
- if (!topoOk(data.worldCoarse) || !topoOk(data.worldDetail) || !topoOk(data.usStates) || !data.gazetteer || !Array.isArray(data.gazetteer.cities) || !data.gazetteer.byName) {
49
- throw new Error("map data assets are malformed (failed shape validation)");
50
- }
51
- return data;
52
- }
53
- function moduleBaseDir(nb) {
54
- try {
55
- const url = import.meta.url;
56
- if (url) return nb.dirname(nb.fileURLToPath(url));
57
- } catch {
58
- }
59
- if (typeof __dirname !== "undefined") return __dirname;
60
- return process.cwd();
61
- }
62
- function loadMapData() {
63
- cache ??= (async () => {
64
- const nb = await loadNodeBuiltins();
65
- const dir = await firstExistingDir(nb, moduleBaseDir(nb));
66
- const [
67
- worldCoarse,
68
- worldDetail,
69
- usStates,
70
- lakes,
71
- rivers,
72
- mountainRanges,
73
- naLand,
74
- naLakes,
75
- waterBodies,
76
- airports,
77
- gazetteer
78
- ] = await Promise.all([
79
- // worldCoarse (110m) is LOAD-BEARING but NOT a render source: the world
80
- // basemap renders from worldDetail (50m) at all scales (resolver pins
81
- // basemaps.world = 'detail'). Coarse stays as the authoritative region
82
- // name index + dominant-landmass bbox source in resolver.ts. Do not drop it.
83
- readJson(nb, dir, FILES.worldCoarse),
84
- readJson(nb, dir, FILES.worldDetail),
85
- readJson(nb, dir, FILES.usStates),
86
- // Lakes/rivers/mountain/NA/water assets are optional — older bundles may predate them.
87
- readJson(nb, dir, FILES.lakes).catch(() => void 0),
88
- readJson(nb, dir, FILES.rivers).catch(() => void 0),
89
- readJson(nb, dir, FILES.mountainRanges).catch(
90
- () => void 0
91
- ),
92
- readJson(nb, dir, FILES.naLand).catch(() => void 0),
93
- readJson(nb, dir, FILES.naLakes).catch(() => void 0),
94
- readJson(nb, dir, FILES.waterBodies).catch(() => void 0),
95
- readJson(nb, dir, FILES.airports).catch(() => void 0),
96
- readJson(nb, dir, FILES.gazetteer)
97
- ]);
98
- return validate({
99
- worldCoarse,
100
- worldDetail,
101
- usStates,
102
- gazetteer,
103
- ...lakes && { lakes },
104
- ...rivers && { rivers },
105
- ...mountainRanges && { mountainRanges },
106
- ...naLand && { naLand },
107
- ...naLakes && { naLakes },
108
- ...waterBodies && { waterBodies },
109
- ...airports && { airports }
110
- });
111
- })().catch((e) => {
112
- cache = void 0;
113
- throw e;
114
- });
115
- return cache;
116
- }
117
-
118
- export {
119
- loadMapData
120
- };
121
- //# sourceMappingURL=chunk-6MTWIQVO.js.map
@@ -1,20 +0,0 @@
1
- // src/utils/svg-serialize.ts
2
- function escapeAttributeAngleBrackets(svg) {
3
- return svg.replace(
4
- // ` name="value"` / ` xlink:href="value"` — attribute names in SVG may carry
5
- // a namespace prefix, a dot, or a dash.
6
- /(\s[\w:.-]+=")([^"]*)"/g,
7
- (match, prefix, value) => {
8
- if (!value.includes("<") && !value.includes(">")) return match;
9
- return `${prefix}${value.replace(/</g, "&lt;").replace(/>/g, "&gt;")}"`;
10
- }
11
- );
12
- }
13
- function serializeSvg(svgEl) {
14
- return escapeAttributeAngleBrackets(svgEl.outerHTML);
15
- }
16
-
17
- export {
18
- serializeSvg
19
- };
20
- //# sourceMappingURL=chunk-NZ5QVASG.js.map