@kong-ui-public/documentation 1.4.17-pr.2665.525593492.0 → 1.4.17
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/dist/_basePickBy-BCsiP0lE-DJBdvZNn.js +151 -0
- package/dist/{_baseUniq-SAfYgIkf-buEvGj9H.js → _baseUniq-CsvgMmt0-CCBG5z_B.js} +165 -165
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +83 -0
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +5 -0
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +4665 -0
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +2265 -0
- package/dist/{c4Diagram-6F5ED5ID-D5yqWyf0-DzlUmurv.js → c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js} +4 -4
- package/dist/{channel-bVcNKbrJ-NqcPkfCx.js → channel-3QVQMCTA-BwyrTaJi.js} +1 -1
- package/dist/{chunk-TMUBEWPD-BRIzn5gH-alZ9Sg3f.js → chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js} +1 -1
- package/dist/{chunk-KFBOBJHC-nixdujtH-CrTZo7r-.js → chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js} +1 -1
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +19 -0
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +1374 -0
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +1382 -0
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +20 -0
- package/dist/{chunk-ASOPGD6M-B5bA_saK-BiT875Ve.js → chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js} +1 -1
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +8 -0
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +16 -0
- package/dist/{clone-_5SW34SG-DOuhA6mG.js → clone-C0dvnYv6-BozdSvey.js} +1 -1
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +18721 -0
- package/dist/{dagre-4EVJKHTY-CcAruc30-B3UMlKNl.js → dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js} +53 -53
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +171 -0
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +533 -0
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +143 -0
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +221 -0
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +860 -399
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +840 -0
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +1627 -0
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +2504 -0
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +5 -0
- package/dist/{gitGraphDiagram-NRZ2UAAF-B-t90-9e-BkGPAEnk.js → gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js} +103 -103
- package/dist/{graph-BYZMvqpu-BXRs5843.js → graph-B_1gOUDz-Dm6REFzZ.js} +2 -2
- package/dist/{index-CMZig9xg.js → index-BDD0CD9m.js} +9834 -9540
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +5 -0
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +24 -0
- package/dist/{journeyDiagram-G5WM74LC-BE7U42Ad-y6YegUqL.js → journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js} +357 -333
- package/dist/{kanban-definition-QRCXZQQD-C-5-UNRm-BOYYKTAB.js → kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js} +75 -73
- package/dist/{katex-Qk2jHgyB-_qyJ_37x.js → katex-C0Lgw_Sx-CbX2I1cQ.js} +1864 -1814
- package/dist/{layout-BHI4imdk-CESYC-il.js → layout-9vIfpCf3-FfABA43y.js} +81 -81
- package/dist/linear-C-k9vokG-Md9dfBfB.js +259 -0
- package/dist/{mermaid-parser.core-Ce96PX3Q-CV9ue_xr.js → mermaid-parser.core-DHL9WXVx-DeKF3RZx.js} +4080 -3590
- package/dist/{mindmap-definition-GWI6TPTV-C98Syvj2-DUWC1UH5.js → mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js} +1112 -1100
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +5 -0
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +5 -0
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +161 -0
- package/dist/{quadrantDiagram-OS5C2QUG-M57vVPSx-BRx-dMGe.js → quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js} +2 -2
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +5 -0
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +850 -0
- package/dist/{sankeyDiagram-Y46BX6SQ-D6EdYPdp-D2Qzxmhx.js → sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js} +198 -193
- package/dist/{sequenceDiagram-G6AWOVSC-B171TAb1-KCpoI-Ck.js → sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js} +1001 -992
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +263 -0
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +799 -0
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +5 -0
- package/dist/{xychartDiagram-6QU3TZC5-CqbTSF5W-CUbJ50KT.js → xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js} +459 -423
- package/package.json +4 -4
- package/dist/_basePickBy-zlkqRmFy-D6w9JBLu.js +0 -151
- package/dist/arc-CK9P6CkJ-DVgfRhzX.js +0 -83
- package/dist/architecture-I3QFYML2-DJzmbE4M-C3v7Cpg0.js +0 -5
- package/dist/architectureDiagram-UYN6MBPD-DkZdgpXi-BTThTJ0F.js +0 -4592
- package/dist/blockDiagram-ZHA2E4KO-DnCMGCMN-DBXa-baO.js +0 -2247
- package/dist/chunk-5HRBRIJM-BjQ8go1b-CJmT3AYe.js +0 -24
- package/dist/chunk-7U56Z5CX-awhAxjZ0-Cs_UWlwk.js +0 -1213
- package/dist/chunk-T2TOU4HS-DqOVhIzl-O3PUl7Qp.js +0 -1301
- package/dist/classDiagram-LNE6IOMH-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/classDiagram-v2-MQ7JQ4JX-fQzyXfo--DYLd8UQH.js +0 -14
- package/dist/cytoscape.esm-DAyNQ0qu-i5PnoWfE.js +0 -16110
- package/dist/diagram-QW4FP2JN-DZT_0aFO-SYzM51ke.js +0 -126
- package/dist/erDiagram-6RL3IURR-BfgUC5jv-BrebVho-.js +0 -937
- package/dist/flowDiagram-7ASYPVHJ-Bo9CnsE7-Ds2vln_y.js +0 -1484
- package/dist/ganttDiagram-NTVNEXSI-8E9hjd6N-fR_cmeDc.js +0 -2491
- package/dist/gitGraph-YCYPL57B-BnErPIwo-DXUTceC1.js +0 -5
- package/dist/info-46DW6VJ7-DPpbx_vA-omPXKuBd.js +0 -5
- package/dist/infoDiagram-A4XQUW5V-Bo9uoOcA-CnlgI27B.js +0 -22
- package/dist/linear-C2PheBya-BHVXLcru.js +0 -423
- package/dist/packet-W2GHVCYJ-BLiQbm7T-BD1xX8XM.js +0 -5
- package/dist/pie-BEWT4RHE-D3Mbo3mT-B4n38n6N.js +0 -5
- package/dist/pieDiagram-YF2LJOPJ-BJV27s9B-DA7hy5wG.js +0 -161
- package/dist/requirementDiagram-MIRIMTAZ-D0KDg7rf-CRMUyo68.js +0 -768
- package/dist/stateDiagram-MAYHULR4-D7FUnT9_-aCApnrI4.js +0 -268
- package/dist/stateDiagram-v2-4JROLMXI-Cyc74STT-D-7hwTRo.js +0 -14
- package/dist/timeline-definition-U7ZMHBDA-Bw-dp1yf-C01CsNUU.js +0 -804
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as Q } from "./chunk-
|
|
2
|
-
import { e as X } from "./chunk-
|
|
3
|
-
import { _ as $,
|
|
4
|
-
import {
|
|
1
|
+
import { m as Q } from "./chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js";
|
|
2
|
+
import { e as X } from "./chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js";
|
|
3
|
+
import { _ as $, ao as Z, an as tt, a5 as rt, a6 as et, a7 as ot, a8 as nt, l as w, g as at, a9 as ct, am as it, az as st, at as dt, ag as k, aA as ht, aB as mt, aC as $t, aD as lt } from "./index-BDD0CD9m.js";
|
|
4
|
+
import { N as gt } from "./mermaid-parser.core-DHL9WXVx-DeKF3RZx.js";
|
|
5
5
|
var x = {
|
|
6
6
|
NORMAL: 0,
|
|
7
7
|
REVERSE: 1,
|
|
@@ -29,14 +29,14 @@ function S() {
|
|
|
29
29
|
return lt({ length: 7 });
|
|
30
30
|
}
|
|
31
31
|
$(S, "getID");
|
|
32
|
-
function
|
|
32
|
+
function K(r, t) {
|
|
33
33
|
const e = /* @__PURE__ */ Object.create(null);
|
|
34
34
|
return r.reduce((a, c) => {
|
|
35
35
|
const i = t(c);
|
|
36
36
|
return e[i] || (e[i] = !0, a.push(c)), a;
|
|
37
37
|
}, []);
|
|
38
38
|
}
|
|
39
|
-
$(
|
|
39
|
+
$(K, "uniqBy");
|
|
40
40
|
var pt = /* @__PURE__ */ $(function(r) {
|
|
41
41
|
s.records.direction = r;
|
|
42
42
|
}, "setDirection"), ft = /* @__PURE__ */ $(function(r) {
|
|
@@ -54,8 +54,8 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
54
54
|
let c = r.tags;
|
|
55
55
|
w.info("commit", t, e, a, c), w.debug("Entering commit:", t, e, a, c);
|
|
56
56
|
const i = O();
|
|
57
|
-
e = k.sanitizeText(e, i), t = k.sanitizeText(t, i), c = c == null ? void 0 : c.map((
|
|
58
|
-
const
|
|
57
|
+
e = k.sanitizeText(e, i), t = k.sanitizeText(t, i), c = c == null ? void 0 : c.map((h) => k.sanitizeText(h, i));
|
|
58
|
+
const d = {
|
|
59
59
|
id: e || s.records.seq + "-" + S(),
|
|
60
60
|
message: t,
|
|
61
61
|
seq: s.records.seq++,
|
|
@@ -64,7 +64,7 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
64
64
|
parents: s.records.head == null ? [] : [s.records.head.id],
|
|
65
65
|
branch: s.records.currBranch
|
|
66
66
|
};
|
|
67
|
-
s.records.head =
|
|
67
|
+
s.records.head = d, w.info("main branch", i.mainBranchName), s.records.commits.has(d.id) && w.warn(`Commit ID ${d.id} already exists`), s.records.commits.set(d.id, d), s.records.branches.set(s.records.currBranch, d.id), w.debug("in pushCommit " + d.id);
|
|
68
68
|
}, "commit"), bt = /* @__PURE__ */ $(function(r) {
|
|
69
69
|
let t = r.name;
|
|
70
70
|
const e = r.order;
|
|
@@ -72,12 +72,12 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
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 ${t}")`
|
|
74
74
|
);
|
|
75
|
-
s.records.branches.set(t, s.records.head != null ? s.records.head.id : null), s.records.branchConfig.set(t, { name: t, order: e }),
|
|
75
|
+
s.records.branches.set(t, s.records.head != null ? s.records.head.id : null), s.records.branchConfig.set(t, { name: t, order: e }), F(t), w.debug("in createBranch");
|
|
76
76
|
}, "branch"), wt = /* @__PURE__ */ $((r) => {
|
|
77
77
|
let t = r.branch, e = r.id;
|
|
78
78
|
const a = r.type, c = r.tags, i = O();
|
|
79
79
|
t = k.sanitizeText(t, i), e && (e = k.sanitizeText(e, i));
|
|
80
|
-
const
|
|
80
|
+
const d = s.records.branches.get(s.records.currBranch), h = s.records.branches.get(t), l = d ? s.records.commits.get(d) : void 0, o = h ? s.records.commits.get(h) : void 0;
|
|
81
81
|
if (l && o && l.branch === t)
|
|
82
82
|
throw new Error(`Cannot merge branch '${t}' into itself.`);
|
|
83
83
|
if (s.records.currBranch === t) {
|
|
@@ -128,7 +128,7 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
128
128
|
}
|
|
129
129
|
if (e && s.records.commits.has(e)) {
|
|
130
130
|
const m = new Error(
|
|
131
|
-
'Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom
|
|
131
|
+
'Incorrect usage of "merge". Commit with id:' + e + " already exists, use different custom id"
|
|
132
132
|
);
|
|
133
133
|
throw m.hash = {
|
|
134
134
|
text: `merge ${t} ${e} ${a} ${c == null ? void 0 : c.join(" ")}`,
|
|
@@ -138,7 +138,7 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
138
138
|
]
|
|
139
139
|
}, m;
|
|
140
140
|
}
|
|
141
|
-
const n =
|
|
141
|
+
const n = h || "", u = {
|
|
142
142
|
id: e || `${s.records.seq}-${S()}`,
|
|
143
143
|
message: `merged branch ${t} into ${s.records.currBranch}`,
|
|
144
144
|
seq: s.records.seq++,
|
|
@@ -164,20 +164,20 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
164
164
|
expected: ["cherry-pick abc"]
|
|
165
165
|
}, l;
|
|
166
166
|
}
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
167
|
+
const d = s.records.commits.get(t);
|
|
168
|
+
if (d === void 0 || !d)
|
|
169
169
|
throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
|
|
170
|
-
if (c && !(Array.isArray(
|
|
170
|
+
if (c && !(Array.isArray(d.parents) && d.parents.includes(c)))
|
|
171
171
|
throw new Error(
|
|
172
172
|
"Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
|
|
173
173
|
);
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
174
|
+
const h = d.branch;
|
|
175
|
+
if (d.type === x.MERGE && !c)
|
|
176
176
|
throw new Error(
|
|
177
177
|
"Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
|
|
178
178
|
);
|
|
179
179
|
if (!e || !s.records.commits.has(e)) {
|
|
180
|
-
if (
|
|
180
|
+
if (h === s.records.currBranch) {
|
|
181
181
|
const u = new Error(
|
|
182
182
|
'Incorrect usage of "cherryPick". Source commit is already on current branch'
|
|
183
183
|
);
|
|
@@ -211,18 +211,18 @@ var pt = /* @__PURE__ */ $(function(r) {
|
|
|
211
211
|
}
|
|
212
212
|
const n = {
|
|
213
213
|
id: s.records.seq + "-" + S(),
|
|
214
|
-
message: `cherry-picked ${
|
|
214
|
+
message: `cherry-picked ${d == null ? void 0 : d.message} into ${s.records.currBranch}`,
|
|
215
215
|
seq: s.records.seq++,
|
|
216
|
-
parents: s.records.head == null ? [] : [s.records.head.id,
|
|
216
|
+
parents: s.records.head == null ? [] : [s.records.head.id, d.id],
|
|
217
217
|
branch: s.records.currBranch,
|
|
218
218
|
type: x.CHERRY_PICK,
|
|
219
219
|
tags: a ? a.filter(Boolean) : [
|
|
220
|
-
`cherry-pick:${
|
|
220
|
+
`cherry-pick:${d.id}${d.type === x.MERGE ? `|parent:${c}` : ""}`
|
|
221
221
|
]
|
|
222
222
|
};
|
|
223
223
|
s.records.head = n, s.records.commits.set(n.id, n), s.records.branches.set(s.records.currBranch, n.id), w.debug(s.records.branches), w.debug("in cherryPick");
|
|
224
224
|
}
|
|
225
|
-
}, "cherryPick"),
|
|
225
|
+
}, "cherryPick"), F = /* @__PURE__ */ $(function(r) {
|
|
226
226
|
if (r = k.sanitizeText(r, O()), s.records.branches.has(r)) {
|
|
227
227
|
s.records.currBranch = r;
|
|
228
228
|
const t = s.records.branches.get(s.records.currBranch);
|
|
@@ -263,7 +263,7 @@ function _(r) {
|
|
|
263
263
|
N(r, t, c);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
r =
|
|
266
|
+
r = K(r, (c) => c.id), _(r);
|
|
267
267
|
}
|
|
268
268
|
$(_, "prettyPrintCommitHistory");
|
|
269
269
|
var Et = /* @__PURE__ */ $(function() {
|
|
@@ -302,7 +302,7 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
302
302
|
branch: bt,
|
|
303
303
|
merge: wt,
|
|
304
304
|
cherryPick: Bt,
|
|
305
|
-
checkout:
|
|
305
|
+
checkout: F,
|
|
306
306
|
//reset,
|
|
307
307
|
prettyPrint: Et,
|
|
308
308
|
clear: vt,
|
|
@@ -329,7 +329,7 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
329
329
|
Branch: /* @__PURE__ */ $((a) => t.branch(Gt(a)), "Branch"),
|
|
330
330
|
Merge: /* @__PURE__ */ $((a) => t.merge(Ot(a)), "Merge"),
|
|
331
331
|
Checkout: /* @__PURE__ */ $((a) => t.checkout(qt(a)), "Checkout"),
|
|
332
|
-
CherryPicking: /* @__PURE__ */ $((a) => t.cherryPick(
|
|
332
|
+
CherryPicking: /* @__PURE__ */ $((a) => t.cherryPick(zt(a)), "CherryPicking")
|
|
333
333
|
}[r.$type];
|
|
334
334
|
e ? e(r) : w.error(`Unknown statement type: ${r.$type}`);
|
|
335
335
|
}, "parseStatement"), It = /* @__PURE__ */ $((r) => ({
|
|
@@ -345,7 +345,7 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
345
345
|
id: r.id ?? "",
|
|
346
346
|
type: r.type !== void 0 ? x[r.type] : void 0,
|
|
347
347
|
tags: r.tags ?? void 0
|
|
348
|
-
}), "parseMerge"), qt = /* @__PURE__ */ $((r) => r.branch, "parseCheckout"),
|
|
348
|
+
}), "parseMerge"), qt = /* @__PURE__ */ $((r) => r.branch, "parseCheckout"), zt = /* @__PURE__ */ $((r) => {
|
|
349
349
|
var t;
|
|
350
350
|
return {
|
|
351
351
|
id: r.id,
|
|
@@ -358,8 +358,8 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
358
358
|
const t = await gt("gitGraph", r);
|
|
359
359
|
w.debug(t), Rt(t, V);
|
|
360
360
|
}, "parse")
|
|
361
|
-
}, W = at(), E = W == null ? void 0 : W.gitGraph, A = 10, I = 40, T = 4, M = 2, G = 8, v = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), H = 30, q = /* @__PURE__ */ new Map(),
|
|
362
|
-
v.clear(), C.clear(), q.clear(), R = 0,
|
|
361
|
+
}, W = at(), E = W == null ? void 0 : W.gitGraph, A = 10, I = 40, T = 4, M = 2, G = 8, v = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), H = 30, q = /* @__PURE__ */ new Map(), D = [], R = 0, f = "LR", Dt = /* @__PURE__ */ $(() => {
|
|
362
|
+
v.clear(), C.clear(), q.clear(), R = 0, D = [], f = "LR";
|
|
363
363
|
}, "clear"), U = /* @__PURE__ */ $((r) => {
|
|
364
364
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
365
365
|
return (typeof r == "string" ? r.split(/\\n|\n|<br\s*\/?>/gi) : r).forEach((e) => {
|
|
@@ -369,9 +369,9 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
369
369
|
}, "drawText"), J = /* @__PURE__ */ $((r) => {
|
|
370
370
|
let t, e, a;
|
|
371
371
|
return f === "BT" ? (e = /* @__PURE__ */ $((c, i) => c <= i, "comparisonFunc"), a = 1 / 0) : (e = /* @__PURE__ */ $((c, i) => c >= i, "comparisonFunc"), a = 0), r.forEach((c) => {
|
|
372
|
-
var i,
|
|
373
|
-
const
|
|
374
|
-
|
|
372
|
+
var i, d;
|
|
373
|
+
const h = f === "TB" || f == "BT" ? (i = C.get(c)) == null ? void 0 : i.y : (d = C.get(c)) == null ? void 0 : d.x;
|
|
374
|
+
h !== void 0 && e(h, a) && (t = c, a = h);
|
|
375
375
|
}), t;
|
|
376
376
|
}, "findClosestParent"), St = /* @__PURE__ */ $((r) => {
|
|
377
377
|
let t = "", e = 1 / 0;
|
|
@@ -382,20 +382,20 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
382
382
|
}, "findClosestParentBT"), Nt = /* @__PURE__ */ $((r, t, e) => {
|
|
383
383
|
let a = e, c = e;
|
|
384
384
|
const i = [];
|
|
385
|
-
r.forEach((
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
388
|
-
throw new Error(`Commit not found for key ${
|
|
389
|
-
|
|
390
|
-
}), a = c, i.forEach((
|
|
391
|
-
|
|
392
|
-
}), r.forEach((
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
const l = St(
|
|
385
|
+
r.forEach((d) => {
|
|
386
|
+
const h = t.get(d);
|
|
387
|
+
if (!h)
|
|
388
|
+
throw new Error(`Commit not found for key ${d}`);
|
|
389
|
+
h.parents.length ? (a = Wt(h), c = Math.max(a, c)) : i.push(h), jt(h, a);
|
|
390
|
+
}), a = c, i.forEach((d) => {
|
|
391
|
+
Kt(d, a, e);
|
|
392
|
+
}), r.forEach((d) => {
|
|
393
|
+
const h = t.get(d);
|
|
394
|
+
if (h != null && h.parents.length) {
|
|
395
|
+
const l = St(h.parents);
|
|
396
396
|
a = C.get(l).y - I, a <= c && (c = a);
|
|
397
|
-
const o = v.get(
|
|
398
|
-
C.set(
|
|
397
|
+
const o = v.get(h.branch).pos, n = a - A;
|
|
398
|
+
C.set(h.id, { x: o, y: n });
|
|
399
399
|
}
|
|
400
400
|
});
|
|
401
401
|
}, "setParallelBTPos"), _t = /* @__PURE__ */ $((r) => {
|
|
@@ -413,13 +413,13 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
413
413
|
throw new Error(`Branch not found for commit ${r.id}`);
|
|
414
414
|
const a = e.pos, c = t + A;
|
|
415
415
|
return C.set(r.id, { x: a, y: c }), { x: a, y: c };
|
|
416
|
-
}, "setCommitPosition"),
|
|
416
|
+
}, "setCommitPosition"), Kt = /* @__PURE__ */ $((r, t, e) => {
|
|
417
417
|
const a = v.get(r.branch);
|
|
418
418
|
if (!a)
|
|
419
419
|
throw new Error(`Branch not found for commit ${r.id}`);
|
|
420
420
|
const c = t + e, i = a.pos;
|
|
421
421
|
C.set(r.id, { x: i, y: c });
|
|
422
|
-
}, "setRootPosition"),
|
|
422
|
+
}, "setRootPosition"), Ft = /* @__PURE__ */ $((r, t, e, a, c, i) => {
|
|
423
423
|
if (i === x.HIGHLIGHT)
|
|
424
424
|
r.append("rect").attr("x", e.x - 10).attr("y", e.y - 10).attr("width", 20).attr("height", 20).attr(
|
|
425
425
|
"class",
|
|
@@ -431,10 +431,10 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
431
431
|
else if (i === x.CHERRY_PICK)
|
|
432
432
|
r.append("circle").attr("cx", e.x).attr("cy", e.y).attr("r", 10).attr("class", `commit ${t.id} ${a}`), r.append("circle").attr("cx", e.x - 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${t.id} ${a}`), r.append("circle").attr("cx", e.x + 3).attr("cy", e.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${t.id} ${a}`), r.append("line").attr("x1", e.x + 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${t.id} ${a}`), r.append("line").attr("x1", e.x - 3).attr("y1", e.y + 1).attr("x2", e.x).attr("y2", e.y - 5).attr("stroke", "#fff").attr("class", `commit ${t.id} ${a}`);
|
|
433
433
|
else {
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
436
|
-
const
|
|
437
|
-
|
|
434
|
+
const d = r.append("circle");
|
|
435
|
+
if (d.attr("cx", e.x), d.attr("cy", e.y), d.attr("r", t.type === x.MERGE ? 9 : 10), d.attr("class", `commit ${t.id} commit${c % G}`), i === x.MERGE) {
|
|
436
|
+
const h = r.append("circle");
|
|
437
|
+
h.attr("cx", e.x), h.attr("cy", e.y), h.attr("r", 6), h.attr(
|
|
438
438
|
"class",
|
|
439
439
|
`commit ${a} ${t.id} commit${c % G}`
|
|
440
440
|
);
|
|
@@ -447,13 +447,13 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
447
447
|
}, "drawCommitBullet"), Yt = /* @__PURE__ */ $((r, t, e, a) => {
|
|
448
448
|
var c;
|
|
449
449
|
if (t.type !== x.CHERRY_PICK && (t.customId && t.type === x.MERGE || t.type !== x.MERGE) && E != null && E.showCommitLabel) {
|
|
450
|
-
const i = r.append("g"),
|
|
451
|
-
if (l && (
|
|
450
|
+
const i = r.append("g"), d = i.insert("rect").attr("class", "commit-label-bkg"), h = i.append("text").attr("x", a).attr("y", e.y + 25).attr("class", "commit-label").text(t.id), l = (c = h.node()) == null ? void 0 : c.getBBox();
|
|
451
|
+
if (l && (d.attr("x", e.posWithOffset - l.width / 2 - M).attr("y", e.y + 13.5).attr("width", l.width + 2 * M).attr("height", l.height + 2 * M), f === "TB" || f === "BT" ? (d.attr("x", e.x - (l.width + 4 * T + 5)).attr("y", e.y - 12), h.attr("x", e.x - (l.width + 4 * T)).attr("y", e.y + l.height - 12)) : h.attr("x", e.posWithOffset - l.width / 2), E.rotateCommitLabel))
|
|
452
452
|
if (f === "TB" || f === "BT")
|
|
453
|
-
|
|
453
|
+
h.attr(
|
|
454
454
|
"transform",
|
|
455
455
|
"rotate(-45, " + e.x + ", " + e.y + ")"
|
|
456
|
-
),
|
|
456
|
+
), d.attr(
|
|
457
457
|
"transform",
|
|
458
458
|
"rotate(-45, " + e.x + ", " + e.y + ")"
|
|
459
459
|
);
|
|
@@ -468,13 +468,13 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
468
468
|
}, "drawCommitLabel"), Vt = /* @__PURE__ */ $((r, t, e, a) => {
|
|
469
469
|
var c;
|
|
470
470
|
if (t.tags.length > 0) {
|
|
471
|
-
let i = 0,
|
|
471
|
+
let i = 0, d = 0, h = 0;
|
|
472
472
|
const l = [];
|
|
473
473
|
for (const o of t.tags.reverse()) {
|
|
474
474
|
const n = r.insert("polygon"), u = r.append("circle"), m = r.append("text").attr("y", e.y - 16 - i).attr("class", "tag-label").text(o), g = (c = m.node()) == null ? void 0 : c.getBBox();
|
|
475
475
|
if (!g)
|
|
476
476
|
throw new Error("Tag bbox not found");
|
|
477
|
-
|
|
477
|
+
d = Math.max(d, g.width), h = Math.max(h, g.height), m.attr("x", e.posWithOffset - g.width / 2), l.push({
|
|
478
478
|
tag: m,
|
|
479
479
|
hole: u,
|
|
480
480
|
rect: n,
|
|
@@ -482,17 +482,17 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
482
482
|
}), i += 20;
|
|
483
483
|
}
|
|
484
484
|
for (const { tag: o, hole: n, rect: u, yOffset: m } of l) {
|
|
485
|
-
const g =
|
|
485
|
+
const g = h / 2, p = e.y - 19.2 - m;
|
|
486
486
|
if (u.attr("class", "tag-label-bkg").attr(
|
|
487
487
|
"points",
|
|
488
488
|
`
|
|
489
|
-
${a -
|
|
490
|
-
${a -
|
|
491
|
-
${e.posWithOffset -
|
|
492
|
-
${e.posWithOffset +
|
|
493
|
-
${e.posWithOffset +
|
|
494
|
-
${e.posWithOffset -
|
|
495
|
-
), n.attr("cy", p).attr("cx", a -
|
|
489
|
+
${a - d / 2 - T / 2},${p + M}
|
|
490
|
+
${a - d / 2 - T / 2},${p - M}
|
|
491
|
+
${e.posWithOffset - d / 2 - T},${p - g - M}
|
|
492
|
+
${e.posWithOffset + d / 2 + T},${p - g - M}
|
|
493
|
+
${e.posWithOffset + d / 2 + T},${p + g + M}
|
|
494
|
+
${e.posWithOffset - d / 2 - T},${p + g + M}`
|
|
495
|
+
), n.attr("cy", p).attr("cx", a - d / 2 + T / 2).attr("r", 1.5).attr("class", "tag-hole"), f === "TB" || f === "BT") {
|
|
496
496
|
const y = a + m;
|
|
497
497
|
u.attr("class", "tag-label-bkg").attr(
|
|
498
498
|
"points",
|
|
@@ -500,8 +500,8 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
500
500
|
${e.x},${y + 2}
|
|
501
501
|
${e.x},${y - 2}
|
|
502
502
|
${e.x + A},${y - g - 2}
|
|
503
|
-
${e.x + A +
|
|
504
|
-
${e.x + A +
|
|
503
|
+
${e.x + A + d + 4},${y - g - 2}
|
|
504
|
+
${e.x + A + d + 4},${y + g + 2}
|
|
505
505
|
${e.x + A},${y + g + 2}`
|
|
506
506
|
).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + a + ")"), n.attr("cx", e.x + T / 2).attr("cy", y).attr("transform", "translate(12,12) rotate(45, " + e.x + "," + a + ")"), o.attr("x", e.x + 5).attr("y", y + 3).attr("transform", "translate(14,14) rotate(45, " + e.x + "," + a + ")");
|
|
507
507
|
}
|
|
@@ -527,55 +527,55 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
527
527
|
if (r.parents.length > 0) {
|
|
528
528
|
const i = J(r.parents);
|
|
529
529
|
if (i) {
|
|
530
|
-
const
|
|
531
|
-
return t === "TB" ?
|
|
530
|
+
const d = a.get(i) ?? c;
|
|
531
|
+
return t === "TB" ? d.y + I : t === "BT" ? (a.get(r.id) ?? c).y - I : d.x + I;
|
|
532
532
|
}
|
|
533
533
|
} else
|
|
534
534
|
return t === "TB" ? H : t === "BT" ? (a.get(r.id) ?? c).y - I : 0;
|
|
535
535
|
return 0;
|
|
536
536
|
}, "calculatePosition"), Qt = /* @__PURE__ */ $((r, t, e) => {
|
|
537
537
|
var a, c;
|
|
538
|
-
const i = f === "BT" && e ? t : t + A,
|
|
539
|
-
if (
|
|
538
|
+
const i = f === "BT" && e ? t : t + A, d = f === "TB" || f === "BT" ? i : (a = v.get(r.branch)) == null ? void 0 : a.pos, h = f === "TB" || f === "BT" ? (c = v.get(r.branch)) == null ? void 0 : c.pos : i;
|
|
539
|
+
if (h === void 0 || d === void 0)
|
|
540
540
|
throw new Error(`Position were undefined for commit ${r.id}`);
|
|
541
|
-
return { x:
|
|
541
|
+
return { x: h, y: d, posWithOffset: i };
|
|
542
542
|
}, "getCommitPosition"), j = /* @__PURE__ */ $((r, t, e) => {
|
|
543
543
|
if (!E)
|
|
544
544
|
throw new Error("GitGraph config not found");
|
|
545
545
|
const a = r.append("g").attr("class", "commit-bullets"), c = r.append("g").attr("class", "commit-labels");
|
|
546
546
|
let i = f === "TB" || f === "BT" ? H : 0;
|
|
547
|
-
const
|
|
547
|
+
const d = [...t.keys()], h = (E == null ? void 0 : E.parallelCommits) ?? !1, l = /* @__PURE__ */ $((n, u) => {
|
|
548
548
|
var m, g;
|
|
549
549
|
const p = (m = t.get(n)) == null ? void 0 : m.seq, y = (g = t.get(u)) == null ? void 0 : g.seq;
|
|
550
550
|
return p !== void 0 && y !== void 0 ? p - y : 0;
|
|
551
551
|
}, "sortKeys");
|
|
552
|
-
let o =
|
|
553
|
-
f === "BT" && (
|
|
552
|
+
let o = d.sort(l);
|
|
553
|
+
f === "BT" && (h && Nt(o, t, i), o = o.reverse()), o.forEach((n) => {
|
|
554
554
|
var u;
|
|
555
555
|
const m = t.get(n);
|
|
556
556
|
if (!m)
|
|
557
557
|
throw new Error(`Commit not found for key ${n}`);
|
|
558
|
-
|
|
559
|
-
const g = Qt(m, i,
|
|
558
|
+
h && (i = Jt(m, f, i, C));
|
|
559
|
+
const g = Qt(m, i, h);
|
|
560
560
|
if (e) {
|
|
561
561
|
const p = Ut(m), y = m.customType ?? m.type, L = ((u = v.get(m.branch)) == null ? void 0 : u.index) ?? 0;
|
|
562
|
-
|
|
562
|
+
Ft(a, m, g, p, L, y), Yt(c, m, g, i), Vt(c, m, g, i);
|
|
563
563
|
}
|
|
564
|
-
f === "TB" || f === "BT" ? C.set(m.id, { x: g.x, y: g.posWithOffset }) : C.set(m.id, { x: g.posWithOffset, y: g.y }), i = f === "BT" &&
|
|
564
|
+
f === "TB" || f === "BT" ? C.set(m.id, { x: g.x, y: g.posWithOffset }) : C.set(m.id, { x: g.posWithOffset, y: g.y }), i = f === "BT" && h ? i + I : i + I + A, i > R && (R = i);
|
|
565
565
|
});
|
|
566
566
|
}, "drawCommits"), Xt = /* @__PURE__ */ $((r, t, e, a, c) => {
|
|
567
|
-
const i = (f === "TB" || f === "BT" ? e.x < a.x : e.y < a.y) ? t.branch : r.branch,
|
|
568
|
-
return [...c.values()].some((l) =>
|
|
569
|
-
}, "shouldRerouteArrow"),
|
|
567
|
+
const i = (f === "TB" || f === "BT" ? e.x < a.x : e.y < a.y) ? t.branch : r.branch, d = /* @__PURE__ */ $((l) => l.branch === i, "isOnBranchToGetCurve"), h = /* @__PURE__ */ $((l) => l.seq > r.seq && l.seq < t.seq, "isBetweenCommits");
|
|
568
|
+
return [...c.values()].some((l) => h(l) && d(l));
|
|
569
|
+
}, "shouldRerouteArrow"), z = /* @__PURE__ */ $((r, t, e = 0) => {
|
|
570
570
|
const a = r + Math.abs(r - t) / 2;
|
|
571
571
|
if (e > 5)
|
|
572
572
|
return a;
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
573
|
+
if (D.every((i) => Math.abs(i - a) >= 10))
|
|
574
|
+
return D.push(a), a;
|
|
575
575
|
const c = Math.abs(r - t);
|
|
576
|
-
return
|
|
576
|
+
return z(r, t - c / 5, e + 1);
|
|
577
577
|
}, "findLane"), Zt = /* @__PURE__ */ $((r, t, e, a) => {
|
|
578
|
-
var c, i,
|
|
578
|
+
var c, i, d, h, l;
|
|
579
579
|
const o = C.get(t.id), n = C.get(e.id);
|
|
580
580
|
if (o === void 0 || n === void 0)
|
|
581
581
|
throw new Error(`Commit positions not found for commits ${t.id} and ${e.id}`);
|
|
@@ -585,8 +585,8 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
585
585
|
let b;
|
|
586
586
|
if (u) {
|
|
587
587
|
m = "A 10 10, 0, 0, 0,", g = "A 10 10, 0, 0, 1,", p = 10, y = 10;
|
|
588
|
-
const P = o.y < n.y ?
|
|
589
|
-
f === "TB" ? o.x < n.x ? b = `M ${o.x} ${o.y} L ${B - p} ${o.y} ${g} ${B} ${o.y + y} L ${B} ${n.y - p} ${m} ${B + y} ${n.y} L ${n.x} ${n.y}` : (L = (
|
|
588
|
+
const P = o.y < n.y ? z(o.y, n.y) : z(n.y, o.y), B = o.x < n.x ? z(o.x, n.x) : z(n.x, o.x);
|
|
589
|
+
f === "TB" ? o.x < n.x ? b = `M ${o.x} ${o.y} L ${B - p} ${o.y} ${g} ${B} ${o.y + y} L ${B} ${n.y - p} ${m} ${B + y} ${n.y} L ${n.x} ${n.y}` : (L = (d = v.get(t.branch)) == null ? void 0 : d.index, b = `M ${o.x} ${o.y} L ${B + p} ${o.y} ${m} ${B} ${o.y + y} L ${B} ${n.y - p} ${g} ${B - y} ${n.y} L ${n.x} ${n.y}`) : f === "BT" ? o.x < n.x ? b = `M ${o.x} ${o.y} L ${B - p} ${o.y} ${m} ${B} ${o.y - y} L ${B} ${n.y + p} ${g} ${B + y} ${n.y} L ${n.x} ${n.y}` : (L = (h = v.get(t.branch)) == null ? void 0 : h.index, b = `M ${o.x} ${o.y} L ${B + p} ${o.y} ${g} ${B} ${o.y - y} L ${B} ${n.y + p} ${m} ${B - y} ${n.y} L ${n.x} ${n.y}`) : o.y < n.y ? b = `M ${o.x} ${o.y} L ${o.x} ${P - p} ${m} ${o.x + y} ${P} L ${n.x - p} ${P} ${g} ${n.x} ${P + y} L ${n.x} ${n.y}` : (L = (l = v.get(t.branch)) == null ? void 0 : l.index, b = `M ${o.x} ${o.y} L ${o.x} ${P + p} ${g} ${o.x + y} ${P} L ${n.x - p} ${P} ${m} ${n.x} ${P - y} L ${n.x} ${n.y}`);
|
|
590
590
|
} else
|
|
591
591
|
m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", p = 20, y = 20, f === "TB" ? (o.x < n.x && (e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${o.x} ${n.y - p} ${m} ${o.x + y} ${n.y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${n.x - p} ${o.y} ${g} ${n.x} ${o.y + y} L ${n.x} ${n.y}`), o.x > n.x && (m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", p = 20, y = 20, e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${o.x} ${n.y - p} ${g} ${o.x - y} ${n.y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${n.x + p} ${o.y} ${m} ${n.x} ${o.y + y} L ${n.x} ${n.y}`), o.x === n.x && (b = `M ${o.x} ${o.y} L ${n.x} ${n.y}`)) : f === "BT" ? (o.x < n.x && (e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${o.x} ${n.y + p} ${g} ${o.x + y} ${n.y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${n.x - p} ${o.y} ${m} ${n.x} ${o.y - y} L ${n.x} ${n.y}`), o.x > n.x && (m = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", p = 20, y = 20, e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${o.x} ${n.y + p} ${m} ${o.x - y} ${n.y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${n.x - p} ${o.y} ${m} ${n.x} ${o.y - y} L ${n.x} ${n.y}`), o.x === n.x && (b = `M ${o.x} ${o.y} L ${n.x} ${n.y}`)) : (o.y < n.y && (e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${n.x - p} ${o.y} ${g} ${n.x} ${o.y + y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${o.x} ${n.y - p} ${m} ${o.x + y} ${n.y} L ${n.x} ${n.y}`), o.y > n.y && (e.type === x.MERGE && t.id !== e.parents[0] ? b = `M ${o.x} ${o.y} L ${n.x - p} ${o.y} ${m} ${n.x} ${o.y - y} L ${n.x} ${n.y}` : b = `M ${o.x} ${o.y} L ${o.x} ${n.y + p} ${g} ${o.x + y} ${n.y} L ${n.x} ${n.y}`), o.y === n.y && (b = `M ${o.x} ${o.y} L ${n.x} ${n.y}`));
|
|
592
592
|
if (b === void 0)
|
|
@@ -604,45 +604,45 @@ var Et = /* @__PURE__ */ $(function() {
|
|
|
604
604
|
const e = r.append("g");
|
|
605
605
|
t.forEach((a, c) => {
|
|
606
606
|
var i;
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
607
|
+
const d = c % G, h = (i = v.get(a.name)) == null ? void 0 : i.pos;
|
|
608
|
+
if (h === void 0)
|
|
609
609
|
throw new Error(`Position not found for branch ${a.name}`);
|
|
610
610
|
const l = e.append("line");
|
|
611
|
-
l.attr("x1", 0), l.attr("y1",
|
|
612
|
-
const o = a.name, n = U(o), u = e.insert("rect"), m = e.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" +
|
|
611
|
+
l.attr("x1", 0), l.attr("y1", h), l.attr("x2", R), l.attr("y2", h), l.attr("class", "branch branch" + d), f === "TB" ? (l.attr("y1", H), l.attr("x1", h), l.attr("y2", R), l.attr("x2", h)) : f === "BT" && (l.attr("y1", R), l.attr("x1", h), l.attr("y2", H), l.attr("x2", h)), D.push(h);
|
|
612
|
+
const o = a.name, n = U(o), u = e.insert("rect"), m = e.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + d);
|
|
613
613
|
m.node().appendChild(n);
|
|
614
614
|
const g = n.getBBox();
|
|
615
|
-
u.attr("class", "branchLabelBkg label" +
|
|
615
|
+
u.attr("class", "branchLabelBkg label" + d).attr("rx", 4).attr("ry", 4).attr("x", -g.width - 4 - ((E == null ? void 0 : E.rotateCommitLabel) === !0 ? 30 : 0)).attr("y", -g.height / 2 + 8).attr("width", g.width + 18).attr("height", g.height + 4), m.attr(
|
|
616
616
|
"transform",
|
|
617
|
-
"translate(" + (-g.width - 14 - ((E == null ? void 0 : E.rotateCommitLabel) === !0 ? 30 : 0)) + ", " + (
|
|
618
|
-
), f === "TB" ? (u.attr("x",
|
|
617
|
+
"translate(" + (-g.width - 14 - ((E == null ? void 0 : E.rotateCommitLabel) === !0 ? 30 : 0)) + ", " + (h - g.height / 2 - 1) + ")"
|
|
618
|
+
), f === "TB" ? (u.attr("x", h - g.width / 2 - 10).attr("y", 0), m.attr("transform", "translate(" + (h - g.width / 2 - 5) + ", 0)")) : f === "BT" ? (u.attr("x", h - g.width / 2 - 10).attr("y", R), m.attr("transform", "translate(" + (h - g.width / 2 - 5) + ", " + R + ")")) : u.attr("transform", "translate(-19, " + (h - g.height / 2) + ")");
|
|
619
619
|
});
|
|
620
620
|
}, "drawBranches"), er = /* @__PURE__ */ $(function(r, t, e, a, c) {
|
|
621
621
|
return v.set(r, { pos: t, index: e }), t += 50 + (c ? 40 : 0) + (f === "TB" || f === "BT" ? a.width / 2 : 0), t;
|
|
622
622
|
}, "setBranchPosition"), or = /* @__PURE__ */ $(function(r, t, e, a) {
|
|
623
|
-
if (
|
|
623
|
+
if (Dt(), w.debug("in gitgraph renderer", r + `
|
|
624
624
|
`, "id:", t, e), !E)
|
|
625
625
|
throw new Error("GitGraph config not found");
|
|
626
626
|
const c = E.rotateCommitLabel ?? !1, i = a.db;
|
|
627
627
|
q = i.getCommits();
|
|
628
|
-
const
|
|
628
|
+
const d = i.getBranchesAsObjArray();
|
|
629
629
|
f = i.getDirection();
|
|
630
|
-
const
|
|
630
|
+
const h = ct(`[id="${t}"]`);
|
|
631
631
|
let l = 0;
|
|
632
|
-
|
|
632
|
+
d.forEach((o, n) => {
|
|
633
633
|
var u;
|
|
634
|
-
const m = U(o.name), g =
|
|
634
|
+
const m = U(o.name), g = h.append("g"), p = g.insert("g").attr("class", "branchLabel"), y = p.insert("g").attr("class", "label branch-label");
|
|
635
635
|
(u = y.node()) == null || u.appendChild(m);
|
|
636
636
|
const L = m.getBBox();
|
|
637
637
|
l = er(o.name, l, n, L, c), y.remove(), p.remove(), g.remove();
|
|
638
|
-
}), j(
|
|
639
|
-
|
|
638
|
+
}), j(h, q, !1), E.showBranches && rr(h, d), tr(h, q), j(h, q, !0), it.insertTitle(
|
|
639
|
+
h,
|
|
640
640
|
"gitTitleText",
|
|
641
641
|
E.titleTopMargin ?? 0,
|
|
642
642
|
i.getDiagramTitle()
|
|
643
643
|
), st(
|
|
644
644
|
void 0,
|
|
645
|
-
|
|
645
|
+
h,
|
|
646
646
|
E.diagramPadding,
|
|
647
647
|
E.useMaxWidth
|
|
648
648
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as g, n as v, o as E, q as L, r as b } from "./index-
|
|
2
|
-
import { $ as _, _ as p, a, E as l, S as f,
|
|
1
|
+
import { k as g, n as v, o as E, q as L, r as b } from "./index-BDD0CD9m.js";
|
|
2
|
+
import { $ as _, _ as p, a, E as l, S as f, I as N, P as j, O as P } from "./_baseUniq-CsvgMmt0-CCBG5z_B.js";
|
|
3
3
|
var D = E(function(o) {
|
|
4
4
|
return j(P(o, 1, L, !0));
|
|
5
5
|
}), F = "\0", d = "\0", O = "";
|