hexagon-editor 0.1.4 → 0.1.6
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/README.md +24 -11
- package/dist/MarkdownEditor.vue.d.ts +28 -26
- package/dist/MarkdownEditor.vue.d.ts.map +1 -1
- package/dist/{MarkdownEditorLinkForm-C7CGgA83.js → MarkdownEditorLinkForm-B9dEX3WT.js} +1 -1
- package/dist/{base-Bnv2-Te4.js → base-BPdMUtQo.js} +141 -137
- package/dist/components/MarkdownEditorToolbar.vue.d.ts +4 -3
- package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
- package/dist/configure.d.ts +0 -2
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +11 -12
- package/dist/core/basic-editor-markdown.d.ts.map +1 -1
- package/dist/core/basic-editor-renderers.d.ts +6 -4
- package/dist/core/basic-editor-renderers.d.ts.map +1 -1
- package/dist/core/basic-editor-types.d.ts +2 -0
- package/dist/core/basic-editor-types.d.ts.map +1 -1
- package/dist/core/basic-editor.d.ts +1 -1
- package/dist/core/basic-editor.d.ts.map +1 -1
- package/dist/core/index.d.ts +0 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/markup-editor.d.ts.map +1 -1
- package/dist/core.js +28 -31
- package/dist/extensions.js +1 -1
- package/dist/forms/MarkdownEditorImageForm.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
- package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorTextInput.vue.d.ts +2 -2
- package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/{full-C-o2lPBX.js → full-Da8esvj2.js} +1 -1
- package/dist/{full-specs-Cl-ODShc.js → full-specs-hXKoMF-0.js} +1 -1
- package/dist/index-D_CMntQU.js +3173 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3611 -1284
- package/dist/{markup-commands-BckOOKIe.js → markup-commands-BYsx8ADT.js} +1993 -1963
- package/dist/presets.js +2 -2
- package/dist/public-types.d.ts +22 -0
- package/dist/public-types.d.ts.map +1 -1
- package/dist/renderer/MarkdownRenderer.vue.d.ts +2 -0
- package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/renderer/markdown.d.ts +2 -1
- package/dist/renderer/markdown.d.ts.map +1 -1
- package/dist/renderer.css +1 -1
- package/dist/renderer.js +142 -146
- package/package.json +106 -108
- package/dist/MarkdownEditorLinkForm.css +0 -1
- package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +0 -87
- package/dist/arc-y6UeoJpJ.js +0 -83
- package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +0 -4778
- package/dist/base.css +0 -1
- package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +0 -2419
- package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +0 -1577
- package/dist/channel-BwXGcavV.js +0 -5
- package/dist/chunk-2GRJ4B5K-O75udjPr.js +0 -68
- package/dist/chunk-2Q5K7J3B-CySL0lOA.js +0 -15
- package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +0 -1408
- package/dist/chunk-5VM5RSS4--it1VJIv.js +0 -19
- package/dist/chunk-6Q2QTUOP-DNiML-50.js +0 -664
- package/dist/chunk-GF5L2VYU-z7A-k0-V.js +0 -1533
- package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +0 -8
- package/dist/chunk-KBJHAD2P-D4R1VW0r.js +0 -19
- package/dist/chunk-RYQCIY6F-DmJAYxq8.js +0 -313
- package/dist/chunk-XXDRQBXY-CK913N-t.js +0 -8
- package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +0 -16
- package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +0 -16
- package/dist/core/optional-renderers.d.ts +0 -9
- package/dist/core/optional-renderers.d.ts.map +0 -1
- package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +0 -2608
- package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +0 -23766
- package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +0 -299
- package/dist/cytoscape.esm-3W4EOjxC.js +0 -18756
- package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +0 -340
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/diagram-7IWD3JNH-BrApu1hz.js +0 -350
- package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +0 -461
- package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +0 -142
- package/dist/diagram-Q27KOJAE-DWIltqIH.js +0 -528
- package/dist/diagram-UB23O5K3-B7z2Lj3K.js +0 -219
- package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +0 -109
- package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +0 -910
- package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +0 -1638
- package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +0 -2711
- package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +0 -815
- package/dist/graph-DAHC4kPm.js +0 -1545
- package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +0 -24
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +0 -621
- package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +0 -834
- package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +0 -724
- package/dist/katex-ByXcxnHy.js +0 -14436
- package/dist/katex-DoRnZ_sp.js +0 -11682
- package/dist/layout-DBbo_M5I.js +0 -1519
- package/dist/linear-BEdRfKba.js +0 -259
- package/dist/map-DRdzG8Ho.js +0 -224
- package/dist/markup-commands.css +0 -1
- package/dist/mermaid.core-CR0bA2Wa.js +0 -16496
- package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +0 -827
- package/dist/optional-renderers-BalvqqvY.js +0 -11
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +0 -95
- package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +0 -207
- package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +0 -1023
- package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +0 -77
- package/dist/renderer/mermaid-runtime.d.ts +0 -4
- package/dist/renderer/mermaid-runtime.d.ts.map +0 -1
- package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +0 -882
- package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +0 -847
- package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +0 -2888
- package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +0 -46
- package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +0 -263
- package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +0 -16
- package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +0 -5332
- package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +0 -13
- package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +0 -1055
- package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +0 -1578
- package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +0 -675
- package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +0 -1388
|
@@ -1,827 +0,0 @@
|
|
|
1
|
-
import { g as ae } from "./chunk-XXDRQBXY-CK913N-t.js";
|
|
2
|
-
import { s as ce } from "./chunk-KBJHAD2P-D4R1VW0r.js";
|
|
3
|
-
import { _ as h, l as I, u as le, v as he, y as de, B as j, c as P, i as G, b6 as ge, T as ue, U as pe, V as fe } from "./mermaid.core-CR0bA2Wa.js";
|
|
4
|
-
const _ = [];
|
|
5
|
-
for (let t = 0; t < 256; ++t)
|
|
6
|
-
_.push((t + 256).toString(16).slice(1));
|
|
7
|
-
function me(t, e = 0) {
|
|
8
|
-
return (_[t[e + 0]] + _[t[e + 1]] + _[t[e + 2]] + _[t[e + 3]] + "-" + _[t[e + 4]] + _[t[e + 5]] + "-" + _[t[e + 6]] + _[t[e + 7]] + "-" + _[t[e + 8]] + _[t[e + 9]] + "-" + _[t[e + 10]] + _[t[e + 11]] + _[t[e + 12]] + _[t[e + 13]] + _[t[e + 14]] + _[t[e + 15]]).toLowerCase();
|
|
9
|
-
}
|
|
10
|
-
const ye = new Uint8Array(16);
|
|
11
|
-
function Ee() {
|
|
12
|
-
return crypto.getRandomValues(ye);
|
|
13
|
-
}
|
|
14
|
-
function _e(t, e, a) {
|
|
15
|
-
return crypto.randomUUID ? crypto.randomUUID() : be(t);
|
|
16
|
-
}
|
|
17
|
-
function be(t, e, a) {
|
|
18
|
-
t = t || {};
|
|
19
|
-
const l = t.random ?? t.rng?.() ?? Ee();
|
|
20
|
-
if (l.length < 16)
|
|
21
|
-
throw new Error("Random bytes length must be >= 16");
|
|
22
|
-
return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, me(l);
|
|
23
|
-
}
|
|
24
|
-
var q = (function() {
|
|
25
|
-
var t = /* @__PURE__ */ h(function(L, s, i, o) {
|
|
26
|
-
for (i = i || {}, o = L.length; o--; i[L[o]] = s) ;
|
|
27
|
-
return i;
|
|
28
|
-
}, "o"), e = [1, 4], a = [1, 13], l = [1, 12], n = [1, 15], d = [1, 16], f = [1, 20], y = [1, 19], E = [6, 7, 8], b = [1, 26], v = [1, 24], R = [1, 25], g = [6, 7, 11], A = [1, 6, 13, 15, 16, 19, 22], J = [1, 33], K = [1, 34], $ = [1, 6, 7, 11, 13, 15, 16, 19, 22], H = {
|
|
29
|
-
trace: /* @__PURE__ */ h(function() {
|
|
30
|
-
}, "trace"),
|
|
31
|
-
yy: {},
|
|
32
|
-
symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
|
|
33
|
-
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
|
34
|
-
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, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
|
35
|
-
performAction: /* @__PURE__ */ h(function(s, i, o, c, p, r, B) {
|
|
36
|
-
var u = r.length - 1;
|
|
37
|
-
switch (p) {
|
|
38
|
-
case 6:
|
|
39
|
-
case 7:
|
|
40
|
-
return c;
|
|
41
|
-
case 8:
|
|
42
|
-
c.getLogger().trace("Stop NL ");
|
|
43
|
-
break;
|
|
44
|
-
case 9:
|
|
45
|
-
c.getLogger().trace("Stop EOF ");
|
|
46
|
-
break;
|
|
47
|
-
case 11:
|
|
48
|
-
c.getLogger().trace("Stop NL2 ");
|
|
49
|
-
break;
|
|
50
|
-
case 12:
|
|
51
|
-
c.getLogger().trace("Stop EOF2 ");
|
|
52
|
-
break;
|
|
53
|
-
case 15:
|
|
54
|
-
c.getLogger().info("Node: ", r[u].id), c.addNode(r[u - 1].length, r[u].id, r[u].descr, r[u].type);
|
|
55
|
-
break;
|
|
56
|
-
case 16:
|
|
57
|
-
c.getLogger().trace("Icon: ", r[u]), c.decorateNode({ icon: r[u] });
|
|
58
|
-
break;
|
|
59
|
-
case 17:
|
|
60
|
-
case 21:
|
|
61
|
-
c.decorateNode({ class: r[u] });
|
|
62
|
-
break;
|
|
63
|
-
case 18:
|
|
64
|
-
c.getLogger().trace("SPACELIST");
|
|
65
|
-
break;
|
|
66
|
-
case 19:
|
|
67
|
-
c.getLogger().trace("Node: ", r[u].id), c.addNode(0, r[u].id, r[u].descr, r[u].type);
|
|
68
|
-
break;
|
|
69
|
-
case 20:
|
|
70
|
-
c.decorateNode({ icon: r[u] });
|
|
71
|
-
break;
|
|
72
|
-
case 25:
|
|
73
|
-
c.getLogger().trace("node found ..", r[u - 2]), this.$ = { id: r[u - 1], descr: r[u - 1], type: c.getType(r[u - 2], r[u]) };
|
|
74
|
-
break;
|
|
75
|
-
case 26:
|
|
76
|
-
this.$ = { id: r[u], descr: r[u], type: c.nodeType.DEFAULT };
|
|
77
|
-
break;
|
|
78
|
-
case 27:
|
|
79
|
-
c.getLogger().trace("node found ..", r[u - 3]), this.$ = { id: r[u - 3], descr: r[u - 1], type: c.getType(r[u - 2], r[u]) };
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}, "anonymous"),
|
|
83
|
-
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: a, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(E, [2, 3]), { 1: [2, 2] }, t(E, [2, 4]), t(E, [2, 5]), { 1: [2, 6], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: a, 9: 22, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: b, 7: v, 10: 23, 11: R }, t(g, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: f, 22: y }), t(g, [2, 18]), t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), t(g, [2, 23]), t(g, [2, 24]), t(g, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: b, 7: v, 10: 32, 11: R }, { 1: [2, 7], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(A, [2, 14], { 7: J, 11: K }), t($, [2, 8]), t($, [2, 9]), t($, [2, 10]), t(g, [2, 15]), t(g, [2, 16]), t(g, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(A, [2, 13], { 7: J, 11: K }), t($, [2, 11]), t($, [2, 12]), { 21: [1, 37] }, t(g, [2, 25]), t(g, [2, 27])],
|
|
84
|
-
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
85
|
-
parseError: /* @__PURE__ */ h(function(s, i) {
|
|
86
|
-
if (i.recoverable)
|
|
87
|
-
this.trace(s);
|
|
88
|
-
else {
|
|
89
|
-
var o = new Error(s);
|
|
90
|
-
throw o.hash = i, o;
|
|
91
|
-
}
|
|
92
|
-
}, "parseError"),
|
|
93
|
-
parse: /* @__PURE__ */ h(function(s) {
|
|
94
|
-
var i = this, o = [0], c = [], p = [null], r = [], B = this.table, u = "", U = 0, Q = 0, ie = 2, Z = 1, se = r.slice.call(arguments, 1), m = Object.create(this.lexer), T = { yy: {} };
|
|
95
|
-
for (var W in this.yy)
|
|
96
|
-
Object.prototype.hasOwnProperty.call(this.yy, W) && (T.yy[W] = this.yy[W]);
|
|
97
|
-
m.setInput(s, T.yy), T.yy.lexer = m, T.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
|
|
98
|
-
var z = m.yylloc;
|
|
99
|
-
r.push(z);
|
|
100
|
-
var re = m.options && m.options.ranges;
|
|
101
|
-
typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
102
|
-
function oe(S) {
|
|
103
|
-
o.length = o.length - 2 * S, p.length = p.length - S, r.length = r.length - S;
|
|
104
|
-
}
|
|
105
|
-
h(oe, "popStack");
|
|
106
|
-
function ee() {
|
|
107
|
-
var S;
|
|
108
|
-
return S = c.pop() || m.lex() || Z, typeof S != "number" && (S instanceof Array && (c = S, S = c.pop()), S = i.symbols_[S] || S), S;
|
|
109
|
-
}
|
|
110
|
-
h(ee, "lex");
|
|
111
|
-
for (var k, O, x, X, C = {}, V, N, te, F; ; ) {
|
|
112
|
-
if (O = o[o.length - 1], this.defaultActions[O] ? x = this.defaultActions[O] : ((k === null || typeof k > "u") && (k = ee()), x = B[O] && B[O][k]), typeof x > "u" || !x.length || !x[0]) {
|
|
113
|
-
var Y = "";
|
|
114
|
-
F = [];
|
|
115
|
-
for (V in B[O])
|
|
116
|
-
this.terminals_[V] && V > ie && F.push("'" + this.terminals_[V] + "'");
|
|
117
|
-
m.showPosition ? Y = "Parse error on line " + (U + 1) + `:
|
|
118
|
-
` + m.showPosition() + `
|
|
119
|
-
Expecting ` + F.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Y = "Parse error on line " + (U + 1) + ": Unexpected " + (k == Z ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Y, {
|
|
120
|
-
text: m.match,
|
|
121
|
-
token: this.terminals_[k] || k,
|
|
122
|
-
line: m.yylineno,
|
|
123
|
-
loc: z,
|
|
124
|
-
expected: F
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
if (x[0] instanceof Array && x.length > 1)
|
|
128
|
-
throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + k);
|
|
129
|
-
switch (x[0]) {
|
|
130
|
-
case 1:
|
|
131
|
-
o.push(k), p.push(m.yytext), r.push(m.yylloc), o.push(x[1]), k = null, Q = m.yyleng, u = m.yytext, U = m.yylineno, z = m.yylloc;
|
|
132
|
-
break;
|
|
133
|
-
case 2:
|
|
134
|
-
if (N = this.productions_[x[1]][1], C.$ = p[p.length - N], C._$ = {
|
|
135
|
-
first_line: r[r.length - (N || 1)].first_line,
|
|
136
|
-
last_line: r[r.length - 1].last_line,
|
|
137
|
-
first_column: r[r.length - (N || 1)].first_column,
|
|
138
|
-
last_column: r[r.length - 1].last_column
|
|
139
|
-
}, re && (C._$.range = [
|
|
140
|
-
r[r.length - (N || 1)].range[0],
|
|
141
|
-
r[r.length - 1].range[1]
|
|
142
|
-
]), X = this.performAction.apply(C, [
|
|
143
|
-
u,
|
|
144
|
-
Q,
|
|
145
|
-
U,
|
|
146
|
-
T.yy,
|
|
147
|
-
x[1],
|
|
148
|
-
p,
|
|
149
|
-
r
|
|
150
|
-
].concat(se)), typeof X < "u")
|
|
151
|
-
return X;
|
|
152
|
-
N && (o = o.slice(0, -1 * N * 2), p = p.slice(0, -1 * N), r = r.slice(0, -1 * N)), o.push(this.productions_[x[1]][0]), p.push(C.$), r.push(C._$), te = B[o[o.length - 2]][o[o.length - 1]], o.push(te);
|
|
153
|
-
break;
|
|
154
|
-
case 3:
|
|
155
|
-
return !0;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return !0;
|
|
159
|
-
}, "parse")
|
|
160
|
-
}, ne = /* @__PURE__ */ (function() {
|
|
161
|
-
var L = {
|
|
162
|
-
EOF: 1,
|
|
163
|
-
parseError: /* @__PURE__ */ h(function(i, o) {
|
|
164
|
-
if (this.yy.parser)
|
|
165
|
-
this.yy.parser.parseError(i, o);
|
|
166
|
-
else
|
|
167
|
-
throw new Error(i);
|
|
168
|
-
}, "parseError"),
|
|
169
|
-
// resets the lexer, sets new input
|
|
170
|
-
setInput: /* @__PURE__ */ h(function(s, i) {
|
|
171
|
-
return this.yy = i || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
172
|
-
first_line: 1,
|
|
173
|
-
first_column: 0,
|
|
174
|
-
last_line: 1,
|
|
175
|
-
last_column: 0
|
|
176
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
177
|
-
}, "setInput"),
|
|
178
|
-
// consumes and returns one char from the input
|
|
179
|
-
input: /* @__PURE__ */ h(function() {
|
|
180
|
-
var s = this._input[0];
|
|
181
|
-
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
|
182
|
-
var i = s.match(/(?:\r\n?|\n).*/g);
|
|
183
|
-
return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
|
|
184
|
-
}, "input"),
|
|
185
|
-
// unshifts one char (or a string) into the input
|
|
186
|
-
unput: /* @__PURE__ */ h(function(s) {
|
|
187
|
-
var i = s.length, o = s.split(/(?:\r\n?|\n)/g);
|
|
188
|
-
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
|
|
189
|
-
var c = this.match.split(/(?:\r\n?|\n)/g);
|
|
190
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
|
|
191
|
-
var p = this.yylloc.range;
|
|
192
|
-
return this.yylloc = {
|
|
193
|
-
first_line: this.yylloc.first_line,
|
|
194
|
-
last_line: this.yylineno + 1,
|
|
195
|
-
first_column: this.yylloc.first_column,
|
|
196
|
-
last_column: o ? (o.length === c.length ? this.yylloc.first_column : 0) + c[c.length - o.length].length - o[0].length : this.yylloc.first_column - i
|
|
197
|
-
}, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
|
|
198
|
-
}, "unput"),
|
|
199
|
-
// When called from action, caches matched text and appends it on next action
|
|
200
|
-
more: /* @__PURE__ */ h(function() {
|
|
201
|
-
return this._more = !0, this;
|
|
202
|
-
}, "more"),
|
|
203
|
-
// 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.
|
|
204
|
-
reject: /* @__PURE__ */ h(function() {
|
|
205
|
-
if (this.options.backtrack_lexer)
|
|
206
|
-
this._backtrack = !0;
|
|
207
|
-
else
|
|
208
|
-
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).
|
|
209
|
-
` + this.showPosition(), {
|
|
210
|
-
text: "",
|
|
211
|
-
token: null,
|
|
212
|
-
line: this.yylineno
|
|
213
|
-
});
|
|
214
|
-
return this;
|
|
215
|
-
}, "reject"),
|
|
216
|
-
// retain first n characters of the match
|
|
217
|
-
less: /* @__PURE__ */ h(function(s) {
|
|
218
|
-
this.unput(this.match.slice(s));
|
|
219
|
-
}, "less"),
|
|
220
|
-
// displays already matched input, i.e. for error messages
|
|
221
|
-
pastInput: /* @__PURE__ */ h(function() {
|
|
222
|
-
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
|
223
|
-
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
|
224
|
-
}, "pastInput"),
|
|
225
|
-
// displays upcoming input, i.e. for error messages
|
|
226
|
-
upcomingInput: /* @__PURE__ */ h(function() {
|
|
227
|
-
var s = this.match;
|
|
228
|
-
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
229
|
-
}, "upcomingInput"),
|
|
230
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
231
|
-
showPosition: /* @__PURE__ */ h(function() {
|
|
232
|
-
var s = this.pastInput(), i = new Array(s.length + 1).join("-");
|
|
233
|
-
return s + this.upcomingInput() + `
|
|
234
|
-
` + i + "^";
|
|
235
|
-
}, "showPosition"),
|
|
236
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
237
|
-
test_match: /* @__PURE__ */ h(function(s, i) {
|
|
238
|
-
var o, c, p;
|
|
239
|
-
if (this.options.backtrack_lexer && (p = {
|
|
240
|
-
yylineno: this.yylineno,
|
|
241
|
-
yylloc: {
|
|
242
|
-
first_line: this.yylloc.first_line,
|
|
243
|
-
last_line: this.last_line,
|
|
244
|
-
first_column: this.yylloc.first_column,
|
|
245
|
-
last_column: this.yylloc.last_column
|
|
246
|
-
},
|
|
247
|
-
yytext: this.yytext,
|
|
248
|
-
match: this.match,
|
|
249
|
-
matches: this.matches,
|
|
250
|
-
matched: this.matched,
|
|
251
|
-
yyleng: this.yyleng,
|
|
252
|
-
offset: this.offset,
|
|
253
|
-
_more: this._more,
|
|
254
|
-
_input: this._input,
|
|
255
|
-
yy: this.yy,
|
|
256
|
-
conditionStack: this.conditionStack.slice(0),
|
|
257
|
-
done: this.done
|
|
258
|
-
}, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), c = s[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
|
|
259
|
-
first_line: this.yylloc.last_line,
|
|
260
|
-
last_line: this.yylineno + 1,
|
|
261
|
-
first_column: this.yylloc.last_column,
|
|
262
|
-
last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
|
263
|
-
}, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
|
|
264
|
-
return o;
|
|
265
|
-
if (this._backtrack) {
|
|
266
|
-
for (var r in p)
|
|
267
|
-
this[r] = p[r];
|
|
268
|
-
return !1;
|
|
269
|
-
}
|
|
270
|
-
return !1;
|
|
271
|
-
}, "test_match"),
|
|
272
|
-
// return next match in input
|
|
273
|
-
next: /* @__PURE__ */ h(function() {
|
|
274
|
-
if (this.done)
|
|
275
|
-
return this.EOF;
|
|
276
|
-
this._input || (this.done = !0);
|
|
277
|
-
var s, i, o, c;
|
|
278
|
-
this._more || (this.yytext = "", this.match = "");
|
|
279
|
-
for (var p = this._currentRules(), r = 0; r < p.length; r++)
|
|
280
|
-
if (o = this._input.match(this.rules[p[r]]), o && (!i || o[0].length > i[0].length)) {
|
|
281
|
-
if (i = o, c = r, this.options.backtrack_lexer) {
|
|
282
|
-
if (s = this.test_match(o, p[r]), s !== !1)
|
|
283
|
-
return s;
|
|
284
|
-
if (this._backtrack) {
|
|
285
|
-
i = !1;
|
|
286
|
-
continue;
|
|
287
|
-
} else
|
|
288
|
-
return !1;
|
|
289
|
-
} else if (!this.options.flex)
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
return i ? (s = this.test_match(i, p[c]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
293
|
-
` + this.showPosition(), {
|
|
294
|
-
text: "",
|
|
295
|
-
token: null,
|
|
296
|
-
line: this.yylineno
|
|
297
|
-
});
|
|
298
|
-
}, "next"),
|
|
299
|
-
// return next match that has a token
|
|
300
|
-
lex: /* @__PURE__ */ h(function() {
|
|
301
|
-
var i = this.next();
|
|
302
|
-
return i || this.lex();
|
|
303
|
-
}, "lex"),
|
|
304
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
305
|
-
begin: /* @__PURE__ */ h(function(i) {
|
|
306
|
-
this.conditionStack.push(i);
|
|
307
|
-
}, "begin"),
|
|
308
|
-
// pop the previously active lexer condition state off the condition stack
|
|
309
|
-
popState: /* @__PURE__ */ h(function() {
|
|
310
|
-
var i = this.conditionStack.length - 1;
|
|
311
|
-
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
312
|
-
}, "popState"),
|
|
313
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
314
|
-
_currentRules: /* @__PURE__ */ h(function() {
|
|
315
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
316
|
-
}, "_currentRules"),
|
|
317
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
318
|
-
topState: /* @__PURE__ */ h(function(i) {
|
|
319
|
-
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
320
|
-
}, "topState"),
|
|
321
|
-
// alias for begin(condition)
|
|
322
|
-
pushState: /* @__PURE__ */ h(function(i) {
|
|
323
|
-
this.begin(i);
|
|
324
|
-
}, "pushState"),
|
|
325
|
-
// return the number of states currently on the stack
|
|
326
|
-
stateStackSize: /* @__PURE__ */ h(function() {
|
|
327
|
-
return this.conditionStack.length;
|
|
328
|
-
}, "stateStackSize"),
|
|
329
|
-
options: { "case-insensitive": !0 },
|
|
330
|
-
performAction: /* @__PURE__ */ h(function(i, o, c, p) {
|
|
331
|
-
switch (c) {
|
|
332
|
-
case 0:
|
|
333
|
-
return i.getLogger().trace("Found comment", o.yytext), 6;
|
|
334
|
-
case 1:
|
|
335
|
-
return 8;
|
|
336
|
-
case 2:
|
|
337
|
-
this.begin("CLASS");
|
|
338
|
-
break;
|
|
339
|
-
case 3:
|
|
340
|
-
return this.popState(), 16;
|
|
341
|
-
case 4:
|
|
342
|
-
this.popState();
|
|
343
|
-
break;
|
|
344
|
-
case 5:
|
|
345
|
-
i.getLogger().trace("Begin icon"), this.begin("ICON");
|
|
346
|
-
break;
|
|
347
|
-
case 6:
|
|
348
|
-
return i.getLogger().trace("SPACELINE"), 6;
|
|
349
|
-
case 7:
|
|
350
|
-
return 7;
|
|
351
|
-
case 8:
|
|
352
|
-
return 15;
|
|
353
|
-
case 9:
|
|
354
|
-
i.getLogger().trace("end icon"), this.popState();
|
|
355
|
-
break;
|
|
356
|
-
case 10:
|
|
357
|
-
return i.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
|
|
358
|
-
case 11:
|
|
359
|
-
return i.getLogger().trace("Cloud"), this.begin("NODE"), 19;
|
|
360
|
-
case 12:
|
|
361
|
-
return i.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
|
|
362
|
-
case 13:
|
|
363
|
-
return i.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
|
|
364
|
-
case 14:
|
|
365
|
-
return this.begin("NODE"), 19;
|
|
366
|
-
case 15:
|
|
367
|
-
return this.begin("NODE"), 19;
|
|
368
|
-
case 16:
|
|
369
|
-
return this.begin("NODE"), 19;
|
|
370
|
-
case 17:
|
|
371
|
-
return this.begin("NODE"), 19;
|
|
372
|
-
case 18:
|
|
373
|
-
return 13;
|
|
374
|
-
case 19:
|
|
375
|
-
return 22;
|
|
376
|
-
case 20:
|
|
377
|
-
return 11;
|
|
378
|
-
case 21:
|
|
379
|
-
this.begin("NSTR2");
|
|
380
|
-
break;
|
|
381
|
-
case 22:
|
|
382
|
-
return "NODE_DESCR";
|
|
383
|
-
case 23:
|
|
384
|
-
this.popState();
|
|
385
|
-
break;
|
|
386
|
-
case 24:
|
|
387
|
-
i.getLogger().trace("Starting NSTR"), this.begin("NSTR");
|
|
388
|
-
break;
|
|
389
|
-
case 25:
|
|
390
|
-
return i.getLogger().trace("description:", o.yytext), "NODE_DESCR";
|
|
391
|
-
case 26:
|
|
392
|
-
this.popState();
|
|
393
|
-
break;
|
|
394
|
-
case 27:
|
|
395
|
-
return this.popState(), i.getLogger().trace("node end ))"), "NODE_DEND";
|
|
396
|
-
case 28:
|
|
397
|
-
return this.popState(), i.getLogger().trace("node end )"), "NODE_DEND";
|
|
398
|
-
case 29:
|
|
399
|
-
return this.popState(), i.getLogger().trace("node end ...", o.yytext), "NODE_DEND";
|
|
400
|
-
case 30:
|
|
401
|
-
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
402
|
-
case 31:
|
|
403
|
-
return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
|
|
404
|
-
case 32:
|
|
405
|
-
return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
|
|
406
|
-
case 33:
|
|
407
|
-
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
408
|
-
case 34:
|
|
409
|
-
return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
|
|
410
|
-
case 35:
|
|
411
|
-
return i.getLogger().trace("Long description:", o.yytext), 20;
|
|
412
|
-
case 36:
|
|
413
|
-
return i.getLogger().trace("Long description:", o.yytext), 20;
|
|
414
|
-
}
|
|
415
|
-
}, "anonymous"),
|
|
416
|
-
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\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],
|
|
417
|
-
conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
|
|
418
|
-
};
|
|
419
|
-
return L;
|
|
420
|
-
})();
|
|
421
|
-
H.lexer = ne;
|
|
422
|
-
function M() {
|
|
423
|
-
this.yy = {};
|
|
424
|
-
}
|
|
425
|
-
return h(M, "Parser"), M.prototype = H, H.Parser = M, new M();
|
|
426
|
-
})();
|
|
427
|
-
q.parser = q;
|
|
428
|
-
var ke = q, Se = 12, D = {
|
|
429
|
-
DEFAULT: 0,
|
|
430
|
-
NO_BORDER: 0,
|
|
431
|
-
ROUNDED_RECT: 1,
|
|
432
|
-
RECT: 2,
|
|
433
|
-
CIRCLE: 3,
|
|
434
|
-
CLOUD: 4,
|
|
435
|
-
BANG: 5,
|
|
436
|
-
HEXAGON: 6
|
|
437
|
-
}, w, xe = (w = class {
|
|
438
|
-
constructor() {
|
|
439
|
-
this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = D, this.clear(), this.getType = this.getType.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
|
|
440
|
-
}
|
|
441
|
-
clear() {
|
|
442
|
-
this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
|
|
443
|
-
}
|
|
444
|
-
getParent(e) {
|
|
445
|
-
for (let a = this.nodes.length - 1; a >= 0; a--)
|
|
446
|
-
if (this.nodes[a].level < e)
|
|
447
|
-
return this.nodes[a];
|
|
448
|
-
return null;
|
|
449
|
-
}
|
|
450
|
-
getMindmap() {
|
|
451
|
-
return this.nodes.length > 0 ? this.nodes[0] : null;
|
|
452
|
-
}
|
|
453
|
-
addNode(e, a, l, n) {
|
|
454
|
-
I.info("addNode", e, a, l, n);
|
|
455
|
-
let d = !1;
|
|
456
|
-
this.nodes.length === 0 ? (this.baseLevel = e, e = 0, d = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, d = !1);
|
|
457
|
-
const f = P();
|
|
458
|
-
let y = f.mindmap?.padding ?? j.mindmap.padding;
|
|
459
|
-
switch (n) {
|
|
460
|
-
case this.nodeType.ROUNDED_RECT:
|
|
461
|
-
case this.nodeType.RECT:
|
|
462
|
-
case this.nodeType.HEXAGON:
|
|
463
|
-
y *= 2;
|
|
464
|
-
break;
|
|
465
|
-
}
|
|
466
|
-
const E = {
|
|
467
|
-
id: this.count++,
|
|
468
|
-
nodeId: G(a, f),
|
|
469
|
-
level: e,
|
|
470
|
-
descr: G(l, f),
|
|
471
|
-
type: n,
|
|
472
|
-
children: [],
|
|
473
|
-
width: f.mindmap?.maxNodeWidth ?? j.mindmap.maxNodeWidth,
|
|
474
|
-
padding: y,
|
|
475
|
-
isRoot: d
|
|
476
|
-
}, b = this.getParent(e);
|
|
477
|
-
if (b)
|
|
478
|
-
b.children.push(E), this.nodes.push(E);
|
|
479
|
-
else if (d)
|
|
480
|
-
this.nodes.push(E);
|
|
481
|
-
else
|
|
482
|
-
throw new Error(
|
|
483
|
-
`There can be only one root. No parent could be found for ("${E.descr}")`
|
|
484
|
-
);
|
|
485
|
-
}
|
|
486
|
-
getType(e, a) {
|
|
487
|
-
switch (I.debug("In get type", e, a), e) {
|
|
488
|
-
case "[":
|
|
489
|
-
return this.nodeType.RECT;
|
|
490
|
-
case "(":
|
|
491
|
-
return a === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
|
|
492
|
-
case "((":
|
|
493
|
-
return this.nodeType.CIRCLE;
|
|
494
|
-
case ")":
|
|
495
|
-
return this.nodeType.CLOUD;
|
|
496
|
-
case "))":
|
|
497
|
-
return this.nodeType.BANG;
|
|
498
|
-
case "{{":
|
|
499
|
-
return this.nodeType.HEXAGON;
|
|
500
|
-
default:
|
|
501
|
-
return this.nodeType.DEFAULT;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
setElementForId(e, a) {
|
|
505
|
-
this.elements[e] = a;
|
|
506
|
-
}
|
|
507
|
-
getElementById(e) {
|
|
508
|
-
return this.elements[e];
|
|
509
|
-
}
|
|
510
|
-
decorateNode(e) {
|
|
511
|
-
if (!e)
|
|
512
|
-
return;
|
|
513
|
-
const a = P(), l = this.nodes[this.nodes.length - 1];
|
|
514
|
-
e.icon && (l.icon = G(e.icon, a)), e.class && (l.class = G(e.class, a));
|
|
515
|
-
}
|
|
516
|
-
type2Str(e) {
|
|
517
|
-
switch (e) {
|
|
518
|
-
case this.nodeType.DEFAULT:
|
|
519
|
-
return "no-border";
|
|
520
|
-
case this.nodeType.RECT:
|
|
521
|
-
return "rect";
|
|
522
|
-
case this.nodeType.ROUNDED_RECT:
|
|
523
|
-
return "rounded-rect";
|
|
524
|
-
case this.nodeType.CIRCLE:
|
|
525
|
-
return "circle";
|
|
526
|
-
case this.nodeType.CLOUD:
|
|
527
|
-
return "cloud";
|
|
528
|
-
case this.nodeType.BANG:
|
|
529
|
-
return "bang";
|
|
530
|
-
case this.nodeType.HEXAGON:
|
|
531
|
-
return "hexgon";
|
|
532
|
-
// cspell: disable-line
|
|
533
|
-
default:
|
|
534
|
-
return "no-border";
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Assign section numbers to nodes based on their position relative to root
|
|
539
|
-
* @param node - The mindmap node to process
|
|
540
|
-
* @param sectionNumber - The section number to assign (undefined for root)
|
|
541
|
-
*/
|
|
542
|
-
assignSections(e, a) {
|
|
543
|
-
if (e.level === 0 ? e.section = void 0 : e.section = a, e.children)
|
|
544
|
-
for (const [l, n] of e.children.entries()) {
|
|
545
|
-
const d = e.level === 0 ? l % (Se - 1) : a;
|
|
546
|
-
this.assignSections(n, d);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Convert mindmap tree structure to flat array of nodes
|
|
551
|
-
* @param node - The mindmap node to process
|
|
552
|
-
* @param processedNodes - Array to collect processed nodes
|
|
553
|
-
*/
|
|
554
|
-
flattenNodes(e, a) {
|
|
555
|
-
const l = P(), n = ["mindmap-node"];
|
|
556
|
-
e.isRoot === !0 ? n.push("section-root", "section--1") : e.section !== void 0 && n.push(`section-${e.section}`), e.class && n.push(e.class);
|
|
557
|
-
const d = n.join(" "), f = /* @__PURE__ */ h((E) => {
|
|
558
|
-
const v = (l.theme?.toLowerCase() ?? "").includes("redux");
|
|
559
|
-
switch (E) {
|
|
560
|
-
case D.CIRCLE:
|
|
561
|
-
return "mindmapCircle";
|
|
562
|
-
case D.RECT:
|
|
563
|
-
return "rect";
|
|
564
|
-
case D.ROUNDED_RECT:
|
|
565
|
-
return "rounded";
|
|
566
|
-
case D.CLOUD:
|
|
567
|
-
return "cloud";
|
|
568
|
-
case D.BANG:
|
|
569
|
-
return "bang";
|
|
570
|
-
case D.HEXAGON:
|
|
571
|
-
return "hexagon";
|
|
572
|
-
case D.DEFAULT:
|
|
573
|
-
return v ? "rounded" : "defaultMindmapNode";
|
|
574
|
-
case D.NO_BORDER:
|
|
575
|
-
default:
|
|
576
|
-
return "rect";
|
|
577
|
-
}
|
|
578
|
-
}, "getShapeFromType"), y = {
|
|
579
|
-
id: e.id.toString(),
|
|
580
|
-
domId: "node_" + e.id.toString(),
|
|
581
|
-
label: e.descr,
|
|
582
|
-
labelType: "markdown",
|
|
583
|
-
isGroup: !1,
|
|
584
|
-
shape: f(e.type),
|
|
585
|
-
width: e.width,
|
|
586
|
-
height: e.height ?? 0,
|
|
587
|
-
padding: e.padding,
|
|
588
|
-
cssClasses: d,
|
|
589
|
-
cssStyles: [],
|
|
590
|
-
look: l.look,
|
|
591
|
-
icon: e.icon,
|
|
592
|
-
x: e.x,
|
|
593
|
-
y: e.y,
|
|
594
|
-
// Mindmap-specific properties
|
|
595
|
-
level: e.level,
|
|
596
|
-
nodeId: e.nodeId,
|
|
597
|
-
type: e.type,
|
|
598
|
-
section: e.section
|
|
599
|
-
};
|
|
600
|
-
if (a.push(y), e.children)
|
|
601
|
-
for (const E of e.children)
|
|
602
|
-
this.flattenNodes(E, a);
|
|
603
|
-
}
|
|
604
|
-
/**
|
|
605
|
-
* Generate edges from parent-child relationships in mindmap tree
|
|
606
|
-
* @param node - The mindmap node to process
|
|
607
|
-
* @param edges - Array to collect edges
|
|
608
|
-
*/
|
|
609
|
-
generateEdges(e, a) {
|
|
610
|
-
if (!e.children)
|
|
611
|
-
return;
|
|
612
|
-
const l = P();
|
|
613
|
-
for (const n of e.children) {
|
|
614
|
-
let d = "edge";
|
|
615
|
-
n.section !== void 0 && (d += ` section-edge-${n.section}`);
|
|
616
|
-
const f = e.level + 1;
|
|
617
|
-
d += ` edge-depth-${f}`;
|
|
618
|
-
const y = {
|
|
619
|
-
id: `edge_${e.id}_${n.id}`,
|
|
620
|
-
start: e.id.toString(),
|
|
621
|
-
end: n.id.toString(),
|
|
622
|
-
type: "normal",
|
|
623
|
-
curve: "basis",
|
|
624
|
-
thickness: "normal",
|
|
625
|
-
look: l.look,
|
|
626
|
-
classes: d,
|
|
627
|
-
// Store mindmap-specific data
|
|
628
|
-
depth: e.level,
|
|
629
|
-
section: n.section
|
|
630
|
-
};
|
|
631
|
-
a.push(y), this.generateEdges(n, a);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Get structured data for layout algorithms
|
|
636
|
-
* Following the pattern established by ER diagrams
|
|
637
|
-
* @returns Structured data containing nodes, edges, and config
|
|
638
|
-
*/
|
|
639
|
-
getData() {
|
|
640
|
-
const e = this.getMindmap(), a = P(), n = ge().layout !== void 0, d = a;
|
|
641
|
-
if (n || (d.layout = "cose-bilkent"), !e)
|
|
642
|
-
return {
|
|
643
|
-
nodes: [],
|
|
644
|
-
edges: [],
|
|
645
|
-
config: d
|
|
646
|
-
};
|
|
647
|
-
I.debug("getData: mindmapRoot", e, a), this.assignSections(e);
|
|
648
|
-
const f = [], y = [];
|
|
649
|
-
this.flattenNodes(e, f), this.generateEdges(e, y), I.debug(
|
|
650
|
-
`getData: processed ${f.length} nodes and ${y.length} edges`
|
|
651
|
-
);
|
|
652
|
-
const E = /* @__PURE__ */ new Map();
|
|
653
|
-
for (const b of f)
|
|
654
|
-
E.set(b.id, {
|
|
655
|
-
shape: b.shape,
|
|
656
|
-
width: b.width,
|
|
657
|
-
height: b.height,
|
|
658
|
-
padding: b.padding
|
|
659
|
-
});
|
|
660
|
-
return {
|
|
661
|
-
nodes: f,
|
|
662
|
-
edges: y,
|
|
663
|
-
config: d,
|
|
664
|
-
// Store the root node for mindmap-specific layout algorithms
|
|
665
|
-
rootNode: e,
|
|
666
|
-
// Properties required by dagre layout algorithm
|
|
667
|
-
markers: ["point"],
|
|
668
|
-
// Mindmaps don't use markers
|
|
669
|
-
direction: "TB",
|
|
670
|
-
// Top-to-bottom direction for mindmaps
|
|
671
|
-
nodeSpacing: 50,
|
|
672
|
-
// Default spacing between nodes
|
|
673
|
-
rankSpacing: 50,
|
|
674
|
-
// Default spacing between ranks
|
|
675
|
-
// Add shapes for ELK compatibility
|
|
676
|
-
shapes: Object.fromEntries(E),
|
|
677
|
-
// Additional properties that layout algorithms might expect
|
|
678
|
-
type: "mindmap",
|
|
679
|
-
diagramId: "mindmap-" + _e()
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
// Expose logger to grammar
|
|
683
|
-
getLogger() {
|
|
684
|
-
return I;
|
|
685
|
-
}
|
|
686
|
-
}, h(w, "MindmapDB"), w), Ne = /* @__PURE__ */ h(async (t, e, a, l) => {
|
|
687
|
-
I.debug(`Rendering mindmap diagram
|
|
688
|
-
` + t);
|
|
689
|
-
const n = l.db, d = n.getData(), f = ae(e, d.config.securityLevel);
|
|
690
|
-
if (d.type = l.type, d.layoutAlgorithm = le(d.config.layout, {
|
|
691
|
-
fallback: "cose-bilkent"
|
|
692
|
-
}), d.diagramId = e, !n.getMindmap())
|
|
693
|
-
return;
|
|
694
|
-
d.nodes.forEach((g) => {
|
|
695
|
-
g.shape === "rounded" ? (g.radius = 15, g.taper = 15, g.stroke = "none", g.width = 0, g.padding = 15) : g.shape === "circle" ? g.padding = 10 : g.shape === "rect" ? (g.width = 0, g.padding = 10) : g.shape === "hexagon" && (g.width = 0, g.height = 0);
|
|
696
|
-
}), await he(d, f);
|
|
697
|
-
const { themeVariables: E } = de(), { useGradient: b, gradientStart: v, gradientStop: R } = E;
|
|
698
|
-
if (b && v && R) {
|
|
699
|
-
const g = f.attr("id"), A = f.append("defs").append("linearGradient").attr("id", `${g}-gradient`).attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
|
|
700
|
-
A.append("stop").attr("offset", "0%").attr("stop-color", v).attr("stop-opacity", 1), A.append("stop").attr("offset", "100%").attr("stop-color", R).attr("stop-opacity", 1);
|
|
701
|
-
}
|
|
702
|
-
ce(
|
|
703
|
-
f,
|
|
704
|
-
d.config.mindmap?.padding ?? j.mindmap.padding,
|
|
705
|
-
"mindmapDiagram",
|
|
706
|
-
d.config.mindmap?.useMaxWidth ?? j.mindmap.useMaxWidth
|
|
707
|
-
);
|
|
708
|
-
}, "draw"), De = {
|
|
709
|
-
draw: Ne
|
|
710
|
-
}, Le = /* @__PURE__ */ h((t) => {
|
|
711
|
-
const { theme: e, look: a } = t;
|
|
712
|
-
let l = "";
|
|
713
|
-
for (let n = 0; n < t.THEME_COLOR_LIMIT; n++)
|
|
714
|
-
t["lineColor" + n] = t["lineColor" + n] || t["cScaleInv" + n], ue(t["lineColor" + n]) ? t["lineColor" + n] = pe(t["lineColor" + n], 20) : t["lineColor" + n] = fe(t["lineColor" + n], 20);
|
|
715
|
-
for (let n = 0; n < t.THEME_COLOR_LIMIT; n++) {
|
|
716
|
-
const d = "" + (a === "neo" ? Math.max(10 - (n - 1) * 2, 2) : 17 - 3 * n);
|
|
717
|
-
l += `
|
|
718
|
-
.section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
|
|
719
|
-
fill: ${t["cScale" + n]};
|
|
720
|
-
}
|
|
721
|
-
.section-${n - 1} text {
|
|
722
|
-
fill: ${t["cScaleLabel" + n]};
|
|
723
|
-
}
|
|
724
|
-
.section-${n - 1} span {
|
|
725
|
-
color: ${t["cScaleLabel" + n]};
|
|
726
|
-
}
|
|
727
|
-
.node-icon-${n - 1} {
|
|
728
|
-
font-size: 40px;
|
|
729
|
-
color: ${t["cScaleLabel" + n]};
|
|
730
|
-
}
|
|
731
|
-
.section-edge-${n - 1}{
|
|
732
|
-
stroke: ${t["cScale" + n]};
|
|
733
|
-
}
|
|
734
|
-
.edge-depth-${n - 1}{
|
|
735
|
-
stroke-width: ${d};
|
|
736
|
-
}
|
|
737
|
-
.section-${n - 1} line {
|
|
738
|
-
stroke: ${t["cScaleInv" + n]} ;
|
|
739
|
-
stroke-width: 3;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.disabled, .disabled circle, .disabled text {
|
|
743
|
-
fill: lightgray;
|
|
744
|
-
}
|
|
745
|
-
.disabled text {
|
|
746
|
-
fill: #efefef;
|
|
747
|
-
}
|
|
748
|
-
[data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
|
|
749
|
-
fill: ${e === "redux" || e === "redux-dark" || e === "neutral" ? t.mainBkg : t["cScale" + n]};
|
|
750
|
-
stroke: ${e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScale" + n]};
|
|
751
|
-
stroke-width: ${t.strokeWidth ?? 2}px;
|
|
752
|
-
}
|
|
753
|
-
[data-look="neo"].section-edge-${n - 1}{
|
|
754
|
-
stroke: ${e?.includes("redux") || e === "neo-dark" ? t.nodeBorder : t["cScale" + n]};
|
|
755
|
-
}
|
|
756
|
-
[data-look="neo"].mindmap-node.section-${n - 1} text {
|
|
757
|
-
fill: ${e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : n)]};
|
|
758
|
-
}
|
|
759
|
-
`;
|
|
760
|
-
}
|
|
761
|
-
return l;
|
|
762
|
-
}, "genSections"), ve = /* @__PURE__ */ h((t, e, a) => {
|
|
763
|
-
let l = "";
|
|
764
|
-
for (let n = 0; n < t; n++)
|
|
765
|
-
l += `
|
|
766
|
-
[data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
|
|
767
|
-
stroke: url(${e}-gradient);
|
|
768
|
-
fill: ${a};
|
|
769
|
-
}
|
|
770
|
-
.section-${n - 1} line {
|
|
771
|
-
stroke-width: 0;
|
|
772
|
-
}`;
|
|
773
|
-
return l;
|
|
774
|
-
}, "genGradient"), Te = /* @__PURE__ */ h((t) => {
|
|
775
|
-
const { theme: e } = t, a = t.svgId, l = t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${a}-drop-shadow)`) : "none";
|
|
776
|
-
return `
|
|
777
|
-
.edge {
|
|
778
|
-
stroke-width: 3;
|
|
779
|
-
}
|
|
780
|
-
${Le(t)}
|
|
781
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
782
|
-
fill: ${t.git0};
|
|
783
|
-
}
|
|
784
|
-
.section-root text {
|
|
785
|
-
fill: ${t.gitBranchLabel0};
|
|
786
|
-
}
|
|
787
|
-
.section-root span {
|
|
788
|
-
color: ${e?.includes("redux") ? t.nodeBorder : t.gitBranchLabel0};
|
|
789
|
-
}
|
|
790
|
-
.icon-container {
|
|
791
|
-
height:100%;
|
|
792
|
-
display: flex;
|
|
793
|
-
justify-content: center;
|
|
794
|
-
align-items: center;
|
|
795
|
-
}
|
|
796
|
-
.edge {
|
|
797
|
-
fill: none;
|
|
798
|
-
}
|
|
799
|
-
.mindmap-node-label {
|
|
800
|
-
dy: 1em;
|
|
801
|
-
alignment-baseline: middle;
|
|
802
|
-
text-anchor: middle;
|
|
803
|
-
dominant-baseline: middle;
|
|
804
|
-
text-align: center;
|
|
805
|
-
}
|
|
806
|
-
[data-look="neo"].mindmap-node {
|
|
807
|
-
filter: ${l};
|
|
808
|
-
}
|
|
809
|
-
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
|
810
|
-
fill: ${e?.includes("redux") ? t.mainBkg : t.git0};
|
|
811
|
-
}
|
|
812
|
-
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
813
|
-
fill: ${e?.includes("redux") ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : 0)]};
|
|
814
|
-
}
|
|
815
|
-
${t.useGradient && a && t.mainBkg ? ve(t.THEME_COLOR_LIMIT, a, t.mainBkg) : ""}
|
|
816
|
-
`;
|
|
817
|
-
}, "getStyles"), Oe = Te, Re = {
|
|
818
|
-
get db() {
|
|
819
|
-
return new xe();
|
|
820
|
-
},
|
|
821
|
-
renderer: De,
|
|
822
|
-
parser: ke,
|
|
823
|
-
styles: Oe
|
|
824
|
-
};
|
|
825
|
-
export {
|
|
826
|
-
Re as diagram
|
|
827
|
-
};
|