@aiquants/markdown 6.0.0 → 6.2.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.
Files changed (150) hide show
  1. package/README.md +142 -7
  2. package/dist/{abnfDiagram-VRR7QNED-D7Rp9EaV.js → abnfDiagram-VRR7QNED-Csrzuwyl.js} +3 -3
  3. package/dist/{abnfDiagram-VRR7QNED-KTGT9TWM.cjs → abnfDiagram-VRR7QNED-DX6eyf4O.cjs} +1 -1
  4. package/dist/arc-Gw7Urszo.js +83 -0
  5. package/dist/{arc-D5T_urCC.cjs → arc-ZAQ3z7kr.cjs} +1 -1
  6. package/dist/{architectureDiagram-ZJ3FMSHR-DLrGYTYy.js → architectureDiagram-ZJ3FMSHR-Coy6_Fcg.js} +2 -2
  7. package/dist/{architectureDiagram-ZJ3FMSHR-BOo3y9aD.cjs → architectureDiagram-ZJ3FMSHR-DxzMbkp1.cjs} +1 -1
  8. package/dist/{blockDiagram-677ZJIJ3-B60l5Fpl.js → blockDiagram-677ZJIJ3-CbR-wn2x.js} +3 -3
  9. package/dist/{blockDiagram-677ZJIJ3-DnjCjo0a.cjs → blockDiagram-677ZJIJ3-THmR4OyE.cjs} +1 -1
  10. package/dist/{c4Diagram-LMCZKHZV-bd8fWQ1F.cjs → c4Diagram-LMCZKHZV-BcJpuXK1.cjs} +1 -1
  11. package/dist/{c4Diagram-LMCZKHZV-BmbplKCu.js → c4Diagram-LMCZKHZV-DHMqNO9p.js} +2 -2
  12. package/dist/{channel-B3oXm84X.js → channel-CfC4eqki.js} +1 -1
  13. package/dist/{channel-DJ_PyD9w.cjs → channel-Cryph4zI.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-C0hbxO3D.js → chunk-2Q5K7J3B-C3BIc3MH.js} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-CWLCO342.cjs → chunk-2Q5K7J3B-CxWyY331.cjs} +1 -1
  16. package/dist/{chunk-32BRIVSS-DUWtkDEY.js → chunk-32BRIVSS-C37ccuiX.js} +1 -1
  17. package/dist/{chunk-32BRIVSS-Cb9nTxqN.cjs → chunk-32BRIVSS-C3w_aYfI.cjs} +1 -1
  18. package/dist/{chunk-5VM5RSS4-DHA5n_Ls.cjs → chunk-5VM5RSS4-Cbt79-V5.cjs} +1 -1
  19. package/dist/{chunk-5VM5RSS4-C3mSh-gE.js → chunk-5VM5RSS4-DVLmkcyq.js} +1 -1
  20. package/dist/{chunk-EX3LRPZG-ByY6_kep.cjs → chunk-EX3LRPZG-BZOxrSRn.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-DCF1zjtT.js → chunk-EX3LRPZG-Co0Bql0-.js} +37 -37
  22. package/dist/{chunk-JWPE2WC7-CUBzYD4G.cjs → chunk-JWPE2WC7-Cvt_ToFU.cjs} +1 -1
  23. package/dist/{chunk-JWPE2WC7-CPLOunIL.js → chunk-JWPE2WC7-DUndc3Wb.js} +1 -1
  24. package/dist/{chunk-MOJQB5TN-P8-yb3-j.cjs → chunk-MOJQB5TN-AAMW2q8N.cjs} +1 -1
  25. package/dist/{chunk-MOJQB5TN-CmOhW6SK.js → chunk-MOJQB5TN-aTSDPliR.js} +11 -11
  26. package/dist/{chunk-PUDLZKDR-pKdIELvz.cjs → chunk-PUDLZKDR-CzCdcyAN.cjs} +1 -1
  27. package/dist/{chunk-PUDLZKDR-DH7B7ZTK.js → chunk-PUDLZKDR-Q5QzbDtY.js} +11 -11
  28. package/dist/{chunk-RYQCIY6F-DcvQCEoc.cjs → chunk-RYQCIY6F-DbjhsOnH.cjs} +1 -1
  29. package/dist/{chunk-RYQCIY6F-C7ytn_QX.js → chunk-RYQCIY6F-O6wbIIFF.js} +10 -10
  30. package/dist/{chunk-V7JOEXUC-CtXgqODy.cjs → chunk-V7JOEXUC-B6Qc5ABc.cjs} +1 -1
  31. package/dist/{chunk-V7JOEXUC-BgLcssUF.js → chunk-V7JOEXUC-OTS1fN7j.js} +10 -10
  32. package/dist/{chunk-VR4S4FIN-BK6xeIQk.js → chunk-VR4S4FIN-D4tY80kq.js} +1 -1
  33. package/dist/{chunk-VR4S4FIN-Cc4GDi2Z.cjs → chunk-VR4S4FIN-DlneMFEg.cjs} +1 -1
  34. package/dist/{chunk-XXDRQBXY-COtZ25Ez.js → chunk-XXDRQBXY-58rTAwvh.js} +1 -1
  35. package/dist/{chunk-XXDRQBXY-D1OixGzR.cjs → chunk-XXDRQBXY-CvhBfnFQ.cjs} +1 -1
  36. package/dist/{classDiagram-OUVF2IWQ-DDLmqaG6.cjs → classDiagram-OUVF2IWQ-C0S2HAJU.cjs} +1 -1
  37. package/dist/{classDiagram-v2-EOCWNBFH-Jc-IwOm0.js → classDiagram-OUVF2IWQ-hcuKRiyp.js} +2 -2
  38. package/dist/{classDiagram-v2-EOCWNBFH-DDLmqaG6.cjs → classDiagram-v2-EOCWNBFH-C0S2HAJU.cjs} +1 -1
  39. package/dist/{classDiagram-OUVF2IWQ-Jc-IwOm0.js → classDiagram-v2-EOCWNBFH-hcuKRiyp.js} +2 -2
  40. package/dist/components/HostedScrollArea.d.ts +15 -0
  41. package/dist/components/MarkdownViewer.d.ts +3 -1
  42. package/dist/components/embeds/LinkCard.d.ts +14 -3
  43. package/dist/components/mermaidInteraction.d.ts +1 -0
  44. package/dist/{cose-bilkent-JH36ORCC-DaucPocG.js → cose-bilkent-JH36ORCC-BwltbHKG.js} +5 -5
  45. package/dist/{cose-bilkent-JH36ORCC-OwiXHdQY.cjs → cose-bilkent-JH36ORCC-DVZVn03H.cjs} +1 -1
  46. package/dist/{cynefinDiagram-TSTJHNR4-Ag-HcuUm.cjs → cynefinDiagram-TSTJHNR4-DYCBxaEi.cjs} +1 -1
  47. package/dist/{cynefinDiagram-TSTJHNR4-Dkmz7gDw.js → cynefinDiagram-TSTJHNR4-ogTeIoNY.js} +28 -28
  48. package/dist/{dagre-VKFMJZFB-BHGdcjt3.js → dagre-VKFMJZFB-BfNdgMHQ.js} +9 -9
  49. package/dist/{dagre-VKFMJZFB-Q4CcAQ09.cjs → dagre-VKFMJZFB-DJW9o9XX.cjs} +1 -1
  50. package/dist/{diagram-FQU43EPY-jWCrN_AW.cjs → diagram-FQU43EPY-BRpNVpgn.cjs} +1 -1
  51. package/dist/{diagram-FQU43EPY-DBASKnKu.js → diagram-FQU43EPY-CJf3yD8h.js} +25 -25
  52. package/dist/{diagram-G47NLZAW-B4XMStX7.cjs → diagram-G47NLZAW-5rZfUeWV.cjs} +1 -1
  53. package/dist/{diagram-G47NLZAW-BY1mmnYA.js → diagram-G47NLZAW-D0-6oupP.js} +25 -25
  54. package/dist/{diagram-NH7WQ7WH-BXFvYRtm.js → diagram-NH7WQ7WH-BwrWWWZJ.js} +19 -19
  55. package/dist/{diagram-NH7WQ7WH-BS1eEa9R.cjs → diagram-NH7WQ7WH-g7m8p5fK.cjs} +1 -1
  56. package/dist/{diagram-OA4YK3LP-DgGrzezu.js → diagram-OA4YK3LP-BBqA1m8s.js} +13 -13
  57. package/dist/{diagram-OA4YK3LP-CTaL_2Nc.cjs → diagram-OA4YK3LP-BxP8KUna.cjs} +1 -1
  58. package/dist/{diagram-WEI45ONY-BHxWKH3v.js → diagram-WEI45ONY-CMexm2GN.js} +35 -35
  59. package/dist/{diagram-WEI45ONY-DX7BGSMI.cjs → diagram-WEI45ONY-DgJyq1w0.cjs} +1 -1
  60. package/dist/{ebnfDiagram-CCIWWBDH-BUK_anpV.js → ebnfDiagram-CCIWWBDH-DvLr_8nV.js} +3 -3
  61. package/dist/{ebnfDiagram-CCIWWBDH-BpDmVVJY.cjs → ebnfDiagram-CCIWWBDH-sfiWOXCW.cjs} +1 -1
  62. package/dist/embeds/linkCards.d.ts +32 -0
  63. package/dist/embeds/testing.cjs +1 -1
  64. package/dist/embeds/testing.js +1 -1
  65. package/dist/embeds.cjs +1 -1
  66. package/dist/embeds.d.ts +1 -1
  67. package/dist/embeds.js +53 -74
  68. package/dist/{erDiagram-Q63AITRT-Cd9H9BtP.cjs → erDiagram-Q63AITRT-B11THykZ.cjs} +1 -1
  69. package/dist/{erDiagram-Q63AITRT-Qb2bmkNp.js → erDiagram-Q63AITRT-D6U6Ng3Y.js} +4 -4
  70. package/dist/{extractHeadings-B2pUyEPa.js → extractHeadings-CdLPwHlC.js} +4882 -4827
  71. package/dist/extractHeadings-DRUBnhbi.cjs +311 -0
  72. package/dist/flowDiagram-23GEKE2U-CDscoQ9F.cjs +1 -0
  73. package/dist/flowDiagram-23GEKE2U-CLibi_u4.js +7 -0
  74. package/dist/{ganttDiagram-NO4QXBWP-C6-ExcDz.cjs → ganttDiagram-NO4QXBWP-BLlXK3zo.cjs} +1 -1
  75. package/dist/{ganttDiagram-NO4QXBWP-BVISsrzr.js → ganttDiagram-NO4QXBWP-CGCdgj0K.js} +2 -2
  76. package/dist/{gitGraphDiagram-IHSO6WYX-DLzPc702.cjs → gitGraphDiagram-IHSO6WYX-BHOyibqH.cjs} +1 -1
  77. package/dist/{gitGraphDiagram-IHSO6WYX-BDVA2TFP.js → gitGraphDiagram-IHSO6WYX-Bib3c0C6.js} +3 -3
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.client.cjs +1 -1
  80. package/dist/index.client.d.ts +1 -0
  81. package/dist/index.client.js +33 -32
  82. package/dist/index.js +33 -32
  83. package/dist/index.server.cjs +1 -1
  84. package/dist/index.server.d.ts +1 -0
  85. package/dist/index.server.js +598 -151
  86. package/dist/{infoDiagram-FWYZ7A6U-D31UwqjR.js → infoDiagram-FWYZ7A6U-BUqDBIaP.js} +3 -3
  87. package/dist/{infoDiagram-FWYZ7A6U-DMF_wb2h.cjs → infoDiagram-FWYZ7A6U-BcDp6g1Y.cjs} +1 -1
  88. package/dist/{ishikawaDiagram-FXEZZL3T-DUlnwraq.cjs → ishikawaDiagram-FXEZZL3T-C3QHQ1ia.cjs} +1 -1
  89. package/dist/{ishikawaDiagram-FXEZZL3T-XA6-gyHY.js → ishikawaDiagram-FXEZZL3T-CcPh4nuP.js} +18 -18
  90. package/dist/{journeyDiagram-5HDEW3XC-CwQyFcYa.cjs → journeyDiagram-5HDEW3XC-B17v98Wb.cjs} +1 -1
  91. package/dist/{journeyDiagram-5HDEW3XC-B8sfsWpu.js → journeyDiagram-5HDEW3XC-MdxndgF1.js} +30 -30
  92. package/dist/{kanban-definition-HUTT4EX6-BjPlt2-E.cjs → kanban-definition-HUTT4EX6-BApVXeVQ.cjs} +1 -1
  93. package/dist/{kanban-definition-HUTT4EX6-FTrTBare.js → kanban-definition-HUTT4EX6-JhfZ6Qik.js} +120 -120
  94. package/dist/{linear-D3AJM3sY.cjs → linear-CIVwb13z.cjs} +1 -1
  95. package/dist/{linear-DI9P_z72.js → linear-dbOUbGpD.js} +8 -8
  96. package/dist/linkCardServer/addressGuard.server.d.ts +25 -0
  97. package/dist/linkCardServer/htmlEncoding.server.d.ts +6 -0
  98. package/dist/linkCardServer/linkCardHandler.server.d.ts +7 -0
  99. package/dist/linkCardServer/metadataCache.server.d.ts +5 -0
  100. package/dist/linkCardServer/pageFetch.server.d.ts +37 -0
  101. package/dist/linkCardServer/pageMetadata.server.d.ts +11 -0
  102. package/dist/linkCards-1JxY8wdm.js +48 -0
  103. package/dist/linkCards-Bjd_vW39.cjs +1 -0
  104. package/dist/markdown.css +1 -1
  105. package/dist/{mindmap-definition-LN4V7U3C-CxgWZidl.cjs → mindmap-definition-LN4V7U3C-BUbo0u-Y.cjs} +1 -1
  106. package/dist/{mindmap-definition-LN4V7U3C-YW4YcL9x.js → mindmap-definition-LN4V7U3C-gNTBga2z.js} +16 -16
  107. package/dist/{pegDiagram-2B236MQR-sJjLKeF3.js → pegDiagram-2B236MQR-BqjpbNkG.js} +3 -3
  108. package/dist/{pegDiagram-2B236MQR-CUo7q5bl.cjs → pegDiagram-2B236MQR-DZiQVxu1.cjs} +1 -1
  109. package/dist/{pieDiagram-ENE6RG2P-D4VanIOv.js → pieDiagram-ENE6RG2P-C1Gr48CK.js} +60 -60
  110. package/dist/{pieDiagram-ENE6RG2P-Cy_sUuLQ.cjs → pieDiagram-ENE6RG2P-D2nxDVFV.cjs} +1 -1
  111. package/dist/providers-BO7J62-7.cjs +1 -0
  112. package/dist/{providers-Drq7MT_K.js → providers-L5RM3KgR.js} +23 -23
  113. package/dist/{quadrantDiagram-ABIIQ3AL-D3c8xLpt.cjs → quadrantDiagram-ABIIQ3AL-C855tL3K.cjs} +1 -1
  114. package/dist/{quadrantDiagram-ABIIQ3AL-ubxphjb_.js → quadrantDiagram-ABIIQ3AL-DuD9ZdUQ.js} +18 -18
  115. package/dist/{railroadDiagram-RFXS5EU6-_Q4W5hB-.cjs → railroadDiagram-RFXS5EU6-BZsnhaQd.cjs} +1 -1
  116. package/dist/{railroadDiagram-RFXS5EU6-DvpD4C_A.js → railroadDiagram-RFXS5EU6-xx1d3Md8.js} +3 -3
  117. package/dist/{requirementDiagram-TGXJPOKE-Dk_6BuX9.js → requirementDiagram-TGXJPOKE-CCu1UYFH.js} +3 -3
  118. package/dist/{requirementDiagram-TGXJPOKE-DdYIO-wU.cjs → requirementDiagram-TGXJPOKE-D_NbFRkb.cjs} +1 -1
  119. package/dist/{sankeyDiagram-HTMAVEWB-zuYg6LTg.cjs → sankeyDiagram-HTMAVEWB-Dn2Ta-XX.cjs} +1 -1
  120. package/dist/{sankeyDiagram-HTMAVEWB-s3Kd7T8n.js → sankeyDiagram-HTMAVEWB-QGzXzczJ.js} +1 -1
  121. package/dist/{sequenceDiagram-DBY2YBRQ-BvNPCevg.cjs → sequenceDiagram-DBY2YBRQ-BA3Oc4pz.cjs} +1 -1
  122. package/dist/{sequenceDiagram-DBY2YBRQ-YQic4wxL.js → sequenceDiagram-DBY2YBRQ-CjnUnaw9.js} +3 -3
  123. package/dist/simple-logger-9yf7ypyB.cjs +1 -0
  124. package/dist/simple-logger-DwH1YQvq.js +103 -0
  125. package/dist/{sizeCapture-X5ZJPWSS-BqrdzzsI.cjs → sizeCapture-X5ZJPWSS-BPQhVBe0.cjs} +1 -1
  126. package/dist/{sizeCapture-X5ZJPWSS-qMsWGfjy.js → sizeCapture-X5ZJPWSS-nb9uU-BE.js} +1 -1
  127. package/dist/{stateDiagram-2N3HPSRC-D1Ub8LYq.js → stateDiagram-2N3HPSRC-Byg3E1AA.js} +11 -11
  128. package/dist/{stateDiagram-2N3HPSRC-Ds8f-scd.cjs → stateDiagram-2N3HPSRC-DSqLqSY5.cjs} +1 -1
  129. package/dist/{stateDiagram-v2-6OUMAXLB-PmrsPXuZ.cjs → stateDiagram-v2-6OUMAXLB-VRhXyf-C.cjs} +1 -1
  130. package/dist/{stateDiagram-v2-6OUMAXLB-DW8wjtk3.js → stateDiagram-v2-6OUMAXLB-hKcuYy9t.js} +2 -2
  131. package/dist/styles/markdown.css +1 -1
  132. package/dist/{swimlanes-5IMT3BWC-jZhcesRT.cjs → swimlanes-5IMT3BWC-CVnOKNcb.cjs} +1 -1
  133. package/dist/{swimlanes-5IMT3BWC-C8P8vU0w.js → swimlanes-5IMT3BWC-DyIDdThc.js} +3 -3
  134. package/dist/{swimlanesDiagram-G3AALYLV-B9FKeJRf.js → swimlanesDiagram-G3AALYLV-BF1ofRjP.js} +2 -2
  135. package/dist/{swimlanesDiagram-G3AALYLV-M5Cg2MHU.cjs → swimlanesDiagram-G3AALYLV-C3U5wLlX.cjs} +1 -1
  136. package/dist/{timeline-definition-FHXFAJF6-Ch-He--D.js → timeline-definition-FHXFAJF6-DBmE_qU3.js} +38 -38
  137. package/dist/{timeline-definition-FHXFAJF6-DZm1-KlQ.cjs → timeline-definition-FHXFAJF6-KUETCXLT.cjs} +1 -1
  138. package/dist/utils/simple-logger.d.ts +1 -0
  139. package/dist/{vennDiagram-L72KCM5P-CaoPscCM.js → vennDiagram-L72KCM5P-C6j4k5X-.js} +102 -102
  140. package/dist/{vennDiagram-L72KCM5P-mUSI238J.cjs → vennDiagram-L72KCM5P-DkSV3dIE.cjs} +1 -1
  141. package/dist/{wardleyDiagram-EHGQE667-CSAqF366.js → wardleyDiagram-EHGQE667-BaG6Cf_u.js} +18 -18
  142. package/dist/{wardleyDiagram-EHGQE667-CkKP97H-.cjs → wardleyDiagram-EHGQE667-uWMTMxL-.cjs} +1 -1
  143. package/dist/{xychartDiagram-FW5EYKEG-OEsTD_k4.js → xychartDiagram-FW5EYKEG-BPl5BnMB.js} +27 -27
  144. package/dist/{xychartDiagram-FW5EYKEG-BivGpkVk.cjs → xychartDiagram-FW5EYKEG-QAFE-xqg.cjs} +1 -1
  145. package/package.json +12 -8
  146. package/dist/arc-DzZml7Bc.js +0 -83
  147. package/dist/extractHeadings-DgefF9l1.cjs +0 -311
  148. package/dist/flowDiagram-23GEKE2U-BOmNlv7X.cjs +0 -1
  149. package/dist/flowDiagram-23GEKE2U-DMZnRz-6.js +0 -7
  150. package/dist/providers-Bxr2Wb-j.cjs +0 -1
package/README.md CHANGED
@@ -204,12 +204,12 @@ Every renderer of the package — `MarkdownRenderer` (and so `MarkdownViewer`) f
204
204
 
205
205
  ### Embeds
206
206
 
207
- Embeds are opt in. `MarkdownRenderer` and `MarkdownViewer` take `embeds={{ providers, linkCardEndpoint }}` (type `MarkdownEmbeds` from `@aiquants/markdown/embeds`); the default `NO_EMBEDS` renders every link alone in a paragraph as that paragraph. Pass the value from a module constant (the viewer also compares it by value). An unknown provider id or a bad endpoint throws a `RangeError` at render.
207
+ Embeds are opt in. `MarkdownRenderer` and `MarkdownViewer` take `embeds={{ providers, linkCardEndpoint, linkCardSize }}` (type `MarkdownEmbeds` from `@aiquants/markdown/embeds`; `linkCardSize` is optional); the default `NO_EMBEDS` renders every link alone in a paragraph as that paragraph. Pass the value from a module constant (the viewer also compares it by value). An unknown provider id, a bad endpoint or an unknown card size throws a `RangeError` at render.
208
208
 
209
209
  ```tsx
210
210
  import type { MarkdownEmbeds } from "@aiquants/markdown/embeds"
211
211
 
212
- const EMBEDS: MarkdownEmbeds = { providers: ["youtube", "x", "instagram", "bluesky"], linkCardEndpoint: "/api/site_metadata" }
212
+ const EMBEDS: MarkdownEmbeds = { providers: ["youtube", "x", "instagram", "bluesky"], linkCardEndpoint: "/api/link-card", linkCardSize: "banner" }
213
213
 
214
214
  <MarkdownViewer {...props} embeds={EMBEDS} iFrameAllowedDomains={["www.youtube.com"]} />
215
215
  ```
@@ -238,17 +238,31 @@ The link is always kept: under the frame, as the card, or as the paragraph.
238
238
  Every host must match exactly (look-alike hosts, user info, ports and URLs carrying a provider URL in their query never match), and each path segment must match its own grammar. Short links without an id, Facebook, Pinterest, TikTok photo posts and LinkedIn articles have no provider: as bare URLs they become cards.
239
239
 
240
240
  **Frames.** No provider script ever runs in the page: posts and videos are cross-origin iframes with the registry's attributes (an `allow` within the six shared features, a `sandbox`, a referrer policy, `loading="lazy"`), titled `"<provider>: <label>"`. Every iframe — provider frames, iframes written in documents and the Dify plugin — mounts only on the client after hydration, and **never when its origin is the page's own origin**, whatever the host allows.
241
- The server HTML holds the link and a reserved box (`width: 100%` up to the provider's maximum, its aspect ratio or height, never a CSS `min-width`), hidden for readers without JavaScript. A frame whose box is narrower than the provider's minimum (YouTube 356 px, Shorts 200 px, X 250 px, Instagram 326 px, Threads 281 px, Bluesky 300 px) shows the fallback instead, and mounts again when the pane widens. X follows the primary subtag of the page's `<html lang>`; X, Threads and Bluesky follow `theme`.
241
+ The server HTML holds the link and a reserved box (`width: 100%` up to the provider's maximum, its aspect ratio or height, never a CSS `min-width`), hidden for readers without JavaScript. A frame whose box is narrower than the provider's minimum (YouTube 356 px, Shorts 200 px, X 250 px, Instagram 326 px, Threads 281 px, Bluesky 300 px, LinkedIn 251 px, niconico 229 px) shows the fallback instead, and mounts again when the pane widens. X follows the primary subtag of the page's `<html lang>`; X, Threads and Bluesky follow `theme`.
242
242
  Frames that report their height (X, Instagram, Threads, Bluesky, Reddit, note) are sized through one `message` listener that accepts only the frame's own window from its exact provider origin.
243
243
 
244
244
  **Link cards.** A card asks `GET <linkCardEndpoint>?url=<href>` (same-origin credentials, `redirect: "error"`) once an IntersectionObserver rooted at the viewer's scroller sees it, through a page-wide queue (two requests at once, 256 answers kept, aborted when no card needs the answer).
245
- It links to the written `href` (never `og:url`), takes the host name from the `href`, and shows the image and the icon only when the endpoint gives absolute `http(s)` URLs that are not on the page's own host, whatever the scheme or port (a browser loads an `http:` image of an `https:` page over `https:`, and cookies ignore the port), with no referrer. The package asks no favicon service. Any failure renders the paragraph.
245
+ It links to the written `href` (never `og:url`), takes the host name from the `href`, and shows the image and the icon only when the endpoint gives absolute `http(s)` URLs of at most 2048 characters (`LINK_CARD_URL_LIMIT`) that are not on the page's own host, whatever the scheme or port (a browser loads an `http:` image of an `https:` page over `https:`, and cookies ignore the port), with no referrer. The package asks no favicon service.
246
+
247
+ `linkCardSize` picks the size of every card:
248
+
249
+ | `linkCardSize` | The card |
250
+ | --- | --- |
251
+ | `"banner"` (default) | Image, title (two lines), description (one line) and `site · host`, 7.5rem tall, as wide as the column up to 37.5rem (600px) and left-aligned. The image is 1.91:1 from a card width of 32rem, square from 22rem, hidden below. |
252
+ | `"full"` | Image, title and description (two lines each) and `site · host`, 8.5rem tall, across the column. The image is 1.91:1 from 40rem, square from 22rem, hidden below. |
253
+ | `"compact"` | The favicon (or a neutral link icon), the title on one line and `site · host`, 3.75rem tall, as wide as its text up to 37.5rem. No image and no description. |
254
+
255
+ A pending card has the height of the chosen size, so an answer never shifts the page. A link the endpoint gives no card (a `204 No Content` with a reason, below) becomes a compact card whatever the size: a leading icon — a building for `private-network`, a globe otherwise — then the host name and the URL, marked `data-link-card="compact"` and `data-link-card-reason="<reason>"`. It may shrink a pending banner or full card; Chromium's scroll anchoring keeps the visible content in place when that happens above the viewport. An error answer renders the paragraph.
256
+ Every link that gets no full card writes one `console.info` line naming the link and the reason, for example `[markdown] No link card for <href> (private-network)`; an error answer names its cause instead — `HTTP <status>` for another status, `HTTP 204 without a known skip reason` for a 204 whose `X-Link-Card-Skip` is missing or unknown, `HTTP 200, not JSON` or `HTTP 200, not a JSON object` for a 200 that is not a JSON object, `network error` for a failed request — and a card that unmounts before its answer writes nothing.
257
+ The card's look — light and dark (`data-theme`), hover, keyboard focus ring — comes from `styles/markdown.css`, outside every cascade layer, so the GitHub and Zenn display styles cannot override it; every size shares that one frame.
246
258
 
247
259
  The endpoint contract:
248
260
 
249
261
  - `GET <endpoint>?url=<href>` answers JSON `{ title?, description?, site_name?, image?, icon? }`; other fields (`url` included) are ignored.
262
+ - A link that gets no card is answered `204 No Content` with the reason in `X-Link-Card-Skip` (`LINK_CARD_SKIP_HEADER`): `private-network`, `forbidden-url`, `unreachable` or `not-html` (`LINK_CARD_SKIP_REASONS`, read with `linkCardSkipReasonOf`). A 204 without one of them is an error answer.
250
263
  - It must not set cookies or refresh credentials: the request runs in the background and can be in flight during a sign-out.
251
- - A redirect, a 401, any other non-OK status or a non-JSON answer means no card.
264
+ - A redirect, any other non-OK status or a non-JSON answer is an error answer: no card, the paragraph.
265
+ - `createLinkCardHandler` from `@aiquants/markdown/server` implements this contract (see [Link-card endpoint](#link-card-endpoint)).
252
266
 
253
267
  **Iframes written in documents.** `iFrameAllowedDomains` lists the hostnames such an iframe may load from: the `src` must be `https:`, without a user name, a password or an explicit port, and its hostname must match an entry exactly. Every other iframe is removed (fail closed), including an iframe without `src` (`srcdoc`). An allowed iframe is rendered from validated values and keeps only `title`, `width`, `height`, `allow`, `allowfullscreen`, `sandbox`, `referrerpolicy`, `loading`, `frameborder` and `scrolling` (no `id` or `class`).
254
268
  An iframe without a `title` gets `"<embeddedFrame>: <host>"` (for example `Embedded content: www.youtube.com`), marked with the built-in label's language.
@@ -258,12 +272,81 @@ An iframe plugin (`data-plugin-type="dify"`) receives the validated iframe as st
258
272
 
259
273
  **Labels.** `embedLabels` (`embeddedVideo`, `embeddedPost`, `embeddedFrame`; built-in "embedded video", "embedded post", "Embedded content", in `DEFAULT_MARKDOWN_EMBED_LABELS`) name the frames; `MarkdownViewer` takes the same keys in `labels`.
260
274
 
261
- **DOM hooks.** `figure[data-embed-provider][data-embed-state="pending|frame"]` with its box `[data-embed-box]`, the width probe `[data-embed-measure]`, `span[data-embed-frame]` for iframes written in documents, and `a[data-link-card="pending|ready"]`.
275
+ **DOM hooks.** `figure[data-embed-provider][data-embed-state="pending|frame"]` with its box `[data-embed-box]`, the width probe `[data-embed-measure]`, `span[data-embed-frame]` for iframes written in documents, and `a[data-link-card="pending|ready|compact"][data-link-card-size="compact|banner|full"]` (a compact card of a skipped link also carries `data-link-card-reason`).
262
276
 
263
277
  **Content Security Policy.** Put `embedFrameHostsOf(embeds.providers)` and the hosts of `iFrameAllowedDomains` in `frame-src`, `embedConnectOriginsOf(embeds.providers)` in `connect-src` (Bluesky handles), and allow `https:` images in `img-src` for card images and icons. Provider frames may open popups that escape their sandbox, so a host that enables providers should send `Cross-Origin-Opener-Policy: same-origin`.
264
278
 
265
279
  `@aiquants/markdown/embeds` holds the placeholder contract, the frame policy, the provider registry and the card contract without React, for host sanitizers, configuration and CSP. `@aiquants/markdown/embeds/testing` holds captured provider messages and `embedProviderStubPage(url)` for offline end-to-end tests.
266
280
 
281
+ ### Link-card endpoint
282
+
283
+ `createLinkCardHandler(options)` from `@aiquants/markdown/server` (Node only) is the card endpoint as a standard handler, `(request: Request) => Promise<Response>`. It reads only the request's method and its `url` search parameter, never its path, so mount it on any path and pass that path as `embeds.linkCardEndpoint`. Create it once, at module scope: each handler owns its cache and its connection pool. It uses `undici` and `htmlparser2`, which no client entry loads (`@aiquants/markdown/embeds` stays free of React and Node).
284
+
285
+ A React Router resource route (`app/routes/api.link-card.ts`, for example):
286
+
287
+ ```ts
288
+ import { createLinkCardHandler } from "@aiquants/markdown/server"
289
+ import type { LoaderFunctionArgs } from "react-router"
290
+ import { readSignedInReader } from "~/session.server" // the host's read-only session lookup
291
+
292
+ const linkCards = createLinkCardHandler({ authorize: async (request) => (await readSignedInReader(request)) !== undefined })
293
+
294
+ export const loader = ({ request }: LoaderFunctionArgs) => linkCards(request)
295
+ ```
296
+
297
+ Any server whose handlers take a `Request` and return a `Response`:
298
+
299
+ ```ts
300
+ import { createLinkCardHandler } from "@aiquants/markdown/server"
301
+
302
+ const linkCards = createLinkCardHandler({ authorize: () => true }) // a public site: every reader may ask
303
+
304
+ export const handle = (request: Request): Promise<Response> =>
305
+ new URL(request.url).pathname === "/api/link-card" ? linkCards(request) : Promise.resolve(new Response(null, { status: 404 }))
306
+ ```
307
+
308
+ The handler can also be called from inside another loader, for example a data route that dispatches several operations: it answers the request it is given.
309
+
310
+ **Options.** `authorize: (request) => boolean | Promise<boolean>` is the only option, and it is required. Anything but `true` answers 401 before anything is fetched; a host that serves everyone passes `() => true`. It must only read the request — no cookie writes, no token refresh — because cards ask in the background and a request can still be in flight while the reader signs out. A rejection propagates to the host. `createLinkCardHandler` throws a `TypeError` when `authorize` is not a function and for any other option.
311
+
312
+ **Answers.** Every answer carries `X-Content-Type-Options: nosniff` and never `Set-Cookie`; a `HEAD` answer has the `GET` answer's status and headers and no body.
313
+
314
+ | Request | Status | Body | `Cache-Control` |
315
+ | --- | --- | --- | --- |
316
+ | A method other than `GET` and `HEAD` | 405 (with `Allow: GET, HEAD`) | `{"error":"Method Not Allowed"}` | `no-store` |
317
+ | `authorize` does not return `true` | 401 | `{"error":"Unauthorized"}` | `no-store` |
318
+ | No or an empty `url` | 400 | `{"error":"Missing 'url' parameter"}` | `no-store` |
319
+ | A link that gets no card | 204 (with `X-Link-Card-Skip: <reason>`) | none | per reason, below |
320
+ | An unexpected exception | 500 | `{"error":"Internal Server Error"}` | `no-store` |
321
+ | A card | 200 | `{ title?, description?, site_name?, image?, icon? }` (`LinkCardResponseBody`) | `private, max-age=1800` |
322
+
323
+ The JSON answers are `application/json; charset=utf-8`. The reasons of a 204:
324
+
325
+ | Reason | When | `Cache-Control` |
326
+ | --- | --- | --- |
327
+ | `private-network` | The host is internal by name or by IP literal, it resolves to or connects to a private or special-use address, or a redirect leads to such a host | `private, max-age=1800` |
328
+ | `forbidden-url` | The URL or a redirect target is not `http(s)`, carries a user name or password, or does not parse | `private, max-age=1800` |
329
+ | `unreachable` | A network error, a timeout, a non-OK answer of the linked site, too many redirects or an unparsable `Location` | `private, max-age=300` |
330
+ | `not-html` | The page's `Content-Type` is missing or not HTML | `private, max-age=300` |
331
+
332
+ **Internal addresses never become cards**, in any environment; there is no switch. Internal is decided by address, never by the company's domain:
333
+
334
+ - a loopback, private, link-local, CGNAT, multicast, documentation, benchmarking, discard-only or reserved IPv4 or IPv6 address (every IANA special-purpose range that is not globally reachable) written as the host, in every form the URL parser normalizes (`2130706433`, `0x7f.1`, `127.1`, `[::ffff:127.0.0.1]`, and the NAT64, 6to4, Teredo and IPv4-translated forms);
335
+ - an internal name: `localhost`, `*.localhost`, a single-label name, one without a dot (the server's DNS search list would complete it to an internal name), and names under `.local`, `.internal` and `.home.arpa`, with or without a trailing dot;
336
+ - a name that resolves to an internal address: every connection resolves through a lookup that refuses a name when any of its A or AAAA answers is private, and a `net.BlockList` (honoured by `net.connect` from Node 22.13, which `engines` requires) checks the very address connected to — for `https` too, whose TLS handshake runs over a TCP socket opened with the block list — so DNS rebinding cannot slip past;
337
+ - every redirect hop, checked again before it is followed.
338
+
339
+ **What the card shows.** The title is the last `og:title`, falling back to the first `<title>` of the document's head when that `og:title` is blank; the description is the last `og:description` or `<meta name="description">`; the site name the last `og:site_name`; the image the last `og:image`; the icon the first `<link rel>` holding the token `icon` (no `/favicon.ico` is guessed). A later blank `<meta>` clears an earlier one.
340
+ Only the head is read: parsing stops at the first body content, skips the content of a `<noscript>`, `<template>` or `<noframes>` in the head as a browser with scripting does, and stops at an element nesting deeper than 256, after 4096 start tags and at a tag with more than 64 attributes, so a hostile page costs time and memory linear in the bytes read. Text is trimmed and cut at the card's limits (title 300, description 1000, site name 200 code points), so `linkCardMetadataOf` reads every body back unchanged.
341
+ The image and the icon are resolved against the first `<base href>` — itself resolved against the page's URL, as a browser does, and used when it is `http(s)` and at most 2048 characters — else against the page's URL after redirects, and kept only when they are at most 2048 characters (`LINK_CARD_URL_LIMIT`) and the URL check accepts them.
342
+ Only `text/html` and `application/xhtml+xml` answers are read, decoded by WHATWG encoding sniffing: a byte order mark, then the `charset` of `Content-Type`, then a `<meta charset>` or `<meta http-equiv="Content-Type">` in the first 1024 bytes, else UTF-8 (Shift_JIS, EUC-JP, ISO-2022-JP and every other label `TextDecoder` knows; an unknown label is ignored).
343
+
344
+ **Limits.** 5 s per page for the headers, the body and its parsing; 5 redirects, each followed by hand and checked again; 64 KiB of response headers; at most the first 8 MiB of the body, read as a stream and parsed as it arrives, yielding to the event loop between chunks, and the download stops once the head has been read.
345
+ DNS goes through c-ares, never through `getaddrinfo` on libuv's threadpool, so a name whose DNS never answers holds none of the threads the host's `fs`, `zlib` and `crypto` share: A and AAAA queries to the DNS servers of the system's resolver configuration (the hosts file is not read), 1 s for the first attempt and 2 attempts per server; a name connects over IPv4 when it has an A record, else over IPv6.
346
+ Each handler caches cards per URL for 1 hour and skips as long as their `Cache-Control`, 1000 URLs at most; the key is the URL as the URL parser serializes it without its fragment, so spellings of one URL share one entry, and concurrent requests for one URL share one fetch.
347
+
348
+ **Logs.** The handler logs through the package's logger, never with a URL's user name or password (a refused URL that is not `http(s)` is logged by its scheme alone): policy refusals (`private-network`, `forbidden-url`) at info, network errors, unparsable `Location`s, too many redirects and unexpected exceptions at error, and a body cut at the size limit at warn.
349
+
267
350
  ### Links
268
351
 
269
352
  - A link is external when its `href` names a scheme in any case (`https:`, `HTTPS:`, `mailto:`) or another host (`//host/…`, `/\host/…`), whatever its `data-link-kind` says, and when `data-link-kind` is `external`. An external link opens in a new tab with `rel="noreferrer"` and is never handed to `linkComponent`. The author's `target` and `rel` never survive.
@@ -303,6 +386,7 @@ Mermaid draws in that element and the component shows the result in the slot, so
303
386
  - Nothing is drawn while the slot has no width (inside a closed `<details>` the browser does not lay out, or a hidden panel): the loading text stays until the slot gets a width. A drawing already under way when the slot loses its width finishes at the width it was given.
304
387
  - When the width of a slot showing a gantt chart changes (a splitter drag, a window resize), the chart is drawn again at the new width 200 ms after the last change, unless the slot then has no width or the width of the latest drawing. The shown chart stays until the new one replaces it, and the new one starts at the initial zoom and pan. Other diagram types take their size from their text and are never drawn again for a width change.
305
388
  - A drawing that finishes after a newer one started, after the diagram's text changed or after the component unmounted is discarded.
389
+ - Touch and pen: the diagram's `<svg>` and its container take `touch-action: none` only in the modes whose pan starts with a plain drag (`pan`, `both`), where a finger or pen drag pans the diagram. In every other mode (`both-shift` by default, `pan-shift`, `zoom`, `none`) the component writes no `touch-action`, so the browser default applies and a finger or pen scrolls the document over the diagram as anywhere else. The value follows the menu: switching the mode rewrites it on both elements, and the component removes it (with the other styles Panzoom wrote) when it tears its Panzoom instance down.
306
390
 
307
391
  ### Viewer toolbar
308
392
 
@@ -311,7 +395,7 @@ Mermaid draws in that element and the component shows the result in the slot, so
311
395
  | Property | Effect |
312
396
  | --- | --- |
313
397
  | `--aqmd-toolbar-inset-block-start` | Offset from the top of the toolbar's containing block |
314
- | `--aqmd-toolbar-inset-inline-end` | Offset from the inline end of the containing block (added to the scrollbar clearance) |
398
+ | `--aqmd-toolbar-inset-inline-end` | Offset from the inline end of the containing block (added to the scrollbar clearance: 24 px for the native scrollbar, or the measured width of a host scroll bar, see below) |
315
399
 
316
400
  The viewer reads no other package's variable. Where the toolbar is fixed to the viewport and must clear something of the host's own (a pinned side menu, for example), bind the property to that width in the host's layout, on an ancestor of the viewer:
317
401
 
@@ -330,6 +414,57 @@ Each menu's popover opens below the toolbar at its inline end, whichever button
330
414
 
331
415
  An open, unpinned popover closes on Escape while the focus is inside its menu, returns the focus to its button and calls `preventDefault()` on that keydown, so an outer Escape handler can skip a key the viewer consumed. Escape is not consumed while no popover is open.
332
416
 
417
+ ### Host scroll bar
418
+
419
+ `renderScrollBar?: (scroller: HTMLElement) => ReactNode` (type `MarkdownScrollBarRenderer`) lets the host put its own scroll bar beside the document, for example a control that scrolls by tapping. The package does not provide the bar; it provides the seam:
420
+
421
+ ```tsx
422
+ <MarkdownViewer {...props} renderScrollBar={(scroller) => <MyScrollBar target={scroller} />} />
423
+ ```
424
+
425
+ Given the prop, the viewer renders
426
+
427
+ | Element | Role |
428
+ | --- | --- |
429
+ | `[data-aqmd-scroll-row]` | A flex row as large as the viewer's own box |
430
+ | `[data-aqmd-scroll-clip]` | The row's first cell (`flex: 1 1 0%`, `overflow: clip`), holding the scroll container |
431
+ | `[data-aqmd-scroll-bar]` | The slot at the row's inline end (`flex: none`), as tall as the row; its child is stretched to the full height |
432
+
433
+ The function receives the scroll container, `[data-aqmd-scroll-container]`, the same element with the same hooks and classes as without the prop. It is called on every render once the container is mounted, before the first paint. The bar reads and writes the container's scroll position itself (`scrollTop`, `scrollHeight`, `clientHeight`, `scroll` events).
434
+
435
+ Only the native vertical scrollbar is hidden, in every engine: the scroll container always reserves it (`overflow-y: scroll`, so its thickness is constant), its border box (`box-sizing: border-box`, whatever the host's default) is widened by the measured thickness (`width: calc(100% + <thickness>px)`), and the clipping cell cuts that strip off. The native horizontal scrollbar keeps its native look, spans exactly the visible width and stays usable, as do the wheel, the keyboard and touch in both directions. No `::-webkit-scrollbar` or `scrollbar-width` rule is involved, so a host's `scrollbar-color` or `scrollbar-width` neither breaks the hiding nor is overridden. The cell uses `overflow: clip` rather than `hidden`, so nothing can scroll the cell itself, and it creates no containing block, so the fixed toolbar is neither moved nor clipped by it. Coverage: classic (space-taking) scrollbars are hidden in every browser that supports `overflow: clip` (Chromium 90, Firefox 81, Safari 16). An overlay scrollbar (macOS by default, mobile browsers, Firefox and GTK overlay modes) takes no space, measures 0 px and is drawn over the content while scrolling, so it stays visible there; the right-to-left inline end is handled the same way.
436
+
437
+ The thickness and the slot's width are measured in the scroll container's own CSS px, which a CSS `zoom` or a transform above it makes differ from the viewport's: a native scrollbar keeps its size on screen, so under `zoom: 1.1` its 15 px are 13.64 of the container's px. The container is positioned (`position: relative`) and holds an invisible, zero-tall box stretched across its padding box, `[data-aqmd-scroll-bar-probe]` (`aria-hidden`, out of flow); the thickness is the container's rect width less that box's, converted by the ratio of the container's rect width to its computed width, less its side borders. It is rounded up to a whole px, because the clip must never leave any of the native bar showing: the price is less than 1 px of the container's own px cut off its inline-end padding and the end of the native horizontal scrollbar (0.36 px at `zoom: 1.1`, none where the thickness is whole). Both are measured before the first paint and again whenever the container or the slot resizes and the window resizes (a page zoom changes a scrollbar's thickness in CSS px). The floating toolbar keeps the slot's measured width from the inline end instead of a native scrollbar's 24 px, and each popover's maximum width uses the same clearance.
438
+
439
+ Everything else keeps using the native scroller: fragment and table-of-contents scrolling with `scroll-padding-block-start`, the scroll position kept across a display-style change, link-card visibility observation, embed minimum widths measured from the content column, and the browser's scroll anchoring. Without the prop, the scroll container is the viewer's root element with its native scrollbars, and no row, cell or slot is rendered. Switching between given and omitted moves the scroll container onto another element, which starts at the top.
440
+
441
+ The layout is the exported `HostedScrollArea` (next section), which hosts can use for scrollers of their own.
442
+
443
+ ### Hosted scroll area
444
+
445
+ `HostedScrollArea` (props `HostedScrollAreaProps`) is the layout behind `renderScrollBar`, exported so a host can give any scroller of its own (an image canvas, a media stage, a panel's scroll area) the same bar. It renders the caller's scroller and, given `renderScrollBar`, the same row, clipping cell, slot and probe as the viewer: the host's bar replaces the native vertical scrollbar, and the native horizontal one stays.
446
+
447
+ ```tsx
448
+ <HostedScrollArea
449
+ scrollerRef={canvasRef}
450
+ scrollerProps={{ "data-my-scroller": "", className: "canvas", style: { blockSize: "100%", overflow: "auto" } }}
451
+ renderScrollBar={(scroller) => <MyScrollBar target={scroller} />}
452
+ rowStyle={{ flex: "1 1 0%" }}>
453
+ <img src={src} alt="" />
454
+ </HostedScrollArea>
455
+ ```
456
+
457
+ | Prop | Meaning |
458
+ | --- | --- |
459
+ | `scrollerProps` | The scroller's own attributes (type `HostedScrollerProps`: `data-*` hooks, class, inline style, ARIA, handlers), put on the `<div>` that scrolls, in their order. A hook the host finds with `closest()` or `querySelector()` therefore sits on the real scroller, not on a wrapper. |
460
+ | `scrollerRef` | The caller's ref to that element: an object ref, or a callback ref (one that returns a cleanup gets the cleanup instead of a call with `null`). |
461
+ | `children` | The scroller's content. |
462
+ | `renderScrollBar` | The host's bar (`MarkdownScrollBarRenderer`). Omitted, the area renders the scroller alone with the caller's props unchanged and measures nothing, so a host can use it unconditionally. |
463
+ | `rowClassName`, `rowStyle` | Place the row in its parent, with a bar only: the row takes the scroller's place there, so a flex item's `flex` and minimum sizes go here. `rowStyle` is merged over the row's own `display: flex; inline-size: 100%; block-size: 100%` and zero minimum sizes. |
464
+ | `onBarInlineSizeChange` | Called with the slot's measured width, in the scroller's own CSS px, whenever it changes, before the paint that shows it. The width is 0 before the first call and returns to 0 when the bar is removed. The viewer keeps its floating toolbar clear of the bar with it. |
465
+
466
+ With a bar, the area owns four of the scroller's styles, `position: relative`, `box-sizing: border-box`, `overflow-y: scroll` and `width: calc(100% + <thickness>px)`, and appends the probe as its last child; the rest of `scrollerProps.style` and the class are kept, so the horizontal overflow stays the caller's. The scroller must be as tall as the clipping cell (`block-size: 100%`). The hiding, the measurement under zoom and their coverage are those described in the previous section.
467
+
333
468
  ### Table of contents
334
469
 
335
470
  Activating an entry closes an unpinned table of contents, reveals the heading if it is hidden, scrolls to it (instantly under `prefers-reduced-motion: reduce`) and moves the focus to it (adding `tabindex="-1"` when the heading has none), so the next Tab continues from that section. Pass `onHeadingSelect(heading, event)` to take part: return `false` to let the viewer reveal, scroll and focus after your own work (writing the URL hash, say), or `true` when you have handled the navigation yourself.
@@ -1,6 +1,6 @@
1
- import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-CmOhW6SK.js";
2
- import { p as f } from "./chunk-JWPE2WC7-CPLOunIL.js";
3
- import { _ as n, O as o } from "./extractHeadings-B2pUyEPa.js";
1
+ import { g as p, r as u, d as a } from "./chunk-MOJQB5TN-aTSDPliR.js";
2
+ import { p as f } from "./chunk-JWPE2WC7-DUndc3Wb.js";
3
+ import { _ as n, Q as o } from "./extractHeadings-CdLPwHlC.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-P8-yb3-j.cjs"),u=require("./chunk-JWPE2WC7-CUBzYD4G.cjs"),n=require("./extractHeadings-DgefF9l1.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-AAMW2q8N.cjs"),u=require("./chunk-JWPE2WC7-Cvt_ToFU.cjs"),n=require("./extractHeadings-DRUBnhbi.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=_;
@@ -0,0 +1,83 @@
1
+ import { aD as ln, aE as an, aF as y, aG as tn, aH as N, aI as D, aJ as _, aK as un, aL as rn, aM as j, aN as o, aO as J, aP as sn, aQ as on, aR as fn } from "./extractHeadings-CdLPwHlC.js";
2
+ function cn(l) {
3
+ return l.innerRadius;
4
+ }
5
+ function yn(l) {
6
+ return l.outerRadius;
7
+ }
8
+ function gn(l) {
9
+ return l.startAngle;
10
+ }
11
+ function dn(l) {
12
+ return l.endAngle;
13
+ }
14
+ function mn(l) {
15
+ return l && l.padAngle;
16
+ }
17
+ function pn(l, h, O, E, v, R, K, a) {
18
+ var q = O - l, i = E - h, n = K - v, d = a - R, u = d * q - n * i;
19
+ if (!(u * u < y))
20
+ return u = (n * (h - R) - d * (l - v)) / u, [l + u * q, h + u * i];
21
+ }
22
+ function W(l, h, O, E, v, R, K) {
23
+ var a = l - O, q = h - E, i = (K ? R : -R) / j(a * a + q * q), n = i * q, d = -i * a, u = l + n, s = h + d, f = O + n, c = E + d, L = (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, F = (g < 0 ? -1 : 1) * j(fn(0, T * T * A - P * P)), G = (P * g - m * F) / A, H = (-P * m - g * F) / A, w = (P * g + m * F) / A, p = (-P * m + g * F) / A, x = G - L, e = H - t, r = w - L, M = p - t;
24
+ return x * x + e * e > r * r + M * M && (G = w, H = p), {
25
+ cx: G,
26
+ cy: H,
27
+ x01: -n,
28
+ y01: -d,
29
+ x11: G * (v / T - 1),
30
+ y11: H * (v / T - 1)
31
+ };
32
+ }
33
+ function hn() {
34
+ var l = cn, h = yn, O = J(0), E = null, v = gn, R = dn, K = mn, a = null, q = ln(i);
35
+ function i() {
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, L = un(c - f), t = c > f;
37
+ if (a || (a = n = q()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
38
+ else if (L > tn - y)
39
+ a.moveTo(s * N(f), s * D(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * N(c), u * D(c)), a.arc(0, 0, u, c, f, t));
40
+ else {
41
+ var m = f, g = c, A = f, T = c, P = L, F = L, G = K.apply(this, arguments) / 2, H = G > y && (E ? +E.apply(this, arguments) : j(u * u + s * s)), w = _(un(s - u) / 2, +O.apply(this, arguments)), p = w, x = w, e, r;
42
+ if (H > y) {
43
+ var M = sn(H / u * D(G)), z = sn(H / s * D(G));
44
+ (P -= M * 2) > y ? (M *= t ? 1 : -1, A += M, T -= M) : (P = 0, A = T = (f + c) / 2), (F -= z * 2) > y ? (z *= t ? 1 : -1, m += z, g -= z) : (F = 0, m = g = (f + c) / 2);
45
+ }
46
+ var Q = s * N(m), S = s * D(m), B = u * N(T), C = u * D(T);
47
+ if (w > y) {
48
+ var U = s * N(g), V = s * D(g), X = u * N(A), Y = u * D(A), I;
49
+ if (L < rn)
50
+ if (I = pn(Q, S, X, Y, U, V, B, C)) {
51
+ var Z = Q - I[0], $ = S - I[1], k = U - I[0], b = V - I[1], nn = 1 / D(on((Z * k + $ * b) / (j(Z * Z + $ * $) * j(k * k + b * b))) / 2), en = j(I[0] * I[0] + I[1] * I[1]);
52
+ p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
53
+ } else
54
+ p = x = 0;
55
+ }
56
+ F > y ? x > y ? (e = W(X, Y, Q, S, 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(Q, S), a.arc(0, 0, s, m, g, !t)) : a.moveTo(Q, S), !(u > y) || !(P > y) ? a.lineTo(B, C) : p > y ? (e = W(B, C, U, V, u, -p, t), r = W(Q, S, 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
+ }
58
+ if (a.closePath(), n) return a = null, n + "" || null;
59
+ }
60
+ return i.centroid = function() {
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 [N(d) * n, D(d) * n];
63
+ }, i.innerRadius = function(n) {
64
+ return arguments.length ? (l = typeof n == "function" ? n : J(+n), i) : l;
65
+ }, i.outerRadius = function(n) {
66
+ return arguments.length ? (h = typeof n == "function" ? n : J(+n), i) : h;
67
+ }, i.cornerRadius = function(n) {
68
+ return arguments.length ? (O = typeof n == "function" ? n : J(+n), i) : O;
69
+ }, i.padRadius = function(n) {
70
+ return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : J(+n), i) : E;
71
+ }, i.startAngle = function(n) {
72
+ return arguments.length ? (v = typeof n == "function" ? n : J(+n), i) : v;
73
+ }, i.endAngle = function(n) {
74
+ return arguments.length ? (R = typeof n == "function" ? n : J(+n), i) : R;
75
+ }, i.padAngle = function(n) {
76
+ return arguments.length ? (K = typeof n == "function" ? n : J(+n), i) : K;
77
+ }, i.context = function(n) {
78
+ return arguments.length ? (a = n ?? null, i) : a;
79
+ }, i;
80
+ }
81
+ export {
82
+ hn as d
83
+ };
@@ -1 +1 @@
1
- "use strict";const n=require("./extractHeadings-DgefF9l1.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-DRUBnhbi.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,5 +1,5 @@
1
- import { p as Ze } from "./chunk-JWPE2WC7-CPLOunIL.js";
2
- import { bK as qe, _ as gt, ak as Qe, aA as Je, O as Fe, G as Ke, A as je, a5 as _e, a6 as tr, z as er, y as rr, ab as ir, ah as ar, af as nr, ai as or, J as Ee, bD as Te, aW as pe, V as sr, K as hr, aa as lr, aX as fr, bL as cr } from "./extractHeadings-B2pUyEPa.js";
1
+ import { p as Ze } from "./chunk-JWPE2WC7-DUndc3Wb.js";
2
+ import { bL as qe, _ as gt, al as Qe, aB as Je, Q as Fe, J as Ke, G as je, a6 as _e, a7 as tr, A as er, z as rr, ac as ir, ai as ar, ag as nr, aj as or, K as Ee, bE as Te, aX as pe, W as sr, O as hr, ab as lr, aY as fr, bM as cr } from "./extractHeadings-CdLPwHlC.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;