@diagrammo/dgmo 0.25.3 → 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 (49) hide show
  1. package/package.json +1 -1
  2. package/src/cli.ts +0 -9
  3. package/src/d3.ts +180 -46
  4. package/src/render.ts +80 -39
  5. package/dist/advanced.cjs +0 -62454
  6. package/dist/advanced.d.cts +0 -5684
  7. package/dist/advanced.d.ts +0 -5684
  8. package/dist/advanced.js +0 -62207
  9. package/dist/auto.cjs +0 -59764
  10. package/dist/auto.css +0 -214
  11. package/dist/auto.d.cts +0 -39
  12. package/dist/auto.d.ts +0 -39
  13. package/dist/auto.js +0 -437
  14. package/dist/auto.mjs +0 -59774
  15. package/dist/cli.cjs +0 -465
  16. package/dist/editor.cjs +0 -432
  17. package/dist/editor.d.cts +0 -26
  18. package/dist/editor.d.ts +0 -26
  19. package/dist/editor.js +0 -401
  20. package/dist/highlight.cjs +0 -720
  21. package/dist/highlight.d.cts +0 -32
  22. package/dist/highlight.d.ts +0 -32
  23. package/dist/highlight.js +0 -690
  24. package/dist/index.cjs +0 -58950
  25. package/dist/index.d.cts +0 -375
  26. package/dist/index.d.ts +0 -375
  27. package/dist/index.js +0 -58954
  28. package/dist/internal.cjs +0 -62456
  29. package/dist/internal.d.cts +0 -5684
  30. package/dist/internal.d.ts +0 -5684
  31. package/dist/internal.js +0 -62207
  32. package/dist/map-data/PROVENANCE.json +0 -1
  33. package/dist/map-data/gazetteer.json +0 -1
  34. package/dist/map-data/lakes.json +0 -1
  35. package/dist/map-data/mountain-ranges.json +0 -1
  36. package/dist/map-data/na-lakes.json +0 -1
  37. package/dist/map-data/na-land.json +0 -1
  38. package/dist/map-data/region-names.json +0 -1
  39. package/dist/map-data/rivers.json +0 -1
  40. package/dist/map-data/us-states.json +0 -1
  41. package/dist/map-data/water-bodies.json +0 -1
  42. package/dist/map-data/world-coarse.json +0 -1
  43. package/dist/map-data/world-detail.json +0 -1
  44. package/dist/pert.cjs +0 -325
  45. package/dist/pert.d.cts +0 -554
  46. package/dist/pert.d.ts +0 -554
  47. package/dist/pert.js +0 -294
  48. package/src/editor/dgmo.grammar.js +0 -18
  49. 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 };