@aiquants/markdown 12.3.0 → 13.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 +551 -76
- package/dist/{abnfDiagram-VRR7QNED-B_QmXzWv.js → abnfDiagram-VRR7QNED-B3Q9attM.js} +9 -9
- package/dist/abnfDiagram-VRR7QNED-QW4YM2AY.cjs +1 -0
- package/dist/arc-BBLXr5EU.js +83 -0
- package/dist/arc-Cn8XXgbN.cjs +1 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-CEb923Bc.js → architectureDiagram-ZJ3FMSHR-BaSp0hC2.js} +123 -123
- package/dist/architectureDiagram-ZJ3FMSHR-BfmjNYww.cjs +36 -0
- package/dist/{blockDiagram-677ZJIJ3-CmKMdhaS.js → blockDiagram-677ZJIJ3-DFcPQ19k.js} +166 -166
- package/dist/{blockDiagram-677ZJIJ3-D7RRzjUx.cjs → blockDiagram-677ZJIJ3-u7d3VCxA.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-CG6fvZQo.js → c4Diagram-LMCZKHZV-DW0yo5tR.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-W7Qa-ecL.cjs → c4Diagram-LMCZKHZV-nScsMUE3.cjs} +1 -1
- package/dist/{channel-TsF8sms_.js → channel-B2FBCr9X.js} +1 -1
- package/dist/channel-DlkTPSf_.cjs +1 -0
- package/dist/{chunk-2Q5K7J3B-CopwR1m3.js → chunk-2Q5K7J3B-BkE4Fsuz.js} +1 -1
- package/dist/chunk-2Q5K7J3B-evSha-HP.cjs +1 -0
- package/dist/{chunk-32BRIVSS-BnNlhc1M.js → chunk-32BRIVSS-CqpDiZD2.js} +1 -1
- package/dist/chunk-32BRIVSS-rIw6tBRO.cjs +1 -0
- package/dist/{chunk-5VM5RSS4-lKwSmIqG.cjs → chunk-5VM5RSS4-CYVpj2mc.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-O28FGAOF.js → chunk-5VM5RSS4-DAgNhPcU.js} +1 -1
- package/dist/{chunk-EX3LRPZG-CtFe4olX.cjs → chunk-EX3LRPZG-Ct2cyGh-.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-C36gZH3_.js → chunk-EX3LRPZG-QFjD28UF.js} +21 -21
- package/dist/{chunk-JWPE2WC7-DG0ebjV4.js → chunk-JWPE2WC7-Bj2m1SXZ.js} +1 -1
- package/dist/chunk-JWPE2WC7-Dgw1ILoe.cjs +1 -0
- package/dist/{chunk-MOJQB5TN-nqR_swpx.js → chunk-MOJQB5TN-B1fdnpCz.js} +122 -122
- package/dist/{chunk-MOJQB5TN-DADVbG98.cjs → chunk-MOJQB5TN-yjlPYCh4.cjs} +3 -3
- package/dist/{chunk-PUDLZKDR-BUSFO-Gx.cjs → chunk-PUDLZKDR-BlQ3qKcC.cjs} +4 -4
- package/dist/{chunk-PUDLZKDR-CD96jce3.js → chunk-PUDLZKDR-CIcw3cpm.js} +21 -21
- package/dist/chunk-RYQCIY6F-B-V6UOJy.cjs +1 -0
- package/dist/{chunk-RYQCIY6F-DJkrr1sD.js → chunk-RYQCIY6F-DyVk8fNp.js} +5 -5
- package/dist/{chunk-V7JOEXUC-BzCaDGop.cjs → chunk-V7JOEXUC-B1EgagKh.cjs} +3 -3
- package/dist/{chunk-V7JOEXUC-eBy2sAXD.js → chunk-V7JOEXUC-C776k7_V.js} +15 -15
- package/dist/{chunk-VR4S4FIN-C-qPzUSR.js → chunk-VR4S4FIN-CyqARa17.js} +5 -5
- package/dist/chunk-VR4S4FIN-Sx71KwIQ.cjs +1 -0
- package/dist/{chunk-XXDRQBXY-BK6HOWf6.js → chunk-XXDRQBXY-B-99Fbs_.js} +3 -3
- package/dist/chunk-XXDRQBXY-BgeRIUG1.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-BLAiuPPL.cjs +1 -0
- package/dist/{classDiagram-v2-EOCWNBFH-CPDmG5kI.js → classDiagram-OUVF2IWQ-DJ0hW16Q.js} +2 -2
- package/dist/classDiagram-v2-EOCWNBFH-BLAiuPPL.cjs +1 -0
- package/dist/{classDiagram-OUVF2IWQ-CPDmG5kI.js → classDiagram-v2-EOCWNBFH-DJ0hW16Q.js} +2 -2
- package/dist/{code-blocks-BWr5Xg1I.js → code-blocks-C6J8rVTc.js} +23 -22
- package/dist/{code-blocks-BdKjppKq.cjs → code-blocks-CTESwslp.cjs} +3 -3
- package/dist/code-blocks.cjs +1 -1
- package/dist/code-blocks.d.ts +1 -0
- package/dist/code-blocks.js +15 -14
- package/dist/components/CopyButton.d.ts +1 -2
- package/dist/components/MarkdownRenderer.d.ts +36 -3
- package/dist/components/MarkdownViewer.d.ts +11 -2
- package/dist/components/MermaidDiagram.d.ts +21 -0
- package/dist/components/ReadingPlaceKeeper.d.ts +32 -0
- package/dist/components/SelectionKeeper.d.ts +38 -0
- package/dist/components/SpreadsheetBlock.d.ts +2 -1
- package/dist/components/blockKeys.d.ts +9 -2
- package/dist/components/blockNotice.d.ts +15 -0
- package/dist/components/blockOffsets.d.ts +3 -0
- package/dist/components/clipboard.d.ts +1 -0
- package/dist/components/embeds/ClientFrame.d.ts +1 -0
- package/dist/components/embeds/ProviderEmbed.d.ts +2 -1
- package/dist/components/embeds/embedLabels.d.ts +1 -1
- package/dist/components/embeds/linkCardFetch.d.ts +2 -0
- package/dist/components/embeds.d.ts +5 -0
- package/dist/components/fileSave.d.ts +1 -0
- package/dist/components/headingLevels.d.ts +6 -0
- package/dist/components/htmlNodes.d.ts +2 -0
- package/dist/components/htmlSanitizer.d.ts +15 -2
- package/dist/components/labels.d.ts +3 -2
- package/dist/components/links.d.ts +1 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +3 -1
- package/dist/components/mermaidAccessibility.d.ts +11 -0
- package/dist/components/mermaidExport.d.ts +24 -0
- package/dist/components/mermaidLabels.d.ts +89 -0
- package/dist/components/mermaidSetup.d.ts +10 -0
- package/dist/components/missingImageLabels.d.ts +2 -0
- package/dist/components/ownPixels.d.ts +1 -0
- package/dist/components/rawHtml.d.ts +7 -3
- package/dist/components/spreadsheetClipboard.d.ts +1 -1
- package/dist/components/spreadsheetModel.d.ts +1 -0
- package/dist/components/svgRaster.d.ts +2 -2
- package/dist/components/viewerLabels.d.ts +13 -3
- package/dist/contentColors.d.ts +21 -0
- package/dist/conversion.d.ts +7 -0
- package/dist/converter/NOTICES.md +6 -6
- package/dist/converter/createMarkdownConverter.d.ts +1 -0
- package/dist/converter/protocol.d.ts +4 -0
- package/dist/converter.cjs +1 -1
- package/dist/converter.js +89 -71
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-BxO1rjEU.js → cose-bilkent-JH36ORCC-CR6Hdvto.js} +24 -24
- package/dist/cose-bilkent-JH36ORCC-reAbGeDU.cjs +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-2qz-sUtp.cjs +62 -0
- package/dist/{cynefinDiagram-TSTJHNR4-DBD-B_Un.js → cynefinDiagram-TSTJHNR4-D1eY-FSf.js} +65 -65
- package/dist/dagre-VKFMJZFB-Byr9WPjb.cjs +4 -0
- package/dist/{dagre-VKFMJZFB-B8vZCPJg.js → dagre-VKFMJZFB-CXSczF8v.js} +26 -26
- package/dist/{diagram-FQU43EPY-DwhEcKWF.cjs → diagram-FQU43EPY-2YWng437.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-YrRTNuX-.js → diagram-FQU43EPY-BZo0xcaj.js} +54 -54
- package/dist/diagram-G47NLZAW-CQS7BN4F.cjs +24 -0
- package/dist/{diagram-G47NLZAW-D4vmirJw.js → diagram-G47NLZAW-CvJW9ny8.js} +65 -65
- package/dist/{diagram-NH7WQ7WH-Drekwiur.js → diagram-NH7WQ7WH-C6VIkj-R.js} +18 -18
- package/dist/diagram-NH7WQ7WH-DXUwOBe7.cjs +24 -0
- package/dist/{diagram-OA4YK3LP-DZsM4Fpo.js → diagram-OA4YK3LP-Co6nMbJc.js} +29 -29
- package/dist/{diagram-OA4YK3LP-DeJ7pMIO.cjs → diagram-OA4YK3LP-DBUm2qxb.cjs} +3 -3
- package/dist/{diagram-WEI45ONY-CjRbsbkF.js → diagram-WEI45ONY-BaMbc5o2.js} +76 -76
- package/dist/diagram-WEI45ONY-ChpK2gP3.cjs +41 -0
- package/dist/ebnfDiagram-CCIWWBDH-DMIRHp8N.cjs +1 -0
- package/dist/{ebnfDiagram-CCIWWBDH-D0kt5Zdu.js → ebnfDiagram-CCIWWBDH-i7CR-FU0.js} +3 -3
- package/dist/embeds/frames.d.ts +4 -0
- package/dist/embeds/linkCards.d.ts +3 -1
- package/dist/embeds/providers.d.ts +1 -0
- package/dist/embeds/testing.cjs +1 -1
- package/dist/embeds/testing.js +1 -1
- package/dist/embeds-B4g6w7Tf.cjs +1 -0
- package/dist/embeds-Dra-dGKD.js +64 -0
- package/dist/embeds.cjs +1 -1
- package/dist/embeds.d.ts +2 -2
- package/dist/embeds.js +31 -70
- package/dist/{erDiagram-Q63AITRT-Ce4GpK2Z.js → erDiagram-Q63AITRT-DC-HhdaO.js} +69 -69
- package/dist/{erDiagram-Q63AITRT-DqFANbZx.cjs → erDiagram-Q63AITRT-DjRvJyWK.cjs} +1 -1
- package/dist/errors-BWZJx2MD.cjs +1 -0
- package/dist/errors-CapTNE7l.js +62 -0
- package/dist/errors.d.ts +2 -2
- package/dist/extractHeadings-BfYlTVvN.js +6773 -0
- package/dist/extractHeadings-CZPJi4gM.cjs +12 -0
- package/dist/flowDiagram-23GEKE2U-CiNzp6BS.js +7 -0
- package/dist/flowDiagram-23GEKE2U-DzZNPkRJ.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DjpANtqX.js → ganttDiagram-NO4QXBWP-BwbtaPxc.js} +69 -69
- package/dist/ganttDiagram-NO4QXBWP-CJv5UQ4O.cjs +292 -0
- package/dist/gen/markdown/v1/linkcard_connect.d.ts +19 -0
- package/dist/gen/markdown/v1/linkcard_pb.d.ts +87 -0
- package/dist/gen/markdown/v1/markdown_pb.d.ts +4 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-DzhnsGXo.js → gitGraphDiagram-IHSO6WYX--yebcp4V.js} +26 -26
- package/dist/gitGraphDiagram-IHSO6WYX-dSwtW7X6.cjs +106 -0
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +6 -3
- package/dist/index.client.js +54 -46
- package/dist/index.js +54 -46
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.d.ts +2 -1
- package/dist/index.server.js +126 -873
- package/dist/{infoDiagram-FWYZ7A6U-hraoyboI.js → infoDiagram-FWYZ7A6U-B4AiTiqD.js} +9 -9
- package/dist/infoDiagram-FWYZ7A6U-BOj0VF20.cjs +2 -0
- package/dist/{ishikawaDiagram-FXEZZL3T-cBJei3wJ.js → ishikawaDiagram-FXEZZL3T-BsYs_qnQ.js} +55 -55
- package/dist/{ishikawaDiagram-FXEZZL3T-D5b25aDN.cjs → ishikawaDiagram-FXEZZL3T-CisV4kPO.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-DrNyUSsx.cjs → journeyDiagram-5HDEW3XC-BAvgWwpr.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-IkQqMl8f.js → journeyDiagram-5HDEW3XC-DbDo-dqu.js} +29 -29
- package/dist/{kanban-definition-HUTT4EX6-D2UL88Cz.js → kanban-definition-HUTT4EX6-BlPZISwH.js} +111 -111
- package/dist/{kanban-definition-HUTT4EX6-CvBgN3eX.cjs → kanban-definition-HUTT4EX6-RjzOWas9.cjs} +2 -2
- package/dist/{linear-BiJV9gYf.js → linear-BXWX8YXI.js} +33 -33
- package/dist/linear-CKPQExK8.cjs +1 -0
- package/dist/linkCardServer/linkCardCore.d.ts +10 -0
- package/dist/linkCardServer/linkCardHandler.server.d.ts +1 -6
- package/dist/linkCardServer/pageFetchPort.d.ts +19 -0
- package/dist/linkCardServer/{pageMetadata.server.d.ts → pageMetadata.d.ts} +11 -3
- package/dist/linkCards-BikpIncf.cjs +1 -0
- package/dist/linkCards-DfSLqLPF.js +50 -0
- package/dist/linkCards.cjs +1 -0
- package/dist/linkCards.d.ts +2 -0
- package/dist/linkCards.js +5 -0
- package/dist/markdownServiceClient-C47z3Ynu.cjs +1 -0
- package/dist/markdownServiceClient-uDeklhtG.js +480 -0
- package/dist/markdownServiceClient.d.ts +20 -0
- package/dist/mermaid.core-C4EClWgB.js +15595 -0
- package/dist/mermaid.core-CRP55Hm1.cjs +305 -0
- package/dist/mermaidFrame/NOTICES.md +1345 -0
- package/dist/mermaidFrame/browserPaintView.d.ts +3 -0
- package/dist/mermaidFrame/cssCleaner.d.ts +29 -0
- package/dist/mermaidFrame/diagramPalette.d.ts +24 -0
- package/dist/mermaidFrame/diagramTheme.d.ts +7 -0
- package/dist/mermaidFrame/drawableTypes.d.ts +6 -0
- package/dist/mermaidFrame/drawer.d.ts +47 -0
- package/dist/mermaidFrame/frame.d.ts +1 -0
- package/dist/mermaidFrame/frame.js +3308 -0
- package/dist/mermaidFrame/insertion.d.ts +11 -0
- package/dist/mermaidFrame/katexInert.d.ts +4 -0
- package/dist/mermaidFrame/namespaces.d.ts +3 -0
- package/dist/mermaidFrame/paintCheck.d.ts +2 -0
- package/dist/mermaidFrame/paintContract.d.ts +3 -0
- package/dist/mermaidFrame/paintDiagram.d.ts +3 -0
- package/dist/mermaidFrame/paintMap.d.ts +103 -0
- package/dist/mermaidFrame/paintRules.d.ts +18 -0
- package/dist/mermaidFrame/protocol.d.ts +43 -0
- package/dist/mermaidFrame/serve.d.ts +19 -0
- package/dist/mermaidFrame/svgCleaner.d.ts +4 -0
- package/dist/{mindmap-definition-LN4V7U3C-CK67hf6V.js → mindmap-definition-LN4V7U3C-BEWpoMMG.js} +75 -75
- package/dist/{mindmap-definition-LN4V7U3C-CBrUse7P.cjs → mindmap-definition-LN4V7U3C-DnbSfqWP.cjs} +3 -3
- package/dist/pageFetchPort-2H18xcdi.cjs +1 -0
- package/dist/pageFetchPort-DVpXsKCz.js +624 -0
- package/dist/{pegDiagram-2B236MQR-CwWX4Irn.js → pegDiagram-2B236MQR-BF7gLiB-.js} +3 -3
- package/dist/pegDiagram-2B236MQR-BJysMObA.cjs +1 -0
- package/dist/{pieDiagram-ENE6RG2P-MO42pSl8.js → pieDiagram-ENE6RG2P-D_YzC3qc.js} +65 -65
- package/dist/{pieDiagram-ENE6RG2P-BKvggS7k.cjs → pieDiagram-ENE6RG2P-UMpeIUyV.cjs} +2 -2
- package/dist/{providers-BwQK7hZa.js → providers-CSvkTZsr.js} +17 -2
- package/dist/{providers-DO2t7ks4.cjs → providers-Cx0FuVQU.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-BHhoAvLS.cjs → quadrantDiagram-ABIIQ3AL-DANY0ipQ.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-CzHgLdS3.js → quadrantDiagram-ABIIQ3AL-DDm-r_6D.js} +57 -57
- package/dist/railroadDiagram-RFXS5EU6-CDUd4th1.cjs +1 -0
- package/dist/{railroadDiagram-RFXS5EU6-Bu_Fhi5x.js → railroadDiagram-RFXS5EU6-hJ6uB90G.js} +3 -3
- package/dist/remarkProcessor.server.d.ts +2 -0
- package/dist/{requirementDiagram-TGXJPOKE-CY-JYM-P.js → requirementDiagram-TGXJPOKE-BJef5Jb0.js} +29 -29
- package/dist/{requirementDiagram-TGXJPOKE-BhdvQnjG.cjs → requirementDiagram-TGXJPOKE-DaoCo7go.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-BmHtjxlW.js → sankeyDiagram-HTMAVEWB-BZQs0bE-.js} +48 -48
- package/dist/{sankeyDiagram-HTMAVEWB-CUeYKZeQ.cjs → sankeyDiagram-HTMAVEWB-DXiv0YOu.cjs} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-GepntdDB.cjs → sequenceDiagram-DBY2YBRQ-CJGpsnsv.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-Cn2CC9BC.js → sequenceDiagram-DBY2YBRQ-D05U2w26.js} +86 -86
- package/dist/serviceClient.cjs +1 -0
- package/dist/serviceClient.d.ts +3 -0
- package/dist/serviceClient.js +9 -0
- package/dist/{sizeCapture-X5ZJPWSS-CZF99dy_.js → sizeCapture-X5ZJPWSS-DTr0Vm61.js} +1 -1
- package/dist/sizeCapture-X5ZJPWSS-DjuH1zNP.cjs +1 -0
- package/dist/{stateDiagram-2N3HPSRC-CCbBvBua.js → stateDiagram-2N3HPSRC-B8nvJKpB.js} +20 -20
- package/dist/stateDiagram-2N3HPSRC-BrB47FD-.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CC8gOGDK.cjs +1 -0
- package/dist/{stateDiagram-v2-6OUMAXLB-_A1QESxx.js → stateDiagram-v2-6OUMAXLB-CV-JqAeP.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-B-BDM_Ae.js → swimlanes-5IMT3BWC-BPtufzUd.js} +3 -3
- package/dist/swimlanes-5IMT3BWC-WAbDPRgt.cjs +1 -0
- package/dist/{swimlanesDiagram-G3AALYLV-BysT2rWl.js → swimlanesDiagram-G3AALYLV-BQKEmJFX.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-DZuQxKuB.cjs → swimlanesDiagram-G3AALYLV-BTwwtLZL.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-DVzdzbl1.js → timeline-definition-FHXFAJF6-DJ6GV7Fz.js} +34 -34
- package/dist/{timeline-definition-FHXFAJF6-oFf_sUOI.cjs → timeline-definition-FHXFAJF6-qdkrah7t.cjs} +1 -1
- package/dist/vennDiagram-L72KCM5P-B5onSWPA.cjs +34 -0
- package/dist/{vennDiagram-L72KCM5P-Bm1TGZux.js → vennDiagram-L72KCM5P-DWnnndTj.js} +196 -196
- package/dist/viewer-settings.cjs +1 -1
- package/dist/viewer-settings.d.ts +8 -0
- package/dist/viewer-settings.js +11 -5
- package/dist/{wardleyDiagram-EHGQE667-BC_1RAbp.js → wardleyDiagram-EHGQE667-DFmDgQSb.js} +41 -41
- package/dist/{wardleyDiagram-EHGQE667-CqB3gLCH.cjs → wardleyDiagram-EHGQE667-DdeBbvVM.cjs} +2 -2
- package/dist/{xychartDiagram-FW5EYKEG-a1vb5UxD.cjs → xychartDiagram-FW5EYKEG-CiJQMClv.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-ClITdEhV.js → xychartDiagram-FW5EYKEG-L2Kj4cZA.js} +28 -28
- package/package.json +31 -13
- package/dist/abnfDiagram-VRR7QNED-Crz-ChMJ.cjs +0 -1
- package/dist/arc-BKGy6Me1.js +0 -83
- package/dist/arc-CYJCyviq.cjs +0 -1
- package/dist/architectureDiagram-ZJ3FMSHR-gTB8pttO.cjs +0 -36
- package/dist/channel-BKoPLS2j.cjs +0 -1
- package/dist/chunk-2Q5K7J3B-DgtYKcDs.cjs +0 -1
- package/dist/chunk-32BRIVSS-D-6GBFtx.cjs +0 -1
- package/dist/chunk-JWPE2WC7-5sd39cpa.cjs +0 -1
- package/dist/chunk-RYQCIY6F-BBTBydZd.cjs +0 -1
- package/dist/chunk-VR4S4FIN-CHKLwvYh.cjs +0 -1
- package/dist/chunk-XXDRQBXY-DttkP7wv.cjs +0 -1
- package/dist/classDiagram-OUVF2IWQ-BKruajP_.cjs +0 -1
- package/dist/classDiagram-v2-EOCWNBFH-BKruajP_.cjs +0 -1
- package/dist/cose-bilkent-JH36ORCC-Cjfa6NyL.cjs +0 -1
- package/dist/cynefinDiagram-TSTJHNR4-B3boTACW.cjs +0 -62
- package/dist/dagre-VKFMJZFB-DF3Mvuas.cjs +0 -4
- package/dist/diagram-G47NLZAW-CKIEbGLS.cjs +0 -24
- package/dist/diagram-NH7WQ7WH-D6wMwkLQ.cjs +0 -24
- package/dist/diagram-WEI45ONY-SYHw7k8b.cjs +0 -41
- package/dist/ebnfDiagram-CCIWWBDH-23bjk9FU.cjs +0 -1
- package/dist/errors-BW5JXRoX.cjs +0 -1
- package/dist/errors-Blk_XJ9C.js +0 -55
- package/dist/extractHeadings-DlQcPv5N.js +0 -20361
- package/dist/extractHeadings-wWAipplS.cjs +0 -315
- package/dist/flowDiagram-23GEKE2U-CRC9U6qD.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-CRo7TM3K.js +0 -7
- package/dist/ganttDiagram-NO4QXBWP-CR55KG5d.cjs +0 -292
- package/dist/gitGraphDiagram-IHSO6WYX-BWYUn1Bi.cjs +0 -106
- package/dist/infoDiagram-FWYZ7A6U-CsUGc58_.cjs +0 -2
- package/dist/linear-DwqXGYLc.cjs +0 -1
- package/dist/linkCardServer/addressGuard.server.d.ts +0 -25
- package/dist/linkCardServer/pageFetch.server.d.ts +0 -37
- package/dist/linkCards-1JxY8wdm.js +0 -48
- package/dist/linkCards-Bjd_vW39.cjs +0 -1
- package/dist/pegDiagram-2B236MQR-C5pLIpKI.cjs +0 -1
- package/dist/railroadDiagram-RFXS5EU6-CwGmOFD_.cjs +0 -1
- package/dist/sizeCapture-X5ZJPWSS-Cd-k8xwk.cjs +0 -1
- package/dist/stateDiagram-2N3HPSRC-D2cvrAtN.cjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-BaktPIVY.cjs +0 -1
- package/dist/swimlanes-5IMT3BWC-DtdLK5z3.cjs +0 -1
- package/dist/vennDiagram-L72KCM5P-Ba2FGeN1.cjs +0 -34
- /package/dist/linkCardServer/{htmlEncoding.server.d.ts → htmlEncoding.d.ts} +0 -0
- /package/dist/linkCardServer/{metadataCache.server.d.ts → metadataCache.d.ts} +0 -0
|
@@ -2,16 +2,20 @@ import { Element, HTMLReactParserOptions } from "html-react-parser";
|
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
import { ResolvedEmbedLabels } from "./embeds/embedLabels.ts";
|
|
4
4
|
import { IFrameEmbed } from "./embeds.ts";
|
|
5
|
+
import { AllowlistContext, HtmlAllowlist } from "./htmlSanitizer.ts";
|
|
5
6
|
import { ResolvedLabel } from "./labels.ts";
|
|
6
7
|
import { MarkdownLinkComponent } from "./MarkdownRenderer.tsx";
|
|
7
|
-
export declare const renderEmbed: (embed: IFrameEmbed, pluginType: string | null, iFrameAllowedDomains: readonly string[], label: ResolvedLabel, insideAnchor: boolean) => ReactElement;
|
|
8
|
+
export declare const renderEmbed: (embed: IFrameEmbed, pluginType: string | null, iFrameAllowedDomains: readonly string[], label: ResolvedLabel, insideAnchor: boolean, frameSandbox: string) => ReactElement;
|
|
8
9
|
export declare const isInsideAnchor: (node: Element) => boolean;
|
|
9
|
-
export declare const renderAnchor: (domNode: Element, options: HTMLReactParserOptions, LinkComponent: MarkdownLinkComponent | undefined) => ReactElement;
|
|
10
|
+
export declare const renderAnchor: (domNode: Element, options: HTMLReactParserOptions, LinkComponent: MarkdownLinkComponent | undefined, allowlist: HtmlAllowlist) => ReactElement;
|
|
10
11
|
export interface RawHtmlOptions {
|
|
11
12
|
readonly iFrameAllowedDomains: readonly string[];
|
|
12
13
|
readonly embedLabels: ResolvedEmbedLabels;
|
|
14
|
+
readonly frameSandbox: string;
|
|
13
15
|
readonly linkComponent?: MarkdownLinkComponent;
|
|
16
|
+
readonly allowlistContext: AllowlistContext;
|
|
17
|
+
readonly renderImage?: (element: Element, options: HTMLReactParserOptions) => ReactElement;
|
|
14
18
|
readonly renderPlaceholder?: (element: Element, link: string, options: HTMLReactParserOptions) => ReactElement | undefined;
|
|
15
19
|
readonly renderKept?: (element: Element, options: HTMLReactParserOptions) => ReactElement | undefined;
|
|
16
20
|
}
|
|
17
|
-
export declare const rawHtmlParserOptions: ({ iFrameAllowedDomains, embedLabels, linkComponent, renderPlaceholder, renderKept }: RawHtmlOptions) => HTMLReactParserOptions;
|
|
21
|
+
export declare const rawHtmlParserOptions: ({ iFrameAllowedDomains, embedLabels, frameSandbox, linkComponent, allowlistContext, renderImage, renderPlaceholder, renderKept }: RawHtmlOptions) => HTMLReactParserOptions;
|
|
@@ -13,4 +13,4 @@ export declare const clipboardFlavoursOf: (matrix: TableMatrix, serializers: Cli
|
|
|
13
13
|
export declare const writeClipboardFlavours: (flavours: ClipboardFlavours, clipboard: Pick<Clipboard, "write">, createItem: (items: Record<string, Blob>) => ClipboardItem) => Promise<void>;
|
|
14
14
|
export declare const TSV_FILE_TYPE = "text/tab-separated-values;charset=utf-8";
|
|
15
15
|
export declare const tsvFileTextOf: (matrix: TableMatrix, withByteOrderMark: boolean) => string;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const tsvFileOf: (matrix: TableMatrix, withByteOrderMark: boolean) => Blob;
|
|
@@ -4,6 +4,7 @@ export declare const SPREADSHEET_BLOCK_ROW_HEIGHT_PX = 24;
|
|
|
4
4
|
export declare const SPREADSHEET_SPARE_ROWS = 1;
|
|
5
5
|
export declare const SPREADSHEET_SPARE_COLUMNS = 1;
|
|
6
6
|
export declare const SPREADSHEET_DOCUMENT_TAP_SCROLL_CIRCLE_SIZE_PX = 24;
|
|
7
|
+
export declare const documentTapScrollCircleSizeOf: (size: number | undefined) => number;
|
|
7
8
|
export declare const PLAIN_CELL_FORMAT: CellFormat;
|
|
8
9
|
export declare const tableCellsOf: (body: string) => number;
|
|
9
10
|
export declare const SPREADSHEET_STATIC_MAX_COLUMNS = 26;
|
|
@@ -5,5 +5,5 @@ export type RasterSize = {
|
|
|
5
5
|
readonly height: number;
|
|
6
6
|
};
|
|
7
7
|
export declare const hasOwnSvgSize: (text: string, view: Window & typeof globalThis) => boolean;
|
|
8
|
-
export declare const rasterSizeOf: (natural: RasterSize, shown: RasterSize) => RasterSize | null;
|
|
9
|
-
export declare const rasterizeSvg: (text: string, shown: RasterSize, view: Window & typeof globalThis) => Promise<Blob>;
|
|
8
|
+
export declare const rasterSizeOf: (natural: RasterSize, shown: RasterSize, scale: number) => RasterSize | null;
|
|
9
|
+
export declare const rasterizeSvg: (text: string, shown: RasterSize, scale: number, view: Window & typeof globalThis) => Promise<Blob>;
|
|
@@ -2,11 +2,12 @@ import { CodeBlockLabelKey, CodeBlockLabels } from "./codeBlockLabels.ts";
|
|
|
2
2
|
import { DisplayMathLabelKey, DisplayMathLabels } from "./displayMathLabels.ts";
|
|
3
3
|
import { MarkdownEmbedLabels } from "./embeds/embedLabels.ts";
|
|
4
4
|
import { ResolvedLabel } from "./labels.ts";
|
|
5
|
-
import { MermaidDiagramLabelKey, MermaidDiagramLabels } from "./mermaidLabels.ts";
|
|
5
|
+
import { MermaidDiagramLabelKey, MermaidDiagramLabels, MermaidExportLabelKey, MermaidFrameFailureLabelKey, MermaidHeldLabelKey } from "./mermaidLabels.ts";
|
|
6
6
|
import { SpreadsheetBlockLabelKey, SpreadsheetBlockLabels } from "./spreadsheetLabels.ts";
|
|
7
7
|
import { SvgImageLabelKey, SvgImageLabels } from "./svgImageLabels.ts";
|
|
8
|
+
type MermaidViewerDiagramLabelKey = Exclude<MermaidDiagramLabelKey, MermaidFrameFailureLabelKey | MermaidExportLabelKey | MermaidHeldLabelKey>;
|
|
8
9
|
export type MermaidViewerLabels = {
|
|
9
|
-
[K in
|
|
10
|
+
[K in Exclude<MermaidViewerDiagramLabelKey, "errorPrefix"> as `mermaid${Capitalize<K>}`]?: string;
|
|
10
11
|
};
|
|
11
12
|
export type SpreadsheetViewerLabels = {
|
|
12
13
|
[K in SpreadsheetBlockLabelKey as `spreadsheet${Capitalize<K>}`]?: string;
|
|
@@ -31,6 +32,15 @@ export interface MarkdownViewerLabels extends MermaidViewerLabels, SpreadsheetVi
|
|
|
31
32
|
selectStyleAria?: string;
|
|
32
33
|
pinStyleAria?: string;
|
|
33
34
|
unpinStyleAria?: string;
|
|
35
|
+
styleSectionTitle?: string;
|
|
36
|
+
measureTitle?: string;
|
|
37
|
+
colorsTitle?: string;
|
|
38
|
+
measureFill?: string;
|
|
39
|
+
measureReading?: string;
|
|
40
|
+
colorsDefault?: string;
|
|
41
|
+
colorsSepia?: string;
|
|
42
|
+
colorsDarkLowGlare?: string;
|
|
43
|
+
colorsHighContrast?: string;
|
|
34
44
|
openTocAria?: string;
|
|
35
45
|
tocTitle?: string;
|
|
36
46
|
pinTocAria?: string;
|
|
@@ -47,7 +57,7 @@ export type MarkdownViewerLabelKey = keyof MarkdownViewerLabels;
|
|
|
47
57
|
type ViewerBuiltInLabelKey = Exclude<MarkdownViewerLabelKey, SpreadsheetViewerLabelKey>;
|
|
48
58
|
export declare const DEFAULT_MARKDOWN_VIEWER_LABELS: Readonly<Required<Omit<MarkdownViewerLabels, SpreadsheetViewerLabelKey>>>;
|
|
49
59
|
export type ResolvedViewerLabels = Readonly<Record<ViewerBuiltInLabelKey, ResolvedLabel>>;
|
|
50
|
-
export declare const resolveViewerLabels: (labels: MarkdownViewerLabels | undefined) => ResolvedViewerLabels;
|
|
60
|
+
export declare const resolveViewerLabels: (labels: MarkdownViewerLabels | undefined, labelsLang: string | undefined) => ResolvedViewerLabels;
|
|
51
61
|
export declare const toMermaidDiagramLabels: (labels: MarkdownViewerLabels | undefined) => MermaidDiagramLabels;
|
|
52
62
|
export declare const toSpreadsheetBlockLabels: (labels: MarkdownViewerLabels | undefined) => SpreadsheetBlockLabels;
|
|
53
63
|
export declare const toSvgImageLabels: (labels: MarkdownViewerLabels | undefined) => SvgImageLabels;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ContentColors } from "./viewer-settings.ts";
|
|
2
|
+
export type PaintedContentColors = Exclude<ContentColors, "default">;
|
|
3
|
+
export type ContentTextRole = "body" | "muted" | "link" | "important" | "warning" | "tip" | "caution";
|
|
4
|
+
export type ContentGroundRole = "base" | "raised" | "mark" | "messageNormal" | "messageInfo" | "messageWarning" | "messageAlert";
|
|
5
|
+
export type ContentSymbolRole = "normal" | "info" | "warning" | "alert";
|
|
6
|
+
export type ContentColorPalette = {
|
|
7
|
+
readonly scheme: "light" | "dark";
|
|
8
|
+
readonly text: Readonly<Record<ContentTextRole, string>>;
|
|
9
|
+
readonly ground: Readonly<Record<ContentGroundRole, string>>;
|
|
10
|
+
readonly rule: string;
|
|
11
|
+
readonly symbolText: string;
|
|
12
|
+
readonly symbolGround: Readonly<Record<ContentSymbolRole, string>>;
|
|
13
|
+
};
|
|
14
|
+
export declare const CONTENT_COLOR_PALETTES: Readonly<Record<PaintedContentColors, ContentColorPalette>>;
|
|
15
|
+
export type ContentColorRule = {
|
|
16
|
+
readonly selector: string;
|
|
17
|
+
readonly declarations: Readonly<Record<string, string>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const CONTENT_COLOR_RULES: readonly ContentColorRule[];
|
|
20
|
+
export declare const CONTENT_COLORS_MEDIA = "not (forced-colors: active)";
|
|
21
|
+
export declare const renderContentColorsCss: () => string;
|
package/dist/conversion.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const RESPONSE_HEADROOM_BYTES: number;
|
|
2
2
|
export declare const MAX_HTML_BYTES_LIMIT: number;
|
|
3
|
+
export declare const BLOCK_OFFSET_BYTES = 5;
|
|
4
|
+
export declare const MAX_TIMER_MS = 2147483647;
|
|
5
|
+
export declare const isTimerDelay: (timeMs: number) => boolean;
|
|
3
6
|
export interface ParseResult {
|
|
4
7
|
htmlContent: string;
|
|
5
8
|
headings: Array<{
|
|
@@ -7,6 +10,7 @@ export interface ParseResult {
|
|
|
7
10
|
depth: number;
|
|
8
11
|
id: string;
|
|
9
12
|
}>;
|
|
13
|
+
blockOffsets?: readonly number[];
|
|
10
14
|
}
|
|
11
15
|
export interface ParseOptions {
|
|
12
16
|
deniedPathSegments: readonly string[];
|
|
@@ -14,6 +18,9 @@ export interface ParseOptions {
|
|
|
14
18
|
resolveImports?: boolean;
|
|
15
19
|
validateExistence?: boolean;
|
|
16
20
|
includeSourceLines?: boolean;
|
|
21
|
+
includeStreamingHints?: boolean;
|
|
22
|
+
cjkFriendlyEmphasis?: boolean;
|
|
23
|
+
hardLineBreaks?: boolean;
|
|
17
24
|
enableSubscript?: boolean;
|
|
18
25
|
enableSuperscript?: boolean;
|
|
19
26
|
enableMark?: boolean;
|
|
@@ -113,10 +113,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
113
113
|
SOFTWARE.
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
## golang.org/x/net v0.
|
|
116
|
+
## golang.org/x/net v0.60.0
|
|
117
117
|
|
|
118
118
|
```text
|
|
119
|
-
Copyright
|
|
119
|
+
Copyright 2009 The Go Authors.
|
|
120
120
|
|
|
121
121
|
Redistribution and use in source and binary forms, with or without
|
|
122
122
|
modification, are permitted provided that the following conditions are
|
|
@@ -128,7 +128,7 @@ notice, this list of conditions and the following disclaimer.
|
|
|
128
128
|
copyright notice, this list of conditions and the following disclaimer
|
|
129
129
|
in the documentation and/or other materials provided with the
|
|
130
130
|
distribution.
|
|
131
|
-
* Neither the name of Google
|
|
131
|
+
* Neither the name of Google LLC nor the names of its
|
|
132
132
|
contributors may be used to endorse or promote products derived from
|
|
133
133
|
this software without specific prior written permission.
|
|
134
134
|
|
|
@@ -145,10 +145,10 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
145
145
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
## golang.org/x/text v0.
|
|
148
|
+
## golang.org/x/text v0.42.0
|
|
149
149
|
|
|
150
150
|
```text
|
|
151
|
-
Copyright
|
|
151
|
+
Copyright 2009 The Go Authors.
|
|
152
152
|
|
|
153
153
|
Redistribution and use in source and binary forms, with or without
|
|
154
154
|
modification, are permitted provided that the following conditions are
|
|
@@ -160,7 +160,7 @@ notice, this list of conditions and the following disclaimer.
|
|
|
160
160
|
copyright notice, this list of conditions and the following disclaimer
|
|
161
161
|
in the documentation and/or other materials provided with the
|
|
162
162
|
distribution.
|
|
163
|
-
* Neither the name of Google
|
|
163
|
+
* Neither the name of Google LLC nor the names of its
|
|
164
164
|
contributors may be used to endorse or promote products derived from
|
|
165
165
|
this software without specific prior written permission.
|
|
166
166
|
|
|
@@ -4,6 +4,7 @@ export interface MarkdownConverterSetup {
|
|
|
4
4
|
readonly workerUrl: string | URL;
|
|
5
5
|
readonly wasmUrl: string | URL;
|
|
6
6
|
readonly timeoutMs: number;
|
|
7
|
+
readonly loadTimeoutMs?: number;
|
|
7
8
|
}
|
|
8
9
|
export interface MarkdownConverter {
|
|
9
10
|
readonly convert: (conversion: BrowserConversion, signal?: AbortSignal) => Promise<ParseResult>;
|
|
@@ -11,6 +11,7 @@ export type BrowserConversionErrorCode = (typeof BROWSER_CONVERSION_ERROR_CODES)
|
|
|
11
11
|
export declare const BROWSER_CONVERSION_ERROR_CODES: readonly [
|
|
12
12
|
"invalid_argument",
|
|
13
13
|
"resource_exhausted",
|
|
14
|
+
"unavailable",
|
|
14
15
|
"internal"
|
|
15
16
|
];
|
|
16
17
|
export interface WasmConversionRequest {
|
|
@@ -18,6 +19,9 @@ export interface WasmConversionRequest {
|
|
|
18
19
|
readonly filePath: string;
|
|
19
20
|
readonly workspaceRoot: string;
|
|
20
21
|
readonly includeSourceLines: boolean;
|
|
22
|
+
readonly includeStreamingHints: boolean;
|
|
23
|
+
readonly cjkFriendlyEmphasis: boolean;
|
|
24
|
+
readonly hardLineBreaks: boolean;
|
|
21
25
|
readonly enableSubscript: boolean | undefined;
|
|
22
26
|
readonly enableSuperscript: boolean | undefined;
|
|
23
27
|
readonly enableMark: boolean | undefined;
|
package/dist/converter.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./errors-BWZJx2MD.cjs"),R=n=>{const{options:o}=n;return{markdownText:n.markdownText,filePath:n.filePath,workspaceRoot:n.workspaceRoot,includeSourceLines:o.includeSourceLines??!1,includeStreamingHints:o.includeStreamingHints??!1,cjkFriendlyEmphasis:o.cjkFriendlyEmphasis??!1,hardLineBreaks:o.hardLineBreaks??!1,enableSubscript:o.enableSubscript,enableSuperscript:o.enableSuperscript,enableMark:o.enableMark,enableTableMerge:o.enableTableMerge,enableEmbeds:o.enableEmbeds,enableZennDirectives:o.enableZennDirectives,maxHtmlBytes:o.maxHtmlBytes,denySegmentPatterns:[...o.deniedPathSegments]}},x=n=>{if(!("error"in n)){const{htmlContent:i,headings:d,blockOffsets:l}=n;return l===void 0?{htmlContent:i,headings:d}:{htmlContent:i,headings:d,blockOffsets:l}}const{code:o,message:a}=n.error;return o==="resource_exhausted"?new s.MarkdownResourceExhaustedError(a):new s.MarkdownConversionError(o,a)},_=n=>{for(const o of["workerUrl","wasmUrl"]){const a=n[o];if(!(a instanceof URL)&&(typeof a!="string"||a===""))throw new TypeError(`createMarkdownConverter: ${o} must be a URL or a non-empty string`)}if(!s.isTimerDelay(n.timeoutMs))throw new RangeError(`createMarkdownConverter: timeoutMs must be a positive integer of at most ${s.MAX_TIMER_MS}, got ${n.timeoutMs}`);if(n.loadTimeoutMs!==void 0&&!s.isTimerDelay(n.loadTimeoutMs))throw new RangeError(`createMarkdownConverter: loadTimeoutMs must be a positive integer of at most ${s.MAX_TIMER_MS} when it is set, got ${n.loadTimeoutMs}`)},$=n=>{_(n);const o=new URL(n.wasmUrl,globalThis.location.href).href,a=[];let i=null,d=!1,l=null,t=null,c=null,E=1;const u=(e,r)=>{e.settled||(e.settled=!0,e.signal?.removeEventListener("abort",e.onAbort),r instanceof Error?e.reject(r):"aborted"in r?e.reject(r.aborted):e.resolve(r))},k=()=>{l!==null&&clearTimeout(l),l=null},m=()=>{k(),i?.terminate(),i=null,d=!1},h=()=>{if(t===null||t.timer!==null||!d)return;const{job:e}=t;t.timer=setTimeout(()=>{t?.job===e&&(t=null,m(),u(e,new s.MarkdownConversionTimeoutError(n.timeoutMs)),M())},n.timeoutMs)},f=()=>{t?.timer!=null&&clearTimeout(t.timer),t=null,M()},w=e=>{c=e,m();const r=t===null?[...a]:[t.job,...a];t?.timer!=null&&clearTimeout(t.timer),t=null,a.length=0;for(const v of r)u(v,e)},T=e=>{const r=e.data;switch(r.type){case"loaded":k(),d=!0,h();return;case"load-failed":w(new s.MarkdownConversionError("unavailable",`the converter could not be loaded: ${r.message}`));return;case"converted":if(t?.job.id!==r.id)return;u(t.job,x(r.answer)),f();return;case"crashed":if(t?.job.id!==r.id)return;u(t.job,new s.MarkdownConversionError("internal",`the converter failed: ${r.message}`)),m(),f();return}},g=e=>{const r=e.message||"the worker failed";if(e.preventDefault(),!d){w(new s.MarkdownConversionError("unavailable",`the converter's worker could not start: ${r}`));return}t!==null&&u(t.job,new s.MarkdownConversionError("internal",`the converter's worker failed: ${r}`)),m(),f()},p=()=>{const{loadTimeoutMs:e}=n;e!==void 0&&(l=setTimeout(()=>{l=null,w(new s.MarkdownConversionError("unavailable",`the converter did not load within ${e} ms`))},e))},C=()=>{if(i!==null)return i;const e=new Worker(n.workerUrl,{type:"module",name:"aiquants-markdown-converter"});return e.addEventListener("message",r=>{i===e&&T(r)}),e.addEventListener("error",r=>{i===e&&g(r)}),e.postMessage({type:"load",wasmUrl:o}),i=e,p(),e},M=()=>{if(t!==null||c!==null)return;const e=a.shift();if(e===void 0)return;const r=C();t={job:e,timer:null},r.postMessage({type:"convert",id:e.id,request:e.request}),h()},y=e=>{const r=a.indexOf(e);r>=0&&a.splice(r,1),u(e,{aborted:e.signal?.reason})};return{convert:async(e,r)=>{if(s.assertConversionOptions(e.options,"MarkdownConverter.convert"),r?.throwIfAborted(),c!==null)throw c;const v=R(e);return new Promise((L,S)=>{const b={id:E++,request:v,signal:r,resolve:L,reject:S,onAbort:()=>y(b),settled:!1};r?.addEventListener("abort",b.onAbort,{once:!0}),a.push(b),M()})},dispose:()=>{w(new s.MarkdownConversionError("unavailable","the converter was disposed"))}}};exports.MAX_HTML_BYTES_LIMIT=s.MAX_HTML_BYTES_LIMIT;exports.MarkdownConversionError=s.MarkdownConversionError;exports.MarkdownConversionTimeoutError=s.MarkdownConversionTimeoutError;exports.MarkdownResourceExhaustedError=s.MarkdownResourceExhaustedError;exports.createMarkdownConverter=$;
|
package/dist/converter.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const { options: o } =
|
|
1
|
+
import { i as k, d as p, a as d, e as C, b as U, c as j } from "./errors-CapTNE7l.js";
|
|
2
|
+
import { M as W } from "./errors-CapTNE7l.js";
|
|
3
|
+
const q = (r) => {
|
|
4
|
+
const { options: o } = r;
|
|
5
5
|
return {
|
|
6
|
-
markdownText:
|
|
7
|
-
filePath:
|
|
8
|
-
workspaceRoot:
|
|
6
|
+
markdownText: r.markdownText,
|
|
7
|
+
filePath: r.filePath,
|
|
8
|
+
workspaceRoot: r.workspaceRoot,
|
|
9
9
|
includeSourceLines: o.includeSourceLines ?? !1,
|
|
10
|
+
includeStreamingHints: o.includeStreamingHints ?? !1,
|
|
11
|
+
cjkFriendlyEmphasis: o.cjkFriendlyEmphasis ?? !1,
|
|
12
|
+
hardLineBreaks: o.hardLineBreaks ?? !1,
|
|
10
13
|
enableSubscript: o.enableSubscript,
|
|
11
14
|
enableSuperscript: o.enableSuperscript,
|
|
12
15
|
enableMark: o.enableMark,
|
|
@@ -16,94 +19,109 @@ const C = (n) => {
|
|
|
16
19
|
maxHtmlBytes: o.maxHtmlBytes,
|
|
17
20
|
denySegmentPatterns: [...o.deniedPathSegments]
|
|
18
21
|
};
|
|
19
|
-
},
|
|
20
|
-
if (!("error" in
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
}, A = (r) => {
|
|
23
|
+
if (!("error" in r)) {
|
|
24
|
+
const { htmlContent: a, headings: l, blockOffsets: i } = r;
|
|
25
|
+
return i === void 0 ? { htmlContent: a, headings: l } : { htmlContent: a, headings: l, blockOffsets: i };
|
|
26
|
+
}
|
|
27
|
+
const { code: o, message: s } = r.error;
|
|
28
|
+
return o === "resource_exhausted" ? new j(s) : new d(o, s);
|
|
29
|
+
}, _ = (r) => {
|
|
25
30
|
for (const o of ["workerUrl", "wasmUrl"]) {
|
|
26
|
-
const s =
|
|
31
|
+
const s = r[o];
|
|
27
32
|
if (!(s instanceof URL) && (typeof s != "string" || s === ""))
|
|
28
33
|
throw new TypeError(`createMarkdownConverter: ${o} must be a URL or a non-empty string`);
|
|
29
34
|
}
|
|
30
|
-
if (!
|
|
31
|
-
throw new RangeError(`createMarkdownConverter: timeoutMs must be a positive integer, got ${
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
const { job: e } = t;
|
|
43
|
-
t.timer = setTimeout(() => {
|
|
44
|
-
t?.job === e && (t = null, d(), a(e, new L(n.timeoutMs)), b());
|
|
45
|
-
}, n.timeoutMs);
|
|
35
|
+
if (!k(r.timeoutMs))
|
|
36
|
+
throw new RangeError(`createMarkdownConverter: timeoutMs must be a positive integer of at most ${p}, got ${r.timeoutMs}`);
|
|
37
|
+
if (r.loadTimeoutMs !== void 0 && !k(r.loadTimeoutMs))
|
|
38
|
+
throw new RangeError(`createMarkdownConverter: loadTimeoutMs must be a positive integer of at most ${p} when it is set, got ${r.loadTimeoutMs}`);
|
|
39
|
+
}, O = (r) => {
|
|
40
|
+
_(r);
|
|
41
|
+
const o = new URL(r.wasmUrl, globalThis.location.href).href, s = [];
|
|
42
|
+
let a = null, l = !1, i = null, n = null, c = null, T = 1;
|
|
43
|
+
const u = (e, t) => {
|
|
44
|
+
e.settled || (e.settled = !0, e.signal?.removeEventListener("abort", e.onAbort), t instanceof Error ? e.reject(t) : "aborted" in t ? e.reject(t.aborted) : e.resolve(t));
|
|
45
|
+
}, M = () => {
|
|
46
|
+
i !== null && clearTimeout(i), i = null;
|
|
46
47
|
}, m = () => {
|
|
47
|
-
|
|
48
|
+
M(), a?.terminate(), a = null, l = !1;
|
|
49
|
+
}, g = () => {
|
|
50
|
+
if (n === null || n.timer !== null || !l) return;
|
|
51
|
+
const { job: e } = n;
|
|
52
|
+
n.timer = setTimeout(() => {
|
|
53
|
+
n?.job === e && (n = null, m(), u(e, new U(r.timeoutMs)), b());
|
|
54
|
+
}, r.timeoutMs);
|
|
55
|
+
}, w = () => {
|
|
56
|
+
n?.timer != null && clearTimeout(n.timer), n = null, b();
|
|
48
57
|
}, f = (e) => {
|
|
49
|
-
c = e,
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
for (const
|
|
53
|
-
},
|
|
54
|
-
const
|
|
55
|
-
switch (
|
|
58
|
+
c = e, m();
|
|
59
|
+
const t = n === null ? [...s] : [n.job, ...s];
|
|
60
|
+
n?.timer != null && clearTimeout(n.timer), n = null, s.length = 0;
|
|
61
|
+
for (const v of t) u(v, e);
|
|
62
|
+
}, E = (e) => {
|
|
63
|
+
const t = e.data;
|
|
64
|
+
switch (t.type) {
|
|
56
65
|
case "loaded":
|
|
57
|
-
|
|
66
|
+
M(), l = !0, g();
|
|
58
67
|
return;
|
|
59
68
|
case "load-failed":
|
|
60
|
-
f(new
|
|
69
|
+
f(new d("unavailable", `the converter could not be loaded: ${t.message}`));
|
|
61
70
|
return;
|
|
62
71
|
case "converted":
|
|
63
|
-
if (
|
|
64
|
-
|
|
72
|
+
if (n?.job.id !== t.id) return;
|
|
73
|
+
u(n.job, A(t.answer)), w();
|
|
65
74
|
return;
|
|
66
75
|
case "crashed":
|
|
67
|
-
if (
|
|
68
|
-
|
|
76
|
+
if (n?.job.id !== t.id) return;
|
|
77
|
+
u(n.job, new d("internal", `the converter failed: ${t.message}`)), m(), w();
|
|
69
78
|
return;
|
|
70
79
|
}
|
|
71
|
-
},
|
|
72
|
-
const
|
|
73
|
-
if (e.preventDefault(), !
|
|
74
|
-
f(new
|
|
80
|
+
}, L = (e) => {
|
|
81
|
+
const t = e.message || "the worker failed";
|
|
82
|
+
if (e.preventDefault(), !l) {
|
|
83
|
+
f(new d("unavailable", `the converter's worker could not start: ${t}`));
|
|
75
84
|
return;
|
|
76
85
|
}
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
n !== null && u(n.job, new d("internal", `the converter's worker failed: ${t}`)), m(), w();
|
|
87
|
+
}, y = () => {
|
|
88
|
+
const { loadTimeoutMs: e } = r;
|
|
89
|
+
e !== void 0 && (i = setTimeout(() => {
|
|
90
|
+
i = null, f(new d("unavailable", `the converter did not load within ${e} ms`));
|
|
91
|
+
}, e));
|
|
92
|
+
}, S = () => {
|
|
93
|
+
if (a !== null) return a;
|
|
94
|
+
const e = new Worker(r.workerUrl, { type: "module", name: "aiquants-markdown-converter" });
|
|
95
|
+
return e.addEventListener("message", (t) => {
|
|
96
|
+
a === e && E(t);
|
|
97
|
+
}), e.addEventListener("error", (t) => {
|
|
98
|
+
a === e && L(t);
|
|
99
|
+
}), e.postMessage({ type: "load", wasmUrl: o }), a = e, y(), e;
|
|
82
100
|
}, b = () => {
|
|
83
|
-
if (
|
|
101
|
+
if (n !== null || c !== null) return;
|
|
84
102
|
const e = s.shift();
|
|
85
103
|
if (e === void 0) return;
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
const
|
|
90
|
-
|
|
104
|
+
const t = S();
|
|
105
|
+
n = { job: e, timer: null }, t.postMessage({ type: "convert", id: e.id, request: e.request }), g();
|
|
106
|
+
}, x = (e) => {
|
|
107
|
+
const t = s.indexOf(e);
|
|
108
|
+
t >= 0 && s.splice(t, 1), u(e, { aborted: e.signal?.reason });
|
|
91
109
|
};
|
|
92
|
-
return { convert: async (e,
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
return new Promise((
|
|
96
|
-
const h = { id:
|
|
97
|
-
|
|
110
|
+
return { convert: async (e, t) => {
|
|
111
|
+
if (C(e.options, "MarkdownConverter.convert"), t?.throwIfAborted(), c !== null) throw c;
|
|
112
|
+
const v = q(e);
|
|
113
|
+
return new Promise((R, $) => {
|
|
114
|
+
const h = { id: T++, request: v, signal: t, resolve: R, reject: $, onAbort: () => x(h), settled: !1 };
|
|
115
|
+
t?.addEventListener("abort", h.onAbort, { once: !0 }), s.push(h), b();
|
|
98
116
|
});
|
|
99
117
|
}, dispose: () => {
|
|
100
|
-
f(new
|
|
118
|
+
f(new d("unavailable", "the converter was disposed"));
|
|
101
119
|
} };
|
|
102
120
|
};
|
|
103
121
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
122
|
+
W as MAX_HTML_BYTES_LIMIT,
|
|
123
|
+
d as MarkdownConversionError,
|
|
124
|
+
U as MarkdownConversionTimeoutError,
|
|
125
|
+
j as MarkdownResourceExhaustedError,
|
|
126
|
+
O as createMarkdownConverter
|
|
109
127
|
};
|
package/dist/converter.wasm
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b8 as lt, _ as V, l as k, d as gt } from "./mermaid.core-C4EClWgB.js";
|
|
2
2
|
import { c as tt } from "./cytoscape.esm-kVAWcYoG.js";
|
|
3
3
|
var Z = { exports: {} }, $ = { exports: {} }, Q = { exports: {} }, ut = Q.exports, j;
|
|
4
4
|
function ft() {
|
|
@@ -646,22 +646,22 @@ function ft() {
|
|
|
646
646
|
if (g < d)
|
|
647
647
|
return l[0] = p, l[1] = n, l[2] = O, l[3] = r, !1;
|
|
648
648
|
} else {
|
|
649
|
-
var S = t.height / t.width, Y = i.height / i.width, w = (r - n) / (d - g), x = void 0, F = void 0,
|
|
649
|
+
var S = t.height / t.width, Y = i.height / i.width, w = (r - n) / (d - g), x = void 0, F = void 0, U = void 0, P = void 0, _ = void 0, X = void 0;
|
|
650
650
|
if (-S === w ? g > d ? (l[0] = v, l[1] = D, R = !0) : (l[0] = p, l[1] = a, R = !0) : S === w && (g > d ? (l[0] = h, l[1] = a, R = !0) : (l[0] = u, l[1] = D, R = !0)), -Y === w ? d > g ? (l[2] = c, l[3] = E, M = !0) : (l[2] = f, l[3] = s, M = !0) : Y === w && (d > g ? (l[2] = O, l[3] = s, M = !0) : (l[2] = A, l[3] = E, M = !0)), R && M)
|
|
651
651
|
return !1;
|
|
652
652
|
if (g > d ? n > r ? (x = this.getCardinalDirection(S, w, 4), F = this.getCardinalDirection(Y, w, 2)) : (x = this.getCardinalDirection(-S, w, 3), F = this.getCardinalDirection(-Y, w, 1)) : n > r ? (x = this.getCardinalDirection(-S, w, 1), F = this.getCardinalDirection(-Y, w, 3)) : (x = this.getCardinalDirection(S, w, 2), F = this.getCardinalDirection(Y, w, 4)), !R)
|
|
653
653
|
switch (x) {
|
|
654
654
|
case 1:
|
|
655
|
-
|
|
655
|
+
P = a, U = g + -y / w, l[0] = U, l[1] = P;
|
|
656
656
|
break;
|
|
657
657
|
case 2:
|
|
658
|
-
|
|
658
|
+
U = u, P = n + T * w, l[0] = U, l[1] = P;
|
|
659
659
|
break;
|
|
660
660
|
case 3:
|
|
661
|
-
|
|
661
|
+
P = D, U = g + y / w, l[0] = U, l[1] = P;
|
|
662
662
|
break;
|
|
663
663
|
case 4:
|
|
664
|
-
|
|
664
|
+
U = v, P = n + -T * w, l[0] = U, l[1] = P;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
667
|
if (!M)
|
|
@@ -1902,14 +1902,14 @@ function pt() {
|
|
|
1902
1902
|
w = w.concat(s.getEdges());
|
|
1903
1903
|
var x = w.length;
|
|
1904
1904
|
f != null && x--;
|
|
1905
|
-
for (var F = 0,
|
|
1905
|
+
for (var F = 0, U = w.length, P, _ = s.getEdgesBetween(f); _.length > 1; ) {
|
|
1906
1906
|
var X = _[0];
|
|
1907
1907
|
_.splice(0, 1);
|
|
1908
1908
|
var H = w.indexOf(X);
|
|
1909
|
-
H >= 0 && w.splice(H, 1),
|
|
1909
|
+
H >= 0 && w.splice(H, 1), U--, x--;
|
|
1910
1910
|
}
|
|
1911
|
-
f != null ?
|
|
1912
|
-
for (var W = Math.abs(E - c) / x, B =
|
|
1911
|
+
f != null ? P = (w.indexOf(_[0]) + 1) % U : P = 0;
|
|
1912
|
+
for (var W = Math.abs(E - c) / x, B = P; F != x; B = ++B % U) {
|
|
1913
1913
|
var K = w[B].getOtherEnd(s);
|
|
1914
1914
|
if (K != f) {
|
|
1915
1915
|
var q = (c + F * W) % 360, ht = (q + W) % 360;
|
|
@@ -1943,9 +1943,9 @@ function pt() {
|
|
|
1943
1943
|
w.id = S, w.paddingLeft = Y.paddingLeft || 0, w.paddingRight = Y.paddingRight || 0, w.paddingBottom = Y.paddingBottom || 0, w.paddingTop = Y.paddingTop || 0, s.idToDummyNode[S] = w;
|
|
1944
1944
|
var x = s.getGraphManager().add(s.newGraph(), w), F = Y.getChild();
|
|
1945
1945
|
F.add(w);
|
|
1946
|
-
for (var
|
|
1947
|
-
var
|
|
1948
|
-
F.remove(
|
|
1946
|
+
for (var U = 0; U < f[M].length; U++) {
|
|
1947
|
+
var P = f[M][U];
|
|
1948
|
+
F.remove(P), x.add(P);
|
|
1949
1949
|
}
|
|
1950
1950
|
}
|
|
1951
1951
|
});
|
|
@@ -2131,14 +2131,14 @@ function pt() {
|
|
|
2131
2131
|
if (A > 0)
|
|
2132
2132
|
for (var F = C; F <= R; F++)
|
|
2133
2133
|
x[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
|
|
2134
|
-
for (var
|
|
2135
|
-
x[X] <
|
|
2136
|
-
if (
|
|
2134
|
+
for (var U = v.MAX_VALUE, P, _, X = 0; X < x.length; X++)
|
|
2135
|
+
x[X] < U ? (U = x[X], P = 1, _ = X) : x[X] == U && P++;
|
|
2136
|
+
if (P == 3 && U == 0)
|
|
2137
2137
|
x[0] == 0 && x[1] == 0 && x[2] == 0 ? f = 1 : x[0] == 0 && x[1] == 0 && x[3] == 0 ? f = 0 : x[0] == 0 && x[2] == 0 && x[3] == 0 ? f = 3 : x[1] == 0 && x[2] == 0 && x[3] == 0 && (f = 2);
|
|
2138
|
-
else if (
|
|
2138
|
+
else if (P == 2 && U == 0) {
|
|
2139
2139
|
var H = Math.floor(Math.random() * 2);
|
|
2140
2140
|
x[0] == 0 && x[1] == 0 ? H == 0 ? f = 0 : f = 1 : x[0] == 0 && x[2] == 0 ? H == 0 ? f = 0 : f = 2 : x[0] == 0 && x[3] == 0 ? H == 0 ? f = 0 : f = 3 : x[1] == 0 && x[2] == 0 ? H == 0 ? f = 1 : f = 2 : x[1] == 0 && x[3] == 0 ? H == 0 ? f = 1 : f = 3 : H == 0 ? f = 2 : f = 3;
|
|
2141
|
-
} else if (
|
|
2141
|
+
} else if (P == 4 && U == 0) {
|
|
2142
2142
|
var H = Math.floor(Math.random() * 4);
|
|
2143
2143
|
f = H;
|
|
2144
2144
|
} else
|
|
@@ -2304,24 +2304,24 @@ function vt() {
|
|
|
2304
2304
|
}
|
|
2305
2305
|
var M = function(w, x) {
|
|
2306
2306
|
typeof w == "number" && (w = x);
|
|
2307
|
-
var F = w.data("id"),
|
|
2307
|
+
var F = w.data("id"), U = O.idToLNode[F];
|
|
2308
2308
|
return {
|
|
2309
|
-
x:
|
|
2310
|
-
y:
|
|
2309
|
+
x: U.getRect().getCenterX(),
|
|
2310
|
+
y: U.getRect().getCenterY()
|
|
2311
2311
|
};
|
|
2312
2312
|
}, S = function Y() {
|
|
2313
2313
|
for (var w = function() {
|
|
2314
2314
|
T.fit && T.cy.fit(T.eles, T.padding), D || (D = !0, O.cy.one("layoutready", T.ready), O.cy.trigger({ type: "layoutready", layout: O }));
|
|
2315
|
-
}, x = O.options.refresh, F,
|
|
2315
|
+
}, x = O.options.refresh, F, U = 0; U < x && !F; U++)
|
|
2316
2316
|
F = O.stopped || O.layout.tick();
|
|
2317
2317
|
if (F) {
|
|
2318
2318
|
y.checkLayoutSuccess() && !y.isSubLayout && y.doPostLayout(), y.tilingPostLayout && y.tilingPostLayout(), y.isLayoutFinished = !0, O.options.eles.nodes().positions(M), w(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({ type: "layoutstop", layout: O }), u && cancelAnimationFrame(u), D = !1;
|
|
2319
2319
|
return;
|
|
2320
2320
|
}
|
|
2321
|
-
var
|
|
2321
|
+
var P = O.layout.getPositionsData();
|
|
2322
2322
|
T.eles.nodes().positions(function(_, X) {
|
|
2323
2323
|
if (typeof _ == "number" && (_ = X), !_.isParent()) {
|
|
2324
|
-
for (var H = _.id(), W =
|
|
2324
|
+
for (var H = _.id(), W = P[H], B = _; W == null && (W = P[B.data("parent")] || P["DummyCompound_" + B.data("parent")], P[H] = W, B = B.parent()[0], B != null); )
|
|
2325
2325
|
;
|
|
2326
2326
|
return W != null ? {
|
|
2327
2327
|
x: W.x,
|