@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,7 +1,7 @@
1
1
  import {
2
2
  renderFlowchart,
3
3
  renderFlowchartForExport
4
- } from "./chunk-XJZCXNWR.js";
4
+ } from "./chunk-BGITRLTR.js";
5
5
  import "./chunk-PDKUANDZ.js";
6
6
  import "./chunk-LSFZDBAP.js";
7
7
  import "./chunk-LP7EC4MI.js";
@@ -13,7 +13,7 @@ import "./chunk-NCT22MOD.js";
13
13
  import "./chunk-WGC42WJU.js";
14
14
  import "./chunk-3CIOJ5YJ.js";
15
15
  import "./chunk-YYVTBZZC.js";
16
- import "./chunk-NZ5QVASG.js";
16
+ import "./chunk-RU2HHHYA.js";
17
17
  import "./chunk-A4GOY3PE.js";
18
18
  import "./chunk-6KFWC4CO.js";
19
19
  import "./chunk-4ASYQ347.js";
@@ -33,4 +33,4 @@ export {
33
33
  renderFlowchart,
34
34
  renderFlowchartForExport
35
35
  };
36
- //# sourceMappingURL=flowchart-renderer-XFDCX7MZ.js.map
36
+ //# sourceMappingURL=flowchart-renderer-BCVCIZHF.js.map
package/dist/index.d.ts CHANGED
@@ -1,12 +1,7 @@
1
- import { a as DiagnosticSpec, P as PaletteConfig, C as CompactViewState, D as DgmoError } from './registry-Ch0Umdi1.js';
2
- export { b as ChartTypeId, c as ChartTypeMeta, d as DgmoSeverity, e as DiagnosticParams, E as EmitOptions, f as PaletteColors, g as chartTypes, h as emit, i as formatDgmoError, j as getPalette, r as resolvePaletteOrFallback, p as validate } from './registry-Ch0Umdi1.js';
3
- import { T as Theme } from './themes-DC6u80yr.js';
4
- export { G as Gazetteer, a as GazetteerEntry, M as MapCompletionOptions, b as MapData, c as MapLocationMatch, d as MapPlaceCompletion, e as MapRegionCompletion, R as RegionName, f as RegionNames, g as completeMapPlaces, h as completeMapRegions, p as palettes, s as searchMapLocations, t as themes } from './themes-DC6u80yr.js';
5
-
6
- declare function getMinDimensions(content: string): {
7
- width: number;
8
- height: number;
9
- };
1
+ import { D as DiagnosticSpec, P as PaletteConfig, C as CompactViewState, a as DgmoError } from './dgmo-router-Dd5PTjxl.js';
2
+ export { b as ChartTypeId, c as ChartTypeMeta, d as DgmoSeverity, e as DiagnosticParams, E as EmitOptions, f as PaletteColors, g as chartTypes, h as emit, i as formatDgmoError, j as getPalette, r as resolvePaletteOrFallback, p as validate } from './dgmo-router-Dd5PTjxl.js';
3
+ import { T as Theme, M as MapDataSource } from './themes-DiUAG4Bf.js';
4
+ export { G as Gazetteer, a as GazetteerEntry, b as MapCompletionOptions, c as MapData, d as MapLocationMatch, e as MapPlaceCompletion, f as MapRegionCompletion, R as RegionName, g as RegionNames, h as completeMapPlaces, i as completeMapRegions, p as palettes, s as searchMapLocations, t as themes } from './themes-DiUAG4Bf.js';
10
5
 
11
6
  /**
12
7
  * Make an SVG produced by `@diagrammo/dgmo`'s static `render()` suitable for
@@ -144,7 +139,23 @@ interface RenderOptions {
144
139
  */
145
140
  width?: number;
146
141
  height?: number;
142
+ /**
143
+ * Basemap assets for `map` charts — the data itself, or a loader returning
144
+ * it. `render()` reads nothing from the filesystem or the network on its own,
145
+ * so this is the only way a map obtains a basemap, and its presence here is
146
+ * what tells a caller whether a render can touch the environment.
147
+ *
148
+ * - Node / CLI / SSR: pass the `loadMapData` loader from
149
+ * `@diagrammo/dgmo/advanced`. It runs only when the content really is a
150
+ * map, so a non-map render never pays to read the assets.
151
+ * - Browser / Worker / Obsidian: pass your bundled `MapData`.
152
+ *
153
+ * Omit it and a map renders empty with an `E_MAP_DATA_NOT_SUPPLIED`
154
+ * diagnostic. Every other chart type ignores this option.
155
+ */
156
+ mapData?: MapDataSource;
147
157
  }
158
+
148
159
  interface RenderResult {
149
160
  svg: string;
150
161
  diagnostics: DgmoError[];
@@ -193,4 +204,4 @@ interface DecodedDiagramUrl {
193
204
  */
194
205
  declare function decodeDiagramUrl(url: string): DecodedDiagramUrl | null;
195
206
 
196
- export { CompactViewState, D3_DATA_CHART_TYPES, type DataChartInteractionOpts, type DecodedDiagramUrl, DgmoError, DiagnosticSpec, type EncodeDiagramUrlOptions, type MountD3Opts, type MountedD3Chart, type NormalizeSvgForEmbedOptions, PaletteConfig, type RenderOptions, type RenderResult, Theme, attachDataChartInteractions, decodeDiagramUrl, defaultEmbedBackground, encodeDiagramUrl, getDiagnosticSpec, getEmbedSvgViewBox, getMinDimensions, listDiagnosticCodes, mountD3DataChart, normalizeSvgForEmbed, render, supportsD3DataChart };
207
+ export { CompactViewState, D3_DATA_CHART_TYPES, type DataChartInteractionOpts, type DecodedDiagramUrl, DgmoError, DiagnosticSpec, type EncodeDiagramUrlOptions, MapDataSource, type MountD3Opts, type MountedD3Chart, type NormalizeSvgForEmbedOptions, PaletteConfig, type RenderOptions, type RenderResult, Theme, attachDataChartInteractions, decodeDiagramUrl, defaultEmbedBackground, encodeDiagramUrl, getDiagnosticSpec, getEmbedSvgViewBox, listDiagnosticCodes, mountD3DataChart, normalizeSvgForEmbed, render, supportsD3DataChart };
package/dist/index.js CHANGED
@@ -9,27 +9,27 @@ import {
9
9
  searchMapLocations,
10
10
  themes
11
11
  } from "./chunk-SQAG3UXH.js";
12
- import {
13
- MAP_DIAGNOSTICS
14
- } from "./chunk-4B5YISOR.js";
15
12
  import {
16
13
  render
17
- } from "./chunk-BSJIPMPG.js";
14
+ } from "./chunk-QDPMTFB4.js";
18
15
  import {
19
16
  renderErrorCard
20
- } from "./chunk-5PWIV7ZF.js";
17
+ } from "./chunk-LFAQ4BLZ.js";
18
+ import {
19
+ MAP_DIAGNOSTICS
20
+ } from "./chunk-EOYPX6SF.js";
21
21
  import {
22
22
  D3_DATA_CHART_TYPES,
23
23
  renderDataChartD3,
24
24
  supportsD3DataChart
25
- } from "./chunk-6CWNVQPW.js";
26
- import "./chunk-VHO3YBTB.js";
27
- import "./chunk-3OLO2MZ6.js";
25
+ } from "./chunk-2LN5C6FH.js";
26
+ import "./chunk-CVVICCSB.js";
27
+ import "./chunk-BPINSP65.js";
28
28
  import "./chunk-YRYKTYMQ.js";
29
29
  import "./chunk-YYVTBZZC.js";
30
- import "./chunk-CQ7Y3O67.js";
30
+ import "./chunk-KHTKMVKT.js";
31
31
  import "./chunk-6VJCURWU.js";
32
- import "./chunk-NZ5QVASG.js";
32
+ import "./chunk-RU2HHHYA.js";
33
33
  import "./chunk-A4GOY3PE.js";
34
34
  import "./chunk-UKZ7K5GS.js";
35
35
  import "./chunk-ES66QH6J.js";
@@ -41,9 +41,8 @@ import {
41
41
  encodeDiagramUrl
42
42
  } from "./chunk-U7VO6JAA.js";
43
43
  import {
44
- REGISTRY_BY_ID,
45
44
  parseDgmo
46
- } from "./chunk-ZDFIY6WX.js";
45
+ } from "./chunk-3PVUGECM.js";
47
46
  import "./chunk-2CMM36O7.js";
48
47
  import "./chunk-A2RUBBVT.js";
49
48
  import "./chunk-JWJBWNQL.js";
@@ -144,15 +143,6 @@ import {
144
143
  } from "./chunk-OLMWTJVU.js";
145
144
  import "./chunk-5WRI5ZAA.js";
146
145
 
147
- // src/dimensions.ts
148
- function getMinDimensions(content) {
149
- const { chartType } = parseDgmo(content);
150
- if (!chartType) return { width: 300, height: 200 };
151
- const descriptor = REGISTRY_BY_ID.get(chartType);
152
- const counts = descriptor?.measure?.(content) ?? {};
153
- return descriptor?.minDims?.(counts) ?? { width: 300, height: 200 };
154
- }
155
-
156
146
  // src/charts-d3/interactions.ts
157
147
  var NS = "http://www.w3.org/2000/svg";
158
148
  var STYLE_ID = "dgmo-chart-interactions-style";
@@ -850,7 +840,8 @@ async function render2(text, options) {
850
840
  palette: palette.id,
851
841
  ...options?.viewState !== void 0 && { viewState: options.viewState },
852
842
  ...options?.width !== void 0 && { width: options.width },
853
- ...options?.height !== void 0 && { height: options.height }
843
+ ...options?.height !== void 0 && { height: options.height },
844
+ ...options?.mapData !== void 0 && { mapData: options.mapData }
854
845
  });
855
846
  const errors = result.diagnostics.filter((d) => d.severity === "error");
856
847
  if (errors.length === 0) {
@@ -903,7 +894,6 @@ export {
903
894
  formatDgmoError,
904
895
  getDiagnosticSpec,
905
896
  getEmbedSvgViewBox,
906
- getMinDimensions,
907
897
  getPalette,
908
898
  listDiagnosticCodes,
909
899
  mountD3DataChart,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  renderMindmap,
3
3
  renderMindmapForExport
4
- } from "./chunk-DZZWR6GT.js";
4
+ } from "./chunk-DUHKYKI7.js";
5
5
  import "./chunk-U42ZEK7L.js";
6
- import "./chunk-L43KTQTW.js";
6
+ import "./chunk-L26ZAPNJ.js";
7
7
  import "./chunk-WGC42WJU.js";
8
8
  import "./chunk-3CIOJ5YJ.js";
9
9
  import "./chunk-YYVTBZZC.js";
10
10
  import "./chunk-6VJCURWU.js";
11
- import "./chunk-NZ5QVASG.js";
11
+ import "./chunk-RU2HHHYA.js";
12
12
  import "./chunk-A4GOY3PE.js";
13
13
  import "./chunk-UKZ7K5GS.js";
14
14
  import "./chunk-ES66QH6J.js";
@@ -27,4 +27,4 @@ export {
27
27
  renderMindmap,
28
28
  renderMindmapForExport
29
29
  };
30
- //# sourceMappingURL=renderer-CXRSD26Q.js.map
30
+ //# sourceMappingURL=renderer-4VDSMPYU.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderKanban,
3
3
  renderKanbanForExport
4
- } from "./chunk-FXLGBUIQ.js";
4
+ } from "./chunk-34HQALZ5.js";
5
5
  import "./chunk-WGC42WJU.js";
6
6
  import "./chunk-3CIOJ5YJ.js";
7
7
  import "./chunk-YYVTBZZC.js";
8
- import "./chunk-NZ5QVASG.js";
8
+ import "./chunk-RU2HHHYA.js";
9
9
  import "./chunk-A4GOY3PE.js";
10
10
  import "./chunk-UKZ7K5GS.js";
11
11
  import "./chunk-ES66QH6J.js";
@@ -24,4 +24,4 @@ export {
24
24
  renderKanban,
25
25
  renderKanbanForExport
26
26
  };
27
- //# sourceMappingURL=renderer-62FFDWMY.js.map
27
+ //# sourceMappingURL=renderer-5HYDLCMX.js.map
@@ -6,11 +6,11 @@ import {
6
6
  renderC4ContextForExport,
7
7
  renderC4Deployment,
8
8
  renderC4DeploymentForExport
9
- } from "./chunk-SMHTYVMK.js";
9
+ } from "./chunk-RZRMSNO7.js";
10
10
  import "./chunk-SF3JAWMY.js";
11
11
  import "./chunk-WGC42WJU.js";
12
12
  import "./chunk-3CIOJ5YJ.js";
13
- import "./chunk-NZ5QVASG.js";
13
+ import "./chunk-RU2HHHYA.js";
14
14
  import "./chunk-A4GOY3PE.js";
15
15
  import "./chunk-UKZ7K5GS.js";
16
16
  import "./chunk-ES66QH6J.js";
@@ -37,4 +37,4 @@ export {
37
37
  renderC4Deployment,
38
38
  renderC4DeploymentForExport
39
39
  };
40
- //# sourceMappingURL=renderer-XSHOMUJQ.js.map
40
+ //# sourceMappingURL=renderer-726UVOKE.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderLiveLinkCard
3
- } from "./chunk-MOT3NXB5.js";
4
- import "./chunk-5PWIV7ZF.js";
3
+ } from "./chunk-FVYHDZ6Q.js";
4
+ import "./chunk-LFAQ4BLZ.js";
5
5
  import "./chunk-6KFWC4CO.js";
6
6
  import "./chunk-4ASYQ347.js";
7
7
  import "./chunk-U7VO6JAA.js";
8
- import "./chunk-ZDFIY6WX.js";
8
+ import "./chunk-3PVUGECM.js";
9
9
  import "./chunk-2CMM36O7.js";
10
10
  import "./chunk-A2RUBBVT.js";
11
11
  import "./chunk-JWJBWNQL.js";
@@ -73,4 +73,4 @@ import "./chunk-5WRI5ZAA.js";
73
73
  export {
74
74
  renderLiveLinkCard
75
75
  };
76
- //# sourceMappingURL=renderer-IYMA5W7X.js.map
76
+ //# sourceMappingURL=renderer-A5GFW2XH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderERDiagram,
3
3
  renderERDiagramForExport
4
- } from "./chunk-4BEAHH6G.js";
4
+ } from "./chunk-XXDEQSW4.js";
5
5
  import "./chunk-5H2LIQIH.js";
6
6
  import "./chunk-H52HJ26L.js";
7
7
  import "./chunk-LDVUPGWC.js";
@@ -13,7 +13,7 @@ import "./chunk-WGC42WJU.js";
13
13
  import "./chunk-3CIOJ5YJ.js";
14
14
  import "./chunk-YYVTBZZC.js";
15
15
  import "./chunk-6VJCURWU.js";
16
- import "./chunk-NZ5QVASG.js";
16
+ import "./chunk-RU2HHHYA.js";
17
17
  import "./chunk-A4GOY3PE.js";
18
18
  import "./chunk-UKZ7K5GS.js";
19
19
  import "./chunk-ES66QH6J.js";
@@ -36,4 +36,4 @@ export {
36
36
  renderERDiagram,
37
37
  renderERDiagramForExport
38
38
  };
39
- //# sourceMappingURL=renderer-VYMTBSF4.js.map
39
+ //# sourceMappingURL=renderer-HPQJRSON.js.map
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  renderClassDiagram,
3
3
  renderClassDiagramForExport
4
- } from "./chunk-YJCILMEA.js";
4
+ } from "./chunk-U22TKD3L.js";
5
5
  import "./chunk-PCWPYOT4.js";
6
6
  import "./chunk-H52HJ26L.js";
7
7
  import "./chunk-LDVUPGWC.js";
8
8
  import "./chunk-6EK55ART.js";
9
9
  import "./chunk-VJARCVMH.js";
10
10
  import "./chunk-5DH3KYFH.js";
11
- import "./chunk-L43KTQTW.js";
11
+ import "./chunk-L26ZAPNJ.js";
12
12
  import "./chunk-NCT22MOD.js";
13
13
  import "./chunk-WGC42WJU.js";
14
14
  import "./chunk-3CIOJ5YJ.js";
15
15
  import "./chunk-YYVTBZZC.js";
16
16
  import "./chunk-6VJCURWU.js";
17
- import "./chunk-NZ5QVASG.js";
17
+ import "./chunk-RU2HHHYA.js";
18
18
  import "./chunk-A4GOY3PE.js";
19
19
  import "./chunk-UKZ7K5GS.js";
20
20
  import "./chunk-ES66QH6J.js";
@@ -36,4 +36,4 @@ export {
36
36
  renderClassDiagram,
37
37
  renderClassDiagramForExport
38
38
  };
39
- //# sourceMappingURL=renderer-GESKWINV.js.map
39
+ //# sourceMappingURL=renderer-K3TH5PP7.js.map
@@ -3,13 +3,13 @@ import {
3
3
  renderPert,
4
4
  renderPertAnalysisBlock,
5
5
  renderPertForExport
6
- } from "./chunk-HJ6TMHQG.js";
6
+ } from "./chunk-SV7F363F.js";
7
7
  import "./chunk-CGLBK5Q4.js";
8
8
  import "./chunk-R6HCNSP6.js";
9
9
  import "./chunk-3CIOJ5YJ.js";
10
10
  import "./chunk-YYVTBZZC.js";
11
11
  import "./chunk-6VJCURWU.js";
12
- import "./chunk-NZ5QVASG.js";
12
+ import "./chunk-RU2HHHYA.js";
13
13
  import "./chunk-A4GOY3PE.js";
14
14
  import "./chunk-UKZ7K5GS.js";
15
15
  import "./chunk-ES66QH6J.js";
@@ -33,4 +33,4 @@ export {
33
33
  renderPertAnalysisBlock,
34
34
  renderPertForExport
35
35
  };
36
- //# sourceMappingURL=renderer-4RQ5PGHY.js.map
36
+ //# sourceMappingURL=renderer-KHVAM4IY.js.map
@@ -3,17 +3,17 @@ import {
3
3
  focusEventLine,
4
4
  renderEventLine,
5
5
  renderEventLineForExport
6
- } from "./chunk-NEV5IW33.js";
6
+ } from "./chunk-YVI3JL3S.js";
7
7
  import "./chunk-NCT22MOD.js";
8
8
  import "./chunk-H3HFC3SQ.js";
9
9
  import "./chunk-WGC42WJU.js";
10
10
  import "./chunk-3CIOJ5YJ.js";
11
- import "./chunk-3OLO2MZ6.js";
11
+ import "./chunk-BPINSP65.js";
12
12
  import "./chunk-YRYKTYMQ.js";
13
13
  import "./chunk-YYVTBZZC.js";
14
- import "./chunk-CQ7Y3O67.js";
14
+ import "./chunk-KHTKMVKT.js";
15
15
  import "./chunk-6VJCURWU.js";
16
- import "./chunk-NZ5QVASG.js";
16
+ import "./chunk-RU2HHHYA.js";
17
17
  import "./chunk-A4GOY3PE.js";
18
18
  import "./chunk-UKZ7K5GS.js";
19
19
  import "./chunk-ES66QH6J.js";
@@ -35,4 +35,4 @@ export {
35
35
  renderEventLine,
36
36
  renderEventLineForExport
37
37
  };
38
- //# sourceMappingURL=renderer-2PGIIOFN.js.map
38
+ //# sourceMappingURL=renderer-KKNXTTFE.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  renderOrg,
3
3
  renderOrgForExport
4
- } from "./chunk-7BJQUII6.js";
5
- import "./chunk-L43KTQTW.js";
4
+ } from "./chunk-KK5LQIN7.js";
5
+ import "./chunk-L26ZAPNJ.js";
6
6
  import "./chunk-RKTIIU7Z.js";
7
7
  import "./chunk-H3HFC3SQ.js";
8
8
  import "./chunk-3CIOJ5YJ.js";
9
9
  import "./chunk-YYVTBZZC.js";
10
- import "./chunk-NZ5QVASG.js";
10
+ import "./chunk-RU2HHHYA.js";
11
11
  import "./chunk-A4GOY3PE.js";
12
12
  import "./chunk-UKZ7K5GS.js";
13
13
  import "./chunk-ES66QH6J.js";
@@ -26,4 +26,4 @@ export {
26
26
  renderOrg,
27
27
  renderOrgForExport
28
28
  };
29
- //# sourceMappingURL=renderer-IG5PQXEM.js.map
29
+ //# sourceMappingURL=renderer-PKST5W6U.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderMap,
3
3
  renderMapForExport
4
- } from "./chunk-2WPLOS4Q.js";
4
+ } from "./chunk-USHDV2AF.js";
5
5
  import "./chunk-FWVKPEG3.js";
6
- import "./chunk-OPBZYISB.js";
6
+ import "./chunk-37EHGTQ2.js";
7
7
  import "./chunk-4QV26TEG.js";
8
- import "./chunk-VHO3YBTB.js";
8
+ import "./chunk-CVVICCSB.js";
9
9
  import "./chunk-A4GOY3PE.js";
10
10
  import "./chunk-UKZ7K5GS.js";
11
11
  import "./chunk-ES66QH6J.js";
@@ -24,4 +24,4 @@ export {
24
24
  renderMap,
25
25
  renderMapForExport
26
26
  };
27
- //# sourceMappingURL=renderer-R6OKKSVR.js.map
27
+ //# sourceMappingURL=renderer-Q2YHQQSN.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderBody,
3
3
  renderBodyForExport
4
- } from "./chunk-7FTGNJQ2.js";
4
+ } from "./chunk-GCVTU64J.js";
5
5
  import "./chunk-UKZ7K5GS.js";
6
6
  import "./chunk-ES66QH6J.js";
7
7
  import "./chunk-6KFWC4CO.js";
@@ -18,4 +18,4 @@ export {
18
18
  renderBody,
19
19
  renderBodyForExport
20
20
  };
21
- //# sourceMappingURL=renderer-6QW5OAJG.js.map
21
+ //# sourceMappingURL=renderer-TTMBG2N6.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  renderSitemap,
3
3
  renderSitemapForExport
4
- } from "./chunk-LRKGF7RN.js";
4
+ } from "./chunk-L4B4GRVS.js";
5
5
  import "./chunk-H3HFC3SQ.js";
6
6
  import "./chunk-WGC42WJU.js";
7
7
  import "./chunk-3CIOJ5YJ.js";
8
8
  import "./chunk-YYVTBZZC.js";
9
9
  import "./chunk-6VJCURWU.js";
10
- import "./chunk-NZ5QVASG.js";
10
+ import "./chunk-RU2HHHYA.js";
11
11
  import "./chunk-A4GOY3PE.js";
12
12
  import "./chunk-UKZ7K5GS.js";
13
13
  import "./chunk-ES66QH6J.js";
@@ -25,4 +25,4 @@ export {
25
25
  renderSitemap,
26
26
  renderSitemapForExport
27
27
  };
28
- //# sourceMappingURL=renderer-AS6LLDZM.js.map
28
+ //# sourceMappingURL=renderer-XDL6PRLN.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderJourneyMap,
3
3
  renderJourneyMapForExport
4
- } from "./chunk-PFGJ7SCM.js";
4
+ } from "./chunk-PUFWYDWP.js";
5
5
  import "./chunk-KRTO7NRK.js";
6
6
  import "./chunk-VJARCVMH.js";
7
7
  import "./chunk-5DH3KYFH.js";
@@ -9,7 +9,7 @@ import "./chunk-NCT22MOD.js";
9
9
  import "./chunk-WGC42WJU.js";
10
10
  import "./chunk-3CIOJ5YJ.js";
11
11
  import "./chunk-YYVTBZZC.js";
12
- import "./chunk-NZ5QVASG.js";
12
+ import "./chunk-RU2HHHYA.js";
13
13
  import "./chunk-UKZ7K5GS.js";
14
14
  import "./chunk-ES66QH6J.js";
15
15
  import "./chunk-6KFWC4CO.js";
@@ -27,4 +27,4 @@ export {
27
27
  renderJourneyMap,
28
28
  renderJourneyMapForExport
29
29
  };
30
- //# sourceMappingURL=renderer-63MLWS6L.js.map
30
+ //# sourceMappingURL=renderer-XIJO7DYS.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isSubNationalUsExtent,
3
3
  resolveMap
4
- } from "./chunk-DNSEG6P2.js";
4
+ } from "./chunk-WMHHNK44.js";
5
5
  import "./chunk-4QV26TEG.js";
6
- import "./chunk-4B5YISOR.js";
6
+ import "./chunk-EOYPX6SF.js";
7
7
  import "./chunk-A2RUBBVT.js";
8
8
  import "./chunk-OLMWTJVU.js";
9
9
  import "./chunk-5WRI5ZAA.js";
@@ -11,4 +11,4 @@ export {
11
11
  isSubNationalUsExtent,
12
12
  resolveMap
13
13
  };
14
- //# sourceMappingURL=resolver-W3WKLWDP.js.map
14
+ //# sourceMappingURL=resolver-B3TXWNWF.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  renderState,
3
3
  renderStateForExport
4
- } from "./chunk-7QCYHZVO.js";
4
+ } from "./chunk-NQH2Q2RR.js";
5
5
  import "./chunk-PDKUANDZ.js";
6
6
  import "./chunk-LSFZDBAP.js";
7
7
  import "./chunk-LP7EC4MI.js";
@@ -14,7 +14,7 @@ import "./chunk-WGC42WJU.js";
14
14
  import "./chunk-3CIOJ5YJ.js";
15
15
  import "./chunk-YYVTBZZC.js";
16
16
  import "./chunk-6VJCURWU.js";
17
- import "./chunk-NZ5QVASG.js";
17
+ import "./chunk-RU2HHHYA.js";
18
18
  import "./chunk-A4GOY3PE.js";
19
19
  import "./chunk-UKZ7K5GS.js";
20
20
  import "./chunk-ES66QH6J.js";
@@ -37,4 +37,4 @@ export {
37
37
  renderState,
38
38
  renderStateForExport
39
39
  };
40
- //# sourceMappingURL=state-renderer-GBHDOEXR.js.map
40
+ //# sourceMappingURL=state-renderer-MCWCZ76U.js.map
@@ -1,4 +1,4 @@
1
- import { T as TagGroup, D as DgmoError, P as PaletteConfig } from './registry-Ch0Umdi1.js';
1
+ import { T as TagGroup, a as DgmoError, P as PaletteConfig, f as PaletteColors, C as CompactViewState } from './dgmo-router-Dd5PTjxl.js';
2
2
 
3
3
  /** A POI / route-stop position: gazetteer name (+ optional ISO scope) or coords. */
4
4
  type PoiPos = {
@@ -477,6 +477,41 @@ declare const palettes: {
477
477
  readonly tokyoNight: PaletteConfig;
478
478
  };
479
479
 
480
+ /**
481
+ * How a host supplies map basemap assets: the data itself, or a loader that
482
+ * returns it. Declared here (rather than accepting only `MapData`) so a Node
483
+ * host can hand over `loadMapData` without paying to read eleven JSON files on
484
+ * a render that turns out not to be a map — the loader is called only inside
485
+ * the map branch.
486
+ */
487
+ type MapDataSource = MapData | (() => Promise<MapData>);
488
+ /**
489
+ * Renders a D3 chart to an SVG string for export.
490
+ * Creates a detached DOM element, renders into it, extracts the SVG, then cleans up.
491
+ */
492
+ type RenderForExportOptions = {
493
+ c4Level?: 'context' | 'containers' | 'components' | 'deployment';
494
+ c4System?: string;
495
+ c4Container?: string;
496
+ tagGroup?: string;
497
+ exportMode?: boolean;
498
+ mapData?: MapDataSource;
499
+ mapAspect?: number;
500
+ onMapResolverDiagnostics?: (diagnostics: readonly DgmoError[]) => void;
501
+ /**
502
+ * Canvas to draw onto, in px. Defaults to EXPORT_WIDTH x EXPORT_HEIGHT.
503
+ *
504
+ * Every chart used to render onto a fixed 1200x800 sheet, so a caller who
505
+ * fitted the result to a narrow column got its ASPECT too — a one-line goal
506
+ * meter arrived 800px tall with the bar as a sliver in the middle. Callers
507
+ * that know the shape they need can now say so; omitting these keeps the
508
+ * previous canvas exactly.
509
+ */
510
+ width?: number;
511
+ height?: number;
512
+ };
513
+ declare function renderForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors, viewState?: CompactViewState, options?: RenderForExportOptions): Promise<string>;
514
+
480
515
  interface MapPlaceCompletion {
481
516
  /** Canonical display name (original casing), e.g. `Portland`. */
482
517
  readonly name: string;
@@ -593,4 +628,4 @@ declare const themes: {
593
628
  readonly transparent: "transparent";
594
629
  };
595
630
 
596
- export { type AirportData as A, type BoundaryTopology as B, type Gazetteer as G, type MapCompletionOptions as M, type ParsedMap as P, type RegionName as R, type Theme as T, type GazetteerEntry as a, type MapData as b, type MapLocationMatch as c, type MapPlaceCompletion as d, type MapRegionCompletion as e, type RegionNames as f, completeMapPlaces as g, completeMapRegions as h, type ResolvedMap as i, type MapLayoutLegend as j, type GeoExtent as k, type MapDirectives as l, type MapEdge as m, type MapPoi as n, type MapRegion as o, palettes as p, type MapRoute as q, type PoiPos as r, searchMapLocations as s, themes as t, type ProjectionFamily as u, type ResolvedEdge as v, type ResolvedPoi as w, type ResolvedRegion as x, type ResolvedRoute as y };
631
+ export { type AirportData as A, type BoundaryTopology as B, renderForExport as C, type Gazetteer as G, type MapDataSource as M, type ParsedMap as P, type RegionName as R, type Theme as T, type GazetteerEntry as a, type MapCompletionOptions as b, type MapData as c, type MapLocationMatch as d, type MapPlaceCompletion as e, type MapRegionCompletion as f, type RegionNames as g, completeMapPlaces as h, completeMapRegions as i, type ResolvedMap as j, type MapLayoutLegend as k, type GeoExtent as l, type MapDirectives as m, type MapEdge as n, type MapPoi as o, palettes as p, type MapRegion as q, type MapRoute as r, searchMapLocations as s, themes as t, type PoiPos as u, type ProjectionFamily as v, type ResolvedEdge as w, type ResolvedPoi as x, type ResolvedRegion as y, type ResolvedRoute as z };
@@ -9,7 +9,7 @@ Use AI coding tools to generate `.dgmo` diagrams. This guide covers Claude Code,
9
9
  Install the `dgmo` CLI, then run one command:
10
10
 
11
11
  ```bash
12
- brew install diagrammo/dgmo/dgmo # or: npm install -g @diagrammo/dgmo
12
+ brew install diagrammo/dgmo/dgmo # or: npm install -g @diagrammo/dgmo-cli
13
13
  dgmo install # auto-detects every AI assistant you have
14
14
  ```
15
15
 
@@ -509,12 +509,12 @@ Cursor and Windsurf speak MCP, so `dgmo install` gives them the full render/shar
509
509
 
510
510
  ```bash
511
511
  # From node_modules (if installed as a dependency)
512
- cp node_modules/@diagrammo/dgmo/.cursorrules .
513
- cp node_modules/@diagrammo/dgmo/.windsurfrules .
514
- mkdir -p .github && cp node_modules/@diagrammo/dgmo/.github/copilot-instructions.md .github/
512
+ cp node_modules/@diagrammo/dgmo-cli/.cursorrules .
513
+ cp node_modules/@diagrammo/dgmo-cli/.windsurfrules .
514
+ mkdir -p .github && cp node_modules/@diagrammo/dgmo-cli/.github/copilot-instructions.md .github/
515
515
 
516
516
  # From global npm install
517
- cp $(npm root -g)/@diagrammo/dgmo/.cursorrules .
517
+ cp $(npm root -g)/@diagrammo/dgmo-cli/.cursorrules .
518
518
  ```
519
519
 
520
520
  Each file contains the generated DGMO AI core (anti-patterns + 43-type index), a condensed syntax reference with examples, rendering commands, and common mistakes to avoid.
Binary file
Binary file
Binary file
Binary file