@zettelgeist/cli 0.1.0
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/LICENSE +202 -0
- package/README.md +64 -0
- package/dist/bin.js +2211 -0
- package/dist/bin.js.map +7 -0
- package/dist/templates/export.html +27 -0
- package/dist/templates/skill/SKILL.md +220 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js +14 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js.map +7 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js +8884 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js.map +7 -0
- package/dist/viewer-bundle/base.css +248 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js +3777 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js.map +7 -0
- package/dist/viewer-bundle/board.css +370 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js +2596 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js.map +7 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js +68 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js.map +7 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js +67 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js.map +7 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js +112 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js.map +7 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js +1011 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js.map +7 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js +48 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js.map +7 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js +2048 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js +6957 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js.map +7 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js +122 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js.map +7 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js +133 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js.map +7 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js +5556 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js.map +7 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js +25 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js.map +7 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js +6397 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js.map +7 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js +125 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js.map +7 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js +44 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js.map +7 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js +51 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js.map +7 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js +96 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js +30297 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js +59 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js.map +7 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js +2042 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js.map +7 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js +20 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js.map +7 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js +101 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js.map +7 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js +34 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js.map +7 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js +25 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js.map +7 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js +171 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js.map +7 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js +61 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js +1050 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js +1994 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js.map +7 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js +25 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js.map +7 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js +2721 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js.map +7 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js +48 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js.map +7 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js +22 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js.map +7 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js +1663 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js.map +7 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js +172 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js.map +7 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js +48 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js.map +7 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js +93 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js.map +7 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js +1039 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js.map +7 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js +25029 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js.map +7 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js +682 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js.map +7 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js +987 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js +48 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js.map +7 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js +2044 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js +46 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js +46 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js.map +7 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js +5009 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js.map +7 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js +739 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js.map +7 -0
- package/dist/viewer-bundle/dark.css +13 -0
- package/dist/viewer-bundle/detail.css +539 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js +214 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js.map +7 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js +578 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js.map +7 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js +345 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js.map +7 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js +255 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js.map +7 -0
- package/dist/viewer-bundle/docs.css +88 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js +176 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js.map +7 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js +1349 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js.map +7 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js +2501 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js.map +7 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js +2654 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js.map +7 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js +14 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js.map +7 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js +1946 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js.map +7 -0
- package/dist/viewer-bundle/index.html +28 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js +14 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js.map +7 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js +59 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js.map +7 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js +1012 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js.map +7 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js +1303 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js.map +7 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js +1131 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js.map +7 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js +14318 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js.map +7 -0
- package/dist/viewer-bundle/light.css +15 -0
- package/dist/viewer-bundle/main.js +4816 -0
- package/dist/viewer-bundle/main.js.map +7 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js +1708 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js.map +7 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js +1277 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js.map +7 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js +14 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js.map +7 -0
- package/dist/viewer-bundle/pico.classless.min.css +4 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js +14 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js.map +7 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js +238 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js.map +7 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js +12 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js.map +7 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js +1409 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js.map +7 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js +14 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js.map +7 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js +68 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js.map +7 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js +1311 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js.map +7 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js +1263 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js.map +7 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js +4655 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js +495 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js +44 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js.map +7 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js +1646 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js.map +7 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js +14 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js.map +7 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js +14 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js.map +7 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js +2544 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js.map +7 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js +14 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js.map +7 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js +938 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js.map +7 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js +1952 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js.map +7 -0
- package/package.json +51 -0
|
@@ -0,0 +1,1131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
selectSvgElement
|
|
3
|
+
} from "./chunk-N7G7IIKG.js";
|
|
4
|
+
import {
|
|
5
|
+
JSON_SCHEMA,
|
|
6
|
+
load
|
|
7
|
+
} from "./chunk-RBTT26R4.js";
|
|
8
|
+
import {
|
|
9
|
+
getIconStyles
|
|
10
|
+
} from "./chunk-CIDUOCCG.js";
|
|
11
|
+
import {
|
|
12
|
+
insertCluster,
|
|
13
|
+
insertNode,
|
|
14
|
+
positionNode
|
|
15
|
+
} from "./chunk-BM2KPNFW.js";
|
|
16
|
+
import "./chunk-6LYV7PBV.js";
|
|
17
|
+
import "./chunk-5YJCJF2C.js";
|
|
18
|
+
import "./chunk-5PZT7VUU.js";
|
|
19
|
+
import "./chunk-OGMSNDVH.js";
|
|
20
|
+
import "./chunk-UVRE3R6A.js";
|
|
21
|
+
import "./chunk-G3PPZWPW.js";
|
|
22
|
+
import {
|
|
23
|
+
darken_default,
|
|
24
|
+
defaultConfig_default,
|
|
25
|
+
getConfig2,
|
|
26
|
+
is_dark_default,
|
|
27
|
+
lighten_default,
|
|
28
|
+
sanitizeText,
|
|
29
|
+
setupGraphViewbox
|
|
30
|
+
} from "./chunk-7NZMPQDX.js";
|
|
31
|
+
import "./chunk-YEU62MVS.js";
|
|
32
|
+
import {
|
|
33
|
+
__name,
|
|
34
|
+
log
|
|
35
|
+
} from "./chunk-CZHJHAOR.js";
|
|
36
|
+
import "./chunk-DI52DQAC.js";
|
|
37
|
+
|
|
38
|
+
// ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-6JOO6SKY.mjs
|
|
39
|
+
var parser = function() {
|
|
40
|
+
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
41
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
42
|
+
return o2;
|
|
43
|
+
}, "o"), $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 31], $Vd = [6, 7, 11, 24], $Ve = [1, 6, 13, 16, 17, 20, 23], $Vf = [1, 35], $Vg = [1, 36], $Vh = [1, 6, 7, 11, 13, 16, 17, 20, 23], $Vi = [1, 38];
|
|
44
|
+
var parser2 = {
|
|
45
|
+
trace: /* @__PURE__ */ __name(function trace() {
|
|
46
|
+
}, "trace"),
|
|
47
|
+
yy: {},
|
|
48
|
+
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 },
|
|
49
|
+
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" },
|
|
50
|
+
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]],
|
|
51
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
52
|
+
var $0 = $$.length - 1;
|
|
53
|
+
switch (yystate) {
|
|
54
|
+
case 6:
|
|
55
|
+
case 7:
|
|
56
|
+
return yy;
|
|
57
|
+
break;
|
|
58
|
+
case 8:
|
|
59
|
+
yy.getLogger().trace("Stop NL ");
|
|
60
|
+
break;
|
|
61
|
+
case 9:
|
|
62
|
+
yy.getLogger().trace("Stop EOF ");
|
|
63
|
+
break;
|
|
64
|
+
case 11:
|
|
65
|
+
yy.getLogger().trace("Stop NL2 ");
|
|
66
|
+
break;
|
|
67
|
+
case 12:
|
|
68
|
+
yy.getLogger().trace("Stop EOF2 ");
|
|
69
|
+
break;
|
|
70
|
+
case 15:
|
|
71
|
+
yy.getLogger().info("Node: ", $$[$0 - 1].id);
|
|
72
|
+
yy.addNode($$[$0 - 2].length, $$[$0 - 1].id, $$[$0 - 1].descr, $$[$0 - 1].type, $$[$0]);
|
|
73
|
+
break;
|
|
74
|
+
case 16:
|
|
75
|
+
yy.getLogger().info("Node: ", $$[$0].id);
|
|
76
|
+
yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
77
|
+
break;
|
|
78
|
+
case 17:
|
|
79
|
+
yy.getLogger().trace("Icon: ", $$[$0]);
|
|
80
|
+
yy.decorateNode({ icon: $$[$0] });
|
|
81
|
+
break;
|
|
82
|
+
case 18:
|
|
83
|
+
case 23:
|
|
84
|
+
yy.decorateNode({ class: $$[$0] });
|
|
85
|
+
break;
|
|
86
|
+
case 19:
|
|
87
|
+
yy.getLogger().trace("SPACELIST");
|
|
88
|
+
break;
|
|
89
|
+
case 20:
|
|
90
|
+
yy.getLogger().trace("Node: ", $$[$0 - 1].id);
|
|
91
|
+
yy.addNode(0, $$[$0 - 1].id, $$[$0 - 1].descr, $$[$0 - 1].type, $$[$0]);
|
|
92
|
+
break;
|
|
93
|
+
case 21:
|
|
94
|
+
yy.getLogger().trace("Node: ", $$[$0].id);
|
|
95
|
+
yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
96
|
+
break;
|
|
97
|
+
case 22:
|
|
98
|
+
yy.decorateNode({ icon: $$[$0] });
|
|
99
|
+
break;
|
|
100
|
+
case 27:
|
|
101
|
+
yy.getLogger().trace("node found ..", $$[$0 - 2]);
|
|
102
|
+
this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
103
|
+
break;
|
|
104
|
+
case 28:
|
|
105
|
+
this.$ = { id: $$[$0], descr: $$[$0], type: 0 };
|
|
106
|
+
break;
|
|
107
|
+
case 29:
|
|
108
|
+
yy.getLogger().trace("node found ..", $$[$0 - 3]);
|
|
109
|
+
this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
110
|
+
break;
|
|
111
|
+
case 30:
|
|
112
|
+
this.$ = $$[$0 - 1] + $$[$0];
|
|
113
|
+
break;
|
|
114
|
+
case 31:
|
|
115
|
+
this.$ = $$[$0];
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
}, "anonymous"),
|
|
119
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 16: $V3, 17: $V4, 18: 17, 19: 18, 20: $V5, 23: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 16: $V3, 17: $V4, 18: 17, 19: 18, 20: $V5, 23: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 16: $V3, 17: $V4, 18: 17, 19: 18, 20: $V5, 23: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 24], { 18: 17, 19: 18, 14: 27, 16: [1, 28], 17: [1, 29], 20: $V5, 23: $V6 }), o($Vb, [2, 19]), o($Vb, [2, 21], { 15: 30, 24: $Vc }), o($Vb, [2, 22]), o($Vb, [2, 23]), o($Vd, [2, 25]), o($Vd, [2, 26]), o($Vd, [2, 28], { 20: [1, 32] }), { 21: [1, 33] }, { 6: $V8, 7: $V9, 10: 34, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 16: $V3, 17: $V4, 18: 17, 19: 18, 20: $V5, 23: $V6 }, o($Ve, [2, 14], { 7: $Vf, 11: $Vg }), o($Vh, [2, 8]), o($Vh, [2, 9]), o($Vh, [2, 10]), o($Vb, [2, 16], { 15: 37, 24: $Vc }), o($Vb, [2, 17]), o($Vb, [2, 18]), o($Vb, [2, 20], { 24: $Vi }), o($Vd, [2, 31]), { 21: [1, 39] }, { 22: [1, 40] }, o($Ve, [2, 13], { 7: $Vf, 11: $Vg }), o($Vh, [2, 11]), o($Vh, [2, 12]), o($Vb, [2, 15], { 24: $Vi }), o($Vd, [2, 30]), { 22: [1, 41] }, o($Vd, [2, 27]), o($Vd, [2, 29])],
|
|
120
|
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
121
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
122
|
+
if (hash.recoverable) {
|
|
123
|
+
this.trace(str);
|
|
124
|
+
} else {
|
|
125
|
+
var error = new Error(str);
|
|
126
|
+
error.hash = hash;
|
|
127
|
+
throw error;
|
|
128
|
+
}
|
|
129
|
+
}, "parseError"),
|
|
130
|
+
parse: /* @__PURE__ */ __name(function parse(input) {
|
|
131
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
132
|
+
var args = lstack.slice.call(arguments, 1);
|
|
133
|
+
var lexer2 = Object.create(this.lexer);
|
|
134
|
+
var sharedState = { yy: {} };
|
|
135
|
+
for (var k in this.yy) {
|
|
136
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
137
|
+
sharedState.yy[k] = this.yy[k];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
lexer2.setInput(input, sharedState.yy);
|
|
141
|
+
sharedState.yy.lexer = lexer2;
|
|
142
|
+
sharedState.yy.parser = this;
|
|
143
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
144
|
+
lexer2.yylloc = {};
|
|
145
|
+
}
|
|
146
|
+
var yyloc = lexer2.yylloc;
|
|
147
|
+
lstack.push(yyloc);
|
|
148
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
149
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
150
|
+
this.parseError = sharedState.yy.parseError;
|
|
151
|
+
} else {
|
|
152
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
153
|
+
}
|
|
154
|
+
function popStack(n) {
|
|
155
|
+
stack.length = stack.length - 2 * n;
|
|
156
|
+
vstack.length = vstack.length - n;
|
|
157
|
+
lstack.length = lstack.length - n;
|
|
158
|
+
}
|
|
159
|
+
__name(popStack, "popStack");
|
|
160
|
+
function lex() {
|
|
161
|
+
var token;
|
|
162
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
163
|
+
if (typeof token !== "number") {
|
|
164
|
+
if (token instanceof Array) {
|
|
165
|
+
tstack = token;
|
|
166
|
+
token = tstack.pop();
|
|
167
|
+
}
|
|
168
|
+
token = self.symbols_[token] || token;
|
|
169
|
+
}
|
|
170
|
+
return token;
|
|
171
|
+
}
|
|
172
|
+
__name(lex, "lex");
|
|
173
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
174
|
+
while (true) {
|
|
175
|
+
state = stack[stack.length - 1];
|
|
176
|
+
if (this.defaultActions[state]) {
|
|
177
|
+
action = this.defaultActions[state];
|
|
178
|
+
} else {
|
|
179
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
180
|
+
symbol = lex();
|
|
181
|
+
}
|
|
182
|
+
action = table[state] && table[state][symbol];
|
|
183
|
+
}
|
|
184
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
185
|
+
var errStr = "";
|
|
186
|
+
expected = [];
|
|
187
|
+
for (p in table[state]) {
|
|
188
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
189
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (lexer2.showPosition) {
|
|
193
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
194
|
+
} else {
|
|
195
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
196
|
+
}
|
|
197
|
+
this.parseError(errStr, {
|
|
198
|
+
text: lexer2.match,
|
|
199
|
+
token: this.terminals_[symbol] || symbol,
|
|
200
|
+
line: lexer2.yylineno,
|
|
201
|
+
loc: yyloc,
|
|
202
|
+
expected
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
206
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
207
|
+
}
|
|
208
|
+
switch (action[0]) {
|
|
209
|
+
case 1:
|
|
210
|
+
stack.push(symbol);
|
|
211
|
+
vstack.push(lexer2.yytext);
|
|
212
|
+
lstack.push(lexer2.yylloc);
|
|
213
|
+
stack.push(action[1]);
|
|
214
|
+
symbol = null;
|
|
215
|
+
if (!preErrorSymbol) {
|
|
216
|
+
yyleng = lexer2.yyleng;
|
|
217
|
+
yytext = lexer2.yytext;
|
|
218
|
+
yylineno = lexer2.yylineno;
|
|
219
|
+
yyloc = lexer2.yylloc;
|
|
220
|
+
if (recovering > 0) {
|
|
221
|
+
recovering--;
|
|
222
|
+
}
|
|
223
|
+
} else {
|
|
224
|
+
symbol = preErrorSymbol;
|
|
225
|
+
preErrorSymbol = null;
|
|
226
|
+
}
|
|
227
|
+
break;
|
|
228
|
+
case 2:
|
|
229
|
+
len = this.productions_[action[1]][1];
|
|
230
|
+
yyval.$ = vstack[vstack.length - len];
|
|
231
|
+
yyval._$ = {
|
|
232
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
233
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
234
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
235
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
236
|
+
};
|
|
237
|
+
if (ranges) {
|
|
238
|
+
yyval._$.range = [
|
|
239
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
240
|
+
lstack[lstack.length - 1].range[1]
|
|
241
|
+
];
|
|
242
|
+
}
|
|
243
|
+
r = this.performAction.apply(yyval, [
|
|
244
|
+
yytext,
|
|
245
|
+
yyleng,
|
|
246
|
+
yylineno,
|
|
247
|
+
sharedState.yy,
|
|
248
|
+
action[1],
|
|
249
|
+
vstack,
|
|
250
|
+
lstack
|
|
251
|
+
].concat(args));
|
|
252
|
+
if (typeof r !== "undefined") {
|
|
253
|
+
return r;
|
|
254
|
+
}
|
|
255
|
+
if (len) {
|
|
256
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
257
|
+
vstack = vstack.slice(0, -1 * len);
|
|
258
|
+
lstack = lstack.slice(0, -1 * len);
|
|
259
|
+
}
|
|
260
|
+
stack.push(this.productions_[action[1]][0]);
|
|
261
|
+
vstack.push(yyval.$);
|
|
262
|
+
lstack.push(yyval._$);
|
|
263
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
264
|
+
stack.push(newState);
|
|
265
|
+
break;
|
|
266
|
+
case 3:
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return true;
|
|
271
|
+
}, "parse")
|
|
272
|
+
};
|
|
273
|
+
var lexer = /* @__PURE__ */ function() {
|
|
274
|
+
var lexer2 = {
|
|
275
|
+
EOF: 1,
|
|
276
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
277
|
+
if (this.yy.parser) {
|
|
278
|
+
this.yy.parser.parseError(str, hash);
|
|
279
|
+
} else {
|
|
280
|
+
throw new Error(str);
|
|
281
|
+
}
|
|
282
|
+
}, "parseError"),
|
|
283
|
+
// resets the lexer, sets new input
|
|
284
|
+
setInput: /* @__PURE__ */ __name(function(input, yy) {
|
|
285
|
+
this.yy = yy || this.yy || {};
|
|
286
|
+
this._input = input;
|
|
287
|
+
this._more = this._backtrack = this.done = false;
|
|
288
|
+
this.yylineno = this.yyleng = 0;
|
|
289
|
+
this.yytext = this.matched = this.match = "";
|
|
290
|
+
this.conditionStack = ["INITIAL"];
|
|
291
|
+
this.yylloc = {
|
|
292
|
+
first_line: 1,
|
|
293
|
+
first_column: 0,
|
|
294
|
+
last_line: 1,
|
|
295
|
+
last_column: 0
|
|
296
|
+
};
|
|
297
|
+
if (this.options.ranges) {
|
|
298
|
+
this.yylloc.range = [0, 0];
|
|
299
|
+
}
|
|
300
|
+
this.offset = 0;
|
|
301
|
+
return this;
|
|
302
|
+
}, "setInput"),
|
|
303
|
+
// consumes and returns one char from the input
|
|
304
|
+
input: /* @__PURE__ */ __name(function() {
|
|
305
|
+
var ch = this._input[0];
|
|
306
|
+
this.yytext += ch;
|
|
307
|
+
this.yyleng++;
|
|
308
|
+
this.offset++;
|
|
309
|
+
this.match += ch;
|
|
310
|
+
this.matched += ch;
|
|
311
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
312
|
+
if (lines) {
|
|
313
|
+
this.yylineno++;
|
|
314
|
+
this.yylloc.last_line++;
|
|
315
|
+
} else {
|
|
316
|
+
this.yylloc.last_column++;
|
|
317
|
+
}
|
|
318
|
+
if (this.options.ranges) {
|
|
319
|
+
this.yylloc.range[1]++;
|
|
320
|
+
}
|
|
321
|
+
this._input = this._input.slice(1);
|
|
322
|
+
return ch;
|
|
323
|
+
}, "input"),
|
|
324
|
+
// unshifts one char (or a string) into the input
|
|
325
|
+
unput: /* @__PURE__ */ __name(function(ch) {
|
|
326
|
+
var len = ch.length;
|
|
327
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
328
|
+
this._input = ch + this._input;
|
|
329
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
330
|
+
this.offset -= len;
|
|
331
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
332
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
333
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
334
|
+
if (lines.length - 1) {
|
|
335
|
+
this.yylineno -= lines.length - 1;
|
|
336
|
+
}
|
|
337
|
+
var r = this.yylloc.range;
|
|
338
|
+
this.yylloc = {
|
|
339
|
+
first_line: this.yylloc.first_line,
|
|
340
|
+
last_line: this.yylineno + 1,
|
|
341
|
+
first_column: this.yylloc.first_column,
|
|
342
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
343
|
+
};
|
|
344
|
+
if (this.options.ranges) {
|
|
345
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
346
|
+
}
|
|
347
|
+
this.yyleng = this.yytext.length;
|
|
348
|
+
return this;
|
|
349
|
+
}, "unput"),
|
|
350
|
+
// When called from action, caches matched text and appends it on next action
|
|
351
|
+
more: /* @__PURE__ */ __name(function() {
|
|
352
|
+
this._more = true;
|
|
353
|
+
return this;
|
|
354
|
+
}, "more"),
|
|
355
|
+
// 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.
|
|
356
|
+
reject: /* @__PURE__ */ __name(function() {
|
|
357
|
+
if (this.options.backtrack_lexer) {
|
|
358
|
+
this._backtrack = true;
|
|
359
|
+
} else {
|
|
360
|
+
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).\n" + this.showPosition(), {
|
|
361
|
+
text: "",
|
|
362
|
+
token: null,
|
|
363
|
+
line: this.yylineno
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
return this;
|
|
367
|
+
}, "reject"),
|
|
368
|
+
// retain first n characters of the match
|
|
369
|
+
less: /* @__PURE__ */ __name(function(n) {
|
|
370
|
+
this.unput(this.match.slice(n));
|
|
371
|
+
}, "less"),
|
|
372
|
+
// displays already matched input, i.e. for error messages
|
|
373
|
+
pastInput: /* @__PURE__ */ __name(function() {
|
|
374
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
375
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
376
|
+
}, "pastInput"),
|
|
377
|
+
// displays upcoming input, i.e. for error messages
|
|
378
|
+
upcomingInput: /* @__PURE__ */ __name(function() {
|
|
379
|
+
var next = this.match;
|
|
380
|
+
if (next.length < 20) {
|
|
381
|
+
next += this._input.substr(0, 20 - next.length);
|
|
382
|
+
}
|
|
383
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
384
|
+
}, "upcomingInput"),
|
|
385
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
386
|
+
showPosition: /* @__PURE__ */ __name(function() {
|
|
387
|
+
var pre = this.pastInput();
|
|
388
|
+
var c = new Array(pre.length + 1).join("-");
|
|
389
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
390
|
+
}, "showPosition"),
|
|
391
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
392
|
+
test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
|
|
393
|
+
var token, lines, backup;
|
|
394
|
+
if (this.options.backtrack_lexer) {
|
|
395
|
+
backup = {
|
|
396
|
+
yylineno: this.yylineno,
|
|
397
|
+
yylloc: {
|
|
398
|
+
first_line: this.yylloc.first_line,
|
|
399
|
+
last_line: this.last_line,
|
|
400
|
+
first_column: this.yylloc.first_column,
|
|
401
|
+
last_column: this.yylloc.last_column
|
|
402
|
+
},
|
|
403
|
+
yytext: this.yytext,
|
|
404
|
+
match: this.match,
|
|
405
|
+
matches: this.matches,
|
|
406
|
+
matched: this.matched,
|
|
407
|
+
yyleng: this.yyleng,
|
|
408
|
+
offset: this.offset,
|
|
409
|
+
_more: this._more,
|
|
410
|
+
_input: this._input,
|
|
411
|
+
yy: this.yy,
|
|
412
|
+
conditionStack: this.conditionStack.slice(0),
|
|
413
|
+
done: this.done
|
|
414
|
+
};
|
|
415
|
+
if (this.options.ranges) {
|
|
416
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
420
|
+
if (lines) {
|
|
421
|
+
this.yylineno += lines.length;
|
|
422
|
+
}
|
|
423
|
+
this.yylloc = {
|
|
424
|
+
first_line: this.yylloc.last_line,
|
|
425
|
+
last_line: this.yylineno + 1,
|
|
426
|
+
first_column: this.yylloc.last_column,
|
|
427
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
428
|
+
};
|
|
429
|
+
this.yytext += match[0];
|
|
430
|
+
this.match += match[0];
|
|
431
|
+
this.matches = match;
|
|
432
|
+
this.yyleng = this.yytext.length;
|
|
433
|
+
if (this.options.ranges) {
|
|
434
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
435
|
+
}
|
|
436
|
+
this._more = false;
|
|
437
|
+
this._backtrack = false;
|
|
438
|
+
this._input = this._input.slice(match[0].length);
|
|
439
|
+
this.matched += match[0];
|
|
440
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
441
|
+
if (this.done && this._input) {
|
|
442
|
+
this.done = false;
|
|
443
|
+
}
|
|
444
|
+
if (token) {
|
|
445
|
+
return token;
|
|
446
|
+
} else if (this._backtrack) {
|
|
447
|
+
for (var k in backup) {
|
|
448
|
+
this[k] = backup[k];
|
|
449
|
+
}
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
return false;
|
|
453
|
+
}, "test_match"),
|
|
454
|
+
// return next match in input
|
|
455
|
+
next: /* @__PURE__ */ __name(function() {
|
|
456
|
+
if (this.done) {
|
|
457
|
+
return this.EOF;
|
|
458
|
+
}
|
|
459
|
+
if (!this._input) {
|
|
460
|
+
this.done = true;
|
|
461
|
+
}
|
|
462
|
+
var token, match, tempMatch, index;
|
|
463
|
+
if (!this._more) {
|
|
464
|
+
this.yytext = "";
|
|
465
|
+
this.match = "";
|
|
466
|
+
}
|
|
467
|
+
var rules = this._currentRules();
|
|
468
|
+
for (var i = 0; i < rules.length; i++) {
|
|
469
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
470
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
471
|
+
match = tempMatch;
|
|
472
|
+
index = i;
|
|
473
|
+
if (this.options.backtrack_lexer) {
|
|
474
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
475
|
+
if (token !== false) {
|
|
476
|
+
return token;
|
|
477
|
+
} else if (this._backtrack) {
|
|
478
|
+
match = false;
|
|
479
|
+
continue;
|
|
480
|
+
} else {
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
} else if (!this.options.flex) {
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
if (match) {
|
|
489
|
+
token = this.test_match(match, rules[index]);
|
|
490
|
+
if (token !== false) {
|
|
491
|
+
return token;
|
|
492
|
+
}
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
if (this._input === "") {
|
|
496
|
+
return this.EOF;
|
|
497
|
+
} else {
|
|
498
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
499
|
+
text: "",
|
|
500
|
+
token: null,
|
|
501
|
+
line: this.yylineno
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}, "next"),
|
|
505
|
+
// return next match that has a token
|
|
506
|
+
lex: /* @__PURE__ */ __name(function lex() {
|
|
507
|
+
var r = this.next();
|
|
508
|
+
if (r) {
|
|
509
|
+
return r;
|
|
510
|
+
} else {
|
|
511
|
+
return this.lex();
|
|
512
|
+
}
|
|
513
|
+
}, "lex"),
|
|
514
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
515
|
+
begin: /* @__PURE__ */ __name(function begin(condition) {
|
|
516
|
+
this.conditionStack.push(condition);
|
|
517
|
+
}, "begin"),
|
|
518
|
+
// pop the previously active lexer condition state off the condition stack
|
|
519
|
+
popState: /* @__PURE__ */ __name(function popState() {
|
|
520
|
+
var n = this.conditionStack.length - 1;
|
|
521
|
+
if (n > 0) {
|
|
522
|
+
return this.conditionStack.pop();
|
|
523
|
+
} else {
|
|
524
|
+
return this.conditionStack[0];
|
|
525
|
+
}
|
|
526
|
+
}, "popState"),
|
|
527
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
528
|
+
_currentRules: /* @__PURE__ */ __name(function _currentRules() {
|
|
529
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
530
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
531
|
+
} else {
|
|
532
|
+
return this.conditions["INITIAL"].rules;
|
|
533
|
+
}
|
|
534
|
+
}, "_currentRules"),
|
|
535
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
536
|
+
topState: /* @__PURE__ */ __name(function topState(n) {
|
|
537
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
538
|
+
if (n >= 0) {
|
|
539
|
+
return this.conditionStack[n];
|
|
540
|
+
} else {
|
|
541
|
+
return "INITIAL";
|
|
542
|
+
}
|
|
543
|
+
}, "topState"),
|
|
544
|
+
// alias for begin(condition)
|
|
545
|
+
pushState: /* @__PURE__ */ __name(function pushState(condition) {
|
|
546
|
+
this.begin(condition);
|
|
547
|
+
}, "pushState"),
|
|
548
|
+
// return the number of states currently on the stack
|
|
549
|
+
stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
|
|
550
|
+
return this.conditionStack.length;
|
|
551
|
+
}, "stateStackSize"),
|
|
552
|
+
options: { "case-insensitive": true },
|
|
553
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
554
|
+
var YYSTATE = YY_START;
|
|
555
|
+
switch ($avoiding_name_collisions) {
|
|
556
|
+
case 0:
|
|
557
|
+
this.pushState("shapeData");
|
|
558
|
+
yy_.yytext = "";
|
|
559
|
+
return 24;
|
|
560
|
+
break;
|
|
561
|
+
case 1:
|
|
562
|
+
this.pushState("shapeDataStr");
|
|
563
|
+
return 24;
|
|
564
|
+
break;
|
|
565
|
+
case 2:
|
|
566
|
+
this.popState();
|
|
567
|
+
return 24;
|
|
568
|
+
break;
|
|
569
|
+
case 3:
|
|
570
|
+
const re = /\n\s*/g;
|
|
571
|
+
yy_.yytext = yy_.yytext.replace(re, "<br/>");
|
|
572
|
+
return 24;
|
|
573
|
+
break;
|
|
574
|
+
case 4:
|
|
575
|
+
return 24;
|
|
576
|
+
break;
|
|
577
|
+
case 5:
|
|
578
|
+
this.popState();
|
|
579
|
+
break;
|
|
580
|
+
case 6:
|
|
581
|
+
yy.getLogger().trace("Found comment", yy_.yytext);
|
|
582
|
+
return 6;
|
|
583
|
+
break;
|
|
584
|
+
case 7:
|
|
585
|
+
return 8;
|
|
586
|
+
break;
|
|
587
|
+
case 8:
|
|
588
|
+
this.begin("CLASS");
|
|
589
|
+
break;
|
|
590
|
+
case 9:
|
|
591
|
+
this.popState();
|
|
592
|
+
return 17;
|
|
593
|
+
break;
|
|
594
|
+
case 10:
|
|
595
|
+
this.popState();
|
|
596
|
+
break;
|
|
597
|
+
case 11:
|
|
598
|
+
yy.getLogger().trace("Begin icon");
|
|
599
|
+
this.begin("ICON");
|
|
600
|
+
break;
|
|
601
|
+
case 12:
|
|
602
|
+
yy.getLogger().trace("SPACELINE");
|
|
603
|
+
return 6;
|
|
604
|
+
break;
|
|
605
|
+
case 13:
|
|
606
|
+
return 7;
|
|
607
|
+
break;
|
|
608
|
+
case 14:
|
|
609
|
+
return 16;
|
|
610
|
+
break;
|
|
611
|
+
case 15:
|
|
612
|
+
yy.getLogger().trace("end icon");
|
|
613
|
+
this.popState();
|
|
614
|
+
break;
|
|
615
|
+
case 16:
|
|
616
|
+
yy.getLogger().trace("Exploding node");
|
|
617
|
+
this.begin("NODE");
|
|
618
|
+
return 20;
|
|
619
|
+
break;
|
|
620
|
+
case 17:
|
|
621
|
+
yy.getLogger().trace("Cloud");
|
|
622
|
+
this.begin("NODE");
|
|
623
|
+
return 20;
|
|
624
|
+
break;
|
|
625
|
+
case 18:
|
|
626
|
+
yy.getLogger().trace("Explosion Bang");
|
|
627
|
+
this.begin("NODE");
|
|
628
|
+
return 20;
|
|
629
|
+
break;
|
|
630
|
+
case 19:
|
|
631
|
+
yy.getLogger().trace("Cloud Bang");
|
|
632
|
+
this.begin("NODE");
|
|
633
|
+
return 20;
|
|
634
|
+
break;
|
|
635
|
+
case 20:
|
|
636
|
+
this.begin("NODE");
|
|
637
|
+
return 20;
|
|
638
|
+
break;
|
|
639
|
+
case 21:
|
|
640
|
+
this.begin("NODE");
|
|
641
|
+
return 20;
|
|
642
|
+
break;
|
|
643
|
+
case 22:
|
|
644
|
+
this.begin("NODE");
|
|
645
|
+
return 20;
|
|
646
|
+
break;
|
|
647
|
+
case 23:
|
|
648
|
+
this.begin("NODE");
|
|
649
|
+
return 20;
|
|
650
|
+
break;
|
|
651
|
+
case 24:
|
|
652
|
+
return 13;
|
|
653
|
+
break;
|
|
654
|
+
case 25:
|
|
655
|
+
return 23;
|
|
656
|
+
break;
|
|
657
|
+
case 26:
|
|
658
|
+
return 11;
|
|
659
|
+
break;
|
|
660
|
+
case 27:
|
|
661
|
+
this.begin("NSTR2");
|
|
662
|
+
break;
|
|
663
|
+
case 28:
|
|
664
|
+
return "NODE_DESCR";
|
|
665
|
+
break;
|
|
666
|
+
case 29:
|
|
667
|
+
this.popState();
|
|
668
|
+
break;
|
|
669
|
+
case 30:
|
|
670
|
+
yy.getLogger().trace("Starting NSTR");
|
|
671
|
+
this.begin("NSTR");
|
|
672
|
+
break;
|
|
673
|
+
case 31:
|
|
674
|
+
yy.getLogger().trace("description:", yy_.yytext);
|
|
675
|
+
return "NODE_DESCR";
|
|
676
|
+
break;
|
|
677
|
+
case 32:
|
|
678
|
+
this.popState();
|
|
679
|
+
break;
|
|
680
|
+
case 33:
|
|
681
|
+
this.popState();
|
|
682
|
+
yy.getLogger().trace("node end ))");
|
|
683
|
+
return "NODE_DEND";
|
|
684
|
+
break;
|
|
685
|
+
case 34:
|
|
686
|
+
this.popState();
|
|
687
|
+
yy.getLogger().trace("node end )");
|
|
688
|
+
return "NODE_DEND";
|
|
689
|
+
break;
|
|
690
|
+
case 35:
|
|
691
|
+
this.popState();
|
|
692
|
+
yy.getLogger().trace("node end ...", yy_.yytext);
|
|
693
|
+
return "NODE_DEND";
|
|
694
|
+
break;
|
|
695
|
+
case 36:
|
|
696
|
+
this.popState();
|
|
697
|
+
yy.getLogger().trace("node end ((");
|
|
698
|
+
return "NODE_DEND";
|
|
699
|
+
break;
|
|
700
|
+
case 37:
|
|
701
|
+
this.popState();
|
|
702
|
+
yy.getLogger().trace("node end (-");
|
|
703
|
+
return "NODE_DEND";
|
|
704
|
+
break;
|
|
705
|
+
case 38:
|
|
706
|
+
this.popState();
|
|
707
|
+
yy.getLogger().trace("node end (-");
|
|
708
|
+
return "NODE_DEND";
|
|
709
|
+
break;
|
|
710
|
+
case 39:
|
|
711
|
+
this.popState();
|
|
712
|
+
yy.getLogger().trace("node end ((");
|
|
713
|
+
return "NODE_DEND";
|
|
714
|
+
break;
|
|
715
|
+
case 40:
|
|
716
|
+
this.popState();
|
|
717
|
+
yy.getLogger().trace("node end ((");
|
|
718
|
+
return "NODE_DEND";
|
|
719
|
+
break;
|
|
720
|
+
case 41:
|
|
721
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
722
|
+
return 21;
|
|
723
|
+
break;
|
|
724
|
+
case 42:
|
|
725
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
726
|
+
return 21;
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
}, "anonymous"),
|
|
730
|
+
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],
|
|
731
|
+
conditions: { "shapeDataEndBracket": { "rules": [], "inclusive": false }, "shapeDataStr": { "rules": [2, 3], "inclusive": false }, "shapeData": { "rules": [1, 4, 5], "inclusive": false }, "CLASS": { "rules": [9, 10], "inclusive": false }, "ICON": { "rules": [14, 15], "inclusive": false }, "NSTR2": { "rules": [28, 29], "inclusive": false }, "NSTR": { "rules": [31, 32], "inclusive": false }, "NODE": { "rules": [27, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], "inclusive": false }, "INITIAL": { "rules": [0, 6, 7, 8, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], "inclusive": true } }
|
|
732
|
+
};
|
|
733
|
+
return lexer2;
|
|
734
|
+
}();
|
|
735
|
+
parser2.lexer = lexer;
|
|
736
|
+
function Parser() {
|
|
737
|
+
this.yy = {};
|
|
738
|
+
}
|
|
739
|
+
__name(Parser, "Parser");
|
|
740
|
+
Parser.prototype = parser2;
|
|
741
|
+
parser2.Parser = Parser;
|
|
742
|
+
return new Parser();
|
|
743
|
+
}();
|
|
744
|
+
parser.parser = parser;
|
|
745
|
+
var kanban_default = parser;
|
|
746
|
+
var nodes = [];
|
|
747
|
+
var sections = [];
|
|
748
|
+
var cnt = 0;
|
|
749
|
+
var elements = {};
|
|
750
|
+
var clear = /* @__PURE__ */ __name(() => {
|
|
751
|
+
nodes = [];
|
|
752
|
+
sections = [];
|
|
753
|
+
cnt = 0;
|
|
754
|
+
elements = {};
|
|
755
|
+
}, "clear");
|
|
756
|
+
var getSection = /* @__PURE__ */ __name((level) => {
|
|
757
|
+
if (nodes.length === 0) {
|
|
758
|
+
return null;
|
|
759
|
+
}
|
|
760
|
+
const sectionLevel = nodes[0].level;
|
|
761
|
+
let lastSection = null;
|
|
762
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
763
|
+
if (nodes[i].level === sectionLevel && !lastSection) {
|
|
764
|
+
lastSection = nodes[i];
|
|
765
|
+
}
|
|
766
|
+
if (nodes[i].level < sectionLevel) {
|
|
767
|
+
throw new Error('Items without section detected, found section ("' + nodes[i].label + '")');
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
if (level === lastSection?.level) {
|
|
771
|
+
return null;
|
|
772
|
+
}
|
|
773
|
+
return lastSection;
|
|
774
|
+
}, "getSection");
|
|
775
|
+
var getSections = /* @__PURE__ */ __name(function() {
|
|
776
|
+
return sections;
|
|
777
|
+
}, "getSections");
|
|
778
|
+
var getData = /* @__PURE__ */ __name(function() {
|
|
779
|
+
const edges = [];
|
|
780
|
+
const _nodes = [];
|
|
781
|
+
const sections2 = getSections();
|
|
782
|
+
const conf = getConfig2();
|
|
783
|
+
for (const section of sections2) {
|
|
784
|
+
const node = {
|
|
785
|
+
id: section.id,
|
|
786
|
+
label: sanitizeText(section.label ?? "", conf),
|
|
787
|
+
labelType: "markdown",
|
|
788
|
+
isGroup: true,
|
|
789
|
+
ticket: section.ticket,
|
|
790
|
+
shape: "kanbanSection",
|
|
791
|
+
level: section.level,
|
|
792
|
+
look: conf.look
|
|
793
|
+
};
|
|
794
|
+
_nodes.push(node);
|
|
795
|
+
const children = nodes.filter((n) => n.parentId === section.id);
|
|
796
|
+
for (const item of children) {
|
|
797
|
+
const childNode = {
|
|
798
|
+
id: item.id,
|
|
799
|
+
parentId: section.id,
|
|
800
|
+
label: sanitizeText(item.label ?? "", conf),
|
|
801
|
+
labelType: "markdown",
|
|
802
|
+
isGroup: false,
|
|
803
|
+
ticket: item?.ticket,
|
|
804
|
+
priority: item?.priority,
|
|
805
|
+
assigned: item?.assigned,
|
|
806
|
+
icon: item?.icon,
|
|
807
|
+
shape: "kanbanItem",
|
|
808
|
+
level: item.level,
|
|
809
|
+
rx: 5,
|
|
810
|
+
ry: 5,
|
|
811
|
+
cssStyles: ["text-align: left"]
|
|
812
|
+
};
|
|
813
|
+
_nodes.push(childNode);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return { nodes: _nodes, edges, other: {}, config: getConfig2() };
|
|
817
|
+
}, "getData");
|
|
818
|
+
var addNode = /* @__PURE__ */ __name((level, id, descr, type, shapeData) => {
|
|
819
|
+
const conf = getConfig2();
|
|
820
|
+
let padding = conf.mindmap?.padding ?? defaultConfig_default.mindmap.padding;
|
|
821
|
+
switch (type) {
|
|
822
|
+
case nodeType.ROUNDED_RECT:
|
|
823
|
+
case nodeType.RECT:
|
|
824
|
+
case nodeType.HEXAGON:
|
|
825
|
+
padding *= 2;
|
|
826
|
+
}
|
|
827
|
+
const node = {
|
|
828
|
+
id: sanitizeText(id, conf) || "kbn" + cnt++,
|
|
829
|
+
level,
|
|
830
|
+
label: sanitizeText(descr, conf),
|
|
831
|
+
width: conf.mindmap?.maxNodeWidth ?? defaultConfig_default.mindmap.maxNodeWidth,
|
|
832
|
+
padding,
|
|
833
|
+
isGroup: false
|
|
834
|
+
};
|
|
835
|
+
if (shapeData !== void 0) {
|
|
836
|
+
let yamlData;
|
|
837
|
+
if (!shapeData.includes("\n")) {
|
|
838
|
+
yamlData = "{\n" + shapeData + "\n}";
|
|
839
|
+
} else {
|
|
840
|
+
yamlData = shapeData + "\n";
|
|
841
|
+
}
|
|
842
|
+
const doc = load(yamlData, { schema: JSON_SCHEMA });
|
|
843
|
+
if (doc.shape && (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_"))) {
|
|
844
|
+
throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
|
|
845
|
+
}
|
|
846
|
+
if (doc?.shape && doc.shape === "kanbanItem") {
|
|
847
|
+
node.shape = doc?.shape;
|
|
848
|
+
}
|
|
849
|
+
if (doc?.label) {
|
|
850
|
+
node.label = doc?.label;
|
|
851
|
+
}
|
|
852
|
+
if (doc?.icon) {
|
|
853
|
+
node.icon = doc?.icon.toString();
|
|
854
|
+
}
|
|
855
|
+
if (doc?.assigned) {
|
|
856
|
+
node.assigned = doc?.assigned.toString();
|
|
857
|
+
}
|
|
858
|
+
if (doc?.ticket) {
|
|
859
|
+
node.ticket = doc?.ticket.toString();
|
|
860
|
+
}
|
|
861
|
+
if (doc?.priority) {
|
|
862
|
+
node.priority = doc?.priority;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
const section = getSection(level);
|
|
866
|
+
if (section) {
|
|
867
|
+
node.parentId = section.id || "kbn" + cnt++;
|
|
868
|
+
} else {
|
|
869
|
+
sections.push(node);
|
|
870
|
+
}
|
|
871
|
+
nodes.push(node);
|
|
872
|
+
}, "addNode");
|
|
873
|
+
var nodeType = {
|
|
874
|
+
DEFAULT: 0,
|
|
875
|
+
NO_BORDER: 0,
|
|
876
|
+
ROUNDED_RECT: 1,
|
|
877
|
+
RECT: 2,
|
|
878
|
+
CIRCLE: 3,
|
|
879
|
+
CLOUD: 4,
|
|
880
|
+
BANG: 5,
|
|
881
|
+
HEXAGON: 6
|
|
882
|
+
};
|
|
883
|
+
var getType = /* @__PURE__ */ __name((startStr, endStr) => {
|
|
884
|
+
log.debug("In get type", startStr, endStr);
|
|
885
|
+
switch (startStr) {
|
|
886
|
+
case "[":
|
|
887
|
+
return nodeType.RECT;
|
|
888
|
+
case "(":
|
|
889
|
+
return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD;
|
|
890
|
+
case "((":
|
|
891
|
+
return nodeType.CIRCLE;
|
|
892
|
+
case ")":
|
|
893
|
+
return nodeType.CLOUD;
|
|
894
|
+
case "))":
|
|
895
|
+
return nodeType.BANG;
|
|
896
|
+
case "{{":
|
|
897
|
+
return nodeType.HEXAGON;
|
|
898
|
+
default:
|
|
899
|
+
return nodeType.DEFAULT;
|
|
900
|
+
}
|
|
901
|
+
}, "getType");
|
|
902
|
+
var setElementForId = /* @__PURE__ */ __name((id, element) => {
|
|
903
|
+
elements[id] = element;
|
|
904
|
+
}, "setElementForId");
|
|
905
|
+
var decorateNode = /* @__PURE__ */ __name((decoration) => {
|
|
906
|
+
if (!decoration) {
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
const config = getConfig2();
|
|
910
|
+
const node = nodes[nodes.length - 1];
|
|
911
|
+
if (decoration.icon) {
|
|
912
|
+
node.icon = sanitizeText(decoration.icon, config);
|
|
913
|
+
}
|
|
914
|
+
if (decoration.class) {
|
|
915
|
+
node.cssClasses = sanitizeText(decoration.class, config);
|
|
916
|
+
}
|
|
917
|
+
}, "decorateNode");
|
|
918
|
+
var type2Str = /* @__PURE__ */ __name((type) => {
|
|
919
|
+
switch (type) {
|
|
920
|
+
case nodeType.DEFAULT:
|
|
921
|
+
return "no-border";
|
|
922
|
+
case nodeType.RECT:
|
|
923
|
+
return "rect";
|
|
924
|
+
case nodeType.ROUNDED_RECT:
|
|
925
|
+
return "rounded-rect";
|
|
926
|
+
case nodeType.CIRCLE:
|
|
927
|
+
return "circle";
|
|
928
|
+
case nodeType.CLOUD:
|
|
929
|
+
return "cloud";
|
|
930
|
+
case nodeType.BANG:
|
|
931
|
+
return "bang";
|
|
932
|
+
case nodeType.HEXAGON:
|
|
933
|
+
return "hexgon";
|
|
934
|
+
// cspell: disable-line
|
|
935
|
+
default:
|
|
936
|
+
return "no-border";
|
|
937
|
+
}
|
|
938
|
+
}, "type2Str");
|
|
939
|
+
var getLogger = /* @__PURE__ */ __name(() => log, "getLogger");
|
|
940
|
+
var getElementById = /* @__PURE__ */ __name((id) => elements[id], "getElementById");
|
|
941
|
+
var db = {
|
|
942
|
+
clear,
|
|
943
|
+
addNode,
|
|
944
|
+
getSections,
|
|
945
|
+
getData,
|
|
946
|
+
nodeType,
|
|
947
|
+
getType,
|
|
948
|
+
setElementForId,
|
|
949
|
+
decorateNode,
|
|
950
|
+
type2Str,
|
|
951
|
+
getLogger,
|
|
952
|
+
getElementById
|
|
953
|
+
};
|
|
954
|
+
var kanbanDb_default = db;
|
|
955
|
+
var draw = /* @__PURE__ */ __name(async (text, id, _version, diagObj) => {
|
|
956
|
+
log.debug("Rendering kanban diagram\n" + text);
|
|
957
|
+
const db2 = diagObj.db;
|
|
958
|
+
const data4Layout = db2.getData();
|
|
959
|
+
const conf = getConfig2();
|
|
960
|
+
conf.htmlLabels = false;
|
|
961
|
+
const svg = selectSvgElement(id);
|
|
962
|
+
for (const node of data4Layout.nodes) {
|
|
963
|
+
node.domId = `${id}-${node.id}`;
|
|
964
|
+
}
|
|
965
|
+
const sectionsElem = svg.append("g");
|
|
966
|
+
sectionsElem.attr("class", "sections");
|
|
967
|
+
const nodesElem = svg.append("g");
|
|
968
|
+
nodesElem.attr("class", "items");
|
|
969
|
+
const sections2 = data4Layout.nodes.filter(
|
|
970
|
+
// TODO: TypeScript 5.5 will infer this predicate automatically
|
|
971
|
+
(node) => node.isGroup
|
|
972
|
+
);
|
|
973
|
+
let cnt2 = 0;
|
|
974
|
+
const padding = 10;
|
|
975
|
+
const sectionObjects = [];
|
|
976
|
+
let maxLabelHeight = 25;
|
|
977
|
+
for (const section of sections2) {
|
|
978
|
+
const WIDTH = conf?.kanban?.sectionWidth || 200;
|
|
979
|
+
cnt2 = cnt2 + 1;
|
|
980
|
+
section.x = WIDTH * cnt2 + (cnt2 - 1) * padding / 2;
|
|
981
|
+
section.width = WIDTH;
|
|
982
|
+
section.y = 0;
|
|
983
|
+
section.height = WIDTH * 3;
|
|
984
|
+
section.rx = 5;
|
|
985
|
+
section.ry = 5;
|
|
986
|
+
section.cssClasses = section.cssClasses + " section-" + cnt2;
|
|
987
|
+
const sectionObj = await insertCluster(sectionsElem, section);
|
|
988
|
+
maxLabelHeight = Math.max(maxLabelHeight, sectionObj?.labelBBox?.height);
|
|
989
|
+
sectionObjects.push(sectionObj);
|
|
990
|
+
}
|
|
991
|
+
let i = 0;
|
|
992
|
+
for (const section of sections2) {
|
|
993
|
+
const sectionObj = sectionObjects[i];
|
|
994
|
+
i = i + 1;
|
|
995
|
+
const WIDTH = conf?.kanban?.sectionWidth || 200;
|
|
996
|
+
const top = -WIDTH * 3 / 2 + maxLabelHeight;
|
|
997
|
+
let y = top;
|
|
998
|
+
const sectionItems = data4Layout.nodes.filter((node) => node.parentId === section.id);
|
|
999
|
+
for (const item of sectionItems) {
|
|
1000
|
+
if (item.isGroup) {
|
|
1001
|
+
throw new Error("Groups within groups are not allowed in Kanban diagrams");
|
|
1002
|
+
}
|
|
1003
|
+
item.x = section.x;
|
|
1004
|
+
item.width = WIDTH - 1.5 * padding;
|
|
1005
|
+
const nodeEl = await insertNode(nodesElem, item, { config: conf });
|
|
1006
|
+
const bbox = nodeEl.node().getBBox();
|
|
1007
|
+
item.y = y + bbox.height / 2;
|
|
1008
|
+
await positionNode(item);
|
|
1009
|
+
y = item.y + bbox.height / 2 + padding / 2;
|
|
1010
|
+
}
|
|
1011
|
+
const rect = sectionObj.cluster.select("rect");
|
|
1012
|
+
const height = Math.max(y - top + 3 * padding, 50) + (maxLabelHeight - 25);
|
|
1013
|
+
rect.attr("height", height);
|
|
1014
|
+
}
|
|
1015
|
+
setupGraphViewbox(
|
|
1016
|
+
void 0,
|
|
1017
|
+
svg,
|
|
1018
|
+
conf.mindmap?.padding ?? defaultConfig_default.kanban.padding,
|
|
1019
|
+
conf.mindmap?.useMaxWidth ?? defaultConfig_default.kanban.useMaxWidth
|
|
1020
|
+
);
|
|
1021
|
+
}, "draw");
|
|
1022
|
+
var kanbanRenderer_default = {
|
|
1023
|
+
draw
|
|
1024
|
+
};
|
|
1025
|
+
var genSections = /* @__PURE__ */ __name((options) => {
|
|
1026
|
+
let sections2 = "";
|
|
1027
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
1028
|
+
options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
|
|
1029
|
+
if (is_dark_default(options["lineColor" + i])) {
|
|
1030
|
+
options["lineColor" + i] = lighten_default(options["lineColor" + i], 20);
|
|
1031
|
+
} else {
|
|
1032
|
+
options["lineColor" + i] = darken_default(options["lineColor" + i], 20);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
const adjuster = /* @__PURE__ */ __name((color, level) => options.darkMode ? darken_default(color, level) : lighten_default(color, level), "adjuster");
|
|
1036
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
1037
|
+
const sw = "" + (17 - 3 * i);
|
|
1038
|
+
sections2 += `
|
|
1039
|
+
.section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
|
|
1040
|
+
fill: ${adjuster(options["cScale" + i], 10)};
|
|
1041
|
+
stroke: ${adjuster(options["cScale" + i], 10)};
|
|
1042
|
+
|
|
1043
|
+
}
|
|
1044
|
+
.section-${i - 1} text {
|
|
1045
|
+
fill: ${options["cScaleLabel" + i]};
|
|
1046
|
+
}
|
|
1047
|
+
.node-icon-${i - 1} {
|
|
1048
|
+
font-size: 40px;
|
|
1049
|
+
color: ${options["cScaleLabel" + i]};
|
|
1050
|
+
}
|
|
1051
|
+
.section-edge-${i - 1}{
|
|
1052
|
+
stroke: ${options["cScale" + i]};
|
|
1053
|
+
}
|
|
1054
|
+
.edge-depth-${i - 1}{
|
|
1055
|
+
stroke-width: ${sw};
|
|
1056
|
+
}
|
|
1057
|
+
.section-${i - 1} line {
|
|
1058
|
+
stroke: ${options["cScaleInv" + i]} ;
|
|
1059
|
+
stroke-width: 3;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
.disabled, .disabled circle, .disabled text {
|
|
1063
|
+
fill: lightgray;
|
|
1064
|
+
}
|
|
1065
|
+
.disabled text {
|
|
1066
|
+
fill: #efefef;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.node rect,
|
|
1070
|
+
.node circle,
|
|
1071
|
+
.node ellipse,
|
|
1072
|
+
.node polygon,
|
|
1073
|
+
.node path {
|
|
1074
|
+
fill: ${options.background};
|
|
1075
|
+
stroke: ${options.nodeBorder};
|
|
1076
|
+
stroke-width: 1px;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.kanban-ticket-link {
|
|
1080
|
+
fill: ${options.background};
|
|
1081
|
+
stroke: ${options.nodeBorder};
|
|
1082
|
+
text-decoration: underline;
|
|
1083
|
+
}
|
|
1084
|
+
`;
|
|
1085
|
+
}
|
|
1086
|
+
return sections2;
|
|
1087
|
+
}, "genSections");
|
|
1088
|
+
var getStyles = /* @__PURE__ */ __name((options) => `
|
|
1089
|
+
.edge {
|
|
1090
|
+
stroke-width: 3;
|
|
1091
|
+
}
|
|
1092
|
+
${genSections(options)}
|
|
1093
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
1094
|
+
fill: ${options.git0};
|
|
1095
|
+
}
|
|
1096
|
+
.section-root text {
|
|
1097
|
+
fill: ${options.gitBranchLabel0};
|
|
1098
|
+
}
|
|
1099
|
+
.icon-container {
|
|
1100
|
+
height:100%;
|
|
1101
|
+
display: flex;
|
|
1102
|
+
justify-content: center;
|
|
1103
|
+
align-items: center;
|
|
1104
|
+
}
|
|
1105
|
+
.edge {
|
|
1106
|
+
fill: none;
|
|
1107
|
+
}
|
|
1108
|
+
.cluster-label, .label {
|
|
1109
|
+
color: ${options.textColor};
|
|
1110
|
+
fill: ${options.textColor};
|
|
1111
|
+
}
|
|
1112
|
+
.kanban-label {
|
|
1113
|
+
dy: 1em;
|
|
1114
|
+
alignment-baseline: middle;
|
|
1115
|
+
text-anchor: middle;
|
|
1116
|
+
dominant-baseline: middle;
|
|
1117
|
+
text-align: center;
|
|
1118
|
+
}
|
|
1119
|
+
${getIconStyles()}
|
|
1120
|
+
`, "getStyles");
|
|
1121
|
+
var styles_default = getStyles;
|
|
1122
|
+
var diagram = {
|
|
1123
|
+
db: kanbanDb_default,
|
|
1124
|
+
renderer: kanbanRenderer_default,
|
|
1125
|
+
parser: kanban_default,
|
|
1126
|
+
styles: styles_default
|
|
1127
|
+
};
|
|
1128
|
+
export {
|
|
1129
|
+
diagram
|
|
1130
|
+
};
|
|
1131
|
+
//# sourceMappingURL=kanban-definition-6JOO6SKY-URTTHHO4.js.map
|