mio-previewer 0.1.8 → 0.2.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/README.md +1 -0
- package/dist/_basePickBy-DX8HyU0P.cjs +1 -0
- package/dist/{_basePickBy-CFTZygnR.js → _basePickBy-DcS5DfHY.js} +8 -8
- package/dist/{_baseUniq-COpRdEZm.js → _baseUniq-l83jS7_4.js} +1 -1
- package/dist/_baseUniq-vU0U1MCI.cjs +1 -0
- package/dist/arc-B70jSpTY.cjs +1 -0
- package/dist/{arc-CA-zaVHH.js → arc-bi7W8tLs.js} +15 -15
- package/dist/{architecture-O4VJ6CD3-DhXiEYF9.js → architecture-O4VJ6CD3-C8ByyxUN.js} +1 -1
- package/dist/{architecture-O4VJ6CD3-CpYFg8kG.cjs → architecture-O4VJ6CD3-jex9YPqE.cjs} +1 -1
- package/dist/architectureDiagram-VXUJARFQ-BSJVVbTt.cjs +36 -0
- package/dist/{architectureDiagram-VXUJARFQ-CMDGkfwW.js → architectureDiagram-VXUJARFQ-b-BL2UdP.js} +132 -132
- package/dist/{blockDiagram-VD42YOAC-BboMD6jZ.cjs → blockDiagram-VD42YOAC-D4nmxP-J.cjs} +4 -4
- package/dist/{blockDiagram-VD42YOAC-B6yyyBoP.js → blockDiagram-VD42YOAC-DhCRAnFr.js} +45 -45
- package/dist/{c4Diagram-YG6GDRKO-CAnMUU5Q.cjs → c4Diagram-YG6GDRKO-Bp_YQG1M.cjs} +1 -1
- package/dist/{c4Diagram-YG6GDRKO-Bk3UfYds.js → c4Diagram-YG6GDRKO-CM4iNQrU.js} +2 -2
- package/dist/channel-Bt4_zqKM.cjs +1 -0
- package/dist/{channel-CGHeB_wL.js → channel-C7wjr4b0.js} +1 -1
- package/dist/chunk-4BX2VUAB-DN9_7iVV.cjs +1 -0
- package/dist/{chunk-4BX2VUAB-DQLiny3u.js → chunk-4BX2VUAB-InZ28TEE.js} +1 -1
- package/dist/chunk-55IACEB6-BssN5TPL.cjs +1 -0
- package/dist/{chunk-55IACEB6-BvzkNW0T.js → chunk-55IACEB6-DuQdcZe5.js} +3 -3
- package/dist/{chunk-B4BG7PRW-DNWDyosT.cjs → chunk-B4BG7PRW-BLtyK5WN.cjs} +3 -3
- package/dist/{chunk-B4BG7PRW-XH3xle9g.js → chunk-B4BG7PRW-CZmD1mOP.js} +10 -10
- package/dist/{chunk-DI55MBZ5-7cI7r4vk.js → chunk-DI55MBZ5-BhYOpZgL.js} +3 -3
- package/dist/{chunk-DI55MBZ5-DBabq0PW.cjs → chunk-DI55MBZ5-Cq5UKCn9.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-BSSIfQJH.cjs → chunk-FMBD7UC4-D8L83VzX.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-Z_IXsR9N.js → chunk-FMBD7UC4-DieuQ34J.js} +1 -1
- package/dist/chunk-QN33PNHL-BVzK2uit.cjs +1 -0
- package/dist/{chunk-QN33PNHL-dvg-wDdg.js → chunk-QN33PNHL-D-qtZN_m.js} +1 -1
- package/dist/chunk-QZHKN3VN-BVy_lsPP.cjs +1 -0
- package/dist/{chunk-QZHKN3VN-Chg9twhX.js → chunk-QZHKN3VN-iq-B0BYI.js} +1 -1
- package/dist/chunk-TZMSLE5B-BdG0scu4.cjs +1 -0
- package/dist/{chunk-TZMSLE5B-CIgbKyu_.js → chunk-TZMSLE5B-CLskNwI1.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CC9xOx_t.js → classDiagram-2ON5EDUG-CRW-UrMH.js} +2 -2
- package/dist/classDiagram-2ON5EDUG-DynvEPIH.cjs +1 -0
- package/dist/{classDiagram-2ON5EDUG-CC9xOx_t.js → classDiagram-v2-WZHVMYZB-CRW-UrMH.js} +2 -2
- package/dist/classDiagram-v2-WZHVMYZB-DynvEPIH.cjs +1 -0
- package/dist/{clone-BrZZgHT6.js → clone-BTfuqUhz.js} +1 -1
- package/dist/clone-Tk5CWuEC.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-BayjyXzv.cjs +1 -0
- package/dist/{cose-bilkent-S5V4N54A-CDs3BBYp.js → cose-bilkent-S5V4N54A-DWvW5ZH-.js} +1 -1
- package/dist/dagre-6UL2VRFP-CqJhtHGg.cjs +4 -0
- package/dist/{dagre-6UL2VRFP-BlMhpFnF.js → dagre-6UL2VRFP-CyO_II0i.js} +119 -119
- package/dist/diagram-PSM6KHXK-Deqqk-7H.cjs +24 -0
- package/dist/{diagram-PSM6KHXK-CoqSYWPX.js → diagram-PSM6KHXK-vEG2EZir.js} +53 -53
- package/dist/{diagram-QEK2KX5R-FqbXBaqH.js → diagram-QEK2KX5R-CcthhOYo.js} +20 -20
- package/dist/diagram-QEK2KX5R-CyVwjmz8.cjs +43 -0
- package/dist/{diagram-S2PKOQOG-u-4zOtyY.js → diagram-S2PKOQOG-C1nkRl8o.js} +23 -23
- package/dist/diagram-S2PKOQOG-D5cCXDLc.cjs +24 -0
- package/dist/{erDiagram-Q2GNP2WA-DWDeWLTL.cjs → erDiagram-Q2GNP2WA-BOk9K4o8.cjs} +1 -1
- package/dist/{erDiagram-Q2GNP2WA-CXn9GtvJ.js → erDiagram-Q2GNP2WA-DYZDQY9P.js} +4 -4
- package/dist/{flowDiagram-NV44I4VS-C60QhUiz.cjs → flowDiagram-NV44I4VS-CbBS7kpH.cjs} +3 -3
- package/dist/{flowDiagram-NV44I4VS-CvRJQSEg.js → flowDiagram-NV44I4VS-Cm5rGHKr.js} +14 -14
- package/dist/{ganttDiagram-LVOFAZNH-bsx5CB5d.js → ganttDiagram-LVOFAZNH-C9H8dTYM.js} +2 -2
- package/dist/ganttDiagram-LVOFAZNH-grl-NYJD.cjs +267 -0
- package/dist/{gitGraph-ZV4HHKMB-BjAayPSR.js → gitGraph-ZV4HHKMB-BMRuODZ5.js} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-kRwxNQnW.cjs → gitGraph-ZV4HHKMB-DQol4cxY.cjs} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-DPM59sAG.js → gitGraphDiagram-NY62KEGX-C8kfg2Wb.js} +45 -45
- package/dist/gitGraphDiagram-NY62KEGX-XHIAsakR.cjs +65 -0
- package/dist/graph-BP4aclXr.cjs +1 -0
- package/dist/{graph-CilVg985.js → graph-Cmal1ypF.js} +8 -8
- package/dist/info-63CPKGFF-BbRjNBBe.js +5 -0
- package/dist/{info-63CPKGFF-BKQtOsLZ.cjs → info-63CPKGFF-CxN4GUYe.cjs} +1 -1
- package/dist/{infoDiagram-F6ZHWCRC-B6bTTLIe.js → infoDiagram-F6ZHWCRC-D2_K2jLW.js} +2 -2
- package/dist/infoDiagram-F6ZHWCRC-DgwWwR_a.cjs +2 -0
- package/dist/{journeyDiagram-XKPGCS4Q-BKPpLUXu.js → journeyDiagram-XKPGCS4Q-BNauHD12.js} +4 -4
- package/dist/{journeyDiagram-XKPGCS4Q-CkWQvbbC.cjs → journeyDiagram-XKPGCS4Q-Cd1ptemy.cjs} +1 -1
- package/dist/{kanban-definition-3W4ZIXB7-DzI_mEvf.cjs → kanban-definition-3W4ZIXB7-BsVJ9Zr_.cjs} +2 -2
- package/dist/{kanban-definition-3W4ZIXB7-CLac2PpK.js → kanban-definition-3W4ZIXB7-aXwg7GQC.js} +44 -44
- package/dist/{layout-DOxjVt30.js → layout-CNXo_UYD.js} +4 -4
- package/dist/layout-UdmmrcAy.cjs +1 -0
- package/dist/{linear-nITCRSwN.js → linear-BJYenDkp.js} +25 -25
- package/dist/linear-yobfjqoN.cjs +1 -0
- package/dist/{mermaid-parser.core-YAHoRfr_.cjs → mermaid-parser.core-BGNM1z13.cjs} +2 -2
- package/dist/{mermaid-parser.core-BvyFzRhX.js → mermaid-parser.core-D65Eg7MW.js} +205 -205
- package/dist/{mindmap-definition-VGOIOE7T-8Pk45I0T.cjs → mindmap-definition-VGOIOE7T-BWwajGM9.cjs} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-BTlAV786.js → mindmap-definition-VGOIOE7T-Cj2T7UQL.js} +18 -18
- package/dist/mio-previewer.cjs.js +21 -13
- package/dist/mio-previewer.css +9 -1
- package/dist/mio-previewer.es.js +3647 -2009
- package/dist/{packet-HUATNLJX-Cn2d6cbh.js → packet-HUATNLJX-14SEU0O4.js} +1 -1
- package/dist/{packet-HUATNLJX-CNiEJWxQ.cjs → packet-HUATNLJX-Ckyin10q.cjs} +1 -1
- package/dist/{pie-WTHONI2E-CEUZL-GO.cjs → pie-WTHONI2E-BtmYKmK7.cjs} +1 -1
- package/dist/pie-WTHONI2E-C6yV7-lW.js +5 -0
- package/dist/{pieDiagram-ADFJNKIX-CgDIBKwo.js → pieDiagram-ADFJNKIX-BWiplVXs.js} +44 -44
- package/dist/pieDiagram-ADFJNKIX-DqeDsWS0.cjs +30 -0
- package/dist/plugins/custom.cjs.js +1 -1
- package/dist/plugins/custom.es.js +79 -5
- package/dist/{quadrantDiagram-AYHSOK5B-CExSZwWH.cjs → quadrantDiagram-AYHSOK5B-Bminc_qJ.cjs} +1 -1
- package/dist/{quadrantDiagram-AYHSOK5B-TlBxKPiG.js → quadrantDiagram-AYHSOK5B-FXg2sS-E.js} +2 -2
- package/dist/radar-NJJJXTRR-CF8VuBoZ.js +5 -0
- package/dist/{radar-NJJJXTRR-D3p36qrE.cjs → radar-NJJJXTRR-Dbtyn_33.cjs} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-Dl5ijlU7.js → requirementDiagram-UZGBJVZJ-Ciz2mLOm.js} +27 -27
- package/dist/{requirementDiagram-UZGBJVZJ-BEcIIQ5C.cjs → requirementDiagram-UZGBJVZJ-Ct1bmEYE.cjs} +1 -1
- package/dist/{sankeyDiagram-TZEHDZUN-bIR5yy8v.js → sankeyDiagram-TZEHDZUN-B2xkf9t6.js} +56 -56
- package/dist/sankeyDiagram-TZEHDZUN-TSSR-gzu.cjs +10 -0
- package/dist/{sequenceDiagram-WL72ISMW-DT79Xx9V.js → sequenceDiagram-WL72ISMW-DIpwERDr.js} +3 -3
- package/dist/{sequenceDiagram-WL72ISMW-BG5OjhGw.cjs → sequenceDiagram-WL72ISMW-DtCHtJNZ.cjs} +9 -9
- package/dist/stateDiagram-FKZM4ZOC-B1VqtZxH.cjs +1 -0
- package/dist/{stateDiagram-FKZM4ZOC-CDfDuz0s.js → stateDiagram-FKZM4ZOC-DSCBCFG_.js} +16 -16
- package/dist/stateDiagram-v2-4FDKWEC3-CH9hsq70.cjs +1 -0
- package/dist/{stateDiagram-v2-4FDKWEC3-DroYR31A.js → stateDiagram-v2-4FDKWEC3-DeOAmcI6.js} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-CzA493Rr.js → timeline-definition-IT6M3QCI-C2CJErQP.js} +24 -24
- package/dist/{timeline-definition-IT6M3QCI-BxCHgT34.cjs → timeline-definition-IT6M3QCI-Da0A3jAO.cjs} +5 -5
- package/dist/{treemap-75Q7IDZK-B7s32RV1.js → treemap-75Q7IDZK-BMEJe5sG.js} +1 -1
- package/dist/{treemap-75Q7IDZK-hLeVdex4.cjs → treemap-75Q7IDZK-obpm_ohS.cjs} +1 -1
- package/dist/types/composables/useImageViewerManager.d.ts +11 -0
- package/dist/types/main-image-viewer-demo.d.ts +1 -0
- package/dist/types/plugins/custom/imageViewerPlugin.d.ts +57 -0
- package/dist/types/plugins/custom/index.d.ts +2 -0
- package/dist/types/plugins/custom/mermaidPlugin.d.ts +15 -1
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/types.d.ts +23 -1
- package/dist/{cursorPlugin-vB5SgZWZ.cjs → viewer-3haLPWOp.cjs} +40 -40
- package/dist/{cursorPlugin-CLM_tkck.js → viewer-BVjz3IFH.js} +203 -202
- package/dist/{xychartDiagram-PRI3JC2R-DQLU-dCp.cjs → xychartDiagram-PRI3JC2R-DkdcvnXd.cjs} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-Bb_Kt4vj.js → xychartDiagram-PRI3JC2R-ttlQ38E3.js} +29 -29
- package/package.json +2 -1
- package/dist/_basePickBy-tPOC0EMH.cjs +0 -1
- package/dist/_baseUniq-DqpG5gxq.cjs +0 -1
- package/dist/arc-D6SpLjCN.cjs +0 -1
- package/dist/architectureDiagram-VXUJARFQ-C-ZDGP3T.cjs +0 -36
- package/dist/channel-By4yEUpY.cjs +0 -1
- package/dist/chunk-4BX2VUAB-r3h9zqZy.cjs +0 -1
- package/dist/chunk-55IACEB6-F8U2tzR2.cjs +0 -1
- package/dist/chunk-QN33PNHL-Cb-RTcJE.cjs +0 -1
- package/dist/chunk-QZHKN3VN-DR2ed2kF.cjs +0 -1
- package/dist/chunk-TZMSLE5B-D3CSz4N0.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-De8Dohf7.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-De8Dohf7.cjs +0 -1
- package/dist/clone-CXoO9ncp.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-0DFD6rcw.cjs +0 -1
- package/dist/dagre-6UL2VRFP-DuUBkSw0.cjs +0 -4
- package/dist/diagram-PSM6KHXK-CmQ4F2JN.cjs +0 -24
- package/dist/diagram-QEK2KX5R-DqSiNmiR.cjs +0 -43
- package/dist/diagram-S2PKOQOG-DYEcRvla.cjs +0 -24
- package/dist/ganttDiagram-LVOFAZNH-DuTD48a9.cjs +0 -267
- package/dist/gitGraphDiagram-NY62KEGX-DsyQIiCo.cjs +0 -65
- package/dist/graph-T55iHwif.cjs +0 -1
- package/dist/info-63CPKGFF-D-_lE7q9.js +0 -5
- package/dist/infoDiagram-F6ZHWCRC-Dfs9venE.cjs +0 -2
- package/dist/layout-LjH1X4pD.cjs +0 -1
- package/dist/linear-BZdfTIw6.cjs +0 -1
- package/dist/pie-WTHONI2E-COsOPmmh.js +0 -5
- package/dist/pieDiagram-ADFJNKIX-8mFQx_vI.cjs +0 -30
- package/dist/radar-NJJJXTRR-hKx4VhDB.js +0 -5
- package/dist/sankeyDiagram-TZEHDZUN-_AuPE8rx.cjs +0 -10
- package/dist/stateDiagram-FKZM4ZOC-CaZkY5ch.cjs +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-GfIoqgb_.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { I as
|
|
3
|
-
import { _ as l,
|
|
4
|
-
import { p as dr } from "./mermaid-parser.core-
|
|
1
|
+
import { p as Y } from "./chunk-4BX2VUAB-InZ28TEE.js";
|
|
2
|
+
import { I as K } from "./chunk-QZHKN3VN-iq-B0BYI.js";
|
|
3
|
+
import { _ as l, q as U, p as V, s as X, g as J, a as Q, b as Z, l as m, c as rr, d as er, u as tr, C as ar, y as sr, k as C, D as nr, E as or, F as cr, G as ir } from "./viewer-BVjz3IFH.js";
|
|
4
|
+
import { p as dr } from "./mermaid-parser.core-D65Eg7MW.js";
|
|
5
5
|
var p = {
|
|
6
6
|
NORMAL: 0,
|
|
7
7
|
REVERSE: 1,
|
|
@@ -11,7 +11,7 @@ var p = {
|
|
|
11
11
|
}, hr = cr.gitGraph, I = /* @__PURE__ */ l(() => nr({
|
|
12
12
|
...hr,
|
|
13
13
|
...or().gitGraph
|
|
14
|
-
}), "getConfig"), c = new
|
|
14
|
+
}), "getConfig"), c = new K(() => {
|
|
15
15
|
const t = I(), r = t.mainBranchName, s = t.mainBranchOrder;
|
|
16
16
|
return {
|
|
17
17
|
mainBranchName: r,
|
|
@@ -25,18 +25,18 @@ var p = {
|
|
|
25
25
|
options: {}
|
|
26
26
|
};
|
|
27
27
|
});
|
|
28
|
-
function
|
|
28
|
+
function A() {
|
|
29
29
|
return ir({ length: 7 });
|
|
30
30
|
}
|
|
31
|
-
l(
|
|
32
|
-
function
|
|
31
|
+
l(A, "getID");
|
|
32
|
+
function F(t, r) {
|
|
33
33
|
const s = /* @__PURE__ */ Object.create(null);
|
|
34
34
|
return t.reduce((n, e) => {
|
|
35
35
|
const a = r(e);
|
|
36
36
|
return s[a] || (s[a] = !0, n.push(e)), n;
|
|
37
37
|
}, []);
|
|
38
38
|
}
|
|
39
|
-
l(
|
|
39
|
+
l(F, "uniqBy");
|
|
40
40
|
var lr = /* @__PURE__ */ l(function(t) {
|
|
41
41
|
c.records.direction = t;
|
|
42
42
|
}, "setDirection"), $r = /* @__PURE__ */ l(function(t) {
|
|
@@ -56,7 +56,7 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
56
56
|
const a = I();
|
|
57
57
|
s = C.sanitizeText(s, a), r = C.sanitizeText(r, a), e = e?.map((o) => C.sanitizeText(o, a));
|
|
58
58
|
const d = {
|
|
59
|
-
id: s || c.records.seq + "-" +
|
|
59
|
+
id: s || c.records.seq + "-" + A(),
|
|
60
60
|
message: r,
|
|
61
61
|
seq: c.records.seq++,
|
|
62
62
|
type: n ?? p.NORMAL,
|
|
@@ -72,7 +72,7 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
72
72
|
throw new Error(
|
|
73
73
|
`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
|
|
74
74
|
);
|
|
75
|
-
c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }),
|
|
75
|
+
c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }), z(r), m.debug("in createBranch");
|
|
76
76
|
}, "branch"), ur = /* @__PURE__ */ l((t) => {
|
|
77
77
|
let r = t.branch, s = t.id;
|
|
78
78
|
const n = t.type, e = t.tags, a = I();
|
|
@@ -139,7 +139,7 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
139
139
|
}, i;
|
|
140
140
|
}
|
|
141
141
|
const $ = o || "", g = {
|
|
142
|
-
id: s || `${c.records.seq}-${
|
|
142
|
+
id: s || `${c.records.seq}-${A()}`,
|
|
143
143
|
message: `merged branch ${r} into ${c.records.currBranch}`,
|
|
144
144
|
seq: c.records.seq++,
|
|
145
145
|
parents: c.records.head == null ? [] : [c.records.head.id, $],
|
|
@@ -210,7 +210,7 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
210
210
|
}, g;
|
|
211
211
|
}
|
|
212
212
|
const $ = {
|
|
213
|
-
id: c.records.seq + "-" +
|
|
213
|
+
id: c.records.seq + "-" + A(),
|
|
214
214
|
message: `cherry-picked ${d?.message} into ${c.records.currBranch}`,
|
|
215
215
|
seq: c.records.seq++,
|
|
216
216
|
parents: c.records.head == null ? [] : [c.records.head.id, d.id],
|
|
@@ -222,7 +222,7 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
222
222
|
};
|
|
223
223
|
c.records.head = $, c.records.commits.set($.id, $), c.records.branches.set(c.records.currBranch, $.id), m.debug(c.records.branches), m.debug("in cherryPick");
|
|
224
224
|
}
|
|
225
|
-
}, "cherryPick"),
|
|
225
|
+
}, "cherryPick"), z = /* @__PURE__ */ l(function(t) {
|
|
226
226
|
if (t = C.sanitizeText(t, I()), c.records.branches.has(t)) {
|
|
227
227
|
c.records.currBranch = t;
|
|
228
228
|
const r = c.records.branches.get(c.records.currBranch);
|
|
@@ -238,11 +238,11 @@ var lr = /* @__PURE__ */ l(function(t) {
|
|
|
238
238
|
}, r;
|
|
239
239
|
}
|
|
240
240
|
}, "checkout");
|
|
241
|
-
function
|
|
241
|
+
function H(t, r, s) {
|
|
242
242
|
const n = t.indexOf(r);
|
|
243
243
|
n === -1 ? t.push(s) : t.splice(n, 1, s);
|
|
244
244
|
}
|
|
245
|
-
l(
|
|
245
|
+
l(H, "upsert");
|
|
246
246
|
function P(t) {
|
|
247
247
|
const r = t.reduce((e, a) => e.seq > a.seq ? e : a, t[0]);
|
|
248
248
|
let s = "";
|
|
@@ -254,16 +254,16 @@ function P(t) {
|
|
|
254
254
|
c.records.branches.get(e) === r.id && n.push(e);
|
|
255
255
|
if (m.debug(n.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
|
|
256
256
|
const e = c.records.commits.get(r.parents[0]);
|
|
257
|
-
|
|
257
|
+
H(t, r, e), r.parents[1] && t.push(c.records.commits.get(r.parents[1]));
|
|
258
258
|
} else {
|
|
259
259
|
if (r.parents.length == 0)
|
|
260
260
|
return;
|
|
261
261
|
if (r.parents[0]) {
|
|
262
262
|
const e = c.records.commits.get(r.parents[0]);
|
|
263
|
-
|
|
263
|
+
H(t, r, e);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
t =
|
|
266
|
+
t = F(t, (e) => e.id), P(t);
|
|
267
267
|
}
|
|
268
268
|
l(P, "prettyPrintCommitHistory");
|
|
269
269
|
var pr = /* @__PURE__ */ l(function() {
|
|
@@ -302,7 +302,7 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
302
302
|
branch: yr,
|
|
303
303
|
merge: ur,
|
|
304
304
|
cherryPick: xr,
|
|
305
|
-
checkout:
|
|
305
|
+
checkout: z,
|
|
306
306
|
//reset,
|
|
307
307
|
prettyPrint: pr,
|
|
308
308
|
clear: mr,
|
|
@@ -320,7 +320,7 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
320
320
|
setDiagramTitle: V,
|
|
321
321
|
getDiagramTitle: U
|
|
322
322
|
}, Br = /* @__PURE__ */ l((t, r) => {
|
|
323
|
-
|
|
323
|
+
Y(t, r), t.dir && r.setDirection(t.dir);
|
|
324
324
|
for (const s of t.statements)
|
|
325
325
|
Lr(s, r);
|
|
326
326
|
}, "populate"), Lr = /* @__PURE__ */ l((t, r) => {
|
|
@@ -355,8 +355,8 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
355
355
|
const r = await dr("gitGraph", t);
|
|
356
356
|
m.debug(r), Br(r, S);
|
|
357
357
|
}, "parse")
|
|
358
|
-
},
|
|
359
|
-
b.clear(), w.clear(), R.clear(), B = 0,
|
|
358
|
+
}, qr = rr(), v = qr?.gitGraph, L = 10, k = 40, E = 4, T = 2, M = 8, b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), O = 30, R = /* @__PURE__ */ new Map(), q = [], B = 0, u = "LR", Ar = /* @__PURE__ */ l(() => {
|
|
359
|
+
b.clear(), w.clear(), R.clear(), B = 0, q = [], u = "LR";
|
|
360
360
|
}, "clear"), W = /* @__PURE__ */ l((t) => {
|
|
361
361
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
362
362
|
return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((n) => {
|
|
@@ -369,26 +369,26 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
369
369
|
const a = u === "TB" || u == "BT" ? w.get(e)?.y : w.get(e)?.x;
|
|
370
370
|
a !== void 0 && s(a, n) && (r = e, n = a);
|
|
371
371
|
}), r;
|
|
372
|
-
}, "findClosestParent"),
|
|
372
|
+
}, "findClosestParent"), _r = /* @__PURE__ */ l((t) => {
|
|
373
373
|
let r = "", s = 1 / 0;
|
|
374
374
|
return t.forEach((n) => {
|
|
375
375
|
const e = w.get(n).y;
|
|
376
376
|
e <= s && (r = n, s = e);
|
|
377
377
|
}), r || void 0;
|
|
378
|
-
}, "findClosestParentBT"),
|
|
378
|
+
}, "findClosestParentBT"), Hr = /* @__PURE__ */ l((t, r, s) => {
|
|
379
379
|
let n = s, e = s;
|
|
380
380
|
const a = [];
|
|
381
381
|
t.forEach((d) => {
|
|
382
382
|
const o = r.get(d);
|
|
383
383
|
if (!o)
|
|
384
384
|
throw new Error(`Commit not found for key ${d}`);
|
|
385
|
-
o.parents.length ? (n =
|
|
385
|
+
o.parents.length ? (n = Dr(o), e = Math.max(n, e)) : a.push(o), Fr(o, n);
|
|
386
386
|
}), n = e, a.forEach((d) => {
|
|
387
|
-
|
|
387
|
+
zr(d, n, s);
|
|
388
388
|
}), t.forEach((d) => {
|
|
389
389
|
const o = r.get(d);
|
|
390
390
|
if (o?.parents.length) {
|
|
391
|
-
const f =
|
|
391
|
+
const f = _r(o.parents);
|
|
392
392
|
n = w.get(f).y - k, n <= e && (e = n);
|
|
393
393
|
const h = b.get(o.branch).pos, $ = n - L;
|
|
394
394
|
w.set(o.id, { x: h, y: $ });
|
|
@@ -402,13 +402,13 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
402
402
|
if (s === void 0)
|
|
403
403
|
throw new Error(`Closest parent position not found for commit ${t.id}`);
|
|
404
404
|
return s;
|
|
405
|
-
}, "findClosestParentPos"),
|
|
405
|
+
}, "findClosestParentPos"), Dr = /* @__PURE__ */ l((t) => Pr(t) + k, "calculateCommitPosition"), Fr = /* @__PURE__ */ l((t, r) => {
|
|
406
406
|
const s = b.get(t.branch);
|
|
407
407
|
if (!s)
|
|
408
408
|
throw new Error(`Branch not found for commit ${t.id}`);
|
|
409
409
|
const n = s.pos, e = r + L;
|
|
410
410
|
return w.set(t.id, { x: n, y: e }), { x: n, y: e };
|
|
411
|
-
}, "setCommitPosition"),
|
|
411
|
+
}, "setCommitPosition"), zr = /* @__PURE__ */ l((t, r, s) => {
|
|
412
412
|
const n = b.get(t.branch);
|
|
413
413
|
if (!n)
|
|
414
414
|
throw new Error(`Branch not found for commit ${t.id}`);
|
|
@@ -515,7 +515,7 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
515
515
|
default:
|
|
516
516
|
return "commit-normal";
|
|
517
517
|
}
|
|
518
|
-
}, "getCommitClassType"),
|
|
518
|
+
}, "getCommitClassType"), Yr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
519
519
|
const e = { x: 0, y: 0 };
|
|
520
520
|
if (t.parents.length > 0) {
|
|
521
521
|
const a = j(t.parents);
|
|
@@ -526,12 +526,12 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
526
526
|
} else
|
|
527
527
|
return r === "TB" ? O : r === "BT" ? (n.get(t.id) ?? e).y - k : 0;
|
|
528
528
|
return 0;
|
|
529
|
-
}, "calculatePosition"),
|
|
529
|
+
}, "calculatePosition"), Kr = /* @__PURE__ */ l((t, r, s) => {
|
|
530
530
|
const n = u === "BT" && s ? r : r + L, e = u === "TB" || u === "BT" ? n : b.get(t.branch)?.pos, a = u === "TB" || u === "BT" ? b.get(t.branch)?.pos : n;
|
|
531
531
|
if (a === void 0 || e === void 0)
|
|
532
532
|
throw new Error(`Position were undefined for commit ${t.id}`);
|
|
533
533
|
return { x: a, y: e, posWithOffset: n };
|
|
534
|
-
}, "getCommitPosition"),
|
|
534
|
+
}, "getCommitPosition"), D = /* @__PURE__ */ l((t, r, s) => {
|
|
535
535
|
if (!v)
|
|
536
536
|
throw new Error("GitGraph config not found");
|
|
537
537
|
const n = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
|
|
@@ -541,15 +541,15 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
541
541
|
return i !== void 0 && y !== void 0 ? i - y : 0;
|
|
542
542
|
}, "sortKeys");
|
|
543
543
|
let h = d.sort(f);
|
|
544
|
-
u === "BT" && (o &&
|
|
544
|
+
u === "BT" && (o && Hr(h, r, a), h = h.reverse()), h.forEach(($) => {
|
|
545
545
|
const g = r.get($);
|
|
546
546
|
if (!g)
|
|
547
547
|
throw new Error(`Commit not found for key ${$}`);
|
|
548
|
-
o && (a =
|
|
549
|
-
const i =
|
|
548
|
+
o && (a = Yr(g, u, a, w));
|
|
549
|
+
const i = Kr(g, a, o);
|
|
550
550
|
if (s) {
|
|
551
|
-
const y = jr(g), x = g.customType ?? g.type,
|
|
552
|
-
Nr(n, g, i, y,
|
|
551
|
+
const y = jr(g), x = g.customType ?? g.type, _ = b.get(g.branch)?.index ?? 0;
|
|
552
|
+
Nr(n, g, i, y, _, x), Sr(e, g, i, a), Wr(e, g, i, a);
|
|
553
553
|
}
|
|
554
554
|
u === "TB" || u === "BT" ? w.set(g.id, { x: i.x, y: i.posWithOffset }) : w.set(g.id, { x: i.posWithOffset, y: i.y }), a = u === "BT" && o ? a + k : a + k + L, a > B && (B = a);
|
|
555
555
|
});
|
|
@@ -560,8 +560,8 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
560
560
|
const n = t + Math.abs(t - r) / 2;
|
|
561
561
|
if (s > 5)
|
|
562
562
|
return n;
|
|
563
|
-
if (
|
|
564
|
-
return
|
|
563
|
+
if (q.every((d) => Math.abs(d - n) >= 10))
|
|
564
|
+
return q.push(n), n;
|
|
565
565
|
const a = Math.abs(t - r);
|
|
566
566
|
return G(t, r - a / 5, s + 1);
|
|
567
567
|
}, "findLane"), Vr = /* @__PURE__ */ l((t, r, s, n) => {
|
|
@@ -596,7 +596,7 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
596
596
|
if (d === void 0)
|
|
597
597
|
throw new Error(`Position not found for branch ${n.name}`);
|
|
598
598
|
const o = s.append("line");
|
|
599
|
-
o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)),
|
|
599
|
+
o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)), q.push(d);
|
|
600
600
|
const f = n.name, h = W(f), $ = s.insert("rect"), i = s.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
|
|
601
601
|
i.node().appendChild(h);
|
|
602
602
|
const y = h.getBBox();
|
|
@@ -608,7 +608,7 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
608
608
|
}, "drawBranches"), Qr = /* @__PURE__ */ l(function(t, r, s, n, e) {
|
|
609
609
|
return b.set(t, { pos: r, index: s }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? n.width / 2 : 0), r;
|
|
610
610
|
}, "setBranchPosition"), Zr = /* @__PURE__ */ l(function(t, r, s, n) {
|
|
611
|
-
if (
|
|
611
|
+
if (Ar(), m.debug("in gitgraph renderer", t + `
|
|
612
612
|
`, "id:", r, s), !v)
|
|
613
613
|
throw new Error("GitGraph config not found");
|
|
614
614
|
const e = v.rotateCommitLabel ?? !1, a = n.db;
|
|
@@ -620,9 +620,9 @@ var pr = /* @__PURE__ */ l(function() {
|
|
|
620
620
|
d.forEach((h, $) => {
|
|
621
621
|
const g = W(h.name), i = o.append("g"), y = i.insert("g").attr("class", "branchLabel"), x = y.insert("g").attr("class", "label branch-label");
|
|
622
622
|
x.node()?.appendChild(g);
|
|
623
|
-
const
|
|
624
|
-
f = Qr(h.name, f, $,
|
|
625
|
-
}),
|
|
623
|
+
const _ = g.getBBox();
|
|
624
|
+
f = Qr(h.name, f, $, _, e), x.remove(), y.remove(), i.remove();
|
|
625
|
+
}), D(o, R, !1), v.showBranches && Jr(o, d), Xr(o, R), D(o, R, !0), tr.insertTitle(
|
|
626
626
|
o,
|
|
627
627
|
"gitTitleText",
|
|
628
628
|
v.titleTopMargin ?? 0,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-4BX2VUAB-DN9_7iVV.cjs"),j=require("./chunk-QZHKN3VN-BVy_lsPP.cjs"),s=require("./viewer-3haLPWOp.cjs"),K=require("./mermaid-parser.core-BGNM1z13.cjs");var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},U=s.defaultConfig_default.gitGraph,L=s.__name(()=>s.cleanAndMerge({...U,...s.getConfig().gitGraph}),"getConfig"),i=new j.ImperativeState(()=>{const t=L(),e=t.mainBranchName,n=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:n}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function G(){return s.random({length:7})}s.__name(G,"getID");function H(t,e){const n=Object.create(null);return t.reduce((o,r)=>{const a=e(r);return n[a]||(n[a]=!0,o.push(r)),o},[])}s.__name(H,"uniqBy");var Y=s.__name(function(t){i.records.direction=t},"setDirection"),V=s.__name(function(t){s.log.debug("options str",t),t=t?.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(e){s.log.error("error while parsing gitGraph options",e.message)}},"setOptions"),X=s.__name(function(){return i.records.options},"getOptions"),Q=s.__name(function(t){let e=t.msg,n=t.id;const o=t.type;let r=t.tags;s.log.info("commit",e,n,o,r),s.log.debug("Entering commit:",e,n,o,r);const a=L();n=s.common_default.sanitizeText(n,a),e=s.common_default.sanitizeText(e,a),r=r?.map(c=>s.common_default.sanitizeText(c,a));const l={id:n||i.records.seq+"-"+G(),message:e,seq:i.records.seq++,type:o??x.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=l,s.log.info("main branch",a.mainBranchName),i.records.commits.has(l.id)&&s.log.warn(`Commit ID ${l.id} already exists`),i.records.commits.set(l.id,l),i.records.branches.set(i.records.currBranch,l.id),s.log.debug("in pushCommit "+l.id)},"commit"),J=s.__name(function(t){let e=t.name;const n=t.order;if(e=s.common_default.sanitizeText(e,L()),i.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);i.records.branches.set(e,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(e,{name:e,order:n}),D(e),s.log.debug("in createBranch")},"branch"),Z=s.__name(t=>{let e=t.branch,n=t.id;const o=t.type,r=t.tags,a=L();e=s.common_default.sanitizeText(e,a),n&&(n=s.common_default.sanitizeText(n,a));const l=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(e),f=l?i.records.commits.get(l):void 0,h=c?i.records.commits.get(c):void 0;if(f&&h&&f.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(i.records.currBranch===e){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(f===void 0||!f){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!i.records.branches.has(e)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(h===void 0||!h){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if(f===h){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(n&&i.records.commits.has(n)){const d=new Error('Incorrect usage of "merge". Commit with id:'+n+" already exists, use different custom id");throw d.hash={text:`merge ${e} ${n} ${o} ${r?.join(" ")}`,token:`merge ${e} ${n} ${o} ${r?.join(" ")}`,expected:[`merge ${e} ${n}_UNIQUE ${o} ${r?.join(" ")}`]},d}const $=c||"",g={id:n||`${i.records.seq}-${G()}`,message:`merged branch ${e} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,$],branch:i.records.currBranch,type:x.MERGE,customType:o,customId:!!n,tags:r??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),s.log.debug(i.records.branches),s.log.debug("in mergeBranch")},"merge"),ee=s.__name(function(t){let e=t.id,n=t.targetId,o=t.tags,r=t.parent;s.log.debug("Entering cherryPick:",e,n,o);const a=L();if(e=s.common_default.sanitizeText(e,a),n=s.common_default.sanitizeText(n,a),o=o?.map(f=>s.common_default.sanitizeText(f,a)),r=s.common_default.sanitizeText(r,a),!e||!i.records.commits.has(e)){const f=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw f.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},f}const l=i.records.commits.get(e);if(l===void 0||!l)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(l.parents)&&l.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=l.branch;if(l.type===x.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!n||!i.records.commits.has(n)){if(c===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},g}const f=i.records.branches.get(i.records.currBranch);if(f===void 0||!f){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},g}const h=i.records.commits.get(f);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${n}`,token:`cherryPick ${e} ${n}`,expected:["cherry-pick abc"]},g}const $={id:i.records.seq+"-"+G(),message:`cherry-picked ${l?.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,l.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${l.id}${l.type===x.MERGE?`|parent:${r}`:""}`]};i.records.head=$,i.records.commits.set($.id,$),i.records.branches.set(i.records.currBranch,$.id),s.log.debug(i.records.branches),s.log.debug("in cherryPick")}},"cherryPick"),D=s.__name(function(t){if(t=s.common_default.sanitizeText(t,L()),i.records.branches.has(t)){i.records.currBranch=t;const e=i.records.branches.get(i.records.currBranch);e===void 0||!e?i.records.head=null:i.records.head=i.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function A(t,e,n){const o=t.indexOf(e);o===-1?t.push(n):t.splice(o,1,n)}s.__name(A,"upsert");function q(t){const e=t.reduce((r,a)=>r.seq>a.seq?r:a,t[0]);let n="";t.forEach(function(r){r===e?n+=" *":n+=" |"});const o=[n,e.id,e.seq];for(const r in i.records.branches)i.records.branches.get(r)===e.id&&o.push(r);if(s.log.debug(o.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=i.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(i.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=i.records.commits.get(e.parents[0]);A(t,e,r)}}t=H(t,r=>r.id),q(t)}s.__name(q,"prettyPrintCommitHistory");var re=s.__name(function(){s.log.debug(i.records.commits);const t=N()[0];q([t])},"prettyPrint"),te=s.__name(function(){i.reset(),s.clear()},"clear"),ae=s.__name(function(){return[...i.records.branchConfig.values()].map((e,n)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${n}`)}).sort((e,n)=>(e.order??0)-(n.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ne=s.__name(function(){return i.records.branches},"getBranches"),se=s.__name(function(){return i.records.commits},"getCommits"),N=s.__name(function(){const t=[...i.records.commits.values()];return t.forEach(function(e){s.log.debug(e.id)}),t.sort((e,n)=>e.seq-n.seq),t},"getCommitsArray"),oe=s.__name(function(){return i.records.currBranch},"getCurrentBranch"),ce=s.__name(function(){return i.records.direction},"getDirection"),ie=s.__name(function(){return i.records.head},"getHead"),z={commitType:x,getConfig:L,setDirection:Y,setOptions:V,getOptions:X,commit:Q,branch:J,merge:Z,cherryPick:ee,checkout:D,prettyPrint:re,clear:te,getBranchesAsObjArray:ae,getBranches:ne,getCommits:se,getCommitsArray:N,getCurrentBranch:oe,getDirection:ce,getHead:ie,setAccTitle:s.setAccTitle,getAccTitle:s.getAccTitle,getAccDescription:s.getAccDescription,setAccDescription:s.setAccDescription,setDiagramTitle:s.setDiagramTitle,getDiagramTitle:s.getDiagramTitle},de=s.__name((t,e)=>{W.populateCommonDb(t,e),t.dir&&e.setDirection(t.dir);for(const n of t.statements)le(n,e)},"populate"),le=s.__name((t,e)=>{const o={Commit:s.__name(r=>e.commit(he(r)),"Commit"),Branch:s.__name(r=>e.branch($e(r)),"Branch"),Merge:s.__name(r=>e.merge(fe(r)),"Merge"),Checkout:s.__name(r=>e.checkout(ge(r)),"Checkout"),CherryPicking:s.__name(r=>e.cherryPick(ye(r)),"CherryPicking")}[t.$type];o?o(t):s.log.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),he=s.__name(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),$e=s.__name(t=>({name:t.name,order:t.order??0}),"parseBranch"),fe=s.__name(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),ge=s.__name(t=>t.branch,"parseCheckout"),ye=s.__name(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),ue={parse:s.__name(async t=>{const e=await K.parse("gitGraph",t);s.log.debug(e),de(e,z)},"parse")},me=s.getConfig2(),_=me?.gitGraph,E=10,T=40,w=4,v=2,B=8,p=new Map,b=new Map,I=30,k=new Map,R=[],C=0,u="LR",xe=s.__name(()=>{p.clear(),b.clear(),k.clear(),C=0,R=[],u="LR"},"clear"),F=s.__name(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(o=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=o.trim(),e.appendChild(r)}),e},"drawText"),S=s.__name(t=>{let e,n,o;return u==="BT"?(n=s.__name((r,a)=>r<=a,"comparisonFunc"),o=1/0):(n=s.__name((r,a)=>r>=a,"comparisonFunc"),o=0),t.forEach(r=>{const a=u==="TB"||u=="BT"?b.get(r)?.y:b.get(r)?.x;a!==void 0&&n(a,o)&&(e=r,o=a)}),e},"findClosestParent"),pe=s.__name(t=>{let e="",n=1/0;return t.forEach(o=>{const r=b.get(o).y;r<=n&&(e=o,n=r)}),e||void 0},"findClosestParentBT"),be=s.__name((t,e,n)=>{let o=n,r=n;const a=[];t.forEach(l=>{const c=e.get(l);if(!c)throw new Error(`Commit not found for key ${l}`);c.parents.length?(o=we(c),r=Math.max(o,r)):a.push(c),ve(c,o)}),o=r,a.forEach(l=>{Ce(l,o,n)}),t.forEach(l=>{const c=e.get(l);if(c?.parents.length){const f=pe(c.parents);o=b.get(f).y-T,o<=r&&(r=o);const h=p.get(c.branch).pos,$=o-E;b.set(c.id,{x:h,y:$})}})},"setParallelBTPos"),_e=s.__name(t=>{const e=S(t.parents.filter(o=>o!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const n=b.get(e)?.y;if(n===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return n},"findClosestParentPos"),we=s.__name(t=>_e(t)+T,"calculateCommitPosition"),ve=s.__name((t,e)=>{const n=p.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=n.pos,r=e+E;return b.set(t.id,{x:o,y:r}),{x:o,y:r}},"setCommitPosition"),Ce=s.__name((t,e,n)=>{const o=p.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const r=e+n,a=o.pos;b.set(t.id,{x:a,y:r})},"setRootPosition"),Ee=s.__name((t,e,n,o,r,a)=>{if(a===x.HIGHLIGHT)t.append("rect").attr("x",n.x-10).attr("y",n.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%B} ${o}-outer`),t.append("rect").attr("x",n.x-6).attr("y",n.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%B} ${o}-inner`);else if(a===x.CHERRY_PICK)t.append("circle").attr("cx",n.x).attr("cy",n.y).attr("r",10).attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",n.x-3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",n.x+3).attr("cy",n.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",n.x+3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",n.x-3).attr("y1",n.y+1).attr("x2",n.x).attr("y2",n.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`);else{const l=t.append("circle");if(l.attr("cx",n.x),l.attr("cy",n.y),l.attr("r",e.type===x.MERGE?9:10),l.attr("class",`commit ${e.id} commit${r%B}`),a===x.MERGE){const c=t.append("circle");c.attr("cx",n.x),c.attr("cy",n.y),c.attr("r",6),c.attr("class",`commit ${o} ${e.id} commit${r%B}`)}a===x.REVERSE&&t.append("path").attr("d",`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr("class",`commit ${o} ${e.id} commit${r%B}`)}},"drawCommitBullet"),Te=s.__name((t,e,n,o)=>{if(e.type!==x.CHERRY_PICK&&(e.customId&&e.type===x.MERGE||e.type!==x.MERGE)&&_?.showCommitLabel){const r=t.append("g"),a=r.insert("rect").attr("class","commit-label-bkg"),l=r.append("text").attr("x",o).attr("y",n.y+25).attr("class","commit-label").text(e.id),c=l.node()?.getBBox();if(c&&(a.attr("x",n.posWithOffset-c.width/2-v).attr("y",n.y+13.5).attr("width",c.width+2*v).attr("height",c.height+2*v),u==="TB"||u==="BT"?(a.attr("x",n.x-(c.width+4*w+5)).attr("y",n.y-12),l.attr("x",n.x-(c.width+4*w)).attr("y",n.y+c.height-12)):l.attr("x",n.posWithOffset-c.width/2),_.rotateCommitLabel))if(u==="TB"||u==="BT")l.attr("transform","rotate(-45, "+n.x+", "+n.y+")"),a.attr("transform","rotate(-45, "+n.x+", "+n.y+")");else{const f=-7.5-(c.width+10)/25*9.5,h=10+c.width/25*8.5;r.attr("transform","translate("+f+", "+h+") rotate(-45, "+o+", "+n.y+")")}}},"drawCommitLabel"),Be=s.__name((t,e,n,o)=>{if(e.tags.length>0){let r=0,a=0,l=0;const c=[];for(const f of e.tags.reverse()){const h=t.insert("polygon"),$=t.append("circle"),g=t.append("text").attr("y",n.y-16-r).attr("class","tag-label").text(f),d=g.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),l=Math.max(l,d.height),g.attr("x",n.posWithOffset-d.width/2),c.push({tag:g,hole:$,rect:h,yOffset:r}),r+=20}for(const{tag:f,hole:h,rect:$,yOffset:g}of c){const d=l/2,y=n.y-19.2-g;if($.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${o-a/2-w/2},${y+v}
|
|
3
|
+
${o-a/2-w/2},${y-v}
|
|
4
|
+
${n.posWithOffset-a/2-w},${y-d-v}
|
|
5
|
+
${n.posWithOffset+a/2+w},${y-d-v}
|
|
6
|
+
${n.posWithOffset+a/2+w},${y+d+v}
|
|
7
|
+
${n.posWithOffset-a/2-w},${y+d+v}`),h.attr("cy",y).attr("cx",o-a/2+w/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const m=o+g;$.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
+
${n.x},${m+2}
|
|
9
|
+
${n.x},${m-2}
|
|
10
|
+
${n.x+E},${m-d-2}
|
|
11
|
+
${n.x+E+a+4},${m-d-2}
|
|
12
|
+
${n.x+E+a+4},${m+d+2}
|
|
13
|
+
${n.x+E},${m+d+2}`).attr("transform","translate(12,12) rotate(45, "+n.x+","+o+")"),h.attr("cx",n.x+w/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+n.x+","+o+")"),f.attr("x",n.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+n.x+","+o+")")}}}},"drawCommitTags"),Le=s.__name(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),ke=s.__name((t,e,n,o)=>{const r={x:0,y:0};if(t.parents.length>0){const a=S(t.parents);if(a){const l=o.get(a)??r;return e==="TB"?l.y+T:e==="BT"?(o.get(t.id)??r).y-T:l.x+T}}else return e==="TB"?I:e==="BT"?(o.get(t.id)??r).y-T:0;return 0},"calculatePosition"),Me=s.__name((t,e,n)=>{const o=u==="BT"&&n?e:e+E,r=u==="TB"||u==="BT"?o:p.get(t.branch)?.pos,a=u==="TB"||u==="BT"?p.get(t.branch)?.pos:o;if(a===void 0||r===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:r,posWithOffset:o}},"getCommitPosition"),P=s.__name((t,e,n)=>{if(!_)throw new Error("GitGraph config not found");const o=t.append("g").attr("class","commit-bullets"),r=t.append("g").attr("class","commit-labels");let a=u==="TB"||u==="BT"?I:0;const l=[...e.keys()],c=_?.parallelCommits??!1,f=s.__name(($,g)=>{const d=e.get($)?.seq,y=e.get(g)?.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let h=l.sort(f);u==="BT"&&(c&&be(h,e,a),h=h.reverse()),h.forEach($=>{const g=e.get($);if(!g)throw new Error(`Commit not found for key ${$}`);c&&(a=ke(g,u,a,b));const d=Me(g,a,c);if(n){const y=Le(g),m=g.customType??g.type,O=p.get(g.branch)?.index??0;Ee(o,g,d,y,O,m),Te(r,g,d,a),Be(r,g,d,a)}u==="TB"||u==="BT"?b.set(g.id,{x:d.x,y:d.posWithOffset}):b.set(g.id,{x:d.posWithOffset,y:d.y}),a=u==="BT"&&c?a+T:a+T+E,a>C&&(C=a)})},"drawCommits"),Ie=s.__name((t,e,n,o,r)=>{const l=(u==="TB"||u==="BT"?n.x<o.x:n.y<o.y)?e.branch:t.branch,c=s.__name(h=>h.branch===l,"isOnBranchToGetCurve"),f=s.__name(h=>h.seq>t.seq&&h.seq<e.seq,"isBetweenCommits");return[...r.values()].some(h=>f(h)&&c(h))},"shouldRerouteArrow"),M=s.__name((t,e,n=0)=>{const o=t+Math.abs(t-e)/2;if(n>5)return o;if(R.every(l=>Math.abs(l-o)>=10))return R.push(o),o;const a=Math.abs(t-e);return M(t,e-a/5,n+1)},"findLane"),Re=s.__name((t,e,n,o)=>{const r=b.get(e.id),a=b.get(n.id);if(r===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${n.id}`);const l=Ie(e,n,r,a,o);let c="",f="",h=0,$=0,g=p.get(n.branch)?.index;n.type===x.MERGE&&e.id!==n.parents[0]&&(g=p.get(e.branch)?.index);let d;if(l){c="A 10 10, 0, 0, 0,",f="A 10 10, 0, 0, 1,",h=10,$=10;const y=r.y<a.y?M(r.y,a.y):M(a.y,r.y),m=r.x<a.x?M(r.x,a.x):M(a.x,r.x);u==="TB"?r.x<a.x?d=`M ${r.x} ${r.y} L ${m-h} ${r.y} ${f} ${m} ${r.y+$} L ${m} ${a.y-h} ${c} ${m+$} ${a.y} L ${a.x} ${a.y}`:(g=p.get(e.branch)?.index,d=`M ${r.x} ${r.y} L ${m+h} ${r.y} ${c} ${m} ${r.y+$} L ${m} ${a.y-h} ${f} ${m-$} ${a.y} L ${a.x} ${a.y}`):u==="BT"?r.x<a.x?d=`M ${r.x} ${r.y} L ${m-h} ${r.y} ${c} ${m} ${r.y-$} L ${m} ${a.y+h} ${f} ${m+$} ${a.y} L ${a.x} ${a.y}`:(g=p.get(e.branch)?.index,d=`M ${r.x} ${r.y} L ${m+h} ${r.y} ${f} ${m} ${r.y-$} L ${m} ${a.y+h} ${c} ${m-$} ${a.y} L ${a.x} ${a.y}`):r.y<a.y?d=`M ${r.x} ${r.y} L ${r.x} ${y-h} ${c} ${r.x+$} ${y} L ${a.x-h} ${y} ${f} ${a.x} ${y+$} L ${a.x} ${a.y}`:(g=p.get(e.branch)?.index,d=`M ${r.x} ${r.y} L ${r.x} ${y+h} ${f} ${r.x+$} ${y} L ${a.x-h} ${y} ${c} ${a.x} ${y-$} L ${a.x} ${a.y}`)}else c="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,u==="TB"?(r.x<a.x&&(n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${a.y-h} ${c} ${r.x+$} ${a.y} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${f} ${a.x} ${r.y+$} L ${a.x} ${a.y}`),r.x>a.x&&(c="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${a.y-h} ${f} ${r.x-$} ${a.y} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${a.x+h} ${r.y} ${c} ${a.x} ${r.y+$} L ${a.x} ${a.y}`),r.x===a.x&&(d=`M ${r.x} ${r.y} L ${a.x} ${a.y}`)):u==="BT"?(r.x<a.x&&(n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${a.y+h} ${f} ${r.x+$} ${a.y} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${c} ${a.x} ${r.y-$} L ${a.x} ${a.y}`),r.x>a.x&&(c="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${a.y+h} ${c} ${r.x-$} ${a.y} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${c} ${a.x} ${r.y-$} L ${a.x} ${a.y}`),r.x===a.x&&(d=`M ${r.x} ${r.y} L ${a.x} ${a.y}`)):(r.y<a.y&&(n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${f} ${a.x} ${r.y+$} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${r.x} ${a.y-h} ${c} ${r.x+$} ${a.y} L ${a.x} ${a.y}`),r.y>a.y&&(n.type===x.MERGE&&e.id!==n.parents[0]?d=`M ${r.x} ${r.y} L ${a.x-h} ${r.y} ${c} ${a.x} ${r.y-$} L ${a.x} ${a.y}`:d=`M ${r.x} ${r.y} L ${r.x} ${a.y+h} ${f} ${r.x+$} ${a.y} L ${a.x} ${a.y}`),r.y===a.y&&(d=`M ${r.x} ${r.y} L ${a.x} ${a.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%B)},"drawArrow"),Ge=s.__name((t,e)=>{const n=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(o=>{const r=e.get(o);r.parents&&r.parents.length>0&&r.parents.forEach(a=>{Re(n,e.get(a),r,e)})})},"drawArrows"),Oe=s.__name((t,e)=>{const n=t.append("g");e.forEach((o,r)=>{const a=r%B,l=p.get(o.name)?.pos;if(l===void 0)throw new Error(`Position not found for branch ${o.name}`);const c=n.append("line");c.attr("x1",0),c.attr("y1",l),c.attr("x2",C),c.attr("y2",l),c.attr("class","branch branch"+a),u==="TB"?(c.attr("y1",I),c.attr("x1",l),c.attr("y2",C),c.attr("x2",l)):u==="BT"&&(c.attr("y1",C),c.attr("x1",l),c.attr("y2",I),c.attr("x2",l)),R.push(l);const f=o.name,h=F(f),$=n.insert("rect"),d=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);d.node().appendChild(h);const y=h.getBBox();$.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-y.width-4-(_?.rotateCommitLabel===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-(_?.rotateCommitLabel===!0?30:0))+", "+(l-y.height/2-1)+")"),u==="TB"?($.attr("x",l-y.width/2-10).attr("y",0),d.attr("transform","translate("+(l-y.width/2-5)+", 0)")):u==="BT"?($.attr("x",l-y.width/2-10).attr("y",C),d.attr("transform","translate("+(l-y.width/2-5)+", "+C+")")):$.attr("transform","translate(-19, "+(l-y.height/2)+")")})},"drawBranches"),Ae=s.__name(function(t,e,n,o,r){return p.set(t,{pos:e,index:n}),e+=50+(r?40:0)+(u==="TB"||u==="BT"?o.width/2:0),e},"setBranchPosition"),qe=s.__name(function(t,e,n,o){if(xe(),s.log.debug("in gitgraph renderer",t+`
|
|
14
|
+
`,"id:",e,n),!_)throw new Error("GitGraph config not found");const r=_.rotateCommitLabel??!1,a=o.db;k=a.getCommits();const l=a.getBranchesAsObjArray();u=a.getDirection();const c=s.select(`[id="${e}"]`);let f=0;l.forEach((h,$)=>{const g=F(h.name),d=c.append("g"),y=d.insert("g").attr("class","branchLabel"),m=y.insert("g").attr("class","label branch-label");m.node()?.appendChild(g);const O=g.getBBox();f=Ae(h.name,f,$,O,r),m.remove(),y.remove(),d.remove()}),P(c,k,!1),_.showBranches&&Oe(c,l),Ge(c,k),P(c,k,!0),s.utils_default.insertTitle(c,"gitTitleText",_.titleTopMargin??0,a.getDiagramTitle()),s.setupGraphViewbox2(void 0,c,_.diagramPadding,_.useMaxWidth)},"draw"),Pe={draw:qe},He=s.__name(t=>`
|
|
15
|
+
.commit-id,
|
|
16
|
+
.commit-msg,
|
|
17
|
+
.branch-label {
|
|
18
|
+
fill: lightgrey;
|
|
19
|
+
color: lightgrey;
|
|
20
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
21
|
+
font-family: var(--mermaid-font-family);
|
|
22
|
+
}
|
|
23
|
+
${[0,1,2,3,4,5,6,7].map(e=>`
|
|
24
|
+
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
|
|
25
|
+
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
|
|
26
|
+
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
|
|
27
|
+
.label${e} { fill: ${t["git"+e]}; }
|
|
28
|
+
.arrow${e} { stroke: ${t["git"+e]}; }
|
|
29
|
+
`).join(`
|
|
30
|
+
`)}
|
|
31
|
+
|
|
32
|
+
.branch {
|
|
33
|
+
stroke-width: 1;
|
|
34
|
+
stroke: ${t.lineColor};
|
|
35
|
+
stroke-dasharray: 2;
|
|
36
|
+
}
|
|
37
|
+
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
38
|
+
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
39
|
+
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
40
|
+
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
41
|
+
.tag-hole { fill: ${t.textColor}; }
|
|
42
|
+
|
|
43
|
+
.commit-merge {
|
|
44
|
+
stroke: ${t.primaryColor};
|
|
45
|
+
fill: ${t.primaryColor};
|
|
46
|
+
}
|
|
47
|
+
.commit-reverse {
|
|
48
|
+
stroke: ${t.primaryColor};
|
|
49
|
+
fill: ${t.primaryColor};
|
|
50
|
+
stroke-width: 3;
|
|
51
|
+
}
|
|
52
|
+
.commit-highlight-outer {
|
|
53
|
+
}
|
|
54
|
+
.commit-highlight-inner {
|
|
55
|
+
stroke: ${t.primaryColor};
|
|
56
|
+
fill: ${t.primaryColor};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
60
|
+
.gitTitleText {
|
|
61
|
+
text-anchor: middle;
|
|
62
|
+
font-size: 18px;
|
|
63
|
+
fill: ${t.textColor};
|
|
64
|
+
}
|
|
65
|
+
`,"getStyles"),De=He,Ne={parser:ue,db:z,renderer:Pe,styles:De};exports.diagram=Ne;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./viewer-3haLPWOp.cjs"),n=require("./_baseUniq-vU0U1MCI.cjs");var b=u.baseRest(function(o){return n.baseUniq(n.baseFlatten(o,1,u.isArrayLikeObject,!0))}),E="\0",a="\0",g="";class f{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=u.constant$1(void 0),this._defaultEdgeLabelFn=u.constant$1(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return u.isFunction(e)||(e=u.constant$1(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return n.keys(this._nodes)}sources(){var e=this;return n.filter(this.nodes(),function(t){return u.isEmpty(e._in[t])})}sinks(){var e=this;return n.filter(this.nodes(),function(t){return u.isEmpty(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return n.forEach(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.forEach(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),n.forEach(n.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],n.forEach(n.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n.isUndefined(t))t=a;else{t+="";for(var s=t;!n.isUndefined(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(n.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return n.keys(t)}successors(e){var t=this._sucs[e];if(t)return n.keys(t)}neighbors(e){var t=this.predecessors(e);if(t)return b(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;n.forEach(this._nodes,function(h,d){e(d)&&t.setNode(d,h)}),n.forEach(this._edgeObjs,function(h){t.hasNode(h.v)&&t.hasNode(h.w)&&t.setEdge(h,s.edge(h))});var i={};function r(h){var d=s.parent(h);return d===void 0||t.hasNode(d)?(i[h]=d,d):d in i?i[d]:r(d)}return this._isCompound&&n.forEach(t.nodes(),function(h){t.setParent(h,r(h))}),t}setDefaultEdgeLabel(e){return u.isFunction(e)||(e=u.constant$1(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return n.values(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return n.reduce(e,function(r,h){return i.length>1?s.setEdge(r,h,t):s.setEdge(r,h),h}),this}setEdge(){var e,t,s,i,r=!1,h=arguments[0];typeof h=="object"&&h!==null&&"v"in h?(e=h.v,t=h.w,s=h.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=h,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,n.isUndefined(s)||(s=""+s);var d=_(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,d))return r&&(this._edgeLabels[d]=i),this;if(!n.isUndefined(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=r?i:this._defaultEdgeLabelFn(e,t,s);var l=y(this._isDirected,e,t,s);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,p(this._preds[t],e),p(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],m(this._preds[t],e),m(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}f.prototype._nodeCount=0;f.prototype._edgeCount=0;function p(o,e){o[e]?o[e]++:o[e]=1}function m(o,e){--o[e]||delete o[e]}function _(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}return i+g+r+g+(n.isUndefined(s)?E:s)}function y(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}var d={v:i,w:r};return s&&(d.name=s),d}function c(o,e){return _(o,e.v,e.w,e.name)}exports.Graph=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as v, c as P, k as _, f as g, d, i as l, v as p, r as D } from "./_baseUniq-
|
|
1
|
+
import { aA as N, aB as j, aC as f, aD as b, aE as E } from "./viewer-BVjz3IFH.js";
|
|
2
|
+
import { a as v, c as P, k as _, f as g, d, i as l, v as p, r as D } from "./_baseUniq-l83jS7_4.js";
|
|
3
3
|
var w = N(function(o) {
|
|
4
4
|
return v(P(o, 1, j, !0));
|
|
5
5
|
}), F = "\0", a = "\0", O = "";
|
|
@@ -175,8 +175,8 @@ class L {
|
|
|
175
175
|
if (!l(s) && !this._isMultigraph)
|
|
176
176
|
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
177
177
|
this.setNode(e), this.setNode(t), this._edgeLabels[h] = r ? i : this._defaultEdgeLabelFn(e, t, s);
|
|
178
|
-
var u =
|
|
179
|
-
return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u,
|
|
178
|
+
var u = M(this._isDirected, e, t, s);
|
|
179
|
+
return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u, C(this._preds[t], e), C(this._sucs[e], t), this._in[t][h] = u, this._out[e][h] = u, this._edgeCount++, this;
|
|
180
180
|
}
|
|
181
181
|
edge(e, t, s) {
|
|
182
182
|
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
|
@@ -188,7 +188,7 @@ class L {
|
|
|
188
188
|
}
|
|
189
189
|
removeEdge(e, t, s) {
|
|
190
190
|
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s), r = this._edgeObjs[i];
|
|
191
|
-
return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i],
|
|
191
|
+
return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i], y(this._preds[t], e), y(this._sucs[e], t), delete this._in[t][i], delete this._out[e][i], this._edgeCount--), this;
|
|
192
192
|
}
|
|
193
193
|
inEdges(e, t) {
|
|
194
194
|
var s = this._in[e];
|
|
@@ -216,10 +216,10 @@ class L {
|
|
|
216
216
|
}
|
|
217
217
|
L.prototype._nodeCount = 0;
|
|
218
218
|
L.prototype._edgeCount = 0;
|
|
219
|
-
function
|
|
219
|
+
function C(o, e) {
|
|
220
220
|
o[e] ? o[e]++ : o[e] = 1;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function y(o, e) {
|
|
223
223
|
--o[e] || delete o[e];
|
|
224
224
|
}
|
|
225
225
|
function c(o, e, t, s) {
|
|
@@ -230,7 +230,7 @@ function c(o, e, t, s) {
|
|
|
230
230
|
}
|
|
231
231
|
return i + O + r + O + (l(s) ? F : s);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function M(o, e, t, s) {
|
|
234
234
|
var i = "" + e, r = "" + t;
|
|
235
235
|
if (!o && i > r) {
|
|
236
236
|
var n = i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-BGNM1z13.cjs");exports.InfoModule=e.InfoModule;exports.createInfoServices=e.createInfoServices;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, l as s,
|
|
2
|
-
import { p } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as e, l as s, H as o, e as i, I as g } from "./viewer-BVjz3IFH.js";
|
|
2
|
+
import { p } from "./mermaid-parser.core-D65Eg7MW.js";
|
|
3
3
|
var v = {
|
|
4
4
|
parse: /* @__PURE__ */ e(async (r) => {
|
|
5
5
|
const a = await p("info", r);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./viewer-3haLPWOp.cjs"),s=require("./mermaid-parser.core-BGNM1z13.cjs");var o={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},i={version:e.package_default.version+""},g=e.__name(()=>i.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
|
|
2
|
+
`+r);const t=e.selectSvgElement(a);e.configureSvgSize(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),c={draw:v},p={parser:o,db:d,renderer:c};exports.diagram=p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as gt, g as lt, f as mt, d as xt } from "./chunk-TZMSLE5B-
|
|
2
|
-
import { g as kt } from "./chunk-FMBD7UC4-
|
|
3
|
-
import { _ as n, g as _t, s as vt,
|
|
4
|
-
import { d as et } from "./arc-
|
|
1
|
+
import { a as gt, g as lt, f as mt, d as xt } from "./chunk-TZMSLE5B-CLskNwI1.js";
|
|
2
|
+
import { g as kt } from "./chunk-FMBD7UC4-DieuQ34J.js";
|
|
3
|
+
import { _ as n, g as _t, s as vt, a as bt, b as wt, q as Tt, p as St, c as R, d as X, e as $t, y as Mt } from "./viewer-BVjz3IFH.js";
|
|
4
|
+
import { d as et } from "./arc-bi7W8tLs.js";
|
|
5
5
|
var U = (function() {
|
|
6
6
|
var t = /* @__PURE__ */ n(function(h, i, a, l) {
|
|
7
7
|
for (a = a || {}, l = h.length; l--; a[h[l]] = i) ;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("./chunk-TZMSLE5B-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("./chunk-TZMSLE5B-BdG0scu4.cjs"),ft=require("./chunk-FMBD7UC4-D8L83VzX.cjs"),i=require("./viewer-3haLPWOp.cjs"),tt=require("./arc-B70jSpTY.cjs");var G=(function(){var t=i.__name(function(h,n,s,l){for(s=s||{},l=h.length;l--;s[h[l]]=n);return s},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],_={trace:i.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i.__name(function(n,s,l,d,p,o,b){var x=o.length-1;switch(p){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 13:d.addTask(o[x-1],o[x]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i.__name(function(n,s){if(s.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=s,l}},"parseError"),parse:i.__name(function(n){var s=this,l=[0],d=[],p=[null],o=[],b=this.table,x="",E=0,D=0,ht=2,J=1,ut=o.slice.call(arguments,1),k=Object.create(this.lexer),A={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(A.yy[q]=this.yy[q]);k.setInput(n,A.yy),A.yy.lexer=k,A.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var O=k.yylloc;o.push(O);var dt=k.options&&k.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}i.__name(yt,"popStack");function K(){var w;return w=d.pop()||k.lex()||J,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=s.symbols_[w]||w),w}i.__name(K,"lex");for(var v,I,T,Y,F={},N,M,Q,z;;){if(I=l[l.length-1],this.defaultActions[I]?T=this.defaultActions[I]:((v===null||typeof v>"u")&&(v=K()),T=b[I]&&b[I][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[I])this.terminals_[N]&&N>ht&&z.push("'"+this.terminals_[N]+"'");k.showPosition?H="Parse error on line "+(E+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'":H="Parse error on line "+(E+1)+": Unexpected "+(v==J?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(H,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:O,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+v);switch(T[0]){case 1:l.push(v),p.push(k.yytext),o.push(k.yylloc),l.push(T[1]),v=null,D=k.yyleng,x=k.yytext,E=k.yylineno,O=k.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=p[p.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},dt&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),Y=this.performAction.apply(F,[x,D,E,A.yy,T[1],p,o].concat(ut)),typeof Y<"u")return Y;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),p.push(F.$),o.push(F._$),Q=b[l[l.length-2]][l[l.length-1]],l.push(Q);break;case 3:return!0}}return!0},"parse")},g=(function(){var h={EOF:1,parseError:i.__name(function(s,l){if(this.yy.parser)this.yy.parser.parseError(s,l);else throw new Error(s)},"parseError"),setInput:i.__name(function(n,s){return this.yy=s||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i.__name(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var s=n.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:i.__name(function(n){var s=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:i.__name(function(){return this._more=!0,this},"more"),reject:i.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i.__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:i.__name(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i.__name(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i.__name(function(){var n=this.pastInput(),s=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
package/dist/{kanban-definition-3W4ZIXB7-DzI_mEvf.cjs → kanban-definition-3W4ZIXB7-BsVJ9Zr_.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./viewer-3haLPWOp.cjs"),le=require("./chunk-FMBD7UC4-D8L83VzX.cjs");var J=(function(){var e=n.__name(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),u=[1,4],p=[1,13],r=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],C=[1,26],g=[1,24],w=[1,25],b=[6,7,11],F=[1,31],x=[6,7,11,24],B=[1,6,13,16,17,20,23],y=[1,35],T=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],A={trace:n.__name(function(){},"trace"),yy:{},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},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"},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]],performAction:n.__name(function(s,i,a,o,h,t,G){var c=t.length-1;switch(h){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",t[c-1].id),o.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:o.getLogger().info("Node: ",t[c].id),o.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:o.getLogger().trace("Icon: ",t[c]),o.decorateNode({icon:t[c]});break;case 18:case 23:o.decorateNode({class:t[c]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",t[c-1].id),o.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:o.getLogger().trace("Node: ",t[c].id),o.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:o.decorateNode({icon:t[c]});break;case 27:o.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:o.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:o.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:o.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:r,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:r,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:r,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:C,7:g,10:23,11:w},e(b,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(b,[2,19]),e(b,[2,21],{15:30,24:F}),e(b,[2,22]),e(b,[2,23]),e(x,[2,25]),e(x,[2,26]),e(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:r,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(B,[2,14],{7:y,11:T}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(b,[2,16],{15:37,24:F}),e(b,[2,17]),e(b,[2,18]),e(b,[2,20],{24:M}),e(x,[2,31]),{21:[1,39]},{22:[1,40]},e(B,[2,13],{7:y,11:T}),e(L,[2,11]),e(L,[2,12]),e(b,[2,15],{24:M}),e(x,[2,30]),{22:[1,41]},e(x,[2,27]),e(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:n.__name(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:n.__name(function(s){var i=this,a=[0],o=[],h=[null],t=[],G=this.table,c="",U=0,ee=0,re=2,te=1,ae=t.slice.call(arguments,1),_=Object.create(this.lexer),R={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(R.yy[X]=this.yy[X]);_.setInput(s,R.yy),R.yy.lexer=_,R.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var K=_.yylloc;t.push(K);var oe=_.options&&_.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){a.length=a.length-2*S,h.length=h.length-S,t.length=t.length-S}n.__name(ce,"popStack");function ne(){var S;return S=o.pop()||_.lex()||te,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=i.symbols_[S]||S),S}n.__name(ne,"lex");for(var E,P,N,Y,j={},H,I,ie,z;;){if(P=a[a.length-1],this.defaultActions[P]?N=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ne()),N=G[P]&&G[P][E]),typeof N>"u"||!N.length||!N[0]){var q="";z=[];for(H in G[P])this.terminals_[H]&&H>re&&z.push("'"+this.terminals_[H]+"'");_.showPosition?q="Parse error on line "+(U+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[E]||E)+"'":q="Parse error on line "+(U+1)+": Unexpected "+(E==te?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(q,{text:_.match,token:this.terminals_[E]||E,line:_.yylineno,loc:K,expected:z})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(N[0]){case 1:a.push(E),h.push(_.yytext),t.push(_.yylloc),a.push(N[1]),E=null,ee=_.yyleng,c=_.yytext,U=_.yylineno,K=_.yylloc;break;case 2:if(I=this.productions_[N[1]][1],j.$=h[h.length-I],j._$={first_line:t[t.length-(I||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(I||1)].first_column,last_column:t[t.length-1].last_column},oe&&(j._$.range=[t[t.length-(I||1)].range[0],t[t.length-1].range[1]]),Y=this.performAction.apply(j,[c,ee,U,R.yy,N[1],h,t].concat(ae)),typeof Y<"u")return Y;I&&(a=a.slice(0,-1*I*2),h=h.slice(0,-1*I),t=t.slice(0,-1*I)),a.push(this.productions_[N[1]][0]),h.push(j.$),t.push(j._$),ie=G[a[a.length-2]][a[a.length-1]],a.push(ie);break;case 3:return!0}}return!0},"parse")},W=(function(){var O={EOF:1,parseError:n.__name(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:n.__name(function(s,i){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);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},"input"),unput:n.__name(function(s){var i=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -8,7 +8,7 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[E]||E)+"'":q="Parse error on
|
|
|
8
8
|
`:C=`{
|
|
9
9
|
`+d+`
|
|
10
10
|
}`;const g=n.load(C,{schema:n.JSON_SCHEMA});if(g.shape&&(g.shape!==g.shape.toLowerCase()||g.shape.includes("_")))throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);g?.shape&&g.shape==="kanbanItem"&&(l.shape=g?.shape),g?.label&&(l.label=g?.label),g?.icon&&(l.icon=g?.icon.toString()),g?.assigned&&(l.assigned=g?.assigned.toString()),g?.ticket&&(l.ticket=g?.ticket.toString()),g?.priority&&(l.priority=g?.priority)}const D=ge(e);D?l.parentId=D.id||"kbn"+Q++:Z.push(l),v.push(l)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},fe=n.__name((e,u)=>{switch(n.log.debug("In get type",e,u),e){case"[":return f.RECT;case"(":return u===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),_e=n.__name((e,u)=>{$[e]=u},"setElementForId"),me=n.__name(e=>{if(!e)return;const u=n.getConfig2(),p=v[v.length-1];e.icon&&(p.icon=n.sanitizeText(e.icon,u)),e.class&&(p.cssClasses=n.sanitizeText(e.class,u))},"decorateNode"),ye=n.__name(e=>{switch(e){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),be=n.__name(()=>n.log,"getLogger"),ke=n.__name(e=>$[e],"getElementById"),Ee={clear:ue,addNode:pe,getSections:se,getData:de,nodeType:f,getType:fe,setElementForId:_e,decorateNode:me,type2Str:ye,getLogger:be,getElementById:ke},Se=Ee,xe=n.__name(async(e,u,p,r)=>{n.log.debug(`Rendering kanban diagram
|
|
11
|
-
`+e);const k=r.db.getData(),m=n.getConfig2();m.htmlLabels=!1;const l=n.selectSvgElement(u),D=l.append("g");D.attr("class","sections");const C=l.append("g");C.attr("class","items");const g=k.nodes.filter(y=>y.isGroup);let
|
|
11
|
+
`+e);const k=r.db.getData(),m=n.getConfig2();m.htmlLabels=!1;const l=n.selectSvgElement(u),D=l.append("g");D.attr("class","sections");const C=l.append("g");C.attr("class","items");const g=k.nodes.filter(y=>y.isGroup);let w=0;const b=10,F=[];let x=25;for(const y of g){const T=m?.kanban?.sectionWidth||200;w=w+1,y.x=T*w+(w-1)*b/2,y.width=T,y.y=0,y.height=T*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+w;const L=await n.insertCluster(D,y);x=Math.max(x,L?.labelBBox?.height),F.push(L)}let B=0;for(const y of g){const T=F[B];B=B+1;const L=m?.kanban?.sectionWidth||200,M=-L*3/2+x;let A=M;const W=k.nodes.filter(s=>s.parentId===y.id);for(const s of W){if(s.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");s.x=y.x,s.width=L-1.5*b;const a=(await n.insertNode(C,s,{config:m})).node().getBBox();s.y=A+a.height/2,await n.positionNode(s),A=s.y+a.height/2+b/2}const V=T.cluster.select("rect"),O=Math.max(A-M+3*b,50)+(x-25);V.attr("height",O)}n.setupGraphViewbox(void 0,l,m.mindmap?.padding??n.defaultConfig_default.kanban.padding,m.mindmap?.useMaxWidth??n.defaultConfig_default.kanban.useMaxWidth)},"draw"),Ne={draw:xe},ve=n.__name(e=>{let u="";for(let r=0;r<e.THEME_COLOR_LIMIT;r++)e["lineColor"+r]=e["lineColor"+r]||e["cScaleInv"+r],n.isDark(e["lineColor"+r])?e["lineColor"+r]=n.lighten(e["lineColor"+r],20):e["lineColor"+r]=n.darken(e["lineColor"+r],20);const p=n.__name((r,d)=>e.darkMode?n.darken(r,d):n.lighten(r,d),"adjuster");for(let r=0;r<e.THEME_COLOR_LIMIT;r++){const d=""+(17-3*r);u+=`
|
|
12
12
|
.section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
|
|
13
13
|
fill: ${p(e["cScale"+r],10)};
|
|
14
14
|
stroke: ${p(e["cScale"+r],10)};
|