@aiquants/markdown 11.5.0 → 11.6.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.
Files changed (128) hide show
  1. package/README.md +63 -19
  2. package/dist/{abnfDiagram-VRR7QNED-3l3Qz5_v.js → abnfDiagram-VRR7QNED-CNPa4Amd.js} +3 -3
  3. package/dist/{abnfDiagram-VRR7QNED-C1KjRxNX.cjs → abnfDiagram-VRR7QNED-DA1FhoMO.cjs} +1 -1
  4. package/dist/{arc-CG3tcebk.js → arc-B5HYhmyA.js} +1 -1
  5. package/dist/{arc-CUNOcrsN.cjs → arc-DpWieVdR.cjs} +1 -1
  6. package/dist/{architectureDiagram-ZJ3FMSHR-CQ5LUL3X.cjs → architectureDiagram-ZJ3FMSHR-CtOy4eQw.cjs} +1 -1
  7. package/dist/{architectureDiagram-ZJ3FMSHR-_Ar4fBHD.js → architectureDiagram-ZJ3FMSHR-Dq9Ji_ss.js} +2 -2
  8. package/dist/{blockDiagram-677ZJIJ3-CwCBFYKA.cjs → blockDiagram-677ZJIJ3-BFrK1cVr.cjs} +1 -1
  9. package/dist/{blockDiagram-677ZJIJ3-DaJDTgl3.js → blockDiagram-677ZJIJ3-C29MtPfl.js} +3 -3
  10. package/dist/{c4Diagram-LMCZKHZV-B4HVzr4N.cjs → c4Diagram-LMCZKHZV-B-Zzfbb7.cjs} +1 -1
  11. package/dist/{c4Diagram-LMCZKHZV-DTj08TSx.js → c4Diagram-LMCZKHZV-BENAHgCx.js} +2 -2
  12. package/dist/{channel-DfG_8w-f.js → channel-BPBmpvjP.js} +1 -1
  13. package/dist/{channel-DeoL6x9I.cjs → channel-CloJXQTJ.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-DdH7dEhc.js → chunk-2Q5K7J3B-Baih_I0x.js} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-CqlpKri1.cjs → chunk-2Q5K7J3B-khdwb5P6.cjs} +1 -1
  16. package/dist/{chunk-32BRIVSS-rallHOKW.js → chunk-32BRIVSS-CvFrBQms.js} +1 -1
  17. package/dist/{chunk-32BRIVSS-BYlIy0bD.cjs → chunk-32BRIVSS-DNEHcGy0.cjs} +1 -1
  18. package/dist/{chunk-5VM5RSS4-BJT-kSEK.js → chunk-5VM5RSS4-D-CHS8NK.js} +1 -1
  19. package/dist/{chunk-5VM5RSS4-BcxAihy5.cjs → chunk-5VM5RSS4-DyHmluAy.cjs} +1 -1
  20. package/dist/{chunk-EX3LRPZG-fu3aLPcS.js → chunk-EX3LRPZG-BE7dfz4i.js} +4 -4
  21. package/dist/{chunk-EX3LRPZG-TXhG_MZW.cjs → chunk-EX3LRPZG-Bln-66zI.cjs} +1 -1
  22. package/dist/{chunk-JWPE2WC7-DSejuCSZ.js → chunk-JWPE2WC7-BFvr7fTK.js} +1 -1
  23. package/dist/{chunk-JWPE2WC7-CGTSmMeV.cjs → chunk-JWPE2WC7-Be4OZhVq.cjs} +1 -1
  24. package/dist/{chunk-MOJQB5TN-_xGQHEPZ.cjs → chunk-MOJQB5TN-4jP7ibIw.cjs} +1 -1
  25. package/dist/{chunk-MOJQB5TN-BQVuH2Cr.js → chunk-MOJQB5TN-DzmVBP7r.js} +1 -1
  26. package/dist/{chunk-PUDLZKDR-B_Fc_l2w.cjs → chunk-PUDLZKDR-CiV9slXG.cjs} +1 -1
  27. package/dist/{chunk-PUDLZKDR-8Sfu1EQC.js → chunk-PUDLZKDR-Cz6U2vY6.js} +6 -6
  28. package/dist/{chunk-RYQCIY6F-Drt1rQqM.cjs → chunk-RYQCIY6F-Di1tJAzK.cjs} +1 -1
  29. package/dist/{chunk-RYQCIY6F-BgKKNc1t.js → chunk-RYQCIY6F-DybZ6kDC.js} +1 -1
  30. package/dist/{chunk-V7JOEXUC-B2FjbeBt.js → chunk-V7JOEXUC-BO-hRkeL.js} +5 -5
  31. package/dist/{chunk-V7JOEXUC-JVzkpmfB.cjs → chunk-V7JOEXUC-lnMS5mom.cjs} +1 -1
  32. package/dist/{chunk-VR4S4FIN-P5Qd79H0.js → chunk-VR4S4FIN-C8GwMLgs.js} +1 -1
  33. package/dist/{chunk-VR4S4FIN-CTXLaOIl.cjs → chunk-VR4S4FIN-CdVvXK3Z.cjs} +1 -1
  34. package/dist/{chunk-XXDRQBXY-CCzdNsMv.cjs → chunk-XXDRQBXY-Cy7CZGPS.cjs} +1 -1
  35. package/dist/{chunk-XXDRQBXY-Bn6LJsS6.js → chunk-XXDRQBXY-bJCONQUB.js} +1 -1
  36. package/dist/{classDiagram-v2-EOCWNBFH-DO6Mv0uZ.js → classDiagram-OUVF2IWQ-BRTTG09-.js} +2 -2
  37. package/dist/{classDiagram-OUVF2IWQ-Bes0dCT5.cjs → classDiagram-OUVF2IWQ-CdczDHov.cjs} +1 -1
  38. package/dist/{classDiagram-OUVF2IWQ-DO6Mv0uZ.js → classDiagram-v2-EOCWNBFH-BRTTG09-.js} +2 -2
  39. package/dist/{classDiagram-v2-EOCWNBFH-Bes0dCT5.cjs → classDiagram-v2-EOCWNBFH-CdczDHov.cjs} +1 -1
  40. package/dist/code-blocks-Cpo2S9jm.cjs +4 -0
  41. package/dist/{code-blocks-bgwDIVp1.js → code-blocks-Gfo7U6nu.js} +126 -119
  42. package/dist/code-blocks.cjs +1 -1
  43. package/dist/code-blocks.d.ts +8 -2
  44. package/dist/code-blocks.js +13 -12
  45. package/dist/components/spreadsheetModel.d.ts +5 -1
  46. package/dist/converter.wasm +0 -0
  47. package/dist/{cose-bilkent-JH36ORCC-CoX_wSme.js → cose-bilkent-JH36ORCC-3yJASm2B.js} +1 -1
  48. package/dist/{cose-bilkent-JH36ORCC-BPOsm7yP.cjs → cose-bilkent-JH36ORCC-DGVOCRqn.cjs} +1 -1
  49. package/dist/{cynefinDiagram-TSTJHNR4-C_D9ZWpP.js → cynefinDiagram-TSTJHNR4-Bk4ZPz-p.js} +2 -2
  50. package/dist/{cynefinDiagram-TSTJHNR4-CK9h-uWI.cjs → cynefinDiagram-TSTJHNR4-CIyBWCUT.cjs} +1 -1
  51. package/dist/{dagre-VKFMJZFB-CBzUft2X.js → dagre-VKFMJZFB-BGB3cKw2.js} +2 -2
  52. package/dist/{dagre-VKFMJZFB-BKFUx2WF.cjs → dagre-VKFMJZFB-BfBDrhyC.cjs} +1 -1
  53. package/dist/{diagram-FQU43EPY-CXexgfZz.js → diagram-FQU43EPY-Cay_eq5e.js} +2 -2
  54. package/dist/{diagram-FQU43EPY-DLrn-MaQ.cjs → diagram-FQU43EPY-mC5ZPPOl.cjs} +1 -1
  55. package/dist/{diagram-G47NLZAW-CEmxs2Sz.cjs → diagram-G47NLZAW-BCQt1VIB.cjs} +1 -1
  56. package/dist/{diagram-G47NLZAW-CT-fNK7m.js → diagram-G47NLZAW-Dhhc68JM.js} +3 -3
  57. package/dist/{diagram-NH7WQ7WH-Dc7J93KZ.js → diagram-NH7WQ7WH-Cl8Z6v7O.js} +2 -2
  58. package/dist/{diagram-NH7WQ7WH-BnhBfTFA.cjs → diagram-NH7WQ7WH-SPKn3csJ.cjs} +1 -1
  59. package/dist/{diagram-OA4YK3LP-BMYf0qqF.cjs → diagram-OA4YK3LP-CB2TRawM.cjs} +1 -1
  60. package/dist/{diagram-OA4YK3LP-BRNtvGeu.js → diagram-OA4YK3LP-CYt5val7.js} +3 -3
  61. package/dist/{diagram-WEI45ONY-COy0YYkY.js → diagram-WEI45ONY-DqGET2tJ.js} +2 -2
  62. package/dist/{diagram-WEI45ONY-DpTXA_7h.cjs → diagram-WEI45ONY-o2MhIgLA.cjs} +1 -1
  63. package/dist/{ebnfDiagram-CCIWWBDH-DxJioh0Y.js → ebnfDiagram-CCIWWBDH-Cw5FHNw7.js} +3 -3
  64. package/dist/{ebnfDiagram-CCIWWBDH-Ce1oqWBl.cjs → ebnfDiagram-CCIWWBDH-fDvEjNZQ.cjs} +1 -1
  65. package/dist/{erDiagram-Q63AITRT-B7sO8mgg.js → erDiagram-Q63AITRT-C0IkJfJZ.js} +4 -4
  66. package/dist/{erDiagram-Q63AITRT-BsW683ct.cjs → erDiagram-Q63AITRT-Cfcu-JgV.cjs} +1 -1
  67. package/dist/{extractHeadings-DsF6Ytus.js → extractHeadings-BnnTGmkL.js} +5527 -5474
  68. package/dist/{extractHeadings-C2UT0oKs.cjs → extractHeadings-DO9TMcyl.cjs} +71 -71
  69. package/dist/flowDiagram-23GEKE2U-CT7PxHKx.js +7 -0
  70. package/dist/flowDiagram-23GEKE2U-DNz8aCol.cjs +1 -0
  71. package/dist/{ganttDiagram-NO4QXBWP-CcTXFJsJ.js → ganttDiagram-NO4QXBWP-DT9Qkoeh.js} +2 -2
  72. package/dist/{ganttDiagram-NO4QXBWP-kpbuGngd.cjs → ganttDiagram-NO4QXBWP-RRhQ4Wa7.cjs} +1 -1
  73. package/dist/{gitGraphDiagram-IHSO6WYX-DdiwT2YX.cjs → gitGraphDiagram-IHSO6WYX-AMJM7Lnn.cjs} +1 -1
  74. package/dist/{gitGraphDiagram-IHSO6WYX-DDCtdlhT.js → gitGraphDiagram-IHSO6WYX-CoKzbt0q.js} +3 -3
  75. package/dist/index.cjs +1 -1
  76. package/dist/index.client.cjs +1 -1
  77. package/dist/index.client.js +2 -2
  78. package/dist/index.js +2 -2
  79. package/dist/{infoDiagram-FWYZ7A6U-CfNWVNlm.cjs → infoDiagram-FWYZ7A6U-B1w9y9ic.cjs} +1 -1
  80. package/dist/{infoDiagram-FWYZ7A6U-DSTZ1Dol.js → infoDiagram-FWYZ7A6U-DX5bR2wo.js} +1 -1
  81. package/dist/{ishikawaDiagram-FXEZZL3T-kdySio36.cjs → ishikawaDiagram-FXEZZL3T-BHHyZio5.cjs} +1 -1
  82. package/dist/{ishikawaDiagram-FXEZZL3T-BoUotyUM.js → ishikawaDiagram-FXEZZL3T-Ri4htGjq.js} +1 -1
  83. package/dist/{journeyDiagram-5HDEW3XC-BLmjiJUX.js → journeyDiagram-5HDEW3XC-eox9s4AC.js} +4 -4
  84. package/dist/{journeyDiagram-5HDEW3XC-Bd31lpv3.cjs → journeyDiagram-5HDEW3XC-vDFWbeof.cjs} +1 -1
  85. package/dist/{kanban-definition-HUTT4EX6-CgyQpxuL.cjs → kanban-definition-HUTT4EX6-BtX3FvkI.cjs} +1 -1
  86. package/dist/{kanban-definition-HUTT4EX6-ySH6rz13.js → kanban-definition-HUTT4EX6-CLypcpY2.js} +2 -2
  87. package/dist/{linear-CgquB1f5.js → linear-BcczIOdB.js} +1 -1
  88. package/dist/{linear-DV03QvY3.cjs → linear-CrB7aFlL.cjs} +1 -1
  89. package/dist/{mindmap-definition-LN4V7U3C-DRivy1QE.js → mindmap-definition-LN4V7U3C-CbbLbrl0.js} +3 -3
  90. package/dist/{mindmap-definition-LN4V7U3C-aDCMEoit.cjs → mindmap-definition-LN4V7U3C-Dd50oNb-.cjs} +1 -1
  91. package/dist/{pegDiagram-2B236MQR-CQjS0QqO.js → pegDiagram-2B236MQR-DAkr6gze.js} +3 -3
  92. package/dist/{pegDiagram-2B236MQR-87adEUpC.cjs → pegDiagram-2B236MQR-bKX-ZKzC.cjs} +1 -1
  93. package/dist/{pieDiagram-ENE6RG2P-DuyGtiSe.cjs → pieDiagram-ENE6RG2P-B8cH83xn.cjs} +1 -1
  94. package/dist/{pieDiagram-ENE6RG2P-86BHVYSs.js → pieDiagram-ENE6RG2P-gyx5Dpbp.js} +3 -3
  95. package/dist/{quadrantDiagram-ABIIQ3AL-DW5PL3vH.cjs → quadrantDiagram-ABIIQ3AL-CiAJgRDO.cjs} +1 -1
  96. package/dist/{quadrantDiagram-ABIIQ3AL-DE-2T9tr.js → quadrantDiagram-ABIIQ3AL-xZILczPe.js} +2 -2
  97. package/dist/{railroadDiagram-RFXS5EU6-CNK83OVV.cjs → railroadDiagram-RFXS5EU6-CTXxxWxY.cjs} +1 -1
  98. package/dist/{railroadDiagram-RFXS5EU6-ByWgV3yx.js → railroadDiagram-RFXS5EU6-Dv0X8h3P.js} +3 -3
  99. package/dist/{requirementDiagram-TGXJPOKE-C_HDFyTl.js → requirementDiagram-TGXJPOKE-B_ePOT-U.js} +3 -3
  100. package/dist/{requirementDiagram-TGXJPOKE-Ogodc8r_.cjs → requirementDiagram-TGXJPOKE-g7KqDG7e.cjs} +1 -1
  101. package/dist/{sankeyDiagram-HTMAVEWB-CrAWgbcA.js → sankeyDiagram-HTMAVEWB-CzroMhU1.js} +1 -1
  102. package/dist/{sankeyDiagram-HTMAVEWB-B5tOdHX0.cjs → sankeyDiagram-HTMAVEWB-l3cb6KfU.cjs} +1 -1
  103. package/dist/{sequenceDiagram-DBY2YBRQ-Cbm9ZkF1.js → sequenceDiagram-DBY2YBRQ-BphR_qZU.js} +3 -3
  104. package/dist/{sequenceDiagram-DBY2YBRQ-B8iic05R.cjs → sequenceDiagram-DBY2YBRQ-DWs2Fd9c.cjs} +1 -1
  105. package/dist/{sizeCapture-X5ZJPWSS-BuMEpXfl.cjs → sizeCapture-X5ZJPWSS-DOIhGAPK.cjs} +1 -1
  106. package/dist/{sizeCapture-X5ZJPWSS-C16tTVRV.js → sizeCapture-X5ZJPWSS-fWMcl2N0.js} +1 -1
  107. package/dist/{stateDiagram-2N3HPSRC-D1YCPRk6.cjs → stateDiagram-2N3HPSRC--O7IzZV9.cjs} +1 -1
  108. package/dist/{stateDiagram-2N3HPSRC-DlGJFj8u.js → stateDiagram-2N3HPSRC-DpTZo3qN.js} +2 -2
  109. package/dist/{stateDiagram-v2-6OUMAXLB-CpFS_9hZ.js → stateDiagram-v2-6OUMAXLB-D3FbMT4L.js} +2 -2
  110. package/dist/{stateDiagram-v2-6OUMAXLB-C6NhqahV.cjs → stateDiagram-v2-6OUMAXLB-Dl74nBF-.cjs} +1 -1
  111. package/dist/styles/markdown.css +1 -1
  112. package/dist/styles/markdown.standalone.css +1 -1
  113. package/dist/{swimlanes-5IMT3BWC-B4NiSeAu.cjs → swimlanes-5IMT3BWC-BE0YGRlD.cjs} +1 -1
  114. package/dist/{swimlanes-5IMT3BWC-XX42VhKt.js → swimlanes-5IMT3BWC-DqPY7MRn.js} +3 -3
  115. package/dist/{swimlanesDiagram-G3AALYLV-CTB5wS8F.cjs → swimlanesDiagram-G3AALYLV-0_f27kfN.cjs} +1 -1
  116. package/dist/{swimlanesDiagram-G3AALYLV-BKETQ8kd.js → swimlanesDiagram-G3AALYLV-CodPdl1l.js} +2 -2
  117. package/dist/{timeline-definition-FHXFAJF6-BXjVhVTi.cjs → timeline-definition-FHXFAJF6-CmIelfpi.cjs} +1 -1
  118. package/dist/{timeline-definition-FHXFAJF6-D4JsJNMN.js → timeline-definition-FHXFAJF6-VtuF5hlf.js} +2 -2
  119. package/dist/{vennDiagram-L72KCM5P-CeQPM7cS.js → vennDiagram-L72KCM5P-3CHStnNA.js} +1 -1
  120. package/dist/{vennDiagram-L72KCM5P-BXqC5uwk.cjs → vennDiagram-L72KCM5P-Bidxbv2H.cjs} +1 -1
  121. package/dist/{wardleyDiagram-EHGQE667-BTVb-Zre.cjs → wardleyDiagram-EHGQE667-DbHvzT5N.cjs} +1 -1
  122. package/dist/{wardleyDiagram-EHGQE667-DCnCWYaP.js → wardleyDiagram-EHGQE667-DraTv4lo.js} +2 -2
  123. package/dist/{xychartDiagram-FW5EYKEG-B483pmnn.js → xychartDiagram-FW5EYKEG-7kwsQWao.js} +2 -2
  124. package/dist/{xychartDiagram-FW5EYKEG-IHIgLsPb.cjs → xychartDiagram-FW5EYKEG-CbRKMtne.cjs} +1 -1
  125. package/package.json +9 -9
  126. package/dist/code-blocks-Bax5Xik7.cjs +0 -4
  127. package/dist/flowDiagram-23GEKE2U-B2vsHW9j.js +0 -7
  128. package/dist/flowDiagram-23GEKE2U-D3Y9K6RM.cjs +0 -1
package/README.md CHANGED
@@ -599,7 +599,7 @@ A fenced code block in the `spreadsheets` language renders as `SpreadsheetBlock`
599
599
  `@aiquants/spreadsheet`, and the info string after the language holds its options (the converter writes them as
600
600
  `data-code-meta`, see [Settings without React](#settings-without-react)).
601
601
 
602
- <!-- markdownlint-disable MD010 -- the example's cells are separated by real tabs (TSV) -->
602
+ <!-- markdownlint-disable MD010 -- the examples' cells are separated by real tabs (TSV) -->
603
603
  ````markdown
604
604
  ```spreadsheets header=1 footer=1 freeze=1 height=12
605
605
  Item Q1 Q2
@@ -608,6 +608,17 @@ Pears 80 95
608
608
  Total 200 235
609
609
  ```
610
610
  ````
611
+
612
+ A table drawn as on its original print — no toolbar, no column letters or row numbers, the columns fitted to their text,
613
+ at 71 % and every row shown, with the page scrolling past it:
614
+
615
+ ````markdown
616
+ ```spreadsheets header=1 footer=1 toolbar=0 headings=0 autofit=1 zoom=71 height=1000
617
+ Region Demand Note
618
+ Kanto 17,600 MT The largest market, served from three ports
619
+ Total 17,600 MT
620
+ ```
621
+ ````
611
622
  <!-- markdownlint-enable MD010 -->
612
623
 
613
624
  | Option | Value | Default | Effect |
@@ -615,11 +626,16 @@ Total 200 235
615
626
  | `header=N` | 0–128 | 0 | The first N rows are the table's column headers: frozen at the top, their cells `role="columnheader"`, drawn bold on the header-row surface (`--aqsp-header-row-*`, 7:1 for the text) |
616
627
  | `footer=N` | 0–128 | 0 | The last N rows are frozen at the bottom (totals) |
617
628
  | `freeze=N` | 0–128 | 0 | The first N columns are frozen at the start |
618
- | `height=N` | 1–100 | the rows, at most 15 | The rows the block's box shows; a larger value than the rows the grid shows (an editable table's spare row included) shows those rows |
629
+ | `height=N` | 1–1000 | the rows, at most 15 | The rows the block's box shows; a value that reaches the rows the grid shows (an editable table's spare row included) makes a box that shows every row (see the box below) |
630
+ | `zoom=N` | 25, 30, 35, 42, 50, 59, 71, 84, 100, 119, 141, 168, 200, 238, 283, 336, 400 | 100 | The zoom in percent the grid starts at: one of the grid's zoom steps as the toolbar shows them (`SPREADSHEET_ZOOM_STEP_PERCENTS`), since zooming in and out moves one step from where it is. The toolbar's percent and Ctrl+Alt+`0` still return to 100 % |
631
+ | `toolbar=N` | 0, 1 | 1 | 0 leaves out the toolbar and the table's size; the grid's own keys stay (Ctrl+C, Ctrl+Alt+`=` / `-` / `0`, Alt+wheel, Alt+Shift+Arrow and Alt+Shift+`=`), while full screen, saving and the size buttons go with it |
632
+ | `headings=N` | 0, 1 | 1 | 0 leaves out the column letters, the row numbers and their corner, in the grid and in the plain table (Excel's "headings"; `header=` is the table's own header rows) |
633
+ | `autofit=N` | 0, 1 | 0 | 1 fits every column to the widest text of all its rows (header rows in bold) when the grid loads, when the table or the options change, and when a web font of the cells' families finishes loading; a column without text keeps its width |
619
634
 
620
635
  - **Options are strict**: words are `key=value` separated by white space, each key at most once, each value a decimal integer
621
- without a sign or leading zeros. An unknown key, a repeated key, a malformed word or a value out of range shows an error in
622
- place of the table (`role="alert"`, naming the word and the ranges) and the rest of the document renders. Counts larger
636
+ without a sign or leading zeros. An unknown key, a repeated key, a malformed word, a value out of range or a `zoom` that is
637
+ not one of the steps shows an error in place of the table (`role="alert"`, naming the word, the ranges and the zoom steps)
638
+ and the rest of the document renders. Counts larger
623
639
  than the table follow the spreadsheet's own rules (everything frozen), so an edit that shrinks the table never turns it into
624
640
  an error.
625
641
  - **Size budget**: a body with more cells (rows times its widest row, counted with `measureTsv` without building the table)
@@ -627,9 +643,17 @@ Total 200 235
627
643
  (`role="alert"`, `data-aqmd-spreadsheet-error="size"`, the `tooLarge` label with the cells and the most) instead of a
628
644
  table the grid would refuse to operate on; its text stays in the document, and the grid is not loaded for it.
629
645
  - **The box** (`layout="inline"`, the default in a document): the block reserves the grid's height before the grid loads —
630
- the column-header band and the visible rows, both 24 px and scaled by the zoom, and the horizontal scroll bar
631
- (`@aiquants/spreadsheet/view`'s constants) — capped at the viewport's height less two 44 px bands, so the page can always
632
- be scrolled past it. `layout="fill"` lets a host that shows one table in a pane of its own (a file preview) give the
646
+ the column-letter band (when the headings show), the visible rows and the horizontal scroll bar, all scaled by the zoom
647
+ (the grid keeps its scroll bars inside its zoom, so they scale too; `@aiquants/spreadsheet/view`'s constants) — capped at
648
+ the viewport's height less two 44 px bands, so the page can always be scrolled past it. A box whose `height` reaches the
649
+ rows the grid shows shows every row instead (`data-aqmd-spreadsheet-whole` on the block): it takes their height, rounded
650
+ up plus 1 px (the grid's reported content height once it has loaded, so rows a reader makes taller still fit), with no
651
+ cap. Its rows never scroll, so the wheel and a finger's vertical swipe over the table reach the page, a keyboard move
652
+ scrolls the page to the active cell, and PageUp / PageDown move by the part of the table the window shows (the grid's
653
+ 0.17.1); the 1 px keeps a fractional zoom's rounding from making the rows scrollable, which would let the grid take the
654
+ finger. The box is never wider than the table: once the grid has loaded, its width is the
655
+ grid's content width (`onContentSizeChange`, rounded up plus 1 px), at most the column's, and a wider table scrolls inside
656
+ it. The block and its toolbar keep the column's width, so zooming or resizing a column never moves a toolbar control. `layout="fill"` lets a host that shows one table in a pane of its own (a file preview) give the
633
657
  block the pane's height: the toolbar and the notice keep their own height and the box takes the rest, but never less
634
658
  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
635
659
  the block grows past the pane, so a host that scrolls its pane reaches the whole table instead of a squeezed box.
@@ -638,8 +662,12 @@ Total 200 235
638
662
  the grid at once) and a reader without JavaScript still sees the data: the column letters (A to Z, more than the box shows
639
663
  at the default 100 px width) above the 64 px band of row numbers (both `aria-hidden`), 24 px rows, the header rows in
640
664
  `<thead>` as `th scope="col"`, and the footer rows at the bottom when the table holds more rows than the box shows, painted
641
- from the same `--aqsp-*` variables as the grid. A failed load keeps the plain table and shows the error with a retry
642
- button.
665
+ from the same `--aqsp-*` variables as the grid. It follows the options as the grid will: the block's zoom (CSS `zoom`, so
666
+ the box keeps the grid's height), no letters or numbers with `headings=0`, every row in a box that shows them all, and with
667
+ `autofit=1` each column at the width of its widest text plus the grid's 9 px (a column without text in the rows drawn keeps
668
+ 100 px; the plain table measures only the rows it draws, so a column may shift a little when the grid, which measures
669
+ every row, replaces it). Before the grid loads the box takes the column's width, with the plain table at its start. A
670
+ failed load keeps the plain table and shows the error with a retry button.
643
671
  - **Reading**: a read-only table (the default) is the grid's `readOnly` — every cell refuses edits and is announced as
644
672
  read-only — while selection, Ctrl+C (the grid's own copy: TSV in Excel's clipboard form and the interop HTML table),
645
673
  scrolling, the zoom, Excel's Ctrl+Arrow data edges, column and row sizes, the active row and column bands (on by default),
@@ -649,7 +677,7 @@ Total 200 235
649
677
  along the grid's geometric ladder, `SPREADSHEET_ZOOM_STEPS`: 2^(k/4) for k from −8 to 8, 25 % to 400 %, four steps to
650
678
  double. A column's width and a row's height change by dragging a header's 6 px edge (a double-click fits the column),
651
679
  by Alt+Shift+Arrow and Alt+Shift+`=` (fit), or by the toolbar's size controls.
652
- - **Toolbar** (44 × 44 px controls in a wrapping row above the box, the Mermaid toolbar's look; one tab stop whose controls
680
+ - **Toolbar** (`toolbar=0` leaves it out; 44 × 44 px controls in a wrapping row above the box, the Mermaid toolbar's look; one tab stop whose controls
653
681
  the arrow keys, Home and End walk, the APG toolbar): the table's size at the row's start, and at its end zoom in, zoom
654
682
  out, the zoom in percent, which returns it to 100 % (the control is as wide as the widest percent, 400 %, so the row never
655
683
  shifts as the zoom changes), the bands toggle (`aria-pressed`), the size controls, copy the whole table, save as TSV (no
@@ -731,12 +759,26 @@ Total 200 235
731
759
  `data-aqmd-spreadsheet-fullscreen` (a host gives the double-click and the keys inside an editable or full-screen table to
732
760
  the grid).
733
761
  - **Known limits**: formulas are not calculated (a cell starting with `=` shows as written); a tap does not start editing (the
734
- spreadsheet's rule); a finger swipe that starts over a scrollable table does not scroll the page; Tab moves inside the grid
735
- and Escape leaves it; column widths, row heights and the zoom are not saved (a reload resets all three; the grid also
736
- resets the widths when the column count changes and the heights when the row count changes, an edit that adds or removes a
737
- column or a row included); printing shows the visible part of the grid only; the toolbar's copy uses the asynchronous
738
- clipboard, which browsers grant only to a secure page (https or localhost) and with their permission (Ctrl+C in the grid
739
- works anywhere).
762
+ spreadsheet's rule); a finger swipe that starts over a table whose rows scroll does not scroll the page (a box that shows
763
+ every row never scrolls its rows, so a swipe over it does); Tab moves inside the grid and Escape leaves it; column widths,
764
+ row heights and the zoom are not saved (a reload resets all three; the grid also resets the widths when the column count
765
+ changes and the heights when the row count changes, an edit that adds or removes a column or a row included); with
766
+ `autofit=1` a reader's resize lasts until the table or the options change or a web font of the cells' families
767
+ finishes loading (a font only other parts of the page use leaves it), and the fit is skipped (the default widths
768
+ stay) when the cells it measures — an editable table's spare row and column included — pass the grid's operation budget;
769
+ printing shows the visible part of the grid only; the toolbar's copy uses the asynchronous clipboard, which browsers grant
770
+ only to a secure page (https or localhost) and with their permission (Ctrl+C in the grid works anywhere).
771
+ - **What the display options trade**: `zoom` below 100 shrinks the text (WCAG 1.4.4): a reader zooms back with the toolbar or
772
+ the grid's keys, but with `toolbar=0` a reader with only a pointer has the page's own zoom left. `toolbar=0` also leaves
773
+ out the bands toggle, the size controls, copying the whole table, the saves and full screen; the grid's keys still copy
774
+ a selection (Ctrl+C), size the active column or row (Alt+Shift+Arrow, Alt+Shift+`=`) and zoom (Ctrl+Alt+`=` / `-`).
775
+ `headings=0` removes the header edges a pointer drags, so a column's or a row's size changes by Alt+Shift+Arrow or, with
776
+ the toolbar, by its size buttons (WCAG 2.5.7). The cells, their roles and the header rows read the same with or without
777
+ the headings, which are presentation only. Below 100 % a cell is less than 24 CSS px tall, and `autofit=1` makes a
778
+ column of short text narrower than 24 px, so such cells fall under WCAG 2.5.8's minimum target size for a pointer (the
779
+ keyboard reaches every cell); the active cell's frame stays at least 3 CSS px at every zoom. A box that shows every row
780
+ has no height cap, so a table wider than the column keeps its horizontal scroll bar at the table's bottom: a reader
781
+ scrolls the page down to it, or scrolls sideways over the table (Shift+wheel) or by the keys.
740
782
 
741
783
  ### Viewer toolbar
742
784
 
@@ -911,7 +953,7 @@ placeholder without a value stays as written, so a misspelt one shows rather tha
911
953
  | `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}、読み取り専用 / 空白 |
912
954
  | `selectionAnnouncement` | A selection's announcement (`{range}` as `A1` or `A1:C3`) | {range} selected | {range} を選択 |
913
955
  | `readOnly`, `formatRefused`, `fenceRefused`, `editConflict`, `unwritable` | The notices of a refused edit | Why the edit was not saved, one text per reason | 同じ |
914
- | `optionsError` | The error of an option that cannot be read (`{word}`, `{frozenMax}`, `{heightMax}`) | The table option “{word}” cannot be read. … | 表の指定「{word}」を読めません。… |
956
+ | `optionsError` | The error of an option that cannot be read (`{word}`, `{frozenMax}`, `{heightMax}`, `{zoomSteps}`) | The table option “{word}” cannot be read. … | 表の指定「{word}」を読めません。… |
915
957
  | `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} 個を超えます。表の文字は文書の中にあります。 |
916
958
  | `loadFailed`, `retry` | The error of a failed load and its retry button | Could not load the spreadsheet. Check the connection and retry. / Retry | 表を読み込めませんでした。接続を確かめて再試行してください。 / 再試行 |
917
959
 
@@ -937,8 +979,10 @@ The viewer's `blockFailed` (the renderer's `blockFailedLabel`; built in: "This b
937
979
  (`data-code-meta`, the attribute the converter writes on a fenced block's `code` for the info string after the language,
938
980
  read as text only), `SPREADSHEETS_LANGUAGE`, `parseSpreadsheetOptions` (the one reader of a table's options; an invalid
939
981
  word throws `SpreadsheetOptionsError`, a `RangeError` whose `word` names it), `SPREADSHEET_OPTION_RULES` (each option's
940
- field, range and value when absent) and the limits `DEFAULT_SPREADSHEET_VISIBLE_ROWS` (15), `MAX_SPREADSHEET_VISIBLE_ROWS`
941
- (100) and `MAX_SPREADSHEET_FROZEN_TRACKS` (128). A host's own sanitizer keeps `data-code-meta` on `code` with this name.
982
+ field, range, the only values it takes inside the range — `steps`, `null` for any — and value when absent),
983
+ `SPREADSHEET_ZOOM_STEP_PERCENTS` (the percents `zoom=` takes: the grid's zoom steps as the toolbar shows them) and the
984
+ limits `DEFAULT_SPREADSHEET_VISIBLE_ROWS` (15), `MAX_SPREADSHEET_VISIBLE_ROWS` (1000) and `MAX_SPREADSHEET_FROZEN_TRACKS`
985
+ (128). A host's own sanitizer keeps `data-code-meta` on `code` with this name.
942
986
  It also holds the table block's label catalogs (`SPREADSHEET_BLOCK_LABEL_CATALOGS`) and the placeholders each label's
943
987
  text takes (`SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS`), so a host can derive its own label keys and texts from them.
944
988
 
@@ -1,6 +1,6 @@
1
- import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-BQVuH2Cr.js";
2
- import { p as f } from "./chunk-JWPE2WC7-DSejuCSZ.js";
3
- import { _ as n, U as o } from "./extractHeadings-DsF6Ytus.js";
1
+ import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-DzmVBP7r.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-BFvr7fTK.js";
3
+ import { _ as n, U as o } from "./extractHeadings-BnnTGmkL.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-_xGQHEPZ.cjs"),u=require("./chunk-JWPE2WC7-CGTSmMeV.cjs"),n=require("./extractHeadings-C2UT0oKs.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./chunk-MOJQB5TN-4jP7ibIw.cjs"),u=require("./chunk-JWPE2WC7-Be4OZhVq.cjs"),n=require("./extractHeadings-DO9TMcyl.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 { 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-DsF6Ytus.js";
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-BnnTGmkL.js";
2
2
  function cn(l) {
3
3
  return l.innerRadius;
4
4
  }
@@ -1 +1 @@
1
- "use strict";const n=require("./extractHeadings-C2UT0oKs.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;
1
+ "use strict";const n=require("./extractHeadings-DO9TMcyl.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;