@nxgt/material 1.12.3 → 1.16.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 +5 -1
- package/dist/abnfDiagram-O67JEVCF-mm89LXw2.js +89 -0
- package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
- package/dist/architectureDiagram-NJMV4G6O-CGoA5SIv.js +4146 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/blockDiagram-BEXU5L5S-Dq8gitB4.js +1946 -0
- package/dist/c4Diagram-YGBWAQC7-DO_alqIu.js +2990 -0
- package/dist/channel-1fT-W0NS.js +5 -0
- package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
- package/dist/chunk-3FUC2YCW-C3yD2fMw.js +364 -0
- package/dist/chunk-5DYCD2WN-Dn2jrYde.js +37 -0
- package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
- package/dist/chunk-6AEJRKK7-JyfUnUEu.js +10 -0
- package/dist/chunk-742MDFTN-BbWkrtj2.js +275 -0
- package/dist/chunk-7INBJB4K-C3x7JNTG.js +4487 -0
- package/dist/chunk-7M6MHVWA-Cc7UTu4b.js +4256 -0
- package/dist/chunk-7PRAP22T-C8rsGRvH.js +67 -0
- package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
- package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
- package/dist/chunk-GNY47TPC-d-Bi8r0p.js +75 -0
- package/dist/chunk-GTNCS2PH-CTS015lZ.js +490 -0
- package/dist/chunk-GWA4HPMP-B4pgM-E1.js +61 -0
- package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
- package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
- package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
- package/dist/chunk-MBY4JIJT-Dg6AeftH.js +1847 -0
- package/dist/chunk-NETBCI7D-TXZM0vKz.js +236 -0
- package/dist/chunk-O7XYJQB3-md6vjVm4.js +3922 -0
- package/dist/chunk-UA2S7LBM-DQTYPe9y.js +363 -0
- package/dist/chunk-WEXAMYUT-DmKWJz6y.js +26 -0
- package/dist/chunk-XXDRQBXY-C9XIYQdM.js +9 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
- package/dist/chunk-Z7XXMR3K-BoDf6lxl.js +677 -0
- package/dist/chunk-ZIGJFQKS-CP5430fN.js +663 -0
- package/dist/classDiagram-v2-NBCMYWYE-6KoTmufe.js +3397 -0
- package/dist/components.js +3 -3
- package/dist/cose-bilkent-JH36ORCC-CejnZl_t.js +2251 -0
- package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
- package/dist/cynefinDiagram-VND7K2PF-DZnc0dlm.js +349 -0
- package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
- package/dist/dagre-6A5THRUB-cuS57NO5.js +2192 -0
- package/dist/diagram-22UHCM2B-zQSFmH0t.js +5084 -0
- package/dist/diagram-3UASUU5V-D45Fgu1j.js +724 -0
- package/dist/diagram-ATOU4E4O-YMtQnlqd.js +432 -0
- package/dist/diagram-CDSNMT55-DP7UmEW1.js +301 -0
- package/dist/diagram-MLGK6HIB-WvSqrTRC.js +134 -0
- package/dist/diagram-MPIPVDR6-C2F3__mt.js +214 -0
- package/dist/dist-1DdJvBEt.js +50 -0
- package/dist/{dist-DGsPFADz.js → dist-DppLdkXt.js} +2 -2
- package/dist/dnd.js +2 -2
- package/dist/ebnfDiagram-ZINNZB2B-BZC6cSiy.js +100 -0
- package/dist/elk-276RUBZZ-7DJf1MEV.js +47598 -0
- package/dist/erDiagram-OPXOYQCR-YKlEVEF0.js +1970 -0
- package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
- package/dist/flowDiagram-KWPJA3E3-DyLvzIlg.js +17 -0
- package/dist/ganttDiagram-FUAMR5RP-KIaOrYOF.js +2928 -0
- package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
- package/dist/gitGraphDiagram-X574FWY7-DpFW-7JE.js +729 -0
- package/dist/graphlib-DFaO_iIU.js +372 -0
- package/dist/{hooks-BjSuqEof.js → hooks-C5xy0u03.js} +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{i18n-DmVqVJXj.js → i18n-Cech9IAc.js} +328 -843
- package/dist/i18n.js +1 -1
- package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
- package/dist/infoDiagram-VRGFBTTK-H3F-BCnu.js +20 -0
- package/dist/init-Buj1GKRa.js +27 -0
- package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
- package/dist/ishikawaDiagram-OU5B5YK6-DgQDmcF3.js +719 -0
- package/dist/journeyDiagram-ZHPQQLJL-CanDOlfn.js +884 -0
- package/dist/kanban-definition-PNTS6WVX-DmnUgxgb.js +976 -0
- package/dist/katex-BMQ6LGsM.js +21962 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/ui/action-card.d.ts +1 -1
- package/dist/lib/components/ui/chat/chat-composer-mentions.d.ts +8 -0
- package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
- package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
- package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
- package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
- package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
- package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
- package/dist/lib/components/ui/emoji/index.d.ts +4 -0
- package/dist/lib/components/ui/emoji/types.d.ts +6 -0
- package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
- package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
- package/dist/lib/components/ui/markdown/index.d.ts +3 -0
- package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
- package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
- package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
- package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
- package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
- package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
- package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
- package/dist/lib/components/ui/mentions/index.d.ts +3 -0
- package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
- package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
- package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
- package/dist/lib/components/ui/mentions/types.d.ts +7 -0
- package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
- package/dist/lib/components/ui/terminal/index.d.ts +2 -0
- package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
- package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
- package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
- package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
- package/dist/lib/i18n/resources/en/index.d.ts +13 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/index.d.ts +26 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/{lib-B1KXma-r.js → lib-Bbw5QPoj.js} +472 -471
- package/dist/lib.js +2 -2
- package/dist/{main-Cw-Yaqo9.js → main-BjDU9FDM.js} +58614 -29566
- package/dist/main.js +6 -6
- package/dist/material.css +1 -1
- package/dist/math-C5EhTgJw.js +10 -0
- package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
- package/dist/mermaid.core-BI1sunfX.js +1096 -0
- package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
- package/dist/ordinal-DuP05kVQ.js +65 -0
- package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
- package/dist/path-Cjou0lUh.js +85 -0
- package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
- package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
- package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
- package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
- package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
- package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
- package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
- package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
- package/dist/rough.esm-rcMoXTJj.js +1352 -0
- package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
- package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
- package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
- package/dist/src-B4npqWNl.js +1775 -0
- package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
- package/dist/step-B6KjpKgN.js +706 -0
- package/dist/string-B-ZWXCs2.js +392 -0
- package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
- package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
- package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
- package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
- package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
- package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
- package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
- package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
- package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
- package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
- package/package.json +7 -1
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
import { n as e, t } from "./src-B4npqWNl.js";
|
|
2
|
+
import { g as n, i as r, m as i } from "./chunk-ZIGJFQKS-CP5430fN.js";
|
|
3
|
+
import { n as a } from "./mermaid-parser.core-Cz-MfB4Z.js";
|
|
4
|
+
import { n as o } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
5
|
+
import { H as s, U as c, X as l, a as u, b as d, f, q as p, s as m, v as h, w as g, x as _, y as v } from "./chunk-O7XYJQB3-md6vjVm4.js";
|
|
6
|
+
import { t as y } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
|
|
7
|
+
import { t as b } from "./chunk-2Q5K7J3B-kzxEEeTu.js";
|
|
8
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-X574FWY7.mjs
|
|
9
|
+
var x = {
|
|
10
|
+
NORMAL: 0,
|
|
11
|
+
REVERSE: 1,
|
|
12
|
+
HIGHLIGHT: 2,
|
|
13
|
+
MERGE: 3,
|
|
14
|
+
CHERRY_PICK: 4
|
|
15
|
+
}, ee = f.gitGraph, S = /* @__PURE__ */ o(() => r({
|
|
16
|
+
...ee,
|
|
17
|
+
...d().gitGraph
|
|
18
|
+
}), "getConfig"), C = new b(() => {
|
|
19
|
+
let e = S(), t = e.mainBranchName, n = e.mainBranchOrder;
|
|
20
|
+
return {
|
|
21
|
+
mainBranchName: t,
|
|
22
|
+
commits: /* @__PURE__ */ new Map(),
|
|
23
|
+
head: null,
|
|
24
|
+
branchConfig: /* @__PURE__ */ new Map([[t, {
|
|
25
|
+
name: t,
|
|
26
|
+
order: n
|
|
27
|
+
}]]),
|
|
28
|
+
branches: /* @__PURE__ */ new Map([[t, null]]),
|
|
29
|
+
currBranch: t,
|
|
30
|
+
direction: "LR",
|
|
31
|
+
seq: 0,
|
|
32
|
+
options: {}
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
function w() {
|
|
36
|
+
return i({ length: 7 });
|
|
37
|
+
}
|
|
38
|
+
o(w, "getID");
|
|
39
|
+
function T(e, t) {
|
|
40
|
+
let n = /* @__PURE__ */ Object.create(null);
|
|
41
|
+
return e.reduce((e, r) => {
|
|
42
|
+
let i = t(r);
|
|
43
|
+
return n[i] || (n[i] = !0, e.push(r)), e;
|
|
44
|
+
}, []);
|
|
45
|
+
}
|
|
46
|
+
o(T, "uniqBy");
|
|
47
|
+
var te = /* @__PURE__ */ o(function(e) {
|
|
48
|
+
C.records.direction = e;
|
|
49
|
+
}, "setDirection"), ne = /* @__PURE__ */ o(function(t) {
|
|
50
|
+
e.debug("options str", t), t = t?.trim(), t ||= "{}";
|
|
51
|
+
try {
|
|
52
|
+
C.records.options = JSON.parse(t);
|
|
53
|
+
} catch (t) {
|
|
54
|
+
e.error("error while parsing gitGraph options", t.message);
|
|
55
|
+
}
|
|
56
|
+
}, "setOptions"), re = /* @__PURE__ */ o(function() {
|
|
57
|
+
return C.records.options;
|
|
58
|
+
}, "getOptions"), ie = /* @__PURE__ */ o(function(t) {
|
|
59
|
+
let n = t.msg, r = t.id, i = t.type, a = t.tags;
|
|
60
|
+
e.info("commit", n, r, i, a), e.debug("Entering commit:", n, r, i, a);
|
|
61
|
+
let o = S();
|
|
62
|
+
r = m.sanitizeText(r, o), n = m.sanitizeText(n, o), a = a?.map((e) => m.sanitizeText(e, o));
|
|
63
|
+
let s = {
|
|
64
|
+
id: r || C.records.seq + "-" + w(),
|
|
65
|
+
message: n,
|
|
66
|
+
seq: C.records.seq++,
|
|
67
|
+
type: i ?? x.NORMAL,
|
|
68
|
+
tags: a ?? [],
|
|
69
|
+
parents: C.records.head == null ? [] : [C.records.head.id],
|
|
70
|
+
branch: C.records.currBranch
|
|
71
|
+
};
|
|
72
|
+
C.records.head = s, e.info("main branch", o.mainBranchName), C.records.commits.has(s.id) && e.warn(`Commit ID ${s.id} already exists`), C.records.commits.set(s.id, s), C.records.branches.set(C.records.currBranch, s.id), e.debug("in pushCommit " + s.id);
|
|
73
|
+
}, "commit"), ae = /* @__PURE__ */ o(function(t) {
|
|
74
|
+
let n = t.name, r = t.order;
|
|
75
|
+
if (n = m.sanitizeText(n, S()), C.records.branches.has(n)) throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);
|
|
76
|
+
C.records.branches.set(n, C.records.head == null ? null : C.records.head.id), C.records.branchConfig.set(n, {
|
|
77
|
+
name: n,
|
|
78
|
+
order: r
|
|
79
|
+
}), E(n), e.debug("in createBranch");
|
|
80
|
+
}, "branch"), oe = /* @__PURE__ */ o((t) => {
|
|
81
|
+
let n = t.branch, r = t.id, i = t.type, a = t.tags, o = S();
|
|
82
|
+
n = m.sanitizeText(n, o), r &&= m.sanitizeText(r, o);
|
|
83
|
+
let s = C.records.branches.get(C.records.currBranch), c = C.records.branches.get(n), l = s ? C.records.commits.get(s) : void 0, u = c ? C.records.commits.get(c) : void 0;
|
|
84
|
+
if (l && u && l.branch === n) throw Error(`Cannot merge branch '${n}' into itself.`);
|
|
85
|
+
if (C.records.currBranch === n) {
|
|
86
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Cannot merge a branch to itself");
|
|
87
|
+
throw e.hash = {
|
|
88
|
+
text: `merge ${n}`,
|
|
89
|
+
token: `merge ${n}`,
|
|
90
|
+
expected: ["branch abc"]
|
|
91
|
+
}, e;
|
|
92
|
+
}
|
|
93
|
+
if (l === void 0 || !l) {
|
|
94
|
+
let e = /* @__PURE__ */ Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);
|
|
95
|
+
throw e.hash = {
|
|
96
|
+
text: `merge ${n}`,
|
|
97
|
+
token: `merge ${n}`,
|
|
98
|
+
expected: ["commit"]
|
|
99
|
+
}, e;
|
|
100
|
+
}
|
|
101
|
+
if (!C.records.branches.has(n)) {
|
|
102
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + n + ") does not exist");
|
|
103
|
+
throw e.hash = {
|
|
104
|
+
text: `merge ${n}`,
|
|
105
|
+
token: `merge ${n}`,
|
|
106
|
+
expected: [`branch ${n}`]
|
|
107
|
+
}, e;
|
|
108
|
+
}
|
|
109
|
+
if (u === void 0 || !u) {
|
|
110
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + n + ") has no commits");
|
|
111
|
+
throw e.hash = {
|
|
112
|
+
text: `merge ${n}`,
|
|
113
|
+
token: `merge ${n}`,
|
|
114
|
+
expected: ["\"commit\""]
|
|
115
|
+
}, e;
|
|
116
|
+
}
|
|
117
|
+
if (l === u) {
|
|
118
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Both branches have same head");
|
|
119
|
+
throw e.hash = {
|
|
120
|
+
text: `merge ${n}`,
|
|
121
|
+
token: `merge ${n}`,
|
|
122
|
+
expected: ["branch abc"]
|
|
123
|
+
}, e;
|
|
124
|
+
}
|
|
125
|
+
if (r && C.records.commits.has(r)) {
|
|
126
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Commit with id:" + r + " already exists, use different custom id");
|
|
127
|
+
throw e.hash = {
|
|
128
|
+
text: `merge ${n} ${r} ${i} ${a?.join(" ")}`,
|
|
129
|
+
token: `merge ${n} ${r} ${i} ${a?.join(" ")}`,
|
|
130
|
+
expected: [`merge ${n} ${r}_UNIQUE ${i} ${a?.join(" ")}`]
|
|
131
|
+
}, e;
|
|
132
|
+
}
|
|
133
|
+
let d = c || "", f = {
|
|
134
|
+
id: r || `${C.records.seq}-${w()}`,
|
|
135
|
+
message: `merged branch ${n} into ${C.records.currBranch}`,
|
|
136
|
+
seq: C.records.seq++,
|
|
137
|
+
parents: C.records.head == null ? [] : [C.records.head.id, d],
|
|
138
|
+
branch: C.records.currBranch,
|
|
139
|
+
type: x.MERGE,
|
|
140
|
+
customType: i,
|
|
141
|
+
customId: !!r,
|
|
142
|
+
tags: a ?? []
|
|
143
|
+
};
|
|
144
|
+
C.records.head = f, C.records.commits.set(f.id, f), C.records.branches.set(C.records.currBranch, f.id), e.debug(C.records.branches), e.debug("in mergeBranch");
|
|
145
|
+
}, "merge"), se = /* @__PURE__ */ o(function(t) {
|
|
146
|
+
let n = t.id, r = t.targetId, i = t.tags, a = t.parent;
|
|
147
|
+
e.debug("Entering cherryPick:", n, r, i);
|
|
148
|
+
let o = S();
|
|
149
|
+
if (n = m.sanitizeText(n, o), r = m.sanitizeText(r, o), i = i?.map((e) => m.sanitizeText(e, o)), a = m.sanitizeText(a, o), !n || !C.records.commits.has(n)) {
|
|
150
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"cherryPick\". Source commit id should exist and provided");
|
|
151
|
+
throw e.hash = {
|
|
152
|
+
text: `cherryPick ${n} ${r}`,
|
|
153
|
+
token: `cherryPick ${n} ${r}`,
|
|
154
|
+
expected: ["cherry-pick abc"]
|
|
155
|
+
}, e;
|
|
156
|
+
}
|
|
157
|
+
let s = C.records.commits.get(n);
|
|
158
|
+
if (s === void 0 || !s) throw Error("Incorrect usage of \"cherryPick\". Source commit id should exist and provided");
|
|
159
|
+
if (a && !(Array.isArray(s.parents) && s.parents.includes(a))) throw /* @__PURE__ */ Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");
|
|
160
|
+
let c = s.branch;
|
|
161
|
+
if (s.type === x.MERGE && !a) throw /* @__PURE__ */ Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");
|
|
162
|
+
if (!r || !C.records.commits.has(r)) {
|
|
163
|
+
if (c === C.records.currBranch) {
|
|
164
|
+
let e = /* @__PURE__ */ Error("Incorrect usage of \"cherryPick\". Source commit is already on current branch");
|
|
165
|
+
throw e.hash = {
|
|
166
|
+
text: `cherryPick ${n} ${r}`,
|
|
167
|
+
token: `cherryPick ${n} ${r}`,
|
|
168
|
+
expected: ["cherry-pick abc"]
|
|
169
|
+
}, e;
|
|
170
|
+
}
|
|
171
|
+
let t = C.records.branches.get(C.records.currBranch);
|
|
172
|
+
if (t === void 0 || !t) {
|
|
173
|
+
let e = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);
|
|
174
|
+
throw e.hash = {
|
|
175
|
+
text: `cherryPick ${n} ${r}`,
|
|
176
|
+
token: `cherryPick ${n} ${r}`,
|
|
177
|
+
expected: ["cherry-pick abc"]
|
|
178
|
+
}, e;
|
|
179
|
+
}
|
|
180
|
+
let o = C.records.commits.get(t);
|
|
181
|
+
if (o === void 0 || !o) {
|
|
182
|
+
let e = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);
|
|
183
|
+
throw e.hash = {
|
|
184
|
+
text: `cherryPick ${n} ${r}`,
|
|
185
|
+
token: `cherryPick ${n} ${r}`,
|
|
186
|
+
expected: ["cherry-pick abc"]
|
|
187
|
+
}, e;
|
|
188
|
+
}
|
|
189
|
+
let l = {
|
|
190
|
+
id: C.records.seq + "-" + w(),
|
|
191
|
+
message: `cherry-picked ${s?.message} into ${C.records.currBranch}`,
|
|
192
|
+
seq: C.records.seq++,
|
|
193
|
+
parents: C.records.head == null ? [] : [C.records.head.id, s.id],
|
|
194
|
+
branch: C.records.currBranch,
|
|
195
|
+
type: x.CHERRY_PICK,
|
|
196
|
+
tags: i ? i.filter(Boolean) : [`cherry-pick:${s.id}${s.type === x.MERGE ? `|parent:${a}` : ""}`]
|
|
197
|
+
};
|
|
198
|
+
C.records.head = l, C.records.commits.set(l.id, l), C.records.branches.set(C.records.currBranch, l.id), e.debug(C.records.branches), e.debug("in cherryPick");
|
|
199
|
+
}
|
|
200
|
+
}, "cherryPick"), E = /* @__PURE__ */ o(function(e) {
|
|
201
|
+
if (e = m.sanitizeText(e, S()), C.records.branches.has(e)) {
|
|
202
|
+
C.records.currBranch = e;
|
|
203
|
+
let t = C.records.branches.get(C.records.currBranch);
|
|
204
|
+
t === void 0 || !t ? C.records.head = null : C.records.head = C.records.commits.get(t) ?? null;
|
|
205
|
+
} else {
|
|
206
|
+
let t = /* @__PURE__ */ Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);
|
|
207
|
+
throw t.hash = {
|
|
208
|
+
text: `checkout ${e}`,
|
|
209
|
+
token: `checkout ${e}`,
|
|
210
|
+
expected: [`branch ${e}`]
|
|
211
|
+
}, t;
|
|
212
|
+
}
|
|
213
|
+
}, "checkout");
|
|
214
|
+
function D(e, t, n) {
|
|
215
|
+
let r = e.indexOf(t);
|
|
216
|
+
r === -1 ? e.push(n) : e.splice(r, 1, n);
|
|
217
|
+
}
|
|
218
|
+
o(D, "upsert");
|
|
219
|
+
function O(t) {
|
|
220
|
+
let n = t.reduce((e, t) => e.seq > t.seq ? e : t, t[0]), r = "";
|
|
221
|
+
t.forEach(function(e) {
|
|
222
|
+
e === n ? r += " *" : r += " |";
|
|
223
|
+
});
|
|
224
|
+
let i = [
|
|
225
|
+
r,
|
|
226
|
+
n.id,
|
|
227
|
+
n.seq
|
|
228
|
+
];
|
|
229
|
+
for (let e in C.records.branches) C.records.branches.get(e) === n.id && i.push(e);
|
|
230
|
+
if (e.debug(i.join(" ")), n.parents && n.parents.length == 2 && n.parents[0] && n.parents[1]) {
|
|
231
|
+
let e = C.records.commits.get(n.parents[0]);
|
|
232
|
+
D(t, n, e), n.parents[1] && t.push(C.records.commits.get(n.parents[1]));
|
|
233
|
+
} else if (n.parents.length == 0) return;
|
|
234
|
+
else if (n.parents[0]) {
|
|
235
|
+
let e = C.records.commits.get(n.parents[0]);
|
|
236
|
+
D(t, n, e);
|
|
237
|
+
}
|
|
238
|
+
t = T(t, (e) => e.id), O(t);
|
|
239
|
+
}
|
|
240
|
+
o(O, "prettyPrintCommitHistory");
|
|
241
|
+
var ce = /* @__PURE__ */ o(function() {
|
|
242
|
+
e.debug(C.records.commits);
|
|
243
|
+
let t = k()[0];
|
|
244
|
+
O([t]);
|
|
245
|
+
}, "prettyPrint"), le = /* @__PURE__ */ o(function() {
|
|
246
|
+
C.reset(), u();
|
|
247
|
+
}, "clear"), ue = /* @__PURE__ */ o(function() {
|
|
248
|
+
return [...C.records.branchConfig.values()].map((e, t) => e.order !== null && e.order !== void 0 ? e : {
|
|
249
|
+
...e,
|
|
250
|
+
order: parseFloat(`0.${t}`)
|
|
251
|
+
}).sort((e, t) => (e.order ?? 0) - (t.order ?? 0)).map(({ name: e }) => ({ name: e }));
|
|
252
|
+
}, "getBranchesAsObjArray"), de = /* @__PURE__ */ o(function() {
|
|
253
|
+
return C.records.branches;
|
|
254
|
+
}, "getBranches"), fe = /* @__PURE__ */ o(function() {
|
|
255
|
+
return C.records.commits;
|
|
256
|
+
}, "getCommits"), k = /* @__PURE__ */ o(function() {
|
|
257
|
+
let t = [...C.records.commits.values()];
|
|
258
|
+
return t.forEach(function(t) {
|
|
259
|
+
e.debug(t.id);
|
|
260
|
+
}), t.sort((e, t) => e.seq - t.seq), t;
|
|
261
|
+
}, "getCommitsArray"), A = {
|
|
262
|
+
commitType: x,
|
|
263
|
+
getConfig: S,
|
|
264
|
+
setDirection: te,
|
|
265
|
+
setOptions: ne,
|
|
266
|
+
getOptions: re,
|
|
267
|
+
commit: ie,
|
|
268
|
+
branch: ae,
|
|
269
|
+
merge: oe,
|
|
270
|
+
cherryPick: se,
|
|
271
|
+
checkout: E,
|
|
272
|
+
prettyPrint: ce,
|
|
273
|
+
clear: le,
|
|
274
|
+
getBranchesAsObjArray: ue,
|
|
275
|
+
getBranches: de,
|
|
276
|
+
getCommits: fe,
|
|
277
|
+
getCommitsArray: k,
|
|
278
|
+
getCurrentBranch: /* @__PURE__ */ o(function() {
|
|
279
|
+
return C.records.currBranch;
|
|
280
|
+
}, "getCurrentBranch"),
|
|
281
|
+
getDirection: /* @__PURE__ */ o(function() {
|
|
282
|
+
return C.records.direction;
|
|
283
|
+
}, "getDirection"),
|
|
284
|
+
getHead: /* @__PURE__ */ o(function() {
|
|
285
|
+
return C.records.head;
|
|
286
|
+
}, "getHead"),
|
|
287
|
+
setAccTitle: c,
|
|
288
|
+
getAccTitle: v,
|
|
289
|
+
getAccDescription: h,
|
|
290
|
+
setAccDescription: s,
|
|
291
|
+
setDiagramTitle: p,
|
|
292
|
+
getDiagramTitle: g
|
|
293
|
+
}, pe = /* @__PURE__ */ o((e, t) => {
|
|
294
|
+
y(e, t), e.dir && t.setDirection(e.dir);
|
|
295
|
+
for (let n of e.statements) me(n, t);
|
|
296
|
+
}, "populate"), me = /* @__PURE__ */ o((t, n) => {
|
|
297
|
+
let r = {
|
|
298
|
+
Commit: /* @__PURE__ */ o((e) => n.commit(he(e)), "Commit"),
|
|
299
|
+
Branch: /* @__PURE__ */ o((e) => n.branch(ge(e)), "Branch"),
|
|
300
|
+
Merge: /* @__PURE__ */ o((e) => n.merge(_e(e)), "Merge"),
|
|
301
|
+
Checkout: /* @__PURE__ */ o((e) => n.checkout(ve(e)), "Checkout"),
|
|
302
|
+
CherryPicking: /* @__PURE__ */ o((e) => n.cherryPick(ye(e)), "CherryPicking")
|
|
303
|
+
}[t.$type];
|
|
304
|
+
r ? r(t) : e.error(`Unknown statement type: ${t.$type}`);
|
|
305
|
+
}, "parseStatement"), he = /* @__PURE__ */ o((e) => ({
|
|
306
|
+
id: e.id,
|
|
307
|
+
msg: e.message ?? "",
|
|
308
|
+
type: e.type === void 0 ? x.NORMAL : x[e.type],
|
|
309
|
+
tags: e.tags ?? void 0
|
|
310
|
+
}), "parseCommit"), ge = /* @__PURE__ */ o((e) => ({
|
|
311
|
+
name: e.name,
|
|
312
|
+
order: e.order ?? 0
|
|
313
|
+
}), "parseBranch"), _e = /* @__PURE__ */ o((e) => ({
|
|
314
|
+
branch: e.branch,
|
|
315
|
+
id: e.id ?? "",
|
|
316
|
+
type: e.type === void 0 ? void 0 : x[e.type],
|
|
317
|
+
tags: e.tags ?? void 0
|
|
318
|
+
}), "parseMerge"), ve = /* @__PURE__ */ o((e) => e.branch, "parseCheckout"), ye = /* @__PURE__ */ o((e) => ({
|
|
319
|
+
id: e.id,
|
|
320
|
+
targetId: "",
|
|
321
|
+
tags: e.tags?.length === 0 ? void 0 : e.tags,
|
|
322
|
+
parent: e.parent
|
|
323
|
+
}), "parseCherryPicking"), be = { parse: /* @__PURE__ */ o(async (t) => {
|
|
324
|
+
let n = await a("gitGraph", t);
|
|
325
|
+
e.debug(n), pe(n, A);
|
|
326
|
+
}, "parse") }, j = 10, M = 40, N = 4, P = 2, F = 8, I = /* @__PURE__ */ new Set([
|
|
327
|
+
"redux",
|
|
328
|
+
"redux-dark",
|
|
329
|
+
"redux-color",
|
|
330
|
+
"redux-dark-color"
|
|
331
|
+
]), L = 12, R = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), xe = /* @__PURE__ */ new Set([
|
|
332
|
+
"dark",
|
|
333
|
+
"redux-dark",
|
|
334
|
+
"redux-dark-color",
|
|
335
|
+
"neo-dark"
|
|
336
|
+
]), z = /* @__PURE__ */ o((e, t, n = !1) => n && e > 0 ? (e - 1) % (t - 1) + 1 : e % t, "calcColorIndex"), B = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map(), H = 30, U = /* @__PURE__ */ new Map(), W = [], G = 0, K = "LR", Se = /* @__PURE__ */ o(() => {
|
|
337
|
+
B.clear(), V.clear(), U.clear(), G = 0, W = [], K = "LR";
|
|
338
|
+
}, "clear"), q = /* @__PURE__ */ o((e) => {
|
|
339
|
+
let t = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
340
|
+
return (typeof e == "string" ? e.split(/\\n|\n|<br\s*\/?>/gi) : e).forEach((e) => {
|
|
341
|
+
let n = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
342
|
+
n.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), n.setAttribute("dy", "1em"), n.setAttribute("x", "0"), n.setAttribute("class", "row"), n.textContent = e.trim(), t.appendChild(n);
|
|
343
|
+
}), t;
|
|
344
|
+
}, "drawText"), J = /* @__PURE__ */ o((e) => {
|
|
345
|
+
let t, n, r;
|
|
346
|
+
return K === "BT" ? (n = /* @__PURE__ */ o((e, t) => e <= t, "comparisonFunc"), r = Infinity) : (n = /* @__PURE__ */ o((e, t) => e >= t, "comparisonFunc"), r = 0), e.forEach((e) => {
|
|
347
|
+
let i = K === "TB" || K == "BT" ? V.get(e)?.y : V.get(e)?.x;
|
|
348
|
+
i !== void 0 && n(i, r) && (t = e, r = i);
|
|
349
|
+
}), t;
|
|
350
|
+
}, "findClosestParent"), Ce = /* @__PURE__ */ o((e) => {
|
|
351
|
+
let t = "", n = Infinity;
|
|
352
|
+
return e.forEach((e) => {
|
|
353
|
+
let r = V.get(e).y;
|
|
354
|
+
r <= n && (t = e, n = r);
|
|
355
|
+
}), t || void 0;
|
|
356
|
+
}, "findClosestParentBT"), we = /* @__PURE__ */ o((e, t, n) => {
|
|
357
|
+
let r = n, i = n, a = [];
|
|
358
|
+
e.forEach((e) => {
|
|
359
|
+
let n = t.get(e);
|
|
360
|
+
if (!n) throw Error(`Commit not found for key ${e}`);
|
|
361
|
+
n.parents.length ? (r = Ee(n), i = Math.max(r, i)) : a.push(n), De(n, r);
|
|
362
|
+
}), r = i, a.forEach((e) => {
|
|
363
|
+
Oe(e, r, n);
|
|
364
|
+
}), e.forEach((e) => {
|
|
365
|
+
let n = t.get(e);
|
|
366
|
+
if (n?.parents.length) {
|
|
367
|
+
let e = Ce(n.parents);
|
|
368
|
+
r = V.get(e).y - M, r <= i && (i = r);
|
|
369
|
+
let t = B.get(n.branch).pos, a = r - j;
|
|
370
|
+
V.set(n.id, {
|
|
371
|
+
x: t,
|
|
372
|
+
y: a
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}, "setParallelBTPos"), Te = /* @__PURE__ */ o((e) => {
|
|
377
|
+
let t = J(e.parents.filter((e) => e !== null));
|
|
378
|
+
if (!t) throw Error(`Closest parent not found for commit ${e.id}`);
|
|
379
|
+
let n = V.get(t)?.y;
|
|
380
|
+
if (n === void 0) throw Error(`Closest parent position not found for commit ${e.id}`);
|
|
381
|
+
return n;
|
|
382
|
+
}, "findClosestParentPos"), Ee = /* @__PURE__ */ o((e) => Te(e) + M, "calculateCommitPosition"), De = /* @__PURE__ */ o((e, t) => {
|
|
383
|
+
let n = B.get(e.branch);
|
|
384
|
+
if (!n) throw Error(`Branch not found for commit ${e.id}`);
|
|
385
|
+
let r = n.pos, i = t + j;
|
|
386
|
+
return V.set(e.id, {
|
|
387
|
+
x: r,
|
|
388
|
+
y: i
|
|
389
|
+
}), {
|
|
390
|
+
x: r,
|
|
391
|
+
y: i
|
|
392
|
+
};
|
|
393
|
+
}, "setCommitPosition"), Oe = /* @__PURE__ */ o((e, t, n) => {
|
|
394
|
+
let r = B.get(e.branch);
|
|
395
|
+
if (!r) throw Error(`Branch not found for commit ${e.id}`);
|
|
396
|
+
let i = t + n, a = r.pos;
|
|
397
|
+
V.set(e.id, {
|
|
398
|
+
x: a,
|
|
399
|
+
y: i
|
|
400
|
+
});
|
|
401
|
+
}, "setRootPosition"), ke = /* @__PURE__ */ o((e, t, n, r, i, a) => {
|
|
402
|
+
let { theme: o } = _(), s = I.has(o ?? ""), c = R.has(o ?? ""), l = xe.has(o ?? "");
|
|
403
|
+
if (a === x.HIGHLIGHT) e.append("rect").attr("x", n.x - 10 + (s ? 3 : 0)).attr("y", n.y - 10 + (s ? 3 : 0)).attr("width", s ? 14 : 20).attr("height", s ? 14 : 20).attr("class", `commit ${t.id} commit-highlight${z(i, F, c)} ${r}-outer`), e.append("rect").attr("x", n.x - 6 + (s ? 2 : 0)).attr("y", n.y - 6 + (s ? 2 : 0)).attr("width", s ? 8 : 12).attr("height", s ? 8 : 12).attr("class", `commit ${t.id} commit${z(i, F, c)} ${r}-inner`);
|
|
404
|
+
else if (a === x.CHERRY_PICK) e.append("circle").attr("cx", n.x).attr("cy", n.y).attr("r", s ? 7 : 10).attr("class", `commit ${t.id} ${r}`), e.append("circle").attr("cx", n.x - 3).attr("cy", n.y + 2).attr("r", s ? 2.5 : 2.75).attr("fill", l ? "#000000" : "#fff").attr("class", `commit ${t.id} ${r}`), e.append("circle").attr("cx", n.x + 3).attr("cy", n.y + 2).attr("r", s ? 2.5 : 2.75).attr("fill", l ? "#000000" : "#fff").attr("class", `commit ${t.id} ${r}`), e.append("line").attr("x1", n.x + 3).attr("y1", n.y + 1).attr("x2", n.x).attr("y2", n.y - 5).attr("stroke", l ? "#000000" : "#fff").attr("class", `commit ${t.id} ${r}`), e.append("line").attr("x1", n.x - 3).attr("y1", n.y + 1).attr("x2", n.x).attr("y2", n.y - 5).attr("stroke", l ? "#000000" : "#fff").attr("class", `commit ${t.id} ${r}`);
|
|
405
|
+
else {
|
|
406
|
+
let o = e.append("circle");
|
|
407
|
+
if (o.attr("cx", n.x), o.attr("cy", n.y), o.attr("r", s ? 7 : 10), o.attr("class", `commit ${t.id} commit${z(i, F, c)}`), a === x.MERGE) {
|
|
408
|
+
let a = e.append("circle");
|
|
409
|
+
a.attr("cx", n.x), a.attr("cy", n.y), a.attr("r", s ? 5 : 6), a.attr("class", `commit ${r} ${t.id} commit${z(i, F, c)}`);
|
|
410
|
+
}
|
|
411
|
+
if (a === x.REVERSE) {
|
|
412
|
+
let a = e.append("path"), o = s ? 4 : 5;
|
|
413
|
+
a.attr("d", `M ${n.x - o},${n.y - o}L${n.x + o},${n.y + o}M${n.x - o},${n.y + o}L${n.x + o},${n.y - o}`).attr("class", `commit ${r} ${t.id} commit${z(i, F, c)}`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}, "drawCommitBullet"), Ae = /* @__PURE__ */ o((e, t, n, r, i) => {
|
|
417
|
+
if (t.type !== x.CHERRY_PICK && (t.customId && t.type === x.MERGE || t.type !== x.MERGE) && i.showCommitLabel) {
|
|
418
|
+
let a = e.append("g"), o = a.insert("rect").attr("class", "commit-label-bkg"), s = a.append("text").attr("x", r).attr("y", n.y + 25).attr("class", "commit-label").text(t.id), c = s.node()?.getBBox();
|
|
419
|
+
if (c && (o.attr("x", n.posWithOffset - c.width / 2 - P).attr("y", n.y + 13.5).attr("width", c.width + 2 * P).attr("height", c.height + 2 * P), K === "TB" || K === "BT" ? (o.attr("x", n.x - (c.width + 4 * N + 5)).attr("y", n.y - 12), s.attr("x", n.x - (c.width + 4 * N)).attr("y", n.y + c.height - 12)) : s.attr("x", n.posWithOffset - c.width / 2), i.rotateCommitLabel)) if (K === "TB" || K === "BT") s.attr("transform", "rotate(-45, " + n.x + ", " + n.y + ")"), o.attr("transform", "rotate(-45, " + n.x + ", " + n.y + ")");
|
|
420
|
+
else {
|
|
421
|
+
let e = -7.5 - (c.width + 10) / 25 * 9.5, t = 10 + c.width / 25 * 8.5;
|
|
422
|
+
a.attr("transform", "translate(" + e + ", " + t + ") rotate(-45, " + r + ", " + n.y + ")");
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}, "drawCommitLabel"), je = /* @__PURE__ */ o((e, t, n, r) => {
|
|
426
|
+
if (t.tags.length > 0) {
|
|
427
|
+
let i = 0, a = 0, o = 0, s = [];
|
|
428
|
+
for (let r of t.tags.reverse()) {
|
|
429
|
+
let t = e.insert("polygon"), c = e.append("circle"), l = e.append("text").attr("y", n.y - 16 - i).attr("class", "tag-label").text(r), u = l.node()?.getBBox();
|
|
430
|
+
if (!u) throw Error("Tag bbox not found");
|
|
431
|
+
a = Math.max(a, u.width), o = Math.max(o, u.height), l.attr("x", n.posWithOffset - u.width / 2), s.push({
|
|
432
|
+
tag: l,
|
|
433
|
+
hole: c,
|
|
434
|
+
rect: t,
|
|
435
|
+
yOffset: i
|
|
436
|
+
}), i += 20;
|
|
437
|
+
}
|
|
438
|
+
for (let { tag: e, hole: t, rect: i, yOffset: c } of s) {
|
|
439
|
+
let s = o / 2, l = n.y - 19.2 - c;
|
|
440
|
+
if (i.attr("class", "tag-label-bkg").attr("points", `
|
|
441
|
+
${r - a / 2 - N / 2},${l + P}
|
|
442
|
+
${r - a / 2 - N / 2},${l - P}
|
|
443
|
+
${n.posWithOffset - a / 2 - N},${l - s - P}
|
|
444
|
+
${n.posWithOffset + a / 2 + N},${l - s - P}
|
|
445
|
+
${n.posWithOffset + a / 2 + N},${l + s + P}
|
|
446
|
+
${n.posWithOffset - a / 2 - N},${l + s + P}`), t.attr("cy", l).attr("cx", r - a / 2 + N / 2).attr("r", 1.5).attr("class", "tag-hole"), K === "TB" || K === "BT") {
|
|
447
|
+
let o = r + c;
|
|
448
|
+
i.attr("class", "tag-label-bkg").attr("points", `
|
|
449
|
+
${n.x},${o + 2}
|
|
450
|
+
${n.x},${o - 2}
|
|
451
|
+
${n.x + j},${o - s - 2}
|
|
452
|
+
${n.x + j + a + 4},${o - s - 2}
|
|
453
|
+
${n.x + j + a + 4},${o + s + 2}
|
|
454
|
+
${n.x + j},${o + s + 2}`).attr("transform", "translate(12,12) rotate(45, " + n.x + "," + r + ")"), t.attr("cx", n.x + N / 2).attr("cy", o).attr("transform", "translate(12,12) rotate(45, " + n.x + "," + r + ")"), e.attr("x", n.x + 5).attr("y", o + 3).attr("transform", "translate(14,14) rotate(45, " + n.x + "," + r + ")");
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}, "drawCommitTags"), Me = /* @__PURE__ */ o((e) => {
|
|
459
|
+
switch (e.customType ?? e.type) {
|
|
460
|
+
case x.NORMAL: return "commit-normal";
|
|
461
|
+
case x.REVERSE: return "commit-reverse";
|
|
462
|
+
case x.HIGHLIGHT: return "commit-highlight";
|
|
463
|
+
case x.MERGE: return "commit-merge";
|
|
464
|
+
case x.CHERRY_PICK: return "commit-cherry-pick";
|
|
465
|
+
default: return "commit-normal";
|
|
466
|
+
}
|
|
467
|
+
}, "getCommitClassType"), Ne = /* @__PURE__ */ o((e, t, n, r) => {
|
|
468
|
+
let i = {
|
|
469
|
+
x: 0,
|
|
470
|
+
y: 0
|
|
471
|
+
};
|
|
472
|
+
if (e.parents.length > 0) {
|
|
473
|
+
let n = J(e.parents);
|
|
474
|
+
if (n) {
|
|
475
|
+
let a = r.get(n) ?? i;
|
|
476
|
+
return t === "TB" ? a.y + M : t === "BT" ? (r.get(e.id) ?? i).y - M : a.x + M;
|
|
477
|
+
}
|
|
478
|
+
} else if (t === "TB") return H;
|
|
479
|
+
else if (t === "BT") return (r.get(e.id) ?? i).y - M;
|
|
480
|
+
else return 0;
|
|
481
|
+
return 0;
|
|
482
|
+
}, "calculatePosition"), Pe = /* @__PURE__ */ o((e, t, n) => {
|
|
483
|
+
let r = K === "BT" && n ? t : t + j, i = B.get(e.branch)?.pos, a = K === "TB" || K === "BT" ? B.get(e.branch)?.pos : r;
|
|
484
|
+
if (a === void 0 || i === void 0) throw Error(`Position were undefined for commit ${e.id}`);
|
|
485
|
+
let o = I.has(_().theme ?? "");
|
|
486
|
+
return {
|
|
487
|
+
x: a,
|
|
488
|
+
y: K === "TB" || K === "BT" ? r : i + (o ? L / 2 + 1 : -2),
|
|
489
|
+
posWithOffset: r
|
|
490
|
+
};
|
|
491
|
+
}, "getCommitPosition"), Y = /* @__PURE__ */ o((e, t, n, r) => {
|
|
492
|
+
let i = e.append("g").attr("class", "commit-bullets"), a = e.append("g").attr("class", "commit-labels"), s = K === "TB" || K === "BT" ? H : 0, c = [...t.keys()], l = r.parallelCommits ?? !1, u = /* @__PURE__ */ o((e, n) => {
|
|
493
|
+
let r = t.get(e)?.seq, i = t.get(n)?.seq;
|
|
494
|
+
return r !== void 0 && i !== void 0 ? r - i : 0;
|
|
495
|
+
}, "sortKeys"), d = c.sort(u);
|
|
496
|
+
K === "BT" && (l && we(d, t, s), d = d.reverse()), d.forEach((e) => {
|
|
497
|
+
let o = t.get(e);
|
|
498
|
+
if (!o) throw Error(`Commit not found for key ${e}`);
|
|
499
|
+
l && (s = Ne(o, K, s, V));
|
|
500
|
+
let c = Pe(o, s, l);
|
|
501
|
+
if (n) {
|
|
502
|
+
let e = Me(o), t = o.customType ?? o.type, n = B.get(o.branch)?.index ?? 0;
|
|
503
|
+
ke(i, o, c, e, n, t), Ae(a, o, c, s, r), je(a, o, c, s);
|
|
504
|
+
}
|
|
505
|
+
K === "TB" || K === "BT" ? V.set(o.id, {
|
|
506
|
+
x: c.x,
|
|
507
|
+
y: c.posWithOffset
|
|
508
|
+
}) : V.set(o.id, {
|
|
509
|
+
x: c.posWithOffset,
|
|
510
|
+
y: c.y
|
|
511
|
+
}), s = K === "BT" && l ? s + M : s + M + j, s > G && (G = s);
|
|
512
|
+
});
|
|
513
|
+
}, "drawCommits"), Fe = /* @__PURE__ */ o((e, t, n, r, i) => {
|
|
514
|
+
let a = (K === "TB" || K === "BT" ? n.x < r.x : n.y < r.y) ? t.branch : e.branch, s = /* @__PURE__ */ o((e) => e.branch === a, "isOnBranchToGetCurve"), c = /* @__PURE__ */ o((n) => n.seq > e.seq && n.seq < t.seq, "isBetweenCommits");
|
|
515
|
+
return [...i.values()].some((e) => c(e) && s(e));
|
|
516
|
+
}, "shouldRerouteArrow"), X = /* @__PURE__ */ o((e, t, n = 0) => {
|
|
517
|
+
let r = e + Math.abs(e - t) / 2;
|
|
518
|
+
return n > 5 ? r : W.every((e) => Math.abs(e - r) >= 10) ? (W.push(r), r) : X(e, t - Math.abs(e - t) / 5, n + 1);
|
|
519
|
+
}, "findLane"), Ie = /* @__PURE__ */ o((e, t, n, r) => {
|
|
520
|
+
let { theme: i } = _(), a = R.has(i ?? ""), o = V.get(t.id), s = V.get(n.id);
|
|
521
|
+
if (o === void 0 || s === void 0) throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);
|
|
522
|
+
let c = Fe(t, n, o, s, r), l = "", u = "", d = 0, f = 0, p = B.get(n.branch)?.index;
|
|
523
|
+
n.type === x.MERGE && t.id !== n.parents[0] && (p = B.get(t.branch)?.index);
|
|
524
|
+
let m;
|
|
525
|
+
if (c) {
|
|
526
|
+
l = "A 10 10, 0, 0, 0,", u = "A 10 10, 0, 0, 1,", d = 10, f = 10;
|
|
527
|
+
let e = o.y < s.y ? X(o.y, s.y) : X(s.y, o.y), n = o.x < s.x ? X(o.x, s.x) : X(s.x, o.x);
|
|
528
|
+
K === "TB" ? o.x < s.x ? m = `M ${o.x} ${o.y} L ${n - d} ${o.y} ${u} ${n} ${o.y + f} L ${n} ${s.y - d} ${l} ${n + f} ${s.y} L ${s.x} ${s.y}` : (p = B.get(t.branch)?.index, m = `M ${o.x} ${o.y} L ${n + d} ${o.y} ${l} ${n} ${o.y + f} L ${n} ${s.y - d} ${u} ${n - f} ${s.y} L ${s.x} ${s.y}`) : K === "BT" ? o.x < s.x ? m = `M ${o.x} ${o.y} L ${n - d} ${o.y} ${l} ${n} ${o.y - f} L ${n} ${s.y + d} ${u} ${n + f} ${s.y} L ${s.x} ${s.y}` : (p = B.get(t.branch)?.index, m = `M ${o.x} ${o.y} L ${n + d} ${o.y} ${u} ${n} ${o.y - f} L ${n} ${s.y + d} ${l} ${n - f} ${s.y} L ${s.x} ${s.y}`) : o.y < s.y ? m = `M ${o.x} ${o.y} L ${o.x} ${e - d} ${l} ${o.x + f} ${e} L ${s.x - d} ${e} ${u} ${s.x} ${e + f} L ${s.x} ${s.y}` : (p = B.get(t.branch)?.index, m = `M ${o.x} ${o.y} L ${o.x} ${e + d} ${u} ${o.x + f} ${e} L ${s.x - d} ${e} ${l} ${s.x} ${e - f} L ${s.x} ${s.y}`);
|
|
529
|
+
} else l = "A 20 20, 0, 0, 0,", u = "A 20 20, 0, 0, 1,", d = 20, f = 20, K === "TB" ? (o.x < s.x && (m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${s.y - d} ${l} ${o.x + f} ${s.y} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${s.x - d} ${o.y} ${u} ${s.x} ${o.y + f} L ${s.x} ${s.y}`), o.x > s.x && (l = "A 20 20, 0, 0, 0,", u = "A 20 20, 0, 0, 1,", d = 20, f = 20, m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${s.y - d} ${u} ${o.x - f} ${s.y} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${s.x + d} ${o.y} ${l} ${s.x} ${o.y + f} L ${s.x} ${s.y}`), o.x === s.x && (m = `M ${o.x} ${o.y} L ${s.x} ${s.y}`)) : K === "BT" ? (o.x < s.x && (m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${s.y + d} ${u} ${o.x + f} ${s.y} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${s.x - d} ${o.y} ${l} ${s.x} ${o.y - f} L ${s.x} ${s.y}`), o.x > s.x && (l = "A 20 20, 0, 0, 0,", u = "A 20 20, 0, 0, 1,", d = 20, f = 20, m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${o.x} ${s.y + d} ${l} ${o.x - f} ${s.y} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${s.x + d} ${o.y} ${u} ${s.x} ${o.y - f} L ${s.x} ${s.y}`), o.x === s.x && (m = `M ${o.x} ${o.y} L ${s.x} ${s.y}`)) : (o.y < s.y && (m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${s.x - d} ${o.y} ${u} ${s.x} ${o.y + f} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${o.x} ${s.y - d} ${l} ${o.x + f} ${s.y} L ${s.x} ${s.y}`), o.y > s.y && (m = n.type === x.MERGE && t.id !== n.parents[0] ? `M ${o.x} ${o.y} L ${s.x - d} ${o.y} ${l} ${s.x} ${o.y - f} L ${s.x} ${s.y}` : `M ${o.x} ${o.y} L ${o.x} ${s.y + d} ${u} ${o.x + f} ${s.y} L ${s.x} ${s.y}`), o.y === s.y && (m = `M ${o.x} ${o.y} L ${s.x} ${s.y}`));
|
|
530
|
+
if (m === void 0) throw Error("Line definition not found");
|
|
531
|
+
e.append("path").attr("d", m).attr("class", "arrow arrow" + z(p, F, a));
|
|
532
|
+
}, "drawArrow"), Le = /* @__PURE__ */ o((e, t) => {
|
|
533
|
+
let n = e.append("g").attr("class", "commit-arrows");
|
|
534
|
+
[...t.keys()].forEach((e) => {
|
|
535
|
+
let r = t.get(e);
|
|
536
|
+
r.parents && r.parents.length > 0 && r.parents.forEach((e) => {
|
|
537
|
+
Ie(n, t.get(e), r, t);
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
}, "drawArrows"), Re = /* @__PURE__ */ o((e, t, n, r) => {
|
|
541
|
+
let { look: i, theme: a, themeVariables: o } = _(), { dropShadow: s, THEME_COLOR_LIMIT: c } = o, l = I.has(a ?? ""), u = R.has(a ?? ""), d = e.append("g");
|
|
542
|
+
t.forEach((e, t) => {
|
|
543
|
+
let a = z(t, l ? c : F, u), o = B.get(e.name)?.pos;
|
|
544
|
+
if (o === void 0) throw Error(`Position not found for branch ${e.name}`);
|
|
545
|
+
let f = K === "TB" || K === "BT" ? o : l ? o + L / 2 + 1 : o - 2, p = d.append("line");
|
|
546
|
+
p.attr("x1", 0), p.attr("y1", f), p.attr("x2", G), p.attr("y2", f), p.attr("class", "branch branch" + a), K === "TB" ? (p.attr("y1", H), p.attr("x1", o), p.attr("y2", G), p.attr("x2", o)) : K === "BT" && (p.attr("y1", G), p.attr("x1", o), p.attr("y2", H), p.attr("x2", o)), W.push(f);
|
|
547
|
+
let m = e.name, h = q(m), g = d.insert("rect"), _ = d.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
|
|
548
|
+
_.node().appendChild(h);
|
|
549
|
+
let v = h.getBBox(), y = l ? 0 : 4, b = l ? 16 : 0, x = l ? L : 0;
|
|
550
|
+
i === "neo" && g.attr("data-look", "neo"), g.attr("class", "branchLabelBkg label" + a).attr("style", i === "neo" ? `filter:${l ? `url(#${r}-drop-shadow)` : s}` : "").attr("rx", y).attr("ry", y).attr("x", -v.width - 4 - (n.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -v.height / 2 + 10).attr("width", v.width + 18 + b).attr("height", v.height + 4 + x), _.attr("transform", "translate(" + (-v.width - 14 - (n.rotateCommitLabel === !0 ? 30 : 0) + b / 2) + ", " + (f - v.height / 2 - 2) + ")"), K === "TB" ? (g.attr("x", o - v.width / 2 - 10).attr("y", 0), _.attr("transform", "translate(" + (o - v.width / 2 - 5) + ", 0)"), l && (g.attr("transform", `translate(${-b / 2 - 3}, ${-x - 10})`), _.attr("transform", "translate(" + (o - v.width / 2 - 5) + ", " + (-x * 2 + 7) + ")"))) : K === "BT" ? (g.attr("x", o - v.width / 2 - 10).attr("y", G), _.attr("transform", "translate(" + (o - v.width / 2 - 5) + ", " + G + ")"), l && (g.attr("transform", `translate(${-b / 2 - 3}, ${x + 10})`), _.attr("transform", "translate(" + (o - v.width / 2 - 5) + ", " + (G + x * 2 + 4) + ")"))) : g.attr("transform", "translate(-19, " + (f - 12 - x / 2) + ")");
|
|
551
|
+
});
|
|
552
|
+
}, "drawBranches"), ze = /* @__PURE__ */ o(function(e, t, n, r, i) {
|
|
553
|
+
return B.set(e, {
|
|
554
|
+
pos: t,
|
|
555
|
+
index: n
|
|
556
|
+
}), t += 50 + (i ? 40 : 0) + (K === "TB" || K === "BT" ? r.width / 2 : 0), t;
|
|
557
|
+
}, "setBranchPosition"), Be = { draw: /* @__PURE__ */ o(function(r, i, a, o) {
|
|
558
|
+
Se(), e.debug("in gitgraph renderer", r + "\n", "id:", i, a);
|
|
559
|
+
let s = o.db;
|
|
560
|
+
if (!s.getConfig) {
|
|
561
|
+
e.error("getConfig method is not available on db");
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
let c = s.getConfig(), u = c.rotateCommitLabel ?? !1;
|
|
565
|
+
U = s.getCommits();
|
|
566
|
+
let d = s.getBranchesAsObjArray();
|
|
567
|
+
K = s.getDirection();
|
|
568
|
+
let f = t(`[id="${i}"]`), { look: p, theme: m, themeVariables: h } = _(), { useGradient: g, gradientStart: v, gradientStop: y, filterColor: b } = h;
|
|
569
|
+
if (g) {
|
|
570
|
+
let e = f.append("defs").append("linearGradient").attr("id", i + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
|
|
571
|
+
e.append("stop").attr("offset", "0%").attr("stop-color", v).attr("stop-opacity", 1), e.append("stop").attr("offset", "100%").attr("stop-color", y).attr("stop-opacity", 1);
|
|
572
|
+
}
|
|
573
|
+
p === "neo" && I.has(m ?? "") && f.append("defs").append("filter").attr("id", i + "-drop-shadow").attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", b);
|
|
574
|
+
let x = 0;
|
|
575
|
+
d.forEach((e, t) => {
|
|
576
|
+
let n = q(e.name), r = f.append("g"), i = r.insert("g").attr("class", "branchLabel"), a = i.insert("g").attr("class", "label branch-label");
|
|
577
|
+
a.node()?.appendChild(n);
|
|
578
|
+
let o = n.getBBox();
|
|
579
|
+
x = ze(e.name, x, t, o, u), a.remove(), i.remove(), r.remove();
|
|
580
|
+
}), Y(f, U, !1, c), c.showBranches && Re(f, d, c, i), Le(f, U), Y(f, U, !0, c), n.insertTitle(f, "gitTitleText", c.titleTopMargin ?? 0, s.getDiagramTitle()), l(void 0, f, c.diagramPadding, c.useMaxWidth);
|
|
581
|
+
}, "draw") }, Z = 8, Q = /* @__PURE__ */ new Set([
|
|
582
|
+
"redux",
|
|
583
|
+
"redux-dark",
|
|
584
|
+
"redux-color",
|
|
585
|
+
"redux-dark-color"
|
|
586
|
+
]), $ = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Ve = /* @__PURE__ */ new Set(["neo", "neo-dark"]), He = /* @__PURE__ */ new Set([
|
|
587
|
+
"dark",
|
|
588
|
+
"redux-dark",
|
|
589
|
+
"redux-dark-color",
|
|
590
|
+
"neo-dark"
|
|
591
|
+
]), Ue = /* @__PURE__ */ new Set([
|
|
592
|
+
"redux",
|
|
593
|
+
"redux-dark",
|
|
594
|
+
"redux-color",
|
|
595
|
+
"redux-dark-color",
|
|
596
|
+
"neo",
|
|
597
|
+
"neo-dark"
|
|
598
|
+
]), We = /* @__PURE__ */ o((e) => {
|
|
599
|
+
let { svgId: t } = e, n = "";
|
|
600
|
+
if (e.useGradient && t) for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) n += `
|
|
601
|
+
.label${r} { fill: ${e.mainBkg}; stroke: url(${t}-gradient); stroke-width: ${e.strokeWidth};}
|
|
602
|
+
`;
|
|
603
|
+
return n;
|
|
604
|
+
}, "genGitGraphGradient"), Ge = /* @__PURE__ */ o((e) => {
|
|
605
|
+
let { theme: t, themeVariables: n } = d(), { borderColorArray: r } = n, i = Q.has(t);
|
|
606
|
+
if (Ve.has(t)) {
|
|
607
|
+
let t = "";
|
|
608
|
+
for (let n = 0; n < e.THEME_COLOR_LIMIT; n++) if (n === 0) t += `
|
|
609
|
+
.branch-label${n} { fill: ${e.nodeBorder};}
|
|
610
|
+
.commit${n} { stroke: ${e.nodeBorder}; }
|
|
611
|
+
.commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
612
|
+
.arrow${n} { stroke: ${e.nodeBorder}; }
|
|
613
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
614
|
+
.commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }
|
|
615
|
+
${We(e)}`;
|
|
616
|
+
else {
|
|
617
|
+
let r = n % Z;
|
|
618
|
+
t += `
|
|
619
|
+
.branch-label${n} { fill: ${e["gitBranchLabel" + r]}; }
|
|
620
|
+
.commit${n} { stroke: ${e["git" + r]}; fill: ${e["git" + r]}; }
|
|
621
|
+
.commit-highlight${n} { stroke: ${e["gitInv" + r]}; fill: ${e["gitInv" + r]}; }
|
|
622
|
+
.arrow${n} { stroke: ${e["git" + r]}; }
|
|
623
|
+
`;
|
|
624
|
+
}
|
|
625
|
+
return t;
|
|
626
|
+
} else if ($.has(t)) {
|
|
627
|
+
let n = "";
|
|
628
|
+
for (let a = 0; a < e.THEME_COLOR_LIMIT; a++) if (a === 0) n += `
|
|
629
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
|
|
630
|
+
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
631
|
+
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
|
|
632
|
+
.label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
|
|
633
|
+
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
634
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
635
|
+
`;
|
|
636
|
+
else {
|
|
637
|
+
let o = a % r.length;
|
|
638
|
+
n += `
|
|
639
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
|
|
640
|
+
.commit${a} { stroke: ${r[o]}; fill: ${r[o]}; }
|
|
641
|
+
.commit-highlight${a} { stroke: ${r[o]}; fill: ${r[o]}; }
|
|
642
|
+
.label${a} { fill: ${He.has(t) ? e.mainBkg : r[o]}; stroke: ${r[o]}; stroke-width: ${e.strokeWidth}; }
|
|
643
|
+
.arrow${a} { stroke: ${r[o]}; }
|
|
644
|
+
`;
|
|
645
|
+
}
|
|
646
|
+
return n;
|
|
647
|
+
} else {
|
|
648
|
+
let t = "";
|
|
649
|
+
for (let n = 0; n < e.THEME_COLOR_LIMIT; n++) t += `
|
|
650
|
+
.branch-label${n} { fill: ${e.nodeBorder}; ${i ? `font-weight:${e.noteFontWeight}` : ""} }
|
|
651
|
+
.commit${n} { stroke: ${e.nodeBorder}; }
|
|
652
|
+
.commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
653
|
+
.label${n} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i ? `font-weight:${e.noteFontWeight}` : ""}}
|
|
654
|
+
.arrow${n} { stroke: ${e.nodeBorder}; }
|
|
655
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
656
|
+
.commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }
|
|
657
|
+
`;
|
|
658
|
+
return t;
|
|
659
|
+
}
|
|
660
|
+
}, "genColor"), Ke = /* @__PURE__ */ o((e) => `${Array.from({ length: e.THEME_COLOR_LIMIT }, (e, t) => t).map((t) => {
|
|
661
|
+
let n = t % Z;
|
|
662
|
+
return `
|
|
663
|
+
.branch-label${t} { fill: ${e["gitBranchLabel" + n]}; }
|
|
664
|
+
.commit${t} { stroke: ${e["git" + n]}; fill: ${e["git" + n]}; }
|
|
665
|
+
.commit-highlight${t} { stroke: ${e["gitInv" + n]}; fill: ${e["gitInv" + n]}; }
|
|
666
|
+
.label${t} { fill: ${e["git" + n]}; }
|
|
667
|
+
.arrow${t} { stroke: ${e["git" + n]}; }
|
|
668
|
+
`;
|
|
669
|
+
}).join("\n")}`, "normalTheme"), qe = {
|
|
670
|
+
parser: be,
|
|
671
|
+
db: A,
|
|
672
|
+
renderer: Be,
|
|
673
|
+
styles: /* @__PURE__ */ o((e) => {
|
|
674
|
+
let { theme: t } = d(), n = Ue.has(t);
|
|
675
|
+
return `
|
|
676
|
+
.commit-id,
|
|
677
|
+
.commit-msg,
|
|
678
|
+
.branch-label {
|
|
679
|
+
fill: lightgrey;
|
|
680
|
+
color: lightgrey;
|
|
681
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
682
|
+
font-family: var(--mermaid-font-family);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
${n ? Ge(e) : Ke(e)}
|
|
686
|
+
|
|
687
|
+
.branch {
|
|
688
|
+
stroke-width: ${e.strokeWidth};
|
|
689
|
+
stroke: ${e.commitLineColor ?? e.lineColor};
|
|
690
|
+
stroke-dasharray: ${n ? "4 2" : "2"};
|
|
691
|
+
}
|
|
692
|
+
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n ? e.nodeBorder : e.commitLabelColor}; ${n ? `font-weight:${e.noteFontWeight};` : ""}}
|
|
693
|
+
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n ? "transparent" : e.commitLabelBackground}; opacity: ${n ? "" : .5}; }
|
|
694
|
+
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
695
|
+
.tag-label-bkg { fill: ${n ? e.mainBkg : e.tagLabelBackground}; stroke: ${n ? e.nodeBorder : e.tagLabelBorder}; ${n ? `filter:${e.dropShadow}` : ""} }
|
|
696
|
+
.tag-hole { fill: ${e.textColor}; }
|
|
697
|
+
|
|
698
|
+
.commit-merge {
|
|
699
|
+
stroke: ${n ? e.mainBkg : e.primaryColor};
|
|
700
|
+
fill: ${n ? e.mainBkg : e.primaryColor};
|
|
701
|
+
}
|
|
702
|
+
.commit-reverse {
|
|
703
|
+
stroke: ${n ? e.mainBkg : e.primaryColor};
|
|
704
|
+
fill: ${n ? e.mainBkg : e.primaryColor};
|
|
705
|
+
stroke-width: ${n ? e.strokeWidth : 3};
|
|
706
|
+
}
|
|
707
|
+
.commit-highlight-outer {
|
|
708
|
+
}
|
|
709
|
+
.commit-highlight-inner {
|
|
710
|
+
stroke: ${n ? e.mainBkg : e.primaryColor};
|
|
711
|
+
fill: ${n ? e.mainBkg : e.primaryColor};
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.arrow {
|
|
715
|
+
/* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
|
|
716
|
+
stroke-width: ${Q.has(t) ? e.strokeWidth : 8};
|
|
717
|
+
stroke-linecap: round;
|
|
718
|
+
fill: none
|
|
719
|
+
}
|
|
720
|
+
.gitTitleText {
|
|
721
|
+
text-anchor: middle;
|
|
722
|
+
font-size: 18px;
|
|
723
|
+
fill: ${e.textColor};
|
|
724
|
+
}
|
|
725
|
+
`;
|
|
726
|
+
}, "getStyles")
|
|
727
|
+
};
|
|
728
|
+
//#endregion
|
|
729
|
+
export { qe as diagram };
|