@aiquants/markdown 11.8.2 → 12.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 +84 -41
- package/dist/{abnfDiagram-VRR7QNED-Bv6iQTPf.cjs → abnfDiagram-VRR7QNED-CBpBnfY2.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-BVKLANg1.js → abnfDiagram-VRR7QNED-DfXbTqjh.js} +3 -3
- package/dist/{arc-C0_ZFMbn.js → arc-SwVEWxG-.js} +1 -1
- package/dist/{arc-XvdQv3_X.cjs → arc-i1LLtFAY.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-D4WEA8bR.js → architectureDiagram-ZJ3FMSHR-U_pWpndb.js} +2 -2
- package/dist/{architectureDiagram-ZJ3FMSHR-Ba2ARwzf.cjs → architectureDiagram-ZJ3FMSHR-mtDK4cwq.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-J9p7hRr-.cjs → blockDiagram-677ZJIJ3-09mZA62D.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-BI9MniQl.js → blockDiagram-677ZJIJ3-DaMXfbBZ.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-C5yuw9y4.js → c4Diagram-LMCZKHZV-CLofA9zh.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-B2vWx9OJ.cjs → c4Diagram-LMCZKHZV-DWjHOW7P.cjs} +1 -1
- package/dist/{channel-D4RNSR4m.cjs → channel-CQoj-afO.cjs} +1 -1
- package/dist/{channel-BuUKRvwz.js → channel-Dl2sOuEn.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-Da82f-JV.cjs → chunk-2Q5K7J3B-CEUXgiDQ.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-mP7m0aTi.js → chunk-2Q5K7J3B-CKPbsraT.js} +1 -1
- package/dist/{chunk-32BRIVSS-QL8wikEz.cjs → chunk-32BRIVSS-BUpbARO6.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-CY47jInE.js → chunk-32BRIVSS-CSloQ7s4.js} +1 -1
- package/dist/{chunk-5VM5RSS4-Dw1sZ2dK.cjs → chunk-5VM5RSS4-Bi4r4BMv.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-C2ibgWcT.js → chunk-5VM5RSS4-DnY6RxJd.js} +1 -1
- package/dist/{chunk-EX3LRPZG-CZYqHwqR.cjs → chunk-EX3LRPZG-Dj5dcbgv.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-DH1eP-Pi.js → chunk-EX3LRPZG-tOgHFiZ3.js} +4 -4
- package/dist/{chunk-JWPE2WC7-CI8vElJl.js → chunk-JWPE2WC7-Bhm6M6wC.js} +1 -1
- package/dist/{chunk-JWPE2WC7-8-O6I23F.cjs → chunk-JWPE2WC7-k67jLZJ7.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-CnalNinv.js → chunk-MOJQB5TN-9753BB9c.js} +1 -1
- package/dist/{chunk-MOJQB5TN-DSUj8oTw.cjs → chunk-MOJQB5TN-FdExe_-9.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-JOq1Wp-f.cjs → chunk-PUDLZKDR-D0K6eTN9.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-BonU-X-L.js → chunk-PUDLZKDR-D1FbiHYm.js} +6 -6
- package/dist/{chunk-RYQCIY6F-DuFhIn5O.cjs → chunk-RYQCIY6F-BTRnFcRY.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-4EL63XFL.js → chunk-RYQCIY6F-DDGOfO1d.js} +1 -1
- package/dist/{chunk-V7JOEXUC-Di_E9qbZ.cjs → chunk-V7JOEXUC-B_5ply0Z.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-BZ6cldra.js → chunk-V7JOEXUC-YddVyhzx.js} +5 -5
- package/dist/{chunk-VR4S4FIN-Dz0-pMsF.js → chunk-VR4S4FIN-DYEB0iUI.js} +1 -1
- package/dist/{chunk-VR4S4FIN-D-5k7LYg.cjs → chunk-VR4S4FIN-h3qCNGDA.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-B9ZdRyQ3.js → chunk-XXDRQBXY-CXTX2F5M.js} +1 -1
- package/dist/{chunk-XXDRQBXY-DBz3b8lw.cjs → chunk-XXDRQBXY-Dn3UHIR-.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-BitRXfny.cjs → classDiagram-OUVF2IWQ-BZRw3Il9.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-C3mqCNeB.js → classDiagram-OUVF2IWQ-Bygloau7.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-BitRXfny.cjs → classDiagram-v2-EOCWNBFH-BZRw3Il9.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-C3mqCNeB.js → classDiagram-v2-EOCWNBFH-Bygloau7.js} +2 -2
- package/dist/{code-blocks-UwfqjHr4.js → code-blocks-BWr5Xg1I.js} +108 -100
- package/dist/code-blocks-BdKjppKq.cjs +4 -0
- package/dist/code-blocks.cjs +1 -1
- package/dist/code-blocks.js +1 -1
- package/dist/components/SpreadsheetToolbar.d.ts +1 -0
- package/dist/components/blockFullscreen.d.ts +31 -0
- package/dist/components/fullscreenLabels.d.ts +4 -0
- package/dist/components/mermaidInteraction.d.ts +2 -2
- package/dist/components/mermaidLabels.d.ts +3 -0
- package/dist/components/svgImageLabels.d.ts +3 -0
- package/dist/components/svgRaster.d.ts +1 -0
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-B04yjbiX.cjs → cose-bilkent-JH36ORCC-BeacL0Ew.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-BP9FPPl5.js → cose-bilkent-JH36ORCC-DpqqWegk.js} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-Czf82C5l.cjs → cynefinDiagram-TSTJHNR4-CB8X1jFh.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-C9Su2eDY.js → cynefinDiagram-TSTJHNR4-DTqoE65U.js} +2 -2
- package/dist/{dagre-VKFMJZFB-CNHo3ePy.cjs → dagre-VKFMJZFB-CC9EQKtT.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-CHzg8A4L.js → dagre-VKFMJZFB-CXjbVzxo.js} +2 -2
- package/dist/{diagram-FQU43EPY-DPOANLfh.js → diagram-FQU43EPY-B8x8fTKN.js} +2 -2
- package/dist/{diagram-FQU43EPY-SBbc6A-V.cjs → diagram-FQU43EPY-pkT8NaMb.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-qINOCq2i.cjs → diagram-G47NLZAW-DqNB9k7X.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-DcmugHso.js → diagram-G47NLZAW-YJY1vw-z.js} +3 -3
- package/dist/{diagram-NH7WQ7WH-B-H4sDOs.js → diagram-NH7WQ7WH-6S5rssLn.js} +2 -2
- package/dist/{diagram-NH7WQ7WH-CqLkXrhA.cjs → diagram-NH7WQ7WH-e_5r7YfA.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-CFPQUn99.js → diagram-OA4YK3LP-CXQnLyDQ.js} +3 -3
- package/dist/{diagram-OA4YK3LP-Cx_mMF_k.cjs → diagram-OA4YK3LP-gAuJXOZ8.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-BCp3CEPx.cjs → diagram-WEI45ONY-PgR9S6g1.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-DtIWiRZh.js → diagram-WEI45ONY-ixyUSYN0.js} +2 -2
- package/dist/{ebnfDiagram-CCIWWBDH-BkyB7GDl.js → ebnfDiagram-CCIWWBDH-KryWrZHM.js} +3 -3
- package/dist/{ebnfDiagram-CCIWWBDH-ae7r9sJj.cjs → ebnfDiagram-CCIWWBDH-y4KbiCN5.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-C3frz5_E.js → erDiagram-Q63AITRT-B11QNISq.js} +4 -4
- package/dist/{erDiagram-Q63AITRT-Uob9EKIP.cjs → erDiagram-Q63AITRT-D8vW6pbx.cjs} +1 -1
- package/dist/{extractHeadings-CSIST70N.js → extractHeadings-9PqrYAM2.js} +6230 -6188
- package/dist/extractHeadings-BXiMC-GU.cjs +315 -0
- package/dist/flowDiagram-23GEKE2U-BY2Fc_n3.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-DKG5Q_i5.js +7 -0
- package/dist/{ganttDiagram-NO4QXBWP-C0Yd_Jgw.cjs → ganttDiagram-NO4QXBWP-D8Y9jimu.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-Br8K8yMC.js → ganttDiagram-NO4QXBWP-DZTm-SVx.js} +2 -2
- package/dist/{gitGraphDiagram-IHSO6WYX-D9mGopoc.js → gitGraphDiagram-IHSO6WYX-CJbZ5ZvO.js} +3 -3
- package/dist/{gitGraphDiagram-IHSO6WYX-wea6OW4b.cjs → gitGraphDiagram-IHSO6WYX-DbYXrclf.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +1 -1
- package/dist/index.client.js +23 -22
- package/dist/index.js +23 -22
- package/dist/{infoDiagram-FWYZ7A6U-DJP2-3Wv.js → infoDiagram-FWYZ7A6U-B50T5vm2.js} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-DG5lOgKP.cjs → infoDiagram-FWYZ7A6U-D5RCO_vv.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-B5RTeC2V.js → ishikawaDiagram-FXEZZL3T-CDedQKau.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-D103ENwS.cjs → ishikawaDiagram-FXEZZL3T-Csx1NBdz.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BhIlJSFf.js → journeyDiagram-5HDEW3XC-DtiYwhDm.js} +4 -4
- package/dist/{journeyDiagram-5HDEW3XC-CljsyWWe.cjs → journeyDiagram-5HDEW3XC-a80p1mpy.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-XYVjcLiT.cjs → kanban-definition-HUTT4EX6-D9SadN7G.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-i_ZeGNw5.js → kanban-definition-HUTT4EX6-I9eVeuC0.js} +2 -2
- package/dist/{linear-CDbnw2fg.js → linear-0P_8Ivdd.js} +1 -1
- package/dist/{linear-B7pKd8FB.cjs → linear-DXqXAu27.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-1vdq3Rlm.cjs → mindmap-definition-LN4V7U3C-BkehNbGL.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-0_lr0tHS.js → mindmap-definition-LN4V7U3C-CFZpZpE0.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-19B9d_Bh.cjs → pegDiagram-2B236MQR-BfOxwgjO.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-BJd-RgxS.js → pegDiagram-2B236MQR-DjCc1Quh.js} +3 -3
- package/dist/{pieDiagram-ENE6RG2P-D4bPhOA3.js → pieDiagram-ENE6RG2P-BPZ7HAvt.js} +3 -3
- package/dist/{pieDiagram-ENE6RG2P-D_3kijCk.cjs → pieDiagram-ENE6RG2P-Cak5M9yn.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-chTKMnmP.cjs → quadrantDiagram-ABIIQ3AL-55hF84Fw.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-D2IKj61w.js → quadrantDiagram-ABIIQ3AL-D104Wy4Z.js} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-Dj2mjq2m.cjs → railroadDiagram-RFXS5EU6-DcKZ88rg.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-CshSitep.js → railroadDiagram-RFXS5EU6-JxXkyrZQ.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-IqVUXu-f.cjs → requirementDiagram-TGXJPOKE-DPs0Ihw7.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-Cr-WsvUU.js → requirementDiagram-TGXJPOKE-MV4pfoX4.js} +3 -3
- package/dist/{sankeyDiagram-HTMAVEWB-DKcAsCkg.cjs → sankeyDiagram-HTMAVEWB-C5XpxThf.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-BS8HE-f9.js → sankeyDiagram-HTMAVEWB-DOV_mdAU.js} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-BhMjkZuk.cjs → sequenceDiagram-DBY2YBRQ-0J_xPyLe.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-oBPBZr8W.js → sequenceDiagram-DBY2YBRQ-CGbFTj5V.js} +3 -3
- package/dist/{sizeCapture-X5ZJPWSS-CzAWlgIJ.js → sizeCapture-X5ZJPWSS-BBd4os7j.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-DSOrfCCU.cjs → sizeCapture-X5ZJPWSS-DgTVF2P9.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-DUgJ1fpB.js → stateDiagram-2N3HPSRC-ByQZMt4V.js} +2 -2
- package/dist/{stateDiagram-2N3HPSRC-DGf-34Vz.cjs → stateDiagram-2N3HPSRC-DzuNZ3I1.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-DTLP-Rp0.js → stateDiagram-v2-6OUMAXLB-Dy3F4gdh.js} +2 -2
- package/dist/{stateDiagram-v2-6OUMAXLB-BlMEhtRV.cjs → stateDiagram-v2-6OUMAXLB-pdxYI04k.cjs} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-HUe2Zb14.js → swimlanes-5IMT3BWC-6i8hPBJr.js} +3 -3
- package/dist/{swimlanes-5IMT3BWC-DxH3ensQ.cjs → swimlanes-5IMT3BWC-RzXk2ZsR.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-Bmxs1DxC.cjs → swimlanesDiagram-G3AALYLV-BdbEkuk7.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-DZUE8SZP.js → swimlanesDiagram-G3AALYLV-C6aFaQGO.js} +2 -2
- package/dist/test-setup.d.ts +1 -0
- package/dist/{timeline-definition-FHXFAJF6-Bhi-eZDC.cjs → timeline-definition-FHXFAJF6--ngcmo2O.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-7mi78EDG.js → timeline-definition-FHXFAJF6-HwXvlWGt.js} +2 -2
- package/dist/{vennDiagram-L72KCM5P-BfVSqh6A.js → vennDiagram-L72KCM5P-CEMDoE35.js} +1 -1
- package/dist/{vennDiagram-L72KCM5P-8WRB9PMl.cjs → vennDiagram-L72KCM5P-rD2w7pAb.cjs} +1 -1
- package/dist/viewer-settings.cjs +1 -1
- package/dist/viewer-settings.d.ts +1 -0
- package/dist/viewer-settings.js +3 -2
- package/dist/{wardleyDiagram-EHGQE667-Ck9IAPXj.js → wardleyDiagram-EHGQE667-CAaRrppH.js} +2 -2
- package/dist/{wardleyDiagram-EHGQE667-0bPs97A3.cjs → wardleyDiagram-EHGQE667-DfYFaC8_.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-BzTVzWqQ.cjs → xychartDiagram-FW5EYKEG-By9uEzY0.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-CltjynUS.js → xychartDiagram-FW5EYKEG-DaD79epL.js} +2 -2
- package/package.json +9 -9
- package/dist/code-blocks-_AnVEB6v.cjs +0 -4
- package/dist/extractHeadings-q9-nMjxZ.cjs +0 -315
- package/dist/flowDiagram-23GEKE2U-B9QWrcsx.js +0 -7
- package/dist/flowDiagram-23GEKE2U-C3jd6i7t.cjs +0 -1
package/README.md
CHANGED
|
@@ -15,11 +15,7 @@ Advanced Markdown renderer for React with support for various extensions and cus
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npm install @aiquants/markdown @aiquants/spreadsheet @aiquants/virtualscroll
|
|
19
|
-
# or
|
|
20
18
|
pnpm add @aiquants/markdown @aiquants/spreadsheet @aiquants/virtualscroll
|
|
21
|
-
# or
|
|
22
|
-
yarn add @aiquants/markdown @aiquants/spreadsheet @aiquants/virtualscroll
|
|
23
19
|
```
|
|
24
20
|
|
|
25
21
|
`@aiquants/spreadsheet` is a required peer (it draws ```spreadsheets blocks) and `@aiquants/virtualscroll` is its own
|
|
@@ -532,18 +528,26 @@ as written.
|
|
|
532
528
|
- With the whole source shown (`copy`, its outcomes `copied` and `copyFailed`) it writes the text exactly as read. A
|
|
533
529
|
source the host cut never offers Copy, so the clipboard never gets part of a file.
|
|
534
530
|
- Leaving the block aborts the read.
|
|
535
|
-
- **Toolbar**: 44 × 44 px controls in a wrapping row at the inline end that never covers the image, Copy first
|
|
536
|
-
Source toggle at the row's end (so
|
|
537
|
-
arrow keys, Home and End walk, and the palette and focus ring the Mermaid and spreadsheet
|
|
538
|
-
(`markdown.css`).
|
|
539
|
-
- **
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
531
|
+
- **Toolbar**: 44 × 44 px controls in a wrapping row at the inline end that never covers the image, Copy first, then the
|
|
532
|
+
Source toggle and the full-screen toggle at the row's end (so both toggles stay put whether Copy shows or not), one
|
|
533
|
+
tab stop whose controls the arrow keys, Home and End walk, and the palette and focus ring the Mermaid and spreadsheet
|
|
534
|
+
toolbars share (`markdown.css`).
|
|
535
|
+
- **Full screen**: the toolbar's last control shows the block over the whole window, whatever it shows (the image, the
|
|
536
|
+
source, the loading line or a failure), and keeps what it shows (see [Full screen](#full-screen)). The image keeps its
|
|
537
|
+
own size, scaled down to fit when it is larger than the window and kept in its shape (an SVG with only a `viewBox`,
|
|
538
|
+
which has a shape but no size of its own, fills the window's free space in that shape), at the centre; the image's
|
|
539
|
+
box is the drawn image, so Copy writes the image at the size it is drawn at. The source fills the free height and
|
|
540
|
+
scrolls inside.
|
|
541
|
+
- **Layout**: the block replaces the paragraph with a `div` that holds the block's dialog (see [Full
|
|
542
|
+
screen](#full-screen)) with the toolbar and, while the image shows, the original paragraph (so the image keeps the
|
|
543
|
+
paragraph's spacing). The root carries the paragraph's `data-source-lines`; the paragraph inside it carries none.
|
|
544
|
+
- **Hooks**: `data-aqmd-svg-image` (the root, with `data-aqmd-svg-image-view="image"` or `"source"`, and
|
|
545
|
+
`data-aqmd-fullscreen` while full screen), `data-aqmd-fullscreen-dialog`, `data-aqmd-svg-image-toolbar`,
|
|
546
|
+
`data-aqmd-svg-image-control` (`copy`, `source`, `fullscreen`), `data-aqmd-svg-image-frame` (the image's paragraph),
|
|
547
|
+
`data-aqmd-svg-image-loading`, `data-aqmd-svg-image-source`, `data-aqmd-svg-image-truncated`,
|
|
548
|
+
`data-aqmd-svg-image-error`, `data-aqmd-svg-image-retry` and `data-aqmd-svg-image-notice` (the status line). A host
|
|
549
|
+
that opens an editor on a double-click should leave a double-click inside `data-aqmd-svg-image-source` to the text
|
|
550
|
+
selection.
|
|
547
551
|
- **Labels**: the viewer's `svgImage*` keys, or the renderer's `svgImageLabels` (`SvgImageLabels`; see [Labels and
|
|
548
552
|
languages](#labels-and-languages)).
|
|
549
553
|
|
|
@@ -558,7 +562,7 @@ changes. React's server rendering does not stop at error boundaries, so such a b
|
|
|
558
562
|
|
|
559
563
|
### Mermaid diagrams
|
|
560
564
|
|
|
561
|
-
A fenced code block in the `mermaid` language renders as `MermaidDiagram`, a block that takes its containing block's width (its slot). The
|
|
565
|
+
A fenced code block in the `mermaid` language renders as `MermaidDiagram`, a block that takes its containing block's width (its slot). The first child of the block's dialog (see [Full screen](#full-screen)) is a hidden measuring element, `[data-aqmd-mermaid-measure]` (no height, clipped, `visibility: hidden`, `aria-hidden`), present while the diagram loads, shows or fails; the component measures the slot's width with it (the window's width, less the dialog's padding, while full screen).
|
|
562
566
|
Each drawing gets its own drawing host, `[data-aqmd-mermaid-host]`: a hidden element (`visibility: hidden`, `aria-hidden`, absolutely positioned just outside the start edge, `contain: strict`) appended to the main document's `<body>`, with its width set to the measured width in px.
|
|
563
567
|
Mermaid draws in that element and the component shows the result in the slot, so a gantt chart, whose width Mermaid takes from where it is drawn, is exactly as wide as the slot. Because Mermaid looks its drawing up through the main document, the host lives in the main document's light DOM, and a diagram in a slot inside a shadow root is drawn the same way.
|
|
564
568
|
|
|
@@ -577,21 +581,23 @@ Mermaid draws in that element and the component shows the result in the slot, so
|
|
|
577
581
|
| `both`, `both-shift` | `pan-x pan-y` | `none` |
|
|
578
582
|
|
|
579
583
|
- **Frame and clipping**: the shown drawing sits in a frame, `[data-aqmd-mermaid-frame]` (it also keeps `data-testid="mermaid-diagram"`), that clips it with `overflow: clip` from the components' stylesheet (the component writes no inline `overflow`), and the `<svg>` is a block. A zoomed drawing therefore never widens the frame or scrolls the document sideways. `data-aqmd-mermaid-overflowing` is `"true"` while the drawing overflows the frame and `"false"` otherwise.
|
|
580
|
-
- **Zoom bounds**: the zoom runs from the drawing as laid out in the frame (1×) to 200 % of the diagram's natural size (WCAG 1.4.4), the width at which one unit of the drawing is one CSS px, read from the drawing itself: the width of its `viewBox`, which the browser scales to the drawing's box; a drawing without a `viewBox` (Mermaid's `info`) is never scaled, so its layout is its natural size and it zooms up to 2×.
|
|
581
|
-
|
|
584
|
+
- **Zoom bounds**: the zoom runs from the drawing as laid out in the frame (1×) to 200 % of the diagram's natural size (WCAG 1.4.4), the width at which one unit of the drawing is one CSS px, read from the drawing itself: the width of its `viewBox`, which the browser scales to the drawing's box; a drawing without a `viewBox` (Mermaid's `info`) is never scaled, so its layout is its natural size and it zooms up to 2×.
|
|
585
|
+
The fit is the drawing's laid-out width over its natural width, so the bound holds wherever the drawing is laid out (full screen lays a tall drawing out narrower than its frame). Only a drawing whose `viewBox` has no usable size (not four numbers with a positive width and height) shows an error and a retry button in its place.
|
|
586
|
+
A drawing of 1993.6 px natural width laid out 372 px wide zooms up to 10.72×; a diagram that already fits zooms up to 2×. The view is clamped on each axis like a scroll container: a drawing larger than the frame keeps covering it, a smaller one stays inside.
|
|
582
587
|
- **Zoom controls**: the zoom buttons and the `+`, `=` and `-` keys zoom about the frame's centre, Shift+wheel about the pointer. Two fingers (touch or pen) pinching zoom about their midpoint and follow it, in the modes that zoom (`zoom`, `both`, `both-shift`); in the other modes the browser keeps the pinch: a second finger ends a finger's pan of an overflowing drawing, so `touch-action: pinch-zoom` lets the page be pinch-zoomed, and the remaining finger pans again only from the next touch. Lifting one finger of a pinch continues a pan with the other where the mode allows one.
|
|
583
588
|
While a finger or pen pans or pinches the drawing, the frame cancels the default action of its `touchmove` events, so the browser starts no momentum scroll and the next tap on a control is never spent stopping one. That non-passive listener is bound only while the drawing overflows its frame: over a fitting diagram a finger scrolls without the browser waiting for the page's script.
|
|
584
589
|
- **Keyboard**: the frame takes focus (`tabindex="0"`, `role="group"`) and is named by the `diagram` label, which a hidden element carries with its own `lang`, so the drawing's text is not marked with it. On the frame itself, not on a link inside it and not with Ctrl, Meta or Alt held, the arrow keys pan the view by 25.9 % of the frame (only when the view can move; otherwise the page scrolls), `+` and `=` zoom in, `-` zooms out and `0` resets.
|
|
585
590
|
When an element inside the drawing takes the focus (a node's link, by Tab), the view pans by the least distance that brings the element's box inside the frame, because the clipping frame is no scroll container the browser could scroll to it.
|
|
586
591
|
- **Pan buttons**: four buttons (`pan-left`, `pan-up`, `pan-down`, `pan-right`) lead the toolbar and are shown only while the drawing overflows its frame, so panning never needs a drag (WCAG 2.5.7); at fit they keep their slots hidden (`visibility: hidden`: not focusable, not exposed), so zooming never adds a toolbar row or moves the frame; each moves the view by the same step as the arrow keys.
|
|
587
592
|
- **Sizes**: under every pointer (a mouse, a pen or a finger) every control is 44 × 44 px and each menu item and the retry button at least 44 px tall (WCAG 2.2 enhanced target size). The toolbar is a wrapping row above the frame, aligned to the row's end, so the controls never cover the drawing.
|
|
588
|
-
The pan buttons come first in it, so the controls always shown (the mode menu, zoom in, zoom out and
|
|
589
|
-
The pan buttons and the
|
|
593
|
+
The pan buttons come first in it, so the controls always shown (the mode menu, zoom in, zoom out, reset and the full-screen toggle) stay at the row's end while the hidden pan buttons keep their slots.
|
|
594
|
+
The pan buttons and the mode menu with the zoom and reset buttons are two groups that each wrap as a whole, followed by the full-screen toggle, so a narrow column puts each group on a row of its own instead of dropping one of a group's controls to the next row.
|
|
590
595
|
The menu opens below its button within the toolbar's row and the viewport: at the button's start edge, else at its end edge, else moved inside the row as near the button as it allows and narrowed to the row when the row is narrower (`data-aqmd-control-menu`: `start`, `end` or `inside`), so it stays over the diagram.
|
|
596
|
+
- **Full screen**: the toolbar's last control shows the diagram over the whole window while it shows a drawing (see [Full screen](#full-screen)). The frame fills the free space below the toolbar without the coarse pointer's cap, and the drawing fits it whole in its natural shape, never past its natural width, at the frame's centre; the view (zoom and pan, kept within the bounds of the new layout) carries across. A diagram that starts loading again or fails leaves full screen with its toolbar.
|
|
591
597
|
- **Tall diagrams**: under a coarse pointer the frame is at most `calc(100svh - 2 * 2.75rem)` tall, so two 44 px bands of the page stay outside it wherever it sits and a finger can scroll the page past the diagram; the clipped drawing then overflows and pans by finger.
|
|
592
598
|
- **Touch menu**: under a coarse pointer the menu button is named by `interactionModeTouch` and the menu lists four items, `none`, `zoom`, `pan` and `both`, worded for touch (see [Labels and languages](#labels-and-languages)); the checked item is the touch counterpart of the mode in force (`pan-shift` shows `pan`, `both-shift` shows `both`), and choosing an item sets that mode. Escape closes a menu and returns the focus to its button.
|
|
593
599
|
- **Colours and focus ring**: the controls, the menu items, the checked item, the error message and the retry button reach 7:1 against their surfaces in both schemes (dark when `.dark` or `[data-theme="dark"]` is on an ancestor). The focus ring of the frame, the toolbar controls and the retry button is a 2 px `#003abc` outline with a white 4 px halo, 9:1 apart, so some part of it stands out on any background (WCAG 2.4.13, 1.4.11); the menu items draw it inset. The ring's rules sit outside every cascade layer, so the controls' `shadow` utility cannot replace the halo.
|
|
594
|
-
- **Hooks**: `data-aqmd-mermaid` (the root, which carries the palette's CSS variables), `data-aqmd-mermaid-frame`, `data-aqmd-mermaid-toolbar`, `data-aqmd-mermaid-control` (`mode`, `zoom-in`, `zoom-out`, `reset`, `pan-left`, `pan-up`, `pan-down
|
|
600
|
+
- **Hooks**: `data-aqmd-mermaid` (the root, which carries the palette's CSS variables, and `data-aqmd-fullscreen` while full screen), `data-aqmd-fullscreen-dialog`, `data-aqmd-mermaid-frame`, `data-aqmd-mermaid-toolbar`, `data-aqmd-mermaid-control` (`mode`, `zoom-in`, `zoom-out`, `reset`, `pan-left`, `pan-up`, `pan-down`, `pan-right` or `fullscreen`), `data-aqmd-mermaid-menu`, `data-aqmd-mermaid-error` and `data-aqmd-mermaid-retry`. The component writes the drawing's natural aspect ratio on its `<svg>` as `--aqmd-mermaid-ratio`, which the full-screen layout reads.
|
|
595
601
|
|
|
596
602
|
### Spreadsheets
|
|
597
603
|
|
|
@@ -731,14 +737,10 @@ Total 17,600 MT
|
|
|
731
737
|
(`serializeTsv`). A control that cannot act now keeps its focus and slot (`aria-disabled`). The save menu is an APG menu
|
|
732
738
|
button: ArrowDown and ArrowUp open it, Escape closes it with the focus back on its button, and a press outside or the
|
|
733
739
|
focus entering an element outside closes it.
|
|
734
|
-
- **Full screen**: the toolbar
|
|
735
|
-
|
|
736
|
-
the
|
|
737
|
-
|
|
738
|
-
takes that Escape itself (`preventDefault()` and `stopPropagation()` on the keydown), so a host's own Escape handling
|
|
739
|
-
around the document never sees it; an Escape already cancelled or ending an input method composition is left alone, and
|
|
740
|
-
a close request without a key (Android's back) leaves full screen too, keeping the table in the document. The browser's
|
|
741
|
-
Fullscreen API is not used, because iPhone Safari offers it to video only.
|
|
740
|
+
- **Full screen**: the toolbar's last control shows the table over the whole window (see [Full screen](#full-screen)); the
|
|
741
|
+
box takes the free space below the toolbar and the grid keeps its selection, zoom, bands and scroll. From inside the
|
|
742
|
+
grid the first Escape is the grid's own (it hands the focus out) and the second leaves. A table whose toolbar goes (its
|
|
743
|
+
options turn it off or stop reading, or it grows past the budget) leaves full screen with it.
|
|
742
744
|
- **Editing**: pass `spreadsheetEditor` (`SpreadsheetEditor`: `write`, `read`, `undo`, `redo`, `subscribe`) to
|
|
743
745
|
`MarkdownRenderer` or `MarkdownViewer` and every table with source lines becomes editable, inside list items and quotes
|
|
744
746
|
too; its root carries `data-aqmd-spreadsheet-editable`. The grid shows one spare row and one spare column to grow into (no
|
|
@@ -783,7 +785,7 @@ Total 17,600 MT
|
|
|
783
785
|
the same pairs the grid checks for itself). The toolbar, the menu, the errors and the focus ring use the controls' palette shared
|
|
784
786
|
with Mermaid.
|
|
785
787
|
- **Hooks**: `data-aqmd-spreadsheet` (the root, which carries `data-source-lines` and the palette's CSS variables) with its
|
|
786
|
-
layout `data-aqmd-spreadsheet-layout` (`inline` or `fill`), `data-aqmd-
|
|
788
|
+
layout `data-aqmd-spreadsheet-layout` (`inline` or `fill`), `data-aqmd-fullscreen-dialog`, `data-aqmd-spreadsheet-toolbar`,
|
|
787
789
|
`data-aqmd-spreadsheet-control` (`zoom-in`, `zoom-out`, `reset-zoom`, `highlight`, `track-size`, `copy`, `save`,
|
|
788
790
|
`save-menu`, `fullscreen`), `data-aqmd-spreadsheet-zoom` (the percent, with its hidden widest percent
|
|
789
791
|
`data-aqmd-spreadsheet-zoom-widest`), `data-aqmd-spreadsheet-track-size` (the row of size controls) and
|
|
@@ -794,8 +796,8 @@ Total 17,600 MT
|
|
|
794
796
|
`data-aqmd-spreadsheet-static-number`, and on a framed table `data-aqmd-spreadsheet-static-frame` with the edges it draws
|
|
795
797
|
by: `-headings`, `-earlier-rows`, `-more-rows` and `-more-columns`), `data-aqmd-spreadsheet-notice`, `data-aqmd-spreadsheet-error` (`options`, `size`
|
|
796
798
|
or `load`), `data-aqmd-spreadsheet-retry`, and the state attributes `data-aqmd-spreadsheet-editable` and
|
|
797
|
-
`data-aqmd-
|
|
798
|
-
|
|
799
|
+
`data-aqmd-fullscreen` (a host gives the double-click and the keys inside an editable or full-screen table to the
|
|
800
|
+
grid).
|
|
799
801
|
- **Known limits**: formulas are not calculated (a cell starting with `=` shows as written); a tap does not start editing (the
|
|
800
802
|
spreadsheet's rule); a finger swipe that starts over a table whose rows scroll does not scroll the page (a box that shows
|
|
801
803
|
every row never scrolls its rows, so a swipe over it does); Tab moves inside the grid and Escape leaves it; column widths,
|
|
@@ -819,6 +821,41 @@ Total 17,600 MT
|
|
|
819
821
|
has no height cap, so a table wider than the column keeps its horizontal scroll bar at the table's bottom: a reader
|
|
820
822
|
scrolls the page down to it, or scrolls sideways over the table (Shift+wheel) or by the keys.
|
|
821
823
|
|
|
824
|
+
### Full screen
|
|
825
|
+
|
|
826
|
+
The blocks with a toolbar share one full screen: the spreadsheet block, the Mermaid diagram (while it shows a drawing)
|
|
827
|
+
and the SVG image block. Code blocks, formulas, other images and embeds have none.
|
|
828
|
+
|
|
829
|
+
- **The toggle**: the toolbar's last control, 44 × 44 px, named by the block's control hook (`data-aqmd-spreadsheet-control`,
|
|
830
|
+
`data-aqmd-mermaid-control` or `data-aqmd-svg-image-control`) with the value `fullscreen`. Its name says what a press
|
|
831
|
+
does: `fullscreen` (View full screen / 全画面で見る) and, while full screen, `exitFullscreen` (Exit full screen /
|
|
832
|
+
全画面を閉じる), the same built-in texts for every block; each block's labels replace them on their own.
|
|
833
|
+
- **One dialog**: a block keeps its toolbar and its content in one `<dialog>` (`data-aqmd-fullscreen-dialog`) that stays
|
|
834
|
+
open in the document, non-modal and a group named like the block. Full screen turns that same dialog modal over the
|
|
835
|
+
whole window (`showModal()`: the top layer, the page behind inert) and back (`show()`), so nothing inside is drawn
|
|
836
|
+
again: a table keeps its selection, zoom, bands and scroll, a diagram its view, an SVG image block the source it shows.
|
|
837
|
+
While full screen the dialog is no group but a dialog named by the block's `fullscreenDialog` label (Spreadsheet (full
|
|
838
|
+
screen), Diagram (full screen), or {name} (full screen) for an SVG image, `{name}` filled as in the source's name),
|
|
839
|
+
and the block's root carries `data-aqmd-fullscreen`, the one hook a host checks for any block (it gives the
|
|
840
|
+
double-click and the keys inside a full-screen block to the block).
|
|
841
|
+
- **The layout**: the dialog fills the window as a column: the toolbar takes its own height, the status line under the
|
|
842
|
+
content takes its own (none while empty), and the content takes the rest (see each block). Content taller than the
|
|
843
|
+
window scrolls inside the dialog.
|
|
844
|
+
- **The page behind**: while full screen the block's root keeps the size it had in the document (an inline
|
|
845
|
+
`min-block-size` on the root, which a block leaves to full screen), so the document behind is not laid out again, and
|
|
846
|
+
leaving puts back the scroll positions the block's ancestors had on entering, so the reader returns to the same place.
|
|
847
|
+
A wheel, a finger or Page Down over the dialog does not scroll a page whose window scrolls
|
|
848
|
+
(`overscroll-behavior: contain`), except in Safari, which still hands such a scroll on to the page (WebKit bug
|
|
849
|
+
243452); leaving undoes it.
|
|
850
|
+
- **Leaving**: the control, Escape and a close request without a key (Android's back) leave full screen and keep the
|
|
851
|
+
block in the document. The block takes that Escape itself (`preventDefault()` and `stopPropagation()` on the
|
|
852
|
+
keydown), so a host's own Escape handling around the document never sees it; an Escape something inside already used
|
|
853
|
+
(a menu, the grid) or that ends an input method's composition is left alone. A block that stops offering the toggle
|
|
854
|
+
(its toolbar goes) leaves full screen at once, so a full-screen block always has its way out.
|
|
855
|
+
- **Focus**: after each switch the focus is on the toggle, because reopening a dialog moves the focus to its first
|
|
856
|
+
control.
|
|
857
|
+
- The browser's Fullscreen API is not used, because iPhone Safari offers it to video only.
|
|
858
|
+
|
|
822
859
|
### Viewer toolbar
|
|
823
860
|
|
|
824
861
|
`MarkdownViewer` shows its alignment, style and table-of-contents buttons as one fixed row, in that visual and tab order, spaced in `rem` so they never overlap at large text sizes. Place the row with two package-scoped custom properties, both `0px` unless set:
|
|
@@ -961,7 +998,7 @@ const headingHref: MarkdownHeadingHrefResolver = (heading) => `/docs/guide.md#${
|
|
|
961
998
|
|
|
962
999
|
Every name and text the viewer draws comes from `labels` (`MarkdownViewerLabels`), including the table-of-contents and alignment controls and, through the `mermaid*` keys, the controls of each Mermaid diagram (`MermaidDiagram` takes `MermaidDiagramLabels` as `labels`) and, through the `spreadsheet*` keys, the labels of each spreadsheet block (`SpreadsheetBlock` takes `SpreadsheetBlockLabels` as `labels`).
|
|
963
1000
|
A label you pass carries no language of its own and is read in your page's language.
|
|
964
|
-
A built-in label marks the element that bears it with its own language: the status texts and style controls are English (`lang="en"`), the table-of-contents, alignment and Mermaid menu controls are Japanese (`lang="ja"`), and the Mermaid zoom and
|
|
1001
|
+
A built-in label marks the element that bears it with its own language: the status texts and style controls are English (`lang="en"`), the table-of-contents, alignment and Mermaid menu controls are Japanese (`lang="ja"`), and the Mermaid zoom, pan and full-screen buttons and the diagram's frame name are English. The embed labels (`embeddedVideo`, `embeddedPost`, `embeddedFrame`) are English. `DEFAULT_MARKDOWN_VIEWER_LABELS`, `DEFAULT_MERMAID_DIAGRAM_LABELS` and `DEFAULT_MARKDOWN_EMBED_LABELS` hold the built-in texts.
|
|
965
1002
|
|
|
966
1003
|
The Mermaid keys of `MermaidDiagramLabels`, all optional (the viewer's key for each is `mermaid` followed by the key with a capital first letter: `panUp` is `mermaidPanUp`):
|
|
967
1004
|
|
|
@@ -973,7 +1010,9 @@ The Mermaid keys of `MermaidDiagramLabels`, all optional (the viewer's key for e
|
|
|
973
1010
|
| `modeNoneTouch`, `modeZoomTouch`, `modePanTouch`, `modeBothTouch` | The items of the touch menu (`none`, `zoom`, `pan`, `both`) | 操作なし (指はページをスクロール) / 拡大縮小のみ (2 本指) / 移動のみ (はみ出す図を 1 本指でドラッグ) / 拡大縮小+移動 (2 本指・はみ出す図は 1 本指) | `ja` |
|
|
974
1011
|
| `zoomIn`, `zoomOut`, `resetView` | The zoom and reset buttons | Zoom In / Zoom Out / Reset View | `en` |
|
|
975
1012
|
| `panUp`, `panDown`, `panLeft`, `panRight` | The pan buttons, shown while the drawing overflows its frame | Pan Up / Pan Down / Pan Left / Pan Right | `en` |
|
|
976
|
-
| `
|
|
1013
|
+
| `fullscreen`, `exitFullscreen` | The full-screen toggle, by the way it goes | View full screen / Exit full screen | `en` |
|
|
1014
|
+
| `fullscreenDialog` | The block's dialog while full screen | Diagram (full screen) | `en` |
|
|
1015
|
+
| `diagram` | The diagram's focusable frame, its toolbar and, outside full screen, the block's dialog | Diagram (arrow keys pan, + and - zoom, 0 resets) | `en` |
|
|
977
1016
|
| `retry` | The retry button after a failed drawing | 再試行 | `ja` |
|
|
978
1017
|
|
|
979
1018
|
The spreadsheet keys of `SpreadsheetBlockLabels`, all optional (the viewer's key for each is `spreadsheet` followed by the
|
|
@@ -996,7 +1035,7 @@ placeholder without a value stays as written, so a misspelt one shows rather tha
|
|
|
996
1035
|
| `columnResized`, `rowResized` | The announcement after a size changed (`{column}` or `{row}`, `{size}` in px) | Column {column} is {size} px wide / Row {row} is {size} px high | 列 {column} の幅は {size} px / 行 {row} の高さは {size} px |
|
|
997
1036
|
| `copyAll`, `copied`, `copyFailed` | The copy button and its notices | Copy the whole table / Copied the whole table. / Could not copy the table. Browsers copy only on a secure page (https) and with their permission. | 表全体をコピー / 表全体をコピーしました。 / 表をコピーできませんでした。ブラウザは安全なページ (https) で、許可があるときだけコピーできます。 |
|
|
998
1037
|
| `saveTsv`, `saveMenu`, `saveTsvWithBom`, `fileName` | The save button, the menu's button, its item and the file's name | Save as TSV / More ways to save / Save with a BOM (for Excel) / spreadsheet.tsv | TSV として保存 / ほかの保存の方法 / BOM を付けて保存 (Excel 向け) / 表.tsv |
|
|
999
|
-
| `fullscreen`, `exitFullscreen` | The full-screen
|
|
1038
|
+
| `fullscreen`, `exitFullscreen` | The full-screen toggle, by the way it goes | View full screen / Exit full screen | 全画面で見る / 全画面を閉じる |
|
|
1000
1039
|
| `size` | The table's size (`{rows}`, `{cols}`) | Rows {rows} × columns {cols} | {rows} 行 × {cols} 列 |
|
|
1001
1040
|
| `cellAnnouncement`, `readOnlyCellAnnouncement`, `emptyCell` | A cell's announcement (`{cell}` as `B2`, `{value}`) and an empty cell's value | {cell}, {value} / {cell}, {value}, read-only / blank | {cell}、{value} / {cell}、{value}、読み取り専用 / 空白 |
|
|
1002
1041
|
| `selectionAnnouncement` | A selection's announcement (`{range}` as `A1` or `A1:C3`) | {range} selected | {range} を選択 |
|
|
@@ -1009,15 +1048,19 @@ The SVG image block's keys of `SvgImageLabels`, all optional and English by defa
|
|
|
1009
1048
|
|
|
1010
1049
|
| Key | Names | Built-in text |
|
|
1011
1050
|
| --- | --- | --- |
|
|
1012
|
-
| `toolbar` | The toolbar above the image | SVG image |
|
|
1051
|
+
| `toolbar` | The toolbar above the image and, outside full screen, the block's dialog | SVG image |
|
|
1013
1052
|
| `source` | The Source toggle | Source |
|
|
1014
1053
|
| `sourceRegion` | The shown source; `{name}` is the image's alternative text, else its file name | Source of {name} |
|
|
1015
1054
|
| `loading` | The line while the source loads | Loading the source… |
|
|
1016
1055
|
| `failed` | The failure | The source could not be read. |
|
|
1017
1056
|
| `retry` | The retry button after a failure that may pass | Try again |
|
|
1018
1057
|
| `truncated` | The note under a source the host cut | Only the beginning of this file is shown. |
|
|
1019
|
-
| `copy` | The copy button | Copy the source |
|
|
1020
|
-
| `copied`, `copyFailed` | The status line after a copy | Copied the source. / Could not copy the source. |
|
|
1058
|
+
| `copy` | The copy button while the whole source shows | Copy the source |
|
|
1059
|
+
| `copied`, `copyFailed` | The status line after a copy of the source | Copied the source. / Could not copy the source. |
|
|
1060
|
+
| `copyImage` | The copy button while the image shows | Copy the image |
|
|
1061
|
+
| `copiedImage`, `copyImageFailed` | The status line after a copy of the image | Copied the image. / Could not copy the image. |
|
|
1062
|
+
| `fullscreen`, `exitFullscreen` | The full-screen toggle, by the way it goes | View full screen / Exit full screen |
|
|
1063
|
+
| `fullscreenDialog` | The block's dialog while full screen; `{name}` as in `sourceRegion` | {name} (full screen) |
|
|
1021
1064
|
|
|
1022
1065
|
The viewer's `blockFailed` (the renderer's `blockFailedLabel`; built in: "This block could not be shown.", `lang="en"`) names the notice of a block that cannot render.
|
|
1023
1066
|
|
|
@@ -1057,10 +1100,10 @@ converter built to WebAssembly, on hundreds of generated layouts and bodies.
|
|
|
1057
1100
|
import { CODE_META_ATTRIBUTE, parseSpreadsheetOptions, planFencedBodyEdit } from "@aiquants/markdown/code-blocks"
|
|
1058
1101
|
```
|
|
1059
1102
|
|
|
1060
|
-
`@aiquants/markdown/viewer-settings` exports the built-in document styles and the alignments without loading React, for modules that also run on the server (configuration, validation): `DEFAULT_MARKDOWN_STYLES`, `MarkdownStyleOption`, `ContentAlign`, `CONTENT_ALIGNS`, `DEFAULT_CONTENT_ALIGN` and `toContentAlign`. `@aiquants/markdown` re-exports the same values.
|
|
1103
|
+
`@aiquants/markdown/viewer-settings` exports the built-in document styles and the alignments without loading React, for modules that also run on the server (configuration, validation): `DEFAULT_MARKDOWN_STYLES`, `DEFAULT_MARKDOWN_STYLE` (`"Zenn"`, the name of the built-in style a host starts a reader on when neither the host nor the reader chose one; the viewer itself always shows the `style` it is given), `MarkdownStyleOption`, `ContentAlign`, `CONTENT_ALIGNS`, `DEFAULT_CONTENT_ALIGN` and `toContentAlign`. `@aiquants/markdown` re-exports the same values.
|
|
1061
1104
|
|
|
1062
1105
|
```ts
|
|
1063
|
-
import { DEFAULT_MARKDOWN_STYLES, toContentAlign } from "@aiquants/markdown/viewer-settings"
|
|
1106
|
+
import { DEFAULT_MARKDOWN_STYLE, DEFAULT_MARKDOWN_STYLES, toContentAlign } from "@aiquants/markdown/viewer-settings"
|
|
1064
1107
|
```
|
|
1065
1108
|
|
|
1066
1109
|
## Extended Syntax
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./chunk-MOJQB5TN-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./chunk-MOJQB5TN-FdExe_-9.cjs"),u=require("./chunk-JWPE2WC7-k67jLZJ7.cjs"),n=require("./extractHeadings-BXiMC-GU.cjs"),i=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var p=i.createRailroadAbnfServices().RailroadAbnf.parser.LangiumParser,o=n.__name(e=>{const r=e.alternatives.map(c);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),c=n.__name(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),f=n.__name(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),d=n.__name(e=>{const r=b(e.primary);if(!e.repeat)return r;const{min:t,max:s}=f(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),b=n.__name(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return o(e.element);case"AbnfOptionalGroup":return{type:"optional",element:o(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),g=n.__name(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=n.__name(e=>{u.populateCommonDb(e,a.db),e.title&&a.db.setTitle(e.title),e.rules.map(r=>a.db.addRule(g(r)))},"populateDb"),y={parse:n.__name(e=>{a.db.clear(),n.log.debug("[ABNF Parser] Starting Langium parse");const r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new i.MermaidParseError(r);const t=r.value;n.log.debug("[ABNF Parser] Parsed rules:",t.rules.length),v(t),n.log.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a.db}},_={parser:y,db:a.db,renderer:a.renderer,styles:a.getStyles};exports.diagram=_;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-
|
|
2
|
-
import { p as f } from "./chunk-JWPE2WC7-
|
|
3
|
-
import { _ as n, U as o } from "./extractHeadings-
|
|
1
|
+
import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-9753BB9c.js";
|
|
2
|
+
import { p as f } from "./chunk-JWPE2WC7-Bhm6M6wC.js";
|
|
3
|
+
import { _ as n, U as o } from "./extractHeadings-9PqrYAM2.js";
|
|
4
4
|
import { M as c, b as d } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
var v = d().RailroadAbnf.parser.LangiumParser, i = /* @__PURE__ */ n((e) => {
|
|
6
6
|
const r = e.alternatives.map(g);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aF as ln, aG as an, aH as y, aI as tn, aJ as M, aK as I, aL as _, aM as un, aN as rn, aO as j, aP as o, aQ as H, aR as sn, aS as on, aT as fn } from "./extractHeadings-
|
|
1
|
+
import { aF as ln, aG as an, aH as y, aI as tn, aJ as M, aK as I, aL as _, aM as un, aN as rn, aO as j, aP as o, aQ as H, aR as sn, aS as on, aT as fn } from "./extractHeadings-9PqrYAM2.js";
|
|
2
2
|
function cn(l) {
|
|
3
3
|
return l.innerRadius;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./extractHeadings-
|
|
1
|
+
"use strict";const n=require("./extractHeadings-BXiMC-GU.cjs");function $(o){return o.innerRadius}function b(o){return o.outerRadius}function k(o){return o.startAngle}function _(o){return o.endAngle}function nn(o){return o&&o.padAngle}function en(o,x,D,P,h,v,S,s){var E=D-o,r=P-x,e=S-h,p=s-v,i=p*E-e*r;if(!(i*i<n.epsilon))return i=(e*(x-v)-p*(o-h))/i,[o+i*E,x+i*r]}function M(o,x,D,P,h,v,S){var s=o-D,E=x-P,r=(S?v:-v)/n.sqrt(s*s+E*E),e=r*E,p=-r*s,i=o+e,u=x+p,c=D+e,f=P+p,j=(i+c)/2,l=(u+f)/2,y=c-i,g=f-u,A=y*y+g*g,R=h-v,T=i*f-c*u,H=(g<0?-1:1)*n.sqrt(n.max(0,R*R*A-T*T)),I=(T*g-y*H)/A,O=(-T*y-g*H)/A,q=(T*g+y*H)/A,d=(-T*y+g*H)/A,m=I-j,a=O-l,t=q-j,z=d-l;return m*m+a*a>t*t+z*z&&(I=q,O=d),{cx:I,cy:O,x01:-e,y01:-p,x11:I*(h/R-1),y11:O*(h/R-1)}}function an(){var o=$,x=b,D=n.constant(0),P=null,h=k,v=_,S=nn,s=null,E=n.withPath(r);function r(){var e,p,i=+o.apply(this,arguments),u=+x.apply(this,arguments),c=h.apply(this,arguments)-n.halfPi,f=v.apply(this,arguments)-n.halfPi,j=n.abs(f-c),l=f>c;if(s||(s=e=E()),u<i&&(p=u,u=i,i=p),!(u>n.epsilon))s.moveTo(0,0);else if(j>n.tau-n.epsilon)s.moveTo(u*n.cos(c),u*n.sin(c)),s.arc(0,0,u,c,f,!l),i>n.epsilon&&(s.moveTo(i*n.cos(f),i*n.sin(f)),s.arc(0,0,i,f,c,l));else{var y=c,g=f,A=c,R=f,T=j,H=j,I=S.apply(this,arguments)/2,O=I>n.epsilon&&(P?+P.apply(this,arguments):n.sqrt(i*i+u*u)),q=n.min(n.abs(u-i)/2,+D.apply(this,arguments)),d=q,m=q,a,t;if(O>n.epsilon){var z=n.asin(O/i*n.sin(I)),F=n.asin(O/u*n.sin(I));(T-=z*2)>n.epsilon?(z*=l?1:-1,A+=z,R-=z):(T=0,A=R=(c+f)/2),(H-=F*2)>n.epsilon?(F*=l?1:-1,y+=F,g-=F):(H=0,y=g=(c+f)/2)}var B=u*n.cos(y),C=u*n.sin(y),G=i*n.cos(R),J=i*n.sin(R);if(q>n.epsilon){var K=u*n.cos(g),L=u*n.sin(g),N=i*n.cos(A),Q=i*n.sin(A),w;if(j<n.pi)if(w=en(B,C,N,Q,K,L,G,J)){var U=B-w[0],V=C-w[1],W=K-w[0],X=L-w[1],Y=1/n.sin(n.acos((U*W+V*X)/(n.sqrt(U*U+V*V)*n.sqrt(W*W+X*X)))/2),Z=n.sqrt(w[0]*w[0]+w[1]*w[1]);d=n.min(q,(i-Z)/(Y-1)),m=n.min(q,(u-Z)/(Y+1))}else d=m=0}H>n.epsilon?m>n.epsilon?(a=M(N,Q,B,C,u,m,l),t=M(K,L,G,J,u,m,l),s.moveTo(a.cx+a.x01,a.cy+a.y01),m<q?s.arc(a.cx,a.cy,m,n.atan2(a.y01,a.x01),n.atan2(t.y01,t.x01),!l):(s.arc(a.cx,a.cy,m,n.atan2(a.y01,a.x01),n.atan2(a.y11,a.x11),!l),s.arc(0,0,u,n.atan2(a.cy+a.y11,a.cx+a.x11),n.atan2(t.cy+t.y11,t.cx+t.x11),!l),s.arc(t.cx,t.cy,m,n.atan2(t.y11,t.x11),n.atan2(t.y01,t.x01),!l))):(s.moveTo(B,C),s.arc(0,0,u,y,g,!l)):s.moveTo(B,C),!(i>n.epsilon)||!(T>n.epsilon)?s.lineTo(G,J):d>n.epsilon?(a=M(G,J,K,L,i,-d,l),t=M(B,C,N,Q,i,-d,l),s.lineTo(a.cx+a.x01,a.cy+a.y01),d<q?s.arc(a.cx,a.cy,d,n.atan2(a.y01,a.x01),n.atan2(t.y01,t.x01),!l):(s.arc(a.cx,a.cy,d,n.atan2(a.y01,a.x01),n.atan2(a.y11,a.x11),!l),s.arc(0,0,i,n.atan2(a.cy+a.y11,a.cx+a.x11),n.atan2(t.cy+t.y11,t.cx+t.x11),l),s.arc(t.cx,t.cy,d,n.atan2(t.y11,t.x11),n.atan2(t.y01,t.x01),!l))):s.arc(0,0,i,R,A,l)}if(s.closePath(),e)return s=null,e+""||null}return r.centroid=function(){var e=(+o.apply(this,arguments)+ +x.apply(this,arguments))/2,p=(+h.apply(this,arguments)+ +v.apply(this,arguments))/2-n.pi/2;return[n.cos(p)*e,n.sin(p)*e]},r.innerRadius=function(e){return arguments.length?(o=typeof e=="function"?e:n.constant(+e),r):o},r.outerRadius=function(e){return arguments.length?(x=typeof e=="function"?e:n.constant(+e),r):x},r.cornerRadius=function(e){return arguments.length?(D=typeof e=="function"?e:n.constant(+e),r):D},r.padRadius=function(e){return arguments.length?(P=e==null?null:typeof e=="function"?e:n.constant(+e),r):P},r.startAngle=function(e){return arguments.length?(h=typeof e=="function"?e:n.constant(+e),r):h},r.endAngle=function(e){return arguments.length?(v=typeof e=="function"?e:n.constant(+e),r):v},r.padAngle=function(e){return arguments.length?(S=typeof e=="function"?e:n.constant(+e),r):S},r.context=function(e){return arguments.length?(s=e??null,r):s},r}exports.d3arc=an;
|
package/dist/{architectureDiagram-ZJ3FMSHR-D4WEA8bR.js → architectureDiagram-ZJ3FMSHR-U_pWpndb.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as Ze } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { bN as qe, _ as gt, an as Qe, aD as Je, U as Fe, O as Ke, K as je, a8 as _e, a9 as tr, J as er, G as rr, ae as ir, ak as ar, ai as nr, al as or, Q as Ee, bG as Te, aZ as pe, Y as sr, R as hr, ad as lr, a_ as fr, bO as cr } from "./extractHeadings-
|
|
1
|
+
import { p as Ze } from "./chunk-JWPE2WC7-Bhm6M6wC.js";
|
|
2
|
+
import { bN as qe, _ as gt, an as Qe, aD as Je, U as Fe, O as Ke, K as je, a8 as _e, a9 as tr, J as er, G as rr, ae as ir, ak as ar, ai as nr, al as or, Q as Ee, bG as Te, aZ as pe, Y as sr, R as hr, ad as lr, a_ as fr, bO as cr } from "./extractHeadings-9PqrYAM2.js";
|
|
3
3
|
import { p as gr } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
4
|
import { c as be } from "./cytoscape.esm-kVAWcYoG.js";
|
|
5
5
|
var he = { exports: {} }, le = { exports: {} }, fe = { exports: {} }, ur = fe.exports, Oe;
|