@diagrammo/dgmo 0.21.1 → 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.
- package/README.md +16 -6
- package/dist/advanced.cjs +2003 -466
- package/dist/advanced.d.cts +5714 -0
- package/dist/advanced.d.ts +5714 -0
- package/dist/advanced.js +1999 -466
- package/dist/auto.cjs +2048 -449
- package/dist/auto.d.cts +39 -0
- package/dist/auto.d.ts +39 -0
- package/dist/auto.js +121 -121
- package/dist/auto.mjs +2050 -450
- package/dist/cli.cjs +170 -170
- package/dist/editor.cjs +13 -16
- package/dist/editor.js +13 -16
- package/dist/highlight.cjs +15 -13
- package/dist/highlight.js +15 -13
- package/dist/index.cjs +2032 -435
- package/dist/index.d.cts +339 -0
- package/dist/index.d.ts +339 -0
- package/dist/index.js +2034 -436
- package/dist/internal.cjs +2003 -466
- package/dist/internal.d.cts +5714 -0
- package/dist/internal.d.ts +5714 -0
- package/dist/internal.js +1999 -466
- package/dist/map-data/water-bodies.json +1 -0
- package/docs/language-reference.md +20 -9
- package/gallery/fixtures/map-categorical-world.dgmo +16 -0
- package/gallery/fixtures/map-categorical.dgmo +0 -1
- package/gallery/fixtures/map-choropleth.dgmo +0 -1
- package/gallery/fixtures/map-coastline.dgmo +7 -0
- package/gallery/fixtures/map-colorize.dgmo +11 -0
- package/gallery/fixtures/map-direct-color.dgmo +0 -1
- package/gallery/fixtures/map-reference-world.dgmo +11 -0
- package/gallery/fixtures/map-region-scope.dgmo +0 -3
- package/gallery/fixtures/map-route.dgmo +0 -1
- package/package.json +1 -1
- package/src/advanced.ts +12 -1
- package/src/boxes-and-lines/renderer.ts +39 -12
- package/src/cli.ts +1 -1
- package/src/completion.ts +32 -25
- package/src/cycle/renderer.ts +14 -1
- package/src/d3.ts +8 -2
- package/src/editor/highlight-api.ts +4 -0
- package/src/editor/keywords.ts +13 -16
- package/src/infra/renderer.ts +35 -7
- package/src/map/colorize.ts +54 -0
- package/src/map/context-labels.ts +429 -0
- package/src/map/data/types.ts +34 -0
- package/src/map/data/water-bodies.json +1 -0
- package/src/map/dimensions.ts +117 -0
- package/src/map/geo-query.ts +21 -3
- package/src/map/geo.ts +47 -1
- package/src/map/layout.ts +1300 -251
- package/src/map/load-data.ts +10 -2
- package/src/map/parser.ts +42 -116
- package/src/map/renderer.ts +512 -13
- package/src/map/resolved-types.ts +16 -2
- package/src/map/resolver.ts +208 -59
- package/src/map/types.ts +30 -32
- package/src/mindmap/renderer.ts +10 -1
- package/src/palettes/atlas.ts +77 -0
- package/src/palettes/blueprint.ts +73 -0
- package/src/palettes/color-utils.ts +58 -1
- package/src/palettes/index.ts +12 -3
- package/src/palettes/slate.ts +73 -0
- package/src/palettes/tidewater.ts +73 -0
- package/src/render.ts +8 -1
- package/src/tech-radar/renderer.ts +3 -0
- package/src/tech-radar/types.ts +3 -0
- package/src/utils/d3-types.ts +5 -0
- package/src/utils/legend-layout.ts +21 -4
- package/src/utils/legend-types.ts +7 -0
- package/src/utils/reserved-key-registry.ts +3 -0
- package/src/palettes/bold.ts +0 -67
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ dgmo diagram.dgmo --theme dark --palette catppuccin
|
|
|
60
60
|
| Flag | Values | Default |
|
|
61
61
|
|------|--------|---------|
|
|
62
62
|
| `--theme` | `light`, `dark`, `transparent` | `light` |
|
|
63
|
-
| `--palette` | `nord`, `solarized`, `catppuccin`, `rose-pine`, `gruvbox`, `tokyo-night`, `one-dark`, `
|
|
63
|
+
| `--palette` | `nord`, `atlas`, `blueprint`, `slate`, `tidewater`, `solarized`, `catppuccin`, `rose-pine`, `gruvbox`, `tokyo-night`, `one-dark`, `dracula`, `monokai` | `nord` |
|
|
64
64
|
| `-o` | Output file path (`.svg` extension → SVG, otherwise PNG) | `<input>.png` |
|
|
65
65
|
|
|
66
66
|
## Supported chart types
|
|
@@ -473,16 +473,21 @@ Colors can be specified inline as named colors (`red`, `blue`, `teal`, etc.) or
|
|
|
473
473
|
|
|
474
474
|
## Palettes
|
|
475
475
|
|
|
476
|
-
|
|
476
|
+
Thirteen built-in palettes, each with light and dark variants:
|
|
477
477
|
|
|
478
478
|
- `nordPalette` — cool, muted Scandinavian tones (default)
|
|
479
|
+
- `atlasPalette` — vintage classroom-map pastels on warm manila paper
|
|
480
|
+
- `blueprintPalette` — cyanotype engineering drawing (chalk on blueprint blue)
|
|
481
|
+
- `slatePalette` — restrained corporate/BI neutrals with one corporate blue
|
|
482
|
+
- `tidewaterPalette` — nautical maritime-chart (sea-mist, navy ink, brass)
|
|
479
483
|
- `solarizedPalette` — warm/cool Solarized
|
|
480
484
|
- `catppuccinPalette` — modern pastels
|
|
481
485
|
- `rosePinePalette` — soft mauve and rose
|
|
482
486
|
- `gruvboxPalette` — retro groove
|
|
483
487
|
- `tokyoNightPalette` — Tokyo night
|
|
484
488
|
- `oneDarkPalette` — Atom One Dark inspired
|
|
485
|
-
- `
|
|
489
|
+
- `draculaPalette` — Dracula
|
|
490
|
+
- `monokaiPalette` — Monokai
|
|
486
491
|
|
|
487
492
|
```typescript
|
|
488
493
|
import { getPalette, getAvailablePalettes, registerPalette } from '@diagrammo/dgmo';
|
|
@@ -572,7 +577,7 @@ Configure via JSON on the bundle's own `<script>` tag — no inline JS, CSP-frie
|
|
|
572
577
|
| Key | Type | Default | Description |
|
|
573
578
|
|-----|------|---------|-------------|
|
|
574
579
|
| `theme` | `'auto' \| 'light' \| 'dark' \| 'transparent'` | `'auto'` | `'auto'` reads `prefers-color-scheme`, `<html data-theme>`, and `<html class="dark">`; re-renders live when the system preference flips |
|
|
575
|
-
| `palette` | palette id (string) | `'nord'` | Any registered palette: `
|
|
580
|
+
| `palette` | palette id (string) | `'nord'` | Any registered palette: `atlas`, `blueprint`, `catppuccin`, `dracula`, `gruvbox`, `monokai`, `nord`, `one-dark`, `rose-pine`, `slate`, `solarized`, `tidewater`, `tokyo-night` |
|
|
576
581
|
| `showSource` | `boolean` | `true` | Show the collapsible "DGMO source" panel under each diagram |
|
|
577
582
|
| `showEditorLink` | `boolean` | `true` | Include the "Open in editor" button (set `false` for air-gapped intranets) |
|
|
578
583
|
|
|
@@ -858,14 +863,19 @@ src/
|
|
|
858
863
|
├── registry.ts # getPalette, registerPalette
|
|
859
864
|
├── color-utils.ts # HSL conversions, mix(), mute(), tint()
|
|
860
865
|
├── mermaid-bridge.ts # Mermaid CSS variable builder
|
|
861
|
-
├── nord.ts # Nord palette
|
|
866
|
+
├── nord.ts # Nord palette (default)
|
|
867
|
+
├── atlas.ts # Atlas palette
|
|
868
|
+
├── blueprint.ts # Blueprint palette
|
|
869
|
+
├── slate.ts # Slate palette
|
|
870
|
+
├── tidewater.ts # Tidewater palette
|
|
862
871
|
├── solarized.ts # Solarized palette
|
|
863
872
|
├── catppuccin.ts # Catppuccin palette
|
|
864
873
|
├── rose-pine.ts # Rose Pine palette
|
|
865
874
|
├── gruvbox.ts # Gruvbox palette
|
|
866
875
|
├── tokyo-night.ts # Tokyo Night palette
|
|
867
876
|
├── one-dark.ts # One Dark palette
|
|
868
|
-
|
|
877
|
+
├── dracula.ts # Dracula palette
|
|
878
|
+
└── monokai.ts # Monokai palette
|
|
869
879
|
```
|
|
870
880
|
|
|
871
881
|
### Build output
|