reactive-md 0.9.2 → 0.9.3

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 (570) hide show
  1. package/CHANGELOG-ch.md +363 -333
  2. package/CHANGELOG.md +364 -334
  3. package/CONTRIBUTING-ch.md +22 -22
  4. package/CONTRIBUTING.md +22 -22
  5. package/README-ch.md +431 -431
  6. package/README-en.md +431 -431
  7. package/README.md +429 -429
  8. package/SECURITY-ch.md +83 -83
  9. package/SECURITY.md +83 -83
  10. package/bin/reactive-md.mjs +39 -39
  11. package/cli/args.mjs +263 -263
  12. package/cli/assets.mjs +395 -395
  13. package/cli/build.mjs +445 -445
  14. package/cli/check.mjs +444 -444
  15. package/cli/document.mjs +130 -130
  16. package/cli/errors.mjs +61 -61
  17. package/cli/fs-utils.mjs +133 -133
  18. package/cli/glob.mjs +203 -203
  19. package/cli/help.mjs +323 -323
  20. package/cli/init.mjs +1577 -1577
  21. package/cli/lint.mjs +177 -177
  22. package/cli/main.mjs +65 -65
  23. package/cli/migrate.mjs +368 -368
  24. package/cli/package-loader.mjs +41 -41
  25. package/cli/package.mjs +211 -211
  26. package/dist-library/LocalDocumentView-D6zQkTkt.js +112 -0
  27. package/dist-library/{LocalDocumentViewCore-DXE0I0Qc.js → LocalDocumentViewCore-CmJhemcA.js} +356 -9441
  28. package/dist-library/LocalReactiveDocumentCore-lAKOGAZ7.js +283 -0
  29. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +143 -0
  30. package/dist-library/{authoring-Ci_KzJ0q.js → authoring-B14SsOXZ.js} +21 -20
  31. package/dist-library/chart-B1TUtzm-.js +3 -0
  32. package/dist-library/color-values-r8Wf7ALn.js +6 -0
  33. package/dist-library/{compile-Dx6Uw3D9.js → compile-D50B5_Ww.js} +25 -25
  34. package/dist-library/compile-cache-key-6GgpETz_.js +28 -0
  35. package/dist-library/compiler-DLkKUK4t.js +98 -0
  36. package/dist-library/{compiler-core-DDDdvuLy.js → compiler-core-Niqhp9wV.js} +2877 -3262
  37. package/dist-library/{registry-core-C9xOunaw.js → component-kernel-IG4wOO0i.js} +72 -195
  38. package/dist-library/{component-state-BRwvTV0d.js → component-state-Ht-hOK0W.js} +1 -1
  39. package/dist-library/component-utils-eSj5IdG4.js +338 -0
  40. package/dist-library/computations-CffoW7Ff.js +340 -0
  41. package/dist-library/config-validation-Cpol91_M.js +456 -0
  42. package/dist-library/controls-B-CLSK8Q.js +5927 -0
  43. package/dist-library/controls-DWlx-AQl.js +3 -0
  44. package/dist-library/{coordinate-B1VFK9fd.js → coordinate-PyLPMIQK.js} +85 -85
  45. package/dist-library/data-BtFlkJzp.js +3 -0
  46. package/dist-library/{data-table-8-3F15Jf.js → data-table-Kv_ZA2Z2.js} +14 -13
  47. package/dist-library/data-visuals-_Z7QqYTk.js +384 -0
  48. package/dist-library/{default-components-s21NevON.js → default-components-jugH7Ubr.js} +327 -326
  49. package/dist-library/{config-DXLvctiZ.js → default-config-DIrRpuQz.js} +103 -88
  50. package/dist-library/default-options-DU5dxuU6.js +125 -0
  51. package/dist-library/{registry-D6OGkOcX.js → default-registry-BlloaZi7.js} +4 -4
  52. package/dist-library/default-schema-Ch-Vznpm.js +33 -0
  53. package/dist-library/diagram-BLepzI8l.js +3 -0
  54. package/dist-library/{display-B_uutKkN.js → display-y4v9v0Qd.js} +1 -1
  55. package/dist-library/dist-Cueh1Psp.js +4761 -0
  56. package/dist-library/{document-theme-C8J6UyNO.js → document-theme-DBAfnk7y.js} +57 -2
  57. package/dist-library/{export-CIAIPBov.js → export-heVBqgxA.js} +64 -63
  58. package/dist-library/gallery-BC6FYTqw.js +3 -0
  59. package/dist-library/{gallery-Dv1rOvL0.js → gallery-Q6VPS2ep.js} +1 -1
  60. package/dist-library/{html-Cr4CBwAH.js → html-CCnvzan1.js} +49 -48
  61. package/dist-library/{incremental-9nx92u9c.js → incremental-Bzvh8_lB.js} +526 -379
  62. package/dist-library/{layout-BBB2VF0S.js → layout-BfUzzO2b.js} +147 -156
  63. package/dist-library/layout-BnfDeUNy.js +3 -0
  64. package/dist-library/limits-CFERRrlC.js +10 -0
  65. package/dist-library/localization-COdJ6lw2.js +6 -0
  66. package/dist-library/mafs-CnzDC5CR.js +3 -0
  67. package/dist-library/math-view-B0jthpRw.js +20 -0
  68. package/dist-library/motion-tokens-Czk0RDmS.js +283 -0
  69. package/dist-library/mount-preset-C_i37FvY.js +24 -0
  70. package/dist-library/numeric-sliders-CkWS0-ja.js +542 -0
  71. package/dist-library/{observability-4KqXhIEU.js → observability-CYLuvFfL.js} +124 -43
  72. package/dist-library/package-core-9UK5ZdqB.js +127 -0
  73. package/dist-library/parser-9yNJxGip.js +8 -0
  74. package/dist-library/parser-standard-BPIy4HOu.js +4872 -0
  75. package/dist-library/plugin-packs-CZb46nuv.js +19 -0
  76. package/dist-library/{preset-core-DeZPA8IE.js → preset-core-BW3NWZJ9.js} +212 -210
  77. package/dist-library/props-pJRrfDc6.js +179 -0
  78. package/dist-library/react-BSo0o998.js +32 -0
  79. package/dist-library/reactive-md-authoring.js +268 -257
  80. package/dist-library/reactive-md-build.js +7 -10
  81. package/dist-library/reactive-md-compiler-session.js +4 -0
  82. package/dist-library/reactive-md-compiler-standard.js +6 -6
  83. package/dist-library/reactive-md-compiler.js +3 -3
  84. package/dist-library/reactive-md-contracts.js +6 -0
  85. package/dist-library/reactive-md-default-packs.js +31 -15
  86. package/dist-library/reactive-md-default-preset.js +7 -7
  87. package/dist-library/reactive-md-export.js +6 -5
  88. package/dist-library/reactive-md-minimal-preset.js +2 -2
  89. package/dist-library/reactive-md-minimal-react-preset.js +22 -20
  90. package/dist-library/reactive-md-minimal.css +1 -1
  91. package/dist-library/reactive-md-observability.js +125 -3
  92. package/dist-library/reactive-md-pack-style-manifest.js +797 -0
  93. package/dist-library/reactive-md-plugin-chart.js +6 -5
  94. package/dist-library/reactive-md-plugin-data.js +8 -8
  95. package/dist-library/reactive-md-plugin-diagram.js +7 -6
  96. package/dist-library/reactive-md-plugin-forms.js +14 -13
  97. package/dist-library/reactive-md-plugin-gallery.js +6 -5
  98. package/dist-library/reactive-md-plugin-navigation.js +9 -9
  99. package/dist-library/reactive-md-plugin-network.js +13 -13
  100. package/dist-library/reactive-md-plugin-plot.js +7 -6
  101. package/dist-library/reactive-md-print.css +304 -304
  102. package/dist-library/reactive-md-react-component-accordion.js +10 -0
  103. package/dist-library/reactive-md-react-component-alert.js +10 -0
  104. package/dist-library/reactive-md-react-component-anchor.js +10 -0
  105. package/dist-library/reactive-md-react-component-badge.js +10 -0
  106. package/dist-library/reactive-md-react-component-card.js +10 -0
  107. package/dist-library/reactive-md-react-component-chart.js +22 -0
  108. package/dist-library/reactive-md-react-component-checkbox.js +10 -0
  109. package/dist-library/reactive-md-react-component-checklist.js +10 -0
  110. package/dist-library/reactive-md-react-component-choices.js +10 -0
  111. package/dist-library/reactive-md-react-component-column.js +6 -0
  112. package/dist-library/reactive-md-react-component-coordinate.js +21 -0
  113. package/dist-library/reactive-md-react-component-counter.js +10 -0
  114. package/dist-library/reactive-md-react-component-data-table.js +14 -0
  115. package/dist-library/reactive-md-react-component-date.js +10 -0
  116. package/dist-library/reactive-md-react-component-diagram.js +22 -0
  117. package/dist-library/reactive-md-react-component-disclosure.js +10 -0
  118. package/dist-library/reactive-md-react-component-edge.js +22 -0
  119. package/dist-library/reactive-md-react-component-gallery-item.js +10 -0
  120. package/dist-library/reactive-md-react-component-gallery.js +10 -0
  121. package/dist-library/reactive-md-react-component-grid.js +10 -0
  122. package/dist-library/reactive-md-react-component-if.js +10 -0
  123. package/dist-library/reactive-md-react-component-input.js +10 -0
  124. package/dist-library/reactive-md-react-component-jump.js +10 -0
  125. package/dist-library/reactive-md-react-component-multi-select.js +10 -0
  126. package/dist-library/reactive-md-react-component-node.js +22 -0
  127. package/dist-library/reactive-md-react-component-number.js +10 -0
  128. package/dist-library/reactive-md-react-component-option.js +10 -0
  129. package/dist-library/reactive-md-react-component-panel.js +10 -0
  130. package/dist-library/reactive-md-react-component-plot.js +26 -0
  131. package/dist-library/reactive-md-react-component-progress.js +10 -0
  132. package/dist-library/reactive-md-react-component-quiz.js +10 -0
  133. package/dist-library/reactive-md-react-component-radio-group.js +10 -0
  134. package/dist-library/reactive-md-react-component-range-slider.js +10 -0
  135. package/dist-library/reactive-md-react-component-section.js +10 -0
  136. package/dist-library/reactive-md-react-component-select.js +10 -0
  137. package/dist-library/reactive-md-react-component-slider.js +10 -0
  138. package/dist-library/reactive-md-react-component-step.js +10 -0
  139. package/dist-library/reactive-md-react-component-steps.js +10 -0
  140. package/dist-library/reactive-md-react-component-tab.js +10 -0
  141. package/dist-library/reactive-md-react-component-table.js +14 -0
  142. package/dist-library/reactive-md-react-component-tabs.js +10 -0
  143. package/dist-library/reactive-md-react-component-text.js +10 -0
  144. package/dist-library/reactive-md-react-component-textarea.js +10 -0
  145. package/dist-library/reactive-md-react-component-timeline.js +14 -0
  146. package/dist-library/reactive-md-react-component-timer.js +10 -0
  147. package/dist-library/reactive-md-react-component-toggle.js +10 -0
  148. package/dist-library/reactive-md-react-component-tooltip.js +10 -0
  149. package/dist-library/reactive-md-react-component-validation.js +10 -0
  150. package/dist-library/reactive-md-react-minimal.js +4 -4
  151. package/dist-library/reactive-md-react-pack-controls.js +44 -0
  152. package/dist-library/reactive-md-react-pack-data.js +21 -0
  153. package/dist-library/reactive-md-react-pack-layout.js +36 -0
  154. package/dist-library/reactive-md-react-pack-visuals.js +43 -0
  155. package/dist-library/reactive-md-react-packed.js +50 -0
  156. package/dist-library/reactive-md-react-server.js +26 -25
  157. package/dist-library/reactive-md-react-static-server.js +24 -0
  158. package/dist-library/reactive-md-react-static.js +1 -0
  159. package/dist-library/reactive-md-react-unstyled.js +15 -12
  160. package/dist-library/reactive-md-react.js +15 -12
  161. package/dist-library/reactive-md-scan.js +1 -0
  162. package/dist-library/reactive-md-sdk.js +9 -9
  163. package/dist-library/reactive-md-standalone-configured.js +2 -2
  164. package/dist-library/reactive-md-standalone-host.js +2 -2
  165. package/dist-library/reactive-md-testing-browser.js +2 -2
  166. package/dist-library/reactive-md-testing-react.js +32 -32
  167. package/dist-library/reactive-md-testing.js +12 -12
  168. package/dist-library/reactive-md-worker-pool.js +401 -0
  169. package/dist-library/reactive-md.css +1 -1
  170. package/dist-library/reactive-md.js +82 -1548
  171. package/dist-library/registry-core-CziAIP5P.js +125 -0
  172. package/dist-library/render-nodes-DKjg_TR1.js +9369 -0
  173. package/dist-library/requirements-DhIkxAbl.js +157 -0
  174. package/dist-library/resources-B_nbROgj.js +74 -0
  175. package/dist-library/rmd-pack-controls.css +1032 -0
  176. package/dist-library/rmd-pack-data.css +724 -0
  177. package/dist-library/rmd-pack-layout.css +1825 -0
  178. package/dist-library/rmd-pack-resource-chart.css +300 -0
  179. package/dist-library/rmd-pack-resource-controls.css +781 -0
  180. package/dist-library/rmd-pack-resource-data-visuals.css +501 -0
  181. package/dist-library/rmd-pack-resource-diagram.css +106 -0
  182. package/dist-library/rmd-pack-resource-gallery.css +346 -0
  183. package/dist-library/rmd-pack-resource-graphics.css +516 -0
  184. package/dist-library/rmd-pack-resource-layout.css +1480 -0
  185. package/dist-library/rmd-pack-resource-mafs-core.css +124 -0
  186. package/dist-library/rmd-pack-resource-mafs.css +129 -0
  187. package/dist-library/rmd-pack-resource-visual-base.css +224 -0
  188. package/dist-library/rmd-pack-visuals.css +1394 -0
  189. package/dist-library/{runtime-BpQdZmFI.js → runtime-CuJndKqK.js} +53 -52
  190. package/dist-library/runtime-requirement-C4-vNcf5.js +769 -0
  191. package/dist-library/schema-core-4sd1Vu7V.js +132 -0
  192. package/dist-library/{sdk-core-ChslheKs.js → sdk-core-BLsW9cCy.js} +497 -524
  193. package/dist-library/{session-core-dxQCJBNa.js → session-core-DLBRPV7f.js} +26 -25
  194. package/dist-library/{shareable-B8xMoGEa.js → shareable-C6mUerpQ.js} +145 -142
  195. package/dist-library/shared-bTzN-F4g.js +3 -0
  196. package/dist-library/structural-views-30-YD_TJ.js +11 -0
  197. package/dist-library/table-surface-CfZn_tk-.js +13 -0
  198. package/dist-library/types/assemblies/compile-cache-key.d.ts +11 -0
  199. package/dist-library/types/assemblies/default-config.d.ts +35 -0
  200. package/dist-library/types/{local/configuration/options.d.ts → assemblies/default-options.d.ts} +4 -4
  201. package/dist-library/types/assemblies/default-registry.d.ts +18 -0
  202. package/dist-library/types/{local/configuration/schema.d.ts → assemblies/default-schema.d.ts} +4 -4
  203. package/dist-library/types/authoring/catalog.d.ts +11 -1
  204. package/dist-library/types/authoring/extensions.d.ts +1 -1
  205. package/dist-library/types/authoring/index.d.ts +3 -3
  206. package/dist-library/types/authoring/templates.d.ts +1 -1
  207. package/dist-library/types/compiler/index.d.ts +1 -0
  208. package/dist-library/types/compiler/session.d.ts +19 -0
  209. package/dist-library/types/compiler/standard.d.ts +1 -0
  210. package/dist-library/types/components/entries/accordion.d.ts +3 -0
  211. package/dist-library/types/components/entries/alert.d.ts +3 -0
  212. package/dist-library/types/components/entries/anchor.d.ts +3 -0
  213. package/dist-library/types/components/entries/badge.d.ts +3 -0
  214. package/dist-library/types/components/entries/card.d.ts +3 -0
  215. package/dist-library/types/components/entries/chart.d.ts +3 -0
  216. package/dist-library/types/components/entries/checkbox.d.ts +3 -0
  217. package/dist-library/types/components/entries/checklist.d.ts +3 -0
  218. package/dist-library/types/components/entries/choices.d.ts +3 -0
  219. package/dist-library/types/components/entries/column.d.ts +3 -0
  220. package/dist-library/types/components/entries/coordinate.d.ts +3 -0
  221. package/dist-library/types/components/entries/counter.d.ts +3 -0
  222. package/dist-library/types/components/entries/data-table.d.ts +3 -0
  223. package/dist-library/types/components/entries/date.d.ts +3 -0
  224. package/dist-library/types/components/entries/diagram.d.ts +3 -0
  225. package/dist-library/types/components/entries/disclosure.d.ts +3 -0
  226. package/dist-library/types/components/entries/edge.d.ts +3 -0
  227. package/dist-library/types/components/entries/gallery-item.d.ts +3 -0
  228. package/dist-library/types/components/entries/gallery.d.ts +3 -0
  229. package/dist-library/types/components/entries/grid.d.ts +3 -0
  230. package/dist-library/types/components/entries/if.d.ts +3 -0
  231. package/dist-library/types/components/entries/input.d.ts +3 -0
  232. package/dist-library/types/components/entries/jump.d.ts +3 -0
  233. package/dist-library/types/components/entries/multi-select.d.ts +3 -0
  234. package/dist-library/types/components/entries/node.d.ts +3 -0
  235. package/dist-library/types/components/entries/number.d.ts +3 -0
  236. package/dist-library/types/components/entries/option.d.ts +3 -0
  237. package/dist-library/types/components/entries/panel.d.ts +3 -0
  238. package/dist-library/types/components/entries/plot.d.ts +3 -0
  239. package/dist-library/types/components/entries/progress.d.ts +3 -0
  240. package/dist-library/types/components/entries/quiz.d.ts +3 -0
  241. package/dist-library/types/components/entries/radio-group.d.ts +3 -0
  242. package/dist-library/types/components/entries/range-slider.d.ts +3 -0
  243. package/dist-library/types/components/entries/section.d.ts +3 -0
  244. package/dist-library/types/components/entries/select.d.ts +3 -0
  245. package/dist-library/types/components/entries/slider.d.ts +3 -0
  246. package/dist-library/types/components/entries/step.d.ts +3 -0
  247. package/dist-library/types/components/entries/steps.d.ts +3 -0
  248. package/dist-library/types/components/entries/tab.d.ts +3 -0
  249. package/dist-library/types/components/entries/table.d.ts +3 -0
  250. package/dist-library/types/components/entries/tabs.d.ts +3 -0
  251. package/dist-library/types/components/entries/text.d.ts +3 -0
  252. package/dist-library/types/components/entries/textarea.d.ts +3 -0
  253. package/dist-library/types/components/entries/timeline.d.ts +3 -0
  254. package/dist-library/types/components/entries/timer.d.ts +3 -0
  255. package/dist-library/types/components/entries/toggle.d.ts +3 -0
  256. package/dist-library/types/components/entries/tooltip.d.ts +3 -0
  257. package/dist-library/types/components/entries/validation.d.ts +3 -0
  258. package/dist-library/types/components/layout/layout.d.ts +1 -3
  259. package/dist-library/types/components/layout/structural-views.d.ts +3 -0
  260. package/dist-library/types/components/mount-preset.d.ts +2 -0
  261. package/dist-library/types/components/packs/controls.d.ts +2 -0
  262. package/dist-library/types/components/packs/data.d.ts +2 -0
  263. package/dist-library/types/components/packs/layout.d.ts +2 -0
  264. package/dist-library/types/components/packs/visuals.d.ts +2 -0
  265. package/dist-library/types/components/shared/data-visuals.d.ts +3 -0
  266. package/dist-library/types/components/shared/table-surface.d.ts +10 -0
  267. package/dist-library/types/components/shared/visual-helpers.d.ts +24 -0
  268. package/dist-library/types/components/shared/visuals.d.ts +0 -2
  269. package/dist-library/types/components/table/data-table-model.d.ts +48 -0
  270. package/dist-library/types/components/table/data-table.d.ts +1 -48
  271. package/dist-library/types/{local/configuration → contracts}/component-kernel.d.ts +4 -2
  272. package/dist-library/types/contracts/index.d.ts +8 -0
  273. package/dist-library/types/{local/configuration → contracts}/limits.d.ts +9 -1
  274. package/dist-library/types/contracts/localization.d.ts +6 -0
  275. package/dist-library/types/contracts/runtime-types.d.ts +19 -0
  276. package/dist-library/types/local/compilation/cache-version.d.ts +1 -0
  277. package/dist-library/types/local/compilation/compile-status.d.ts +2 -0
  278. package/dist-library/types/local/compilation/compiler-bindings.d.ts +1 -1
  279. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +4 -1
  280. package/dist-library/types/local/compilation/compiler-core.d.ts +1 -1
  281. package/dist-library/types/local/compilation/compiler-embedding.d.ts +20 -0
  282. package/dist-library/types/local/compilation/compiler-expressions.d.ts +5 -4
  283. package/dist-library/types/local/compilation/compiler-structure.d.ts +1 -1
  284. package/dist-library/types/local/compilation/compiler-tables.d.ts +3 -2
  285. package/dist-library/types/local/compilation/compiler-validation.d.ts +5 -9
  286. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -1
  287. package/dist-library/types/local/compilation/compiler.d.ts +1 -1
  288. package/dist-library/types/local/compilation/component-usage.d.ts +2 -0
  289. package/dist-library/types/local/compilation/runtime-requirement.d.ts +3 -0
  290. package/dist-library/types/local/compilation/session/incremental.d.ts +5 -1
  291. package/dist-library/types/local/compilation/streaming.d.ts +1 -1
  292. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +55 -0
  293. package/dist-library/types/local/configuration/embedding.d.ts +4 -0
  294. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +1 -1
  295. package/dist-library/types/local/configuration/options-core.d.ts +8 -2
  296. package/dist-library/types/local/index.d.ts +6 -1
  297. package/dist-library/types/local/observability-core.d.ts +20 -1
  298. package/dist-library/types/local/observability.d.ts +2 -0
  299. package/dist-library/types/local/parsing/parse-budget.d.ts +18 -2
  300. package/dist-library/types/local/parsing/parser-region.d.ts +13 -2
  301. package/dist-library/types/local/parsing/parser-tags.d.ts +6 -1
  302. package/dist-library/types/local/parsing/rmd-recovery.d.ts +8 -0
  303. package/dist-library/types/local/performance-report.d.ts +70 -0
  304. package/dist-library/types/local/runtime/runtime-pool.d.ts +14 -0
  305. package/dist-library/types/local/transport/worker-handler.d.ts +3 -0
  306. package/dist-library/types/local/transport/worker-job.d.ts +12 -2
  307. package/dist-library/types/local/transport/worker-pool.d.ts +68 -0
  308. package/dist-library/types/local/transport/worker.d.ts +14 -0
  309. package/dist-library/types/local/types.d.ts +37 -25
  310. package/dist-library/types/observability.d.ts +1 -0
  311. package/dist-library/types/presets/default-semantics.d.ts +1 -1
  312. package/dist-library/types/presets/identity.d.ts +1 -8
  313. package/dist-library/types/presets/pack-style-entry.d.ts +3 -0
  314. package/dist-library/types/presets/pack-style-manifest.d.ts +11 -0
  315. package/dist-library/types/react/component-api.d.ts +3 -2
  316. package/dist-library/types/react/component-loader.d.ts +61 -0
  317. package/dist-library/types/react/component-primitives.d.ts +5 -5
  318. package/dist-library/types/react/index.d.ts +9 -5
  319. package/dist-library/types/react/localization.d.ts +5 -6
  320. package/dist-library/types/react/minimal.d.ts +2 -2
  321. package/dist-library/types/react/package-core.d.ts +3 -0
  322. package/dist-library/types/react/packed.d.ts +17 -0
  323. package/dist-library/types/react/render-lifecycle.d.ts +9 -0
  324. package/dist-library/types/{local → react}/rendering/document/ExtendedHtmlFragment.d.ts +1 -1
  325. package/dist-library/types/{local → react}/rendering/document/LocalDocumentViewCore.d.ts +11 -4
  326. package/dist-library/types/react/rendering/document/LocalPooledDocumentView.d.ts +8 -0
  327. package/dist-library/types/react/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  328. package/dist-library/types/react/rendering/document/LocalStaticDocumentView.d.ts +18 -0
  329. package/dist-library/types/react/rendering/document/StaticExternalSlot.d.ts +25 -0
  330. package/dist-library/types/react/rendering/document/StaticHostData.d.ts +14 -0
  331. package/dist-library/types/{local → react}/rendering/document/render-nodes.d.ts +8 -8
  332. package/dist-library/types/react/rendering/document/static-runtime.d.ts +11 -0
  333. package/dist-library/types/{local → react}/rendering/document/use-author-script.d.ts +2 -2
  334. package/dist-library/types/{local → react}/rendering/document/validation-state.d.ts +2 -2
  335. package/dist-library/types/{local → react}/rendering/document/view-render-context.d.ts +40 -8
  336. package/dist-library/types/{local → react}/rendering/document/view-revision.d.ts +2 -2
  337. package/dist-library/types/{local → react}/rendering/render-types.d.ts +5 -5
  338. package/dist-library/types/react/rendering/table/data-table.d.ts +5 -0
  339. package/dist-library/types/{local → react}/rendering/table/table-numeric-columns.d.ts +3 -3
  340. package/dist-library/types/react/sdk-core.d.ts +12 -3
  341. package/dist-library/types/react/sdk.d.ts +2 -1
  342. package/dist-library/types/react/server.d.ts +3 -10
  343. package/dist-library/types/react/static-server.d.ts +12 -0
  344. package/dist-library/types/scan/index.d.ts +15 -0
  345. package/dist-library/types/sdk/config.d.ts +2 -35
  346. package/dist-library/types/sdk/default-identity.d.ts +3 -0
  347. package/dist-library/types/sdk/index.d.ts +1 -1
  348. package/dist-library/types/sdk/preset.d.ts +9 -0
  349. package/dist-library/types/sdk/props.d.ts +8 -3
  350. package/dist-library/types/sdk/registry-core.d.ts +2 -2
  351. package/dist-library/types/sdk/registry.d.ts +2 -18
  352. package/dist-library/types/sdk/types.d.ts +2 -2
  353. package/dist-library/types/sdk/version.d.ts +2 -0
  354. package/dist-library/types/standalone/session-core.d.ts +1 -1
  355. package/dist-library/{types-Ib5kSScP.js → types-Bza88SGK.js} +1 -1
  356. package/dist-library/use-hydrated-W-laKPhY.js +22975 -0
  357. package/dist-library/validation-XXlb-spV.js +860 -0
  358. package/dist-library/{version-DAxuGOG2.js → version-B0G1699c.js} +24 -33
  359. package/dist-library/visual-frame-y5RFhJ0_.js +19 -0
  360. package/dist-library/visual-helpers-CRmaqCHX.js +75 -0
  361. package/dist-library/visuals-CdHezgh5.js +3 -0
  362. package/dist-library/visuals-CoVSjVD8.js +49159 -0
  363. package/dist-library/worker-D6WMV8xJ.js +1632 -0
  364. package/dist-standalone/reactive-md-standalone.css +1 -1
  365. package/dist-standalone/reactive-md-standalone.js +121 -120
  366. package/docs/README-ch.md +102 -101
  367. package/docs/README.md +102 -101
  368. package/docs/compatibility/compatibility-ch.md +146 -146
  369. package/docs/compatibility/compatibility-en.md +146 -146
  370. package/docs/compatibility/deprecation-ch.md +1 -1
  371. package/docs/compatibility/deprecation-en.md +1 -1
  372. package/docs/compatibility/source-versioning-ch.md +162 -162
  373. package/docs/compatibility/source-versioning-en.md +162 -162
  374. package/docs/compatibility/support-matrix-ch.md +1 -1
  375. package/docs/compatibility/support-matrix-en.md +1 -1
  376. package/docs/development/component-development-ch.md +66 -66
  377. package/docs/development/component-development-en.md +66 -66
  378. package/docs/development/component-development-reference-ch.md +269 -253
  379. package/docs/development/component-development-reference-en.md +254 -238
  380. package/docs/development/component-protocol-ch.md +768 -748
  381. package/docs/development/component-protocol-en.md +770 -750
  382. package/docs/development/extension-tutorial-ch.md +308 -308
  383. package/docs/development/extension-tutorial-en.md +308 -308
  384. package/docs/development/performance-overview-ch.md +422 -422
  385. package/docs/development/performance-overview-en.md +422 -422
  386. package/docs/guides/local-guide-ch.md +532 -532
  387. package/docs/guides/local-guide-en.md +532 -532
  388. package/docs/integration/author-tools-ch.md +66 -64
  389. package/docs/integration/author-tools-en.md +66 -64
  390. package/docs/integration/compiler-ch.md +90 -49
  391. package/docs/integration/compiler-en.md +77 -36
  392. package/docs/integration/directory-discovery-en.md +1 -1
  393. package/docs/integration/editor-ch.md +295 -295
  394. package/docs/integration/editor-en.md +303 -303
  395. package/docs/integration/extension-sdk-ch.md +398 -394
  396. package/docs/integration/extension-sdk-en.md +383 -379
  397. package/docs/integration/local-integration-ch.md +648 -646
  398. package/docs/integration/local-integration-en.md +664 -662
  399. package/docs/integration/shareable-export-ch.md +307 -307
  400. package/docs/integration/shareable-export-en.md +309 -309
  401. package/docs/reference/diagnostics-counting-ch.md +104 -104
  402. package/docs/reference/diagnostics-counting-en.md +104 -104
  403. package/docs/reference/html-compatibility-ch.md +93 -93
  404. package/docs/reference/html-compatibility-en.md +95 -95
  405. package/docs/reference/local-interaction-syntax-ch.md +724 -724
  406. package/docs/reference/local-interaction-syntax-en.md +722 -722
  407. package/docs/reference/public-api-ch.md +114 -7
  408. package/docs/reference/public-api-en.md +114 -7
  409. package/docs/reference/theme-protocol-ch.md +198 -198
  410. package/docs/reference/theme-protocol-en.md +217 -217
  411. package/docs/releases/release-0.4.0-ch.md +91 -91
  412. package/docs/releases/release-0.4.0-en.md +91 -91
  413. package/docs/releases/release-0.4.1-ch.md +25 -25
  414. package/docs/releases/release-0.4.1-en.md +25 -25
  415. package/docs/releases/release-0.5.0-ch.md +43 -43
  416. package/docs/releases/release-0.5.0-en.md +43 -43
  417. package/docs/releases/release-0.5.1-ch.md +41 -41
  418. package/docs/releases/release-0.5.1-en.md +41 -41
  419. package/docs/releases/release-0.5.2-ch.md +37 -37
  420. package/docs/releases/release-0.5.2-en.md +37 -37
  421. package/docs/releases/release-0.5.3-ch.md +26 -26
  422. package/docs/releases/release-0.5.3-en.md +26 -26
  423. package/docs/releases/release-0.6.0-ch.md +59 -59
  424. package/docs/releases/release-0.6.0-en.md +59 -59
  425. package/docs/releases/release-0.6.1-ch.md +29 -29
  426. package/docs/releases/release-0.6.1-en.md +29 -29
  427. package/docs/releases/release-0.7.0-ch.md +86 -86
  428. package/docs/releases/release-0.7.0-en.md +86 -86
  429. package/docs/releases/release-0.9.3-ch.md +45 -0
  430. package/docs/releases/release-0.9.3-en.md +45 -0
  431. package/examples/component-package/README-ch.md +101 -101
  432. package/examples/component-package/README.md +133 -133
  433. package/examples/conformance/README-ch.md +55 -55
  434. package/examples/conformance/README.md +55 -55
  435. package/examples/conformance/component-protocol-1.json +482 -482
  436. package/examples/conformance/component-protocol-1.schema.json +76 -76
  437. package/examples/conformance/local-draft-1.json +50 -50
  438. package/examples/conformance/local-draft-2.json +212 -212
  439. package/examples/game-2048-package/LICENSE +21 -21
  440. package/examples/game-2048-package/NOTICES.md +11 -11
  441. package/examples/game-2048-package/README-ch.md +91 -91
  442. package/examples/game-2048-package/README.md +98 -98
  443. package/examples/game-2048-package/package.json +35 -35
  444. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  445. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  446. package/examples/game-2048-package/scripts/build.mjs +130 -130
  447. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  448. package/examples/game-2048-package/src/component.css +161 -161
  449. package/examples/game-2048-package/src/components.tsx +326 -326
  450. package/examples/game-2048-package/src/game-engine.ts +228 -228
  451. package/examples/game-2048-package/src/harness.tsx +34 -34
  452. package/examples/game-2048-package/src/manifest.ts +85 -85
  453. package/examples/game-2048-package/src/node-entry.ts +30 -30
  454. package/examples/game-2048-package/src/sample.ts +4 -4
  455. package/examples/game-2048-package/tsconfig.json +15 -15
  456. package/examples/integration/README-ch.md +114 -82
  457. package/examples/integration/README.md +114 -82
  458. package/examples/integration/chat-session/index.mjs +91 -0
  459. package/examples/integration/chat-session/package.json +10 -0
  460. package/examples/integration/core/index.mjs +32 -32
  461. package/examples/integration/extension-sdk/README-ch.md +24 -24
  462. package/examples/integration/extension-sdk/README.md +24 -24
  463. package/examples/integration/static-embed/embed.mjs +44 -0
  464. package/examples/integration/static-embed/index.html +12 -0
  465. package/examples/integration/static-embed/main.mjs +24 -0
  466. package/examples/integration/static-embed/references.mjs +5 -0
  467. package/examples/integration/static-embed/render.mjs +10 -0
  468. package/examples/integration/worker/index.html +19 -19
  469. package/examples/integration/worker/main.js +61 -61
  470. package/examples/integration/worker/package.json +13 -13
  471. package/examples/integration/worker/worker.js +3 -3
  472. package/examples/local/README-ch.md +76 -76
  473. package/examples/local/README.md +76 -76
  474. package/examples/local/charts.reactive.md +73 -73
  475. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  476. package/examples/local/recipes/invoice.reactive.md +36 -36
  477. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  478. package/examples/local/recipes/workshop.reactive.md +33 -33
  479. package/examples/local/showcase/README-ch.md +22 -22
  480. package/examples/local/showcase/README.md +31 -31
  481. package/examples/local/showcase/explore.reactive.md +102 -102
  482. package/examples/local/showcase/flow.reactive.md +86 -86
  483. package/examples/local/showcase/forms.reactive.md +126 -126
  484. package/examples/local/showcase/functions.reactive.md +119 -119
  485. package/examples/local/showcase/layout.reactive.md +100 -100
  486. package/examples/local/showcase/statistics.reactive.md +108 -108
  487. package/examples/local/showcase/tasks.reactive.md +89 -89
  488. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  489. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  490. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  491. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  492. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  493. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  494. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  495. package/examples/minimal-extension/README-ch.md +78 -78
  496. package/examples/minimal-extension/README.md +78 -78
  497. package/examples/minimal-extension/index.html +15 -15
  498. package/examples/minimal-extension/package.json +26 -26
  499. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  500. package/examples/minimal-extension/scripts/build.mjs +32 -32
  501. package/examples/minimal-extension/scripts/export.mjs +72 -72
  502. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  503. package/examples/minimal-extension/src/extension.tsx +90 -90
  504. package/examples/minimal-extension/src/preview.tsx +12 -12
  505. package/examples/minimal-extension/src/source.ts +4 -4
  506. package/examples/minimal-extension/tsconfig.json +14 -14
  507. package/examples/sci-fi-theme/README-ch.md +133 -133
  508. package/examples/sci-fi-theme/README.md +148 -148
  509. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  510. package/examples/sci-fi-theme/demo/demo.css +638 -638
  511. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  512. package/examples/sci-fi-theme/demo/index.html +13 -13
  513. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  514. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  515. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  516. package/examples/sci-fi-theme/package.json +28 -28
  517. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  518. package/examples/sci-fi-theme/src/components.css +2370 -2370
  519. package/examples/sci-fi-theme/src/index.ts +6 -6
  520. package/examples/sci-fi-theme/src/notch.css +142 -142
  521. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  522. package/examples/sci-fi-theme/src/theme.ts +39 -39
  523. package/examples/sci-fi-theme/tsconfig.json +20 -20
  524. package/examples/sci-fi-theme/vite.config.ts +24 -24
  525. package/examples/tetris-package/LICENSE +21 -21
  526. package/examples/tetris-package/NOTICES.md +11 -11
  527. package/examples/tetris-package/README-ch.md +91 -91
  528. package/examples/tetris-package/README.md +95 -95
  529. package/examples/tetris-package/package.json +35 -35
  530. package/examples/tetris-package/sample/document.reactive.md +16 -16
  531. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  532. package/examples/tetris-package/scripts/build.mjs +130 -130
  533. package/examples/tetris-package/scripts/verify.mjs +173 -173
  534. package/examples/tetris-package/src/component.css +145 -145
  535. package/examples/tetris-package/src/components.tsx +334 -334
  536. package/examples/tetris-package/src/harness.tsx +34 -34
  537. package/examples/tetris-package/src/manifests.ts +93 -93
  538. package/examples/tetris-package/src/node-entry.ts +16 -16
  539. package/examples/tetris-package/src/sample.ts +4 -4
  540. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  541. package/examples/tetris-package/tsconfig.json +15 -15
  542. package/package.json +61 -2
  543. package/dist-library/LocalDocumentView-BuqgJZEY.js +0 -109
  544. package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +0 -275
  545. package/dist-library/compiler-dxLPB9Ym.js +0 -86
  546. package/dist-library/config-validation-D3D7Dy2J.js +0 -586
  547. package/dist-library/controls-DoZyLCrV.js +0 -6740
  548. package/dist-library/mount-preset-DMZ5wd3t.js +0 -13
  549. package/dist-library/options-BBp9IcHm.js +0 -121
  550. package/dist-library/package-core-K5xesGqy.js +0 -117
  551. package/dist-library/parser-standard-CBA1-hdG.js +0 -9630
  552. package/dist-library/plugin-packs-Bh1HhLym.js +0 -19
  553. package/dist-library/props-sJ8vk0cr.js +0 -183
  554. package/dist-library/react-0DCh-Mar.js +0 -7
  555. package/dist-library/resources-B0x_w3s9.js +0 -229
  556. package/dist-library/schema-BryM_VRW.js +0 -40
  557. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +0 -6
  558. package/dist-library/types/local/rendering/table/data-table.d.ts +0 -13
  559. package/dist-library/validation-B3RI0xOk.js +0 -1123
  560. package/dist-library/visual-frame-_rcd5HUv.js +0 -48
  561. package/dist-library/visuals-DkDhNdEZ.js +0 -72572
  562. /package/dist-library/types/{local/configuration → contracts}/color-values.d.ts +0 -0
  563. /package/dist-library/types/{local/html → contracts}/html-names.d.ts +0 -0
  564. /package/dist-library/types/{local/configuration → contracts}/schema-core.d.ts +0 -0
  565. /package/dist-library/types/{local → react}/rendering/code/code-block.d.ts +0 -0
  566. /package/dist-library/types/{local → react}/rendering/code/code-languages.d.ts +0 -0
  567. /package/dist-library/types/{local → react}/rendering/document/LocalDocumentView.d.ts +0 -0
  568. /package/dist-library/types/{local → react}/rendering/document/use-color-scheme.d.ts +0 -0
  569. /package/dist-library/types/{local → react}/rendering/image/image-view.d.ts +0 -0
  570. /package/dist-library/types/{local → react}/rendering/math-view.d.ts +0 -0
@@ -1,1123 +0,0 @@
1
- import { D as e, _ as t, g as n, i as r, o as i, r as a, t as o, v as s, w as c, y as l } from "./version-DAxuGOG2.js";
2
- import { v as u } from "./document-theme-C8J6UyNO.js";
3
- import { a as d, n as f, s as p, t as m } from "./compile-Dx6Uw3D9.js";
4
- import { C as h, S as g, _, a as v, c as y, d as b, h as x, i as S, m as C, n as w, o as T, p as ee, r as E, s as te, t as ne, v as re, w as D, x as O, y as ie } from "./config-validation-D3D7Dy2J.js";
5
- import { A as ae, N as oe, a as se, i as ce, t as le } from "./preset-core-DeZPA8IE.js";
6
- import { n as ue } from "./props-sJ8vk0cr.js";
7
- import { p as de, r as fe, x as pe } from "./registry-core-C9xOunaw.js";
8
- // node_modules/devlop/lib/default.js
9
- function me() {}
10
- // node_modules/mdast-util-to-string/lib/index.js
11
- var he = {};
12
- function ge(e, t) {
13
- let n = t || he;
14
- return _e(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
15
- }
16
- function _e(e, t, n) {
17
- if (ye(e)) {
18
- if ("value" in e) return e.type === "html" && !n ? "" : e.value;
19
- if (t && "alt" in e && e.alt) return e.alt;
20
- if ("children" in e) return ve(e.children, t, n);
21
- }
22
- return Array.isArray(e) ? ve(e, t, n) : "";
23
- }
24
- function ve(e, t, n) {
25
- let r = [], i = -1;
26
- for (; ++i < e.length;) r[i] = _e(e[i], t, n);
27
- return r.join("");
28
- }
29
- function ye(e) {
30
- return !!(e && typeof e == "object");
31
- }
32
- // node_modules/micromark-util-chunked/index.js
33
- function k(e, t, n, r) {
34
- let i = e.length, a = 0, o;
35
- if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
36
- else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
37
- }
38
- function be(e, t) {
39
- return e.length > 0 ? (k(e, e.length, 0, t), e) : t;
40
- }
41
- // node_modules/micromark-util-combine-extensions/index.js
42
- var A = {}.hasOwnProperty;
43
- function xe(e) {
44
- let t = {}, n = -1;
45
- for (; ++n < e.length;) Se(t, e[n]);
46
- return t;
47
- }
48
- function Se(e, t) {
49
- let n;
50
- for (n in t) {
51
- let r = (A.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
52
- if (i) for (a in i) {
53
- A.call(r, a) || (r[a] = []);
54
- let e = i[a];
55
- Ce(r[a], Array.isArray(e) ? e : e ? [e] : []);
56
- }
57
- }
58
- }
59
- function Ce(e, t) {
60
- let n = -1, r = [];
61
- for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
62
- k(e, 0, 0, r);
63
- }
64
- // node_modules/micromark-util-normalize-identifier/index.js
65
- function we(e) {
66
- return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
67
- }
68
- // node_modules/micromark-util-character/index.js
69
- var Te = I(/[A-Za-z]/), Ee = I(/[\dA-Za-z]/), De = I(/[#-'*+\--9=?A-Z^-~]/);
70
- function Oe(e) {
71
- return e !== null && (e < 32 || e === 127);
72
- }
73
- var ke = I(/\d/), Ae = I(/[\dA-Fa-f]/), je = I(/[!-/:-@[-`{-~]/);
74
- function j(e) {
75
- return e !== null && e < -2;
76
- }
77
- function M(e) {
78
- return e !== null && (e < 0 || e === 32);
79
- }
80
- function N(e) {
81
- return e === -2 || e === -1 || e === 32;
82
- }
83
- var P = I(/\p{P}|\p{S}/u), F = I(/\s/);
84
- function I(e) {
85
- return t;
86
- function t(t) {
87
- return t !== null && t > -1 && e.test(String.fromCharCode(t));
88
- }
89
- }
90
- // node_modules/micromark-factory-space/index.js
91
- function L(e, t, n, r) {
92
- let i = r ? r - 1 : Infinity, a = 0;
93
- return o;
94
- function o(r) {
95
- return N(r) ? (e.enter(n), s(r)) : t(r);
96
- }
97
- function s(r) {
98
- return N(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
99
- }
100
- }
101
- function Me(e, t, n, r, i, a) {
102
- let o = 0;
103
- return s;
104
- function s(t) {
105
- return a > 0 && N(t) ? (e.enter(r), c(t)) : l(t);
106
- }
107
- function c(t) {
108
- return N(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
109
- }
110
- function l(e) {
111
- return o >= i ? t(e) : n(e);
112
- }
113
- }
114
- // node_modules/micromark-util-classify-character/index.js
115
- function Ne(e) {
116
- if (e === null || M(e) || F(e)) return 1;
117
- if (P(e)) return 2;
118
- }
119
- // node_modules/micromark-util-resolve-all/index.js
120
- function Pe(e, t, n) {
121
- let r = [], i = -1;
122
- for (; ++i < e.length;) {
123
- let a = e[i].resolveAll;
124
- a && !r.includes(a) && (t = a(t, n), r.push(a));
125
- }
126
- return t;
127
- }
128
- // node_modules/micromark-core-commonmark/lib/blank-line.js
129
- var Fe = {
130
- partial: !0,
131
- tokenize: Ie
132
- };
133
- function Ie(e, t, n) {
134
- return r;
135
- function r(t) {
136
- return N(t) ? L(e, i, "linePrefix")(t) : i(t);
137
- }
138
- function i(e) {
139
- return e === null || j(e) ? t(e) : n(e);
140
- }
141
- }
142
- // src/local/html/html-table-names.ts
143
- var Le = /* @__PURE__ */ new Set([
144
- "table",
145
- "caption",
146
- "colgroup",
147
- "col",
148
- "thead",
149
- "tbody",
150
- "tfoot",
151
- "tr",
152
- "th",
153
- "td"
154
- ]), R = {
155
- colgroup: /* @__PURE__ */ new Set(["span"]),
156
- col: /* @__PURE__ */ new Set(["span"]),
157
- td: /* @__PURE__ */ new Set([
158
- "colspan",
159
- "rowspan",
160
- "headers",
161
- "align"
162
- ]),
163
- th: /* @__PURE__ */ new Set([
164
- "colspan",
165
- "rowspan",
166
- "headers",
167
- "scope",
168
- "abbr",
169
- "align"
170
- ])
171
- };
172
- function z(e, t) {
173
- let n = t.trim();
174
- return [
175
- "colspan",
176
- "rowspan",
177
- "span"
178
- ].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? D(t) !== null : e !== "scope" || [
179
- "row",
180
- "col",
181
- "rowgroup",
182
- "colgroup"
183
- ].includes(n.toLowerCase());
184
- }
185
- // src/local/html/html-policy.ts
186
- var Re = {
187
- b: "strong",
188
- strong: "strong",
189
- i: "emphasis",
190
- em: "emphasis",
191
- s: "delete",
192
- del: "delete",
193
- u: "underline",
194
- mark: "mark",
195
- sup: "sup",
196
- sub: "sub"
197
- }, ze = /* @__PURE__ */ new Set([
198
- "br",
199
- "hr",
200
- "img",
201
- "col"
202
- ]), Be = /* @__PURE__ */ new Set([
203
- "pre",
204
- "code",
205
- "script",
206
- "style",
207
- "textarea",
208
- "title",
209
- "xmp",
210
- "iframe",
211
- "noembed",
212
- "noframes",
213
- "plaintext"
214
- ]), Ve = /* @__PURE__ */ new Set([
215
- "id",
216
- "title",
217
- "lang",
218
- "dir"
219
- ]), He = {
220
- a: g,
221
- img: /* @__PURE__ */ new Set([
222
- "src",
223
- "alt",
224
- "width",
225
- "height"
226
- ]),
227
- ol: /* @__PURE__ */ new Set(["start"]),
228
- details: /* @__PURE__ */ new Set(["open"]),
229
- ...R
230
- };
231
- function Ue(e, t, n) {
232
- let r = "";
233
- for (let i = t; i < n; i += 1) {
234
- let t = e[i];
235
- if (r) t === r && (r = "");
236
- else if (t === "\"" || t === "'") r = t;
237
- else if (t === ">") return i + 1;
238
- }
239
- return -1;
240
- }
241
- function We(e, t, n) {
242
- if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
243
- if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
244
- let r = e.indexOf("-->", t + 4);
245
- return r < 0 || r + 3 > n ? n : r + 3;
246
- }
247
- function Ge(e) {
248
- return e.trim().replace(/[\u0000- ]+/g, "");
249
- }
250
- function B(e, t) {
251
- let n = /^([a-z][a-z0-9+.-]*):/i.exec(Ge(e));
252
- if (!n) return !1;
253
- let r = n[1].toLowerCase();
254
- return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
255
- }
256
- function Ke(e, t) {
257
- return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && O.has(e) || Ve.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : He[e]?.has(t) ?? !1;
258
- }
259
- function qe(e, t) {
260
- return !(e === "dir" && ![
261
- "ltr",
262
- "rtl",
263
- "auto"
264
- ].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !z(e, t) || e === "href" && B(t, "link") || e === "src" && B(t, "image"));
265
- }
266
- function Je(e, t) {
267
- return O.has(e) ? D(t) : null;
268
- }
269
- // src/local/parsing/parser-capabilities.ts
270
- var Ye = Object.freeze({}), Xe = Object.freeze([
271
- "anchor",
272
- "checkbox",
273
- "column",
274
- "coordinate",
275
- "counter",
276
- "date",
277
- "edge",
278
- "input",
279
- "number",
280
- "progress",
281
- "range-slider",
282
- "slider",
283
- "textarea",
284
- "timer",
285
- "toggle",
286
- "validation"
287
- ]);
288
- function Ze(e) {
289
- let t = /* @__PURE__ */ new Set();
290
- for (let n of Xe) e(n) || t.add(n);
291
- return t;
292
- }
293
- // src/sdk/compiler-config.ts
294
- var V = Object.freeze({
295
- id: ce,
296
- version: se
297
- }), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap();
298
- function W(e, t = V) {
299
- if (e.length === 0) return;
300
- let n = t.id === V.id && t.version === V.version;
301
- if (n) {
302
- let t = H.get(e);
303
- if (t) return t;
304
- }
305
- let r = le({
306
- protocol: i,
307
- id: t.id,
308
- version: t.version,
309
- components: e
310
- });
311
- return n && H.set(e, r), r;
312
- }
313
- function G(e, t, n, r, i = "reactive-md-config/v1") {
314
- let a = x(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
315
- profile: i,
316
- key: r
317
- })] : []];
318
- return b(e, a, o);
319
- }
320
- function Qe(e) {
321
- return v(e) || S("assembly", "must be an object."), E(e, /* @__PURE__ */ new Set([
322
- "protocol",
323
- "presets",
324
- "components",
325
- "replacementPolicy",
326
- "themes"
327
- ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && S("assembly.protocol", `must be "${o}".`), C(e);
328
- }
329
- function $e(e, t = [], n = []) {
330
- let i = re(n);
331
- if (v(e) || S("config", "must be an object."), E(e, ne, "config"), e.protocol === "reactive-md-config/v2") {
332
- let n = Qe(e.assembly), r = G(n, t, i);
333
- return ae(n) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), r;
334
- }
335
- e.protocol !== "reactive-md-config/v1" && S("config.protocol", `must be "${r}" (or legacy "${a}").`);
336
- let s = te(e.presets, V, i)[0] ?? V, c = _(s, i);
337
- c === void 0 && S("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${s.id}" ${s.version}.`);
338
- let l = c.legacyKeys[0];
339
- l === void 0 && S("presets", `local.config.migration-unsupported: profile "${c.name}" has no legacy key mapping.`), y(c, t);
340
- let u = T(e.components, t);
341
- u.some((e) => e.replaces !== void 0) && S("config", "replaces is not supported by reactive-md-config/v1.");
342
- let d = W(t, c.preset), f = Object.freeze({
343
- protocol: o,
344
- presets: Object.freeze(d ? [d] : []),
345
- components: u,
346
- replacementPolicy: "forbid",
347
- themes: Object.freeze([])
348
- }), p = G(f, t, i, t.length > 0 ? ee(c.preset, u) : void 0, l.profile);
349
- return ae(f) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), p;
350
- }
351
- function et(e) {
352
- let t = U.get(e);
353
- if (t !== void 0) return t;
354
- let n = W(e), r = Object.freeze({
355
- protocol: o,
356
- presets: Object.freeze(n ? [n] : []),
357
- components: Object.freeze([]),
358
- replacementPolicy: "forbid",
359
- themes: Object.freeze([])
360
- }), i = x(r).key;
361
- return U.set(e, i), i;
362
- }
363
- // src/local/configuration/capability-policy.ts
364
- var K = Object.freeze({
365
- enableCss: !0,
366
- enableJavaScript: !1,
367
- enableExtendedHtml: !1
368
- });
369
- function tt(e, t) {
370
- return {
371
- enableCss: e?.enableCss === !0 && (t?.enableCss ?? K.enableCss) === !0,
372
- enableJavaScript: e?.enableJavaScript === !0 && t?.enableJavaScript === !0,
373
- enableExtendedHtml: e?.enableExtendedHtml === !0 && t?.enableExtendedHtml === !0
374
- };
375
- }
376
- // src/local/configuration/options-core.ts
377
- var nt = [
378
- "enableCss",
379
- "enableJavaScript",
380
- "enableExtendedHtml"
381
- ], rt = V;
382
- function q(e) {
383
- return typeof e == "object" && !!e && !Array.isArray(e);
384
- }
385
- var it = "local.options.invalid.host-components", at = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ot = /* @__PURE__ */ new Set([
386
- "string",
387
- "number",
388
- "boolean",
389
- "enum"
390
- ]), st = /* @__PURE__ */ new Set([
391
- "leaf",
392
- "inline",
393
- "container"
394
- ]), ct = /* @__PURE__ */ new Set([
395
- "string",
396
- "number",
397
- "boolean"
398
- ]), lt = /* @__PURE__ */ new Set([
399
- "bind",
400
- "initial",
401
- "disabled"
402
- ]), ut = /* @__PURE__ */ new Set([
403
- "maxSyntaxNodes",
404
- "maxParseWork",
405
- "maxMarkdownDepth"
406
- ]);
407
- function J(e, t, n) {
408
- if (!Object.hasOwn(e, t)) return {
409
- ok: !0,
410
- value: n
411
- };
412
- let r = e[t];
413
- if (r === void 0) return {
414
- ok: !0,
415
- value: n
416
- };
417
- if (typeof r != "number" || !Number.isSafeInteger(r) || r < 1) {
418
- let e = t === "maxSyntaxNodes" ? "max-syntax-nodes" : t === "maxParseWork" ? "max-parse-work" : "max-markdown-depth";
419
- return {
420
- ok: !1,
421
- message: `Compile option limits.${t} must be a positive safe integer.`,
422
- key: `local.options.invalid.${e}`
423
- };
424
- }
425
- return {
426
- ok: !0,
427
- value: r
428
- };
429
- }
430
- function Y(e) {
431
- return {
432
- ok: !1,
433
- message: `Compile option hostComponents is invalid: ${e}`,
434
- key: it,
435
- detail: e
436
- };
437
- }
438
- function dt(e, t) {
439
- if (e === void 0) return {
440
- ok: !0,
441
- binding: void 0
442
- };
443
- if (!q(e)) return Y(`${t} "binding" must be an object.`);
444
- for (let n of Object.keys(e)) if (![
445
- "kind",
446
- "initialRule",
447
- "min",
448
- "max",
449
- "step",
450
- "options",
451
- "exclusive"
452
- ].includes(n)) return Y(`${t} "binding" has unknown field "${n}".`);
453
- let n = e.kind;
454
- if (typeof n != "string" || !ct.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
455
- let r = { kind: n };
456
- if (Object.hasOwn(e, "exclusive") && e.exclusive !== void 0) {
457
- if (typeof e.exclusive != "boolean") return Y(`${t} "binding.exclusive" must be a boolean.`);
458
- r.exclusive = e.exclusive;
459
- }
460
- if (Object.hasOwn(e, "initialRule") && e.initialRule !== void 0) {
461
- let n = e.initialRule;
462
- if (typeof n != "string" || ![
463
- "empty",
464
- "false",
465
- "nearest-zero",
466
- "min",
467
- "first-option"
468
- ].includes(n)) return Y(`${t} "binding.initialRule" is not supported.`);
469
- r.initialRule = n;
470
- }
471
- for (let n of [
472
- "min",
473
- "max",
474
- "step"
475
- ]) {
476
- if (!Object.hasOwn(e, n) || e[n] === void 0) continue;
477
- if (r.kind !== "number") return Y(`${t} "binding.${n}" is only valid for number bindings.`);
478
- let i = e[n];
479
- if (typeof i != "number" || !Number.isFinite(i)) return Y(`${t} "binding.${n}" must be a finite number.`);
480
- r[n] = i;
481
- }
482
- if (r.kind === "number") {
483
- if (r.step !== void 0 && !(r.step > 0)) return Y(`${t} "binding.step" must be greater than 0.`);
484
- if (r.min !== void 0 && r.max !== void 0 && r.min > r.max) return Y(`${t} "binding.min" cannot exceed "binding.max".`);
485
- if (r.initialRule !== void 0 && !["min", "nearest-zero"].includes(r.initialRule)) return Y(`${t} "binding.initialRule" must be "min" or "nearest-zero" for number bindings.`);
486
- r.initialRule ??= "nearest-zero";
487
- }
488
- let i = Object.hasOwn(e, "options") && e.options !== void 0;
489
- if (i) {
490
- if (r.kind !== "string") return Y(`${t} "binding.options" is only valid for string bindings.`);
491
- let n = e.options;
492
- if (!Array.isArray(n) || n.length === 0) return Y(`${t} "binding.options" must be a non-empty string array.`);
493
- if (n.length > 64) return Y(`${t} "binding.options" accepts at most 64 values.`);
494
- let i = /* @__PURE__ */ new Set(), a = [];
495
- for (let e of n) {
496
- if (typeof e != "string" || e === "") return Y(`${t} "binding.options" must be a non-empty string array.`);
497
- if (e.length > 128) return Y(`${t} "binding.options" value exceeds the 128-character limit.`);
498
- if (i.has(e)) return Y(`${t} "binding.options" value "${e}" is declared more than once.`);
499
- i.add(e), a.push(e);
500
- }
501
- r.options = a, r.initialRule ??= "first-option";
502
- }
503
- if (r.kind === "string") {
504
- let e = i ? "first-option" : "empty";
505
- if (r.initialRule !== void 0 && r.initialRule !== e) return Y(`${t} "binding.initialRule" must be "${e}" for ${i ? "choice" : "string"} bindings.`);
506
- r.initialRule ??= e;
507
- }
508
- if (r.kind === "boolean") {
509
- if (r.initialRule !== void 0 && r.initialRule !== "false") return Y(`${t} "binding.initialRule" must be "false" for boolean bindings.`);
510
- r.initialRule ??= "false";
511
- }
512
- return {
513
- ok: !0,
514
- binding: r
515
- };
516
- }
517
- function ft(e, t) {
518
- let n = [], r = /* @__PURE__ */ new Map();
519
- if (e === void 0) return {
520
- ok: !0,
521
- hostComponents: n,
522
- hostByName: r
523
- };
524
- if (!Array.isArray(e)) return Y("must be an array.");
525
- if (e.length > 32) return Y("accepts at most 32 components.");
526
- let i = /* @__PURE__ */ new Set();
527
- for (let e of t) i.add(e.name.toLowerCase());
528
- for (let e of ie) i.add(e.name.toLowerCase());
529
- for (let e of h) i.add(e.toLowerCase());
530
- i.add("theme");
531
- for (let t = 0; t < e.length; t += 1) {
532
- let a = e[t], o = `hostComponents[${t}]`;
533
- if (!q(a)) return Y(`${o} must be an object.`);
534
- let s = a.name;
535
- if (typeof s != "string") return Y(`${o} "name" must be a string.`);
536
- if (s.length > 128) return Y(`${o} "name" exceeds the 128-character limit.`);
537
- if (!at.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
538
- if (i.has(s.toLowerCase())) return Y(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);
539
- if (r.has(s.toLowerCase())) return Y(`${o} "name" ${s} is declared more than once.`);
540
- if (typeof a.form != "string" || !st.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
541
- let c = a.form, l = dt(a.binding, o);
542
- if (!l.ok) return l;
543
- let u = l.binding, d = a.props;
544
- if (!q(d)) return Y(`${o} "props" must be an object.`);
545
- let f = {};
546
- for (let e of Object.keys(d)) {
547
- if (!at.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
548
- if (u && lt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
549
- let t = d[e];
550
- if (!q(t)) return Y(`${o} property "${e}" must be an object.`);
551
- let n = t.kind;
552
- if (typeof n != "string" || !ot.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
553
- let r = { kind: n };
554
- for (let n of ["required", "static"]) if (Object.hasOwn(t, n) && t[n] !== void 0) {
555
- if (typeof t[n] != "boolean") return Y(`${o} property "${e}" "${n}" must be a boolean.`);
556
- r[n] = t[n];
557
- }
558
- let i = Object.hasOwn(t, "enum") && t.enum !== void 0;
559
- if (n !== "enum") {
560
- if (i) return Y(`${o} property "${e}" has "enum" but kind is "${n}".`);
561
- } else {
562
- let n = t.enum;
563
- if (!Array.isArray(n) || n.length === 0) return Y(`${o} property "${e}" "enum" must be a non-empty string array.`);
564
- if (n.length > 64) return Y(`${o} property "${e}" "enum" accepts at most 64 values.`);
565
- let i = /* @__PURE__ */ new Set();
566
- for (let t of n) {
567
- if (typeof t != "string") return Y(`${o} property "${e}" "enum" must be a non-empty string array.`);
568
- if (t.length > 128) return Y(`${o} property "${e}" enum value exceeds the 128-character limit.`);
569
- if (i.has(t)) return Y(`${o} property "${e}" enum value "${t}" is declared more than once.`);
570
- i.add(t);
571
- }
572
- r.enum = [...n];
573
- }
574
- let a = Object.hasOwn(t, "pattern") && t.pattern !== void 0;
575
- if (n !== "string") {
576
- if (a) return Y(`${o} property "${e}" has "pattern" but kind is "${n}".`);
577
- } else if (a) {
578
- let n = t.pattern;
579
- if (typeof n != "string") return Y(`${o} property "${e}" "pattern" must be a string.`);
580
- if (n.length > 512) return Y(`${o} property "${e}" "pattern" exceeds the 512-character limit.`);
581
- try {
582
- new RegExp(n);
583
- } catch {
584
- return Y(`${o} property "${e}" "pattern" is not a valid regular expression.`);
585
- }
586
- if (!oe(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
587
- r.pattern = n;
588
- }
589
- f[e] = r;
590
- }
591
- let p = {
592
- name: s,
593
- form: c,
594
- props: f,
595
- ...u ? { binding: u } : {}
596
- };
597
- n.push(p), r.set(s, p);
598
- }
599
- return {
600
- ok: !0,
601
- hostComponents: n,
602
- hostByName: r
603
- };
604
- }
605
- function pt(e) {
606
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
607
- }
608
- function mt(e) {
609
- let t = e.static === !0 || e.dynamic === !1;
610
- if (e.kind === "enum") {
611
- let n = `^(?:${(e.enum ?? []).map(pt).join("|")})$`;
612
- if (n.length <= 512) return {
613
- kind: "string",
614
- ...e.required === !0 ? { required: !0 } : {},
615
- ...t ? { static: !0 } : {},
616
- pattern: n
617
- };
618
- }
619
- let n = { kind: e.kind };
620
- return e.required === !0 && e.default === void 0 && (n.required = !0), t && (n.static = !0), e.enum && (n.enum = [...e.enum]), e.pattern !== void 0 && (n.pattern = e.pattern), n;
621
- }
622
- function ht(e) {
623
- let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
624
- for (let i of e.components) {
625
- let e = {};
626
- for (let t of Object.keys(i.props)) e[t] = mt(i.props[t]);
627
- let a = ue(i), o = {
628
- name: i.name,
629
- form: i.form,
630
- props: e,
631
- ...a ? { binding: a } : {}
632
- };
633
- t.push(o), n.set(i.name, o), r.set(i.name, i);
634
- }
635
- return {
636
- hostComponents: t,
637
- hostByName: n,
638
- sdkByName: r
639
- };
640
- }
641
- function X(e, t) {
642
- let n = /* @__PURE__ */ new Map();
643
- for (let t of e) n.set(t.name, t);
644
- let r = /* @__PURE__ */ new Map();
645
- for (let e of t.values()) r.set(e.name, e);
646
- for (let e of ie) r.has(e.name) || r.set(e.name, pe(e));
647
- return {
648
- componentByName: n,
649
- schemaByName: r
650
- };
651
- }
652
- function Z(e) {
653
- let t = /* @__PURE__ */ new Map();
654
- for (let n of e) t.set(n.name, fe(n));
655
- return t;
656
- }
657
- function gt(e, r) {
658
- let i = r.defaults, a = new Set(i.map((e) => e.name));
659
- if (e !== void 0 && !q(e)) return {
660
- ok: !1,
661
- message: "Compile options must be an object.",
662
- key: "local.options.invalid.object"
663
- };
664
- let o = e ?? {}, c = { ...K };
665
- for (let e of nt) {
666
- if (!Object.hasOwn(o, e)) continue;
667
- let t = o[e];
668
- if (t !== void 0) {
669
- if (typeof t != "boolean") return {
670
- ok: !1,
671
- message: `Compile option ${e} must be a boolean.`,
672
- key: "local.options.invalid.html-flag"
673
- };
674
- c[e] = t;
675
- }
676
- }
677
- let l = !1;
678
- if (Object.hasOwn(o, "markdownBreaks")) {
679
- let e = o.markdownBreaks;
680
- if (e !== void 0) {
681
- if (typeof e != "boolean") return {
682
- ok: !1,
683
- message: "Compile option markdownBreaks must be a boolean.",
684
- key: "local.options.invalid.markdown-breaks"
685
- };
686
- l = e;
687
- }
688
- }
689
- let u = !0;
690
- if (Object.hasOwn(o, "strict")) {
691
- let e = o.strict;
692
- if (e !== void 0) {
693
- if (typeof e != "boolean") return {
694
- ok: !1,
695
- message: "Compile option strict must be a boolean.",
696
- key: "local.options.invalid.strict"
697
- };
698
- u = e;
699
- }
700
- }
701
- if (Object.hasOwn(o, "sourcePhase")) {
702
- let e = o.sourcePhase;
703
- if (e !== void 0 && e !== "streaming" && e !== "final") return {
704
- ok: !1,
705
- message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
706
- key: "local.options.invalid.source-phase"
707
- };
708
- }
709
- let d = o.limits, f = s, p = t, m = n;
710
- if (d !== void 0) {
711
- if (!q(d)) return {
712
- ok: !1,
713
- message: "Compile option limits must be an object.",
714
- key: "local.options.invalid.limits"
715
- };
716
- for (let e of Object.keys(d)) if (!ut.has(e) && d[e] !== void 0) return {
717
- ok: !1,
718
- message: `Compile option limits.${e} is not supported.`,
719
- key: "local.options.invalid.limits-unknown",
720
- detail: e
721
- };
722
- let e = J(d, "maxSyntaxNodes", f);
723
- if (!e.ok) return e;
724
- f = e.value;
725
- let t = J(d, "maxParseWork", p);
726
- if (!t.ok) return t;
727
- p = t.value;
728
- let n = J(d, "maxMarkdownDepth", m);
729
- if (!n.ok) return n;
730
- m = n.value;
731
- }
732
- let h = Object.hasOwn(o, "config") && o.config !== void 0, g = Object.hasOwn(o, "hostComponents") && o.hostComponents !== void 0;
733
- if (h && g) return {
734
- ok: !1,
735
- message: "Compile option config cannot be combined with hostComponents.",
736
- key: "local.options.invalid.config-conflict"
737
- };
738
- let _, v, y, b, x, S, C, w, T;
739
- if (h) {
740
- try {
741
- _ = r.readConfig(o.config, i);
742
- } catch (e) {
743
- let t = e instanceof Error ? e.message : String(e);
744
- return {
745
- ok: !1,
746
- message: `Compile option config is invalid: ${t}`,
747
- key: "local.options.invalid.config",
748
- detail: t
749
- };
750
- }
751
- let e = ht(_);
752
- v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
753
- let t = X(x, Z(x));
754
- S = t.schemaByName, C = t.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
755
- } else if (g) {
756
- let e = ft(o.hostComponents, i);
757
- if (!e.ok) return e;
758
- v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = i;
759
- let t = Z(i);
760
- for (let [n, r] of e.hostByName) t.set(n, pe({
761
- ...r,
762
- legacyHost: !0
763
- }));
764
- let n = X(i, t);
765
- S = n.schemaByName, C = n.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
766
- } else {
767
- v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i;
768
- let e = X(i, Z(i));
769
- S = e.schemaByName, C = e.componentByName, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
770
- }
771
- return {
772
- ok: !0,
773
- maxSyntaxNodes: f,
774
- maxParseWork: p,
775
- maxMarkdownDepth: m,
776
- html: c,
777
- markdownBreaks: l,
778
- strict: u,
779
- hostComponents: v,
780
- hostByName: y,
781
- ..._ ? { config: _ } : {},
782
- sdkByName: b,
783
- registry: x,
784
- componentByName: C,
785
- schemaByName: S,
786
- defaultComponentNames: a,
787
- unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Ze((e) => S.has(e)) : /* @__PURE__ */ new Set(),
788
- externalComponentNames: w,
789
- legacyHostNames: T,
790
- componentConfigKey: _ ? r.configKey(_) : r.defaultConfigKey,
791
- capabilities: r.capabilities ?? Ye,
792
- ...r.preset ? { preset: r.preset } : {}
793
- };
794
- }
795
- function _t(e, t = [], n) {
796
- let r = t.length > 0 ? rt : void 0;
797
- return gt(e, {
798
- defaults: t,
799
- ...r ? { preset: r } : {},
800
- defaultConfigKey: et(t),
801
- readConfig: $e,
802
- configKey: (e) => e.key,
803
- ...n ? { capabilities: n } : {}
804
- });
805
- }
806
- function vt(e) {
807
- return e.componentConfigKey;
808
- }
809
- // src/local/configuration/kernel-value-rules.ts
810
- function Q(e) {
811
- let t = {};
812
- for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
813
- return t;
814
- }
815
- function yt(e) {
816
- let t = [];
817
- for (let n of de(e)) switch (n.kind) {
818
- case "value-date":
819
- t.push(Q({
820
- kind: "date",
821
- min: n.min,
822
- max: n.max,
823
- required: n.required
824
- }));
825
- break;
826
- case "value-length":
827
- t.push(Q({
828
- kind: "length",
829
- min: n.min,
830
- max: n.max
831
- })), (n.email !== void 0 || n.emailType !== void 0) && t.push(Q({
832
- kind: "email",
833
- type: n.email ?? "type",
834
- value: n.emailType ?? "email"
835
- }));
836
- break;
837
- case "value-email":
838
- t.push(Q({
839
- kind: "email",
840
- type: n.type ?? "type",
841
- value: n.value ?? "email"
842
- }));
843
- break;
844
- case "value-required": t.push({
845
- kind: "required",
846
- required: n.required
847
- });
848
- }
849
- return t;
850
- }
851
- function bt(e) {
852
- if (!e || typeof e != "object") return;
853
- let t = e.kernel;
854
- if (t && typeof t == "object") return t;
855
- }
856
- var xt = /^[A-Za-z_][A-Za-z0-9_-]*$/;
857
- function St(e) {
858
- return xt.test(e);
859
- }
860
- function Ct(e, t, n) {
861
- let r = [];
862
- for (let i of e) {
863
- let e = i.target;
864
- e ? e.startsWith("#") || /\s/.test(e) ? r.push({
865
- code: "local.jump.target",
866
- message: `<${i.name}> target "${e}" must be a bare heading slug or anchor id without "#" or whitespace.`,
867
- start: i.offset,
868
- key: "local.jump.bad-target",
869
- params: { target: e }
870
- }) : !t.has(e) && !n.has(e) && r.push({
871
- code: "local.jump.target",
872
- message: `<${i.name}> target "${e}" does not resolve to a heading or explicit anchor in this document.`,
873
- start: i.offset,
874
- key: "local.jump.unresolved",
875
- params: { target: e }
876
- }) : r.push({
877
- code: "local.jump.target",
878
- message: "<jump> target cannot be empty.",
879
- start: i.offset,
880
- key: "local.jump.empty"
881
- });
882
- }
883
- return r;
884
- }
885
- Object.freeze({
886
- arrayLength: l,
887
- dataTableColumns: 20,
888
- plotCurves: 16,
889
- plotPoints: e
890
- });
891
- // src/local/evaluation/computations.ts
892
- function $(e, t, n) {
893
- let r = t ? f(t, n) : void 0;
894
- return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
895
- }
896
- function wt(e, t, n, r = "local.expression") {
897
- t instanceof d ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
898
- }
899
- function Tt(e) {
900
- return e instanceof d ? e : new d("expression-eval", e instanceof Error ? e.message : String(e), 0);
901
- }
902
- function Et(e, t) {
903
- let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
904
- for (let t of e) r.set(t, 0);
905
- for (let a of e) for (let e of t(a)) {
906
- if (!n.has(e)) continue;
907
- r.set(a, (r.get(a) ?? 0) + 1);
908
- let t = i.get(e);
909
- t ? t.push(a) : i.set(e, [a]);
910
- }
911
- let a = [];
912
- for (let t of e) (r.get(t) ?? 0) === 0 && a.push(t);
913
- let o = [];
914
- for (let e = 0; e < a.length; e += 1) {
915
- let t = a[e];
916
- o.push(t);
917
- for (let e of i.get(t) ?? []) {
918
- let t = (r.get(e) ?? 0) - 1;
919
- r.set(e, t), t === 0 && a.push(e);
920
- }
921
- }
922
- let s = new Set(o);
923
- return {
924
- order: o,
925
- cyclic: e.filter((e) => !s.has(e))
926
- };
927
- }
928
- function Dt(e) {
929
- let t = Object.keys(e), n = new Set(t);
930
- return Et(t, (t) => {
931
- let r = e[t];
932
- return r ? r.dependencies.filter((e) => n.has(e)) : [];
933
- });
934
- }
935
- function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
936
- let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = [], l = /* @__PURE__ */ new Set();
937
- for (let t of e) s.has(t.name) || (s.set(t.name, t), c.push(t.name));
938
- let u = new Set(c);
939
- for (let e of c) {
940
- let t = s.get(e), r;
941
- try {
942
- r = i?.expression(t.source) ?? m(t.source);
943
- } catch (r) {
944
- wt(n, r, t.expressionOffset), l.add(e);
945
- continue;
946
- }
947
- a.set(e, r), o.set(e, [...r.dependencies]);
948
- }
949
- for (let e of c) if (!l.has(e)) {
950
- for (let r of o.get(e) ?? []) if (!(u.has(r) || Object.hasOwn(t, r))) {
951
- n("local.computation.unknown", `Reference to undeclared parameter ${r} in computation "${e}".`, $(s.get(e), a.get(e), r)), l.add(e);
952
- break;
953
- }
954
- }
955
- let d = /* @__PURE__ */ new Set();
956
- for (let e of c) {
957
- if (l.has(e)) continue;
958
- let i = s.get(e);
959
- if (i.kind === "const") for (let c of o.get(e) ?? []) {
960
- let o = u.has(c) ? s.get(c).kind : null;
961
- Object.hasOwn(t, c) ? (n("local.computation.const", `Constant "${e}" cannot depend on ${r.has(c) ? "external data" : "control parameter"} "${c}".`, $(i, a.get(e), c)), d.add(e)) : o === "computed" && (n("local.computation.const", `Constant "${e}" cannot depend on computed value "${c}".`, $(i, a.get(e), c)), d.add(e));
962
- }
963
- }
964
- let { order: f, cyclic: h } = Et(c, (e) => o.get(e) ?? []);
965
- if (h.length > 0) {
966
- let e = new Set(h), t = [], r = /* @__PURE__ */ new Map(), i = h[0];
967
- for (; !r.has(i);) {
968
- r.set(i, t.length), t.push(i);
969
- let n = (o.get(i) ?? []).find((t) => e.has(t));
970
- if (n === void 0) break;
971
- i = n;
972
- }
973
- let a = r.has(i) ? t.slice(r.get(i)) : [h[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
974
- for (let e of a.slice(0, 100)) {
975
- let t = s.get(e);
976
- n("local.computation.cycle", `Computation "${e}" is part of a dependency cycle: ${c}.`, t.range.start, t.range.end);
977
- }
978
- for (let e of h) l.add(e);
979
- }
980
- for (let e of f) if (!l.has(e) && !(s.get(e).kind !== "const" || d.has(e)) && (o.get(e) ?? []).some((e) => u.has(e) ? s.get(e).kind === "const" && d.has(e) : !1)) {
981
- let t = s.get(e);
982
- n("local.computation.const", `Constant "${e}" indirectly depends on a value that is not a constant.`, t.expressionOffset), d.add(e);
983
- }
984
- let g = {}, _ = { ...t };
985
- for (let e of f) {
986
- if (l.has(e)) continue;
987
- let t = s.get(e);
988
- if ((o.get(e) ?? []).some((e) => l.has(e))) {
989
- l.add(e);
990
- continue;
991
- }
992
- let r = a.get(e);
993
- try {
994
- let t = i ? i.infer(r, _) : r.inferType(_);
995
- g[e] = t, _[e] = t;
996
- } catch (r) {
997
- wt(n, r, t.expressionOffset), l.add(e);
998
- }
999
- }
1000
- let v = {}, y = {}, b = /* @__PURE__ */ Error("failed constant read"), x = (e) => {
1001
- l.add(e), Object.defineProperty(y, e, {
1002
- enumerable: !0,
1003
- configurable: !0,
1004
- get() {
1005
- throw b;
1006
- }
1007
- });
1008
- };
1009
- for (let e of f) {
1010
- if (l.has(e) || s.get(e).kind !== "const" || d.has(e)) continue;
1011
- let t = s.get(e), r = a.get(e);
1012
- try {
1013
- let i = r.evaluate(y), a = p(i);
1014
- if (a) {
1015
- n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), x(e);
1016
- continue;
1017
- }
1018
- v[e] = Array.isArray(i) ? i.slice() : i, y[e] = v[e];
1019
- } catch (r) {
1020
- if (r === b) {
1021
- x(e);
1022
- continue;
1023
- }
1024
- let i = Tt(r);
1025
- n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), x(e);
1026
- }
1027
- }
1028
- let S = {};
1029
- for (let e of c) {
1030
- let t = s.get(e);
1031
- if (l.has(e) || g[e] === void 0) continue;
1032
- let n = {
1033
- name: e,
1034
- kind: t.kind,
1035
- source: t.source,
1036
- dependencies: [...o.get(e) ?? []],
1037
- type: g[e],
1038
- nodeId: t.nodeId,
1039
- range: { ...t.range }
1040
- };
1041
- t.kind === "const" && Object.hasOwn(v, e) && (n.value = v[e]), S[e] = n;
1042
- }
1043
- return {
1044
- computations: S,
1045
- kinds: g,
1046
- order: f.filter((e) => !l.has(e)),
1047
- expressions: a,
1048
- constValues: v
1049
- };
1050
- }
1051
- function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1052
- let o = {}, s = /* @__PURE__ */ new Map(), c = {};
1053
- for (let [e, t] of Object.entries(r)) c[e] = t;
1054
- for (let [e, t] of a) Object.defineProperty(c, e, {
1055
- enumerable: !0,
1056
- configurable: !0,
1057
- get() {
1058
- throw t;
1059
- }
1060
- });
1061
- for (let [e, t] of Object.entries(i)) o[e] = t, c[e] = t;
1062
- for (let r of t) {
1063
- let t = e[r];
1064
- if (!t || t.kind === "const") continue;
1065
- let i = n.get(r);
1066
- if (i) try {
1067
- let e = i.evaluate(c), t = p(e);
1068
- if (t) throw new d("expression-budget", t, 0);
1069
- o[r] = e, c[r] = e;
1070
- } catch (e) {
1071
- let t = Tt(e);
1072
- s.set(r, t), Object.defineProperty(c, r, {
1073
- enumerable: !0,
1074
- configurable: !0,
1075
- get() {
1076
- throw t;
1077
- }
1078
- });
1079
- }
1080
- }
1081
- return {
1082
- values: o,
1083
- errors: s
1084
- };
1085
- }
1086
- // src/local/evaluation/validation.ts
1087
- var At = "local.validation.failed", jt = "local.validation.expression", Mt = "Validation failed.";
1088
- function Nt(e) {
1089
- return e.length > 2e3 ? `${u(e, c - 1)}…` : e;
1090
- }
1091
- function Pt(e) {
1092
- let t = e.trim();
1093
- return t ? t.split(/\s+/) : [];
1094
- }
1095
- function Ft(e) {
1096
- let t = [0];
1097
- for (let n = 0; n < e.length; n += 1) e[n] === "\n" && t.push(n + 1);
1098
- return t;
1099
- }
1100
- function It(e) {
1101
- if (!e || typeof e != "object") return !1;
1102
- let t = e, n = t.range;
1103
- return typeof t.expression == "string" && typeof t.message == "string" && Array.isArray(t.fields) && !!n && Number.isFinite(n.start) && Number.isFinite(n.end);
1104
- }
1105
- function Lt(e, t, n, r, i) {
1106
- let a = e.length, o = Math.max(0, Math.min(a, Math.trunc(n.start))), s = Math.max(o + 1, Math.min(a, Math.trunc(n.end))), c = 0, l = Math.max(0, t.length - 1);
1107
- for (; c < l;) {
1108
- let e = Math.ceil((c + l) / 2);
1109
- t[e] <= o ? c = e : l = e - 1;
1110
- }
1111
- return {
1112
- code: r,
1113
- message: i,
1114
- severity: "error",
1115
- range: {
1116
- start: o,
1117
- end: s
1118
- },
1119
- line: c + 1,
1120
- column: o - t[c] + 1
1121
- };
1122
- }
1123
- export { k as $, R as A, De as B, Be as C, Ue as D, We as E, Ne as F, j as G, ke as H, L as I, P as J, M as K, Me as L, z as M, Fe as N, Ke as O, Pe as P, be as Q, Te as R, Re as S, Je as T, Ae as U, Oe as V, je as W, we as X, F as Y, xe as Z, vt as _, It as a, K as b, Lt as c, Ot as d, ge as et, St as f, nt as g, yt as h, Nt as i, Le as j, qe as k, kt as l, Ct as m, At as n, Ft as o, bt as p, N as q, Mt as r, Pt as s, jt as t, me as tt, Dt as u, _t as v, ze as w, tt as x, gt as y, Ee as z };