bg-editor 0.0.7 → 0.0.8

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 (58) hide show
  1. package/dist/umo-editor.js +89809 -7
  2. package/package.json +21 -1
  3. package/dist/_baseUniq-CK68Es8H.js +0 -473
  4. package/dist/arc-cD-4ba7d.js +0 -84
  5. package/dist/architecture-U656AL7Q-jxTBuJdN.js +0 -6
  6. package/dist/architectureDiagram-VXUJARFQ-D3XlpFhb.js +0 -4660
  7. package/dist/blockDiagram-VD42YOAC-BslbvMOG.js +0 -2262
  8. package/dist/c4Diagram-YG6GDRKO-DD3uWYPM.js +0 -1581
  9. package/dist/channel-DjTSKqWx.js +0 -6
  10. package/dist/chunk-4BX2VUAB-lfhsh4gk.js +0 -9
  11. package/dist/chunk-55IACEB6-O42zw0MT.js +0 -9
  12. package/dist/chunk-B4BG7PRW-CAose2Ox.js +0 -1376
  13. package/dist/chunk-DI55MBZ5-DkOlwdzs.js +0 -1371
  14. package/dist/chunk-FMBD7UC4-XviEvZms.js +0 -20
  15. package/dist/chunk-QN33PNHL-CNGSzgpw.js +0 -20
  16. package/dist/chunk-QZHKN3VN-CRgLUJXR.js +0 -16
  17. package/dist/chunk-TZMSLE5B-BkHNUxTN.js +0 -65
  18. package/dist/classDiagram-2ON5EDUG-Cakz_SCw.js +0 -17
  19. package/dist/classDiagram-v2-WZHVMYZB-Cakz_SCw.js +0 -17
  20. package/dist/clone-CIrbb4_D.js +0 -9
  21. package/dist/cose-bilkent-S5V4N54A-EoSlB5N_.js +0 -2606
  22. package/dist/cytoscape.esm-DoU_GB5M.js +0 -18732
  23. package/dist/dagre-6UL2VRFP-BPH1NIvl.js +0 -444
  24. package/dist/defaultLocale-DEnRyJdC.js +0 -172
  25. package/dist/diagram-PSM6KHXK-DCRoLhFv.js +0 -396
  26. package/dist/diagram-QEK2KX5R-2gxFpsCA.js +0 -218
  27. package/dist/diagram-S2PKOQOG-BIPpN2G8.js +0 -143
  28. package/dist/erDiagram-Q2GNP2WA-pfb2dpnp.js +0 -842
  29. package/dist/flowDiagram-NV44I4VS-Dv631-Fh.js +0 -1621
  30. package/dist/ganttDiagram-LVOFAZNH-BOKYXijK.js +0 -2500
  31. package/dist/gitGraph-F6HP7TQM-CRerkbyh.js +0 -6
  32. package/dist/gitGraphDiagram-NY62KEGX-CgO9x7O1.js +0 -700
  33. package/dist/graph-CG-rVaun.js +0 -382
  34. package/dist/index-LPeu-5gp.js +0 -164788
  35. package/dist/info-NVLQJR56-CZcMDuD4.js +0 -6
  36. package/dist/infoDiagram-ER5ION4S-CpfjxDXT.js +0 -25
  37. package/dist/init-Dbt-6wo9.js +0 -17
  38. package/dist/journeyDiagram-XKPGCS4Q-D4m1xk_j.js +0 -837
  39. package/dist/kanban-definition-3W4ZIXB7-GUMW-GDO.js +0 -719
  40. package/dist/layout-C7pGfQvF.js +0 -1416
  41. package/dist/linear-CQdBpz9H.js +0 -260
  42. package/dist/mermaid-parser.core-C3Lk4un7.js +0 -14143
  43. package/dist/min-D7xNMq31.js +0 -39
  44. package/dist/mindmap-definition-VGOIOE7T-GfQh2q9s.js +0 -784
  45. package/dist/ordinal-mgyNSFm_.js +0 -62
  46. package/dist/packet-BFZMPI3H-DughJE3g.js +0 -6
  47. package/dist/pie-7BOR55EZ-B1py7mee.js +0 -6
  48. package/dist/pieDiagram-ADFJNKIX-DENmX4xL.js +0 -162
  49. package/dist/quadrantDiagram-AYHSOK5B-BFVycH-W.js +0 -1023
  50. package/dist/radar-NHE76QYJ-DuTW4rXt.js +0 -6
  51. package/dist/requirementDiagram-UZGBJVZJ-f8rb43Mp.js +0 -851
  52. package/dist/sankeyDiagram-TZEHDZUN-CUN0tZ5p.js +0 -811
  53. package/dist/sequenceDiagram-WL72ISMW-7X4nul9T.js +0 -2512
  54. package/dist/stateDiagram-FKZM4ZOC-CypL793K.js +0 -264
  55. package/dist/stateDiagram-v2-4FDKWEC3-D5vS5FM5.js +0 -17
  56. package/dist/timeline-definition-IT6M3QCI-B_WOoOGO.js +0 -798
  57. package/dist/treemap-KMMF4GRG-BzINyJBJ.js +0 -6
  58. package/dist/xychartDiagram-PRI3JC2R-Llw16NDY.js +0 -1341
@@ -1,719 +0,0 @@
1
- import "./style.css";
2
- import { _ as o, l as te, c as U, H as fe, af as ye, ag as be, ah as me, V as _e, F as Y, i as j, t as Ee, J as ke, W as Se, X as ce, Y as le } from "./index-LPeu-5gp.js";
3
- import { g as Ne } from "./chunk-FMBD7UC4-XviEvZms.js";
4
- var $ = function() {
5
- var e = /* @__PURE__ */ o(function(O, i, n, r) {
6
- for (n = n || {}, r = O.length; r--; n[O[r]] = i) ;
7
- return n;
8
- }, "o"), u = [1, 4], p = [1, 13], s = [1, 12], d = [1, 15], E = [1, 16], b = [1, 20], l = [1, 19], D = [6, 7, 8], I = [1, 26], g = [1, 24], w = [1, 25], _ = [6, 7, 11], G = [1, 31], N = [6, 7, 11, 24], V = [1, 6, 13, 16, 17, 20, 23], m = [1, 35], A = [1, 36], L = [1, 6, 7, 11, 13, 16, 17, 20, 23], H = [1, 38], T = {
9
- trace: /* @__PURE__ */ o(function() {
10
- }, "trace"),
11
- yy: {},
12
- symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, KANBAN: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, shapeData: 15, ICON: 16, CLASS: 17, nodeWithId: 18, nodeWithoutId: 19, NODE_DSTART: 20, NODE_DESCR: 21, NODE_DEND: 22, NODE_ID: 23, SHAPE_DATA: 24, $accept: 0, $end: 1 },
13
- terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "KANBAN", 11: "EOF", 13: "SPACELIST", 16: "ICON", 17: "CLASS", 20: "NODE_DSTART", 21: "NODE_DESCR", 22: "NODE_DEND", 23: "NODE_ID", 24: "SHAPE_DATA" },
14
- productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 3], [12, 2], [12, 2], [12, 2], [12, 1], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [19, 3], [18, 1], [18, 4], [15, 2], [15, 1]],
15
- performAction: /* @__PURE__ */ o(function(i, n, r, a, h, t, M) {
16
- var c = t.length - 1;
17
- switch (h) {
18
- case 6:
19
- case 7:
20
- return a;
21
- case 8:
22
- a.getLogger().trace("Stop NL ");
23
- break;
24
- case 9:
25
- a.getLogger().trace("Stop EOF ");
26
- break;
27
- case 11:
28
- a.getLogger().trace("Stop NL2 ");
29
- break;
30
- case 12:
31
- a.getLogger().trace("Stop EOF2 ");
32
- break;
33
- case 15:
34
- a.getLogger().info("Node: ", t[c - 1].id), a.addNode(t[c - 2].length, t[c - 1].id, t[c - 1].descr, t[c - 1].type, t[c]);
35
- break;
36
- case 16:
37
- a.getLogger().info("Node: ", t[c].id), a.addNode(t[c - 1].length, t[c].id, t[c].descr, t[c].type);
38
- break;
39
- case 17:
40
- a.getLogger().trace("Icon: ", t[c]), a.decorateNode({ icon: t[c] });
41
- break;
42
- case 18:
43
- case 23:
44
- a.decorateNode({ class: t[c] });
45
- break;
46
- case 19:
47
- a.getLogger().trace("SPACELIST");
48
- break;
49
- case 20:
50
- a.getLogger().trace("Node: ", t[c - 1].id), a.addNode(0, t[c - 1].id, t[c - 1].descr, t[c - 1].type, t[c]);
51
- break;
52
- case 21:
53
- a.getLogger().trace("Node: ", t[c].id), a.addNode(0, t[c].id, t[c].descr, t[c].type);
54
- break;
55
- case 22:
56
- a.decorateNode({ icon: t[c] });
57
- break;
58
- case 27:
59
- a.getLogger().trace("node found ..", t[c - 2]), this.$ = { id: t[c - 1], descr: t[c - 1], type: a.getType(t[c - 2], t[c]) };
60
- break;
61
- case 28:
62
- this.$ = { id: t[c], descr: t[c], type: 0 };
63
- break;
64
- case 29:
65
- a.getLogger().trace("node found ..", t[c - 3]), this.$ = { id: t[c - 3], descr: t[c - 1], type: a.getType(t[c - 2], t[c]) };
66
- break;
67
- case 30:
68
- this.$ = t[c - 1] + t[c];
69
- break;
70
- case 31:
71
- this.$ = t[c];
72
- break;
73
- }
74
- }, "anonymous"),
75
- table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: u }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: u }, { 6: p, 7: [1, 10], 9: 9, 12: 11, 13: s, 14: 14, 16: d, 17: E, 18: 17, 19: 18, 20: b, 23: l }, e(D, [2, 3]), { 1: [2, 2] }, e(D, [2, 4]), e(D, [2, 5]), { 1: [2, 6], 6: p, 12: 21, 13: s, 14: 14, 16: d, 17: E, 18: 17, 19: 18, 20: b, 23: l }, { 6: p, 9: 22, 12: 11, 13: s, 14: 14, 16: d, 17: E, 18: 17, 19: 18, 20: b, 23: l }, { 6: I, 7: g, 10: 23, 11: w }, e(_, [2, 24], { 18: 17, 19: 18, 14: 27, 16: [1, 28], 17: [1, 29], 20: b, 23: l }), e(_, [2, 19]), e(_, [2, 21], { 15: 30, 24: G }), e(_, [2, 22]), e(_, [2, 23]), e(N, [2, 25]), e(N, [2, 26]), e(N, [2, 28], { 20: [1, 32] }), { 21: [1, 33] }, { 6: I, 7: g, 10: 34, 11: w }, { 1: [2, 7], 6: p, 12: 21, 13: s, 14: 14, 16: d, 17: E, 18: 17, 19: 18, 20: b, 23: l }, e(V, [2, 14], { 7: m, 11: A }), e(L, [2, 8]), e(L, [2, 9]), e(L, [2, 10]), e(_, [2, 16], { 15: 37, 24: G }), e(_, [2, 17]), e(_, [2, 18]), e(_, [2, 20], { 24: H }), e(N, [2, 31]), { 21: [1, 39] }, { 22: [1, 40] }, e(V, [2, 13], { 7: m, 11: A }), e(L, [2, 11]), e(L, [2, 12]), e(_, [2, 15], { 24: H }), e(N, [2, 30]), { 22: [1, 41] }, e(N, [2, 27]), e(N, [2, 29])],
76
- defaultActions: { 2: [2, 1], 6: [2, 2] },
77
- parseError: /* @__PURE__ */ o(function(i, n) {
78
- if (n.recoverable)
79
- this.trace(i);
80
- else {
81
- var r = new Error(i);
82
- throw r.hash = n, r;
83
- }
84
- }, "parseError"),
85
- parse: /* @__PURE__ */ o(function(i) {
86
- var n = this, r = [0], a = [], h = [null], t = [], M = this.table, c = "", W = 0, se = 0, ue = 2, re = 1, ge = t.slice.call(arguments, 1), y = Object.create(this.lexer), R = { yy: {} };
87
- for (var J in this.yy)
88
- Object.prototype.hasOwnProperty.call(this.yy, J) && (R.yy[J] = this.yy[J]);
89
- y.setInput(i, R.yy), R.yy.lexer = y, R.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
90
- var q = y.yylloc;
91
- t.push(q);
92
- var de = y.options && y.options.ranges;
93
- typeof R.yy.parseError == "function" ? this.parseError = R.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
94
- function pe(S) {
95
- r.length = r.length - 2 * S, h.length = h.length - S, t.length = t.length - S;
96
- }
97
- o(pe, "popStack");
98
- function ae() {
99
- var S;
100
- return S = a.pop() || y.lex() || re, typeof S != "number" && (S instanceof Array && (a = S, S = a.pop()), S = n.symbols_[S] || S), S;
101
- }
102
- o(ae, "lex");
103
- for (var k, P, x, Q, F = {}, z, C, oe, X; ; ) {
104
- if (P = r[r.length - 1], this.defaultActions[P] ? x = this.defaultActions[P] : ((k === null || typeof k > "u") && (k = ae()), x = M[P] && M[P][k]), typeof x > "u" || !x.length || !x[0]) {
105
- var Z = "";
106
- X = [];
107
- for (z in M[P])
108
- this.terminals_[z] && z > ue && X.push("'" + this.terminals_[z] + "'");
109
- y.showPosition ? Z = "Parse error on line " + (W + 1) + `:
110
- ` + y.showPosition() + `
111
- Expecting ` + X.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Z = "Parse error on line " + (W + 1) + ": Unexpected " + (k == re ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Z, {
112
- text: y.match,
113
- token: this.terminals_[k] || k,
114
- line: y.yylineno,
115
- loc: q,
116
- expected: X
117
- });
118
- }
119
- if (x[0] instanceof Array && x.length > 1)
120
- throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + k);
121
- switch (x[0]) {
122
- case 1:
123
- r.push(k), h.push(y.yytext), t.push(y.yylloc), r.push(x[1]), k = null, se = y.yyleng, c = y.yytext, W = y.yylineno, q = y.yylloc;
124
- break;
125
- case 2:
126
- if (C = this.productions_[x[1]][1], F.$ = h[h.length - C], F._$ = {
127
- first_line: t[t.length - (C || 1)].first_line,
128
- last_line: t[t.length - 1].last_line,
129
- first_column: t[t.length - (C || 1)].first_column,
130
- last_column: t[t.length - 1].last_column
131
- }, de && (F._$.range = [
132
- t[t.length - (C || 1)].range[0],
133
- t[t.length - 1].range[1]
134
- ]), Q = this.performAction.apply(F, [
135
- c,
136
- se,
137
- W,
138
- R.yy,
139
- x[1],
140
- h,
141
- t
142
- ].concat(ge)), typeof Q < "u")
143
- return Q;
144
- C && (r = r.slice(0, -1 * C * 2), h = h.slice(0, -1 * C), t = t.slice(0, -1 * C)), r.push(this.productions_[x[1]][0]), h.push(F.$), t.push(F._$), oe = M[r[r.length - 2]][r[r.length - 1]], r.push(oe);
145
- break;
146
- case 3:
147
- return !0;
148
- }
149
- }
150
- return !0;
151
- }, "parse")
152
- }, K = /* @__PURE__ */ function() {
153
- var O = {
154
- EOF: 1,
155
- parseError: /* @__PURE__ */ o(function(n, r) {
156
- if (this.yy.parser)
157
- this.yy.parser.parseError(n, r);
158
- else
159
- throw new Error(n);
160
- }, "parseError"),
161
- // resets the lexer, sets new input
162
- setInput: /* @__PURE__ */ o(function(i, n) {
163
- return this.yy = n || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
164
- first_line: 1,
165
- first_column: 0,
166
- last_line: 1,
167
- last_column: 0
168
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
169
- }, "setInput"),
170
- // consumes and returns one char from the input
171
- input: /* @__PURE__ */ o(function() {
172
- var i = this._input[0];
173
- this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
174
- var n = i.match(/(?:\r\n?|\n).*/g);
175
- return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
176
- }, "input"),
177
- // unshifts one char (or a string) into the input
178
- unput: /* @__PURE__ */ o(function(i) {
179
- var n = i.length, r = i.split(/(?:\r\n?|\n)/g);
180
- this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
181
- var a = this.match.split(/(?:\r\n?|\n)/g);
182
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);
183
- var h = this.yylloc.range;
184
- return this.yylloc = {
185
- first_line: this.yylloc.first_line,
186
- last_line: this.yylineno + 1,
187
- first_column: this.yylloc.first_column,
188
- last_column: r ? (r.length === a.length ? this.yylloc.first_column : 0) + a[a.length - r.length].length - r[0].length : this.yylloc.first_column - n
189
- }, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
190
- }, "unput"),
191
- // When called from action, caches matched text and appends it on next action
192
- more: /* @__PURE__ */ o(function() {
193
- return this._more = !0, this;
194
- }, "more"),
195
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
196
- reject: /* @__PURE__ */ o(function() {
197
- if (this.options.backtrack_lexer)
198
- this._backtrack = !0;
199
- else
200
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
201
- ` + this.showPosition(), {
202
- text: "",
203
- token: null,
204
- line: this.yylineno
205
- });
206
- return this;
207
- }, "reject"),
208
- // retain first n characters of the match
209
- less: /* @__PURE__ */ o(function(i) {
210
- this.unput(this.match.slice(i));
211
- }, "less"),
212
- // displays already matched input, i.e. for error messages
213
- pastInput: /* @__PURE__ */ o(function() {
214
- var i = this.matched.substr(0, this.matched.length - this.match.length);
215
- return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
216
- }, "pastInput"),
217
- // displays upcoming input, i.e. for error messages
218
- upcomingInput: /* @__PURE__ */ o(function() {
219
- var i = this.match;
220
- return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
221
- }, "upcomingInput"),
222
- // displays the character position where the lexing error occurred, i.e. for error messages
223
- showPosition: /* @__PURE__ */ o(function() {
224
- var i = this.pastInput(), n = new Array(i.length + 1).join("-");
225
- return i + this.upcomingInput() + `
226
- ` + n + "^";
227
- }, "showPosition"),
228
- // test the lexed token: return FALSE when not a match, otherwise return token
229
- test_match: /* @__PURE__ */ o(function(i, n) {
230
- var r, a, h;
231
- if (this.options.backtrack_lexer && (h = {
232
- yylineno: this.yylineno,
233
- yylloc: {
234
- first_line: this.yylloc.first_line,
235
- last_line: this.last_line,
236
- first_column: this.yylloc.first_column,
237
- last_column: this.yylloc.last_column
238
- },
239
- yytext: this.yytext,
240
- match: this.match,
241
- matches: this.matches,
242
- matched: this.matched,
243
- yyleng: this.yyleng,
244
- offset: this.offset,
245
- _more: this._more,
246
- _input: this._input,
247
- yy: this.yy,
248
- conditionStack: this.conditionStack.slice(0),
249
- done: this.done
250
- }, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), a = i[0].match(/(?:\r\n?|\n).*/g), a && (this.yylineno += a.length), this.yylloc = {
251
- first_line: this.yylloc.last_line,
252
- last_line: this.yylineno + 1,
253
- first_column: this.yylloc.last_column,
254
- last_column: a ? a[a.length - 1].length - a[a.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
255
- }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], r = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), r)
256
- return r;
257
- if (this._backtrack) {
258
- for (var t in h)
259
- this[t] = h[t];
260
- return !1;
261
- }
262
- return !1;
263
- }, "test_match"),
264
- // return next match in input
265
- next: /* @__PURE__ */ o(function() {
266
- if (this.done)
267
- return this.EOF;
268
- this._input || (this.done = !0);
269
- var i, n, r, a;
270
- this._more || (this.yytext = "", this.match = "");
271
- for (var h = this._currentRules(), t = 0; t < h.length; t++)
272
- if (r = this._input.match(this.rules[h[t]]), r && (!n || r[0].length > n[0].length)) {
273
- if (n = r, a = t, this.options.backtrack_lexer) {
274
- if (i = this.test_match(r, h[t]), i !== !1)
275
- return i;
276
- if (this._backtrack) {
277
- n = !1;
278
- continue;
279
- } else
280
- return !1;
281
- } else if (!this.options.flex)
282
- break;
283
- }
284
- return n ? (i = this.test_match(n, h[a]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
285
- ` + this.showPosition(), {
286
- text: "",
287
- token: null,
288
- line: this.yylineno
289
- });
290
- }, "next"),
291
- // return next match that has a token
292
- lex: /* @__PURE__ */ o(function() {
293
- var n = this.next();
294
- return n || this.lex();
295
- }, "lex"),
296
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
297
- begin: /* @__PURE__ */ o(function(n) {
298
- this.conditionStack.push(n);
299
- }, "begin"),
300
- // pop the previously active lexer condition state off the condition stack
301
- popState: /* @__PURE__ */ o(function() {
302
- var n = this.conditionStack.length - 1;
303
- return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
304
- }, "popState"),
305
- // produce the lexer rule set which is active for the currently active lexer condition state
306
- _currentRules: /* @__PURE__ */ o(function() {
307
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
308
- }, "_currentRules"),
309
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
310
- topState: /* @__PURE__ */ o(function(n) {
311
- return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
312
- }, "topState"),
313
- // alias for begin(condition)
314
- pushState: /* @__PURE__ */ o(function(n) {
315
- this.begin(n);
316
- }, "pushState"),
317
- // return the number of states currently on the stack
318
- stateStackSize: /* @__PURE__ */ o(function() {
319
- return this.conditionStack.length;
320
- }, "stateStackSize"),
321
- options: { "case-insensitive": !0 },
322
- performAction: /* @__PURE__ */ o(function(n, r, a, h) {
323
- switch (a) {
324
- case 0:
325
- return this.pushState("shapeData"), r.yytext = "", 24;
326
- case 1:
327
- return this.pushState("shapeDataStr"), 24;
328
- case 2:
329
- return this.popState(), 24;
330
- case 3:
331
- const t = /\n\s*/g;
332
- return r.yytext = r.yytext.replace(t, "<br/>"), 24;
333
- case 4:
334
- return 24;
335
- case 5:
336
- this.popState();
337
- break;
338
- case 6:
339
- return n.getLogger().trace("Found comment", r.yytext), 6;
340
- case 7:
341
- return 8;
342
- case 8:
343
- this.begin("CLASS");
344
- break;
345
- case 9:
346
- return this.popState(), 17;
347
- case 10:
348
- this.popState();
349
- break;
350
- case 11:
351
- n.getLogger().trace("Begin icon"), this.begin("ICON");
352
- break;
353
- case 12:
354
- return n.getLogger().trace("SPACELINE"), 6;
355
- case 13:
356
- return 7;
357
- case 14:
358
- return 16;
359
- case 15:
360
- n.getLogger().trace("end icon"), this.popState();
361
- break;
362
- case 16:
363
- return n.getLogger().trace("Exploding node"), this.begin("NODE"), 20;
364
- case 17:
365
- return n.getLogger().trace("Cloud"), this.begin("NODE"), 20;
366
- case 18:
367
- return n.getLogger().trace("Explosion Bang"), this.begin("NODE"), 20;
368
- case 19:
369
- return n.getLogger().trace("Cloud Bang"), this.begin("NODE"), 20;
370
- case 20:
371
- return this.begin("NODE"), 20;
372
- case 21:
373
- return this.begin("NODE"), 20;
374
- case 22:
375
- return this.begin("NODE"), 20;
376
- case 23:
377
- return this.begin("NODE"), 20;
378
- case 24:
379
- return 13;
380
- case 25:
381
- return 23;
382
- case 26:
383
- return 11;
384
- case 27:
385
- this.begin("NSTR2");
386
- break;
387
- case 28:
388
- return "NODE_DESCR";
389
- case 29:
390
- this.popState();
391
- break;
392
- case 30:
393
- n.getLogger().trace("Starting NSTR"), this.begin("NSTR");
394
- break;
395
- case 31:
396
- return n.getLogger().trace("description:", r.yytext), "NODE_DESCR";
397
- case 32:
398
- this.popState();
399
- break;
400
- case 33:
401
- return this.popState(), n.getLogger().trace("node end ))"), "NODE_DEND";
402
- case 34:
403
- return this.popState(), n.getLogger().trace("node end )"), "NODE_DEND";
404
- case 35:
405
- return this.popState(), n.getLogger().trace("node end ...", r.yytext), "NODE_DEND";
406
- case 36:
407
- return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
408
- case 37:
409
- return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
410
- case 38:
411
- return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
412
- case 39:
413
- return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
414
- case 40:
415
- return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
416
- case 41:
417
- return n.getLogger().trace("Long description:", r.yytext), 21;
418
- case 42:
419
- return n.getLogger().trace("Long description:", r.yytext), 21;
420
- }
421
- }, "anonymous"),
422
- rules: [/^(?:@\{)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^\"]+)/i, /^(?:[^}^"]+)/i, /^(?:\})/i, /^(?:\s*%%.*)/i, /^(?:kanban\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}@]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
423
- conditions: { shapeDataEndBracket: { rules: [], inclusive: !1 }, shapeDataStr: { rules: [2, 3], inclusive: !1 }, shapeData: { rules: [1, 4, 5], inclusive: !1 }, CLASS: { rules: [9, 10], inclusive: !1 }, ICON: { rules: [14, 15], inclusive: !1 }, NSTR2: { rules: [28, 29], inclusive: !1 }, NSTR: { rules: [31, 32], inclusive: !1 }, NODE: { rules: [27, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: !1 }, INITIAL: { rules: [0, 6, 7, 8, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], inclusive: !0 } }
424
- };
425
- return O;
426
- }();
427
- T.lexer = K;
428
- function B() {
429
- this.yy = {};
430
- }
431
- return o(B, "Parser"), B.prototype = T, T.Parser = B, new B();
432
- }();
433
- $.parser = $;
434
- var xe = $, v = [], ne = [], ee = 0, ie = {}, ve = /* @__PURE__ */ o(() => {
435
- v = [], ne = [], ee = 0, ie = {};
436
- }, "clear"), De = /* @__PURE__ */ o((e) => {
437
- if (v.length === 0)
438
- return null;
439
- const u = v[0].level;
440
- let p = null;
441
- for (let s = v.length - 1; s >= 0; s--)
442
- if (v[s].level === u && !p && (p = v[s]), v[s].level < u)
443
- throw new Error('Items without section detected, found section ("' + v[s].label + '")');
444
- return e === p?.level ? null : p;
445
- }, "getSection"), he = /* @__PURE__ */ o(function() {
446
- return ne;
447
- }, "getSections"), Le = /* @__PURE__ */ o(function() {
448
- const e = [], u = [], p = he(), s = U();
449
- for (const d of p) {
450
- const E = {
451
- id: d.id,
452
- label: j(d.label ?? "", s),
453
- isGroup: !0,
454
- ticket: d.ticket,
455
- shape: "kanbanSection",
456
- level: d.level,
457
- look: s.look
458
- };
459
- u.push(E);
460
- const b = v.filter((l) => l.parentId === d.id);
461
- for (const l of b) {
462
- const D = {
463
- id: l.id,
464
- parentId: d.id,
465
- label: j(l.label ?? "", s),
466
- isGroup: !1,
467
- ticket: l?.ticket,
468
- priority: l?.priority,
469
- assigned: l?.assigned,
470
- icon: l?.icon,
471
- shape: "kanbanItem",
472
- level: l.level,
473
- rx: 5,
474
- ry: 5,
475
- cssStyles: ["text-align: left"]
476
- };
477
- u.push(D);
478
- }
479
- }
480
- return { nodes: u, edges: e, other: {}, config: U() };
481
- }, "getData"), Oe = /* @__PURE__ */ o((e, u, p, s, d) => {
482
- const E = U();
483
- let b = E.mindmap?.padding ?? Y.mindmap.padding;
484
- switch (s) {
485
- case f.ROUNDED_RECT:
486
- case f.RECT:
487
- case f.HEXAGON:
488
- b *= 2;
489
- }
490
- const l = {
491
- id: j(u, E) || "kbn" + ee++,
492
- level: e,
493
- label: j(p, E),
494
- width: E.mindmap?.maxNodeWidth ?? Y.mindmap.maxNodeWidth,
495
- padding: b,
496
- isGroup: !1
497
- };
498
- if (d !== void 0) {
499
- let I;
500
- d.includes(`
501
- `) ? I = d + `
502
- ` : I = `{
503
- ` + d + `
504
- }`;
505
- const g = Ee(I, { schema: ke });
506
- if (g.shape && (g.shape !== g.shape.toLowerCase() || g.shape.includes("_")))
507
- throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);
508
- g?.shape && g.shape === "kanbanItem" && (l.shape = g?.shape), g?.label && (l.label = g?.label), g?.icon && (l.icon = g?.icon.toString()), g?.assigned && (l.assigned = g?.assigned.toString()), g?.ticket && (l.ticket = g?.ticket.toString()), g?.priority && (l.priority = g?.priority);
509
- }
510
- const D = De(e);
511
- D ? l.parentId = D.id || "kbn" + ee++ : ne.push(l), v.push(l);
512
- }, "addNode"), f = {
513
- DEFAULT: 0,
514
- NO_BORDER: 0,
515
- ROUNDED_RECT: 1,
516
- RECT: 2,
517
- CIRCLE: 3,
518
- CLOUD: 4,
519
- BANG: 5,
520
- HEXAGON: 6
521
- }, Ie = /* @__PURE__ */ o((e, u) => {
522
- switch (te.debug("In get type", e, u), e) {
523
- case "[":
524
- return f.RECT;
525
- case "(":
526
- return u === ")" ? f.ROUNDED_RECT : f.CLOUD;
527
- case "((":
528
- return f.CIRCLE;
529
- case ")":
530
- return f.CLOUD;
531
- case "))":
532
- return f.BANG;
533
- case "{{":
534
- return f.HEXAGON;
535
- default:
536
- return f.DEFAULT;
537
- }
538
- }, "getType"), Ce = /* @__PURE__ */ o((e, u) => {
539
- ie[e] = u;
540
- }, "setElementForId"), we = /* @__PURE__ */ o((e) => {
541
- if (!e)
542
- return;
543
- const u = U(), p = v[v.length - 1];
544
- e.icon && (p.icon = j(e.icon, u)), e.class && (p.cssClasses = j(e.class, u));
545
- }, "decorateNode"), Ae = /* @__PURE__ */ o((e) => {
546
- switch (e) {
547
- case f.DEFAULT:
548
- return "no-border";
549
- case f.RECT:
550
- return "rect";
551
- case f.ROUNDED_RECT:
552
- return "rounded-rect";
553
- case f.CIRCLE:
554
- return "circle";
555
- case f.CLOUD:
556
- return "cloud";
557
- case f.BANG:
558
- return "bang";
559
- case f.HEXAGON:
560
- return "hexgon";
561
- default:
562
- return "no-border";
563
- }
564
- }, "type2Str"), Te = /* @__PURE__ */ o(() => te, "getLogger"), Re = /* @__PURE__ */ o((e) => ie[e], "getElementById"), Pe = {
565
- clear: ve,
566
- addNode: Oe,
567
- getSections: he,
568
- getData: Le,
569
- nodeType: f,
570
- getType: Ie,
571
- setElementForId: Ce,
572
- decorateNode: we,
573
- type2Str: Ae,
574
- getLogger: Te,
575
- getElementById: Re
576
- }, Ve = Pe, Be = /* @__PURE__ */ o(async (e, u, p, s) => {
577
- te.debug(`Rendering kanban diagram
578
- ` + e);
579
- const E = s.db.getData(), b = U();
580
- b.htmlLabels = !1;
581
- const l = fe(u), D = l.append("g");
582
- D.attr("class", "sections");
583
- const I = l.append("g");
584
- I.attr("class", "items");
585
- const g = E.nodes.filter(
586
- // TODO: TypeScript 5.5 will infer this predicate automatically
587
- (m) => m.isGroup
588
- );
589
- let w = 0;
590
- const _ = 10, G = [];
591
- let N = 25;
592
- for (const m of g) {
593
- const A = b?.kanban?.sectionWidth || 200;
594
- w = w + 1, m.x = A * w + (w - 1) * _ / 2, m.width = A, m.y = 0, m.height = A * 3, m.rx = 5, m.ry = 5, m.cssClasses = m.cssClasses + " section-" + w;
595
- const L = await ye(D, m);
596
- N = Math.max(N, L?.labelBBox?.height), G.push(L);
597
- }
598
- let V = 0;
599
- for (const m of g) {
600
- const A = G[V];
601
- V = V + 1;
602
- const L = b?.kanban?.sectionWidth || 200, H = -L * 3 / 2 + N;
603
- let T = H;
604
- const K = E.nodes.filter((i) => i.parentId === m.id);
605
- for (const i of K) {
606
- if (i.isGroup)
607
- throw new Error("Groups within groups are not allowed in Kanban diagrams");
608
- i.x = m.x, i.width = L - 1.5 * _;
609
- const r = (await be(I, i, { config: b })).node().getBBox();
610
- i.y = T + r.height / 2, await me(i), T = i.y + r.height / 2 + _ / 2;
611
- }
612
- const B = A.cluster.select("rect"), O = Math.max(T - H + 3 * _, 50) + (N - 25);
613
- B.attr("height", O);
614
- }
615
- _e(
616
- void 0,
617
- l,
618
- b.mindmap?.padding ?? Y.kanban.padding,
619
- b.mindmap?.useMaxWidth ?? Y.kanban.useMaxWidth
620
- );
621
- }, "draw"), Fe = {
622
- draw: Be
623
- }, je = /* @__PURE__ */ o((e) => {
624
- let u = "";
625
- for (let s = 0; s < e.THEME_COLOR_LIMIT; s++)
626
- e["lineColor" + s] = e["lineColor" + s] || e["cScaleInv" + s], Se(e["lineColor" + s]) ? e["lineColor" + s] = ce(e["lineColor" + s], 20) : e["lineColor" + s] = le(e["lineColor" + s], 20);
627
- const p = /* @__PURE__ */ o((s, d) => e.darkMode ? le(s, d) : ce(s, d), "adjuster");
628
- for (let s = 0; s < e.THEME_COLOR_LIMIT; s++) {
629
- const d = "" + (17 - 3 * s);
630
- u += `
631
- .section-${s - 1} rect, .section-${s - 1} path, .section-${s - 1} circle, .section-${s - 1} polygon, .section-${s - 1} path {
632
- fill: ${p(e["cScale" + s], 10)};
633
- stroke: ${p(e["cScale" + s], 10)};
634
-
635
- }
636
- .section-${s - 1} text {
637
- fill: ${e["cScaleLabel" + s]};
638
- }
639
- .node-icon-${s - 1} {
640
- font-size: 40px;
641
- color: ${e["cScaleLabel" + s]};
642
- }
643
- .section-edge-${s - 1}{
644
- stroke: ${e["cScale" + s]};
645
- }
646
- .edge-depth-${s - 1}{
647
- stroke-width: ${d};
648
- }
649
- .section-${s - 1} line {
650
- stroke: ${e["cScaleInv" + s]} ;
651
- stroke-width: 3;
652
- }
653
-
654
- .disabled, .disabled circle, .disabled text {
655
- fill: lightgray;
656
- }
657
- .disabled text {
658
- fill: #efefef;
659
- }
660
-
661
- .node rect,
662
- .node circle,
663
- .node ellipse,
664
- .node polygon,
665
- .node path {
666
- fill: ${e.background};
667
- stroke: ${e.nodeBorder};
668
- stroke-width: 1px;
669
- }
670
-
671
- .kanban-ticket-link {
672
- fill: ${e.background};
673
- stroke: ${e.nodeBorder};
674
- text-decoration: underline;
675
- }
676
- `;
677
- }
678
- return u;
679
- }, "genSections"), Ge = /* @__PURE__ */ o((e) => `
680
- .edge {
681
- stroke-width: 3;
682
- }
683
- ${je(e)}
684
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
685
- fill: ${e.git0};
686
- }
687
- .section-root text {
688
- fill: ${e.gitBranchLabel0};
689
- }
690
- .icon-container {
691
- height:100%;
692
- display: flex;
693
- justify-content: center;
694
- align-items: center;
695
- }
696
- .edge {
697
- fill: none;
698
- }
699
- .cluster-label, .label {
700
- color: ${e.textColor};
701
- fill: ${e.textColor};
702
- }
703
- .kanban-label {
704
- dy: 1em;
705
- alignment-baseline: middle;
706
- text-anchor: middle;
707
- dominant-baseline: middle;
708
- text-align: center;
709
- }
710
- ${Ne()}
711
- `, "getStyles"), He = Ge, ze = {
712
- db: Ve,
713
- renderer: Fe,
714
- parser: xe,
715
- styles: He
716
- };
717
- export {
718
- ze as diagram
719
- };