@diagrammo/dgmo 0.8.2 → 0.8.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 (120) hide show
  1. package/.claude/commands/dgmo-diagram-this.md +60 -0
  2. package/.claude/commands/dgmo-document-project.md +128 -0
  3. package/.claude/commands/dgmo.md +185 -50
  4. package/.cursorrules +32 -37
  5. package/.github/copilot-instructions.md +35 -44
  6. package/.windsurfrules +32 -37
  7. package/README.md +4 -4
  8. package/dist/cli.cjs +189 -194
  9. package/dist/editor.cjs +336 -0
  10. package/dist/editor.cjs.map +1 -0
  11. package/dist/editor.d.cts +27 -0
  12. package/dist/editor.d.ts +27 -0
  13. package/dist/editor.js +305 -0
  14. package/dist/editor.js.map +1 -0
  15. package/dist/index.cjs +3699 -1564
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +7 -6
  18. package/dist/index.d.ts +7 -6
  19. package/dist/index.js +3699 -1564
  20. package/dist/index.js.map +1 -1
  21. package/docs/language-reference.md +822 -1060
  22. package/gallery/fixtures/arc.dgmo +18 -0
  23. package/gallery/fixtures/area.dgmo +19 -0
  24. package/gallery/fixtures/bar-stacked.dgmo +10 -0
  25. package/gallery/fixtures/bar.dgmo +10 -0
  26. package/gallery/fixtures/c4-full.dgmo +52 -0
  27. package/gallery/fixtures/c4.dgmo +17 -0
  28. package/gallery/fixtures/chord.dgmo +12 -0
  29. package/gallery/fixtures/class-basic.dgmo +14 -0
  30. package/gallery/fixtures/class-full.dgmo +43 -0
  31. package/gallery/fixtures/doughnut.dgmo +8 -0
  32. package/gallery/fixtures/flowchart-basic.dgmo +3 -0
  33. package/gallery/fixtures/flowchart-colors.dgmo +5 -0
  34. package/gallery/fixtures/flowchart-complex.dgmo +17 -0
  35. package/gallery/fixtures/flowchart-decision.dgmo +5 -0
  36. package/gallery/fixtures/flowchart-full.dgmo +13 -0
  37. package/gallery/fixtures/flowchart-groups.dgmo +10 -0
  38. package/gallery/fixtures/flowchart-loop.dgmo +7 -0
  39. package/gallery/fixtures/flowchart-nested.dgmo +7 -0
  40. package/gallery/fixtures/flowchart-shapes.dgmo +5 -0
  41. package/gallery/fixtures/function.dgmo +8 -0
  42. package/gallery/fixtures/funnel.dgmo +7 -0
  43. package/gallery/fixtures/gantt-full.dgmo +49 -0
  44. package/gallery/fixtures/gantt.dgmo +42 -0
  45. package/gallery/fixtures/heatmap.dgmo +8 -0
  46. package/gallery/fixtures/infra-full.dgmo +78 -0
  47. package/gallery/fixtures/infra-overload.dgmo +25 -0
  48. package/gallery/fixtures/infra.dgmo +47 -0
  49. package/gallery/fixtures/initiative-status-full.dgmo +46 -0
  50. package/gallery/fixtures/initiative-status-phases.dgmo +29 -0
  51. package/gallery/fixtures/initiative-status.dgmo +9 -0
  52. package/gallery/fixtures/line.dgmo +19 -0
  53. package/gallery/fixtures/multi-line.dgmo +11 -0
  54. package/gallery/fixtures/org-basic.dgmo +16 -0
  55. package/gallery/fixtures/org-full.dgmo +69 -0
  56. package/gallery/fixtures/org-teams.dgmo +25 -0
  57. package/gallery/fixtures/pie.dgmo +9 -0
  58. package/gallery/fixtures/polar-area.dgmo +8 -0
  59. package/gallery/fixtures/quadrant.dgmo +18 -0
  60. package/gallery/fixtures/radar.dgmo +8 -0
  61. package/gallery/fixtures/sankey.dgmo +31 -0
  62. package/gallery/fixtures/scatter.dgmo +21 -0
  63. package/gallery/fixtures/sequence-tags-protocols.dgmo +45 -0
  64. package/gallery/fixtures/sequence-tags.dgmo +41 -0
  65. package/gallery/fixtures/sequence.dgmo +35 -0
  66. package/gallery/fixtures/sitemap-basic.dgmo +12 -0
  67. package/gallery/fixtures/sitemap-full.dgmo +156 -0
  68. package/gallery/fixtures/slope.dgmo +8 -0
  69. package/gallery/fixtures/spr-eras.dgmo +62 -0
  70. package/gallery/fixtures/state.dgmo +30 -0
  71. package/gallery/fixtures/timeline-intraday.dgmo +14 -0
  72. package/gallery/fixtures/timeline.dgmo +32 -0
  73. package/gallery/fixtures/venn.dgmo +10 -0
  74. package/gallery/fixtures/wordcloud.dgmo +24 -0
  75. package/package.json +51 -2
  76. package/src/c4/layout.ts +372 -90
  77. package/src/c4/parser.ts +113 -62
  78. package/src/chart.ts +149 -64
  79. package/src/class/parser.ts +84 -28
  80. package/src/class/renderer.ts +2 -2
  81. package/src/cli.ts +179 -77
  82. package/src/completion.ts +381 -182
  83. package/src/d3.ts +1026 -428
  84. package/src/dgmo-mermaid.ts +16 -13
  85. package/src/dgmo-router.ts +70 -24
  86. package/src/echarts.ts +682 -169
  87. package/src/editor/dgmo.grammar +69 -0
  88. package/src/editor/dgmo.grammar.d.ts +2 -0
  89. package/src/editor/dgmo.grammar.js +18 -0
  90. package/src/editor/dgmo.grammar.terms.d.ts +5 -0
  91. package/src/editor/dgmo.grammar.terms.js +35 -0
  92. package/src/editor/highlight.ts +36 -0
  93. package/src/editor/index.ts +28 -0
  94. package/src/editor/keywords.ts +220 -0
  95. package/src/editor/tokens.ts +30 -0
  96. package/src/er/parser.ts +55 -29
  97. package/src/er/renderer.ts +112 -53
  98. package/src/gantt/calculator.ts +91 -29
  99. package/src/gantt/parser.ts +291 -97
  100. package/src/gantt/renderer.ts +1120 -350
  101. package/src/graph/flowchart-parser.ts +48 -75
  102. package/src/graph/state-parser.ts +54 -27
  103. package/src/infra/parser.ts +161 -177
  104. package/src/infra/renderer.ts +723 -271
  105. package/src/infra/types.ts +0 -1
  106. package/src/initiative-status/parser.ts +144 -56
  107. package/src/kanban/parser.ts +27 -19
  108. package/src/org/layout.ts +111 -44
  109. package/src/org/parser.ts +71 -27
  110. package/src/org/resolver.ts +3 -3
  111. package/src/palettes/index.ts +3 -2
  112. package/src/render.ts +1 -2
  113. package/src/sequence/parser.ts +209 -100
  114. package/src/sitemap/parser.ts +73 -44
  115. package/src/utils/arrows.ts +2 -22
  116. package/src/utils/duration.ts +39 -21
  117. package/src/utils/legend-constants.ts +0 -2
  118. package/src/utils/parsing.ts +82 -72
  119. package/src/utils/tag-groups.ts +4 -41
  120. package/src/infra/serialize.ts +0 -67
@@ -0,0 +1,24 @@
1
+ wordcloud Tech Conference Topics
2
+
3
+ Kubernetes 95
4
+ Machine Learning 88
5
+ Microservices 72
6
+ DevOps 68
7
+ Serverless 55
8
+ GraphQL 48
9
+ TypeScript 82
10
+ Rust 62
11
+ WebAssembly 45
12
+ Edge Computing 38
13
+ Observability 52
14
+ Platform Engineering 60
15
+ AI Agents 90
16
+ LLM 85
17
+ RAG 70
18
+ Vector Database 58
19
+ Terraform 42
20
+ Docker 65
21
+ GitOps 35
22
+ Zero Trust 30
23
+ Service Mesh 28
24
+ eBPF 25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagrammo/dgmo",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "DGMO diagram markup language — parser, renderer, and color system",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,12 +20,23 @@
20
20
  "types": "./dist/index.d.cts",
21
21
  "default": "./dist/index.cjs"
22
22
  }
23
+ },
24
+ "./editor": {
25
+ "import": {
26
+ "types": "./dist/editor.d.ts",
27
+ "default": "./dist/editor.js"
28
+ },
29
+ "require": {
30
+ "types": "./dist/editor.d.cts",
31
+ "default": "./dist/editor.cjs"
32
+ }
23
33
  }
24
34
  },
25
35
  "files": [
26
36
  "dist",
27
37
  "src",
28
38
  "docs",
39
+ "gallery/fixtures",
29
40
  ".claude/commands",
30
41
  ".github/copilot-instructions.md",
31
42
  ".cursorrules",
@@ -34,15 +45,23 @@
34
45
  ],
35
46
  "sideEffects": false,
36
47
  "scripts": {
48
+ "prebuild": "rm -rf dist && lezer-generator src/editor/dgmo.grammar -o src/editor/dgmo.grammar.js",
37
49
  "build": "tsup",
38
50
  "typecheck": "tsc --noEmit",
39
51
  "dev": "tsup --watch",
40
52
  "test": "vitest run",
41
53
  "test:watch": "vitest",
42
54
  "gallery": "pnpm build && node scripts/generate-gallery.mjs",
55
+ "lint": "eslint .",
56
+ "lint:fix": "eslint . --fix",
57
+ "format": "prettier --write src/",
58
+ "format:check": "prettier --check src/",
43
59
  "check:duplication": "jscpd ./src",
44
60
  "check:deadcode": "knip",
45
- "postinstall": "node -e \"console.log('\\nšŸ’” Claude Code user? Run: dgmo --install-claude-skill\\n')\""
61
+ "check:spelling": "cspell \"src/**/*.ts\" \"tests/**/*.ts\"",
62
+ "check:size": "pnpm build && du -sh dist/ && echo '---' && ls -lh dist/*.js dist/*.cjs",
63
+ "postinstall": "node -e \"console.log('\\nšŸ’” Claude Code user? Run: dgmo --install-claude-skill\\n')\"",
64
+ "prepare": "husky"
46
65
  },
47
66
  "dependencies": {
48
67
  "@dagrejs/dagre": "^2.0.4",
@@ -60,6 +79,10 @@
60
79
  "jsdom": "^28.1.0"
61
80
  },
62
81
  "devDependencies": {
82
+ "@codemirror/language": "^6.12.3",
83
+ "@codemirror/state": "^6.6.0",
84
+ "@eslint/js": "^10.0.1",
85
+ "@lezer/generator": "^1.8.0",
63
86
  "@types/d3-array": "^3.2.1",
64
87
  "@types/d3-cloud": "^1.2.9",
65
88
  "@types/d3-hierarchy": "^3.1.7",
@@ -67,10 +90,36 @@
67
90
  "@types/d3-selection": "^3.0.11",
68
91
  "@types/d3-shape": "^3.1.7",
69
92
  "@types/jsdom": "^28.0.0",
93
+ "cspell": "^9.7.0",
94
+ "eslint": "^10.1.0",
95
+ "husky": "^9.1.7",
70
96
  "jscpd": "^4.0.8",
71
97
  "knip": "^6.0.1",
98
+ "lint-staged": "^16.4.0",
99
+ "prettier": "^3.8.1",
72
100
  "tsup": "^8.5.1",
73
101
  "typescript": "^5.7.3",
102
+ "typescript-eslint": "^8.57.2",
74
103
  "vitest": "^4.0.18"
104
+ },
105
+ "lint-staged": {
106
+ "*.ts": [
107
+ "eslint --fix",
108
+ "prettier --write"
109
+ ]
110
+ },
111
+ "peerDependencies": {
112
+ "@codemirror/language": "^6.12.3",
113
+ "@codemirror/state": "^6.6.0",
114
+ "@lezer/common": "^1.5.1",
115
+ "@lezer/highlight": "^1.2.3",
116
+ "@lezer/lr": "^1.4.8"
117
+ },
118
+ "peerDependenciesMeta": {
119
+ "@codemirror/language": { "optional": true },
120
+ "@codemirror/state": { "optional": true },
121
+ "@lezer/common": { "optional": true },
122
+ "@lezer/highlight": { "optional": true },
123
+ "@lezer/lr": { "optional": true }
75
124
  }
76
125
  }