@aiquants/markdown 12.3.0 → 13.0.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 +276 -65
- 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 +31 -2
- package/dist/components/MarkdownViewer.d.ts +11 -2
- package/dist/components/MermaidDiagram.d.ts +1 -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/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/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/mermaidLabels.d.ts +5 -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/spreadsheetModel.d.ts +1 -0
- package/dist/components/viewerLabels.d.ts +11 -2
- 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-BAhmauKo.js +5296 -0
- package/dist/extractHeadings-qiJXegCx.cjs +11 -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 +2 -2
- package/dist/index.client.js +42 -36
- package/dist/index.js +42 -36
- 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/cssCleaner.d.ts +13 -0
- package/dist/mermaidFrame/drawer.d.ts +34 -0
- package/dist/mermaidFrame/frame.d.ts +1 -0
- package/dist/mermaidFrame/frame.js +3307 -0
- package/dist/mermaidFrame/katexInert.d.ts +4 -0
- package/dist/mermaidFrame/protocol.d.ts +38 -0
- package/dist/mermaidFrame/serve.d.ts +14 -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 +29 -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
package/dist/code-blocks.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as a, D as S, M as s, g as _, h as A, O as T, e as R, S as O, a as L, b as d, c as n, d as D, i as P, j as H, k as i, l as p, o as t, p as o, m as r, r as B, w as C } from "./code-blocks-C6J8rVTc.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
a as CODE_META_ATTRIBUTE,
|
|
4
|
+
S as DEFAULT_SPREADSHEET_VISIBLE_ROWS,
|
|
5
5
|
s as MAX_SPREADSHEET_FRAME_WIDTH_PX,
|
|
6
6
|
_ as MAX_SPREADSHEET_FROZEN_TRACKS,
|
|
7
7
|
A as MAX_SPREADSHEET_VISIBLE_ROWS,
|
|
8
|
+
T as OPEN_CODE_ATTRIBUTE,
|
|
8
9
|
R as SPREADSHEETS_LANGUAGE,
|
|
9
|
-
|
|
10
|
+
O as SPREADSHEET_BLOCK_LABEL_CATALOGS,
|
|
10
11
|
L as SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS,
|
|
11
12
|
d as SPREADSHEET_OPTION_RULES,
|
|
12
13
|
n as SPREADSHEET_ZOOM_STEP_PERCENTS,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
D as SpreadsheetOptionsError,
|
|
15
|
+
P as fencedBodyAsRead,
|
|
16
|
+
H as fencedCodeLanguageOf,
|
|
17
|
+
i as fencedLineHead,
|
|
18
|
+
p as listItemWidthOn,
|
|
19
|
+
t as openingFenceOn,
|
|
20
|
+
o as parseSpreadsheetOptions,
|
|
21
|
+
r as planFencedBodyEdit,
|
|
22
|
+
B as readFencedLine,
|
|
23
|
+
C as whiteSpaceLinesReadEmpty
|
|
23
24
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
1
|
import { ResolvedLabel } from "./labels.ts";
|
|
3
2
|
export declare const COPY_OUTCOME_MS = 2000;
|
|
4
3
|
export type CopyButtonLabelKey = "copy" | "copied" | "copyFailed";
|
|
@@ -6,4 +5,4 @@ export type CopyButtonProps = {
|
|
|
6
5
|
readonly text: string;
|
|
7
6
|
readonly labels: Readonly<Record<CopyButtonLabelKey, ResolvedLabel>>;
|
|
8
7
|
};
|
|
9
|
-
export declare const CopyButton: (
|
|
8
|
+
export declare const CopyButton: import("react").NamedExoticComponent<CopyButtonProps>;
|
|
@@ -23,9 +23,23 @@ export interface MarkdownLinkProps {
|
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
}
|
|
25
25
|
export type MarkdownLinkComponent = ComponentType<MarkdownLinkProps>;
|
|
26
|
-
|
|
26
|
+
export interface MarkdownImageProps {
|
|
27
|
+
readonly src: string | undefined;
|
|
28
|
+
readonly external: boolean;
|
|
29
|
+
readonly alt: string | undefined;
|
|
30
|
+
readonly title: string | undefined;
|
|
31
|
+
readonly assetPath: string | undefined;
|
|
32
|
+
readonly assetExists: boolean | undefined;
|
|
33
|
+
readonly insideLink: boolean;
|
|
34
|
+
}
|
|
35
|
+
export type MarkdownImageComponent = ComponentType<MarkdownImageProps>;
|
|
36
|
+
type RendererProps = {
|
|
27
37
|
htmlContent: string;
|
|
38
|
+
blockOffsets?: readonly number[];
|
|
39
|
+
blockKeyEpoch?: number;
|
|
40
|
+
streaming?: boolean;
|
|
28
41
|
theme?: "light" | "dark";
|
|
42
|
+
topHeadingLevel?: number;
|
|
29
43
|
iFrameAllowedDomains?: readonly string[];
|
|
30
44
|
embeds?: MarkdownEmbeds;
|
|
31
45
|
embedLabels?: MarkdownEmbedLabels;
|
|
@@ -41,9 +55,24 @@ type Props = {
|
|
|
41
55
|
linkComponent?: MarkdownLinkComponent;
|
|
42
56
|
missingImageLabel?: string;
|
|
43
57
|
blockFailedLabel?: string;
|
|
58
|
+
labelsLang?: string;
|
|
44
59
|
imageSource?: MarkdownImageSourceReader;
|
|
45
60
|
svgImageLabels?: SvgImageLabels;
|
|
46
61
|
onMathDiagnostics?: (diagnostics: readonly MarkdownMathDiagnostic[]) => void;
|
|
47
62
|
};
|
|
48
|
-
|
|
63
|
+
type AllowlistProps = {
|
|
64
|
+
readonly allowlist?: "document";
|
|
65
|
+
readonly imageComponent?: undefined;
|
|
66
|
+
readonly idPrefix?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
readonly allowlist: "untrusted";
|
|
69
|
+
readonly imageComponent: MarkdownImageComponent;
|
|
70
|
+
readonly linkComponent: MarkdownLinkComponent;
|
|
71
|
+
readonly idPrefix: string;
|
|
72
|
+
readonly imageSource?: undefined;
|
|
73
|
+
readonly embeds?: undefined;
|
|
74
|
+
readonly iFrameAllowedDomains?: undefined;
|
|
75
|
+
};
|
|
76
|
+
type Props = RendererProps & AllowlistProps;
|
|
77
|
+
export declare const MarkdownRenderer: ({ htmlContent, blockOffsets, blockKeyEpoch, streaming, theme, topHeadingLevel, iFrameAllowedDomains, embeds, embedLabels, mermaidInteraction, mermaidLabels, codeBlockLabels, displayMathLabels, spreadsheetEditor, spreadsheetLocale, spreadsheetLabels, spreadsheetTapScrollCircle, spreadsheetScrollBarControls, linkComponent: LinkComponent, missingImageLabel, blockFailedLabel, labelsLang, imageSource, svgImageLabels, onMathDiagnostics, allowlist, imageComponent: ImageComponent, idPrefix, }: Props) => import("react").JSX.Element;
|
|
49
78
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ScrollBarTapCircleOptions, SpreadsheetScrollBarControls } from "@aiquants/spreadsheet";
|
|
2
2
|
import { MouseEvent, ReactNode } from "react";
|
|
3
3
|
import { MarkdownEmbeds } from "../embeds/linkCards.ts";
|
|
4
|
-
import { ContentAlign, MarkdownStyleOption } from "../viewer-settings.ts";
|
|
4
|
+
import { ContentAlign, ContentColors, ContentMeasure, MarkdownStyleOption } from "../viewer-settings.ts";
|
|
5
5
|
import { MarkdownScrollBarRenderer } from "./HostedScrollArea.tsx";
|
|
6
6
|
import { MarkdownLinkComponent } from "./MarkdownRenderer.tsx";
|
|
7
7
|
import { MarkdownMathDiagnostic } from "./mathRendering.ts";
|
|
@@ -53,6 +53,7 @@ export interface MarkdownViewerProps {
|
|
|
53
53
|
content: string | null;
|
|
54
54
|
error?: string | ReactNode | MarkdownViewerErrorInfo | null;
|
|
55
55
|
labels?: MarkdownViewerLabels;
|
|
56
|
+
labelsLang?: string;
|
|
56
57
|
isLoading?: boolean;
|
|
57
58
|
theme?: "light" | "dark";
|
|
58
59
|
style: string;
|
|
@@ -63,11 +64,19 @@ export interface MarkdownViewerProps {
|
|
|
63
64
|
showToc?: boolean;
|
|
64
65
|
showStyle?: boolean;
|
|
65
66
|
showAlign?: boolean;
|
|
67
|
+
contentLang?: string;
|
|
68
|
+
measure?: ContentMeasure;
|
|
69
|
+
onMeasureChange?: (measure: ContentMeasure) => void;
|
|
70
|
+
showMeasure?: boolean;
|
|
71
|
+
contentColors?: ContentColors;
|
|
72
|
+
onContentColorsChange?: (colors: ContentColors) => void;
|
|
73
|
+
showContentColors?: boolean;
|
|
66
74
|
width?: string;
|
|
67
75
|
maxWidth?: string;
|
|
68
76
|
padding?: number;
|
|
69
77
|
iFrameAllowedDomains?: readonly string[];
|
|
70
78
|
embeds?: MarkdownEmbeds;
|
|
79
|
+
fetch?: typeof fetch;
|
|
71
80
|
linkComponent?: MarkdownLinkComponent;
|
|
72
81
|
onHeadingSelect?: MarkdownHeadingSelectHandler;
|
|
73
82
|
headingHref?: MarkdownHeadingHrefResolver;
|
|
@@ -83,4 +92,4 @@ export interface MarkdownViewerProps {
|
|
|
83
92
|
scrollBarGutter?: number | string;
|
|
84
93
|
scrollBarInlineSize?: number | string;
|
|
85
94
|
}
|
|
86
|
-
export declare function MarkdownViewer({ parseResult, content, error, isLoading, labels, theme, style, onStyleChange, availableStyles, align, onAlignChange, showToc, showStyle, showAlign, width, maxWidth, padding, iFrameAllowedDomains, embeds, emptyMessage, toolbar: toolbarProp, linkComponent, onHeadingSelect, headingHref, onMathDiagnostics, spreadsheetEditor, spreadsheetLocale, spreadsheetTapScrollCircle, spreadsheetScrollBarControls, imageSource, renderScrollBar, scrollBarGutter, scrollBarInlineSize, }: MarkdownViewerProps): import("react").JSX.Element;
|
|
95
|
+
export declare function MarkdownViewer({ parseResult, content, error, isLoading, labels, labelsLang, theme, style, onStyleChange, availableStyles, align, onAlignChange, showToc, showStyle, showAlign, contentLang, measure, onMeasureChange, showMeasure, contentColors, onContentColorsChange, showContentColors, width, maxWidth, padding, iFrameAllowedDomains, embeds, fetch: hostFetch, emptyMessage, toolbar: toolbarProp, linkComponent, onHeadingSelect, headingHref, onMathDiagnostics, spreadsheetEditor, spreadsheetLocale, spreadsheetTapScrollCircle, spreadsheetScrollBarControls, imageSource, renderScrollBar, scrollBarGutter, scrollBarInlineSize, }: MarkdownViewerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import { ContentAlign, ContentMeasure } from "../viewer-settings.ts";
|
|
3
|
+
export type ReadingPlaceKeeperProps = {
|
|
4
|
+
readonly scroller: HTMLElement;
|
|
5
|
+
readonly root: HTMLElement;
|
|
6
|
+
readonly documentKey: string | null | undefined;
|
|
7
|
+
readonly style: string;
|
|
8
|
+
readonly measure: ContentMeasure;
|
|
9
|
+
readonly align: ContentAlign;
|
|
10
|
+
};
|
|
11
|
+
type ReadingBlock = {
|
|
12
|
+
readonly block: Element;
|
|
13
|
+
readonly offset: number;
|
|
14
|
+
};
|
|
15
|
+
type ReadingAnchor = ReadingBlock & {
|
|
16
|
+
readonly scroller: HTMLElement;
|
|
17
|
+
readonly root: HTMLElement;
|
|
18
|
+
readonly documentKey: string | null | undefined;
|
|
19
|
+
readonly listening: AbortController;
|
|
20
|
+
scrollTop: number;
|
|
21
|
+
moved: number;
|
|
22
|
+
};
|
|
23
|
+
export declare class ReadingPlaceKeeper extends Component<ReadingPlaceKeeperProps, object, ReadingAnchor | null> {
|
|
24
|
+
private anchor;
|
|
25
|
+
getSnapshotBeforeUpdate(previous: ReadingPlaceKeeperProps): ReadingAnchor | null;
|
|
26
|
+
componentDidUpdate(_previous: ReadingPlaceKeeperProps, _state: object, read?: ReadingAnchor | null): void;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
render(): null;
|
|
29
|
+
private keep;
|
|
30
|
+
private release;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, RefObject } from "react";
|
|
2
|
+
export type SelectionKeeperProps = {
|
|
3
|
+
readonly root: RefObject<HTMLElement | null>;
|
|
4
|
+
};
|
|
5
|
+
type ReadSelection = {
|
|
6
|
+
readonly selection: Selection;
|
|
7
|
+
readonly anchorNode: Node;
|
|
8
|
+
readonly anchorOffset: number;
|
|
9
|
+
readonly focusNode: Node;
|
|
10
|
+
readonly focusOffset: number;
|
|
11
|
+
};
|
|
12
|
+
export declare class SelectionKeeper extends Component<SelectionKeeperProps, object, ReadSelection | null> {
|
|
13
|
+
getSnapshotBeforeUpdate(): ReadSelection | null;
|
|
14
|
+
componentDidUpdate(_previous: SelectionKeeperProps, _state: object, read?: ReadSelection | null): void;
|
|
15
|
+
render(): null;
|
|
16
|
+
}
|
|
17
|
+
type PointWithin = {
|
|
18
|
+
readonly text: number;
|
|
19
|
+
readonly ancestors: readonly Node[];
|
|
20
|
+
};
|
|
21
|
+
type ReadTextPoint = {
|
|
22
|
+
readonly node: Node;
|
|
23
|
+
readonly offset: number;
|
|
24
|
+
readonly within: PointWithin | null;
|
|
25
|
+
};
|
|
26
|
+
type ReadTextSelection = {
|
|
27
|
+
readonly root: HTMLElement;
|
|
28
|
+
readonly selection: Selection;
|
|
29
|
+
readonly text: string;
|
|
30
|
+
readonly anchor: ReadTextPoint;
|
|
31
|
+
readonly focus: ReadTextPoint;
|
|
32
|
+
};
|
|
33
|
+
export declare class TextSelectionKeeper extends Component<SelectionKeeperProps, object, ReadTextSelection | null> {
|
|
34
|
+
getSnapshotBeforeUpdate(): ReadTextSelection | null;
|
|
35
|
+
componentDidUpdate(_previous: SelectionKeeperProps, _state: object, snapshot?: ReadTextSelection | null): void;
|
|
36
|
+
render(): null;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -22,6 +22,7 @@ export type SpreadsheetBlockProps = {
|
|
|
22
22
|
readonly editor?: SpreadsheetEditor;
|
|
23
23
|
readonly locale?: SpreadsheetBlockLocale;
|
|
24
24
|
readonly labels?: SpreadsheetBlockLabels;
|
|
25
|
+
readonly labelsLang?: string;
|
|
25
26
|
readonly layout?: SpreadsheetBlockLayout;
|
|
26
27
|
readonly tapScrollCircle?: ScrollBarTapCircleOptions;
|
|
27
28
|
readonly tapScrollCircleShownBy?: SpreadsheetTapScrollCircleShownBy;
|
|
@@ -30,6 +31,6 @@ export type SpreadsheetBlockProps = {
|
|
|
30
31
|
export type SpreadsheetBlockLayout = "inline" | "fill";
|
|
31
32
|
export type SpreadsheetTapScrollCircleShownBy = "host" | "options";
|
|
32
33
|
export declare const SpreadsheetBlock: import("react").MemoExoticComponent<{
|
|
33
|
-
({ tsv, meta, sourceLines, editor, locale, labels, layout, tapScrollCircle, tapScrollCircleShownBy, scrollBarControls }: SpreadsheetBlockProps): ReactElement;
|
|
34
|
+
({ tsv, meta, sourceLines, editor, locale, labels, labelsLang, layout, tapScrollCircle, tapScrollCircleShownBy, scrollBarControls }: SpreadsheetBlockProps): ReactElement;
|
|
34
35
|
displayName: string;
|
|
35
36
|
}>;
|
|
@@ -2,13 +2,20 @@ export type BlockHashes = {
|
|
|
2
2
|
readonly fingerprint: string;
|
|
3
3
|
readonly content: string;
|
|
4
4
|
};
|
|
5
|
-
export type
|
|
5
|
+
export type BlockShape = BlockHashes & {
|
|
6
|
+
readonly root: string;
|
|
7
|
+
};
|
|
8
|
+
export type BlockKey = BlockShape & {
|
|
6
9
|
readonly key: string;
|
|
7
10
|
};
|
|
11
|
+
export type BlockKeyRules = {
|
|
12
|
+
readonly inherit: boolean;
|
|
13
|
+
readonly contentOnly: boolean;
|
|
14
|
+
};
|
|
8
15
|
export declare const MAX_BLOCK_ALIGNMENT_EDITS = 1024;
|
|
9
16
|
export type BlockPair = readonly [
|
|
10
17
|
previous: number,
|
|
11
18
|
next: number
|
|
12
19
|
];
|
|
13
20
|
export declare const alignBlocks: (previous: readonly BlockHashes[], next: readonly BlockHashes[]) => BlockPair[];
|
|
14
|
-
export declare const assignBlockKeys: (blocks: readonly
|
|
21
|
+
export declare const assignBlockKeys: (blocks: readonly BlockShape[], previous: readonly BlockKey[], rules: BlockKeyRules) => BlockKey[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const writeClipboardText: (element: Element, text: string) => Promise<"copied" | "failed">;
|
|
@@ -3,6 +3,7 @@ import { IFrameEmbed } from "../embeds.ts";
|
|
|
3
3
|
import { ResolvedLabel } from "../labels.ts";
|
|
4
4
|
export declare const primarySubtagOf: (lang: string) => string | null;
|
|
5
5
|
export declare const usePageOrigin: () => string | null;
|
|
6
|
+
export declare const usePageAddress: () => string | null;
|
|
6
7
|
export declare const usePageLanguage: () => string | null;
|
|
7
8
|
export interface ClientFrameProps {
|
|
8
9
|
readonly embed: IFrameEmbed;
|
|
@@ -7,5 +7,6 @@ export interface ProviderEmbedProps {
|
|
|
7
7
|
readonly fallback: ReactElement;
|
|
8
8
|
readonly theme: "light" | "dark";
|
|
9
9
|
readonly labels: ResolvedEmbedLabels;
|
|
10
|
+
readonly frameSandbox: string;
|
|
10
11
|
}
|
|
11
|
-
export declare const ProviderEmbed: ({ resolution, caption, fallback, theme, labels }: ProviderEmbedProps) => ReactElement;
|
|
12
|
+
export declare const ProviderEmbed: ({ resolution, caption, fallback, theme, labels, frameSandbox }: ProviderEmbedProps) => ReactElement;
|
|
@@ -8,5 +8,5 @@ export type MarkdownEmbedLabelKey = keyof MarkdownEmbedLabels;
|
|
|
8
8
|
export declare const EMBED_LABEL_DEFAULTS: LabelDefaults<MarkdownEmbedLabelKey>;
|
|
9
9
|
export declare const DEFAULT_MARKDOWN_EMBED_LABELS: Readonly<Required<MarkdownEmbedLabels>>;
|
|
10
10
|
export type ResolvedEmbedLabels = Readonly<Record<MarkdownEmbedLabelKey, ResolvedLabel>>;
|
|
11
|
-
export declare const resolveEmbedLabels: (labels: MarkdownEmbedLabels | undefined) => ResolvedEmbedLabels;
|
|
11
|
+
export declare const resolveEmbedLabels: (labels: MarkdownEmbedLabels | undefined, labelsLang: string | undefined) => ResolvedEmbedLabels;
|
|
12
12
|
export declare const BUILT_IN_EMBED_LABELS: ResolvedEmbedLabels;
|
|
@@ -17,6 +17,11 @@ export interface IFrameEmbed {
|
|
|
17
17
|
readonly attributes: Readonly<Partial<Record<IFrameAttributeName, string>>>;
|
|
18
18
|
readonly [VALIDATED_IFRAME_EMBED]: true;
|
|
19
19
|
}
|
|
20
|
+
export declare const withFrameSandbox: (embed: IFrameEmbed, frameSandbox: string) => IFrameEmbed & {
|
|
21
|
+
readonly attributes: {
|
|
22
|
+
readonly sandbox: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
20
25
|
export declare const isAllowedEmbedOrigin: (origin: string, allowedHosts: readonly string[]) => boolean;
|
|
21
26
|
export declare const toIFrameEmbed: (attributes: Readonly<Record<string, string>>, allowedHosts: readonly string[]) => IFrameEmbed | null;
|
|
22
27
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DEEPEST_HEADING_LEVEL = 9;
|
|
2
|
+
export declare const DEEPEST_HEADING_ELEMENT_LEVEL = 6;
|
|
3
|
+
export declare const HEADING_DEPTH_ATTRIBUTE = "data-aqmd-heading-depth";
|
|
4
|
+
export declare const assertTopHeadingLevel: (level: number) => void;
|
|
5
|
+
export declare const headingDepthOf: (name: string) => number | undefined;
|
|
6
|
+
export declare const renderedHeadingLevelOf: (depth: number, topLevel: number) => number;
|
|
@@ -6,6 +6,9 @@ export type SanitizedElement = {
|
|
|
6
6
|
} | {
|
|
7
7
|
readonly action: "keep";
|
|
8
8
|
readonly attributes: Readonly<Record<string, string>>;
|
|
9
|
+
} | {
|
|
10
|
+
readonly action: "image";
|
|
11
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
9
12
|
} | {
|
|
10
13
|
readonly action: "embed";
|
|
11
14
|
readonly embed: IFrameEmbed;
|
|
@@ -15,10 +18,20 @@ export type SanitizedElement = {
|
|
|
15
18
|
readonly attributes: Readonly<Record<string, string>>;
|
|
16
19
|
readonly link: string;
|
|
17
20
|
};
|
|
18
|
-
export
|
|
21
|
+
export type HtmlAllowlist = "document" | "untrusted";
|
|
22
|
+
export type AllowlistContext = {
|
|
23
|
+
readonly allowlist: "document";
|
|
24
|
+
readonly idPrefix?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
readonly allowlist: "untrusted";
|
|
27
|
+
readonly idPrefix: string;
|
|
28
|
+
};
|
|
29
|
+
export type SanitizeContext = AllowlistContext & {
|
|
19
30
|
readonly parentName: string | null;
|
|
20
31
|
readonly iFrameAllowedDomains: readonly string[];
|
|
21
|
-
}
|
|
32
|
+
};
|
|
33
|
+
export declare const ID_PREFIX_SHAPE: RegExp;
|
|
34
|
+
export declare const allowlistContextOf: (allowlist: HtmlAllowlist, idPrefix: string | undefined) => AllowlistContext;
|
|
22
35
|
export declare const isSafeUrl: (value: string) => boolean;
|
|
23
36
|
export declare const reduceStyleToTextAlign: (style: string) => string | null;
|
|
24
37
|
export declare const reduceClassToPackageTokens: (value: string) => string | null;
|
|
@@ -5,8 +5,9 @@ export interface LabelDefault {
|
|
|
5
5
|
}
|
|
6
6
|
export interface ResolvedLabel {
|
|
7
7
|
readonly text: string;
|
|
8
|
-
readonly lang:
|
|
8
|
+
readonly lang: string | undefined;
|
|
9
9
|
}
|
|
10
10
|
export type LabelDefaults<K extends string> = Readonly<Record<K, LabelDefault>>;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const canonicalLabelsLang: (labelsLang: string | undefined) => string | undefined;
|
|
12
|
+
export declare const resolveLabels: <K extends string>(defaults: LabelDefaults<K>, supplied: Readonly<Partial<Record<K, string>>> | undefined, labelsLang: string | undefined) => Readonly<Record<K, ResolvedLabel>>;
|
|
12
13
|
export declare const labelTextsOf: <K extends string>(defaults: LabelDefaults<K>) => Readonly<Record<K, string>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const urlAsParsed: (url: string) => string;
|
|
1
2
|
export declare const isExternalHref: (href: string) => boolean;
|
|
2
3
|
export declare const LINK_CLASS_NAME = "text-link underline visited:text-link-visited";
|
|
3
4
|
export declare const LINK_BOX_CLASS_NAME = "inline-block w-fit";
|
|
@@ -6,11 +6,13 @@ type CodeNodeProps = {
|
|
|
6
6
|
theme?: "light" | "dark";
|
|
7
7
|
sourceLines?: string;
|
|
8
8
|
labels?: CodeBlockLabels;
|
|
9
|
+
labelsLang?: string;
|
|
10
|
+
deferHighlight?: boolean;
|
|
9
11
|
node?: {
|
|
10
12
|
lang?: string | null;
|
|
11
13
|
meta?: string | null;
|
|
12
14
|
value: string;
|
|
13
15
|
};
|
|
14
16
|
};
|
|
15
|
-
export declare const CodeNode: ({ lang: langProp, code, node, sourceLines, labels }: CodeNodeProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const CodeNode: ({ lang: langProp, code, node, sourceLines, labels, labelsLang, deferHighlight }: CodeNodeProps) => import("react").JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -25,6 +25,11 @@ export interface MermaidDiagramLabels {
|
|
|
25
25
|
fullscreenDialog?: string;
|
|
26
26
|
diagram?: string;
|
|
27
27
|
retry?: string;
|
|
28
|
+
loading?: string;
|
|
29
|
+
errorPrefix?: string;
|
|
30
|
+
initializationFailed?: string;
|
|
31
|
+
renderFailed?: string;
|
|
32
|
+
emptyDrawing?: string;
|
|
28
33
|
}
|
|
29
34
|
export type MermaidDiagramLabelKey = keyof MermaidDiagramLabels;
|
|
30
35
|
export declare const MERMAID_DIAGRAM_LABEL_DEFAULTS: LabelDefaults<MermaidDiagramLabelKey>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Mermaid } from "mermaid";
|
|
2
|
+
export type MermaidSetup = {
|
|
3
|
+
readonly library: Mermaid;
|
|
4
|
+
} | {
|
|
5
|
+
readonly cause: unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare const createMermaidSetup: (importLibrary: () => Promise<{
|
|
8
|
+
readonly default: Mermaid;
|
|
9
|
+
}>) => (() => Promise<MermaidSetup>);
|
|
10
|
+
export declare const setUpMermaid: () => Promise<MermaidSetup>;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -6,7 +6,7 @@ import { MermaidDiagramLabelKey, MermaidDiagramLabels } from "./mermaidLabels.ts
|
|
|
6
6
|
import { SpreadsheetBlockLabelKey, SpreadsheetBlockLabels } from "./spreadsheetLabels.ts";
|
|
7
7
|
import { SvgImageLabelKey, SvgImageLabels } from "./svgImageLabels.ts";
|
|
8
8
|
export type MermaidViewerLabels = {
|
|
9
|
-
[K in MermaidDiagramLabelKey as `mermaid${Capitalize<K>}`]?: string;
|
|
9
|
+
[K in Exclude<MermaidDiagramLabelKey, "errorPrefix"> as `mermaid${Capitalize<K>}`]?: string;
|
|
10
10
|
};
|
|
11
11
|
export type SpreadsheetViewerLabels = {
|
|
12
12
|
[K in SpreadsheetBlockLabelKey as `spreadsheet${Capitalize<K>}`]?: string;
|
|
@@ -31,6 +31,15 @@ export interface MarkdownViewerLabels extends MermaidViewerLabels, SpreadsheetVi
|
|
|
31
31
|
selectStyleAria?: string;
|
|
32
32
|
pinStyleAria?: string;
|
|
33
33
|
unpinStyleAria?: string;
|
|
34
|
+
styleSectionTitle?: string;
|
|
35
|
+
measureTitle?: string;
|
|
36
|
+
colorsTitle?: string;
|
|
37
|
+
measureFill?: string;
|
|
38
|
+
measureReading?: string;
|
|
39
|
+
colorsDefault?: string;
|
|
40
|
+
colorsSepia?: string;
|
|
41
|
+
colorsDarkLowGlare?: string;
|
|
42
|
+
colorsHighContrast?: string;
|
|
34
43
|
openTocAria?: string;
|
|
35
44
|
tocTitle?: string;
|
|
36
45
|
pinTocAria?: string;
|
|
@@ -47,7 +56,7 @@ export type MarkdownViewerLabelKey = keyof MarkdownViewerLabels;
|
|
|
47
56
|
type ViewerBuiltInLabelKey = Exclude<MarkdownViewerLabelKey, SpreadsheetViewerLabelKey>;
|
|
48
57
|
export declare const DEFAULT_MARKDOWN_VIEWER_LABELS: Readonly<Required<Omit<MarkdownViewerLabels, SpreadsheetViewerLabelKey>>>;
|
|
49
58
|
export type ResolvedViewerLabels = Readonly<Record<ViewerBuiltInLabelKey, ResolvedLabel>>;
|
|
50
|
-
export declare const resolveViewerLabels: (labels: MarkdownViewerLabels | undefined) => ResolvedViewerLabels;
|
|
59
|
+
export declare const resolveViewerLabels: (labels: MarkdownViewerLabels | undefined, labelsLang: string | undefined) => ResolvedViewerLabels;
|
|
51
60
|
export declare const toMermaidDiagramLabels: (labels: MarkdownViewerLabels | undefined) => MermaidDiagramLabels;
|
|
52
61
|
export declare const toSpreadsheetBlockLabels: (labels: MarkdownViewerLabels | undefined) => SpreadsheetBlockLabels;
|
|
53
62
|
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;
|