@aiquants/markdown 12.2.3 → 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 +383 -75
- package/dist/{abnfDiagram-VRR7QNED-DQ52KUbH.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-Cc9gQRX2.js → architectureDiagram-ZJ3FMSHR-BaSp0hC2.js} +2 -2
- package/dist/architectureDiagram-ZJ3FMSHR-BfmjNYww.cjs +36 -0
- package/dist/{blockDiagram-677ZJIJ3-DIpIE77y.js → blockDiagram-677ZJIJ3-DFcPQ19k.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-BCgCtZXM.cjs → blockDiagram-677ZJIJ3-u7d3VCxA.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-jgR25uUP.js → c4Diagram-LMCZKHZV-DW0yo5tR.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-q0iHoZqg.cjs → c4Diagram-LMCZKHZV-nScsMUE3.cjs} +1 -1
- package/dist/{channel-Bw3o-12p.js → channel-B2FBCr9X.js} +1 -1
- package/dist/channel-DlkTPSf_.cjs +1 -0
- package/dist/{chunk-2Q5K7J3B-0amJDSXB.js → chunk-2Q5K7J3B-BkE4Fsuz.js} +1 -1
- package/dist/chunk-2Q5K7J3B-evSha-HP.cjs +1 -0
- package/dist/{chunk-32BRIVSS-BMqTi8UH.js → chunk-32BRIVSS-CqpDiZD2.js} +1 -1
- package/dist/chunk-32BRIVSS-rIw6tBRO.cjs +1 -0
- package/dist/{chunk-5VM5RSS4-C0OtlojA.cjs → chunk-5VM5RSS4-CYVpj2mc.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-EGE3VaH8.js → chunk-5VM5RSS4-DAgNhPcU.js} +1 -1
- package/dist/{chunk-EX3LRPZG-4qSuVZkz.cjs → chunk-EX3LRPZG-Ct2cyGh-.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-wasnZ2h7.js → chunk-EX3LRPZG-QFjD28UF.js} +37 -37
- package/dist/{chunk-JWPE2WC7-O891tu2Q.js → chunk-JWPE2WC7-Bj2m1SXZ.js} +1 -1
- package/dist/chunk-JWPE2WC7-Dgw1ILoe.cjs +1 -0
- package/dist/{chunk-MOJQB5TN-BzuZr6pz.js → chunk-MOJQB5TN-B1fdnpCz.js} +121 -121
- package/dist/{chunk-MOJQB5TN-BSfpWEVd.cjs → chunk-MOJQB5TN-yjlPYCh4.cjs} +3 -3
- package/dist/{chunk-PUDLZKDR-DNbm7Xzd.cjs → chunk-PUDLZKDR-BlQ3qKcC.cjs} +4 -4
- package/dist/{chunk-PUDLZKDR-BRL3efwE.js → chunk-PUDLZKDR-CIcw3cpm.js} +16 -16
- package/dist/chunk-RYQCIY6F-B-V6UOJy.cjs +1 -0
- package/dist/{chunk-RYQCIY6F-DwmsCCiA.js → chunk-RYQCIY6F-DyVk8fNp.js} +1 -1
- package/dist/{chunk-V7JOEXUC-BowEdIo-.cjs → chunk-V7JOEXUC-B1EgagKh.cjs} +3 -3
- package/dist/{chunk-V7JOEXUC-D0oynREN.js → chunk-V7JOEXUC-C776k7_V.js} +5 -5
- package/dist/{chunk-VR4S4FIN-Dg_3SNs1.js → chunk-VR4S4FIN-CyqARa17.js} +3 -3
- package/dist/chunk-VR4S4FIN-Sx71KwIQ.cjs +1 -0
- package/dist/{chunk-XXDRQBXY-Byo5u3b_.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-CVu4_B8x.js → classDiagram-OUVF2IWQ-DJ0hW16Q.js} +2 -2
- package/dist/classDiagram-v2-EOCWNBFH-BLAiuPPL.cjs +1 -0
- package/dist/{classDiagram-OUVF2IWQ-CVu4_B8x.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 +8 -0
- package/dist/components/HostedScrollArea.d.ts +2 -1
- package/dist/components/MarkdownRenderer.d.ts +37 -3
- package/dist/components/MarkdownViewer.d.ts +15 -4
- 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 +4 -2
- 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/codeBlockLabels.d.ts +9 -0
- package/dist/components/cssLength.d.ts +1 -0
- package/dist/components/displayMathLabels.d.ts +11 -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/mathRendering.d.ts +3 -1
- package/dist/components/mdastNodes/CodeNode.d.ts +5 -1
- package/dist/components/mdastNodes/MathNode.d.ts +6 -5
- 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 +4 -0
- package/dist/components/rawHtml.d.ts +7 -3
- package/dist/components/spreadsheetModel.d.ts +1 -0
- package/dist/components/toolbarOverlap.d.ts +4 -1
- package/dist/components/viewerLabels.d.ts +22 -3
- package/dist/components/viewerToolbarStyles.d.ts +2 -0
- 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-BmM-AQ-j.js → cose-bilkent-JH36ORCC-CR6Hdvto.js} +1 -1
- package/dist/cose-bilkent-JH36ORCC-reAbGeDU.cjs +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-2qz-sUtp.cjs +62 -0
- package/dist/{cynefinDiagram-TSTJHNR4-iS4n-7T_.js → cynefinDiagram-TSTJHNR4-D1eY-FSf.js} +56 -56
- package/dist/dagre-VKFMJZFB-Byr9WPjb.cjs +4 -0
- package/dist/{dagre-VKFMJZFB-C1Y6S6Dm.js → dagre-VKFMJZFB-CXSczF8v.js} +25 -25
- package/dist/{diagram-FQU43EPY-CRXs7mU1.cjs → diagram-FQU43EPY-2YWng437.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-CFG9AlAq.js → diagram-FQU43EPY-BZo0xcaj.js} +35 -35
- package/dist/diagram-G47NLZAW-CQS7BN4F.cjs +24 -0
- package/dist/{diagram-G47NLZAW-Bqr76Qn5.js → diagram-G47NLZAW-CvJW9ny8.js} +60 -60
- package/dist/{diagram-NH7WQ7WH-BDWfQ8xs.js → diagram-NH7WQ7WH-C6VIkj-R.js} +17 -17
- package/dist/diagram-NH7WQ7WH-DXUwOBe7.cjs +24 -0
- package/dist/{diagram-OA4YK3LP-DuW90Uhk.js → diagram-OA4YK3LP-Co6nMbJc.js} +28 -28
- package/dist/{diagram-OA4YK3LP-uBVV8yBB.cjs → diagram-OA4YK3LP-DBUm2qxb.cjs} +3 -3
- package/dist/{diagram-WEI45ONY-Cd3qe8Wi.js → diagram-WEI45ONY-BaMbc5o2.js} +59 -59
- package/dist/diagram-WEI45ONY-ChpK2gP3.cjs +41 -0
- package/dist/ebnfDiagram-CCIWWBDH-DMIRHp8N.cjs +1 -0
- package/dist/{ebnfDiagram-CCIWWBDH-CMmTdVTT.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-tOZoI25O.js → erDiagram-Q63AITRT-DC-HhdaO.js} +68 -68
- package/dist/{erDiagram-Q63AITRT-ONnVKrzr.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-C23vm5cK.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-BXWses91.js → gitGraphDiagram-IHSO6WYX--yebcp4V.js} +21 -21
- 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 +5 -3
- package/dist/index.client.js +56 -48
- package/dist/index.js +56 -48
- 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-C4NsbHAN.js → infoDiagram-FWYZ7A6U-B4AiTiqD.js} +9 -9
- package/dist/infoDiagram-FWYZ7A6U-BOj0VF20.cjs +2 -0
- package/dist/{ishikawaDiagram-FXEZZL3T-B2bMsFnl.js → ishikawaDiagram-FXEZZL3T-BsYs_qnQ.js} +59 -59
- package/dist/{ishikawaDiagram-FXEZZL3T-Cjqwv-T2.cjs → ishikawaDiagram-FXEZZL3T-CisV4kPO.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-DfRiiYRf.cjs → journeyDiagram-5HDEW3XC-BAvgWwpr.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-DO1Xx-OE.js → journeyDiagram-5HDEW3XC-DbDo-dqu.js} +32 -32
- package/dist/{kanban-definition-HUTT4EX6-RfpoaM17.js → kanban-definition-HUTT4EX6-BlPZISwH.js} +97 -97
- package/dist/{kanban-definition-HUTT4EX6-Cu_E-BJj.cjs → kanban-definition-HUTT4EX6-RjzOWas9.cjs} +2 -2
- package/dist/{linear-BbWOUIQi.js → linear-BXWX8YXI.js} +31 -31
- 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-B5LpvJ9m.js → mindmap-definition-LN4V7U3C-BEWpoMMG.js} +79 -79
- package/dist/{mindmap-definition-LN4V7U3C-CB606E3L.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-DaosueJV.js → pegDiagram-2B236MQR-BF7gLiB-.js} +3 -3
- package/dist/pegDiagram-2B236MQR-BJysMObA.cjs +1 -0
- package/dist/{pieDiagram-ENE6RG2P-wfsOfWyT.js → pieDiagram-ENE6RG2P-D_YzC3qc.js} +50 -50
- package/dist/{pieDiagram-ENE6RG2P-BUY2Dvjo.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-BSvHqsTp.cjs → quadrantDiagram-ABIIQ3AL-DANY0ipQ.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-Bgc3vspL.js → quadrantDiagram-ABIIQ3AL-DDm-r_6D.js} +59 -59
- package/dist/railroadDiagram-RFXS5EU6-CDUd4th1.cjs +1 -0
- package/dist/{railroadDiagram-RFXS5EU6-Du2CFU9M.js → railroadDiagram-RFXS5EU6-hJ6uB90G.js} +3 -3
- package/dist/remarkProcessor.server.d.ts +2 -0
- package/dist/{requirementDiagram-TGXJPOKE-CnafqSUP.js → requirementDiagram-TGXJPOKE-BJef5Jb0.js} +15 -15
- package/dist/{requirementDiagram-TGXJPOKE-WM3sItRw.cjs → requirementDiagram-TGXJPOKE-DaoCo7go.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-D4Qv4d98.js → sankeyDiagram-HTMAVEWB-BZQs0bE-.js} +41 -41
- package/dist/{sankeyDiagram-HTMAVEWB-DaZN3ZDb.cjs → sankeyDiagram-HTMAVEWB-DXiv0YOu.cjs} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-C6fa7Axs.cjs → sequenceDiagram-DBY2YBRQ-CJGpsnsv.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-CmP6XGGE.js → sequenceDiagram-DBY2YBRQ-D05U2w26.js} +46 -46
- package/dist/serviceClient.cjs +1 -0
- package/dist/serviceClient.d.ts +3 -0
- package/dist/serviceClient.js +9 -0
- package/dist/{sizeCapture-X5ZJPWSS-mWZkTwA5.js → sizeCapture-X5ZJPWSS-DTr0Vm61.js} +1 -1
- package/dist/sizeCapture-X5ZJPWSS-DjuH1zNP.cjs +1 -0
- package/dist/{stateDiagram-2N3HPSRC-ClDZKhLD.js → stateDiagram-2N3HPSRC-B8nvJKpB.js} +13 -13
- package/dist/stateDiagram-2N3HPSRC-BrB47FD-.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CC8gOGDK.cjs +1 -0
- package/dist/{stateDiagram-v2-6OUMAXLB-K7slPgH_.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-Cpowlk7O.js → swimlanes-5IMT3BWC-BPtufzUd.js} +3 -3
- package/dist/swimlanes-5IMT3BWC-WAbDPRgt.cjs +1 -0
- package/dist/{swimlanesDiagram-G3AALYLV-36K4ynZn.js → swimlanesDiagram-G3AALYLV-BQKEmJFX.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-BZ0eguZa.cjs → swimlanesDiagram-G3AALYLV-BTwwtLZL.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-C2xHtlkw.js → timeline-definition-FHXFAJF6-DJ6GV7Fz.js} +53 -53
- package/dist/{timeline-definition-FHXFAJF6-BJN69nkZ.cjs → timeline-definition-FHXFAJF6-qdkrah7t.cjs} +1 -1
- package/dist/utils/promiseTry.d.ts +1 -0
- package/dist/vennDiagram-L72KCM5P-B5onSWPA.cjs +34 -0
- package/dist/{vennDiagram-L72KCM5P-DbqRaWm5.js → vennDiagram-L72KCM5P-DWnnndTj.js} +176 -176
- 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-CF5I0pM9.js → wardleyDiagram-EHGQE667-DFmDgQSb.js} +34 -34
- package/dist/{wardleyDiagram-EHGQE667-CyU76ilz.cjs → wardleyDiagram-EHGQE667-DdeBbvVM.cjs} +2 -2
- package/dist/{xychartDiagram-FW5EYKEG-DaKE_uIg.cjs → xychartDiagram-FW5EYKEG-CiJQMClv.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-spkx-w6w.js → xychartDiagram-FW5EYKEG-L2Kj4cZA.js} +56 -56
- package/package.json +32 -17
- package/dist/abnfDiagram-VRR7QNED-1fn6qV_P.cjs +0 -1
- package/dist/arc-D8xGHwLe.cjs +0 -1
- package/dist/arc-D9kg3f8-.js +0 -83
- package/dist/architectureDiagram-ZJ3FMSHR-C4QxQA-o.cjs +0 -36
- package/dist/channel-DuWQwUVP.cjs +0 -1
- package/dist/chunk-2Q5K7J3B-gCP3NILS.cjs +0 -1
- package/dist/chunk-32BRIVSS-PidRQo43.cjs +0 -1
- package/dist/chunk-JWPE2WC7-CHK_g5p5.cjs +0 -1
- package/dist/chunk-RYQCIY6F-B_33Thwg.cjs +0 -1
- package/dist/chunk-VR4S4FIN-Ca3mlCgX.cjs +0 -1
- package/dist/chunk-XXDRQBXY-CeZMmeIi.cjs +0 -1
- package/dist/classDiagram-OUVF2IWQ-DPzttpgE.cjs +0 -1
- package/dist/classDiagram-v2-EOCWNBFH-DPzttpgE.cjs +0 -1
- package/dist/cose-bilkent-JH36ORCC-C3UAMvQQ.cjs +0 -1
- package/dist/cynefinDiagram-TSTJHNR4-DStGofoE.cjs +0 -62
- package/dist/dagre-VKFMJZFB-BXsQ5-Ek.cjs +0 -4
- package/dist/diagram-G47NLZAW-BaX-jrfs.cjs +0 -24
- package/dist/diagram-NH7WQ7WH-Cczq2y99.cjs +0 -24
- package/dist/diagram-WEI45ONY-C_L-4kui.cjs +0 -41
- package/dist/ebnfDiagram-CCIWWBDH-Cg7DTSlM.cjs +0 -1
- package/dist/errors-BW5JXRoX.cjs +0 -1
- package/dist/errors-Blk_XJ9C.js +0 -55
- package/dist/extractHeadings-3qWVTkb9.js +0 -20290
- package/dist/extractHeadings-DpvwXCio.cjs +0 -315
- package/dist/flowDiagram-23GEKE2U-DfDAl_qd.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-p6ccACf3.js +0 -7
- package/dist/ganttDiagram-NO4QXBWP-CHP_muri.cjs +0 -292
- package/dist/gitGraphDiagram-IHSO6WYX-DOH3WBNZ.cjs +0 -106
- package/dist/infoDiagram-FWYZ7A6U-Bj2fnr5Y.cjs +0 -2
- package/dist/linear-Cz3x9Lkl.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-BCqBc3Re.cjs +0 -1
- package/dist/railroadDiagram-RFXS5EU6-DdF2c_n3.cjs +0 -1
- package/dist/sizeCapture-X5ZJPWSS-B6sRQba9.cjs +0 -1
- package/dist/stateDiagram-2N3HPSRC-B__29zPZ.cjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-BA-_ovVY.cjs +0 -1
- package/dist/swimlanes-5IMT3BWC-BhxZhB7M.cjs +0 -1
- package/dist/vennDiagram-L72KCM5P-3R1vuMWd.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
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { createClient as T, ConnectError as k, Code as s } from "@connectrpc/connect";
|
|
2
|
+
import { e as g, i as v, d as M, c as b, B as y, a as f, b as S } from "./errors-CapTNE7l.js";
|
|
3
|
+
import { Message as u, proto3 as a, MethodKind as p } from "@bufbuild/protobuf";
|
|
4
|
+
class l extends u {
|
|
5
|
+
/**
|
|
6
|
+
* @generated from field: string markdown_text = 1;
|
|
7
|
+
*/
|
|
8
|
+
markdownText = "";
|
|
9
|
+
/**
|
|
10
|
+
* Path of the document being converted. Canonical form is a fully qualified
|
|
11
|
+
* URI: `file:///abs/path.md` (or a bare absolute path) for local documents,
|
|
12
|
+
* `gcs://` / `gdrive://` URIs for cloud documents. A workspace-relative path
|
|
13
|
+
* (bare or with a stray `file://` prefix) is also accepted and is anchored to
|
|
14
|
+
* `workspace_root` server-side. Relative paths are NEVER resolved against the
|
|
15
|
+
* server process's working directory. A local path in any of these forms is
|
|
16
|
+
* a URI path, percent-decoded once, so `%` in a name is written `%25`.
|
|
17
|
+
* INVALID_ARGUMENT is returned when the path is empty, when `workspace_root`
|
|
18
|
+
* is not absolute, when a relative path cannot be anchored strictly inside
|
|
19
|
+
* `workspace_root` (e.g. `.` or `..` escapes), or when an absolute local path
|
|
20
|
+
* lies outside `workspace_root` or is `workspace_root` itself, at any
|
|
21
|
+
* percent-decoding level.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string file_path = 2;
|
|
24
|
+
*/
|
|
25
|
+
filePath = "";
|
|
26
|
+
/**
|
|
27
|
+
* Absolute path of the workspace root, required for every document whatever
|
|
28
|
+
* its scheme (INVALID_ARGUMENT otherwise, also when it names no directory for
|
|
29
|
+
* the service). It is a plain path, never percent-decoded. It anchors relative
|
|
30
|
+
* `file_path` values, bounds the local file:// sandbox, and is the base of the
|
|
31
|
+
* workspace-relative document paths written to `data-asset-src` and
|
|
32
|
+
* `data-doc-path`.
|
|
33
|
+
*
|
|
34
|
+
* @generated from field: string workspace_root = 3;
|
|
35
|
+
*/
|
|
36
|
+
workspaceRoot = "";
|
|
37
|
+
/**
|
|
38
|
+
* Enables existence validation for locally resolvable image and doc-link
|
|
39
|
+
* targets. Every admitted storage image (local or cloud) has no src and
|
|
40
|
+
* carries `data-asset-src` (its document path); when true, a local one also
|
|
41
|
+
* gains `data-asset-exists` ("true" or "false"), and local doc links gain
|
|
42
|
+
* `data-doc-exists`. A target refused by `deny` or outside `workspace_root` is
|
|
43
|
+
* never probed: it carries the marker of a missing one, without
|
|
44
|
+
* `data-asset-src`, whether or not it exists.
|
|
45
|
+
* When false, no existence markers are emitted and no existence probes run.
|
|
46
|
+
* Cloud-scheme (gcs/gdrive) targets are never probed.
|
|
47
|
+
*
|
|
48
|
+
* @generated from field: bool validate_existence = 4;
|
|
49
|
+
*/
|
|
50
|
+
validateExistence = !1;
|
|
51
|
+
/**
|
|
52
|
+
* @generated from field: optional bool enable_subscript = 5;
|
|
53
|
+
*/
|
|
54
|
+
enableSubscript;
|
|
55
|
+
/**
|
|
56
|
+
* @generated from field: optional bool enable_superscript = 6;
|
|
57
|
+
*/
|
|
58
|
+
enableSuperscript;
|
|
59
|
+
/**
|
|
60
|
+
* @generated from field: optional bool enable_mark = 7;
|
|
61
|
+
*/
|
|
62
|
+
enableMark;
|
|
63
|
+
/**
|
|
64
|
+
* @generated from field: optional bool enable_table_merge = 8;
|
|
65
|
+
*/
|
|
66
|
+
enableTableMerge;
|
|
67
|
+
/**
|
|
68
|
+
* @generated from field: optional bool enable_embeds = 9;
|
|
69
|
+
*/
|
|
70
|
+
enableEmbeds;
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: optional bool enable_zenn_directives = 10;
|
|
73
|
+
*/
|
|
74
|
+
enableZennDirectives;
|
|
75
|
+
/**
|
|
76
|
+
* Expands `<!-- @import "path" -->` directives before conversion. False by
|
|
77
|
+
* default: a directive then stays an HTML comment and nothing is read. When
|
|
78
|
+
* true, a target is read only when it is a Markdown file (its name ends in
|
|
79
|
+
* `.md` in any letter case, also once links are followed) and `deny` admits
|
|
80
|
+
* it, nested imports included; a refused target, or one whose real path
|
|
81
|
+
* cannot be examined, fails the conversion with PERMISSION_DENIED. The
|
|
82
|
+
* document with every import expanded is held to the server's source limit
|
|
83
|
+
* (RESOURCE_EXHAUSTED past it).
|
|
84
|
+
*
|
|
85
|
+
* @generated from field: bool resolve_imports = 11;
|
|
86
|
+
*/
|
|
87
|
+
resolveImports = !1;
|
|
88
|
+
/**
|
|
89
|
+
* The largest HTML the conversion may produce, in bytes, before and after
|
|
90
|
+
* post-processing; with `include_streaming_hints`, the largest
|
|
91
|
+
* post-processed HTML and `block_offsets` together, each offset counted as
|
|
92
|
+
* 5 bytes (its largest encoding). Must be positive when set
|
|
93
|
+
* (INVALID_ARGUMENT otherwise).
|
|
94
|
+
* The server's own limit applies as well; the smaller one wins. A conversion
|
|
95
|
+
* that would exceed it stops while rendering and fails with
|
|
96
|
+
* RESOURCE_EXHAUSTED.
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: optional uint32 max_html_bytes = 12;
|
|
99
|
+
*/
|
|
100
|
+
maxHtmlBytes;
|
|
101
|
+
/**
|
|
102
|
+
* Deny rules applied to every target the conversion resolves: imports,
|
|
103
|
+
* images and links. Required (INVALID_ARGUMENT when unset); an empty pattern
|
|
104
|
+
* list denies nothing.
|
|
105
|
+
*
|
|
106
|
+
* @generated from field: markdown.v1.DenyRules deny = 13;
|
|
107
|
+
*/
|
|
108
|
+
deny;
|
|
109
|
+
/**
|
|
110
|
+
* Annotates every rendered block with `data-source-lines="<first>-<last>"`:
|
|
111
|
+
* the 1-based lines of `markdown_text` it came from, both inclusive (with
|
|
112
|
+
* `resolve_imports`, the lines of the text with every import expanded). A
|
|
113
|
+
* block that spans no line of its own (a thematic break) and a raw HTML
|
|
114
|
+
* block carry none. False by default; either way, a `data-source-lines` an
|
|
115
|
+
* author wrote is removed, so the attribute in the HTML is always the
|
|
116
|
+
* converter's own. With it, the HTML is the HTML without it plus the
|
|
117
|
+
* attribute alone.
|
|
118
|
+
*
|
|
119
|
+
* @generated from field: bool include_source_lines = 14;
|
|
120
|
+
*/
|
|
121
|
+
includeSourceLines = !1;
|
|
122
|
+
/**
|
|
123
|
+
* Reads the delimiter runs of emphasis and strikethrough by the CommonMark
|
|
124
|
+
* CJK-friendly amendments (markdown-cjk-friendly), so emphasis opens and
|
|
125
|
+
* closes next to CJK punctuation: `これは**「重要」**です。` is strong
|
|
126
|
+
* emphasis, where CommonMark leaves the asterisks as text. False by default.
|
|
127
|
+
*
|
|
128
|
+
* @generated from field: bool cjk_friendly_emphasis = 15;
|
|
129
|
+
*/
|
|
130
|
+
cjkFriendlyEmphasis = !1;
|
|
131
|
+
/**
|
|
132
|
+
* Renders every line break inside a paragraph (a soft line break) as `<br>`.
|
|
133
|
+
* False by default: a line break stays a line feed of the text.
|
|
134
|
+
*
|
|
135
|
+
* @generated from field: bool hard_line_breaks = 16;
|
|
136
|
+
*/
|
|
137
|
+
hardLineBreaks = !1;
|
|
138
|
+
/**
|
|
139
|
+
* Returns what a host needs to render the HTML while the text grows:
|
|
140
|
+
* `block_offsets` in the response, and `data-open-code=""` on the `pre`
|
|
141
|
+
* element of every code block that runs to the end of `markdown_text` (a
|
|
142
|
+
* fenced or indented code block that no later block follows, with nothing
|
|
143
|
+
* after its last line, the opening line of a fenced block without lines,
|
|
144
|
+
* but white space and `>`: a closing fence always follows). False by
|
|
145
|
+
* default; either way, a `data-open-code` an author wrote is removed, so
|
|
146
|
+
* the attribute in the HTML is always the converter's own. With it, the
|
|
147
|
+
* HTML is the HTML without it plus the attribute alone.
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: bool include_streaming_hints = 17;
|
|
150
|
+
*/
|
|
151
|
+
includeStreamingHints = !1;
|
|
152
|
+
constructor(e) {
|
|
153
|
+
super(), a.util.initPartial(e, this);
|
|
154
|
+
}
|
|
155
|
+
static runtime = a;
|
|
156
|
+
static typeName = "markdown.v1.ConvertRequest";
|
|
157
|
+
static fields = a.util.newFieldList(() => [
|
|
158
|
+
{
|
|
159
|
+
no: 1,
|
|
160
|
+
name: "markdown_text",
|
|
161
|
+
kind: "scalar",
|
|
162
|
+
T: 9
|
|
163
|
+
/* ScalarType.STRING */
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
no: 2,
|
|
167
|
+
name: "file_path",
|
|
168
|
+
kind: "scalar",
|
|
169
|
+
T: 9
|
|
170
|
+
/* ScalarType.STRING */
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
no: 3,
|
|
174
|
+
name: "workspace_root",
|
|
175
|
+
kind: "scalar",
|
|
176
|
+
T: 9
|
|
177
|
+
/* ScalarType.STRING */
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
no: 4,
|
|
181
|
+
name: "validate_existence",
|
|
182
|
+
kind: "scalar",
|
|
183
|
+
T: 8
|
|
184
|
+
/* ScalarType.BOOL */
|
|
185
|
+
},
|
|
186
|
+
{ no: 5, name: "enable_subscript", kind: "scalar", T: 8, opt: !0 },
|
|
187
|
+
{ no: 6, name: "enable_superscript", kind: "scalar", T: 8, opt: !0 },
|
|
188
|
+
{ no: 7, name: "enable_mark", kind: "scalar", T: 8, opt: !0 },
|
|
189
|
+
{ no: 8, name: "enable_table_merge", kind: "scalar", T: 8, opt: !0 },
|
|
190
|
+
{ no: 9, name: "enable_embeds", kind: "scalar", T: 8, opt: !0 },
|
|
191
|
+
{ no: 10, name: "enable_zenn_directives", kind: "scalar", T: 8, opt: !0 },
|
|
192
|
+
{
|
|
193
|
+
no: 11,
|
|
194
|
+
name: "resolve_imports",
|
|
195
|
+
kind: "scalar",
|
|
196
|
+
T: 8
|
|
197
|
+
/* ScalarType.BOOL */
|
|
198
|
+
},
|
|
199
|
+
{ no: 12, name: "max_html_bytes", kind: "scalar", T: 13, opt: !0 },
|
|
200
|
+
{ no: 13, name: "deny", kind: "message", T: c },
|
|
201
|
+
{
|
|
202
|
+
no: 14,
|
|
203
|
+
name: "include_source_lines",
|
|
204
|
+
kind: "scalar",
|
|
205
|
+
T: 8
|
|
206
|
+
/* ScalarType.BOOL */
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
no: 15,
|
|
210
|
+
name: "cjk_friendly_emphasis",
|
|
211
|
+
kind: "scalar",
|
|
212
|
+
T: 8
|
|
213
|
+
/* ScalarType.BOOL */
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
no: 16,
|
|
217
|
+
name: "hard_line_breaks",
|
|
218
|
+
kind: "scalar",
|
|
219
|
+
T: 8
|
|
220
|
+
/* ScalarType.BOOL */
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
no: 17,
|
|
224
|
+
name: "include_streaming_hints",
|
|
225
|
+
kind: "scalar",
|
|
226
|
+
T: 8
|
|
227
|
+
/* ScalarType.BOOL */
|
|
228
|
+
}
|
|
229
|
+
]);
|
|
230
|
+
static fromBinary(e, t) {
|
|
231
|
+
return new l().fromBinary(e, t);
|
|
232
|
+
}
|
|
233
|
+
static fromJson(e, t) {
|
|
234
|
+
return new l().fromJson(e, t);
|
|
235
|
+
}
|
|
236
|
+
static fromJsonString(e, t) {
|
|
237
|
+
return new l().fromJsonString(e, t);
|
|
238
|
+
}
|
|
239
|
+
static equals(e, t) {
|
|
240
|
+
return a.util.equals(l, e, t);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
class c extends u {
|
|
244
|
+
/**
|
|
245
|
+
* @generated from field: repeated string segment_patterns = 1;
|
|
246
|
+
*/
|
|
247
|
+
segmentPatterns = [];
|
|
248
|
+
constructor(e) {
|
|
249
|
+
super(), a.util.initPartial(e, this);
|
|
250
|
+
}
|
|
251
|
+
static runtime = a;
|
|
252
|
+
static typeName = "markdown.v1.DenyRules";
|
|
253
|
+
static fields = a.util.newFieldList(() => [{ no: 1, name: "segment_patterns", kind: "scalar", T: 9, repeated: !0 }]);
|
|
254
|
+
static fromBinary(e, t) {
|
|
255
|
+
return new c().fromBinary(e, t);
|
|
256
|
+
}
|
|
257
|
+
static fromJson(e, t) {
|
|
258
|
+
return new c().fromJson(e, t);
|
|
259
|
+
}
|
|
260
|
+
static fromJsonString(e, t) {
|
|
261
|
+
return new c().fromJsonString(e, t);
|
|
262
|
+
}
|
|
263
|
+
static equals(e, t) {
|
|
264
|
+
return a.util.equals(c, e, t);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
class o extends u {
|
|
268
|
+
/**
|
|
269
|
+
* @generated from field: string html_content = 1;
|
|
270
|
+
*/
|
|
271
|
+
htmlContent = "";
|
|
272
|
+
/**
|
|
273
|
+
* @generated from field: repeated markdown.v1.Heading headings = 2;
|
|
274
|
+
*/
|
|
275
|
+
headings = [];
|
|
276
|
+
/**
|
|
277
|
+
* With `include_streaming_hints`, the offsets in UTF-16 code units at which
|
|
278
|
+
* the blocks of `html_content` start, in increasing order from 0: each block
|
|
279
|
+
* holds one top-level node that is not text of ASCII white space alone and
|
|
280
|
+
* the white space after it, the first block also the white space before it.
|
|
281
|
+
* Empty without the hints. They count toward `max_html_bytes` with the HTML.
|
|
282
|
+
*
|
|
283
|
+
* @generated from field: repeated uint32 block_offsets = 3;
|
|
284
|
+
*/
|
|
285
|
+
blockOffsets = [];
|
|
286
|
+
constructor(e) {
|
|
287
|
+
super(), a.util.initPartial(e, this);
|
|
288
|
+
}
|
|
289
|
+
static runtime = a;
|
|
290
|
+
static typeName = "markdown.v1.ConvertResponse";
|
|
291
|
+
static fields = a.util.newFieldList(() => [
|
|
292
|
+
{
|
|
293
|
+
no: 1,
|
|
294
|
+
name: "html_content",
|
|
295
|
+
kind: "scalar",
|
|
296
|
+
T: 9
|
|
297
|
+
/* ScalarType.STRING */
|
|
298
|
+
},
|
|
299
|
+
{ no: 2, name: "headings", kind: "message", T: d, repeated: !0 },
|
|
300
|
+
{ no: 3, name: "block_offsets", kind: "scalar", T: 13, repeated: !0 }
|
|
301
|
+
]);
|
|
302
|
+
static fromBinary(e, t) {
|
|
303
|
+
return new o().fromBinary(e, t);
|
|
304
|
+
}
|
|
305
|
+
static fromJson(e, t) {
|
|
306
|
+
return new o().fromJson(e, t);
|
|
307
|
+
}
|
|
308
|
+
static fromJsonString(e, t) {
|
|
309
|
+
return new o().fromJsonString(e, t);
|
|
310
|
+
}
|
|
311
|
+
static equals(e, t) {
|
|
312
|
+
return a.util.equals(o, e, t);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
class d extends u {
|
|
316
|
+
/**
|
|
317
|
+
* @generated from field: string text = 1;
|
|
318
|
+
*/
|
|
319
|
+
text = "";
|
|
320
|
+
/**
|
|
321
|
+
* @generated from field: int32 depth = 2;
|
|
322
|
+
*/
|
|
323
|
+
depth = 0;
|
|
324
|
+
/**
|
|
325
|
+
* @generated from field: string id = 3;
|
|
326
|
+
*/
|
|
327
|
+
id = "";
|
|
328
|
+
constructor(e) {
|
|
329
|
+
super(), a.util.initPartial(e, this);
|
|
330
|
+
}
|
|
331
|
+
static runtime = a;
|
|
332
|
+
static typeName = "markdown.v1.Heading";
|
|
333
|
+
static fields = a.util.newFieldList(() => [
|
|
334
|
+
{
|
|
335
|
+
no: 1,
|
|
336
|
+
name: "text",
|
|
337
|
+
kind: "scalar",
|
|
338
|
+
T: 9
|
|
339
|
+
/* ScalarType.STRING */
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
no: 2,
|
|
343
|
+
name: "depth",
|
|
344
|
+
kind: "scalar",
|
|
345
|
+
T: 5
|
|
346
|
+
/* ScalarType.INT32 */
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
no: 3,
|
|
350
|
+
name: "id",
|
|
351
|
+
kind: "scalar",
|
|
352
|
+
T: 9
|
|
353
|
+
/* ScalarType.STRING */
|
|
354
|
+
}
|
|
355
|
+
]);
|
|
356
|
+
static fromBinary(e, t) {
|
|
357
|
+
return new d().fromBinary(e, t);
|
|
358
|
+
}
|
|
359
|
+
static fromJson(e, t) {
|
|
360
|
+
return new d().fromJson(e, t);
|
|
361
|
+
}
|
|
362
|
+
static fromJsonString(e, t) {
|
|
363
|
+
return new d().fromJsonString(e, t);
|
|
364
|
+
}
|
|
365
|
+
static equals(e, t) {
|
|
366
|
+
return a.util.equals(d, e, t);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
const E = {
|
|
370
|
+
typeName: "markdown.v1.MarkdownService",
|
|
371
|
+
methods: {
|
|
372
|
+
/**
|
|
373
|
+
* Converts a document, reading only with the caller's own credentials. Every
|
|
374
|
+
* request names them with the header `X-Storage-Auth-Mode: oauth2`
|
|
375
|
+
* (INVALID_ARGUMENT when it is missing, empty or names anything else), and
|
|
376
|
+
* `Authorization: Bearer <token>` carries the token. A cloud read without a
|
|
377
|
+
* usable token, or with one the storage refuses, fails with UNAUTHENTICATED.
|
|
378
|
+
*
|
|
379
|
+
* @generated from rpc markdown.v1.MarkdownService.Convert
|
|
380
|
+
*/
|
|
381
|
+
convert: {
|
|
382
|
+
name: "Convert",
|
|
383
|
+
I: l,
|
|
384
|
+
O: o,
|
|
385
|
+
kind: p.Unary
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}, x = "X-Storage-Auth-Mode", B = "oauth2", _ = (n, e) => {
|
|
389
|
+
if (g(n, e), n.timeoutMs !== void 0 && !v(n.timeoutMs))
|
|
390
|
+
throw new RangeError(`${e}: timeoutMs must be a positive integer of at most ${M}, got ${n.timeoutMs}`);
|
|
391
|
+
}, O = (n, e) => n.length > e ? !0 : n.length * 3 <= e ? !1 : new TextEncoder().encode(n).byteLength > e, C = /^[\w\-.~+/]+=*$/, J = (n, e) => {
|
|
392
|
+
const t = { [x]: B };
|
|
393
|
+
if (n.userOAuthToken) {
|
|
394
|
+
if (!C.test(n.userOAuthToken)) throw new TypeError("userOAuthToken is not an RFC 6750 bearer token");
|
|
395
|
+
t.Authorization = `Bearer ${n.userOAuthToken}`;
|
|
396
|
+
}
|
|
397
|
+
return { headers: t, signal: e.signal, timeoutMs: e.timeoutMs };
|
|
398
|
+
}, A = async (n, e, t) => {
|
|
399
|
+
let i;
|
|
400
|
+
try {
|
|
401
|
+
i = await n.convert(
|
|
402
|
+
{
|
|
403
|
+
markdownText: e.markdownText,
|
|
404
|
+
filePath: e.filePath,
|
|
405
|
+
workspaceRoot: e.workspaceRoot,
|
|
406
|
+
validateExistence: t.validateExistence ?? !0,
|
|
407
|
+
enableSubscript: t.enableSubscript,
|
|
408
|
+
enableSuperscript: t.enableSuperscript,
|
|
409
|
+
enableMark: t.enableMark,
|
|
410
|
+
enableTableMerge: t.enableTableMerge,
|
|
411
|
+
enableEmbeds: t.enableEmbeds,
|
|
412
|
+
enableZennDirectives: t.enableZennDirectives,
|
|
413
|
+
resolveImports: t.resolveImports ?? !1,
|
|
414
|
+
includeSourceLines: t.includeSourceLines ?? !1,
|
|
415
|
+
includeStreamingHints: t.includeStreamingHints ?? !1,
|
|
416
|
+
cjkFriendlyEmphasis: t.cjkFriendlyEmphasis ?? !1,
|
|
417
|
+
hardLineBreaks: t.hardLineBreaks ?? !1,
|
|
418
|
+
maxHtmlBytes: t.maxHtmlBytes,
|
|
419
|
+
deny: new c({ segmentPatterns: [...t.deniedPathSegments] })
|
|
420
|
+
},
|
|
421
|
+
J(e, t)
|
|
422
|
+
);
|
|
423
|
+
} catch (r) {
|
|
424
|
+
throw r instanceof k ? t.signal?.aborted === !0 ? r.code === s.Canceled ? r : new k(r.rawMessage, s.Canceled, void 0, void 0, r) : r.code === s.ResourceExhausted ? new b(r.rawMessage, { cause: r }) : r : r;
|
|
425
|
+
}
|
|
426
|
+
const m = t.includeStreamingHints === !0 ? i.blockOffsets : void 0, w = y * (m?.length ?? 0);
|
|
427
|
+
if (O(i.htmlContent, t.maxHtmlBytes - w))
|
|
428
|
+
throw new b(`the conversion's HTML${w > 0 ? " with its block offsets" : ""} is longer than maxHtmlBytes (${t.maxHtmlBytes})`);
|
|
429
|
+
const h = {
|
|
430
|
+
htmlContent: i.htmlContent,
|
|
431
|
+
headings: i.headings.map((r) => ({ text: r.text, depth: r.depth, id: r.id }))
|
|
432
|
+
};
|
|
433
|
+
return m === void 0 ? h : { ...h, blockOffsets: m };
|
|
434
|
+
}, H = (n) => {
|
|
435
|
+
switch (n.code) {
|
|
436
|
+
case s.Canceled:
|
|
437
|
+
case s.Unavailable:
|
|
438
|
+
return !0;
|
|
439
|
+
case s.InvalidArgument:
|
|
440
|
+
case s.Internal:
|
|
441
|
+
case s.Unknown:
|
|
442
|
+
case s.Aborted:
|
|
443
|
+
return n.cause !== void 0;
|
|
444
|
+
default:
|
|
445
|
+
return !1;
|
|
446
|
+
}
|
|
447
|
+
}, L = (n, { signal: e, timeoutMs: t }) => {
|
|
448
|
+
if (!(n instanceof k) || e?.aborted === !0 && n.code === s.Canceled) return n;
|
|
449
|
+
if (H(n)) return new f("unavailable", n.rawMessage, { cause: n });
|
|
450
|
+
switch (n.code) {
|
|
451
|
+
case s.DeadlineExceeded:
|
|
452
|
+
return new S(t ?? null, { cause: n });
|
|
453
|
+
case s.InvalidArgument:
|
|
454
|
+
return new f("invalid_argument", n.rawMessage, { cause: n });
|
|
455
|
+
case s.Internal:
|
|
456
|
+
case s.Unknown:
|
|
457
|
+
return new f("internal", n.rawMessage, { cause: n });
|
|
458
|
+
default:
|
|
459
|
+
return n;
|
|
460
|
+
}
|
|
461
|
+
}, U = ({ transport: n }) => {
|
|
462
|
+
const e = T(E, n);
|
|
463
|
+
return {
|
|
464
|
+
convert: async (t, i) => {
|
|
465
|
+
_(i, "MarkdownServiceClient.convert");
|
|
466
|
+
try {
|
|
467
|
+
return await A(e, t, i);
|
|
468
|
+
} catch (m) {
|
|
469
|
+
throw L(m, i);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
export {
|
|
475
|
+
E as M,
|
|
476
|
+
_ as a,
|
|
477
|
+
U as c,
|
|
478
|
+
H as l,
|
|
479
|
+
A as s
|
|
480
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Client as ConnectClient, ConnectError, Transport } from "@connectrpc/connect";
|
|
2
|
+
import { ParseOptions, ParseResult } from "./conversion.ts";
|
|
3
|
+
import { MarkdownService } from "./gen/markdown/v1/markdown_connect.ts";
|
|
4
|
+
export type MarkdownServiceConnectClient = ConnectClient<typeof MarkdownService>;
|
|
5
|
+
export type MarkdownServiceConversion = {
|
|
6
|
+
readonly markdownText: string;
|
|
7
|
+
readonly filePath: string;
|
|
8
|
+
readonly workspaceRoot: string;
|
|
9
|
+
readonly userOAuthToken: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type MarkdownServiceCallOptions = ParseOptions;
|
|
12
|
+
export type MarkdownServiceClient = {
|
|
13
|
+
readonly convert: (input: MarkdownServiceConversion, options: MarkdownServiceCallOptions) => Promise<ParseResult>;
|
|
14
|
+
};
|
|
15
|
+
export declare const assertServiceOptions: (options: MarkdownServiceCallOptions, caller: string) => void;
|
|
16
|
+
export declare const sendConversion: (client: MarkdownServiceConnectClient, input: MarkdownServiceConversion, options: MarkdownServiceCallOptions) => Promise<ParseResult>;
|
|
17
|
+
export declare const lostTheService: (error: ConnectError) => boolean;
|
|
18
|
+
export declare const createMarkdownServiceClient: ({ transport }: {
|
|
19
|
+
readonly transport: Transport;
|
|
20
|
+
}) => MarkdownServiceClient;
|