@aiquants/markdown 5.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +176 -14
- package/dist/{abnfDiagram-VRR7QNED-DeHJ63Vu.js → abnfDiagram-VRR7QNED-0ow9i3L-.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-CfVjEUzG.cjs → abnfDiagram-VRR7QNED-DRNsVB-u.cjs} +1 -1
- package/dist/{arc-XFFLkHkK.cjs → arc-BWR9_qMf.cjs} +1 -1
- package/dist/arc-Bh12k776.js +83 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-CQ1m3MUB.js → architectureDiagram-ZJ3FMSHR-CsFXQcxx.js} +123 -123
- package/dist/{architectureDiagram-ZJ3FMSHR-7xJ6YYGu.cjs → architectureDiagram-ZJ3FMSHR-DtrqDlxV.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-CJOFqwiW.cjs → blockDiagram-677ZJIJ3-CoZEeE0C.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-BPC3se0e.js → blockDiagram-677ZJIJ3-CqQ43viF.js} +166 -166
- package/dist/{c4Diagram-LMCZKHZV-D8ytYGhR.cjs → c4Diagram-LMCZKHZV-DGA2gxp-.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-BEIrp4t6.js → c4Diagram-LMCZKHZV-QPgNg4El.js} +2 -2
- package/dist/{channel-CJQcZr8o.cjs → channel-Jkgg7NV4.cjs} +1 -1
- package/dist/channel-PnA15jK3.js +5 -0
- package/dist/{chunk-2Q5K7J3B-BbMQR3Sm.cjs → chunk-2Q5K7J3B-1iQ5h7FK.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-l8ly7Yjr.js → chunk-2Q5K7J3B-DOWfHP5s.js} +1 -1
- package/dist/{chunk-32BRIVSS-BhQJBlVw.js → chunk-32BRIVSS-94iTIA-u.js} +1 -1
- package/dist/{chunk-32BRIVSS-BwDfmprN.cjs → chunk-32BRIVSS-XUAL4SUU.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-CqDQlS7v.cjs → chunk-5VM5RSS4-CKgpuXOS.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-Bfis-x7E.js → chunk-5VM5RSS4-OANQKmQE.js} +1 -1
- package/dist/{chunk-EX3LRPZG-DUTbzwDM.js → chunk-EX3LRPZG-BQDQ1MdS.js} +50 -50
- package/dist/{chunk-EX3LRPZG-9aDULZwJ.cjs → chunk-EX3LRPZG-BrRRbskW.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-5cM5nFf6.cjs → chunk-JWPE2WC7-Bz9dXsLZ.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-DpcSSOP5.js → chunk-JWPE2WC7-Djg6Qi23.js} +1 -1
- package/dist/{chunk-MOJQB5TN-D_h6bolU.js → chunk-MOJQB5TN-1pZNp2Wl.js} +9 -9
- package/dist/{chunk-MOJQB5TN-Cw864mUL.cjs → chunk-MOJQB5TN-DUk2Jy4_.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-yLvT3c9x.cjs → chunk-PUDLZKDR-CVedetzB.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-B0wZjmzv.js → chunk-PUDLZKDR-G5JYyEiR.js} +22 -22
- package/dist/{chunk-RYQCIY6F-DTKYsCgk.js → chunk-RYQCIY6F-Crmt36sO.js} +6 -6
- package/dist/{chunk-RYQCIY6F-hj9dRWMT.cjs → chunk-RYQCIY6F-D0y50t5B.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-COa9uddv.js → chunk-V7JOEXUC-BNo-X7NC.js} +5 -5
- package/dist/{chunk-V7JOEXUC-DIQ8n1AN.cjs → chunk-V7JOEXUC-DXSQM1ea.cjs} +1 -1
- package/dist/{chunk-VR4S4FIN-B72PxPVm.js → chunk-VR4S4FIN-BGGITgpQ.js} +3 -3
- package/dist/{chunk-VR4S4FIN-Cy-2mZJB.cjs → chunk-VR4S4FIN-Bc567umS.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-DmoUE7-y.cjs → chunk-XXDRQBXY-DOuLpiJ4.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-D2Sgptl-.js → chunk-XXDRQBXY-Drnpl-KK.js} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-Dah4_VL7.js → classDiagram-OUVF2IWQ-Cneye7qT.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-GjsCEuKI.cjs → classDiagram-OUVF2IWQ-mmjBEYmN.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-Dah4_VL7.js → classDiagram-v2-EOCWNBFH-Cneye7qT.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-GjsCEuKI.cjs → classDiagram-v2-EOCWNBFH-mmjBEYmN.cjs} +1 -1
- package/dist/components/MarkdownRenderer.d.ts +5 -2
- package/dist/components/MarkdownViewer.d.ts +3 -2
- package/dist/components/NodesRenderer.d.ts +1 -5
- package/dist/components/embeds/ClientFrame.d.ts +13 -0
- package/dist/components/embeds/LinkCard.d.ts +20 -0
- package/dist/components/embeds/ProviderEmbed.d.ts +11 -0
- package/dist/components/embeds/embedLabels.d.ts +12 -0
- package/dist/components/embeds/frameMessages.d.ts +7 -0
- package/dist/components/embeds/markdownEmbeds.d.ts +2 -0
- package/dist/components/embeds/requestQueue.d.ts +16 -0
- package/dist/components/embeds.d.ts +0 -8
- package/dist/components/htmlSanitizer.d.ts +4 -0
- package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +1 -2
- package/dist/components/rawHtml.d.ts +6 -3
- package/dist/components/viewerLabels.d.ts +3 -1
- package/dist/{cose-bilkent-JH36ORCC-Pi0l3C5o.js → cose-bilkent-JH36ORCC-BQWfGE1G.js} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-Vi9pHFwc.cjs → cose-bilkent-JH36ORCC-BaEdcRlX.cjs} +1 -1
- package/dist/css/zenn-content.css +0 -40
- package/dist/{cynefinDiagram-TSTJHNR4-CIh03JTU.js → cynefinDiagram-TSTJHNR4-CTDDSUz7.js} +47 -47
- package/dist/{cynefinDiagram-TSTJHNR4-BQ2k9Z6b.cjs → cynefinDiagram-TSTJHNR4-DPQl09kC.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-cINcPwV3.js → dagre-VKFMJZFB-BMRdJgZy.js} +27 -27
- package/dist/{dagre-VKFMJZFB-DI2wSrAy.cjs → dagre-VKFMJZFB-DZ4E-Szs.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-BonrBTG_.js → diagram-FQU43EPY-CmEpNw5i.js} +42 -42
- package/dist/{diagram-FQU43EPY-B6iUH2l5.cjs → diagram-FQU43EPY-mK9YHIy1.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-CY6mWS2R.cjs → diagram-G47NLZAW-BX8Lj_uD.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-5N876QQA.js → diagram-G47NLZAW-eJRQFjAg.js} +83 -83
- package/dist/{diagram-NH7WQ7WH-x3SaRfd6.cjs → diagram-NH7WQ7WH-3r1_3TrC.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-LFuTbHxY.js → diagram-NH7WQ7WH-BOOj_4-N.js} +18 -18
- package/dist/{diagram-OA4YK3LP-B9mVw8cB.cjs → diagram-OA4YK3LP-CkDJzLOy.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-Cinpbl0B.js → diagram-OA4YK3LP-DnDIHtcW.js} +61 -61
- package/dist/{diagram-WEI45ONY-HPCHpafe.js → diagram-WEI45ONY-BHpuPTt-.js} +21 -21
- package/dist/{diagram-WEI45ONY-BRYVUhRr.cjs → diagram-WEI45ONY-BpCCo_Ty.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-oLOdtH39.js → ebnfDiagram-CCIWWBDH-BDLB-AVF.js} +5 -5
- package/dist/{ebnfDiagram-CCIWWBDH-DhFlIi0a.cjs → ebnfDiagram-CCIWWBDH-CfdalXdM.cjs} +1 -1
- package/dist/embeds/frames.d.ts +4 -0
- package/dist/embeds/linkCards.d.ts +48 -0
- package/dist/embeds/placeholder.d.ts +15 -0
- package/dist/embeds/providers.d.ts +73 -0
- package/dist/embeds/testing.cjs +1 -0
- package/dist/embeds/testing.d.ts +7 -0
- package/dist/embeds/testing.js +67 -0
- package/dist/embeds.cjs +1 -0
- package/dist/embeds.d.ts +4 -0
- package/dist/embeds.js +73 -0
- package/dist/{erDiagram-Q63AITRT-DCCFR1Ai.cjs → erDiagram-Q63AITRT-CviOyQsx.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-CCtzpK78.js → erDiagram-Q63AITRT-DZlcgZfp.js} +9 -9
- package/dist/{extractHeadings-CGJexznE.js → extractHeadings-CtiYkq2z.js} +5482 -5431
- package/dist/extractHeadings-D1A8WzVy.cjs +311 -0
- package/dist/flowDiagram-23GEKE2U-C_FW0q38.js +7 -0
- package/dist/flowDiagram-23GEKE2U-Cb0U58EU.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-C9RPyo4r.cjs → ganttDiagram-NO4QXBWP-CJa-hKPU.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-Dfi3nINO.js → ganttDiagram-NO4QXBWP-DO0HAbYg.js} +69 -69
- package/dist/{gitGraphDiagram-IHSO6WYX-CjAqPhww.js → gitGraphDiagram-IHSO6WYX-CXStgPQs.js} +38 -38
- package/dist/{gitGraphDiagram-IHSO6WYX-mT3NNT7T.cjs → gitGraphDiagram-IHSO6WYX-CXcPHbkt.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +1 -10
- package/dist/index.client.js +41 -49
- package/dist/index.js +41 -49
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.d.ts +1 -2
- package/dist/index.server.js +593 -191
- package/dist/{infoDiagram-FWYZ7A6U-0Co9BitR.cjs → infoDiagram-FWYZ7A6U-BByoHihL.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-BXWQ9Vy4.js → infoDiagram-FWYZ7A6U-K0__ySEG.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CZp5P1WE.js → ishikawaDiagram-FXEZZL3T-C8QlwQP1.js} +35 -35
- package/dist/{ishikawaDiagram-FXEZZL3T-BKqUBw1i.cjs → ishikawaDiagram-FXEZZL3T-DZOMdeTI.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-DYVTgOOE.js → journeyDiagram-5HDEW3XC-CZ9PFNNN.js} +39 -39
- package/dist/{journeyDiagram-5HDEW3XC-CeumPQ1I.cjs → journeyDiagram-5HDEW3XC-RvC77rKo.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-Cg5KnsE9.cjs → kanban-definition-HUTT4EX6-BL1jihGl.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-CnleRy80.js → kanban-definition-HUTT4EX6-Q12F4vHx.js} +123 -123
- package/dist/{linear-Cf8i6Rsk.js → linear-LWjATjog.js} +32 -32
- package/dist/{linear-qqwu6T0F.cjs → linear-lDvPoqlB.cjs} +1 -1
- package/dist/linkCardServer/addressGuard.server.d.ts +25 -0
- package/dist/linkCardServer/htmlEncoding.server.d.ts +6 -0
- package/dist/linkCardServer/linkCardHandler.server.d.ts +7 -0
- package/dist/linkCardServer/metadataCache.server.d.ts +5 -0
- package/dist/linkCardServer/pageFetch.server.d.ts +37 -0
- package/dist/linkCardServer/pageMetadata.server.d.ts +11 -0
- package/dist/linkCards-1JxY8wdm.js +48 -0
- package/dist/linkCards-Bjd_vW39.cjs +1 -0
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-lBin9VOm.js → mindmap-definition-LN4V7U3C-CM1XvwJX.js} +33 -33
- package/dist/{mindmap-definition-LN4V7U3C-DfFWeFph.cjs → mindmap-definition-LN4V7U3C-TVYKONRm.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-BiD21lOj.js → pegDiagram-2B236MQR-Dlrnikqd.js} +5 -5
- package/dist/{pegDiagram-2B236MQR-Cf1f-3yi.cjs → pegDiagram-2B236MQR-a9Up0ERY.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-jwhVsZgX.cjs → pieDiagram-ENE6RG2P-ClakmSma.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-BqZb6gaV.js → pieDiagram-ENE6RG2P-WYrEJp8U.js} +58 -58
- package/dist/providers-Bxr2Wb-j.cjs +1 -0
- package/dist/providers-Drq7MT_K.js +209 -0
- package/dist/{quadrantDiagram-ABIIQ3AL-CNe9fRLO.js → quadrantDiagram-ABIIQ3AL-BkgMVDaX.js} +48 -48
- package/dist/{quadrantDiagram-ABIIQ3AL-sO_sIA7b.cjs → quadrantDiagram-ABIIQ3AL-Cb01YcqR.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-Dkc8k3e9.cjs → railroadDiagram-RFXS5EU6-Bob4WSMz.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-53YTkJrs.js → railroadDiagram-RFXS5EU6-RfCtZGUR.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-C0GMlJO4.cjs → requirementDiagram-TGXJPOKE-BP5h9mCj.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-D8Gz7jzA.js → requirementDiagram-TGXJPOKE-C1yJPMp1.js} +3 -3
- package/dist/{sankeyDiagram-HTMAVEWB-CEC0GaCg.js → sankeyDiagram-HTMAVEWB-D5G9Dcmr.js} +67 -67
- package/dist/{sankeyDiagram-HTMAVEWB-Bw9J2Ay2.cjs → sankeyDiagram-HTMAVEWB-shq9WK4t.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-CKb4m3I0.js → sequenceDiagram-DBY2YBRQ-8EJMQxiB.js} +47 -47
- package/dist/{sequenceDiagram-DBY2YBRQ-BuqPCreB.cjs → sequenceDiagram-DBY2YBRQ-BRxcK5-5.cjs} +1 -1
- package/dist/{simple-logger-DZxBpX7v.cjs → simple-logger-9yf7ypyB.cjs} +1 -1
- package/dist/{simple-logger-i94ikRyH.js → simple-logger-DwH1YQvq.js} +3 -1
- package/dist/{sizeCapture-X5ZJPWSS-Dm3rsxXw.cjs → sizeCapture-X5ZJPWSS-BtBRJO2R.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-CotnTNAA.js → sizeCapture-X5ZJPWSS-DJG85IuR.js} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-GWEIP-C9.js → stateDiagram-2N3HPSRC-CAd-NU-f.js} +22 -22
- package/dist/{stateDiagram-2N3HPSRC-5Y-OlePe.cjs → stateDiagram-2N3HPSRC-Czgkv_ey.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-v77D3Qyf.cjs → stateDiagram-v2-6OUMAXLB-BNP5Lx0Y.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-BZFV8swJ.js → stateDiagram-v2-6OUMAXLB-x_Zps-d5.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-B1hLl8Ph.cjs → swimlanes-5IMT3BWC-CfdkDd3q.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-DujAOwAt.js → swimlanes-5IMT3BWC-D8brzzxb.js} +313 -313
- package/dist/{swimlanesDiagram-G3AALYLV-B-5z3jDg.js → swimlanesDiagram-G3AALYLV-Bc9-lR2e.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-Cklgsxbg.cjs → swimlanesDiagram-G3AALYLV-dvJpSdGV.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-B2m-aQLI.cjs → timeline-definition-FHXFAJF6-BSqACati.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-Fmzt_lvR.js → timeline-definition-FHXFAJF6-CKW3NJOF.js} +34 -34
- package/dist/utils/simple-logger.d.ts +1 -0
- package/dist/{vennDiagram-L72KCM5P-rL7UDYbl.cjs → vennDiagram-L72KCM5P-ChKxsFyJ.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-zIXK42Cx.js → vennDiagram-L72KCM5P-vPmq984y.js} +92 -92
- package/dist/{wardleyDiagram-EHGQE667-pTeeZ0uM.js → wardleyDiagram-EHGQE667-CwN9zwBX.js} +11 -11
- package/dist/{wardleyDiagram-EHGQE667-CNLieFen.cjs → wardleyDiagram-EHGQE667-CxzlR7km.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-B6UdSSVZ.js → xychartDiagram-FW5EYKEG-DBSKTLuc.js} +37 -37
- package/dist/{xychartDiagram-FW5EYKEG-CD5ik4HK.cjs → xychartDiagram-FW5EYKEG-wJqYRInm.cjs} +1 -1
- package/package.json +25 -9
- package/dist/arc-DH6k2JIR.js +0 -83
- package/dist/channel-DoH_tsOQ.js +0 -5
- package/dist/components/mdastNodes/BlockLinkNode.d.ts +0 -5
- package/dist/components/mdastNodes/RichLinkCard.d.ts +0 -8
- package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +0 -25
- package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +0 -6
- package/dist/extractHeadings-lDHB2sBb.cjs +0 -310
- package/dist/flowDiagram-23GEKE2U-ORytlvmX.js +0 -7
- package/dist/flowDiagram-23GEKE2U-h2WZTCCn.cjs +0 -1
- package/dist/plugins/createIntentTweetLink.d.ts +0 -10
- package/dist/plugins/extractYouTubeVideoId.d.ts +0 -5
- package/dist/plugins/fetchSiteMetadata.d.ts +0 -9
- package/dist/plugins/remark-auto-heading-id.d.ts +0 -2
- package/dist/plugins/remark-block-link-metadata.d.ts +0 -23
- package/dist/plugins/remark-block-link.d.ts +0 -12
- package/dist/plugins/remark-twitter-embed.d.ts +0 -20
- package/dist/plugins/remark-youtube-embed.d.ts +0 -14
- package/dist/utils/getFaviconUrl.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as le } from "./chunk-2Q5K7J3B-
|
|
2
|
-
import { p as he } from "./chunk-JWPE2WC7-
|
|
3
|
-
import {
|
|
1
|
+
import { I as le } from "./chunk-2Q5K7J3B-DOWfHP5s.js";
|
|
2
|
+
import { p as he } from "./chunk-JWPE2WC7-Djg6Qi23.js";
|
|
3
|
+
import { a6 as $e, a5 as fe, y as ge, z as ue, A as ye, G as xe, _ as h, af as J, O as w, K as me, J as q, a4 as pe, ag as be, ab as we, Y as B, ah as ke, ai as ve, aj as Ce } from "./extractHeadings-CtiYkq2z.js";
|
|
4
4
|
import { p as Ee } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
var m = {
|
|
6
6
|
NORMAL: 0,
|
|
@@ -10,7 +10,7 @@ var m = {
|
|
|
10
10
|
CHERRY_PICK: 4
|
|
11
11
|
}, Be = ve.gitGraph, S = /* @__PURE__ */ h(() => ke({
|
|
12
12
|
...Be,
|
|
13
|
-
...
|
|
13
|
+
...J().gitGraph
|
|
14
14
|
}), "getConfig"), d = new le(() => {
|
|
15
15
|
const e = S(), r = e.mainBranchName, t = e.mainBranchOrder;
|
|
16
16
|
return {
|
|
@@ -243,7 +243,7 @@ function V(e, r, t) {
|
|
|
243
243
|
s === -1 ? e.push(t) : e.splice(s, 1, t);
|
|
244
244
|
}
|
|
245
245
|
h(V, "upsert");
|
|
246
|
-
function
|
|
246
|
+
function Q(e) {
|
|
247
247
|
const r = e.reduce((o, i) => o.seq > i.seq ? o : i, e[0]);
|
|
248
248
|
let t = "";
|
|
249
249
|
e.forEach(function(o) {
|
|
@@ -263,13 +263,13 @@ function J(e) {
|
|
|
263
263
|
V(e, r, o);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
e = te(e, (o) => o.id),
|
|
266
|
+
e = te(e, (o) => o.id), Q(e);
|
|
267
267
|
}
|
|
268
|
-
h(
|
|
268
|
+
h(Q, "prettyPrintCommitHistory");
|
|
269
269
|
var Ge = /* @__PURE__ */ h(function() {
|
|
270
270
|
w.debug(d.records.commits);
|
|
271
271
|
const e = ne()[0];
|
|
272
|
-
|
|
272
|
+
Q([e]);
|
|
273
273
|
}, "prettyPrint"), He = /* @__PURE__ */ h(function() {
|
|
274
274
|
d.reset(), we();
|
|
275
275
|
}, "clear"), Se = /* @__PURE__ */ h(function() {
|
|
@@ -286,11 +286,11 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
286
286
|
return e.forEach(function(r) {
|
|
287
287
|
w.debug(r.id);
|
|
288
288
|
}), e.sort((r, t) => r.seq - t.seq), e;
|
|
289
|
-
}, "getCommitsArray"),
|
|
289
|
+
}, "getCommitsArray"), Pe = /* @__PURE__ */ h(function() {
|
|
290
290
|
return d.records.currBranch;
|
|
291
|
-
}, "getCurrentBranch"),
|
|
291
|
+
}, "getCurrentBranch"), We = /* @__PURE__ */ h(function() {
|
|
292
292
|
return d.records.direction;
|
|
293
|
-
}, "getDirection"),
|
|
293
|
+
}, "getDirection"), qe = /* @__PURE__ */ h(function() {
|
|
294
294
|
return d.records.head;
|
|
295
295
|
}, "getHead"), se = {
|
|
296
296
|
commitType: m,
|
|
@@ -310,9 +310,9 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
310
310
|
getBranches: Ae,
|
|
311
311
|
getCommits: De,
|
|
312
312
|
getCommitsArray: ne,
|
|
313
|
-
getCurrentBranch:
|
|
314
|
-
getDirection:
|
|
315
|
-
getHead:
|
|
313
|
+
getCurrentBranch: Pe,
|
|
314
|
+
getDirection: We,
|
|
315
|
+
getHead: qe,
|
|
316
316
|
setAccTitle: xe,
|
|
317
317
|
getAccTitle: ye,
|
|
318
318
|
getAccDescription: ue,
|
|
@@ -328,8 +328,8 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
328
328
|
Commit: /* @__PURE__ */ h((o) => r.commit(ze(o)), "Commit"),
|
|
329
329
|
Branch: /* @__PURE__ */ h((o) => r.branch(Ye(o)), "Branch"),
|
|
330
330
|
Merge: /* @__PURE__ */ h((o) => r.merge(je(o)), "Merge"),
|
|
331
|
-
Checkout: /* @__PURE__ */ h((o) => r.checkout(
|
|
332
|
-
CherryPicking: /* @__PURE__ */ h((o) => r.cherryPick(
|
|
331
|
+
Checkout: /* @__PURE__ */ h((o) => r.checkout(Ke(o)), "Checkout"),
|
|
332
|
+
CherryPicking: /* @__PURE__ */ h((o) => r.cherryPick(Ue(o)), "CherryPicking")
|
|
333
333
|
}[e.$type];
|
|
334
334
|
s ? s(e) : w.error(`Unknown statement type: ${e.$type}`);
|
|
335
335
|
}, "parseStatement"), ze = /* @__PURE__ */ h((e) => ({
|
|
@@ -345,7 +345,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
345
345
|
id: e.id ?? "",
|
|
346
346
|
type: e.type !== void 0 ? m[e.type] : void 0,
|
|
347
347
|
tags: e.tags ?? void 0
|
|
348
|
-
}), "parseMerge"),
|
|
348
|
+
}), "parseMerge"), Ke = /* @__PURE__ */ h((e) => e.branch, "parseCheckout"), Ue = /* @__PURE__ */ h((e) => ({
|
|
349
349
|
id: e.id,
|
|
350
350
|
targetId: "",
|
|
351
351
|
tags: e.tags?.length === 0 ? void 0 : e.tags,
|
|
@@ -355,8 +355,8 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
355
355
|
const r = await Ee("gitGraph", e);
|
|
356
356
|
w.debug(r), Ne(r, se);
|
|
357
357
|
}, "parse")
|
|
358
|
-
}, O = 10, _ = 40, L = 4, R = 2, G = 8, j = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]), X = 12, Z = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Xe = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]), H = /* @__PURE__ */ h((e, r, t = !1) => t && e > 0 ? (e - 1) % (r - 1) + 1 : e % r, "calcColorIndex"), C = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), F = 30,
|
|
359
|
-
C.clear(), E.clear(),
|
|
358
|
+
}, O = 10, _ = 40, L = 4, R = 2, G = 8, j = /* @__PURE__ */ new Set(["redux", "redux-dark", "redux-color", "redux-dark-color"]), X = 12, Z = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Xe = /* @__PURE__ */ new Set(["dark", "redux-dark", "redux-dark-color", "neo-dark"]), H = /* @__PURE__ */ h((e, r, t = !1) => t && e > 0 ? (e - 1) % (r - 1) + 1 : e % r, "calcColorIndex"), C = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), F = 30, P = /* @__PURE__ */ new Map(), z = [], I = 0, y = "LR", Je = /* @__PURE__ */ h(() => {
|
|
359
|
+
C.clear(), E.clear(), P.clear(), I = 0, z = [], y = "LR";
|
|
360
360
|
}, "clear"), oe = /* @__PURE__ */ h((e) => {
|
|
361
361
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
362
362
|
return (typeof e == "string" ? e.split(/\\n|\n|<br\s*\/?>/gi) : e).forEach((s) => {
|
|
@@ -369,7 +369,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
369
369
|
const i = y === "TB" || y == "BT" ? E.get(o)?.y : E.get(o)?.x;
|
|
370
370
|
i !== void 0 && t(i, s) && (r = o, s = i);
|
|
371
371
|
}), r;
|
|
372
|
-
}, "findClosestParent"),
|
|
372
|
+
}, "findClosestParent"), Qe = /* @__PURE__ */ h((e) => {
|
|
373
373
|
let r = "", t = 1 / 0;
|
|
374
374
|
return e.forEach((s) => {
|
|
375
375
|
const o = E.get(s).y;
|
|
@@ -388,7 +388,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
388
388
|
}), e.forEach((n) => {
|
|
389
389
|
const a = r.get(n);
|
|
390
390
|
if (a?.parents.length) {
|
|
391
|
-
const l =
|
|
391
|
+
const l = Qe(a.parents);
|
|
392
392
|
s = E.get(l).y - _, s <= o && (o = s);
|
|
393
393
|
const f = C.get(a.branch).pos, g = s - O;
|
|
394
394
|
E.set(a.id, { x: f, y: g });
|
|
@@ -415,7 +415,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
415
415
|
const o = r + t, i = s.pos;
|
|
416
416
|
E.set(e.id, { x: i, y: o });
|
|
417
417
|
}, "setRootPosition"), nr = /* @__PURE__ */ h((e, r, t, s, o, i) => {
|
|
418
|
-
const { theme: n } =
|
|
418
|
+
const { theme: n } = q(), a = j.has(n ?? ""), l = Z.has(n ?? ""), f = Xe.has(n ?? "");
|
|
419
419
|
if (i === m.HIGHLIGHT)
|
|
420
420
|
e.append("rect").attr("x", t.x - 10 + (a ? 3 : 0)).attr("y", t.y - 10 + (a ? 3 : 0)).attr("width", a ? 14 : 20).attr("height", a ? 14 : 20).attr(
|
|
421
421
|
"class",
|
|
@@ -540,7 +540,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
540
540
|
const s = y === "BT" && t ? r : r + O, o = C.get(e.branch)?.pos, i = y === "TB" || y === "BT" ? C.get(e.branch)?.pos : s;
|
|
541
541
|
if (i === void 0 || o === void 0)
|
|
542
542
|
throw new Error(`Position were undefined for commit ${e.id}`);
|
|
543
|
-
const n = j.has(
|
|
543
|
+
const n = j.has(q().theme ?? ""), a = y === "TB" || y === "BT" ? s : o + (n ? X / 2 + 1 : -2);
|
|
544
544
|
return { x: i, y: a, posWithOffset: s };
|
|
545
545
|
}, "getCommitPosition"), re = /* @__PURE__ */ h((e, r, t, s) => {
|
|
546
546
|
const o = e.append("g").attr("class", "commit-bullets"), i = e.append("g").attr("class", "commit-labels");
|
|
@@ -565,16 +565,16 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
565
565
|
}, "drawCommits"), lr = /* @__PURE__ */ h((e, r, t, s, o) => {
|
|
566
566
|
const n = (y === "TB" || y === "BT" ? t.x < s.x : t.y < s.y) ? r.branch : e.branch, a = /* @__PURE__ */ h((f) => f.branch === n, "isOnBranchToGetCurve"), l = /* @__PURE__ */ h((f) => f.seq > e.seq && f.seq < r.seq, "isBetweenCommits");
|
|
567
567
|
return [...o.values()].some((f) => l(f) && a(f));
|
|
568
|
-
}, "shouldRerouteArrow"),
|
|
568
|
+
}, "shouldRerouteArrow"), W = /* @__PURE__ */ h((e, r, t = 0) => {
|
|
569
569
|
const s = e + Math.abs(e - r) / 2;
|
|
570
570
|
if (t > 5)
|
|
571
571
|
return s;
|
|
572
572
|
if (z.every((n) => Math.abs(n - s) >= 10))
|
|
573
573
|
return z.push(s), s;
|
|
574
574
|
const i = Math.abs(e - r);
|
|
575
|
-
return
|
|
575
|
+
return W(e, r - i / 5, t + 1);
|
|
576
576
|
}, "findLane"), hr = /* @__PURE__ */ h((e, r, t, s) => {
|
|
577
|
-
const { theme: o } =
|
|
577
|
+
const { theme: o } = q(), i = Z.has(o ?? ""), n = E.get(r.id), a = E.get(t.id);
|
|
578
578
|
if (n === void 0 || a === void 0)
|
|
579
579
|
throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);
|
|
580
580
|
const l = lr(r, t, n, a, s);
|
|
@@ -583,7 +583,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
583
583
|
let u;
|
|
584
584
|
if (l) {
|
|
585
585
|
f = "A 10 10, 0, 0, 0,", g = "A 10 10, 0, 0, 1,", $ = 10, c = 10;
|
|
586
|
-
const p = n.y < a.y ?
|
|
586
|
+
const p = n.y < a.y ? W(n.y, a.y) : W(a.y, n.y), b = n.x < a.x ? W(n.x, a.x) : W(a.x, n.x);
|
|
587
587
|
y === "TB" ? n.x < a.x ? u = `M ${n.x} ${n.y} L ${b - $} ${n.y} ${g} ${b} ${n.y + c} L ${b} ${a.y - $} ${f} ${b + c} ${a.y} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${b + $} ${n.y} ${f} ${b} ${n.y + c} L ${b} ${a.y - $} ${g} ${b - c} ${a.y} L ${a.x} ${a.y}`) : y === "BT" ? n.x < a.x ? u = `M ${n.x} ${n.y} L ${b - $} ${n.y} ${f} ${b} ${n.y - c} L ${b} ${a.y + $} ${g} ${b + c} ${a.y} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${b + $} ${n.y} ${g} ${b} ${n.y - c} L ${b} ${a.y + $} ${f} ${b - c} ${a.y} L ${a.x} ${a.y}`) : n.y < a.y ? u = `M ${n.x} ${n.y} L ${n.x} ${p - $} ${f} ${n.x + c} ${p} L ${a.x - $} ${p} ${g} ${a.x} ${p + c} L ${a.x} ${a.y}` : (x = C.get(r.branch)?.index, u = `M ${n.x} ${n.y} L ${n.x} ${p + $} ${g} ${n.x + c} ${p} L ${a.x - $} ${p} ${f} ${a.x} ${p - c} L ${a.x} ${a.y}`);
|
|
588
588
|
} else
|
|
589
589
|
f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, y === "TB" ? (n.x < a.x && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${f} ${n.x + c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${g} ${a.x} ${n.y + c} L ${a.x} ${a.y}`), n.x > a.x && (f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${g} ${n.x - c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x + $} ${n.y} ${f} ${a.x} ${n.y + c} L ${a.x} ${a.y}`), n.x === a.x && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`)) : y === "BT" ? (n.x < a.x && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${g} ${n.x + c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${f} ${a.x} ${n.y - c} L ${a.x} ${a.y}`), n.x > a.x && (f = "A 20 20, 0, 0, 0,", g = "A 20 20, 0, 0, 1,", $ = 20, c = 20, t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${f} ${n.x - c} ${a.y} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${a.x + $} ${n.y} ${g} ${a.x} ${n.y - c} L ${a.x} ${a.y}`), n.x === a.x && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`)) : (n.y < a.y && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${g} ${a.x} ${n.y + c} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${n.x} ${a.y - $} ${f} ${n.x + c} ${a.y} L ${a.x} ${a.y}`), n.y > a.y && (t.type === m.MERGE && r.id !== t.parents[0] ? u = `M ${n.x} ${n.y} L ${a.x - $} ${n.y} ${f} ${a.x} ${n.y - c} L ${a.x} ${a.y}` : u = `M ${n.x} ${n.y} L ${n.x} ${a.y + $} ${g} ${n.x + c} ${a.y} L ${a.x} ${a.y}`), n.y === a.y && (u = `M ${n.x} ${n.y} L ${a.x} ${a.y}`));
|
|
@@ -602,7 +602,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
602
602
|
});
|
|
603
603
|
});
|
|
604
604
|
}, "drawArrows"), fr = /* @__PURE__ */ h((e, r, t, s) => {
|
|
605
|
-
const { look: o, theme: i, themeVariables: n } =
|
|
605
|
+
const { look: o, theme: i, themeVariables: n } = q(), { dropShadow: a, THEME_COLOR_LIMIT: l } = n, f = j.has(i ?? ""), g = Z.has(i ?? ""), $ = e.append("g");
|
|
606
606
|
r.forEach((c, x) => {
|
|
607
607
|
const u = H(
|
|
608
608
|
x,
|
|
@@ -613,7 +613,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
613
613
|
throw new Error(`Position not found for branch ${c.name}`);
|
|
614
614
|
const b = y === "TB" || y === "BT" ? p : f ? p + X / 2 + 1 : p - 2, k = $.append("line");
|
|
615
615
|
k.attr("x1", 0), k.attr("y1", b), k.attr("x2", I), k.attr("y2", b), k.attr("class", "branch branch" + u), y === "TB" ? (k.attr("y1", F), k.attr("x1", p), k.attr("y2", I), k.attr("x2", p)) : y === "BT" && (k.attr("y1", I), k.attr("x1", p), k.attr("y2", F), k.attr("x2", p)), z.push(b);
|
|
616
|
-
const
|
|
616
|
+
const K = c.name, D = oe(K), T = $.insert("rect"), M = $.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + u);
|
|
617
617
|
M.node().appendChild(D);
|
|
618
618
|
const v = D.getBBox(), ee = f ? 0 : 4, N = f ? 16 : 0, A = f ? X : 0;
|
|
619
619
|
o === "neo" && T.attr("data-look", "neo"), T.attr("class", "branchLabelBkg label" + u).attr(
|
|
@@ -633,7 +633,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
633
633
|
}, "drawBranches"), gr = /* @__PURE__ */ h(function(e, r, t, s, o) {
|
|
634
634
|
return C.set(e, { pos: r, index: t }), r += 50 + (o ? 40 : 0) + (y === "TB" || y === "BT" ? s.width / 2 : 0), r;
|
|
635
635
|
}, "setBranchPosition"), ur = /* @__PURE__ */ h(function(e, r, t, s) {
|
|
636
|
-
|
|
636
|
+
Je(), w.debug("in gitgraph renderer", e + `
|
|
637
637
|
`, "id:", r, t);
|
|
638
638
|
const o = s.db;
|
|
639
639
|
if (!o.getConfig) {
|
|
@@ -641,22 +641,22 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
643
|
const i = o.getConfig(), n = i.rotateCommitLabel ?? !1;
|
|
644
|
-
|
|
644
|
+
P = o.getCommits();
|
|
645
645
|
const a = o.getBranchesAsObjArray();
|
|
646
646
|
y = o.getDirection();
|
|
647
|
-
const l = me(`[id="${r}"]`), { look: f, theme: g, themeVariables: $ } =
|
|
647
|
+
const l = me(`[id="${r}"]`), { look: f, theme: g, themeVariables: $ } = q(), { useGradient: c, gradientStart: x, gradientStop: u, filterColor: p } = $;
|
|
648
648
|
if (c) {
|
|
649
649
|
const k = l.append("defs").append("linearGradient").attr("id", r + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
|
|
650
650
|
k.append("stop").attr("offset", "0%").attr("stop-color", x).attr("stop-opacity", 1), k.append("stop").attr("offset", "100%").attr("stop-color", u).attr("stop-opacity", 1);
|
|
651
651
|
}
|
|
652
652
|
f === "neo" && j.has(g ?? "") && l.append("defs").append("filter").attr("id", r + "-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", p);
|
|
653
653
|
let b = 0;
|
|
654
|
-
a.forEach((k,
|
|
655
|
-
const D = oe(k.name), T = l.append("g"),
|
|
654
|
+
a.forEach((k, K) => {
|
|
655
|
+
const D = oe(k.name), T = l.append("g"), U = T.insert("g").attr("class", "branchLabel"), M = U.insert("g").attr("class", "label branch-label");
|
|
656
656
|
M.node()?.appendChild(D);
|
|
657
657
|
const v = D.getBBox();
|
|
658
|
-
b = gr(k.name, b,
|
|
659
|
-
}), re(l,
|
|
658
|
+
b = gr(k.name, b, K, v, n), M.remove(), U.remove(), T.remove();
|
|
659
|
+
}), re(l, P, !1, i), i.showBranches && fr(l, a, i, r), $r(l, P), re(l, P, !0, i), pe.insertTitle(
|
|
660
660
|
l,
|
|
661
661
|
"gitTitleText",
|
|
662
662
|
i.titleTopMargin ?? 0,
|
|
@@ -681,7 +681,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
681
681
|
`;
|
|
682
682
|
return t;
|
|
683
683
|
}, "genGitGraphGradient"), kr = /* @__PURE__ */ h((e) => {
|
|
684
|
-
const r =
|
|
684
|
+
const r = J(), { theme: t, themeVariables: s } = r, { borderColorArray: o } = s, i = de.has(t);
|
|
685
685
|
if (mr.has(t)) {
|
|
686
686
|
let n = "";
|
|
687
687
|
for (let a = 0; a < e.THEME_COLOR_LIMIT; a++)
|
|
@@ -752,7 +752,7 @@ var Ge = /* @__PURE__ */ h(function() {
|
|
|
752
752
|
`;
|
|
753
753
|
}).join(`
|
|
754
754
|
`)}`, "normalTheme"), Cr = /* @__PURE__ */ h((e) => {
|
|
755
|
-
const r =
|
|
755
|
+
const r = J(), { theme: t } = r, s = br.has(t);
|
|
756
756
|
return `
|
|
757
757
|
.commit-id,
|
|
758
758
|
.commit-msg,
|
package/dist/{gitGraphDiagram-IHSO6WYX-mT3NNT7T.cjs → gitGraphDiagram-IHSO6WYX-CXcPHbkt.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("./chunk-2Q5K7J3B-BbMQR3Sm.cjs"),ce=require("./chunk-JWPE2WC7-5cM5nFf6.cjs"),c=require("./extractHeadings-lDHB2sBb.cjs"),ie=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},de=c.defaultConfig_default.gitGraph,G=c.__name(()=>c.cleanAndMerge({...de,...c.getConfig().gitGraph}),"getConfig"),l=new se.ImperativeState(()=>{const e=G(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function N(){return c.random({length:7})}c.__name(N,"getID");function Q(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}c.__name(Q,"uniqBy");var le=c.__name(function(e){l.records.direction=e},"setDirection"),he=c.__name(function(e){c.log.debug("options str",e),e=e?.trim(),e=e||"{}";try{l.records.options=JSON.parse(e)}catch(r){c.log.error("error while parsing gitGraph options",r.message)}},"setOptions"),$e=c.__name(function(){return l.records.options},"getOptions"),ge=c.__name(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;c.log.info("commit",r,t,o,s),c.log.debug("Entering commit:",r,t,o,s);const d=G();t=c.common_default.sanitizeText(t,d),r=c.common_default.sanitizeText(r,d),s=s?.map(a=>c.common_default.sanitizeText(a,d));const n={id:t||l.records.seq+"-"+N(),message:r,seq:l.records.seq++,type:o??x.NORMAL,tags:s??[],parents:l.records.head==null?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=n,c.log.info("main branch",d.mainBranchName),l.records.commits.has(n.id)&&c.log.warn(`Commit ID ${n.id} already exists`),l.records.commits.set(n.id,n),l.records.branches.set(l.records.currBranch,n.id),c.log.debug("in pushCommit "+n.id)},"commit"),fe=c.__name(function(e){let r=e.name;const t=e.order;if(r=c.common_default.sanitizeText(r,G()),l.records.branches.has(r))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 ${r}")`);l.records.branches.set(r,l.records.head!=null?l.records.head.id:null),l.records.branchConfig.set(r,{name:r,order:t}),Z(r),c.log.debug("in createBranch")},"branch"),me=c.__name(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=G();r=c.common_default.sanitizeText(r,d),t&&(t=c.common_default.sanitizeText(t,d));const n=l.records.branches.get(l.records.currBranch),a=l.records.branches.get(r),h=n?l.records.commits.get(n):void 0,g=a?l.records.commits.get(a):void 0;if(h&&g&&h.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(h===void 0||!h){const i=new Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!l.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(g===void 0||!g){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(h===g){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(t&&l.records.commits.has(t)){const i=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${t} ${o} ${s?.join(" ")}`,token:`merge ${r} ${t} ${o} ${s?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s?.join(" ")}`]},i}const f=a||"",$={id:t||`${l.records.seq}-${N()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,f],branch:l.records.currBranch,type:x.MERGE,customType:o,customId:!!t,tags:s??[]};l.records.head=$,l.records.commits.set($.id,$),l.records.branches.set(l.records.currBranch,$.id),c.log.debug(l.records.branches),c.log.debug("in mergeBranch")},"merge"),ue=c.__name(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;c.log.debug("Entering cherryPick:",r,t,o);const d=G();if(r=c.common_default.sanitizeText(r,d),t=c.common_default.sanitizeText(t,d),o=o?.map(h=>c.common_default.sanitizeText(h,d)),s=c.common_default.sanitizeText(s,d),!r||!l.records.commits.has(r)){const h=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw h.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},h}const n=l.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===x.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!l.records.commits.has(t)){if(a===l.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const h=l.records.branches.get(l.records.currBranch);if(h===void 0||!h){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g=l.records.commits.get(h);if(g===void 0||!g){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f={id:l.records.seq+"-"+N(),message:`cherry-picked ${n?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,n.id],branch:l.records.currBranch,type:x.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===x.MERGE?`|parent:${s}`:""}`]};l.records.head=f,l.records.commits.set(f.id,f),l.records.branches.set(l.records.currBranch,f.id),c.log.debug(l.records.branches),c.log.debug("in cherryPick")}},"cherryPick"),Z=c.__name(function(e){if(e=c.common_default.sanitizeText(e,G()),l.records.branches.has(e)){l.records.currBranch=e;const r=l.records.branches.get(l.records.currBranch);r===void 0||!r?l.records.head=null:l.records.head=l.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function j(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}c.__name(j,"upsert");function U(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in l.records.branches)l.records.branches.get(s)===r.id&&o.push(s);if(c.log.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=l.records.commits.get(r.parents[0]);j(e,r,s),r.parents[1]&&e.push(l.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=l.records.commits.get(r.parents[0]);j(e,r,s)}}e=Q(e,s=>s.id),U(e)}c.__name(U,"prettyPrintCommitHistory");var ye=c.__name(function(){c.log.debug(l.records.commits);const e=ee()[0];U([e])},"prettyPrint"),xe=c.__name(function(){l.reset(),c.clear()},"clear"),pe=c.__name(function(){return[...l.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),be=c.__name(function(){return l.records.branches},"getBranches"),_e=c.__name(function(){return l.records.commits},"getCommits"),ee=c.__name(function(){const e=[...l.records.commits.values()];return e.forEach(function(r){c.log.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),we=c.__name(function(){return l.records.currBranch},"getCurrentBranch"),ke=c.__name(function(){return l.records.direction},"getDirection"),Ce=c.__name(function(){return l.records.head},"getHead"),re={commitType:x,getConfig:G,setDirection:le,setOptions:he,getOptions:$e,commit:ge,branch:fe,merge:me,cherryPick:ue,checkout:Z,prettyPrint:ye,clear:xe,getBranchesAsObjArray:pe,getBranches:be,getCommits:_e,getCommitsArray:ee,getCurrentBranch:we,getDirection:ke,getHead:Ce,setAccTitle:c.setAccTitle,getAccTitle:c.getAccTitle,getAccDescription:c.getAccDescription,setAccDescription:c.setAccDescription,setDiagramTitle:c.setDiagramTitle,getDiagramTitle:c.getDiagramTitle},ve=c.__name((e,r)=>{ce.populateCommonDb(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Ee(t,r)},"populate"),Ee=c.__name((e,r)=>{const o={Commit:c.__name(s=>r.commit(Be(s)),"Commit"),Branch:c.__name(s=>r.branch(Te(s)),"Branch"),Merge:c.__name(s=>r.merge(Le(s)),"Merge"),Checkout:c.__name(s=>r.checkout(Me(s)),"Checkout"),CherryPicking:c.__name(s=>r.cherryPick(Re(s)),"CherryPicking")}[e.$type];o?o(e):c.log.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Be=c.__name(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?x[e.type]:x.NORMAL,tags:e.tags??void 0}),"parseCommit"),Te=c.__name(e=>({name:e.name,order:e.order??0}),"parseBranch"),Le=c.__name(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?x[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Me=c.__name(e=>e.branch,"parseCheckout"),Re=c.__name(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ie={parse:c.__name(async e=>{const r=await ie.parse("gitGraph",e);c.log.debug(r),ve(r,re)},"parse")},M=10,R=40,E=4,T=2,I=8,F=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),K=12,V=new Set(["redux-color","redux-dark-color"]),Oe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),O=c.__name((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),k=new Map,C=new Map,W=30,A=new Map,P=[],L=0,u="LR",Ge=c.__name(()=>{k.clear(),C.clear(),A.clear(),L=0,P=[],u="LR"},"clear"),te=c.__name(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ae=c.__name(e=>{let r,t,o;return u==="BT"?(t=c.__name((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=c.__name((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{const d=u==="TB"||u=="BT"?C.get(s)?.y:C.get(s)?.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),He=c.__name(e=>{let r="",t=1/0;return e.forEach(o=>{const s=C.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),Se=c.__name((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=De(a),s=Math.max(o,s)):d.push(a),qe(a,o)}),o=s,d.forEach(n=>{We(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const h=He(a.parents);o=C.get(h).y-R,o<=s&&(s=o);const g=k.get(a.branch).pos,f=o-M;C.set(a.id,{x:g,y:f})}})},"setParallelBTPos"),Ae=c.__name(e=>{const r=ae(e.parents.filter(o=>o!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=C.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),De=c.__name(e=>Ae(e)+R,"calculateCommitPosition"),qe=c.__name((e,r)=>{const t=k.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+M;return C.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),We=c.__name((e,r,t)=>{const o=k.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;C.set(e.id,{x:d,y:s})},"setRootPosition"),Pe=c.__name((e,r,t,o,s,d)=>{const{theme:n}=c.getConfig2(),a=F.has(n??""),h=V.has(n??""),g=Oe.has(n??"");if(d===x.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${O(s,I,h)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${O(s,I,h)} ${o}-inner`);else if(d===x.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const f=e.append("circle");if(f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?7:10),f.attr("class",`commit ${r.id} commit${O(s,I,h)}`),d===x.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${o} ${r.id} commit${O(s,I,h)}`)}if(d===x.REVERSE){const $=e.append("path"),i=a?4:5;$.attr("d",`M ${t.x-i},${t.y-i}L${t.x+i},${t.y+i}M${t.x-i},${t.y+i}L${t.x+i},${t.y-i}`).attr("class",`commit ${o} ${r.id} commit${O(s,I,h)}`)}}},"drawCommitBullet"),Ne=c.__name((e,r,t,o,s)=>{if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&s.showCommitLabel){const d=e.append("g"),n=d.insert("rect").attr("class","commit-label-bkg"),a=d.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=a.node()?.getBBox();if(h&&(n.attr("x",t.posWithOffset-h.width/2-T).attr("y",t.y+13.5).attr("width",h.width+2*T).attr("height",h.height+2*T),u==="TB"||u==="BT"?(n.attr("x",t.x-(h.width+4*E+5)).attr("y",t.y-12),a.attr("x",t.x-(h.width+4*E)).attr("y",t.y+h.height-12)):a.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(u==="TB"||u==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;d.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),Fe=c.__name((e,r,t,o)=>{if(r.tags.length>0){let s=0,d=0,n=0;const a=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),$=e.append("text").attr("y",t.y-16-s).attr("class","tag-label").text(h),i=$.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");d=Math.max(d,i.width),n=Math.max(n,i.height),$.attr("x",t.posWithOffset-i.width/2),a.push({tag:$,hole:f,rect:g,yOffset:s}),s+=20}for(const{tag:h,hole:g,rect:f,yOffset:$}of a){const i=n/2,y=t.y-19.2-$;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("./chunk-2Q5K7J3B-1iQ5h7FK.cjs"),ce=require("./chunk-JWPE2WC7-Bz9dXsLZ.cjs"),c=require("./extractHeadings-D1A8WzVy.cjs"),ie=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},de=c.defaultConfig_default.gitGraph,G=c.__name(()=>c.cleanAndMerge({...de,...c.getConfig().gitGraph}),"getConfig"),l=new se.ImperativeState(()=>{const e=G(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function N(){return c.random({length:7})}c.__name(N,"getID");function Q(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}c.__name(Q,"uniqBy");var le=c.__name(function(e){l.records.direction=e},"setDirection"),he=c.__name(function(e){c.log.debug("options str",e),e=e?.trim(),e=e||"{}";try{l.records.options=JSON.parse(e)}catch(r){c.log.error("error while parsing gitGraph options",r.message)}},"setOptions"),$e=c.__name(function(){return l.records.options},"getOptions"),ge=c.__name(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;c.log.info("commit",r,t,o,s),c.log.debug("Entering commit:",r,t,o,s);const d=G();t=c.common_default.sanitizeText(t,d),r=c.common_default.sanitizeText(r,d),s=s?.map(a=>c.common_default.sanitizeText(a,d));const n={id:t||l.records.seq+"-"+N(),message:r,seq:l.records.seq++,type:o??x.NORMAL,tags:s??[],parents:l.records.head==null?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=n,c.log.info("main branch",d.mainBranchName),l.records.commits.has(n.id)&&c.log.warn(`Commit ID ${n.id} already exists`),l.records.commits.set(n.id,n),l.records.branches.set(l.records.currBranch,n.id),c.log.debug("in pushCommit "+n.id)},"commit"),fe=c.__name(function(e){let r=e.name;const t=e.order;if(r=c.common_default.sanitizeText(r,G()),l.records.branches.has(r))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 ${r}")`);l.records.branches.set(r,l.records.head!=null?l.records.head.id:null),l.records.branchConfig.set(r,{name:r,order:t}),Z(r),c.log.debug("in createBranch")},"branch"),me=c.__name(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=G();r=c.common_default.sanitizeText(r,d),t&&(t=c.common_default.sanitizeText(t,d));const n=l.records.branches.get(l.records.currBranch),a=l.records.branches.get(r),h=n?l.records.commits.get(n):void 0,g=a?l.records.commits.get(a):void 0;if(h&&g&&h.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(h===void 0||!h){const i=new Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!l.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(g===void 0||!g){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(h===g){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(t&&l.records.commits.has(t)){const i=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${t} ${o} ${s?.join(" ")}`,token:`merge ${r} ${t} ${o} ${s?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s?.join(" ")}`]},i}const f=a||"",$={id:t||`${l.records.seq}-${N()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,f],branch:l.records.currBranch,type:x.MERGE,customType:o,customId:!!t,tags:s??[]};l.records.head=$,l.records.commits.set($.id,$),l.records.branches.set(l.records.currBranch,$.id),c.log.debug(l.records.branches),c.log.debug("in mergeBranch")},"merge"),ue=c.__name(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;c.log.debug("Entering cherryPick:",r,t,o);const d=G();if(r=c.common_default.sanitizeText(r,d),t=c.common_default.sanitizeText(t,d),o=o?.map(h=>c.common_default.sanitizeText(h,d)),s=c.common_default.sanitizeText(s,d),!r||!l.records.commits.has(r)){const h=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw h.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},h}const n=l.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===x.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!l.records.commits.has(t)){if(a===l.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const h=l.records.branches.get(l.records.currBranch);if(h===void 0||!h){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g=l.records.commits.get(h);if(g===void 0||!g){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f={id:l.records.seq+"-"+N(),message:`cherry-picked ${n?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:l.records.head==null?[]:[l.records.head.id,n.id],branch:l.records.currBranch,type:x.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===x.MERGE?`|parent:${s}`:""}`]};l.records.head=f,l.records.commits.set(f.id,f),l.records.branches.set(l.records.currBranch,f.id),c.log.debug(l.records.branches),c.log.debug("in cherryPick")}},"cherryPick"),Z=c.__name(function(e){if(e=c.common_default.sanitizeText(e,G()),l.records.branches.has(e)){l.records.currBranch=e;const r=l.records.branches.get(l.records.currBranch);r===void 0||!r?l.records.head=null:l.records.head=l.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function j(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}c.__name(j,"upsert");function U(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in l.records.branches)l.records.branches.get(s)===r.id&&o.push(s);if(c.log.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=l.records.commits.get(r.parents[0]);j(e,r,s),r.parents[1]&&e.push(l.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=l.records.commits.get(r.parents[0]);j(e,r,s)}}e=Q(e,s=>s.id),U(e)}c.__name(U,"prettyPrintCommitHistory");var ye=c.__name(function(){c.log.debug(l.records.commits);const e=ee()[0];U([e])},"prettyPrint"),xe=c.__name(function(){l.reset(),c.clear()},"clear"),pe=c.__name(function(){return[...l.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),be=c.__name(function(){return l.records.branches},"getBranches"),_e=c.__name(function(){return l.records.commits},"getCommits"),ee=c.__name(function(){const e=[...l.records.commits.values()];return e.forEach(function(r){c.log.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),we=c.__name(function(){return l.records.currBranch},"getCurrentBranch"),ke=c.__name(function(){return l.records.direction},"getDirection"),Ce=c.__name(function(){return l.records.head},"getHead"),re={commitType:x,getConfig:G,setDirection:le,setOptions:he,getOptions:$e,commit:ge,branch:fe,merge:me,cherryPick:ue,checkout:Z,prettyPrint:ye,clear:xe,getBranchesAsObjArray:pe,getBranches:be,getCommits:_e,getCommitsArray:ee,getCurrentBranch:we,getDirection:ke,getHead:Ce,setAccTitle:c.setAccTitle,getAccTitle:c.getAccTitle,getAccDescription:c.getAccDescription,setAccDescription:c.setAccDescription,setDiagramTitle:c.setDiagramTitle,getDiagramTitle:c.getDiagramTitle},ve=c.__name((e,r)=>{ce.populateCommonDb(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Ee(t,r)},"populate"),Ee=c.__name((e,r)=>{const o={Commit:c.__name(s=>r.commit(Be(s)),"Commit"),Branch:c.__name(s=>r.branch(Te(s)),"Branch"),Merge:c.__name(s=>r.merge(Le(s)),"Merge"),Checkout:c.__name(s=>r.checkout(Me(s)),"Checkout"),CherryPicking:c.__name(s=>r.cherryPick(Re(s)),"CherryPicking")}[e.$type];o?o(e):c.log.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Be=c.__name(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?x[e.type]:x.NORMAL,tags:e.tags??void 0}),"parseCommit"),Te=c.__name(e=>({name:e.name,order:e.order??0}),"parseBranch"),Le=c.__name(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?x[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Me=c.__name(e=>e.branch,"parseCheckout"),Re=c.__name(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ie={parse:c.__name(async e=>{const r=await ie.parse("gitGraph",e);c.log.debug(r),ve(r,re)},"parse")},M=10,R=40,E=4,T=2,I=8,F=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),K=12,V=new Set(["redux-color","redux-dark-color"]),Oe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),O=c.__name((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),k=new Map,C=new Map,W=30,A=new Map,P=[],L=0,u="LR",Ge=c.__name(()=>{k.clear(),C.clear(),A.clear(),L=0,P=[],u="LR"},"clear"),te=c.__name(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ae=c.__name(e=>{let r,t,o;return u==="BT"?(t=c.__name((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=c.__name((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{const d=u==="TB"||u=="BT"?C.get(s)?.y:C.get(s)?.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),He=c.__name(e=>{let r="",t=1/0;return e.forEach(o=>{const s=C.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),Se=c.__name((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=De(a),s=Math.max(o,s)):d.push(a),qe(a,o)}),o=s,d.forEach(n=>{We(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const h=He(a.parents);o=C.get(h).y-R,o<=s&&(s=o);const g=k.get(a.branch).pos,f=o-M;C.set(a.id,{x:g,y:f})}})},"setParallelBTPos"),Ae=c.__name(e=>{const r=ae(e.parents.filter(o=>o!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=C.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),De=c.__name(e=>Ae(e)+R,"calculateCommitPosition"),qe=c.__name((e,r)=>{const t=k.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+M;return C.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),We=c.__name((e,r,t)=>{const o=k.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;C.set(e.id,{x:d,y:s})},"setRootPosition"),Pe=c.__name((e,r,t,o,s,d)=>{const{theme:n}=c.getConfig2(),a=F.has(n??""),h=V.has(n??""),g=Oe.has(n??"");if(d===x.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${O(s,I,h)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${O(s,I,h)} ${o}-inner`);else if(d===x.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const f=e.append("circle");if(f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?7:10),f.attr("class",`commit ${r.id} commit${O(s,I,h)}`),d===x.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${o} ${r.id} commit${O(s,I,h)}`)}if(d===x.REVERSE){const $=e.append("path"),i=a?4:5;$.attr("d",`M ${t.x-i},${t.y-i}L${t.x+i},${t.y+i}M${t.x-i},${t.y+i}L${t.x+i},${t.y-i}`).attr("class",`commit ${o} ${r.id} commit${O(s,I,h)}`)}}},"drawCommitBullet"),Ne=c.__name((e,r,t,o,s)=>{if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&s.showCommitLabel){const d=e.append("g"),n=d.insert("rect").attr("class","commit-label-bkg"),a=d.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=a.node()?.getBBox();if(h&&(n.attr("x",t.posWithOffset-h.width/2-T).attr("y",t.y+13.5).attr("width",h.width+2*T).attr("height",h.height+2*T),u==="TB"||u==="BT"?(n.attr("x",t.x-(h.width+4*E+5)).attr("y",t.y-12),a.attr("x",t.x-(h.width+4*E)).attr("y",t.y+h.height-12)):a.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(u==="TB"||u==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;d.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),Fe=c.__name((e,r,t,o)=>{if(r.tags.length>0){let s=0,d=0,n=0;const a=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),$=e.append("text").attr("y",t.y-16-s).attr("class","tag-label").text(h),i=$.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");d=Math.max(d,i.width),n=Math.max(n,i.height),$.attr("x",t.posWithOffset-i.width/2),a.push({tag:$,hole:f,rect:g,yOffset:s}),s+=20}for(const{tag:h,hole:g,rect:f,yOffset:$}of a){const i=n/2,y=t.y-19.2-$;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-d/2-E/2},${y+T}
|
|
3
3
|
${o-d/2-E/2},${y-T}
|
|
4
4
|
${t.posWithOffset-d/2-E},${y-i-T}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-D1A8WzVy.cjs"),o=require("./viewer-settings.cjs");exports.BlockquoteNode=e.BlockquoteNode;exports.CodeNode=e.CodeNode;exports.DEFAULT_MARKDOWN_EMBED_LABELS=e.DEFAULT_MARKDOWN_EMBED_LABELS;exports.DEFAULT_MARKDOWN_VIEWER_LABELS=e.DEFAULT_MARKDOWN_VIEWER_LABELS;exports.DEFAULT_MERMAID_DIAGRAM_LABELS=e.DEFAULT_MERMAID_DIAGRAM_LABELS;exports.DEFAULT_MERMAID_INTERACTION=e.DEFAULT_MERMAID_INTERACTION;exports.DeleteNode=e.DeleteNode;exports.EmphasisNode=e.EmphasisNode;exports.FootnoteBackLinkNode=e.FootnoteBackLinkNode;exports.FootnoteReferenceNode=e.FootnoteReferenceNode;exports.FootnotesSection=e.FootnotesSection;exports.HeadingNode=e.HeadingNode;exports.ImageNode=e.ImageNode;exports.InlineCodeNode=e.InlineCodeNode;exports.LinkNode=e.LinkNode;exports.ListItemNode=e.ListItemNode;exports.ListNode=e.ListNode;exports.MarkdownRenderer=e.MarkdownRenderer;exports.MarkdownViewer=e.MarkdownViewer;exports.MermaidDiagram=e.MermaidDiagram;exports.NodesRenderer=e.NodesRenderer;exports.ParagraphNode=e.ParagraphNode;exports.StrongNode=e.StrongNode;exports.TableNode=e.TableNode;exports.TableOfContents=e.TableOfContents;exports.TextNode=e.TextNode;exports.ThematicBreakNode=e.ThematicBreakNode;exports.ZennDetailsNode=e.ZennDetailsNode;exports.ZennMessageNode=e.ZennMessageNode;exports.extractHeadings=e.extractHeadings;exports.remarkCustomHeadingId=e.remarkCustomHeadingId;exports.remarkFootnoteBackLink=e.remarkFootnoteBackLink;exports.remarkHtmlAnchorToLink=e.remarkHtmlAnchorToLink;exports.remarkHtmlInHtml=e.remarkHtmlInHtml;exports.remarkImageSize=e.remarkImageSize;exports.remarkParentNode=e.remarkParentNode;exports.remarkZennMessage=e.remarkZennMessage;exports.useMarkdownToolbarState=e.useMarkdownToolbarState;exports.CONTENT_ALIGNS=o.CONTENT_ALIGNS;exports.DEFAULT_CONTENT_ALIGN=o.DEFAULT_CONTENT_ALIGN;exports.DEFAULT_MARKDOWN_STYLES=o.DEFAULT_MARKDOWN_STYLES;exports.toContentAlign=o.toContentAlign;
|
package/dist/index.client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-D1A8WzVy.cjs"),o=require("./viewer-settings.cjs");exports.BlockquoteNode=e.BlockquoteNode;exports.CodeNode=e.CodeNode;exports.DEFAULT_MARKDOWN_EMBED_LABELS=e.DEFAULT_MARKDOWN_EMBED_LABELS;exports.DEFAULT_MARKDOWN_VIEWER_LABELS=e.DEFAULT_MARKDOWN_VIEWER_LABELS;exports.DEFAULT_MERMAID_DIAGRAM_LABELS=e.DEFAULT_MERMAID_DIAGRAM_LABELS;exports.DEFAULT_MERMAID_INTERACTION=e.DEFAULT_MERMAID_INTERACTION;exports.DeleteNode=e.DeleteNode;exports.EmphasisNode=e.EmphasisNode;exports.FootnoteBackLinkNode=e.FootnoteBackLinkNode;exports.FootnoteReferenceNode=e.FootnoteReferenceNode;exports.FootnotesSection=e.FootnotesSection;exports.HeadingNode=e.HeadingNode;exports.ImageNode=e.ImageNode;exports.InlineCodeNode=e.InlineCodeNode;exports.LinkNode=e.LinkNode;exports.ListItemNode=e.ListItemNode;exports.ListNode=e.ListNode;exports.MarkdownRenderer=e.MarkdownRenderer;exports.MarkdownViewer=e.MarkdownViewer;exports.MermaidDiagram=e.MermaidDiagram;exports.NodesRenderer=e.NodesRenderer;exports.ParagraphNode=e.ParagraphNode;exports.StrongNode=e.StrongNode;exports.TableNode=e.TableNode;exports.TableOfContents=e.TableOfContents;exports.TextNode=e.TextNode;exports.ThematicBreakNode=e.ThematicBreakNode;exports.ZennDetailsNode=e.ZennDetailsNode;exports.ZennMessageNode=e.ZennMessageNode;exports.extractHeadings=e.extractHeadings;exports.remarkCustomHeadingId=e.remarkCustomHeadingId;exports.remarkFootnoteBackLink=e.remarkFootnoteBackLink;exports.remarkHtmlAnchorToLink=e.remarkHtmlAnchorToLink;exports.remarkHtmlInHtml=e.remarkHtmlInHtml;exports.remarkImageSize=e.remarkImageSize;exports.remarkParentNode=e.remarkParentNode;exports.remarkZennMessage=e.remarkZennMessage;exports.useMarkdownToolbarState=e.useMarkdownToolbarState;exports.CONTENT_ALIGNS=o.CONTENT_ALIGNS;exports.DEFAULT_CONTENT_ALIGN=o.DEFAULT_CONTENT_ALIGN;exports.DEFAULT_MARKDOWN_STYLES=o.DEFAULT_MARKDOWN_STYLES;exports.toContentAlign=o.toContentAlign;
|
package/dist/index.client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export type { Root, RootContent } from "mdast";
|
|
2
|
+
export { DEFAULT_MARKDOWN_EMBED_LABELS, type MarkdownEmbedLabels } from "./components/embeds/embedLabels.ts";
|
|
2
3
|
export type { MarkdownLinkAttributes } from "./components/links.ts";
|
|
3
4
|
export { type MarkdownLinkComponent, type MarkdownLinkKind, type MarkdownLinkProps, MarkdownRenderer } from "./components/MarkdownRenderer.tsx";
|
|
4
5
|
export { type MarkdownHeadingHrefResolver, type MarkdownHeadingSelectHandler, type MarkdownToolbarMenu, type MarkdownToolbarState, MarkdownViewer, type MarkdownViewerErrorInfo, type MarkdownViewerHeading, type MarkdownViewerParseResult, type MarkdownViewerProps, useMarkdownToolbarState, } from "./components/MarkdownViewer.tsx";
|
|
5
6
|
export { DEFAULT_MERMAID_DIAGRAM_LABELS, DEFAULT_MERMAID_INTERACTION, MermaidDiagram, type MermaidDiagramLabels, type MermaidInteractionMode } from "./components/MermaidDiagram.tsx";
|
|
6
7
|
export type { MarkdownMathDiagnostic } from "./components/mathRendering.ts";
|
|
7
|
-
export { BlockLinkNode } from "./components/mdastNodes/BlockLinkNode.tsx";
|
|
8
8
|
export { BlockquoteNode } from "./components/mdastNodes/BlockquoteNode.tsx";
|
|
9
9
|
export { CodeNode } from "./components/mdastNodes/CodeNode.tsx";
|
|
10
10
|
export { DeleteNode } from "./components/mdastNodes/DeleteNode.tsx";
|
|
@@ -17,30 +17,21 @@ export { LinkNode } from "./components/mdastNodes/LinkNode.tsx";
|
|
|
17
17
|
export { ListItemNode } from "./components/mdastNodes/ListItemNode.tsx";
|
|
18
18
|
export { ListNode } from "./components/mdastNodes/ListNode.tsx";
|
|
19
19
|
export { ParagraphNode } from "./components/mdastNodes/ParagraphNode.tsx";
|
|
20
|
-
export { RichLinkCard } from "./components/mdastNodes/RichLinkCard.tsx";
|
|
21
20
|
export { StrongNode } from "./components/mdastNodes/StrongNode.tsx";
|
|
22
21
|
export { TableNode } from "./components/mdastNodes/TableNode.tsx";
|
|
23
22
|
export { TextNode } from "./components/mdastNodes/TextNode.tsx";
|
|
24
23
|
export { ThematicBreakNode } from "./components/mdastNodes/ThematicBreakNode.tsx";
|
|
25
|
-
export { TwitterEmbedNode } from "./components/mdastNodes/TwitterEmbedNode.tsx";
|
|
26
|
-
export { YouTubeEmbedNode } from "./components/mdastNodes/YouTubeEmbedNode.tsx";
|
|
27
24
|
export { ZennDetailsNode } from "./components/mdastNodes/ZennDetailsNode.tsx";
|
|
28
25
|
export { ZennMessageNode } from "./components/mdastNodes/ZennMessageNode.tsx";
|
|
29
26
|
export { NodesRenderer } from "./components/NodesRenderer.tsx";
|
|
30
27
|
export { TableOfContents } from "./components/TableOfContents.tsx";
|
|
31
28
|
export { DEFAULT_MARKDOWN_VIEWER_LABELS, type MarkdownViewerLabels, type MermaidViewerLabels } from "./components/viewerLabels.ts";
|
|
32
|
-
export { createIntentTweetLink } from "./plugins/createIntentTweetLink.ts";
|
|
33
|
-
export { extractYouTubeVideoId } from "./plugins/extractYouTubeVideoId.ts";
|
|
34
|
-
export type { SiteMetadata } from "./plugins/fetchSiteMetadata.ts";
|
|
35
|
-
export { remarkBlockLink } from "./plugins/remark-block-link.ts";
|
|
36
29
|
export { remarkCustomHeadingId } from "./plugins/remark-custom-heading-id.ts";
|
|
37
30
|
export { remarkFootnoteBackLink } from "./plugins/remark-footnote-back-link.ts";
|
|
38
31
|
export { remarkHtmlAnchorToLink } from "./plugins/remark-html-anchor-to-link.ts";
|
|
39
32
|
export { remarkHtmlInHtml } from "./plugins/remark-html-in-html.ts";
|
|
40
33
|
export { remarkImageSize } from "./plugins/remark-image-size.ts";
|
|
41
34
|
export { remarkParentNode } from "./plugins/remark-parent-node.ts";
|
|
42
|
-
export { remarkTwitterEmbed } from "./plugins/remark-twitter-embed.ts";
|
|
43
|
-
export { remarkYouTubeEmbed } from "./plugins/remark-youtube-embed.ts";
|
|
44
35
|
export { remarkZennMessage } from "./plugins/remark-zenn-message.ts";
|
|
45
36
|
export { extractHeadings } from "./utils/extractHeadings.ts";
|
|
46
37
|
export { CONTENT_ALIGNS, type ContentAlign, DEFAULT_CONTENT_ALIGN, DEFAULT_MARKDOWN_STYLES, type MarkdownStyleOption, toContentAlign } from "./viewer-settings.ts";
|
package/dist/index.client.js
CHANGED
|
@@ -1,54 +1,46 @@
|
|
|
1
|
-
import { B as o,
|
|
2
|
-
import { CONTENT_ALIGNS as
|
|
1
|
+
import { B as o, C as s, D as r, a as n, b as t, c as d, d as N, E as L, F as m, e as A, f as E, H as i, I as T, g as k, L as D, h as M, i as _, M as I, j as g, k as l, N as F, P as R, S, T as c, l as B, m as C, n as H, Z as O, o as U, p as f, r as h, q as p, s as w, t as x, u as b, v as u, w as W, x as Z } from "./extractHeadings-CtiYkq2z.js";
|
|
2
|
+
import { CONTENT_ALIGNS as K, DEFAULT_CONTENT_ALIGN as P, DEFAULT_MARKDOWN_STYLES as q, toContentAlign as V } from "./viewer-settings.js";
|
|
3
3
|
export {
|
|
4
|
-
o as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
o as BlockquoteNode,
|
|
5
|
+
K as CONTENT_ALIGNS,
|
|
6
|
+
s as CodeNode,
|
|
7
|
+
P as DEFAULT_CONTENT_ALIGN,
|
|
8
|
+
r as DEFAULT_MARKDOWN_EMBED_LABELS,
|
|
9
|
+
q as DEFAULT_MARKDOWN_STYLES,
|
|
10
|
+
n as DEFAULT_MARKDOWN_VIEWER_LABELS,
|
|
11
|
+
t as DEFAULT_MERMAID_DIAGRAM_LABELS,
|
|
12
|
+
d as DEFAULT_MERMAID_INTERACTION,
|
|
13
13
|
N as DeleteNode,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
L as EmphasisNode,
|
|
15
|
+
m as FootnoteBackLinkNode,
|
|
16
|
+
A as FootnoteReferenceNode,
|
|
17
|
+
E as FootnotesSection,
|
|
18
|
+
i as HeadingNode,
|
|
19
|
+
T as ImageNode,
|
|
20
|
+
k as InlineCodeNode,
|
|
21
|
+
D as LinkNode,
|
|
22
|
+
M as ListItemNode,
|
|
23
|
+
_ as ListNode,
|
|
24
|
+
I as MarkdownRenderer,
|
|
25
|
+
g as MarkdownViewer,
|
|
26
|
+
l as MermaidDiagram,
|
|
27
|
+
F as NodesRenderer,
|
|
28
28
|
R as ParagraphNode,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
H as YouTubeEmbedNode,
|
|
37
|
-
h as ZennDetailsNode,
|
|
38
|
-
x as ZennMessageNode,
|
|
39
|
-
O as createIntentTweetLink,
|
|
29
|
+
S as StrongNode,
|
|
30
|
+
c as TableNode,
|
|
31
|
+
B as TableOfContents,
|
|
32
|
+
C as TextNode,
|
|
33
|
+
H as ThematicBreakNode,
|
|
34
|
+
O as ZennDetailsNode,
|
|
35
|
+
U as ZennMessageNode,
|
|
40
36
|
f as extractHeadings,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
V as
|
|
49
|
-
|
|
50
|
-
q as remarkYouTubeEmbed,
|
|
51
|
-
z as remarkZennMessage,
|
|
52
|
-
X as toContentAlign,
|
|
53
|
-
j as useMarkdownToolbarState
|
|
37
|
+
h as remarkCustomHeadingId,
|
|
38
|
+
p as remarkFootnoteBackLink,
|
|
39
|
+
w as remarkHtmlAnchorToLink,
|
|
40
|
+
x as remarkHtmlInHtml,
|
|
41
|
+
b as remarkImageSize,
|
|
42
|
+
u as remarkParentNode,
|
|
43
|
+
W as remarkZennMessage,
|
|
44
|
+
V as toContentAlign,
|
|
45
|
+
Z as useMarkdownToolbarState
|
|
54
46
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,54 +1,46 @@
|
|
|
1
|
-
import { B as o,
|
|
2
|
-
import { CONTENT_ALIGNS as
|
|
1
|
+
import { B as o, C as s, D as r, a as n, b as t, c as d, d as N, E as L, F as m, e as A, f as E, H as i, I as T, g as k, L as D, h as M, i as _, M as I, j as g, k as l, N as F, P as R, S, T as c, l as B, m as C, n as H, Z as O, o as U, p as f, r as h, q as p, s as w, t as x, u as b, v as u, w as W, x as Z } from "./extractHeadings-CtiYkq2z.js";
|
|
2
|
+
import { CONTENT_ALIGNS as K, DEFAULT_CONTENT_ALIGN as P, DEFAULT_MARKDOWN_STYLES as q, toContentAlign as V } from "./viewer-settings.js";
|
|
3
3
|
export {
|
|
4
|
-
o as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
o as BlockquoteNode,
|
|
5
|
+
K as CONTENT_ALIGNS,
|
|
6
|
+
s as CodeNode,
|
|
7
|
+
P as DEFAULT_CONTENT_ALIGN,
|
|
8
|
+
r as DEFAULT_MARKDOWN_EMBED_LABELS,
|
|
9
|
+
q as DEFAULT_MARKDOWN_STYLES,
|
|
10
|
+
n as DEFAULT_MARKDOWN_VIEWER_LABELS,
|
|
11
|
+
t as DEFAULT_MERMAID_DIAGRAM_LABELS,
|
|
12
|
+
d as DEFAULT_MERMAID_INTERACTION,
|
|
13
13
|
N as DeleteNode,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
L as EmphasisNode,
|
|
15
|
+
m as FootnoteBackLinkNode,
|
|
16
|
+
A as FootnoteReferenceNode,
|
|
17
|
+
E as FootnotesSection,
|
|
18
|
+
i as HeadingNode,
|
|
19
|
+
T as ImageNode,
|
|
20
|
+
k as InlineCodeNode,
|
|
21
|
+
D as LinkNode,
|
|
22
|
+
M as ListItemNode,
|
|
23
|
+
_ as ListNode,
|
|
24
|
+
I as MarkdownRenderer,
|
|
25
|
+
g as MarkdownViewer,
|
|
26
|
+
l as MermaidDiagram,
|
|
27
|
+
F as NodesRenderer,
|
|
28
28
|
R as ParagraphNode,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
H as YouTubeEmbedNode,
|
|
37
|
-
h as ZennDetailsNode,
|
|
38
|
-
x as ZennMessageNode,
|
|
39
|
-
O as createIntentTweetLink,
|
|
29
|
+
S as StrongNode,
|
|
30
|
+
c as TableNode,
|
|
31
|
+
B as TableOfContents,
|
|
32
|
+
C as TextNode,
|
|
33
|
+
H as ThematicBreakNode,
|
|
34
|
+
O as ZennDetailsNode,
|
|
35
|
+
U as ZennMessageNode,
|
|
40
36
|
f as extractHeadings,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
V as
|
|
49
|
-
|
|
50
|
-
q as remarkYouTubeEmbed,
|
|
51
|
-
z as remarkZennMessage,
|
|
52
|
-
X as toContentAlign,
|
|
53
|
-
j as useMarkdownToolbarState
|
|
37
|
+
h as remarkCustomHeadingId,
|
|
38
|
+
p as remarkFootnoteBackLink,
|
|
39
|
+
w as remarkHtmlAnchorToLink,
|
|
40
|
+
x as remarkHtmlInHtml,
|
|
41
|
+
b as remarkImageSize,
|
|
42
|
+
u as remarkParentNode,
|
|
43
|
+
W as remarkZennMessage,
|
|
44
|
+
V as toContentAlign,
|
|
45
|
+
Z as useMarkdownToolbarState
|
|
54
46
|
};
|