@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,8 +1,8 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
1
|
+
import { I as X } from "./chunk-2Q5K7J3B-DOWfHP5s.js";
|
|
2
|
+
import { p as O } from "./chunk-JWPE2WC7-Djg6Qi23.js";
|
|
3
|
+
import { a5 as G, G as Y, y as P, a6 as F, z as j, A as Z, _ as f, ah as A, O as N, ak as q, Q as U, af as D, ab as Q, V as J, aW as K, ai as ee, aX as te } from "./extractHeadings-CtiYkq2z.js";
|
|
4
4
|
import { p as ne } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
|
-
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/,
|
|
5
|
+
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/, k = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, $ = /^\s*%%/, ie = " ";
|
|
6
6
|
function L(n) {
|
|
7
7
|
return n.some((e) => E.test(e));
|
|
8
8
|
}
|
|
@@ -37,56 +37,56 @@ function R(n) {
|
|
|
37
37
|
const i = [];
|
|
38
38
|
for (let s = r + 1; s < e.length; s++) {
|
|
39
39
|
const o = e[s];
|
|
40
|
-
o.trim() === "" ||
|
|
40
|
+
o.trim() === "" || $.test(o) || k.test(o) || V.test(o) || i.push(o.replace(/\t/g, " "));
|
|
41
41
|
}
|
|
42
42
|
if (!L(i))
|
|
43
43
|
return { text: n, lineMap: t };
|
|
44
44
|
const a = _(i), c = [];
|
|
45
|
-
let
|
|
45
|
+
let l = 0;
|
|
46
46
|
for (let s = 0; s <= r; s++)
|
|
47
|
-
c.push(e[s]),
|
|
47
|
+
c.push(e[s]), l++, t.set(l, s + 1);
|
|
48
48
|
for (let s = r + 1; s < e.length; s++) {
|
|
49
49
|
const o = e[s], h = o.trim(), p = s + 1;
|
|
50
50
|
if (h === "") {
|
|
51
|
-
c.push(o),
|
|
51
|
+
c.push(o), l++, t.set(l, p);
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
|
-
if (
|
|
55
|
-
c.push(o),
|
|
54
|
+
if ($.test(o)) {
|
|
55
|
+
c.push(o), l++, t.set(l, p);
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
c.push(o),
|
|
58
|
+
if (k.test(o)) {
|
|
59
|
+
c.push(o), l++, t.set(l, p);
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
62
|
if (V.test(o))
|
|
63
63
|
continue;
|
|
64
|
-
const
|
|
64
|
+
const d = o.replace(/\t/g, " "), w = S.exec(d);
|
|
65
65
|
if (w?.index !== void 0) {
|
|
66
66
|
const g = w.index, m = Math.round(g / a) + 1;
|
|
67
67
|
let u = g + 1;
|
|
68
|
-
for (; u <
|
|
68
|
+
for (; u < d.length && re.test(d[u]); )
|
|
69
69
|
u++;
|
|
70
|
-
for (; u <
|
|
70
|
+
for (; u < d.length && d[u] === " "; )
|
|
71
71
|
u++;
|
|
72
|
-
const v =
|
|
72
|
+
const v = d.slice(u).trimEnd();
|
|
73
73
|
if (!v)
|
|
74
74
|
throw new Error(
|
|
75
75
|
`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`
|
|
76
76
|
);
|
|
77
|
-
const
|
|
78
|
-
c.push(
|
|
77
|
+
const W = ie.repeat(m);
|
|
78
|
+
c.push(W + v), l++, t.set(l, p);
|
|
79
79
|
} else {
|
|
80
|
-
if (/^[\s─━│┃└┗├┣]+$/.test(
|
|
80
|
+
if (/^[\s─━│┃└┗├┣]+$/.test(d))
|
|
81
81
|
continue;
|
|
82
|
-
if (E.test(
|
|
83
|
-
c.push(o),
|
|
82
|
+
if (E.test(d))
|
|
83
|
+
c.push(o), l++, t.set(l, p);
|
|
84
84
|
else {
|
|
85
|
-
if (/^\s+/.test(
|
|
85
|
+
if (/^\s+/.test(d))
|
|
86
86
|
throw new Error(
|
|
87
87
|
`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`
|
|
88
88
|
);
|
|
89
|
-
c.push(o),
|
|
89
|
+
c.push(o), l++, t.set(l, p);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ function R(n) {
|
|
|
94
94
|
`), lineMap: t };
|
|
95
95
|
}
|
|
96
96
|
f(R, "preprocessBoxDrawing");
|
|
97
|
-
var x = new
|
|
97
|
+
var x = new X(() => ({
|
|
98
98
|
cnt: 1,
|
|
99
99
|
stack: [
|
|
100
100
|
{
|
|
@@ -107,7 +107,7 @@ var x = new W(() => ({
|
|
|
107
107
|
]
|
|
108
108
|
})), oe = /* @__PURE__ */ f(() => {
|
|
109
109
|
x.reset(), Q();
|
|
110
|
-
}, "clear"), se = /* @__PURE__ */ f(() => x.records.stack[0], "getRoot"), ae = /* @__PURE__ */ f(() => x.records.cnt, "getCount"), ce = ee.treeView,
|
|
110
|
+
}, "clear"), se = /* @__PURE__ */ f(() => x.records.stack[0], "getRoot"), ae = /* @__PURE__ */ f(() => x.records.cnt, "getCount"), ce = ee.treeView, le = /* @__PURE__ */ f(() => A(ce, D().treeView), "getConfig"), de = /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
111
111
|
for (; n <= x.records.stack[x.records.stack.length - 1].level; )
|
|
112
112
|
x.records.stack.pop();
|
|
113
113
|
const c = {
|
|
@@ -123,24 +123,24 @@ var x = new W(() => ({
|
|
|
123
123
|
x.records.stack[x.records.stack.length - 1].children.push(c), x.records.stack.push(c);
|
|
124
124
|
}, "addNode"), he = {
|
|
125
125
|
clear: oe,
|
|
126
|
-
addNode:
|
|
126
|
+
addNode: de,
|
|
127
127
|
getRoot: se,
|
|
128
128
|
getCount: ae,
|
|
129
|
-
getConfig:
|
|
130
|
-
getAccTitle:
|
|
131
|
-
getAccDescription:
|
|
132
|
-
getDiagramTitle:
|
|
129
|
+
getConfig: le,
|
|
130
|
+
getAccTitle: Z,
|
|
131
|
+
getAccDescription: j,
|
|
132
|
+
getDiagramTitle: F,
|
|
133
133
|
setAccDescription: P,
|
|
134
134
|
setAccTitle: Y,
|
|
135
135
|
setDiagramTitle: G
|
|
136
136
|
}, I = he, pe = /* @__PURE__ */ f((n) => {
|
|
137
|
-
|
|
137
|
+
O(n, I);
|
|
138
138
|
for (const e of n.nodes) {
|
|
139
139
|
const t = typeof e.indent == "number" ? e.indent : 0;
|
|
140
140
|
let r = e.name;
|
|
141
141
|
const i = r.endsWith("/");
|
|
142
142
|
i && (r = r.slice(0, -1));
|
|
143
|
-
const a = i ? "directory" : "file", c = e.classAnnotation || void 0,
|
|
143
|
+
const a = i ? "directory" : "file", c = e.classAnnotation || void 0, l = e.iconAnnotation, s = l !== void 0 ? l || "none" : void 0, o = e.descAnnotation || void 0, h = o ? J(o, D()) : void 0;
|
|
144
144
|
I.addNode(t, r, a, c, s, h);
|
|
145
145
|
}
|
|
146
146
|
}, "populate"), fe = {
|
|
@@ -166,7 +166,7 @@ var x = new W(() => ({
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
-
function
|
|
169
|
+
function z(n, e) {
|
|
170
170
|
const t = e?.filenameIcons?.[n];
|
|
171
171
|
if (t)
|
|
172
172
|
return t;
|
|
@@ -176,7 +176,7 @@ function H(n, e) {
|
|
|
176
176
|
return a?.[i] ?? a?.[i.slice(1)];
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
f(
|
|
179
|
+
f(z, "detectIcon");
|
|
180
180
|
function C(n, e) {
|
|
181
181
|
return n.includes(":") ? n : n in b.icons || !e ? `${b.prefix}:${n}` : `${e}:${n}`;
|
|
182
182
|
}
|
|
@@ -187,7 +187,7 @@ function B(n, e) {
|
|
|
187
187
|
return C(n.icon, e.defaultIconPack);
|
|
188
188
|
if (e.showIcons) {
|
|
189
189
|
if (n.nodeType === "file") {
|
|
190
|
-
const t =
|
|
190
|
+
const t = z(n.name, e);
|
|
191
191
|
if (t === "none")
|
|
192
192
|
return;
|
|
193
193
|
if (t)
|
|
@@ -204,7 +204,7 @@ te([
|
|
|
204
204
|
icons: b
|
|
205
205
|
}
|
|
206
206
|
]);
|
|
207
|
-
var y = 14, ge = 4, ue = 16,
|
|
207
|
+
var y = 14, ge = 4, ue = 16, H = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.replace(/[^\w-]/g, "-")}`, "iconSymbolId"), we = /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
208
208
|
const i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ f((s) => {
|
|
209
209
|
const o = B(s, t);
|
|
210
210
|
o && i.add(o), s.children.forEach(a);
|
|
@@ -219,45 +219,45 @@ var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
219
219
|
width: y
|
|
220
220
|
})
|
|
221
221
|
}))
|
|
222
|
-
),
|
|
222
|
+
), l = n.append("defs");
|
|
223
223
|
for (const { icon: s, svg: o } of c)
|
|
224
|
-
|
|
224
|
+
l.append("g").attr("id", H(r, s)).html(o);
|
|
225
225
|
}, "injectIconDefs"), me = /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
226
226
|
const c = r.append("g");
|
|
227
|
-
let
|
|
228
|
-
t.nodeType === "directory" && (
|
|
227
|
+
let l = "treeView-node-label";
|
|
228
|
+
t.nodeType === "directory" && (l += " treeView-node-dir"), t.cssClass && (l += ` ${t.cssClass}`);
|
|
229
229
|
const s = y + ge, o = B(t, i), h = o !== void 0;
|
|
230
|
-
o && c.append("use").attr("xlink:href", `#${
|
|
231
|
-
const p = c.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class",
|
|
230
|
+
o && c.append("use").attr("xlink:href", `#${H(a, o)}`).attr("x", n + i.paddingX).attr("y", e + i.paddingY).attr("class", "treeView-node-icon");
|
|
231
|
+
const p = c.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class", l), { height: d, width: w } = p.node().getBBox(), g = d + i.paddingY * 2, m = n + i.paddingX + (h ? s : 0);
|
|
232
232
|
p.attr("x", m), p.attr("y", e + g / 2);
|
|
233
233
|
const u = m + w, v = w + i.paddingX * 2 + (h ? s : 0);
|
|
234
234
|
return t.BBox = { x: n, y: e, width: v, height: g }, t.cssClass?.split(/\s+/).includes("highlight") && c.insert("rect", ":first-child").attr("x", n).attr("y", e + 1).attr("width", 0).attr("height", g - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), { node: t, nodeGroup: c, labelRightEdge: u, centerY: e + g / 2 };
|
|
235
235
|
}, "positionLabel"), T = /* @__PURE__ */ f((n, e, t, r, i, a) => n.append("line").attr("x1", e).attr("y1", t).attr("x2", r).attr("y2", i).attr("stroke-width", a).attr("class", "treeView-node-line"), "positionLine"), xe = /* @__PURE__ */ f((n, e, t, r) => {
|
|
236
236
|
let i = 0, a = 0;
|
|
237
|
-
const c = [],
|
|
238
|
-
const g = w * (
|
|
237
|
+
const c = [], l = /* @__PURE__ */ f((h, p, d, w) => {
|
|
238
|
+
const g = w * (d.rowIndent + d.paddingX), m = me(g, i, p, h, d, r);
|
|
239
239
|
c.push(m);
|
|
240
240
|
const { height: u, width: v } = p.BBox;
|
|
241
241
|
T(
|
|
242
242
|
h,
|
|
243
|
-
g -
|
|
243
|
+
g - d.rowIndent,
|
|
244
244
|
i + u / 2,
|
|
245
245
|
g,
|
|
246
246
|
i + u / 2,
|
|
247
|
-
|
|
247
|
+
d.lineThickness
|
|
248
248
|
), a = Math.max(a, g + v), i += u;
|
|
249
249
|
}, "drawNode"), s = /* @__PURE__ */ f((h, p = 0) => {
|
|
250
|
-
|
|
250
|
+
l(n, h, t, p), h.children.forEach((m) => {
|
|
251
251
|
s(m, p + 1);
|
|
252
252
|
});
|
|
253
|
-
const { x:
|
|
253
|
+
const { x: d, y: w, height: g } = h.BBox;
|
|
254
254
|
if (h.children.length) {
|
|
255
255
|
const { y: m, height: u } = h.children[h.children.length - 1].BBox;
|
|
256
256
|
T(
|
|
257
257
|
n,
|
|
258
|
-
|
|
258
|
+
d + t.paddingX,
|
|
259
259
|
w + g,
|
|
260
|
-
|
|
260
|
+
d + t.paddingX,
|
|
261
261
|
m + u / 2 + t.lineThickness / 2,
|
|
262
262
|
t.lineThickness
|
|
263
263
|
);
|
|
@@ -266,9 +266,9 @@ var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
266
266
|
s(e);
|
|
267
267
|
const o = c.filter((h) => h.node.description);
|
|
268
268
|
if (o.length > 0) {
|
|
269
|
-
const p = Math.max(...c.map((
|
|
270
|
-
for (const
|
|
271
|
-
const g =
|
|
269
|
+
const p = Math.max(...c.map((d) => d.labelRightEdge)) + ue;
|
|
270
|
+
for (const d of o) {
|
|
271
|
+
const g = d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", p).attr("y", d.centerY).node().getBBox();
|
|
272
272
|
a = Math.max(a, p + g.width + t.paddingX);
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -276,20 +276,20 @@ var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
276
276
|
if (h.node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
277
277
|
const p = h.nodeGroup.select(".treeView-highlight-bg");
|
|
278
278
|
if (!p.empty()) {
|
|
279
|
-
const
|
|
280
|
-
p.attr("width",
|
|
279
|
+
const d = a - h.node.BBox.x + 8;
|
|
280
|
+
p.attr("width", d), a = Math.max(a, h.node.BBox.x + d + 2);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
return { totalHeight: i, totalWidth: a };
|
|
284
284
|
}, "drawTree"), ve = /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
285
285
|
N.debug(`Rendering treeView diagram
|
|
286
286
|
` + n);
|
|
287
|
-
const i = r.db, a = i.getRoot(), c = i.getConfig(),
|
|
288
|
-
await we(
|
|
289
|
-
const s =
|
|
287
|
+
const i = r.db, a = i.getRoot(), c = i.getConfig(), l = q(e);
|
|
288
|
+
await we(l, a, c, e);
|
|
289
|
+
const s = l.append("g");
|
|
290
290
|
s.attr("class", "tree-view");
|
|
291
291
|
const { totalHeight: o, totalWidth: h } = xe(s, a, c, e);
|
|
292
|
-
|
|
292
|
+
l.attr("viewBox", `-${c.lineThickness / 2} 0 ${h} ${o}`), U(l, o, h, c.useMaxWidth);
|
|
293
293
|
}, "draw"), be = {
|
|
294
294
|
draw: ve
|
|
295
295
|
}, Ie = be, Ce = {
|
|
@@ -310,7 +310,7 @@ var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
310
310
|
iconColor: i,
|
|
311
311
|
descriptionColor: a,
|
|
312
312
|
highlightBg: c,
|
|
313
|
-
highlightStroke:
|
|
313
|
+
highlightStroke: l
|
|
314
314
|
} = A(Ce, n);
|
|
315
315
|
return `
|
|
316
316
|
.treeView-node-label {
|
|
@@ -335,7 +335,7 @@ var y = 14, ge = 4, ue = 16, z = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.r
|
|
|
335
335
|
}
|
|
336
336
|
.treeView-highlight-bg {
|
|
337
337
|
fill: ${c};
|
|
338
|
-
stroke: ${
|
|
338
|
+
stroke: ${l};
|
|
339
339
|
stroke-width: 1;
|
|
340
340
|
}
|
|
341
341
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as k } from "./chunk-JWPE2WC7-
|
|
2
|
-
import {
|
|
3
|
-
import { p as
|
|
1
|
+
import { p as k } from "./chunk-JWPE2WC7-Djg6Qi23.js";
|
|
2
|
+
import { y as R, z as I, a6 as _, a5 as E, A as F, G as D, _ as c, ak as z, ab as G, ah as y, af as C, ai as P, O as B, al as W, Q as V } from "./extractHeadings-CtiYkq2z.js";
|
|
3
|
+
import { p as H } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
4
|
var h = {
|
|
5
5
|
showLegend: !0,
|
|
6
6
|
ticks: 5,
|
|
@@ -11,21 +11,21 @@ var h = {
|
|
|
11
11
|
axes: [],
|
|
12
12
|
curves: [],
|
|
13
13
|
options: h
|
|
14
|
-
}, x = structuredClone(w),
|
|
15
|
-
...
|
|
14
|
+
}, x = structuredClone(w), j = P.radar, N = /* @__PURE__ */ c(() => y({
|
|
15
|
+
...j,
|
|
16
16
|
...C().radar
|
|
17
|
-
}), "getConfig"), b = /* @__PURE__ */ c(() => x.axes, "getAxes"),
|
|
17
|
+
}), "getConfig"), b = /* @__PURE__ */ c(() => x.axes, "getAxes"), Q = /* @__PURE__ */ c(() => x.curves, "getCurves"), U = /* @__PURE__ */ c(() => x.options, "getOptions"), X = /* @__PURE__ */ c((a) => {
|
|
18
18
|
x.axes = a.map((t) => ({
|
|
19
19
|
name: t.name,
|
|
20
20
|
label: t.label ?? t.name
|
|
21
21
|
}));
|
|
22
|
-
}, "setAxes"),
|
|
22
|
+
}, "setAxes"), Y = /* @__PURE__ */ c((a) => {
|
|
23
23
|
x.curves = a.map((t) => ({
|
|
24
24
|
name: t.name,
|
|
25
25
|
label: t.label ?? t.name,
|
|
26
|
-
entries:
|
|
26
|
+
entries: Z(t.entries)
|
|
27
27
|
}));
|
|
28
|
-
}, "setCurves"),
|
|
28
|
+
}, "setCurves"), Z = /* @__PURE__ */ c((a) => {
|
|
29
29
|
if (a[0].axis == null)
|
|
30
30
|
return a.map((e) => e.value);
|
|
31
31
|
const t = b();
|
|
@@ -37,7 +37,7 @@ var h = {
|
|
|
37
37
|
throw new Error("Missing entry for axis " + e.label);
|
|
38
38
|
return r.value;
|
|
39
39
|
});
|
|
40
|
-
}, "computeCurveEntries"),
|
|
40
|
+
}, "computeCurveEntries"), q = /* @__PURE__ */ c((a) => {
|
|
41
41
|
const t = a.reduce(
|
|
42
42
|
(e, r) => (e[r.name] = r, e),
|
|
43
43
|
{}
|
|
@@ -50,15 +50,15 @@ var h = {
|
|
|
50
50
|
graticule: t.graticule?.value ?? h.graticule
|
|
51
51
|
};
|
|
52
52
|
}, "setOptions"), J = /* @__PURE__ */ c(() => {
|
|
53
|
-
|
|
53
|
+
G(), x = structuredClone(w);
|
|
54
54
|
}, "clear"), $ = {
|
|
55
55
|
getAxes: b,
|
|
56
|
-
getCurves:
|
|
57
|
-
getOptions:
|
|
58
|
-
setAxes:
|
|
59
|
-
setCurves:
|
|
60
|
-
setOptions:
|
|
61
|
-
getConfig:
|
|
56
|
+
getCurves: Q,
|
|
57
|
+
getOptions: U,
|
|
58
|
+
setAxes: X,
|
|
59
|
+
setCurves: Y,
|
|
60
|
+
setOptions: q,
|
|
61
|
+
getConfig: N,
|
|
62
62
|
clear: J,
|
|
63
63
|
setAccTitle: D,
|
|
64
64
|
getAccTitle: F,
|
|
@@ -72,18 +72,18 @@ var h = {
|
|
|
72
72
|
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
|
73
73
|
}, "populate"), tt = {
|
|
74
74
|
parse: /* @__PURE__ */ c(async (a) => {
|
|
75
|
-
const t = await
|
|
75
|
+
const t = await H("radar", a);
|
|
76
76
|
B.debug(t), K(t);
|
|
77
77
|
}, "parse")
|
|
78
78
|
}, et = /* @__PURE__ */ c((a, t, e, r) => {
|
|
79
|
-
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), p =
|
|
79
|
+
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), p = z(t), u = at(p, o), g = n.max ?? Math.max(...l.map((f) => Math.max(...f.entries))), m = n.min, v = Math.min(o.width, o.height) / 2;
|
|
80
80
|
rt(u, i, v, n.ticks, n.graticule), st(u, i, v, o), A(u, i, l, m, g, n.graticule, o), T(u, l, n.showLegend, o), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -o.height / 2 - o.marginTop);
|
|
81
81
|
}, "draw"), at = /* @__PURE__ */ c((a, t) => {
|
|
82
82
|
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
83
83
|
x: t.marginLeft + t.width / 2,
|
|
84
84
|
y: t.marginTop + t.height / 2
|
|
85
85
|
};
|
|
86
|
-
return
|
|
86
|
+
return V(a, r, e, t.useMaxWidth ?? !0), a.attr("viewBox", `0 0 ${e} ${r}`).attr("overflow", "visible"), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
87
87
|
}, "drawFrame"), rt = /* @__PURE__ */ c((a, t, e, r, s) => {
|
|
88
88
|
if (s === "circle")
|
|
89
89
|
for (let i = 0; i < r; i++) {
|
|
@@ -174,7 +174,7 @@ var nt = { draw: et }, ot = /* @__PURE__ */ c((a, t) => {
|
|
|
174
174
|
}
|
|
175
175
|
return e;
|
|
176
176
|
}, "genIndexStyles"), it = /* @__PURE__ */ c((a) => {
|
|
177
|
-
const t =
|
|
177
|
+
const t = W(), e = C(), r = y(t, e.themeVariables), s = y(r.radar, a);
|
|
178
178
|
return { themeVariables: r, radarOptions: s };
|
|
179
179
|
}, "buildRadarStyleOptions"), lt = /* @__PURE__ */ c(({ radar: a } = {}) => {
|
|
180
180
|
const { themeVariables: t, radarOptions: e } = it(a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./chunk-JWPE2WC7-Bz9dXsLZ.cjs"),n=require("./extractHeadings-D1A8WzVy.cjs"),S=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y={axes:[],curves:[],options:x},p=structuredClone(y),O=n.defaultConfig_default.radar,k=n.__name(()=>n.cleanAndMerge({...O,...n.getConfig().radar}),"getConfig"),f=n.__name(()=>p.axes,"getAxes"),D=n.__name(()=>p.curves,"getCurves"),R=n.__name(()=>p.options,"getOptions"),E=n.__name(a=>{p.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),F=n.__name(a=>{p.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:I(e.entries)}))},"setCurves"),I=n.__name(a=>{if(a[0].axis==null)return a.map(t=>t.value);const e=f();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{const r=a.find(s=>s.axis?.$refText===t.name);if(r===void 0)throw new Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),P=n.__name(a=>{const e=a.reduce((t,r)=>(t[r.name]=r,t),{});p.options={showLegend:e.showLegend?.value??x.showLegend,ticks:e.ticks?.value??x.ticks,max:e.max?.value??x.max,min:e.min?.value??x.min,graticule:e.graticule?.value??x.graticule}},"setOptions"),W=n.__name(()=>{n.clear(),p=structuredClone(y)},"clear"),_={getAxes:f,getCurves:D,getOptions:R,setAxes:E,setCurves:F,setOptions:P,getConfig:k,clear:W,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription},z=n.__name(a=>{L.populateCommonDb(a,_);const{axes:e,curves:t,options:r}=a;_.setAxes(e),_.setCurves(t),_.setOptions(r)},"populate"),G={parse:n.__name(async a=>{const e=await S.parse("radar",a);n.log.debug(e),z(e)},"parse")},B=n.__name((a,e,t,r)=>{const s=r.db,l=s.getAxes(),c=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),g=n.selectSvgElement(e),u=V(g,i),m=o.max??Math.max(...c.map($=>Math.max(...$.entries))),h=o.min,v=Math.min(i.width,i.height)/2;H(u,l,v,o.ticks,o.graticule),j(u,l,v,i),C(u,l,c,h,m,o.graticule,i),A(u,c,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),V=n.__name((a,e)=>{const t=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,s={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return n.configureSvgSize(a,r,t,e.useMaxWidth??!0),a.attr("viewBox",`0 0 ${t} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),H=n.__name((a,e,t,r,s)=>{if(s==="circle")for(let l=0;l<r;l++){const c=t*(l+1)/r;a.append("circle").attr("r",c).attr("class","radarGraticule")}else if(s==="polygon"){const l=e.length;for(let c=0;c<r;c++){const o=t*(c+1)/r,i=e.map((d,g)=>{const u=2*g*Math.PI/l-Math.PI/2,m=o*Math.cos(u),h=o*Math.sin(u);return`${m},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),j=n.__name((a,e,t,r)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l].label,o=2*l*Math.PI/s-Math.PI/2,i=Math.cos(o),d=Math.sin(o);a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*i).attr("y2",t*r.axisScaleFactor*d).attr("class","radarAxisLine");const g=i>.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",m=4;a.append("text").text(c).attr("x",t*r.axisLabelFactor*i+m*i).attr("y",t*r.axisLabelFactor*d+m*d).attr("text-anchor",g).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function C(a,e,t,r,s,l,c){const o=e.length,i=Math.min(c.width,c.height)/2;t.forEach((d,g)=>{if(d.entries.length!==o)return;const u=d.entries.map((m,h)=>{const v=2*Math.PI*h/o-Math.PI/2,$=b(m,r,s,i),M=$*Math.cos(v),T=$*Math.sin(v);return{x:M,y:T}});l==="circle"?a.append("path").attr("d",w(u,c.curveTension)).attr("class",`radarCurve-${g}`):l==="polygon"&&a.append("polygon").attr("points",u.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${g}`)})}n.__name(C,"drawCurves");function b(a,e,t,r){const s=Math.min(Math.max(a,e),t);return r*(s-e)/(t-e)}n.__name(b,"relativeRadius");function w(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<t;s++){const l=a[(s-1+t)%t],c=a[s],o=a[(s+1)%t],i=a[(s+2)%t],d={x:c.x+(o.x-l.x)*e,y:c.y+(o.y-l.y)*e},g={x:o.x-(i.x-c.x)*e,y:o.y-(i.y-c.y)*e};r+=` C${d.x},${d.y} ${g.x},${g.y} ${o.x},${o.y}`}return`${r} Z`}n.__name(w,"closedRoundCurve");function A(a,e,t,r){if(!t)return;const s=(r.width/2+r.marginRight)*3/4,l=-(r.height/2+r.marginTop)*3/4,c=20;e.forEach((o,i)=>{const d=a.append("g").attr("transform",`translate(${s}, ${l+i*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}n.__name(A,"drawLegend");var q={draw:B},Y=n.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];t+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as l, r as m, d as n } from "./chunk-MOJQB5TN-
|
|
2
|
-
import { p } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as t,
|
|
1
|
+
import { g as l, r as m, d as n } from "./chunk-MOJQB5TN-1pZNp2Wl.js";
|
|
2
|
+
import { p } from "./chunk-JWPE2WC7-Djg6Qi23.js";
|
|
3
|
+
import { _ as t, O as o } from "./extractHeadings-CtiYkq2z.js";
|
|
4
4
|
import { M as u, a as f } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
var c = f().RailroadEbnf.parser.LangiumParser, s = /* @__PURE__ */ t((e) => {
|
|
6
6
|
const r = e.alternatives.map(E);
|
|
@@ -98,12 +98,12 @@ var c = f().RailroadEbnf.parser.LangiumParser, s = /* @__PURE__ */ t((e) => {
|
|
|
98
98
|
parser: {
|
|
99
99
|
yy: n
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, N = {
|
|
102
102
|
parser: g,
|
|
103
103
|
db: n,
|
|
104
104
|
renderer: m,
|
|
105
105
|
styles: l
|
|
106
106
|
};
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
N as diagram
|
|
109
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chunk-MOJQB5TN-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./chunk-MOJQB5TN-DUk2Jy4_.cjs"),l=require("./chunk-JWPE2WC7-Bz9dXsLZ.cjs"),t=require("./extractHeadings-D1A8WzVy.cjs"),o=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var m=o.createRailroadEbnfServices().RailroadEbnf.parser.LangiumParser,s=t.__name(e=>{const r=e.alternatives.map(u);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),u=t.__name(e=>{const r=e.elements.map(c);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t.__name(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),p=t.__name((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),c=t.__name(e=>e.postfixes.reduce((r,a)=>p(r,a),i(e.base)),"transformTerm"),f=t.__name(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),d=t.__name(e=>{l.populateCommonDb(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(r=>n.db.addRule(f(r)))},"populateDb"),b={parse:t.__name(e=>{n.db.clear(),t.log.debug("[EBNF Parser] Starting Langium parse");const r=m.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o.MermaidParseError(r);const a=r.value;t.log.debug("[EBNF Parser] Parsed rules:",a.rules.length),d(a),t.log.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},E={parser:b,db:n.db,renderer:n.renderer,styles:n.getStyles};exports.diagram=E;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const EMBED_FRAME_FEATURES: ReadonlySet<string>;
|
|
2
|
+
export declare const EMBED_FRAME_REFERRER_POLICIES: ReadonlySet<string>;
|
|
3
|
+
export declare const allowedFrameUrlOf: (raw: string | undefined, hosts: readonly string[]) => URL | null;
|
|
4
|
+
export declare const reduceFrameFeatures: (allow: string) => string | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EmbedProviderId } from "./providers.ts";
|
|
2
|
+
export declare const LINK_CARD_SIZES: readonly [
|
|
3
|
+
"compact",
|
|
4
|
+
"banner",
|
|
5
|
+
"full"
|
|
6
|
+
];
|
|
7
|
+
export type LinkCardSize = (typeof LINK_CARD_SIZES)[number];
|
|
8
|
+
export declare const isLinkCardSize: (value: unknown) => value is LinkCardSize;
|
|
9
|
+
export interface MarkdownEmbeds {
|
|
10
|
+
readonly providers: readonly EmbedProviderId[];
|
|
11
|
+
readonly linkCardEndpoint: string | null;
|
|
12
|
+
readonly linkCardSize?: LinkCardSize;
|
|
13
|
+
}
|
|
14
|
+
export declare const linkCardSizeOf: (embeds: MarkdownEmbeds) => LinkCardSize;
|
|
15
|
+
export declare const NO_EMBEDS: MarkdownEmbeds;
|
|
16
|
+
export declare const isLinkCardEndpoint: (value: unknown) => value is string;
|
|
17
|
+
export declare const linkCardRequestOf: (endpoint: string, link: URL, pageOrigin: string) => URL;
|
|
18
|
+
export interface LinkCardMetadata {
|
|
19
|
+
readonly title: string | null;
|
|
20
|
+
readonly description: string | null;
|
|
21
|
+
readonly siteName: string | null;
|
|
22
|
+
readonly image: string | null;
|
|
23
|
+
readonly icon: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface LinkCardResponseBody {
|
|
26
|
+
readonly title?: string;
|
|
27
|
+
readonly description?: string;
|
|
28
|
+
readonly site_name?: string;
|
|
29
|
+
readonly image?: string;
|
|
30
|
+
readonly icon?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const LINK_CARD_TEXT_LIMITS: Readonly<{
|
|
33
|
+
title: 300;
|
|
34
|
+
description: 1000;
|
|
35
|
+
siteName: 200;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const linkCardTextOf: (value: unknown, limit: number) => string | null;
|
|
38
|
+
export declare const LINK_CARD_URL_LIMIT = 2048;
|
|
39
|
+
export declare const linkCardMetadataOf: (json: unknown) => LinkCardMetadata | null;
|
|
40
|
+
export declare const LINK_CARD_SKIP_HEADER = "X-Link-Card-Skip";
|
|
41
|
+
export declare const LINK_CARD_SKIP_REASONS: readonly [
|
|
42
|
+
"private-network",
|
|
43
|
+
"forbidden-url",
|
|
44
|
+
"unreachable",
|
|
45
|
+
"not-html"
|
|
46
|
+
];
|
|
47
|
+
export type LinkCardSkipReason = (typeof LINK_CARD_SKIP_REASONS)[number];
|
|
48
|
+
export declare const linkCardSkipReasonOf: (value: string | null) => LinkCardSkipReason | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const EMBED_LINK_ATTRIBUTE = "data-embed-url";
|
|
2
|
+
export declare const EMBED_LINK_SPACE: RegExp;
|
|
3
|
+
export type PlaceholderChild = {
|
|
4
|
+
readonly kind: "link";
|
|
5
|
+
readonly href: string | null;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: "text";
|
|
8
|
+
readonly text: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "element";
|
|
11
|
+
} | {
|
|
12
|
+
readonly kind: "ignored";
|
|
13
|
+
};
|
|
14
|
+
export declare const placeholderLinkOf: (marked: string | null, children: readonly PlaceholderChild[]) => URL | null;
|
|
15
|
+
export declare const isBareLink: (text: string, link: URL) => boolean;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const EMBED_PROVIDER_IDS: readonly [
|
|
2
|
+
"youtube",
|
|
3
|
+
"x",
|
|
4
|
+
"instagram",
|
|
5
|
+
"threads",
|
|
6
|
+
"tiktok",
|
|
7
|
+
"bluesky",
|
|
8
|
+
"linkedin",
|
|
9
|
+
"reddit",
|
|
10
|
+
"note",
|
|
11
|
+
"niconico"
|
|
12
|
+
];
|
|
13
|
+
export type EmbedProviderId = (typeof EMBED_PROVIDER_IDS)[number];
|
|
14
|
+
export type EmbedLayout = {
|
|
15
|
+
readonly kind: "aspect";
|
|
16
|
+
readonly ratio: readonly [
|
|
17
|
+
number,
|
|
18
|
+
number
|
|
19
|
+
];
|
|
20
|
+
readonly maxWidth: number | null;
|
|
21
|
+
readonly minWidth: number | null;
|
|
22
|
+
} | {
|
|
23
|
+
readonly kind: "fixed";
|
|
24
|
+
readonly height: number;
|
|
25
|
+
readonly maxWidth: number;
|
|
26
|
+
readonly minWidth: number | null;
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: "message";
|
|
29
|
+
readonly initialHeight: number;
|
|
30
|
+
readonly maxWidth: number;
|
|
31
|
+
readonly minWidth: number | null;
|
|
32
|
+
readonly heightOf: (data: unknown, frameSrc: string) => number | null;
|
|
33
|
+
};
|
|
34
|
+
export interface EmbedFrameAttributes {
|
|
35
|
+
readonly allow: string | null;
|
|
36
|
+
readonly allowFullScreen: boolean;
|
|
37
|
+
readonly sandbox: string;
|
|
38
|
+
readonly referrerPolicy: "no-referrer" | "strict-origin-when-cross-origin";
|
|
39
|
+
readonly scrolling: "no" | null;
|
|
40
|
+
}
|
|
41
|
+
export interface EmbedProvider {
|
|
42
|
+
readonly id: EmbedProviderId;
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly content: "video" | "post";
|
|
45
|
+
readonly frameOrigin: string;
|
|
46
|
+
readonly frame: EmbedFrameAttributes;
|
|
47
|
+
readonly lookupOrigin: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface EmbedContext {
|
|
50
|
+
readonly theme: "light" | "dark";
|
|
51
|
+
readonly lang: string | null;
|
|
52
|
+
}
|
|
53
|
+
export type EmbedResolution = {
|
|
54
|
+
readonly kind: "frame";
|
|
55
|
+
readonly provider: EmbedProvider;
|
|
56
|
+
readonly layout: EmbedLayout;
|
|
57
|
+
readonly srcOf: (context: EmbedContext) => string;
|
|
58
|
+
} | {
|
|
59
|
+
readonly kind: "lookup";
|
|
60
|
+
readonly provider: EmbedProvider;
|
|
61
|
+
readonly layout: EmbedLayout;
|
|
62
|
+
readonly request: URL;
|
|
63
|
+
readonly srcOf: (response: unknown, context: EmbedContext) => string | null;
|
|
64
|
+
};
|
|
65
|
+
export declare const EMBED_FRAME_HEIGHT_LIMITS: Readonly<{
|
|
66
|
+
min: 80;
|
|
67
|
+
max: 4000;
|
|
68
|
+
}>;
|
|
69
|
+
export declare const EMBED_PROVIDERS: Readonly<Record<EmbedProviderId, EmbedProvider>>;
|
|
70
|
+
export declare const resolveEmbed: (link: URL, enabled: readonly EmbedProviderId[]) => EmbedResolution | null;
|
|
71
|
+
export declare const embedFrameHostsOf: (enabled: readonly EmbedProviderId[]) => readonly string[];
|
|
72
|
+
export declare const embedConnectOriginsOf: (enabled: readonly EmbedProviderId[]) => readonly string[];
|
|
73
|
+
export declare const isEmbedProviderId: (value: unknown) => value is EmbedProviderId;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../providers-Bxr2Wb-j.cjs"),n=e=>{if(e!==null&&typeof e=="object"){for(const t of Object.values(e))n(t);Object.freeze(e)}return e},o=n({x:{src:"https://platform.twitter.com/embed/Tweet.html?id=20&theme=dark&lang=ja&dnt=true",messages:[{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.initialized",id:"embed-0",params:[{iframe_version:"3f8c13b4620b8:1779816981886",data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.results",id:"embed-0",params:[{data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.resize",id:"embed-0",params:[{width:550,height:225,data:{tweet_id:"20"}}]}},{"twttr.embed":{jsonrpc:"2.0",method:"twttr.private.rendered",id:"embed-0",params:[{data:{tweet_id:"20"}}]}}]},instagram:{src:"https://www.instagram.com/p/BsOGulcndj-/embed/",messages:['{"details":{},"type":"LOADING"}','{"details":{"height":748},"type":"MEASURE"}','{"details":{"styles":[["boxShadow","none"],["border","1px solid #dbdbdb"],["margin","0px 0px 12px"]]},"type":"MOUNTED"}','{"details":{"height":748},"type":"MEASURE"}','{"details":{"height":748},"type":"MEASURE"}']},threads:{src:"https://www.threads.com/@zuck/post/CuP48CiS5sx/embed/",messages:[177]},bluesky:{src:"https://embed.bsky.app/embed/did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mx5e63uvns2d",messages:[{height:366.75,id:null},{height:1116.359375,id:null}]},reddit:{src:"https://embed.reddit.com/r/announcements/comments/t93ec3/this_subreddit_is_closed_for_new_posts_and/?embed=true",messages:['{"type":"resize.embed","data":240}']},note:{src:"https://note.com/embed/notes/nea1b96233fbf",messages:["height::https://note.com/embed/notes/nea1b96233fbf::208"]}}),m=(e,t,s)=>{if(e==="note"&&typeof t=="string")return`height::${s.href}::${t.slice(t.lastIndexOf("::")+2)}`;if(e==="x"){const r=s.searchParams.get("id");if(r===null)throw new RangeError(`[embeds/testing] an X frame URL needs an id parameter: ${s.href}`);const a=JSON.parse(JSON.stringify(t));for(const d of a["twttr.embed"].params)d.data.tweet_id=r;return a}return t},i=e=>e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">").replace(/"/gu,"""),c=e=>{const t=Object.values(p.EMBED_PROVIDERS).find(d=>d.frameOrigin===e.origin);if(t===void 0)throw new RangeError(`[embeds/testing] no embed provider frames ${e.origin}`);const s=o[t.id],r=s===void 0?[]:s.messages.map(d=>m(t.id,d,e)),a=r.length===0?"":`<script>for (const data of ${JSON.stringify(r).replace(/</gu,"\\u003c")}) parent.postMessage(data, "*")<\/script>`;return`<!doctype html><html lang="en"><head><meta charset="utf-8"><title>${i(t.name)} stub</title></head><body><p data-embed-stub="${t.id}">${i(t.name)} stub: ${i(e.href)}</p>${a}</body></html>`};exports.EMBED_PROVIDER_MESSAGE_SAMPLES=o;exports.embedProviderStubPage=c;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EmbedProviderId } from "./providers.ts";
|
|
2
|
+
export interface EmbedProviderMessageSample {
|
|
3
|
+
readonly src: string;
|
|
4
|
+
readonly messages: readonly unknown[];
|
|
5
|
+
}
|
|
6
|
+
export declare const EMBED_PROVIDER_MESSAGE_SAMPLES: Readonly<Partial<Record<EmbedProviderId, EmbedProviderMessageSample>>>;
|
|
7
|
+
export declare const embedProviderStubPage: (frameUrl: URL) => string;
|