@diagrammo/dgmo 0.25.2 → 0.25.4

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 (51) hide show
  1. package/README.md +69 -884
  2. package/package.json +1 -1
  3. package/src/cli.ts +0 -9
  4. package/src/d3.ts +180 -46
  5. package/src/render.ts +80 -39
  6. package/src/utils/svg-embed.ts +12 -3
  7. package/dist/advanced.cjs +0 -62454
  8. package/dist/advanced.d.cts +0 -5684
  9. package/dist/advanced.d.ts +0 -5684
  10. package/dist/advanced.js +0 -62207
  11. package/dist/auto.cjs +0 -59764
  12. package/dist/auto.css +0 -214
  13. package/dist/auto.d.cts +0 -39
  14. package/dist/auto.d.ts +0 -39
  15. package/dist/auto.js +0 -437
  16. package/dist/auto.mjs +0 -59774
  17. package/dist/cli.cjs +0 -465
  18. package/dist/editor.cjs +0 -432
  19. package/dist/editor.d.cts +0 -26
  20. package/dist/editor.d.ts +0 -26
  21. package/dist/editor.js +0 -401
  22. package/dist/highlight.cjs +0 -720
  23. package/dist/highlight.d.cts +0 -32
  24. package/dist/highlight.d.ts +0 -32
  25. package/dist/highlight.js +0 -690
  26. package/dist/index.cjs +0 -58947
  27. package/dist/index.d.cts +0 -375
  28. package/dist/index.d.ts +0 -375
  29. package/dist/index.js +0 -58951
  30. package/dist/internal.cjs +0 -62456
  31. package/dist/internal.d.cts +0 -5684
  32. package/dist/internal.d.ts +0 -5684
  33. package/dist/internal.js +0 -62207
  34. package/dist/map-data/PROVENANCE.json +0 -1
  35. package/dist/map-data/gazetteer.json +0 -1
  36. package/dist/map-data/lakes.json +0 -1
  37. package/dist/map-data/mountain-ranges.json +0 -1
  38. package/dist/map-data/na-lakes.json +0 -1
  39. package/dist/map-data/na-land.json +0 -1
  40. package/dist/map-data/region-names.json +0 -1
  41. package/dist/map-data/rivers.json +0 -1
  42. package/dist/map-data/us-states.json +0 -1
  43. package/dist/map-data/water-bodies.json +0 -1
  44. package/dist/map-data/world-coarse.json +0 -1
  45. package/dist/map-data/world-detail.json +0 -1
  46. package/dist/pert.cjs +0 -325
  47. package/dist/pert.d.cts +0 -554
  48. package/dist/pert.d.ts +0 -554
  49. package/dist/pert.js +0 -294
  50. package/src/editor/dgmo.grammar.js +0 -18
  51. package/src/editor/dgmo.grammar.terms.js +0 -35
@@ -1,32 +0,0 @@
1
- /**
2
- * Standalone DGMO syntax highlighter — no CodeMirror dependency.
3
- *
4
- * Exports:
5
- * - `highlightDgmo(source)` → `HighlightToken[]` (consumer-agnostic)
6
- * - `NORD_ROLE_STYLES` — inline style objects keyed by role (for React/Astro)
7
- * - `ROLE_TO_ANSI` — ANSI escape codes keyed by role (for CLI)
8
- *
9
- * Uses the raw Lezer parser directly — keyword specialization is wired into
10
- * the grammar, so `parser.parse()` runs it automatically.
11
- *
12
- * @module @diagrammo/dgmo/highlight
13
- */
14
- interface HighlightToken {
15
- text: string;
16
- role: string;
17
- }
18
- /**
19
- * Tokenize DGMO source into annotated highlight spans.
20
- *
21
- * Guarantees lossless round-trip:
22
- * `highlightDgmo(src).map(t => t.text).join('') === src`
23
- */
24
- declare function highlightDgmo(source: string): HighlightToken[];
25
- declare const NORD_ROLE_STYLES: Record<string, Record<string, string>>;
26
- declare const ROLE_TO_ANSI: Record<string, string>;
27
- /**
28
- * Render highlighted tokens to an ANSI string for terminal display.
29
- */
30
- declare function renderAnsi(tokens: HighlightToken[], useColor: boolean): string;
31
-
32
- export { type HighlightToken, NORD_ROLE_STYLES, ROLE_TO_ANSI, highlightDgmo, renderAnsi };
@@ -1,32 +0,0 @@
1
- /**
2
- * Standalone DGMO syntax highlighter — no CodeMirror dependency.
3
- *
4
- * Exports:
5
- * - `highlightDgmo(source)` → `HighlightToken[]` (consumer-agnostic)
6
- * - `NORD_ROLE_STYLES` — inline style objects keyed by role (for React/Astro)
7
- * - `ROLE_TO_ANSI` — ANSI escape codes keyed by role (for CLI)
8
- *
9
- * Uses the raw Lezer parser directly — keyword specialization is wired into
10
- * the grammar, so `parser.parse()` runs it automatically.
11
- *
12
- * @module @diagrammo/dgmo/highlight
13
- */
14
- interface HighlightToken {
15
- text: string;
16
- role: string;
17
- }
18
- /**
19
- * Tokenize DGMO source into annotated highlight spans.
20
- *
21
- * Guarantees lossless round-trip:
22
- * `highlightDgmo(src).map(t => t.text).join('') === src`
23
- */
24
- declare function highlightDgmo(source: string): HighlightToken[];
25
- declare const NORD_ROLE_STYLES: Record<string, Record<string, string>>;
26
- declare const ROLE_TO_ANSI: Record<string, string>;
27
- /**
28
- * Render highlighted tokens to an ANSI string for terminal display.
29
- */
30
- declare function renderAnsi(tokens: HighlightToken[], useColor: boolean): string;
31
-
32
- export { type HighlightToken, NORD_ROLE_STYLES, ROLE_TO_ANSI, highlightDgmo, renderAnsi };