@diagrammo/dgmo 0.21.0 → 0.22.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 (76) hide show
  1. package/README.md +16 -6
  2. package/dist/advanced.cjs +2521 -623
  3. package/dist/advanced.d.cts +917 -534
  4. package/dist/advanced.d.ts +917 -534
  5. package/dist/advanced.js +2516 -623
  6. package/dist/auto.cjs +2333 -608
  7. package/dist/auto.js +119 -119
  8. package/dist/auto.mjs +2335 -609
  9. package/dist/cli.cjs +168 -168
  10. package/dist/editor.cjs +13 -15
  11. package/dist/editor.js +13 -15
  12. package/dist/highlight.cjs +15 -12
  13. package/dist/highlight.js +15 -12
  14. package/dist/index.cjs +2317 -595
  15. package/dist/index.d.cts +4 -1
  16. package/dist/index.d.ts +4 -1
  17. package/dist/index.js +2319 -596
  18. package/dist/internal.cjs +2521 -623
  19. package/dist/internal.d.cts +917 -534
  20. package/dist/internal.d.ts +917 -534
  21. package/dist/internal.js +2516 -623
  22. package/dist/map-data/PROVENANCE.json +1 -1
  23. package/dist/map-data/mountain-ranges.json +1 -0
  24. package/dist/map-data/water-bodies.json +1 -0
  25. package/docs/language-reference.md +44 -31
  26. package/gallery/fixtures/map-categorical-world.dgmo +16 -0
  27. package/gallery/fixtures/map-categorical.dgmo +0 -1
  28. package/gallery/fixtures/map-choropleth.dgmo +0 -1
  29. package/gallery/fixtures/map-coastline.dgmo +7 -0
  30. package/gallery/fixtures/map-colorize.dgmo +11 -0
  31. package/gallery/fixtures/map-direct-color.dgmo +9 -0
  32. package/gallery/fixtures/map-reference-world.dgmo +11 -0
  33. package/gallery/fixtures/map-region-scope.dgmo +0 -3
  34. package/gallery/fixtures/map-route.dgmo +0 -1
  35. package/package.json +1 -1
  36. package/src/advanced.ts +26 -1
  37. package/src/boxes-and-lines/renderer.ts +39 -12
  38. package/src/cli.ts +1 -1
  39. package/src/completion.ts +32 -24
  40. package/src/cycle/renderer.ts +14 -1
  41. package/src/d3.ts +23 -11
  42. package/src/editor/highlight-api.ts +4 -0
  43. package/src/editor/keywords.ts +13 -15
  44. package/src/infra/renderer.ts +35 -7
  45. package/src/map/colorize.ts +54 -0
  46. package/src/map/context-labels.ts +429 -0
  47. package/src/map/data/PROVENANCE.json +1 -1
  48. package/src/map/data/mountain-ranges.json +1 -0
  49. package/src/map/data/types.ts +34 -0
  50. package/src/map/data/water-bodies.json +1 -0
  51. package/src/map/dimensions.ts +117 -0
  52. package/src/map/geo-query.ts +295 -0
  53. package/src/map/geo.ts +305 -2
  54. package/src/map/invert.ts +111 -0
  55. package/src/map/layout.ts +1504 -335
  56. package/src/map/load-data.ts +16 -2
  57. package/src/map/parser.ts +57 -111
  58. package/src/map/renderer.ts +556 -13
  59. package/src/map/resolved-types.ts +24 -2
  60. package/src/map/resolver.ts +237 -67
  61. package/src/map/types.ts +39 -23
  62. package/src/mindmap/renderer.ts +10 -1
  63. package/src/palettes/atlas.ts +77 -0
  64. package/src/palettes/blueprint.ts +73 -0
  65. package/src/palettes/color-utils.ts +58 -1
  66. package/src/palettes/index.ts +12 -3
  67. package/src/palettes/slate.ts +73 -0
  68. package/src/palettes/tidewater.ts +73 -0
  69. package/src/render.ts +8 -1
  70. package/src/tech-radar/renderer.ts +3 -0
  71. package/src/tech-radar/types.ts +3 -0
  72. package/src/utils/d3-types.ts +5 -0
  73. package/src/utils/legend-layout.ts +21 -4
  74. package/src/utils/legend-types.ts +7 -0
  75. package/src/utils/reserved-key-registry.ts +3 -0
  76. package/src/palettes/bold.ts +0 -67
@@ -112,6 +112,13 @@ export interface LegendConfig {
112
112
  * group). Lets the user click a sibling to switch the active group. Default
113
113
  * false (legacy: when one group is active the others are hidden). */
114
114
  showInactivePills?: boolean;
115
+ /** Where the controlsGroup is hosted. Default (undefined / 'inline') renders
116
+ * the in-SVG gear exactly as before — every non-app consumer (Obsidian,
117
+ * site, remark-family, CLI) is unaffected. When 'app', the controlsGroup is
118
+ * dropped entirely (no gear, no reserved row): the app overlay strip owns the
119
+ * controls, pinned to the top edge of the preview. App preview only; never
120
+ * set on the export path. */
121
+ controlsHost?: 'app' | 'inline';
115
122
  }
116
123
 
117
124
  export interface LegendPalette {
@@ -85,6 +85,9 @@ export const MAP_REGISTRY: ReservedKeyRegistry = staticRegistry([
85
85
  'value',
86
86
  'label',
87
87
  'style',
88
+ // `surface:` was removed in the 2026-06-02 defaults-on review — it is no longer
89
+ // a recognized metadata key (the route/edge surface feature was cut; §24B.7).
90
+ // A stray `surface: water` is no longer captured as a reserved key.
88
91
  ]);
89
92
 
90
93
  export const ORG_REGISTRY: ReservedKeyRegistry = staticRegistry([
@@ -1,67 +0,0 @@
1
- import type { PaletteConfig } from './types';
2
- import { registerPalette } from './registry';
3
-
4
- // ============================================================
5
- // Bold Palette Definition
6
- // ============================================================
7
-
8
- export const boldPalette: PaletteConfig = {
9
- id: 'bold',
10
- name: 'Bold',
11
- light: {
12
- bg: '#ffffff',
13
- surface: '#f0f0f0',
14
- overlay: '#f0f0f0',
15
- border: '#cccccc',
16
- text: '#000000',
17
- textMuted: '#666666',
18
- textOnFillLight: '#ffffff',
19
- textOnFillDark: '#000000',
20
- primary: '#0000ff',
21
- secondary: '#ff00ff',
22
- accent: '#00cccc',
23
- destructive: '#ff0000',
24
- colors: {
25
- red: '#ff0000',
26
- orange: '#ff8000',
27
- yellow: '#ffcc00',
28
- green: '#00cc00',
29
- blue: '#0000ff',
30
- purple: '#cc00cc',
31
- teal: '#008080',
32
- cyan: '#00cccc',
33
- gray: '#808080',
34
- black: '#000000',
35
- white: '#f0f0f0',
36
- },
37
- },
38
- dark: {
39
- bg: '#000000',
40
- surface: '#111111',
41
- overlay: '#1a1a1a',
42
- border: '#333333',
43
- text: '#ffffff',
44
- textMuted: '#aaaaaa',
45
- textOnFillLight: '#ffffff',
46
- textOnFillDark: '#000000',
47
- primary: '#00ccff',
48
- secondary: '#ff00ff',
49
- accent: '#ffff00',
50
- destructive: '#ff0000',
51
- colors: {
52
- red: '#ff0000',
53
- orange: '#ff8000',
54
- yellow: '#ffff00',
55
- green: '#00ff00',
56
- blue: '#0066ff',
57
- purple: '#ff00ff',
58
- teal: '#00cccc',
59
- cyan: '#00ffff',
60
- gray: '#808080',
61
- black: '#111111',
62
- white: '#ffffff',
63
- },
64
- },
65
- };
66
-
67
- registerPalette(boldPalette);