@diagrammo/dgmo 0.61.0 → 0.62.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.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +382 -396
  3. package/dist/advanced.js +135 -21
  4. package/dist/auto.js +143 -142
  5. package/dist/block.js +6 -5
  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-3WMDA5Z5.js} +3 -3
  10. package/dist/{chunk-OPBZYISB.js → chunk-37EHGTQ2.js} +2204 -2018
  11. package/dist/{chunk-ZDFIY6WX.js → chunk-3PVUGECM.js} +1 -2
  12. package/dist/{chunk-6CWNVQPW.js → chunk-4C3BTTOL.js} +2 -2
  13. package/dist/{chunk-4B5YISOR.js → chunk-536EBUPG.js} +16 -1
  14. package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
  15. package/dist/{chunk-BSJIPMPG.js → chunk-DHIBVN2D.js} +28 -17
  16. package/dist/{chunk-MOT3NXB5.js → chunk-FVYHDZ6Q.js} +2 -2
  17. package/dist/{chunk-S23HOUJS.js → chunk-JU2VMFYC.js} +2 -2
  18. package/dist/{chunk-5PWIV7ZF.js → chunk-LFAQ4BLZ.js} +2 -2
  19. package/dist/{chunk-DNSEG6P2.js → chunk-PJDX4IKR.js} +2 -2
  20. package/dist/{chunk-2WPLOS4Q.js → chunk-USHDV2AF.js} +2 -2
  21. package/dist/{registry-Ch0Umdi1.d.ts → dgmo-router-Dd5PTjxl.d.ts} +98 -98
  22. package/dist/{dgmo-router-UVYAJCAF.js → dgmo-router-Z5N6QLIC.js} +2 -2
  23. package/dist/{dimensions-QCPOPPKE.js → dimensions-ES6O2T4H.js} +4 -4
  24. package/dist/element.js +144 -143
  25. package/dist/index.d.ts +21 -10
  26. package/dist/index.js +10 -20
  27. package/dist/{renderer-IYMA5W7X.js → renderer-A5GFW2XH.js} +4 -4
  28. package/dist/{renderer-R6OKKSVR.js → renderer-Q2YHQQSN.js} +4 -4
  29. package/dist/{resolver-W3WKLWDP.js → resolver-ZLYSMILY.js} +3 -3
  30. package/dist/{themes-DC6u80yr.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
  31. package/docs/ai-integration.md +5 -5
  32. package/package.json +2 -21
  33. package/.claude/commands/dgmo-codebase-report.md +0 -172
  34. package/.claude/commands/dgmo-diagram-this.md +0 -60
  35. package/.claude/commands/dgmo-document-project.md +0 -128
  36. package/.claude/commands/dgmo.md +0 -313
  37. package/.cursorrules +0 -587
  38. package/.github/copilot-instructions.md +0 -597
  39. package/.windsurfrules +0 -587
  40. package/SKILL.md +0 -573
  41. package/dist/auto.d.ts +0 -60
  42. package/dist/auto.mjs +0 -88466
  43. package/dist/chunk-6MTWIQVO.js +0 -121
  44. package/dist/cli.cjs +0 -489
  45. package/dist/element.d.ts +0 -68
  46. package/dist/element.mjs +0 -88332
  47. 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