docmedown 0.1.7 → 0.9.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/LICENSE +201 -21
- package/README.md +86 -37
- package/dist/architecture-7GRP2DOG-B8Xs9IfY.mjs +2 -0
- package/dist/architecture-7GRP2DOG-Vdsw7WC7.js +1 -0
- package/dist/cli.js +672 -1294
- package/dist/cynefin-OW5HDTMX-DU6kwwck.js +1 -0
- package/dist/cynefin-OW5HDTMX-F0P2M_lQ.mjs +2 -0
- package/dist/docmedown-compiler.js +228 -0
- package/dist/docmedown-mermaid.js +3588 -0
- package/dist/docmedown.cjs +7264 -80
- package/dist/docmedown.iife.js +7624 -424
- package/dist/docmedown.mjs +15531 -15009
- package/dist/docmedown.web.js +7628 -0
- package/dist/eventmodeling-NTZA5JFV-D58ICByZ.js +1 -0
- package/dist/eventmodeling-NTZA5JFV-SxxTo5cJ.mjs +2 -0
- package/dist/gitGraph-4MIJSDKK-C_R2a4aQ.mjs +2 -0
- package/dist/gitGraph-4MIJSDKK-CdMj8HJ8.js +1 -0
- package/dist/info-A6RAGUB7-CG4UBCfn.js +1 -0
- package/dist/info-A6RAGUB7-DmjQlHTj.mjs +2 -0
- package/dist/mermaid-BvOI3ZSW.js +3334 -0
- package/dist/mermaid-Cx9uSfoz.mjs +116948 -0
- package/dist/packet-AYTQ26CC-CMuoEJn0.js +1 -0
- package/dist/packet-AYTQ26CC-tdMo_iPL.mjs +2 -0
- package/dist/pie-WAS4IAKB-C1hjX8y0.js +1 -0
- package/dist/pie-WAS4IAKB-DG2Bio1G.mjs +2 -0
- package/dist/prism-CeBRmKvl.js +2 -0
- package/dist/prism-CummdiZX.mjs +1588 -0
- package/dist/radar-RG4KPBEZ-DHxYOB0f.mjs +2 -0
- package/dist/radar-RG4KPBEZ-Dvyo3gdA.js +1 -0
- package/dist/railroad-74A4TZTK-1sb9Z_QQ.js +1 -0
- package/dist/railroad-74A4TZTK-CwztrSkE.mjs +2 -0
- package/dist/railroad-abnf-HS5TGJTU-4264fZjH.js +1 -0
- package/dist/railroad-abnf-HS5TGJTU-BKCsR9iC.mjs +2 -0
- package/dist/railroad-ebnf-LZEXJU2U-BXErl5kO.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-DzDOfuxK.mjs +2 -0
- package/dist/railroad-peg-WCYAUIDC-B6gNHamV.mjs +2 -0
- package/dist/railroad-peg-WCYAUIDC-D7pSwRGa.js +1 -0
- package/dist/rolldown-runtime-B0aSnxlc.mjs +20 -0
- package/dist/rolldown-runtime-DF3sbh8G.js +1 -0
- package/dist/svelte-compiler-loader-Deqbdbvf.js +1 -0
- package/dist/svelte-compiler-loader-DtYQgEKV.mjs +50 -0
- package/dist/svelte-runtime-Brc440dp.js +5 -0
- package/dist/svelte-runtime-CgCk_bw1.mjs +40 -0
- package/dist/treeView-Q6P3EWNA-DArM8kFH.mjs +2 -0
- package/dist/treeView-Q6P3EWNA-JstiGzov.js +1 -0
- package/dist/treemap-WGGIJYW6-CMIcmEVN.mjs +2 -0
- package/dist/treemap-WGGIJYW6-Dq6fFckz.js +1 -0
- package/dist/ts-compiler-BMDmcNn5.mjs +93 -0
- package/dist/ts-compiler-U7pTMJjY.js +3 -0
- package/dist/types/runtime/bridges/dynamic-component.d.ts +43 -0
- package/dist/types/runtime/bridges/element-bridge.d.ts +24 -0
- package/dist/types/runtime/bridges/index.d.ts +3 -0
- package/dist/types/runtime/bridges/react-bridge.d.ts +35 -0
- package/dist/types/runtime/compiler-cache.d.ts +18 -0
- package/dist/types/runtime/config-schema.d.ts +2 -0
- package/dist/types/runtime/favicons.d.ts +28 -0
- package/dist/types/runtime/loader/local-loader.d.ts +13 -0
- package/dist/types/runtime/markdown/component-body.d.ts +7 -0
- package/dist/types/runtime/markdown/escape.d.ts +1 -0
- package/dist/types/runtime/markdown/highlighter.d.ts +32 -6
- package/dist/types/runtime/markdown/katex.d.ts +5 -0
- package/dist/types/runtime/markdown/mermaid-engine.d.ts +1 -0
- package/dist/types/runtime/markdown/mermaid-loader.d.ts +19 -0
- package/dist/types/runtime/markdown/mermaid.d.ts +6 -0
- package/dist/types/runtime/markdown/tables.d.ts +68 -0
- package/dist/types/runtime/media.d.ts +30 -0
- package/dist/types/runtime/motion.d.ts +134 -0
- package/dist/types/runtime/offline-export.d.ts +9 -2
- package/dist/types/runtime/router.d.ts +40 -2
- package/dist/types/runtime/splash.d.ts +90 -0
- package/dist/types/runtime/svelte-compiler-engine.d.ts +1 -0
- package/dist/types/runtime/svelte-compiler-loader.d.ts +14 -0
- package/dist/types/runtime/svelte-runtime.d.ts +29 -0
- package/dist/types/runtime/svelte-tag.d.ts +7 -0
- package/dist/types/runtime/ts-compiler.d.ts +24 -0
- package/dist/types/runtime/types.d.ts +1 -0
- package/dist/types/ui/doc-context.svelte.d.ts +198 -0
- package/dist/types/ui/index.d.ts +33 -0
- package/dist/types/ui/registry.d.ts +52 -0
- package/dist/types/ui/theme.svelte.d.ts +32 -0
- package/dist/wardley-WFR3VGLG-BK9BA6h6.mjs +2 -0
- package/dist/wardley-WFR3VGLG-Cbs7W-dU.js +1 -0
- package/package.json +61 -48
- package/schemas/docs.schema.json +186 -181
- package/templates/.dmd/CounterWidget.svelte +29 -0
- package/templates/README.md +2 -2
- package/templates/favicon.svg +12 -0
- package/templates/favicons/favicon-book.svg +11 -0
- package/templates/favicons/favicon-markdown.svg +11 -0
- package/templates/favicons/favicon-minimal.svg +15 -0
- package/templates/favicons/favicon-terminal.svg +14 -0
- package/templates/favicons/favicon.svg +12 -0
- package/templates/guides/custom-components.md +82 -22
- package/templates/index.html +6 -3
- package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +0 -89
- package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +0 -1
- package/dist/arc-DgPKXEdT.mjs +0 -82
- package/dist/arc-n7TW7Bis.js +0 -1
- package/dist/architecture-7GRP2DOG-B7myQ46f.js +0 -1
- package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +0 -3
- package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +0 -36
- package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +0 -4154
- package/dist/array-CApNbSU9.mjs +0 -6
- package/dist/array-DZSRzHA_.js +0 -1
- package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +0 -129
- package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +0 -1922
- package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +0 -38
- package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +0 -3010
- package/dist/channel-LgHproiI.mjs +0 -5
- package/dist/channel-yqu0m4cl.js +0 -1
- package/dist/chunk-2E4U76K2-BOyeRQsI.js +0 -1
- package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +0 -348
- package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +0 -15
- package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +0 -1
- package/dist/chunk-4HAMMTFA-GFyfmcSO.js +0 -62
- package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +0 -4188
- package/dist/chunk-5VM5RSS4-GINalzIv.js +0 -15
- package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +0 -5
- package/dist/chunk-75Z2AOVW-DYouz5MZ.js +0 -2
- package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +0 -1330
- package/dist/chunk-CLGD4ZFX-C5J-e2io.js +0 -1
- package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +0 -14
- package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +0 -3836
- package/dist/chunk-DU6HZSFF-CWc5ewtb.js +0 -127
- package/dist/chunk-F27PBJKO-8jvY_jJK.js +0 -1
- package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +0 -61
- package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +0 -21456
- package/dist/chunk-FOHPRMQF-tmTlwTeH.js +0 -161
- package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +0 -1863
- package/dist/chunk-GMAD6QVW-DEQiTa0c.js +0 -72
- package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +0 -37
- package/dist/chunk-GVQU2GXP-CdJIWN41.js +0 -1
- package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +0 -2042
- package/dist/chunk-IMKFNOWR-CPJsszGN.js +0 -231
- package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +0 -8
- package/dist/chunk-JWPE2WC7-p1fYVdYc.js +0 -1
- package/dist/chunk-L3NEJ4N5-TzDiVs78.js +0 -1
- package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +0 -245
- package/dist/chunk-LNGE3PJU-BQX75wkM.js +0 -34
- package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +0 -1521
- package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +0 -672
- package/dist/chunk-OSK3NFVY-CHzvVe8m.js +0 -10
- package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +0 -67
- package/dist/chunk-P2QGCYS3-DKZzpRQW.js +0 -1
- package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +0 -26
- package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +0 -1
- package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +0 -275
- package/dist/chunk-PWAF6VOD-DxZLuCEw.js +0 -1
- package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +0 -4183
- package/dist/chunk-SHT3W25Y-BQjHSn5K.js +0 -168
- package/dist/chunk-SVP7TREG-BFMd615E.js +0 -88
- package/dist/chunk-SVP7TREG-CynckzeF.mjs +0 -490
- package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +0 -3357
- package/dist/chunk-TICWLB2K-agcyBfUp.js +0 -206
- package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +0 -59
- package/dist/chunk-TLUHSLCS-Drx_a7am.js +0 -1
- package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +0 -1
- package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +0 -9
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +0 -1
- package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +0 -12
- package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +0 -1
- package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +0 -30
- package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +0 -1
- package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +0 -30
- package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +0 -1
- package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +0 -2253
- package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +0 -3
- package/dist/cynefin-OW5HDTMX-lNKysi7S.js +0 -1
- package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +0 -62
- package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +0 -355
- package/dist/cytoscape.esm-C5TvPYYm.mjs +0 -18148
- package/dist/cytoscape.esm-CBmWJr5M.js +0 -321
- package/dist/dagre-CZ6P9L_h.js +0 -1
- package/dist/dagre-GXQ25YYZ-CQszk-7P.js +0 -4
- package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +0 -425
- package/dist/dagre-J_1oH0eY.mjs +0 -1934
- package/dist/defaultLocale-N-0uLSyg.mjs +0 -198
- package/dist/defaultLocale-ybN1Vtvg.js +0 -1
- package/dist/diagram-S7CK7UJ4-CTMvxX__.js +0 -30
- package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +0 -301
- package/dist/diagram-UQ7AKVKN-1viEkqlG.js +0 -41
- package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +0 -214
- package/dist/diagram-VSXAHHWV-DgVT19mq.js +0 -3
- package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +0 -432
- package/dist/diagram-VX7I27RA-CNw0pOX_.js +0 -24
- package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +0 -527
- package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +0 -134
- package/dist/diagram-Z3DM3KII-CPkBr3FT.js +0 -24
- package/dist/dist-CXWJafG_.js +0 -1
- package/dist/dist-DNdLIC8h.mjs +0 -59
- package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +0 -1
- package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +0 -100
- package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +0 -99
- package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +0 -1966
- package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +0 -1
- package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +0 -3
- package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +0 -1
- package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +0 -17
- package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +0 -3072
- package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +0 -292
- package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +0 -1
- package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +0 -3
- package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +0 -106
- package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +0 -733
- package/dist/graphlib-BaETKKSa.js +0 -1
- package/dist/graphlib-XW-Jr8pF.mjs +0 -1267
- package/dist/info-A6RAGUB7-ClYskpn6.mjs +0 -3
- package/dist/info-A6RAGUB7-DDvvt-fW.js +0 -1
- package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +0 -20
- package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +0 -2
- package/dist/init-BJdqMO10.js +0 -1
- package/dist/init-CsQUQz36.mjs +0 -13
- package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +0 -70
- package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +0 -719
- package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +0 -139
- package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +0 -884
- package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +0 -976
- package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +0 -89
- package/dist/line-BEwhHSLl.js +0 -1
- package/dist/line-CiXRog8O.mjs +0 -34
- package/dist/linear-75tfjrny.js +0 -1
- package/dist/linear-Ncx_RuON.mjs +0 -288
- package/dist/mermaid-parser.core-BBApyu_y.js +0 -6
- package/dist/mermaid-parser.core-BRHibdUE.mjs +0 -638
- package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +0 -1006
- package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +0 -96
- package/dist/ordinal-B1BNQwUR.mjs +0 -65
- package/dist/ordinal-B9aFWmF9.js +0 -1
- package/dist/packet-AYTQ26CC-CorIy9Ul.js +0 -1
- package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +0 -3
- package/dist/path-CnWkkRiY.mjs +0 -84
- package/dist/path-DIS6ck99.js +0 -1
- package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +0 -1
- package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +0 -94
- package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +0 -3
- package/dist/pie-WAS4IAKB-D84xrSoY.js +0 -1
- package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +0 -39
- package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +0 -203
- package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +0 -7
- package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +0 -2001
- package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +0 -3
- package/dist/radar-RG4KPBEZ-R2sQOLL9.js +0 -1
- package/dist/railroad-74A4TZTK-BOZIf6ts.js +0 -1
- package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +0 -3
- package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +0 -3
- package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +0 -1
- package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +0 -1
- package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +0 -3
- package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +0 -3
- package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +0 -1
- package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +0 -76
- package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +0 -1
- package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +0 -84
- package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +0 -2224
- package/dist/rough.esm-ChRLLRha.js +0 -1
- package/dist/rough.esm-DXYGHN3m.mjs +0 -1361
- package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +0 -972
- package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +0 -40
- package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +0 -162
- package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +0 -4156
- package/dist/sizeCapture-INFHLROL-BihkCH-7.js +0 -1
- package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +0 -46
- package/dist/src-B4mN2BMl.js +0 -1
- package/dist/src-D_hsMyeP.mjs +0 -2154
- package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +0 -220
- package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +0 -1
- package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +0 -30
- package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +0 -1
- package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +0 -4979
- package/dist/swimlanes-42K2YHIH-DlggBCTy.js +0 -1
- package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +0 -8
- package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +0 -31
- package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +0 -120
- package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +0 -1069
- package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +0 -3
- package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +0 -1
- package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +0 -3
- package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +0 -1
- package/dist/types/runtime/app.d.ts +0 -9
- package/dist/types/runtime/components/AppearanceMenu.d.ts +0 -2
- package/dist/types/runtime/components/Builtins.d.ts +0 -44
- package/dist/types/runtime/components/Content.d.ts +0 -2
- package/dist/types/runtime/components/DmdRegistry.d.ts +0 -19
- package/dist/types/runtime/components/Layout.d.ts +0 -2
- package/dist/types/runtime/components/MermaidDiagram.d.ts +0 -16
- package/dist/types/runtime/components/Navbar.d.ts +0 -2
- package/dist/types/runtime/components/OfflineDownloadButton.d.ts +0 -2
- package/dist/types/runtime/components/OfflineNotice.d.ts +0 -6
- package/dist/types/runtime/components/Sidebar.d.ts +0 -2
- package/dist/types/runtime/components/TableOfContents.d.ts +0 -8
- package/dist/types/runtime/index.d.ts +0 -8
- package/dist/types/runtime/markdown/renderer.d.ts +0 -7
- package/dist/types/runtime/provider/DocProvider.d.ts +0 -40
- package/dist/types/runtime/provider/ThemeProvider.d.ts +0 -25
- package/dist/types/runtime/search/SearchModal.d.ts +0 -11
- package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +0 -34
- package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +0 -1880
- package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +0 -3
- package/dist/wardley-WFR3VGLG-DWDqJSgm.js +0 -1
- package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +0 -78
- package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +0 -645
- package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +0 -7
- package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +0 -2210
- package/templates/.dmd/components.js +0 -25
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table rendering and export helpers.
|
|
3
|
+
*
|
|
4
|
+
* Both GFM pipe tables and ```csv / ```tsv fences render through
|
|
5
|
+
* `renderTableBlock`, so they share one structure: a slim toolbar (caption +
|
|
6
|
+
* "Copy" dropdown) above a scrollable `<table>`. The export functions work on
|
|
7
|
+
* plain `TableData` read back from the rendered DOM, so what you copy is what
|
|
8
|
+
* you see regardless of the source format.
|
|
9
|
+
*/
|
|
10
|
+
export type TableAlign = "left" | "center" | "right" | null;
|
|
11
|
+
export interface TableCell {
|
|
12
|
+
/** Ready-to-insert HTML for the cell. */
|
|
13
|
+
html: string;
|
|
14
|
+
align?: TableAlign;
|
|
15
|
+
}
|
|
16
|
+
export interface TableData {
|
|
17
|
+
/** Plain-text header cells. Empty when the table has no header row. */
|
|
18
|
+
headers: string[];
|
|
19
|
+
rows: string[][];
|
|
20
|
+
aligns: TableAlign[];
|
|
21
|
+
}
|
|
22
|
+
export declare const TABLE_COPY_FORMATS: readonly [{
|
|
23
|
+
readonly id: "markdown";
|
|
24
|
+
readonly label: "Markdown";
|
|
25
|
+
readonly badge: "MD";
|
|
26
|
+
readonly description: "For documents";
|
|
27
|
+
}, {
|
|
28
|
+
readonly id: "html";
|
|
29
|
+
readonly label: "HTML";
|
|
30
|
+
readonly badge: "<>";
|
|
31
|
+
readonly description: "For web pages";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "csv";
|
|
34
|
+
readonly label: "CSV";
|
|
35
|
+
readonly badge: "CSV";
|
|
36
|
+
readonly description: "For spreadsheets";
|
|
37
|
+
}];
|
|
38
|
+
export type TableCopyFormat = (typeof TABLE_COPY_FORMATS)[number]["id"];
|
|
39
|
+
/** Builds the full table block markup (toolbar + scroll wrapper + table). */
|
|
40
|
+
export declare function renderTableBlock(options: {
|
|
41
|
+
header: TableCell[] | null;
|
|
42
|
+
rows: TableCell[][];
|
|
43
|
+
caption?: string;
|
|
44
|
+
}): string;
|
|
45
|
+
/** Resolves a `delimiter=` option (`;`, `tab`, `pipe`, …). */
|
|
46
|
+
export declare function resolveDelimiter(value: string | undefined, fallback: string): string;
|
|
47
|
+
/** Picks the most frequent candidate delimiter on the first non-empty line. */
|
|
48
|
+
export declare function detectDelimiter(text: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* RFC 4180-style parser: quoted fields, escaped quotes (`""`), delimiters and
|
|
51
|
+
* newlines inside quotes, CRLF or LF row breaks. Blank lines are skipped.
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseDelimited(text: string, delimiter?: string): string[][];
|
|
54
|
+
/**
|
|
55
|
+
* Renders a ```csv / ```tsv fence as a table block.
|
|
56
|
+
*
|
|
57
|
+
* Fence options: `title="Caption"`, `header=false`, `delimiter=";"|tab|pipe`
|
|
58
|
+
* (CSV auto-detects `, ; tab |` when omitted), `markdown=true` to parse cells
|
|
59
|
+
* as inline Markdown (cells are plain text by default so data stays literal).
|
|
60
|
+
* Columns that are entirely numeric are right-aligned.
|
|
61
|
+
*/
|
|
62
|
+
export declare function renderDelimitedBlock(code: string, infoString: string, lang: "csv" | "tsv", renderInline: (source: string) => string): string;
|
|
63
|
+
export declare function tableToCsv(data: TableData): string;
|
|
64
|
+
export declare function tableToMarkdown(data: TableData): string;
|
|
65
|
+
export declare function tableToHtml(data: TableData): string;
|
|
66
|
+
export declare function formatTable(data: TableData, format: TableCopyFormat): string;
|
|
67
|
+
/** Reads plain-text table data back out of a rendered `.dmd-table-block`. */
|
|
68
|
+
export declare function readTableData(table: HTMLTableElement): TableData;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media detection, MIME type resolution, and lossless embedding utilities
|
|
3
|
+
* for DocMeDown's <Media /> component and offline distributables.
|
|
4
|
+
*/
|
|
5
|
+
export type MediaCategory = "image" | "vector" | "video" | "audio" | "unknown";
|
|
6
|
+
export declare const MEDIA_MIME_TYPES: Record<string, string>;
|
|
7
|
+
/** Extracts extension without dot, query params or hash fragments. */
|
|
8
|
+
export declare function extractExtension(urlOrPath: string): string;
|
|
9
|
+
/** Determines MIME type from file extension or explicit type hint. */
|
|
10
|
+
export declare function resolveMimeType(urlOrPath: string, explicitType?: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Categorizes media into "image" (raster), "vector" (SVG), "video", or "audio".
|
|
13
|
+
*/
|
|
14
|
+
export declare function detectMediaCategory(urlOrPath: string, typeOrFormat?: string): MediaCategory;
|
|
15
|
+
/** True if the target URL or path appears to reference a known media asset. */
|
|
16
|
+
export declare function isMediaFile(urlOrPath: string): boolean;
|
|
17
|
+
/** True if a string is a valid Data URI. */
|
|
18
|
+
export declare function isDataUri(url: string): boolean;
|
|
19
|
+
/** Parses a Data URI into its MIME type, base64 status, and payload. */
|
|
20
|
+
export declare function parseDataUri(dataUri: string): {
|
|
21
|
+
mimeType: string;
|
|
22
|
+
isBase64: boolean;
|
|
23
|
+
data: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* Encodes binary bytes losslessly to a Base64 Data URI.
|
|
27
|
+
* This conversion is 100% bijective and preserves the original bitstream
|
|
28
|
+
* without lossy compression or transcoding.
|
|
29
|
+
*/
|
|
30
|
+
export declare function toLosslessDataUri(bytes: Uint8Array | ArrayBuffer | string, mimeType: string): string;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocMeDown Performance-Minded Motion & Animation Engine.
|
|
3
|
+
*
|
|
4
|
+
* Built on top of motion/mini (lightweight WAAPI) with:
|
|
5
|
+
* - Native prefers-reduced-motion support (zero duration for accessibility).
|
|
6
|
+
* - Interruptible, cancelable smooth scrolling for Carousels.
|
|
7
|
+
* - Hardware-accelerated transitions for Tabs and Accordions.
|
|
8
|
+
* - Svelte actions (motion, fade, slide, scale) and React hooks (useMotion)
|
|
9
|
+
* for effortless custom component animations.
|
|
10
|
+
*/
|
|
11
|
+
import { animate as motionAnimate } from "motion/mini";
|
|
12
|
+
export { motionAnimate as animateRaw };
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether the target is a real browser DOM Element.
|
|
15
|
+
* Protects against crashes in SSR/prerendering and mock test environments.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isDOMElement(target: unknown): target is Element;
|
|
18
|
+
/**
|
|
19
|
+
* Checks whether the user has requested "Reduce motion".
|
|
20
|
+
* Respects explicit user overrides (data-dmd-motion or localStorage) while
|
|
21
|
+
* preserving DocMeDown's performance-minded subtle animations by default.
|
|
22
|
+
*/
|
|
23
|
+
export declare function prefersReducedMotion(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes motion options based on the user's motion preferences.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getMotionOptions<T extends {
|
|
28
|
+
duration?: number;
|
|
29
|
+
delay?: number;
|
|
30
|
+
}>(options: T): T;
|
|
31
|
+
/**
|
|
32
|
+
* Safe, accessibility-respecting wrapper around motion's animate function.
|
|
33
|
+
*/
|
|
34
|
+
export declare function animate(target: any, keyframes: Record<string, any>, options?: Record<string, any>): (Promise<void> & {
|
|
35
|
+
stop: () => void;
|
|
36
|
+
}) | import("motion-dom").AnimationPlaybackControlsWithThen;
|
|
37
|
+
export interface SmoothScrollOptions {
|
|
38
|
+
duration?: number;
|
|
39
|
+
direction?: "x" | "y";
|
|
40
|
+
easing?: (t: number) => number;
|
|
41
|
+
onComplete?: () => void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Smoothly and cancelably animates scrollLeft or scrollTop of a container.
|
|
45
|
+
* Automatically interrupts any active animation on subsequent user clicks.
|
|
46
|
+
*/
|
|
47
|
+
export declare function smoothScroll(container: HTMLElement, targetOffset: number, options?: SmoothScrollOptions): {
|
|
48
|
+
stop: () => void;
|
|
49
|
+
finished: Promise<void>;
|
|
50
|
+
};
|
|
51
|
+
export interface DisclosureAnimationOptions {
|
|
52
|
+
duration?: number;
|
|
53
|
+
onComplete?: () => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Expands an element smoothly from 0px (or its current height) to its natural scrollHeight.
|
|
57
|
+
*/
|
|
58
|
+
export declare function expand(element: HTMLElement, options?: DisclosureAnimationOptions): {
|
|
59
|
+
stop: () => void;
|
|
60
|
+
finished: Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Collapses an element smoothly from its current height down to 0px.
|
|
64
|
+
*/
|
|
65
|
+
export declare function collapse(element: HTMLElement, options?: DisclosureAnimationOptions): {
|
|
66
|
+
stop: () => void;
|
|
67
|
+
finished: Promise<void>;
|
|
68
|
+
};
|
|
69
|
+
export interface MotionOptions {
|
|
70
|
+
initial?: Record<string, any>;
|
|
71
|
+
animate?: Record<string, any>;
|
|
72
|
+
transition?: {
|
|
73
|
+
duration?: number;
|
|
74
|
+
delay?: number;
|
|
75
|
+
ease?: any;
|
|
76
|
+
};
|
|
77
|
+
inView?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/** Options shared by the fade, slide, and scale Svelte action presets. Durations are seconds. */
|
|
80
|
+
export interface MotionPresetOptions {
|
|
81
|
+
duration?: number;
|
|
82
|
+
delay?: number;
|
|
83
|
+
inView?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Svelte action for declarative component animations:
|
|
87
|
+
* `<div use:motion={{ initial: { opacity: 0, y: 15 }, animate: { opacity: 1, y: 0 } }}>`
|
|
88
|
+
*/
|
|
89
|
+
export declare function motion(node: HTMLElement, options?: MotionOptions): {
|
|
90
|
+
update(newOptions: MotionOptions): void;
|
|
91
|
+
destroy(): void;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Svelte action preset for smooth fade-in.
|
|
95
|
+
*/
|
|
96
|
+
export declare function fade(node: HTMLElement, options?: MotionPresetOptions): {
|
|
97
|
+
update: (value: typeof options) => void;
|
|
98
|
+
destroy: () => void;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Svelte action preset for smooth slide-in.
|
|
102
|
+
*/
|
|
103
|
+
export declare function slide(node: HTMLElement, options?: MotionPresetOptions & {
|
|
104
|
+
direction?: "up" | "down" | "left" | "right";
|
|
105
|
+
distance?: number;
|
|
106
|
+
}): {
|
|
107
|
+
update: (value: typeof options) => void;
|
|
108
|
+
destroy: () => void;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Svelte action preset for smooth scale-in.
|
|
112
|
+
*/
|
|
113
|
+
export declare function scale(node: HTMLElement, options?: MotionPresetOptions & {
|
|
114
|
+
from?: number;
|
|
115
|
+
}): {
|
|
116
|
+
update: (value: typeof options) => void;
|
|
117
|
+
destroy: () => void;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* React ref callback hook for animating elements in React custom components:
|
|
121
|
+
* `const ref = useMotion({ initial: { opacity: 0 }, animate: { opacity: 1 } });`
|
|
122
|
+
*/
|
|
123
|
+
export declare function useMotion<T extends HTMLElement = HTMLElement>(options?: MotionOptions): (element: T | null) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Animates a list of elements with sequential stagger delays.
|
|
126
|
+
*/
|
|
127
|
+
export declare function stagger<T extends Element = Element>(elements: ArrayLike<T> | Iterable<T>, keyframes: Record<string, any>, options?: {
|
|
128
|
+
duration?: number;
|
|
129
|
+
staggerDelay?: number;
|
|
130
|
+
delay?: number;
|
|
131
|
+
ease?: any;
|
|
132
|
+
}): ((Promise<void> & {
|
|
133
|
+
stop: () => void;
|
|
134
|
+
}) | import("motion-dom").AnimationPlaybackControlsWithThen)[];
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { type SplashOptions } from "./splash";
|
|
1
2
|
import type { DocManifest } from "./types";
|
|
2
|
-
export declare const OFFLINE_FORMAT_VERSION =
|
|
3
|
+
export declare const OFFLINE_FORMAT_VERSION = 2;
|
|
3
4
|
export declare const OFFLINE_RUNTIME_SCRIPT_ATTRIBUTE = "data-docmedown-runtime";
|
|
4
5
|
export interface OfflineDocumentationData {
|
|
5
6
|
manifest: DocManifest;
|
|
6
7
|
docs: Record<string, string>;
|
|
7
8
|
componentsSource?: string;
|
|
8
9
|
nestedSites?: Record<string, OfflineNestedSiteData>;
|
|
10
|
+
media?: Record<string, string>;
|
|
9
11
|
}
|
|
10
12
|
/** A nested documentation root embedded inside a parent offline bundle. */
|
|
11
13
|
export interface OfflineNestedSiteData {
|
|
@@ -13,6 +15,7 @@ export interface OfflineNestedSiteData {
|
|
|
13
15
|
manifest: DocManifest;
|
|
14
16
|
docs: Record<string, string>;
|
|
15
17
|
componentsSource?: string;
|
|
18
|
+
media?: Record<string, string>;
|
|
16
19
|
}
|
|
17
20
|
/** Emitted when a reader selects a file link a self-contained copy cannot fulfill. */
|
|
18
21
|
export declare const OFFLINE_LINK_EVENT = "docmedown:offline-link-unavailable";
|
|
@@ -30,8 +33,12 @@ export declare function notifyUnavailableOfflineLink(message?: string): void;
|
|
|
30
33
|
* Generates the tiny self-extracting HTML shell shared by CLI and browser
|
|
31
34
|
* exporters. The payload is a base64-encoded gzip stream containing compact
|
|
32
35
|
* JSON with documentation data and the minified IIFE runtime.
|
|
36
|
+
*
|
|
37
|
+
* The shell carries the same inline splash as served pages, so an offline copy
|
|
38
|
+
* opens on the branded loader instead of a blank canvas while the runtime is
|
|
39
|
+
* decompressed and booted.
|
|
33
40
|
*/
|
|
34
|
-
export declare function createCompressedOfflineHtml(encodedGzip: string, title: string): string;
|
|
41
|
+
export declare function createCompressedOfflineHtml(encodedGzip: string, title: string, splash?: SplashOptions, favicon?: string): string;
|
|
35
42
|
export declare function createOfflineDownload(): Promise<{
|
|
36
43
|
blob: Blob;
|
|
37
44
|
filename: string;
|
|
@@ -3,9 +3,24 @@ export interface RouteInfo {
|
|
|
3
3
|
anchor: string;
|
|
4
4
|
fullPath: string;
|
|
5
5
|
}
|
|
6
|
+
/** Globals injected by the static-site prerenderer into every generated page. */
|
|
7
|
+
export interface StaticRuntimeContext {
|
|
8
|
+
/** Relative prefix from the current page to site-root assets, e.g. "../..". Empty at the site root. */
|
|
9
|
+
base: string;
|
|
10
|
+
/** Slug of the document the current page was prerendered from. */
|
|
11
|
+
slug: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function getStaticRuntimeContext(): StaticRuntimeContext | null;
|
|
14
|
+
export declare function scrollToAndHighlight(element: HTMLElement): void;
|
|
15
|
+
/** True when the current page was prerendered by the static site build. */
|
|
16
|
+
export declare function isStaticRuntime(): boolean;
|
|
17
|
+
/** Creates the router appropriate for the current page: pathname routes for prerendered builds, hash routes otherwise. */
|
|
18
|
+
export declare function createRouter(defaultDoc?: string): HashRouter;
|
|
19
|
+
/** Joins a site-root-relative asset prefix with a file name ("../..", "_docs.js" → "../../_docs.js"). */
|
|
20
|
+
export declare function joinStaticBase(base: string, file: string): string;
|
|
6
21
|
export declare class HashRouter {
|
|
7
|
-
|
|
8
|
-
|
|
22
|
+
protected listeners: Set<(route: RouteInfo) => void>;
|
|
23
|
+
protected defaultDoc: string;
|
|
9
24
|
constructor(defaultDoc?: string);
|
|
10
25
|
destroy(): void;
|
|
11
26
|
setDefaultDoc(defaultDoc: string): void;
|
|
@@ -15,9 +30,32 @@ export declare class HashRouter {
|
|
|
15
30
|
navigate(path: string, anchor?: string): void;
|
|
16
31
|
scrollToAnchor(anchorId: string): void;
|
|
17
32
|
subscribe(callback: (route: RouteInfo) => void): () => void;
|
|
33
|
+
protected emitRoute(route: RouteInfo): void;
|
|
18
34
|
private handleHashChange;
|
|
19
35
|
/**
|
|
20
36
|
* Resolves a relative markdown link into a hash navigation target
|
|
21
37
|
*/
|
|
22
38
|
resolveLink(href: string, currentSlug: string): string;
|
|
23
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Path router used by prerendered static builds. The public URL scheme is
|
|
42
|
+
* `<base>/<slug>/` (README → `<base>/`); heading anchors stay in the URL
|
|
43
|
+
* hash. The engine API (navigate/subscribe/resolveLink) is identical to
|
|
44
|
+
* HashRouter, so application code never needs to know which one is active.
|
|
45
|
+
*/
|
|
46
|
+
export declare class StaticRouter extends HashRouter {
|
|
47
|
+
private urlBase;
|
|
48
|
+
constructor(defaultDoc?: string);
|
|
49
|
+
destroy(): void;
|
|
50
|
+
getCurrentRoute(): RouteInfo;
|
|
51
|
+
/** Maps a static page pathname + hash onto a route. */
|
|
52
|
+
parseStaticPath(pathname: string, rawHash: string): RouteInfo;
|
|
53
|
+
/** Builds the canonical URL for a document slug, including the site base when present. */
|
|
54
|
+
urlForSlug(slug: string, anchor?: string): string;
|
|
55
|
+
navigate(path: string, anchor?: string): void;
|
|
56
|
+
scrollToAnchor(anchorId: string): void;
|
|
57
|
+
/** Resolves relative markdown links onto canonical page URLs instead of hash routes. */
|
|
58
|
+
resolveLink(href: string, currentSlug: string): string;
|
|
59
|
+
private parseStaticAnchor;
|
|
60
|
+
private handlePopState;
|
|
61
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded app-shell splash shown while the runtime boots.
|
|
3
|
+
*
|
|
4
|
+
* The runtime stylesheet is injected by JavaScript, so before the bundle runs
|
|
5
|
+
* the page is otherwise unstyled (a blank white canvas). The splash ships as
|
|
6
|
+
* inline critical CSS plus a tiny theme bootstrap inside each shell —
|
|
7
|
+
* prerendered pages, the standard template, the dev-server fallback, and
|
|
8
|
+
* offline copies — so it paints immediately, matches the saved theme and color
|
|
9
|
+
* mode (no light flash), holds for a minimum brand beat, then hands off to the
|
|
10
|
+
* first document.
|
|
11
|
+
*
|
|
12
|
+
* The overlay is a pixel-faithful preview of the real reader chrome rather
|
|
13
|
+
* than an abstract loader: a 68px-class top bar (--dmd-splash-navh) with the
|
|
14
|
+
* brand lockup, search field, and action chips; a sidebar-rail skeleton with
|
|
15
|
+
* labeled section groups and an active entry; an article skeleton with the
|
|
16
|
+
* breadcrumb row, document title, meta rule, callout, and code-block rhythms
|
|
17
|
+
* of a real page; and a table-of-contents rail on wide viewports. Column
|
|
18
|
+
* widths, type, spacing, radii, and breakpoints mirror `main.css` (TOC folds
|
|
19
|
+
* into a card at 1280px, search collapses to an icon at 1100px, the sidebar
|
|
20
|
+
* rail retires at 1024px, compact bar under 680px), so the mounted app lands
|
|
21
|
+
* on identically-proportioned chrome and dismissal reads as one crossfade
|
|
22
|
+
* rather than a blank-to-content jump.
|
|
23
|
+
*
|
|
24
|
+
* Everything here must stay dependency-free and inline: it runs before any
|
|
25
|
+
* stylesheet or module is available. Keep the output small — it is embedded in
|
|
26
|
+
* every generated page and, for `file://` copies, is not gzip-compressed.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SPLASH_ID = "dmd-splash";
|
|
29
|
+
export declare const SPLASH_HIDDEN_CLASS = "dmd-splash-hidden";
|
|
30
|
+
/** Marks <html> while the splash is up so the page behind cannot scroll. */
|
|
31
|
+
export declare const SPLASH_ACTIVE_CLASS = "dmd-splash-active";
|
|
32
|
+
/** Records the first-paint timestamp so the splash can hold for a minimum time. */
|
|
33
|
+
export declare const SPLASH_START_KEY = "__DOCMEDOWN_SPLASH_START__";
|
|
34
|
+
/** Minimum brand time before the splash may be dismissed, in milliseconds. */
|
|
35
|
+
export declare const SPLASH_MIN_DURATION_MS = 950;
|
|
36
|
+
/** Must match the `#dmd-splash` transition duration in the stylesheet below. */
|
|
37
|
+
export declare const SPLASH_EXIT_MS = 450;
|
|
38
|
+
export interface SplashOptions {
|
|
39
|
+
/** Documentation name rendered in the top-bar brand lockup. */
|
|
40
|
+
name?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional one-line description (from `docs.json` `tagline`). Rendered as
|
|
43
|
+
* the article preview's real description line so the shell reads branded
|
|
44
|
+
* instead of fully grey — omitted when not provided.
|
|
45
|
+
*/
|
|
46
|
+
tagline?: string;
|
|
47
|
+
/** Optional version string rendered as a pill next to the brand name. */
|
|
48
|
+
version?: string;
|
|
49
|
+
/** Optional brand logo URL (`theme.logo.light`). Takes precedence over the mark. */
|
|
50
|
+
logo?: string;
|
|
51
|
+
/** Optional brand logo URL for dark mode (`theme.logo.dark`). */
|
|
52
|
+
logoDark?: string;
|
|
53
|
+
/** Alt text for the brand logo. Falls back to the documentation name. */
|
|
54
|
+
logoAlt?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Brand accent override for light mode (from `docs.json`
|
|
57
|
+
* `theme.accentColor`). The runtime applies the same override once booted;
|
|
58
|
+
* the splash needs it inlined because it paints first. Only `#hex` forms
|
|
59
|
+
* are accepted — anything else is ignored, so a stray config value can
|
|
60
|
+
* never inject markup or CSS.
|
|
61
|
+
*/
|
|
62
|
+
accent?: string;
|
|
63
|
+
/** Brand accent override for dark mode (`theme.accentColorDark`). */
|
|
64
|
+
accentDark?: string;
|
|
65
|
+
/** Optional search bar placeholder text (from `docs.json` `search.placeholder`). */
|
|
66
|
+
searchPlaceholder?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Head fragment for a shell: splash styles, an optional brand-accent override,
|
|
70
|
+
* the theme bootstrap (which also carries the failsafe and the `SPLASH_EXIT_MS`
|
|
71
|
+
* removal delay), and a `<noscript>` fallback so JS-disabled readers (and
|
|
72
|
+
* crawlers) get the prerendered content instead of a permanent splash.
|
|
73
|
+
*/
|
|
74
|
+
export declare function renderSplashHead(options?: SplashOptions): string;
|
|
75
|
+
/**
|
|
76
|
+
* Body markup for the splash overlay: a preview of the reader shell (top bar,
|
|
77
|
+
* navigation, article, table of contents) in the same proportions as the app,
|
|
78
|
+
* so the first real paint lands where the skeleton already is. Skeleton
|
|
79
|
+
* regions are `aria-hidden` — the root keeps a single `role="status"` live
|
|
80
|
+
* message — and the visible title/description are real text.
|
|
81
|
+
*/
|
|
82
|
+
export declare function renderSplashMarkup({ name, tagline, version, logo, logoDark, logoAlt, searchPlaceholder, }?: SplashOptions): string;
|
|
83
|
+
/**
|
|
84
|
+
* Retires the splash once the app has content to show — but never before
|
|
85
|
+
* `SPLASH_MIN_DURATION_MS` has elapsed since first paint, so a fast load still
|
|
86
|
+
* gets a consistent brand beat instead of a sub-frame flash. The reveal
|
|
87
|
+
* crossfades the splash out while the page fades in (see the
|
|
88
|
+
* `html.dmd-splash-active` rule in main.css).
|
|
89
|
+
*/
|
|
90
|
+
export declare function dismissSplash(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* On-demand loader for the Svelte compiler engine (`docmedown-compiler.js`).
|
|
3
|
+
*
|
|
4
|
+
* Like Mermaid, the Svelte compiler (~800 KB minified) is externalized into an
|
|
5
|
+
* on-demand engine bundle and loaded only when dynamic in-browser `.svelte`
|
|
6
|
+
* compilation is required.
|
|
7
|
+
*/
|
|
8
|
+
export interface SvelteCompilerEngine {
|
|
9
|
+
compile: typeof import("svelte/compiler").compile;
|
|
10
|
+
}
|
|
11
|
+
export declare function configureCompilerEngine(basePath?: string): void;
|
|
12
|
+
export declare function loadExternalCompilerEngine(): Promise<SvelteCompilerEngine>;
|
|
13
|
+
/** Resolves the Svelte compiler engine once, from the external bundle or a dynamic import. */
|
|
14
|
+
export declare function loadCompilerEngine(): Promise<SvelteCompilerEngine>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ensureCustomElementTag } from "./svelte-tag";
|
|
2
|
+
export { ensureCustomElementTag };
|
|
3
|
+
export interface CompiledSvelteResult {
|
|
4
|
+
js: string;
|
|
5
|
+
css?: string;
|
|
6
|
+
tag: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Rewrites bare `svelte` and `svelte/internal/client` ESM imports to use the
|
|
10
|
+
* globally exposed Svelte 5 runtime primitives when evaluated as a Blob module.
|
|
11
|
+
*/
|
|
12
|
+
export declare function linkSveltePrimitives(jsCode: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Compiles a raw `.svelte` source string into client JavaScript with custom element registration.
|
|
15
|
+
*/
|
|
16
|
+
export declare function compileSvelteComponent(source: string, options: {
|
|
17
|
+
name: string;
|
|
18
|
+
tag?: string;
|
|
19
|
+
filename?: string;
|
|
20
|
+
}): Promise<CompiledSvelteResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Evaluates compiled Svelte 5 component JavaScript in the browser as a Blob module.
|
|
23
|
+
* The module automatically invokes `customElements.define()` upon execution.
|
|
24
|
+
*/
|
|
25
|
+
export declare function evaluateCompiledSvelte(jsCode: string): Promise<unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Fetches, compiles, and registers a remote or local `.svelte` component on the fly.
|
|
28
|
+
*/
|
|
29
|
+
export declare function loadAndRegisterSvelteComponent(url: string, name: string): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function toKebab(name: string): string;
|
|
2
|
+
/** Canonical custom element tag for a component name: "CounterWidget" → "dmd-counter-widget". */
|
|
3
|
+
export declare function dmdTag(name: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Ensures a Svelte 5 component template carries a customElement definition tag.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureCustomElementTag(source: string, tagName: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-browser and Node TypeScript/TSX dynamic compiler for DocMeDown.
|
|
3
|
+
*
|
|
4
|
+
* Transforms React TSX/JSX and TypeScript modules into standard ES modules,
|
|
5
|
+
* enabling dynamic component compilation directly in modern browsers.
|
|
6
|
+
*/
|
|
7
|
+
export interface CompileTsxOptions {
|
|
8
|
+
filename?: string;
|
|
9
|
+
jsxFactory?: string;
|
|
10
|
+
jsxFragment?: string;
|
|
11
|
+
useCache?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Strips TypeScript types and transforms JSX tags using a lightweight regex/AST parser.
|
|
15
|
+
* Used when a heavy WebAssembly/worker compiler is not yet loaded in browser.
|
|
16
|
+
*/
|
|
17
|
+
export declare function lightweightTransformTsx(source: string, options?: {
|
|
18
|
+
jsxFactory?: string;
|
|
19
|
+
jsxFragment?: string;
|
|
20
|
+
}): string;
|
|
21
|
+
/**
|
|
22
|
+
* Compiles a TSX or TypeScript source string into standard executable JavaScript.
|
|
23
|
+
*/
|
|
24
|
+
export declare function compileTsx(source: string, options?: CompileTsxOptions): Promise<string>;
|