@diagrammo/dgmo 0.8.3 → 0.8.5
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/.claude/commands/dgmo-diagram-this.md +60 -0
- package/.claude/commands/dgmo-document-project.md +128 -0
- package/.claude/commands/dgmo.md +452 -50
- package/.cursorrules +32 -37
- package/.github/copilot-instructions.md +35 -44
- package/.windsurfrules +32 -37
- package/README.md +4 -4
- package/dist/cli.cjs +188 -185
- package/dist/editor.cjs +338 -0
- package/dist/editor.cjs.map +1 -0
- package/dist/editor.d.cts +27 -0
- package/dist/editor.d.ts +27 -0
- package/dist/editor.js +307 -0
- package/dist/editor.js.map +1 -0
- package/dist/highlight.cjs +560 -0
- package/dist/highlight.cjs.map +1 -0
- package/dist/highlight.d.cts +32 -0
- package/dist/highlight.d.ts +32 -0
- package/dist/highlight.js +530 -0
- package/dist/highlight.js.map +1 -0
- package/dist/index.cjs +3467 -1078
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +3466 -1078
- package/dist/index.js.map +1 -1
- package/docs/language-reference.md +46 -37
- package/gallery/fixtures/arc.dgmo +18 -0
- package/gallery/fixtures/area.dgmo +19 -0
- package/gallery/fixtures/bar-stacked.dgmo +10 -0
- package/gallery/fixtures/bar.dgmo +10 -0
- package/gallery/fixtures/c4-full.dgmo +52 -0
- package/gallery/fixtures/c4.dgmo +17 -0
- package/gallery/fixtures/chord.dgmo +12 -0
- package/gallery/fixtures/class-basic.dgmo +14 -0
- package/gallery/fixtures/class-full.dgmo +43 -0
- package/gallery/fixtures/doughnut.dgmo +8 -0
- package/gallery/fixtures/flowchart-basic.dgmo +3 -0
- package/gallery/fixtures/flowchart-colors.dgmo +5 -0
- package/gallery/fixtures/flowchart-complex.dgmo +17 -0
- package/gallery/fixtures/flowchart-decision.dgmo +5 -0
- package/gallery/fixtures/flowchart-full.dgmo +13 -0
- package/gallery/fixtures/flowchart-groups.dgmo +10 -0
- package/gallery/fixtures/flowchart-loop.dgmo +7 -0
- package/gallery/fixtures/flowchart-nested.dgmo +7 -0
- package/gallery/fixtures/flowchart-shapes.dgmo +5 -0
- package/gallery/fixtures/function.dgmo +8 -0
- package/gallery/fixtures/funnel.dgmo +7 -0
- package/gallery/fixtures/gantt-full.dgmo +49 -0
- package/gallery/fixtures/gantt.dgmo +42 -0
- package/gallery/fixtures/heatmap.dgmo +8 -0
- package/gallery/fixtures/infra-full.dgmo +78 -0
- package/gallery/fixtures/infra-overload.dgmo +25 -0
- package/gallery/fixtures/infra.dgmo +47 -0
- package/gallery/fixtures/initiative-status-full.dgmo +46 -0
- package/gallery/fixtures/initiative-status-phases.dgmo +29 -0
- package/gallery/fixtures/initiative-status.dgmo +9 -0
- package/gallery/fixtures/line.dgmo +19 -0
- package/gallery/fixtures/multi-line.dgmo +11 -0
- package/gallery/fixtures/org-basic.dgmo +16 -0
- package/gallery/fixtures/org-full.dgmo +69 -0
- package/gallery/fixtures/org-teams.dgmo +25 -0
- package/gallery/fixtures/pie.dgmo +9 -0
- package/gallery/fixtures/polar-area.dgmo +8 -0
- package/gallery/fixtures/quadrant.dgmo +18 -0
- package/gallery/fixtures/radar.dgmo +8 -0
- package/gallery/fixtures/sankey.dgmo +31 -0
- package/gallery/fixtures/scatter.dgmo +21 -0
- package/gallery/fixtures/sequence-tags-protocols.dgmo +45 -0
- package/gallery/fixtures/sequence-tags.dgmo +41 -0
- package/gallery/fixtures/sequence.dgmo +35 -0
- package/gallery/fixtures/sitemap-basic.dgmo +12 -0
- package/gallery/fixtures/sitemap-full.dgmo +156 -0
- package/gallery/fixtures/slope.dgmo +9 -0
- package/gallery/fixtures/spr-eras.dgmo +62 -0
- package/gallery/fixtures/state.dgmo +30 -0
- package/gallery/fixtures/timeline-intraday.dgmo +14 -0
- package/gallery/fixtures/timeline.dgmo +32 -0
- package/gallery/fixtures/venn.dgmo +10 -0
- package/gallery/fixtures/wordcloud.dgmo +24 -0
- package/package.json +71 -2
- package/src/c4/layout.ts +372 -90
- package/src/c4/parser.ts +100 -55
- package/src/chart.ts +91 -28
- package/src/class/parser.ts +41 -12
- package/src/cli.ts +211 -62
- package/src/completion.ts +378 -183
- package/src/d3.ts +1044 -303
- package/src/dgmo-mermaid.ts +16 -13
- package/src/dgmo-router.ts +69 -23
- package/src/echarts.ts +646 -153
- package/src/editor/dgmo.grammar +69 -0
- package/src/editor/dgmo.grammar.d.ts +2 -0
- package/src/editor/dgmo.grammar.js +18 -0
- package/src/editor/dgmo.grammar.terms.d.ts +5 -0
- package/src/editor/dgmo.grammar.terms.js +35 -0
- package/src/editor/highlight-api.ts +444 -0
- package/src/editor/highlight.ts +36 -0
- package/src/editor/index.ts +28 -0
- package/src/editor/keywords.ts +222 -0
- package/src/editor/tokens.ts +30 -0
- package/src/er/parser.ts +48 -14
- package/src/er/renderer.ts +112 -53
- package/src/gantt/calculator.ts +91 -29
- package/src/gantt/parser.ts +197 -71
- package/src/gantt/renderer.ts +1120 -350
- package/src/graph/flowchart-parser.ts +46 -25
- package/src/graph/state-parser.ts +47 -17
- package/src/index.ts +96 -31
- package/src/infra/parser.ts +157 -53
- package/src/infra/renderer.ts +723 -271
- package/src/initiative-status/parser.ts +138 -44
- package/src/kanban/parser.ts +25 -14
- package/src/org/layout.ts +111 -44
- package/src/org/parser.ts +69 -22
- package/src/palettes/index.ts +3 -2
- package/src/sequence/parser.ts +193 -61
- package/src/sitemap/parser.ts +65 -29
- package/src/utils/arrows.ts +2 -22
- package/src/utils/duration.ts +39 -21
- package/src/utils/legend-constants.ts +0 -2
- package/src/utils/parsing.ts +75 -31
package/dist/editor.cjs
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/editor/index.ts
|
|
21
|
+
var editor_exports = {};
|
|
22
|
+
__export(editor_exports, {
|
|
23
|
+
CHART_TYPES: () => CHART_TYPES,
|
|
24
|
+
METADATA_KEYS: () => METADATA_KEYS,
|
|
25
|
+
dgmoExtension: () => dgmoExtension,
|
|
26
|
+
dgmoHighlighting: () => dgmoHighlighting,
|
|
27
|
+
dgmoLanguage: () => dgmoLanguage,
|
|
28
|
+
dgmoLanguageSupport: () => dgmoLanguageSupport,
|
|
29
|
+
dgmoParser: () => dgmoParser
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(editor_exports);
|
|
32
|
+
var import_language = require("@codemirror/language");
|
|
33
|
+
|
|
34
|
+
// src/editor/dgmo.grammar.js
|
|
35
|
+
var import_lr = require("@lezer/lr");
|
|
36
|
+
|
|
37
|
+
// src/editor/dgmo.grammar.terms.js
|
|
38
|
+
var ChartType = 1;
|
|
39
|
+
var TagKeyword = 2;
|
|
40
|
+
var DirectiveKeyword = 3;
|
|
41
|
+
var ControlKeyword = 4;
|
|
42
|
+
var ModifierKeyword = 5;
|
|
43
|
+
|
|
44
|
+
// src/editor/keywords.ts
|
|
45
|
+
var CHART_TYPES = /* @__PURE__ */ new Set([
|
|
46
|
+
// Diagram types
|
|
47
|
+
"sequence",
|
|
48
|
+
"flowchart",
|
|
49
|
+
"class",
|
|
50
|
+
"er",
|
|
51
|
+
"org",
|
|
52
|
+
"kanban",
|
|
53
|
+
"c4",
|
|
54
|
+
"initiative-status",
|
|
55
|
+
"state",
|
|
56
|
+
"sitemap",
|
|
57
|
+
"infra",
|
|
58
|
+
"gantt",
|
|
59
|
+
// Data chart types
|
|
60
|
+
"bar",
|
|
61
|
+
"line",
|
|
62
|
+
"pie",
|
|
63
|
+
"doughnut",
|
|
64
|
+
"area",
|
|
65
|
+
"polar-area",
|
|
66
|
+
"radar",
|
|
67
|
+
"bar-stacked",
|
|
68
|
+
"multi-line",
|
|
69
|
+
"scatter",
|
|
70
|
+
"sankey",
|
|
71
|
+
"chord",
|
|
72
|
+
"function",
|
|
73
|
+
"heatmap",
|
|
74
|
+
"funnel",
|
|
75
|
+
// Visualization types
|
|
76
|
+
"slope",
|
|
77
|
+
"wordcloud",
|
|
78
|
+
"arc",
|
|
79
|
+
"timeline",
|
|
80
|
+
"venn",
|
|
81
|
+
"quadrant"
|
|
82
|
+
]);
|
|
83
|
+
var METADATA_KEYS = /* @__PURE__ */ new Set([
|
|
84
|
+
"title",
|
|
85
|
+
"series",
|
|
86
|
+
"orientation",
|
|
87
|
+
"x-label",
|
|
88
|
+
"y-label",
|
|
89
|
+
"size-label",
|
|
90
|
+
"x",
|
|
91
|
+
"columns",
|
|
92
|
+
"rows",
|
|
93
|
+
"labels",
|
|
94
|
+
"rotate",
|
|
95
|
+
"max",
|
|
96
|
+
"size",
|
|
97
|
+
"order",
|
|
98
|
+
"sort",
|
|
99
|
+
"scale",
|
|
100
|
+
"values",
|
|
101
|
+
"notation",
|
|
102
|
+
"x-axis",
|
|
103
|
+
"y-axis",
|
|
104
|
+
"top-right",
|
|
105
|
+
"top-left",
|
|
106
|
+
"bottom-right",
|
|
107
|
+
"bottom-left"
|
|
108
|
+
]);
|
|
109
|
+
var TAG_KEYWORD = "tag";
|
|
110
|
+
var DIRECTIVE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
111
|
+
// Gantt
|
|
112
|
+
"start",
|
|
113
|
+
"era",
|
|
114
|
+
"marker",
|
|
115
|
+
"holiday",
|
|
116
|
+
"workweek",
|
|
117
|
+
"today-marker",
|
|
118
|
+
"critical-path",
|
|
119
|
+
"no-dependencies",
|
|
120
|
+
"sort",
|
|
121
|
+
// Tags
|
|
122
|
+
"tags",
|
|
123
|
+
"import",
|
|
124
|
+
"active-tag",
|
|
125
|
+
"hide",
|
|
126
|
+
// ER
|
|
127
|
+
"notation",
|
|
128
|
+
// Class
|
|
129
|
+
"extends",
|
|
130
|
+
"implements",
|
|
131
|
+
"abstract",
|
|
132
|
+
"interface",
|
|
133
|
+
"enum",
|
|
134
|
+
// C4
|
|
135
|
+
"containers",
|
|
136
|
+
"components",
|
|
137
|
+
"deployment",
|
|
138
|
+
// Infra directives
|
|
139
|
+
"sub-node-label",
|
|
140
|
+
"show-sub-node-count",
|
|
141
|
+
"no-auto-color",
|
|
142
|
+
// Infra node properties
|
|
143
|
+
"description",
|
|
144
|
+
"instances",
|
|
145
|
+
"max-rps",
|
|
146
|
+
"latency-ms",
|
|
147
|
+
"uptime",
|
|
148
|
+
"firewall-block",
|
|
149
|
+
"ratelimit-rps",
|
|
150
|
+
"cb-error-threshold",
|
|
151
|
+
"cb-latency-threshold-ms",
|
|
152
|
+
"buffer",
|
|
153
|
+
"drain-rate",
|
|
154
|
+
"retention-hours",
|
|
155
|
+
"partitions",
|
|
156
|
+
"split",
|
|
157
|
+
"slo-p90-latency-ms",
|
|
158
|
+
"slo-availability",
|
|
159
|
+
"cache-hit",
|
|
160
|
+
"concurrency",
|
|
161
|
+
"duration-ms",
|
|
162
|
+
"cold-start-ms",
|
|
163
|
+
"rps",
|
|
164
|
+
// Sequence
|
|
165
|
+
"activations",
|
|
166
|
+
"no-activations",
|
|
167
|
+
"collapse-notes",
|
|
168
|
+
"no-collapse-notes",
|
|
169
|
+
// Data charts
|
|
170
|
+
"stacked",
|
|
171
|
+
"no-label-name",
|
|
172
|
+
"no-label-value",
|
|
173
|
+
"no-label-percent",
|
|
174
|
+
// Slope
|
|
175
|
+
"period",
|
|
176
|
+
// Quadrant
|
|
177
|
+
"x-axis",
|
|
178
|
+
"y-axis",
|
|
179
|
+
"top-right",
|
|
180
|
+
"top-left",
|
|
181
|
+
"bottom-right",
|
|
182
|
+
"bottom-left",
|
|
183
|
+
// Layout
|
|
184
|
+
"direction-tb",
|
|
185
|
+
"direction-lr",
|
|
186
|
+
// Initiative-status
|
|
187
|
+
"contains",
|
|
188
|
+
// Data chart metadata
|
|
189
|
+
"title",
|
|
190
|
+
"series",
|
|
191
|
+
"orientation",
|
|
192
|
+
"x-label",
|
|
193
|
+
"y-label",
|
|
194
|
+
"size-label",
|
|
195
|
+
"columns",
|
|
196
|
+
"rows",
|
|
197
|
+
"labels",
|
|
198
|
+
"rotate",
|
|
199
|
+
"scale",
|
|
200
|
+
"values"
|
|
201
|
+
]);
|
|
202
|
+
var CONTROL_KEYWORDS = /* @__PURE__ */ new Set([
|
|
203
|
+
"if",
|
|
204
|
+
"else",
|
|
205
|
+
"loop",
|
|
206
|
+
"parallel",
|
|
207
|
+
"note"
|
|
208
|
+
]);
|
|
209
|
+
var STATUS_KEYWORDS = /* @__PURE__ */ new Set([
|
|
210
|
+
"na",
|
|
211
|
+
"todo",
|
|
212
|
+
"wip",
|
|
213
|
+
"done",
|
|
214
|
+
"blocked",
|
|
215
|
+
"in-progress",
|
|
216
|
+
"backlog",
|
|
217
|
+
"ready"
|
|
218
|
+
]);
|
|
219
|
+
var MODIFIER_KEYWORDS = /* @__PURE__ */ new Set([
|
|
220
|
+
"alias",
|
|
221
|
+
"aka",
|
|
222
|
+
"position",
|
|
223
|
+
"default",
|
|
224
|
+
// Sequence participant types
|
|
225
|
+
"actor",
|
|
226
|
+
"service",
|
|
227
|
+
"database",
|
|
228
|
+
"queue",
|
|
229
|
+
"cache",
|
|
230
|
+
"gateway",
|
|
231
|
+
"external",
|
|
232
|
+
"networking",
|
|
233
|
+
"frontend",
|
|
234
|
+
// C4 element types
|
|
235
|
+
"system",
|
|
236
|
+
"person",
|
|
237
|
+
"container",
|
|
238
|
+
"component",
|
|
239
|
+
// ER column modifiers
|
|
240
|
+
"pk",
|
|
241
|
+
"fk",
|
|
242
|
+
"nullable",
|
|
243
|
+
"unique",
|
|
244
|
+
// ER data types
|
|
245
|
+
"int",
|
|
246
|
+
"varchar",
|
|
247
|
+
"text",
|
|
248
|
+
"boolean",
|
|
249
|
+
"date",
|
|
250
|
+
"timestamp",
|
|
251
|
+
"float",
|
|
252
|
+
"decimal"
|
|
253
|
+
]);
|
|
254
|
+
|
|
255
|
+
// src/editor/tokens.ts
|
|
256
|
+
function specializeKeyword(value) {
|
|
257
|
+
if (CHART_TYPES.has(value)) return ChartType;
|
|
258
|
+
if (value === TAG_KEYWORD) return TagKeyword;
|
|
259
|
+
if (DIRECTIVE_KEYWORDS.has(value)) return DirectiveKeyword;
|
|
260
|
+
if (CONTROL_KEYWORDS.has(value)) return ControlKeyword;
|
|
261
|
+
if (STATUS_KEYWORDS.has(value)) return ModifierKeyword;
|
|
262
|
+
if (MODIFIER_KEYWORDS.has(value)) return ModifierKeyword;
|
|
263
|
+
return -1;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// src/editor/dgmo.grammar.js
|
|
267
|
+
var parser = import_lr.LRParser.deserialize({
|
|
268
|
+
version: 14,
|
|
269
|
+
states: "!WQVQPOOOOQO'#DU'#DUOOQO'#DP'#DPO%]QPO'#CdOOQO'#DO'#DOQVQPOOOOQO-E6}-E6}OOQO,59O,59OOOQO-E6|-E6|",
|
|
270
|
+
stateData: "&Q~OvOS~OPPOQPORPOSPOTPOVSOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOwSO~OPPOQPORPOSPOTPOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPO~OwVO~P#]OVXYZ[]^_`ghijklmnoabcdefpqk~",
|
|
271
|
+
goto: "!byPPPPPPPPzPPPPPPPPPPPPPPPPPPPPPPPPP!O!UPPPP!]TSOTQTORWTSROTRURVQORT",
|
|
272
|
+
nodeNames: "\u26A0 ChartType TagKeyword DirectiveKeyword ControlKeyword ModifierKeyword Document Comment ContentLine SyncArrow AsyncArrow Duration DateLiteral Percentage Number SectionMarker Url OpenBracket CloseBracket OpenParen CloseParen OpenAngle CloseAngle ColorAnnotation Pipe Colon Comma Plus Dash Tilde Star Question Identifier Punct",
|
|
273
|
+
maxTerm: 40,
|
|
274
|
+
skippedNodes: [0],
|
|
275
|
+
repeatNodeCount: 2,
|
|
276
|
+
tokenData: "9q~RxOX#oXY#tYZ$PZp#opq#tqt#oux#oxy$Uyz$tz{${{|%S|}%Z}!O%b!O!P#o!P!Q%q!Q![&b![!],v!]!^#o!^!_,}!_!`-U!`!a-c!a!b-j!b!c#o!c!}-q!}#O0w#O#P#o#P#Q0|#Q#R#o#R#S-q#S#T#o#T#[-q#[#]1T#]#o-q#o#p#o#p#q9T#q#r#o#r#s9[#s;'S#o;'S;=`9k<%lO#o~#tOq~~#yQv~XY#tpq#t~$UOw~~$]Qc~q~}!O$c#T#o$c~$fRyz$o}!O$c#T#o$c~$tOg~~${Od~q~~%SOn~q~~%ZOk~q~~%bOj~q~~%iPl~q~!`!a%l~%qOX~~%vPq~!P!Q%y~&OSV~OY%yZ;'S%y;'S;=`&[<%lO%y~&_P;=`<%l%y~&iY^~q~uv'X!O!P'^!QPY^~uv'X!O!P'^!QtY^~uv'X!O!P'^!Q => specializeKeyword(value, stack) << 1, external: specializeKeyword }],
|
|
280
|
+
tokenPrec: 204
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// src/editor/highlight.ts
|
|
284
|
+
var import_highlight = require("@lezer/highlight");
|
|
285
|
+
var dgmoHighlighting = (0, import_highlight.styleTags)({
|
|
286
|
+
Comment: import_highlight.tags.lineComment,
|
|
287
|
+
ChartType: import_highlight.tags.typeName,
|
|
288
|
+
TagKeyword: import_highlight.tags.definitionKeyword,
|
|
289
|
+
DirectiveKeyword: import_highlight.tags.keyword,
|
|
290
|
+
ControlKeyword: import_highlight.tags.controlKeyword,
|
|
291
|
+
ModifierKeyword: import_highlight.tags.modifier,
|
|
292
|
+
SyncArrow: import_highlight.tags.operator,
|
|
293
|
+
AsyncArrow: import_highlight.tags.operator,
|
|
294
|
+
Duration: import_highlight.tags.number,
|
|
295
|
+
DateLiteral: import_highlight.tags.number,
|
|
296
|
+
Number: import_highlight.tags.number,
|
|
297
|
+
Percentage: import_highlight.tags.number,
|
|
298
|
+
SectionMarker: import_highlight.tags.heading,
|
|
299
|
+
OpenBracket: import_highlight.tags.squareBracket,
|
|
300
|
+
CloseBracket: import_highlight.tags.squareBracket,
|
|
301
|
+
OpenParen: import_highlight.tags.paren,
|
|
302
|
+
CloseParen: import_highlight.tags.paren,
|
|
303
|
+
OpenAngle: import_highlight.tags.angleBracket,
|
|
304
|
+
CloseAngle: import_highlight.tags.angleBracket,
|
|
305
|
+
Url: import_highlight.tags.url,
|
|
306
|
+
ColorAnnotation: import_highlight.tags.atom,
|
|
307
|
+
Pipe: import_highlight.tags.separator,
|
|
308
|
+
Colon: import_highlight.tags.separator,
|
|
309
|
+
Plus: import_highlight.tags.separator,
|
|
310
|
+
Comma: import_highlight.tags.punctuation,
|
|
311
|
+
Dash: import_highlight.tags.operator,
|
|
312
|
+
Tilde: import_highlight.tags.operator,
|
|
313
|
+
Star: import_highlight.tags.operator,
|
|
314
|
+
Question: import_highlight.tags.operator,
|
|
315
|
+
Punct: import_highlight.tags.punctuation
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
// src/editor/index.ts
|
|
319
|
+
var dgmoParser = parser.configure({
|
|
320
|
+
props: [dgmoHighlighting]
|
|
321
|
+
});
|
|
322
|
+
var dgmoLanguage = import_language.LRLanguage.define({
|
|
323
|
+
name: "dgmo",
|
|
324
|
+
parser: dgmoParser
|
|
325
|
+
});
|
|
326
|
+
var dgmoLanguageSupport = new import_language.LanguageSupport(dgmoLanguage);
|
|
327
|
+
var dgmoExtension = dgmoLanguageSupport;
|
|
328
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
329
|
+
0 && (module.exports = {
|
|
330
|
+
CHART_TYPES,
|
|
331
|
+
METADATA_KEYS,
|
|
332
|
+
dgmoExtension,
|
|
333
|
+
dgmoHighlighting,
|
|
334
|
+
dgmoLanguage,
|
|
335
|
+
dgmoLanguageSupport,
|
|
336
|
+
dgmoParser
|
|
337
|
+
});
|
|
338
|
+
//# sourceMappingURL=editor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/editor/index.ts","../src/editor/dgmo.grammar.js","../src/editor/dgmo.grammar.terms.js","../src/editor/keywords.ts","../src/editor/tokens.ts","../src/editor/highlight.ts"],"sourcesContent":["import { LRLanguage, LanguageSupport } from '@codemirror/language';\nimport type { Extension } from '@codemirror/state';\nimport { parser } from './dgmo.grammar.js';\nimport { dgmoHighlighting } from './highlight';\n\nexport { CHART_TYPES, METADATA_KEYS } from './keywords';\nexport { dgmoHighlighting } from './highlight';\n\n/** The raw Lezer parser for DGMO. */\nexport const dgmoParser = parser.configure({\n props: [dgmoHighlighting],\n});\n\n/** LRLanguage wrapper for CodeMirror. */\nexport const dgmoLanguage = LRLanguage.define({\n name: 'dgmo',\n parser: dgmoParser,\n});\n\n/** Full language support (language + extensions). */\nexport const dgmoLanguageSupport = new LanguageSupport(dgmoLanguage);\n\n/**\n * Drop-in replacement for the old dgmoExtension.\n * Consumers should add indentationMarkers() separately if desired\n * (from @replit/codemirror-indentation-markers).\n */\nexport const dgmoExtension: Extension = dgmoLanguageSupport;\n","// This file was generated by lezer-generator. You probably shouldn't edit it.\nimport {LRParser} from \"@lezer/lr\"\nimport {specializeKeyword} from \"./tokens\"\nexport const parser = LRParser.deserialize({\n version: 14,\n states: \"!WQVQPOOOOQO'#DU'#DUOOQO'#DP'#DPO%]QPO'#CdOOQO'#DO'#DOQVQPOOOOQO-E6}-E6}OOQO,59O,59OOOQO-E6|-E6|\",\n stateData: \"&Q~OvOS~OPPOQPORPOSPOTPOVSOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPOwSO~OPPOQPORPOSPOTPOXPOYPOZPO[PO]PO^PO_PO`POaPObPOcPOdPOePOfPOgPOhPOiPOjPOkPOlPOmPOnPOoPOpPOqPO~OwVO~P#]OVXYZ[]^_`ghijklmnoabcdefpqk~\",\n goto: \"!byPPPPPPPPzPPPPPPPPPPPPPPPPPPPPPPPPP!O!UPPPP!]TSOTQTORWTSROTRURVQORT\",\n nodeNames: \"⚠ ChartType TagKeyword DirectiveKeyword ControlKeyword ModifierKeyword Document Comment ContentLine SyncArrow AsyncArrow Duration DateLiteral Percentage Number SectionMarker Url OpenBracket CloseBracket OpenParen CloseParen OpenAngle CloseAngle ColorAnnotation Pipe Colon Comma Plus Dash Tilde Star Question Identifier Punct\",\n maxTerm: 40,\n skippedNodes: [0],\n repeatNodeCount: 2,\n tokenData: \"9q~RxOX#oXY#tYZ$PZp#opq#tqt#oux#oxy$Uyz$tz{${{|%S|}%Z}!O%b!O!P#o!P!Q%q!Q![&b![!],v!]!^#o!^!_,}!_!`-U!`!a-c!a!b-j!b!c#o!c!}-q!}#O0w#O#P#o#P#Q0|#Q#R#o#R#S-q#S#T#o#T#[-q#[#]1T#]#o-q#o#p#o#p#q9T#q#r#o#r#s9[#s;'S#o;'S;=`9k<%lO#o~#tOq~~#yQv~XY#tpq#t~$UOw~~$]Qc~q~}!O$c#T#o$c~$fRyz$o}!O$c#T#o$c~$tOg~~${Od~q~~%SOn~q~~%ZOk~q~~%bOj~q~~%iPl~q~!`!a%l~%qOX~~%vPq~!P!Q%y~&OSV~OY%yZ;'S%y;'S;=`&[<%lO%y~&_P;=`<%l%y~&iY^~q~uv'X!O!P'^!QPY^~uv'X!O!P'^!QtY^~uv'X!O!P'^!Q => (specializeKeyword(value, stack) << 1), external: specializeKeyword}],\n tokenPrec: 204\n})\n","// This file was generated by lezer-generator. You probably shouldn't edit it.\nexport const\n ChartType = 1,\n TagKeyword = 2,\n DirectiveKeyword = 3,\n ControlKeyword = 4,\n ModifierKeyword = 5,\n Document = 6,\n Comment = 7,\n ContentLine = 8,\n SyncArrow = 9,\n AsyncArrow = 10,\n Duration = 11,\n DateLiteral = 12,\n Percentage = 13,\n Number = 14,\n SectionMarker = 15,\n Url = 16,\n OpenBracket = 17,\n CloseBracket = 18,\n OpenParen = 19,\n CloseParen = 20,\n OpenAngle = 21,\n CloseAngle = 22,\n ColorAnnotation = 23,\n Pipe = 24,\n Colon = 25,\n Comma = 26,\n Plus = 27,\n Dash = 28,\n Tilde = 29,\n Star = 30,\n Question = 31,\n Identifier = 32,\n Punct = 33\n","/** All supported DGMO chart types. */\nexport const CHART_TYPES = new Set([\n // Diagram types\n 'sequence',\n 'flowchart',\n 'class',\n 'er',\n 'org',\n 'kanban',\n 'c4',\n 'initiative-status',\n 'state',\n 'sitemap',\n 'infra',\n 'gantt',\n // Data chart types\n 'bar',\n 'line',\n 'pie',\n 'doughnut',\n 'area',\n 'polar-area',\n 'radar',\n 'bar-stacked',\n 'multi-line',\n 'scatter',\n 'sankey',\n 'chord',\n 'function',\n 'heatmap',\n 'funnel',\n // Visualization types\n 'slope',\n 'wordcloud',\n 'arc',\n 'timeline',\n 'venn',\n 'quadrant',\n]);\n\n/** Metadata keys recognized across chart types. */\nexport const METADATA_KEYS = new Set([\n 'title',\n 'series',\n 'orientation',\n 'x-label',\n 'y-label',\n 'size-label',\n 'x',\n 'columns',\n 'rows',\n 'labels',\n 'rotate',\n 'max',\n 'size',\n 'order',\n 'sort',\n 'scale',\n 'values',\n 'notation',\n 'x-axis',\n 'y-axis',\n 'top-right',\n 'top-left',\n 'bottom-right',\n 'bottom-left',\n]);\n\n/** Tag declaration keyword. */\nexport const TAG_KEYWORD = 'tag';\n\n/** Directive keywords — commands that configure chart behavior. */\nexport const DIRECTIVE_KEYWORDS = new Set([\n // Gantt\n 'start',\n 'era',\n 'marker',\n 'holiday',\n 'workweek',\n 'today-marker',\n 'critical-path',\n 'no-dependencies',\n 'sort',\n // Tags\n 'tags',\n 'import',\n 'active-tag',\n 'hide',\n // ER\n 'notation',\n // Class\n 'extends',\n 'implements',\n 'abstract',\n 'interface',\n 'enum',\n // C4\n 'containers',\n 'components',\n 'deployment',\n // Infra directives\n 'sub-node-label',\n 'show-sub-node-count',\n 'no-auto-color',\n // Infra node properties\n 'description',\n 'instances',\n 'max-rps',\n 'latency-ms',\n 'uptime',\n 'firewall-block',\n 'ratelimit-rps',\n 'cb-error-threshold',\n 'cb-latency-threshold-ms',\n 'buffer',\n 'drain-rate',\n 'retention-hours',\n 'partitions',\n 'split',\n 'slo-p90-latency-ms',\n 'slo-availability',\n 'cache-hit',\n 'concurrency',\n 'duration-ms',\n 'cold-start-ms',\n 'rps',\n // Sequence\n 'activations',\n 'no-activations',\n 'collapse-notes',\n 'no-collapse-notes',\n // Data charts\n 'stacked',\n 'no-label-name',\n 'no-label-value',\n 'no-label-percent',\n // Slope\n 'period',\n // Quadrant\n 'x-axis',\n 'y-axis',\n 'top-right',\n 'top-left',\n 'bottom-right',\n 'bottom-left',\n // Layout\n 'direction-tb',\n 'direction-lr',\n // Initiative-status\n 'contains',\n // Data chart metadata\n 'title',\n 'series',\n 'orientation',\n 'x-label',\n 'y-label',\n 'size-label',\n 'columns',\n 'rows',\n 'labels',\n 'rotate',\n 'scale',\n 'values',\n]);\n\n/** Control flow keywords — structural blocks. */\nexport const CONTROL_KEYWORDS = new Set([\n 'if',\n 'else',\n 'loop',\n 'parallel',\n 'note',\n]);\n\n/** Status keywords — initiative-status, kanban. */\nexport const STATUS_KEYWORDS = new Set([\n 'na',\n 'todo',\n 'wip',\n 'done',\n 'blocked',\n 'in-progress',\n 'backlog',\n 'ready',\n]);\n\n/** Modifier keywords — adjust declarations. */\nexport const MODIFIER_KEYWORDS = new Set([\n 'alias',\n 'aka',\n 'position',\n 'default',\n // Sequence participant types\n 'actor',\n 'service',\n 'database',\n 'queue',\n 'cache',\n 'gateway',\n 'external',\n 'networking',\n 'frontend',\n // C4 element types\n 'system',\n 'person',\n 'container',\n 'component',\n // ER column modifiers\n 'pk',\n 'fk',\n 'nullable',\n 'unique',\n // ER data types\n 'int',\n 'varchar',\n 'text',\n 'boolean',\n 'date',\n 'timestamp',\n 'float',\n 'decimal',\n]);\n","import {\n ChartType,\n TagKeyword,\n DirectiveKeyword,\n ControlKeyword,\n ModifierKeyword,\n} from './dgmo.grammar.terms.js';\nimport {\n CHART_TYPES,\n TAG_KEYWORD,\n DIRECTIVE_KEYWORDS,\n CONTROL_KEYWORDS,\n STATUS_KEYWORDS,\n MODIFIER_KEYWORDS,\n} from './keywords';\n\n/**\n * Keyword specializer for the Lezer grammar.\n * Called on every Identifier token — returns a specialized term ID\n * or -1 to keep it as a plain Identifier.\n */\nexport function specializeKeyword(value: string): number {\n if (CHART_TYPES.has(value)) return ChartType;\n if (value === TAG_KEYWORD) return TagKeyword;\n if (DIRECTIVE_KEYWORDS.has(value)) return DirectiveKeyword;\n if (CONTROL_KEYWORDS.has(value)) return ControlKeyword;\n if (STATUS_KEYWORDS.has(value)) return ModifierKeyword;\n if (MODIFIER_KEYWORDS.has(value)) return ModifierKeyword;\n return -1;\n}\n","import type { NodePropSource } from '@lezer/common';\nimport { styleTags, tags as t } from '@lezer/highlight';\n\n/** Maps grammar node names to semantic highlight tags. */\nexport const dgmoHighlighting: NodePropSource = styleTags({\n Comment: t.lineComment,\n ChartType: t.typeName,\n TagKeyword: t.definitionKeyword,\n DirectiveKeyword: t.keyword,\n ControlKeyword: t.controlKeyword,\n ModifierKeyword: t.modifier,\n SyncArrow: t.operator,\n AsyncArrow: t.operator,\n Duration: t.number,\n DateLiteral: t.number,\n Number: t.number,\n Percentage: t.number,\n SectionMarker: t.heading,\n OpenBracket: t.squareBracket,\n CloseBracket: t.squareBracket,\n OpenParen: t.paren,\n CloseParen: t.paren,\n OpenAngle: t.angleBracket,\n CloseAngle: t.angleBracket,\n Url: t.url,\n ColorAnnotation: t.atom,\n Pipe: t.separator,\n Colon: t.separator,\n Plus: t.separator,\n Comma: t.punctuation,\n Dash: t.operator,\n Tilde: t.operator,\n Star: t.operator,\n Question: t.operator,\n Punct: t.punctuation,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA4C;;;ACC5C,gBAAuB;;;ACAhB,IACL,YAAY;AADP,IAEL,aAAa;AAFR,IAGL,mBAAmB;AAHd,IAIL,iBAAiB;AAJZ,IAKL,kBAAkB;;;ACLb,IAAM,cAAc,oBAAI,IAAI;AAAA;AAAA,EAEjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,gBAAgB,oBAAI,IAAI;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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
|
|
1
|
+
import * as _lezer_lr from '@lezer/lr';
|
|
2
|
+
import { LRLanguage, LanguageSupport } from '@codemirror/language';
|
|
3
|
+
import { Extension } from '@codemirror/state';
|
|
4
|
+
import { NodePropSource } from '@lezer/common';
|
|
5
|
+
|
|
6
|
+
/** All supported DGMO chart types. */
|
|
7
|
+
declare const CHART_TYPES: Set<string>;
|
|
8
|
+
/** Metadata keys recognized across chart types. */
|
|
9
|
+
declare const METADATA_KEYS: Set<string>;
|
|
10
|
+
|
|
11
|
+
/** Maps grammar node names to semantic highlight tags. */
|
|
12
|
+
declare const dgmoHighlighting: NodePropSource;
|
|
13
|
+
|
|
14
|
+
/** The raw Lezer parser for DGMO. */
|
|
15
|
+
declare const dgmoParser: _lezer_lr.LRParser;
|
|
16
|
+
/** LRLanguage wrapper for CodeMirror. */
|
|
17
|
+
declare const dgmoLanguage: LRLanguage;
|
|
18
|
+
/** Full language support (language + extensions). */
|
|
19
|
+
declare const dgmoLanguageSupport: LanguageSupport;
|
|
20
|
+
/**
|
|
21
|
+
* Drop-in replacement for the old dgmoExtension.
|
|
22
|
+
* Consumers should add indentationMarkers() separately if desired
|
|
23
|
+
* (from @replit/codemirror-indentation-markers).
|
|
24
|
+
*/
|
|
25
|
+
declare const dgmoExtension: Extension;
|
|
26
|
+
|
|
27
|
+
export { CHART_TYPES, METADATA_KEYS, dgmoExtension, dgmoHighlighting, dgmoLanguage, dgmoLanguageSupport, dgmoParser };
|
package/dist/editor.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as _lezer_lr from '@lezer/lr';
|
|
2
|
+
import { LRLanguage, LanguageSupport } from '@codemirror/language';
|
|
3
|
+
import { Extension } from '@codemirror/state';
|
|
4
|
+
import { NodePropSource } from '@lezer/common';
|
|
5
|
+
|
|
6
|
+
/** All supported DGMO chart types. */
|
|
7
|
+
declare const CHART_TYPES: Set<string>;
|
|
8
|
+
/** Metadata keys recognized across chart types. */
|
|
9
|
+
declare const METADATA_KEYS: Set<string>;
|
|
10
|
+
|
|
11
|
+
/** Maps grammar node names to semantic highlight tags. */
|
|
12
|
+
declare const dgmoHighlighting: NodePropSource;
|
|
13
|
+
|
|
14
|
+
/** The raw Lezer parser for DGMO. */
|
|
15
|
+
declare const dgmoParser: _lezer_lr.LRParser;
|
|
16
|
+
/** LRLanguage wrapper for CodeMirror. */
|
|
17
|
+
declare const dgmoLanguage: LRLanguage;
|
|
18
|
+
/** Full language support (language + extensions). */
|
|
19
|
+
declare const dgmoLanguageSupport: LanguageSupport;
|
|
20
|
+
/**
|
|
21
|
+
* Drop-in replacement for the old dgmoExtension.
|
|
22
|
+
* Consumers should add indentationMarkers() separately if desired
|
|
23
|
+
* (from @replit/codemirror-indentation-markers).
|
|
24
|
+
*/
|
|
25
|
+
declare const dgmoExtension: Extension;
|
|
26
|
+
|
|
27
|
+
export { CHART_TYPES, METADATA_KEYS, dgmoExtension, dgmoHighlighting, dgmoLanguage, dgmoLanguageSupport, dgmoParser };
|