@aiquants/markdown 11.0.1 → 11.1.1
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 +74 -1
- package/dist/{abnfDiagram-VRR7QNED-Cgd_ClOa.js → abnfDiagram-VRR7QNED-B9EKZZCe.js} +3 -3
- package/dist/{abnfDiagram-VRR7QNED-CGbpxxTZ.cjs → abnfDiagram-VRR7QNED-BUUUWvsh.cjs} +1 -1
- package/dist/{arc-B6YeA1yq.js → arc-BWBxoAtH.js} +20 -20
- package/dist/{arc-83PgiFkI.cjs → arc-BdyZzyRm.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-CbKT84Qu.cjs → architectureDiagram-ZJ3FMSHR-C-j7rcTN.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-DUyxO_OT.js → architectureDiagram-ZJ3FMSHR-C82P-Or8.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-KhRxVKIG.cjs → blockDiagram-677ZJIJ3-B28l1266.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-BGRgY0Jq.js → blockDiagram-677ZJIJ3-DQwdwRWd.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-DKwEMXl5.cjs → c4Diagram-LMCZKHZV-BHj3qRWp.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-DNyEsvRI.js → c4Diagram-LMCZKHZV-BKS-5aGN.js} +2 -2
- package/dist/{channel-CPuos4DK.js → channel-CItIM75V.js} +1 -1
- package/dist/{channel-BwAxLUKJ.cjs → channel-C_cP5iR1.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-ueL9YXgS.cjs → chunk-2Q5K7J3B-B0pXO2t7.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-CwNIIf2z.js → chunk-2Q5K7J3B-D52R-aDh.js} +1 -1
- package/dist/{chunk-32BRIVSS-4GH9FvG2.js → chunk-32BRIVSS-DUlLCGoQ.js} +1 -1
- package/dist/{chunk-32BRIVSS-CyqPFuo9.cjs → chunk-32BRIVSS-e82Hm1LK.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-B9y1bN8p.cjs → chunk-5VM5RSS4-DmYNlEib.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-C5Js9nxl.js → chunk-5VM5RSS4-WjZ3Kfp-.js} +1 -1
- package/dist/{chunk-EX3LRPZG-BZcvojz_.js → chunk-EX3LRPZG-CZeIl-CM.js} +4 -4
- package/dist/{chunk-EX3LRPZG-CmfR2Me0.cjs → chunk-EX3LRPZG-VOMDBd7V.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-C-ypCY3I.cjs → chunk-JWPE2WC7-DqZGyZxO.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-CtaWl_b_.js → chunk-JWPE2WC7-XtdP0lPA.js} +1 -1
- package/dist/{chunk-MOJQB5TN-01G2RIVR.js → chunk-MOJQB5TN-BGmMcnEb.js} +10 -10
- package/dist/{chunk-MOJQB5TN-BwSAskm8.cjs → chunk-MOJQB5TN-C-I6Np3F.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-D2o-M0Rj.cjs → chunk-PUDLZKDR-BU0xXgGZ.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CnpC3xcz.js → chunk-PUDLZKDR-CVDCE8CQ.js} +6 -6
- package/dist/{chunk-RYQCIY6F-BJxwuEX_.js → chunk-RYQCIY6F-CazlBHVq.js} +12 -12
- package/dist/{chunk-RYQCIY6F-sv402gFf.cjs → chunk-RYQCIY6F-CzgqsQUG.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-gP3tRqcD.cjs → chunk-V7JOEXUC-BHcjsh4X.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-CAVk2pKT.js → chunk-V7JOEXUC-DjZLR1xm.js} +15 -15
- package/dist/{chunk-VR4S4FIN-BVOrMLGd.js → chunk-VR4S4FIN-BdHVIRqw.js} +3 -3
- package/dist/{chunk-VR4S4FIN-N9b38pB9.cjs → chunk-VR4S4FIN-DKCdFxYZ.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-rk2BF2-a.cjs → chunk-XXDRQBXY-DqQWFq5n.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-QR32cWjB.js → chunk-XXDRQBXY-Z_rLeBGt.js} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-CiKDmY89.cjs → classDiagram-OUVF2IWQ-HX7id7VH.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-DWLi6mnu.js → classDiagram-OUVF2IWQ-x_3zaG1u.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-CiKDmY89.cjs → classDiagram-v2-EOCWNBFH-HX7id7VH.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-DWLi6mnu.js → classDiagram-v2-EOCWNBFH-x_3zaG1u.js} +2 -2
- package/dist/components/BlockBoundary.d.ts +19 -0
- package/dist/components/MarkdownRenderer.d.ts +6 -1
- package/dist/components/MarkdownViewer.d.ts +3 -1
- package/dist/components/SvgImageBlock.d.ts +25 -0
- package/dist/components/blockFailureLabels.d.ts +2 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +1 -0
- package/dist/components/rawHtml.d.ts +1 -0
- package/dist/components/spreadsheetModel.d.ts +2 -0
- package/dist/components/svgImageLabels.d.ts +16 -0
- package/dist/components/viewerLabels.d.ts +7 -1
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-DLL-HoNB.cjs → cose-bilkent-JH36ORCC-CWD_TQFn.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-Ndnjy2V_.js → cose-bilkent-JH36ORCC-Cyz8e4tp.js} +5 -5
- package/dist/{cynefinDiagram-TSTJHNR4-BLc8lpj_.cjs → cynefinDiagram-TSTJHNR4-DEFr3c5a.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-CzQeK-ei.js → cynefinDiagram-TSTJHNR4-uBcUSDG3.js} +47 -47
- package/dist/{dagre-VKFMJZFB-BDWsqPrH.js → dagre-VKFMJZFB-Bbd2N7Iu.js} +20 -20
- package/dist/{dagre-VKFMJZFB-CpOLJSPF.cjs → dagre-VKFMJZFB-DByE8-C9.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DomkDZpC.js → diagram-FQU43EPY-CgQwvhUg.js} +2 -2
- package/dist/{diagram-FQU43EPY-BYwso-90.cjs → diagram-FQU43EPY-DPEX0cuZ.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-CJvutqnO.cjs → diagram-G47NLZAW-50nFSHRv.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-B88unx9N.js → diagram-G47NLZAW-BZsnXoS1.js} +38 -38
- package/dist/{diagram-NH7WQ7WH-B7_b2WAg.cjs → diagram-NH7WQ7WH-TShr7BQh.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-c9X1ONTP.js → diagram-NH7WQ7WH-eHSJPLfa.js} +20 -20
- package/dist/{diagram-OA4YK3LP-ClopZbjk.js → diagram-OA4YK3LP-Dphe8PdD.js} +58 -58
- package/dist/{diagram-OA4YK3LP-Dgf5KLVb.cjs → diagram-OA4YK3LP-r5leQ0jD.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-CFk-zdkR.cjs → diagram-WEI45ONY-BaT3chSs.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-Ps4TgzF1.js → diagram-WEI45ONY-pgeZBaVl.js} +10 -10
- package/dist/{ebnfDiagram-CCIWWBDH-CQCWsevA.cjs → ebnfDiagram-CCIWWBDH-D3EvTRKP.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-Cj_QjqN9.js → ebnfDiagram-CCIWWBDH-Hf655Cjt.js} +5 -5
- package/dist/{erDiagram-Q63AITRT-B8HuBKwU.js → erDiagram-Q63AITRT-YkVu4ce1.js} +9 -9
- package/dist/{erDiagram-Q63AITRT-BzYknHNb.cjs → erDiagram-Q63AITRT-fnT4vBqH.cjs} +1 -1
- package/dist/{extractHeadings-Crd19E9z.js → extractHeadings-B8u8yqfC.js} +6670 -6480
- package/dist/{extractHeadings-CbjPphbm.cjs → extractHeadings-DLNXUqAG.cjs} +86 -86
- package/dist/flowDiagram-23GEKE2U-B5AFLHup.js +7 -0
- package/dist/flowDiagram-23GEKE2U-BaQLONgC.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-ssf7C_OK.js → ganttDiagram-NO4QXBWP-D-SkIoPg.js} +2 -2
- package/dist/{ganttDiagram-NO4QXBWP-DmOJTDey.cjs → ganttDiagram-NO4QXBWP-DC3d7PwO.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-DO-7gHh9.js → gitGraphDiagram-IHSO6WYX-CjYttPlh.js} +10 -10
- package/dist/{gitGraphDiagram-IHSO6WYX-BXw0xce8.cjs → gitGraphDiagram-IHSO6WYX-DFUHvrlM.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +3 -1
- package/dist/index.client.js +32 -31
- package/dist/index.js +32 -31
- package/dist/{infoDiagram-FWYZ7A6U-C_qI_jda.cjs → infoDiagram-FWYZ7A6U-CM_qocjy.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-D9CHdCHO.js → infoDiagram-FWYZ7A6U-DpELmEdt.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-B-P0YpVr.js → ishikawaDiagram-FXEZZL3T-doZ6ry1Q.js} +25 -25
- package/dist/{ishikawaDiagram-FXEZZL3T-BsAmXBFz.cjs → ishikawaDiagram-FXEZZL3T-uPR_QB-P.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BReIo-v3.js → journeyDiagram-5HDEW3XC-B3Gvqmgz.js} +4 -4
- package/dist/{journeyDiagram-5HDEW3XC-3vpGGLSR.cjs → journeyDiagram-5HDEW3XC-DKxRZGZY.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-CgVNbmAG.cjs → kanban-definition-HUTT4EX6-CmEtZdgP.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-DKqZmd21.js → kanban-definition-HUTT4EX6-XEl_CQHs.js} +52 -52
- package/dist/{linear-C6Pl8W7F.cjs → linear-BJeuATkk.cjs} +1 -1
- package/dist/{linear-BZclxiW5.js → linear-CJwjH-8_.js} +5 -5
- package/dist/{mindmap-definition-LN4V7U3C-CRGWlSrN.cjs → mindmap-definition-LN4V7U3C-B9zpExvk.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-suiDe0CR.js → mindmap-definition-LN4V7U3C-Cd2v2Y8Z.js} +16 -16
- package/dist/{pegDiagram-2B236MQR-CNg0sJ5j.js → pegDiagram-2B236MQR-DFYHpIqe.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-DXTBiaER.cjs → pegDiagram-2B236MQR-DWCHB7kd.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-BjxQd0El.js → pieDiagram-ENE6RG2P-CD581vqD.js} +51 -51
- package/dist/{pieDiagram-ENE6RG2P-Pm5hFcS9.cjs → pieDiagram-ENE6RG2P-LLQzK8bv.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-CbhdFi8L.js → quadrantDiagram-ABIIQ3AL-BhzJSnax.js} +43 -43
- package/dist/{quadrantDiagram-ABIIQ3AL-Cn9jg0Nj.cjs → quadrantDiagram-ABIIQ3AL-DjC_l1Fw.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-BsgUwAcz.cjs → railroadDiagram-RFXS5EU6-C1tKXwxN.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-DQZDzmuH.js → railroadDiagram-RFXS5EU6-DmVOfohB.js} +7 -7
- package/dist/{requirementDiagram-TGXJPOKE-B6qkEWAq.js → requirementDiagram-TGXJPOKE-DDpRa8G1.js} +18 -18
- package/dist/{requirementDiagram-TGXJPOKE-Bb7-fVzh.cjs → requirementDiagram-TGXJPOKE-DkGh_vLW.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-B0lfTQm7.js → sankeyDiagram-HTMAVEWB-3UuuubkA.js} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-D_i8qvPc.cjs → sankeyDiagram-HTMAVEWB-CkCLaKDd.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-hK_KsgkL.js → sequenceDiagram-DBY2YBRQ-CRC__bVC.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-Cis-Rynd.cjs → sequenceDiagram-DBY2YBRQ-DcWj7JMz.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-CmMBsApW.js → sizeCapture-X5ZJPWSS-DuxhTDeu.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-63py1Km1.cjs → sizeCapture-X5ZJPWSS-Wb9vgGKU.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-DunX61Hp.cjs → stateDiagram-2N3HPSRC-CMBwcQE6.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-iHHDXYiT.js → stateDiagram-2N3HPSRC-DGfmIJEN.js} +10 -10
- package/dist/{stateDiagram-v2-6OUMAXLB-Cm5Vjes-.cjs → stateDiagram-v2-6OUMAXLB-7UPtJqUO.cjs} +1 -1
- package/dist/{stateDiagram-v2-6OUMAXLB-BGf7WS-h.js → stateDiagram-v2-6OUMAXLB-ZyMZ4vTG.js} +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-BJ1u6dlg.cjs → swimlanes-5IMT3BWC-CZzTj7hi.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-Dlxdol7t.js → swimlanes-5IMT3BWC-CpPHvYma.js} +313 -313
- package/dist/{swimlanesDiagram-G3AALYLV-BJUZ0yd-.cjs → swimlanesDiagram-G3AALYLV-By4sYWRa.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-DhG6vFeB.js → swimlanesDiagram-G3AALYLV-ISXX19Uv.js} +2 -2
- package/dist/{timeline-definition-FHXFAJF6-CC5nYPoS.cjs → timeline-definition-FHXFAJF6-CLuuXV7h.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BpNpgP_f.js → timeline-definition-FHXFAJF6-YNTe1gIW.js} +108 -108
- package/dist/{vennDiagram-L72KCM5P-BUO57UaZ.js → vennDiagram-L72KCM5P-B2jRtjMe.js} +101 -101
- package/dist/{vennDiagram-L72KCM5P-B3PoRUuk.cjs → vennDiagram-L72KCM5P-DFt6CSPi.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-BF8VCIge.cjs → wardleyDiagram-EHGQE667-B1RAAbXU.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-Bp6gS0HT.js → wardleyDiagram-EHGQE667-ZOmJLYv5.js} +85 -85
- package/dist/{xychartDiagram-FW5EYKEG-C15kZN0r.cjs → xychartDiagram-FW5EYKEG-D1mJfFkC.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-CBQgXLz_.js → xychartDiagram-FW5EYKEG-JwURYtLn.js} +40 -40
- package/package.json +11 -11
- package/dist/flowDiagram-23GEKE2U-BIiIKtPl.cjs +0 -1
- package/dist/flowDiagram-23GEKE2U-CL3q35kI.js +0 -7
package/README.md
CHANGED
|
@@ -483,6 +483,61 @@ A block rendered without such a sheet shows plain inherited text: the components
|
|
|
483
483
|
- **Palette**: a theme colour that falls below 7:1 on any of those backgrounds is replaced by one with the same hue and chroma (chroma is lowered only to stay inside sRGB), moved in lightness only as far as 7:1 needs. The tints keep the hue of a translucent green and red and take the luminance of the block, so a tint never lowers a token's contrast.
|
|
484
484
|
- **Hooks** are data attributes, not classes: `data-aqmd-code-block` on the block's root, `data-aqmd-code-filename` on the file name's tab, `data-aqmd-code-copy` on the copy button (the copy button of a display-math block carries it too) and `data-aqmd-diff="add"` or `"remove"` on a changed line, which sets no inline background.
|
|
485
485
|
- **Copy button and file name**: `markdown.css` colours them (`#1f2937` on `#e5e7eb`, `#d1d5db` on hover; in the dark scheme, `.dark` or `[data-theme="dark"]` on an ancestor, `#f3f4f6` on `#374151`, `#4a5361` on hover), every pair at 7:1 or more. The copy buttons are at least 44 × 44 px under every pointer.
|
|
486
|
+
- **Languages**: a fence's language is highlighted when Shiki knows it — one of its languages or their aliases
|
|
487
|
+
(`bundledLanguages`), or a plain one (`text`, `txt`, `plain`, `plaintext`, `ansi`). `svg` is highlighted as `xml`.
|
|
488
|
+
Every other language (`logql`, a misspelling, a language in capitals such as `SVG`) renders as plain text, so no fence
|
|
489
|
+
can fail the document; the block keeps its file name and copy button.
|
|
490
|
+
|
|
491
|
+
### SVG images
|
|
492
|
+
|
|
493
|
+
Give `MarkdownViewer` or `MarkdownRenderer` a reader of image sources (`imageSource`, a `MarkdownImageSourceReader`),
|
|
494
|
+
and every storage SVG image that stands alone in its paragraph shows its source a press away: a toolbar above the image
|
|
495
|
+
whose **Source** toggle swaps the image for the text of its file, as written, and back. Without a reader every image
|
|
496
|
+
renders as written.
|
|
497
|
+
|
|
498
|
+
- **Which images**: a paragraph whose only child (besides white space) is an `img` that, as the allow list keeps it,
|
|
499
|
+
carries a `data-asset-src` ending in `.svg` (any ASCII letter case), a `src`, and no `data-asset-exists="false"`, in a
|
|
500
|
+
paragraph that is not inside a link. An image with an external or root-relative `src` (no `data-asset-src`), an image
|
|
501
|
+
inside a link, in a sentence, in a list item or a table cell without a paragraph, or next to another image renders as
|
|
502
|
+
before.
|
|
503
|
+
- **The reader**: `read(path, signal)` receives the image's document path exactly as the converter wrote it in
|
|
504
|
+
`data-asset-src` and resolves to `{ kind: "text", text, truncated }` (the beginning of the file as text, `truncated`
|
|
505
|
+
when the file holds more than the host reads) or `{ kind: "failure", retryable }` (`retryable` when trying again may
|
|
506
|
+
succeed). It rejects only with the signal's reason once the signal aborted; any other rejection, and a throw before it
|
|
507
|
+
returns its promise, shows as a failure that may pass and is reported on the console. The reader object may change
|
|
508
|
+
on any render: the renderer hands the blocks one stable stand-in that calls the latest reader, and only the reader's
|
|
509
|
+
presence renders the blocks again. Only the converter writes `data-asset-src` (it removes the markers a document
|
|
510
|
+
writes and refuses the targets its deny rules refuse), and the reader should admit exactly what the host would serve
|
|
511
|
+
as the image itself.
|
|
512
|
+
- **Showing the source**: the block reads the file each time the source shows, and aborts the read when the source hides
|
|
513
|
+
or the block goes away. Until the answer it shows a loading line; then the text in a `<pre>` that wraps (a one-line
|
|
514
|
+
SVG never runs out sideways), never interprets it, takes the focus (the keyboard scrolls it) and is capped at the
|
|
515
|
+
viewport height less 2 × 44 px (`--aqmd-viewport-cap`, as the diagram and table boxes are) with its own scrolling. A
|
|
516
|
+
source the host cut gets a note under it; a whole source adds **Copy** to the toolbar, which writes the text exactly
|
|
517
|
+
as read and tells the outcome in the block's status line. A failure shows its text, with **Try again** when it may
|
|
518
|
+
pass (the focus moves to the toggle as the button goes). The press keeps the focus on the toggle (`aria-pressed`); the
|
|
519
|
+
choice is not kept, so the block opens on the image.
|
|
520
|
+
- **Toolbar**: 44 × 44 px controls in a wrapping row that never covers the image, one tab stop whose controls the arrow
|
|
521
|
+
keys, Home and End walk, and the palette and focus ring the Mermaid and spreadsheet toolbars share (`markdown.css`).
|
|
522
|
+
- **Layout**: the block replaces the paragraph with a `div` that holds the toolbar and, while the image shows, the
|
|
523
|
+
original paragraph (so the image keeps the paragraph's spacing). The root carries the paragraph's `data-source-lines`;
|
|
524
|
+
the paragraph inside it carries none.
|
|
525
|
+
- **Hooks**: `data-aqmd-svg-image` (the root, with `data-aqmd-svg-image-view="image"` or `"source"`),
|
|
526
|
+
`data-aqmd-svg-image-toolbar`, `data-aqmd-svg-image-control` (`source`, `copy`), `data-aqmd-svg-image-loading`,
|
|
527
|
+
`data-aqmd-svg-image-source`, `data-aqmd-svg-image-truncated`, `data-aqmd-svg-image-error`,
|
|
528
|
+
`data-aqmd-svg-image-retry` and `data-aqmd-svg-image-notice` (the status line). A host that opens an editor on a
|
|
529
|
+
double-click should leave a double-click inside `data-aqmd-svg-image-source` to the text selection.
|
|
530
|
+
- **Labels**: the viewer's `svgImage*` keys, or the renderer's `svgImageLabels` (`SvgImageLabels`; see [Labels and
|
|
531
|
+
languages](#labels-and-languages)).
|
|
532
|
+
|
|
533
|
+
### Blocks that cannot render
|
|
534
|
+
|
|
535
|
+
Every top-level block renders inside its own error boundary. A block whose rendering throws in the browser — a host's
|
|
536
|
+
`linkComponent` that fails, a component's bug — shows a short notice in its place (`[data-aqmd-block-failure]`: the
|
|
537
|
+
label `blockFailed`, the renderer's `blockFailedLabel`, above the block's text in a `<pre>`; the built-in English notice
|
|
538
|
+
is marked `lang="en"`, a supplied one carries no language), the other blocks render, and React reports the error as a
|
|
539
|
+
caught one (the root's `onCaughtError`, the console by default). The block renders again as soon as its content
|
|
540
|
+
changes. React's server rendering does not stop at error boundaries, so such a block still fails a server render.
|
|
486
541
|
|
|
487
542
|
### Mermaid diagrams
|
|
488
543
|
|
|
@@ -555,7 +610,9 @@ Total 200 235
|
|
|
555
610
|
the column-header band and the visible rows, both 24 px and scaled by the zoom, and the horizontal scroll bar
|
|
556
611
|
(`@aiquants/spreadsheet/view`'s constants) — capped at the viewport's height less two 44 px bands, so the page can always
|
|
557
612
|
be scrolled past it. `layout="fill"` lets a host that shows one table in a pane of its own (a file preview) give the
|
|
558
|
-
block the pane's height: the toolbar and the notice keep their own height and the box takes the rest
|
|
613
|
+
block the pane's height: the toolbar and the notice keep their own height and the box takes the rest, but never less
|
|
614
|
+
than three rows (all the rows of a shorter table) at the grid's zoom, capped the same way. In a pane shorter than that
|
|
615
|
+
the block grows past the pane, so a host that scrolls its pane reaches the whole table instead of a squeezed box.
|
|
559
616
|
- **The plain table**: the server render and the hydrating render show a plain `<table>` in the box, drawn as the grid
|
|
560
617
|
first shows it, so the page does not shift when the grid replaces it (a block that mounts after the grid has loaded draws
|
|
561
618
|
the grid at once) and a reader without JavaScript still sees the data: the column letters (A to Z, more than the box shows
|
|
@@ -835,6 +892,22 @@ placeholder without a value stays as written, so a misspelt one shows rather tha
|
|
|
835
892
|
| `tooLarge` | The error of a table past the budget (`{cells}`, `{max}`) | This table has {cells} cells, more than the {max} a table shows. Its text is still in the document. | この表のセルは {cells} 個で、表が見せられる {max} 個を超えます。表の文字は文書の中にあります。 |
|
|
836
893
|
| `loadFailed`, `retry` | The error of a failed load and its retry button | Could not load the spreadsheet. Check the connection and retry. / Retry | 表を読み込めませんでした。接続を確かめて再試行してください。 / 再試行 |
|
|
837
894
|
|
|
895
|
+
The SVG image block's keys of `SvgImageLabels`, all optional and English by default (`lang="en"`; the viewer's key for each is `svgImage` followed by the key with a capital first letter: `source` is `svgImageSource`; `DEFAULT_SVG_IMAGE_LABELS` holds the texts):
|
|
896
|
+
|
|
897
|
+
| Key | Names | Built-in text |
|
|
898
|
+
| --- | --- | --- |
|
|
899
|
+
| `toolbar` | The toolbar above the image | SVG image |
|
|
900
|
+
| `source` | The Source toggle | Source |
|
|
901
|
+
| `sourceRegion` | The shown source; `{name}` is the image's alternative text, else its file name | Source of {name} |
|
|
902
|
+
| `loading` | The line while the source loads | Loading the source… |
|
|
903
|
+
| `failed` | The failure | The source could not be read. |
|
|
904
|
+
| `retry` | The retry button after a failure that may pass | Try again |
|
|
905
|
+
| `truncated` | The note under a source the host cut | Only the beginning of this file is shown. |
|
|
906
|
+
| `copy` | The copy button | Copy the source |
|
|
907
|
+
| `copied`, `copyFailed` | The status line after a copy | Copied the source. / Could not copy the source. |
|
|
908
|
+
|
|
909
|
+
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.
|
|
910
|
+
|
|
838
911
|
### Settings without React
|
|
839
912
|
|
|
840
913
|
`@aiquants/markdown/code-blocks` holds the code-block contract without loading React: `CODE_META_ATTRIBUTE`
|
|
@@ -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,
|
|
1
|
+
import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-BGmMcnEb.js";
|
|
2
|
+
import { p as f } from "./chunk-JWPE2WC7-XtdP0lPA.js";
|
|
3
|
+
import { _ as n, U as o } from "./extractHeadings-B8u8yqfC.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 +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-C-I6Np3F.cjs"),u=require("./chunk-JWPE2WC7-DqZGyZxO.cjs"),n=require("./extractHeadings-DLNXUqAG.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-B8u8yqfC.js";
|
|
2
2
|
function cn(l) {
|
|
3
3
|
return l.innerRadius;
|
|
4
4
|
}
|
|
@@ -14,13 +14,13 @@ function dn(l) {
|
|
|
14
14
|
function mn(l) {
|
|
15
15
|
return l && l.padAngle;
|
|
16
16
|
}
|
|
17
|
-
function pn(l, h,
|
|
18
|
-
var
|
|
17
|
+
function pn(l, h, q, O, v, R, J, a) {
|
|
18
|
+
var D = q - l, i = O - h, n = J - v, d = a - R, u = d * D - n * i;
|
|
19
19
|
if (!(u * u < y))
|
|
20
|
-
return u = (n * (h - R) - d * (l - v)) / u, [l + u *
|
|
20
|
+
return u = (n * (h - R) - d * (l - v)) / u, [l + u * D, h + u * i];
|
|
21
21
|
}
|
|
22
|
-
function W(l, h,
|
|
23
|
-
var a = l -
|
|
22
|
+
function W(l, h, q, O, v, R, J) {
|
|
23
|
+
var a = l - q, D = h - O, i = (J ? R : -R) / j(a * a + D * D), n = i * D, d = -i * a, u = l + n, s = h + d, f = q + n, c = O + d, K = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, A = m * m + g * g, T = v - R, P = u * c - f * s, E = (g < 0 ? -1 : 1) * j(fn(0, T * T * A - P * P)), F = (P * g - m * E) / A, G = (-P * m - g * E) / A, w = (P * g + m * E) / A, p = (-P * m + g * E) / A, x = F - K, e = G - t, r = w - K, L = p - t;
|
|
24
24
|
return x * x + e * e > r * r + L * L && (F = w, G = p), {
|
|
25
25
|
cx: F,
|
|
26
26
|
cy: G,
|
|
@@ -31,43 +31,43 @@ function W(l, h, S, I, v, R, J) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function hn() {
|
|
34
|
-
var l = cn, h = yn,
|
|
34
|
+
var l = cn, h = yn, q = H(0), O = null, v = gn, R = dn, J = mn, a = null, D = ln(i);
|
|
35
35
|
function i() {
|
|
36
36
|
var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - an, c = R.apply(this, arguments) - an, K = un(c - f), t = c > f;
|
|
37
|
-
if (a || (a = n =
|
|
37
|
+
if (a || (a = n = D()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
|
|
38
38
|
else if (K > tn - y)
|
|
39
|
-
a.moveTo(s * M(f), s *
|
|
39
|
+
a.moveTo(s * M(f), s * I(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * M(c), u * I(c)), a.arc(0, 0, u, c, f, t));
|
|
40
40
|
else {
|
|
41
|
-
var m = f, g = c, A = f, T = c, P = K,
|
|
41
|
+
var m = f, g = c, A = f, T = c, P = K, E = K, F = J.apply(this, arguments) / 2, G = F > y && (O ? +O.apply(this, arguments) : j(u * u + s * s)), w = _(un(s - u) / 2, +q.apply(this, arguments)), p = w, x = w, e, r;
|
|
42
42
|
if (G > y) {
|
|
43
|
-
var L = sn(G / u *
|
|
44
|
-
(P -= L * 2) > y ? (L *= t ? 1 : -1, A += L, T -= L) : (P = 0, A = T = (f + c) / 2), (
|
|
43
|
+
var L = sn(G / u * I(F)), z = sn(G / s * I(F));
|
|
44
|
+
(P -= L * 2) > y ? (L *= t ? 1 : -1, A += L, T -= L) : (P = 0, A = T = (f + c) / 2), (E -= z * 2) > y ? (z *= t ? 1 : -1, m += z, g -= z) : (E = 0, m = g = (f + c) / 2);
|
|
45
45
|
}
|
|
46
|
-
var N = s * M(m), Q = s *
|
|
46
|
+
var N = s * M(m), Q = s * I(m), B = u * M(T), C = u * I(T);
|
|
47
47
|
if (w > y) {
|
|
48
|
-
var U = s * M(g), V = s *
|
|
48
|
+
var U = s * M(g), V = s * I(g), X = u * M(A), Y = u * I(A), S;
|
|
49
49
|
if (K < rn)
|
|
50
|
-
if (
|
|
51
|
-
var Z = N -
|
|
50
|
+
if (S = pn(N, Q, X, Y, U, V, B, C)) {
|
|
51
|
+
var Z = N - S[0], $ = Q - S[1], k = U - S[0], b = V - S[1], nn = 1 / I(on((Z * k + $ * b) / (j(Z * Z + $ * $) * j(k * k + b * b))) / 2), en = j(S[0] * S[0] + S[1] * S[1]);
|
|
52
52
|
p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
|
|
53
53
|
} else
|
|
54
54
|
p = x = 0;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
E > y ? x > y ? (e = W(X, Y, N, Q, s, x, t), r = W(U, V, B, C, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(N, Q), a.arc(0, 0, s, m, g, !t)) : a.moveTo(N, Q), !(u > y) || !(P > y) ? a.lineTo(B, C) : p > y ? (e = W(B, C, U, V, u, -p, t), r = W(N, Q, X, Y, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, A, t);
|
|
57
57
|
}
|
|
58
58
|
if (a.closePath(), n) return a = null, n + "" || null;
|
|
59
59
|
}
|
|
60
60
|
return i.centroid = function() {
|
|
61
61
|
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +R.apply(this, arguments)) / 2 - rn / 2;
|
|
62
|
-
return [M(d) * n,
|
|
62
|
+
return [M(d) * n, I(d) * n];
|
|
63
63
|
}, i.innerRadius = function(n) {
|
|
64
64
|
return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
|
|
65
65
|
}, i.outerRadius = function(n) {
|
|
66
66
|
return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
|
|
67
67
|
}, i.cornerRadius = function(n) {
|
|
68
|
-
return arguments.length ? (
|
|
68
|
+
return arguments.length ? (q = typeof n == "function" ? n : H(+n), i) : q;
|
|
69
69
|
}, i.padRadius = function(n) {
|
|
70
|
-
return arguments.length ? (
|
|
70
|
+
return arguments.length ? (O = n == null ? null : typeof n == "function" ? n : H(+n), i) : O;
|
|
71
71
|
}, i.startAngle = function(n) {
|
|
72
72
|
return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
|
|
73
73
|
}, i.endAngle = function(n) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./extractHeadings-
|
|
1
|
+
"use strict";const n=require("./extractHeadings-DLNXUqAG.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;
|