reactive-md 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG-ch.md +54 -4
  2. package/CHANGELOG.md +55 -4
  3. package/CONTRIBUTING-ch.md +13 -2
  4. package/CONTRIBUTING.md +13 -2
  5. package/README-ch.md +132 -23
  6. package/README-en.md +130 -21
  7. package/README.md +128 -21
  8. package/SECURITY-ch.md +3 -3
  9. package/SECURITY.md +3 -3
  10. package/THIRD_PARTY_NOTICES.md +111 -1
  11. package/cli/args.mjs +51 -1
  12. package/cli/assets.mjs +6 -1
  13. package/cli/build.mjs +125 -9
  14. package/cli/fs-utils.mjs +3 -3
  15. package/cli/help.mjs +12 -5
  16. package/cli/init.mjs +1 -1
  17. package/cli/package.mjs +1 -0
  18. package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
  19. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  20. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  21. package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
  22. package/dist-library/compile-wUv8KEge.js +1249 -0
  23. package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
  24. package/dist-library/compiler-eOfcinZs.js +62 -0
  25. package/dist-library/component-state-BoLCGee4.js +801 -0
  26. package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
  27. package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
  28. package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
  29. package/dist-library/controls-CcT6n7k_.js +6740 -0
  30. package/dist-library/coordinate-CWS9p5q_.js +293 -0
  31. package/dist-library/data-table-Bgccxd7h.js +296 -0
  32. package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
  33. package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
  34. package/dist-library/export-BqVmTXm8.js +369 -0
  35. package/dist-library/gallery-CY6mTx8i.js +360 -0
  36. package/dist-library/html-CNT4KD-2.js +757 -0
  37. package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
  38. package/dist-library/latex-1w7aQgD5.js +928 -0
  39. package/dist-library/layout-C0YlEPGr.js +562 -0
  40. package/dist-library/mount-preset-KxvtKgJb.js +13 -0
  41. package/dist-library/options-1aDLK7JY.js +121 -0
  42. package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
  43. package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
  44. package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
  45. package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
  46. package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
  47. package/dist-library/react-BbyAgeXc.js +6070 -0
  48. package/dist-library/react-D5iGiUdL.js +7 -0
  49. package/dist-library/reactive-md-authoring.js +222 -223
  50. package/dist-library/reactive-md-build.js +126 -72
  51. package/dist-library/reactive-md-compiler-standard.js +12 -10
  52. package/dist-library/reactive-md-compiler.js +3 -3
  53. package/dist-library/reactive-md-default-packs.js +2 -2
  54. package/dist-library/reactive-md-default-preset.js +4 -4
  55. package/dist-library/reactive-md-export-assets.js +57 -0
  56. package/dist-library/reactive-md-export.js +5 -111
  57. package/dist-library/reactive-md-minimal-preset.js +24 -0
  58. package/dist-library/reactive-md-minimal-react-preset.js +26 -0
  59. package/dist-library/reactive-md-minimal-styles.js +80 -0
  60. package/dist-library/reactive-md-minimal.css +2 -0
  61. package/dist-library/reactive-md-pdf.js +7582 -0
  62. package/dist-library/reactive-md-plugin-chart.js +13 -0
  63. package/dist-library/reactive-md-plugin-data.js +17 -0
  64. package/dist-library/reactive-md-plugin-diagram.js +18 -0
  65. package/dist-library/reactive-md-plugin-forms.js +18 -0
  66. package/dist-library/reactive-md-plugin-gallery.js +12 -0
  67. package/dist-library/reactive-md-plugin-navigation.js +15 -0
  68. package/dist-library/reactive-md-plugin-network.js +222 -0
  69. package/dist-library/reactive-md-plugin-plot.js +24 -0
  70. package/dist-library/reactive-md-print.css +5 -0
  71. package/dist-library/reactive-md-react-minimal.js +28 -0
  72. package/dist-library/reactive-md-react-server.js +34 -32
  73. package/dist-library/reactive-md-react-unstyled.js +14 -9
  74. package/dist-library/reactive-md-react.js +14 -9
  75. package/dist-library/reactive-md-runtime-browser.js +847 -15
  76. package/dist-library/reactive-md-runtime.js +3 -3
  77. package/dist-library/reactive-md-sdk.js +8 -6
  78. package/dist-library/reactive-md-standalone-configured.js +16 -0
  79. package/dist-library/reactive-md-standalone-host.js +9 -438
  80. package/dist-library/reactive-md-testing-browser.js +5 -4
  81. package/dist-library/reactive-md-testing-react.js +46 -44
  82. package/dist-library/reactive-md-testing.js +45 -44
  83. package/dist-library/reactive-md-vite.js +135 -37
  84. package/dist-library/reactive-md.css +1 -1
  85. package/dist-library/reactive-md.js +590 -498
  86. package/dist-library/registry-B9NGct4d.js +20 -0
  87. package/dist-library/registry-core-Bbad9Bm2.js +479 -0
  88. package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
  89. package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
  90. package/dist-library/runtime-kcA7bG7G.js +1282 -0
  91. package/dist-library/sample-bP4zHB3L.js +289 -0
  92. package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
  93. package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
  94. package/dist-library/session-core-nmJHuR9c.js +452 -0
  95. package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
  96. package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
  97. package/dist-library/types/authoring/catalog.d.ts +2 -3
  98. package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
  99. package/dist-library/types/authoring/index.d.ts +1 -1
  100. package/dist-library/types/authoring/insert.d.ts +1 -1
  101. package/dist-library/types/authoring/templates.d.ts +2 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/build/host.d.ts +1 -1
  104. package/dist-library/types/build/index.d.ts +1 -1
  105. package/dist-library/types/build/notices.d.ts +1 -1
  106. package/dist-library/types/build/resources.d.ts +1 -1
  107. package/dist-library/types/build/vite.d.ts +1 -1
  108. package/dist-library/types/compiler/index.d.ts +2 -2
  109. package/dist-library/types/compiler/result.d.ts +1 -1
  110. package/dist-library/types/compiler/standard.d.ts +2 -2
  111. package/dist-library/types/compiler/types.d.ts +1 -1
  112. package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
  113. package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
  114. package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
  115. package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
  116. package/dist-library/types/components/minimal-preset.d.ts +2 -0
  117. package/dist-library/types/components/mount-preset.d.ts +4 -0
  118. package/dist-library/types/components/network/submit-button.d.ts +10 -0
  119. package/dist-library/types/components/plot/coordinate.d.ts +2 -0
  120. package/dist-library/types/components/plugins/chart.d.ts +2 -0
  121. package/dist-library/types/components/plugins/data.d.ts +2 -0
  122. package/dist-library/types/components/plugins/diagram.d.ts +2 -0
  123. package/dist-library/types/components/plugins/forms.d.ts +2 -0
  124. package/dist-library/types/components/plugins/gallery.d.ts +2 -0
  125. package/dist-library/types/components/plugins/navigation.d.ts +2 -0
  126. package/dist-library/types/components/plugins/network.d.ts +2 -0
  127. package/dist-library/types/components/plugins/plot.d.ts +2 -0
  128. package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
  129. package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
  130. package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
  131. package/dist-library/types/export/component-state.d.ts +1 -1
  132. package/dist-library/types/export/index.d.ts +2 -1
  133. package/dist-library/types/export/print-document.d.ts +18 -0
  134. package/dist-library/types/export/render-markup.d.ts +23 -0
  135. package/dist-library/types/export/requirements.d.ts +1 -1
  136. package/dist-library/types/export/resources.d.ts +1 -1
  137. package/dist-library/types/export/restoration.d.ts +1 -1
  138. package/dist-library/types/export-assets/index.d.ts +25 -0
  139. package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
  140. package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
  141. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  142. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  143. package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
  144. package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
  145. package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
  146. package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
  147. package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
  148. package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
  149. package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
  150. package/dist-library/types/local/compilation/compiler.d.ts +7 -14
  151. package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
  152. package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
  153. package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
  154. package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
  155. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  156. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  157. package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
  158. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
  159. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
  160. package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
  161. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
  162. package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
  163. package/dist-library/types/local/configuration/options-core.d.ts +5 -4
  164. package/dist-library/types/local/configuration/options.d.ts +2 -1
  165. package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
  166. package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
  167. package/dist-library/types/local/configuration/schema.d.ts +1 -1
  168. package/dist-library/types/local/css/author-css.d.ts +66 -0
  169. package/dist-library/types/local/evaluation/computations.d.ts +2 -2
  170. package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
  171. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
  172. package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
  173. package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
  174. package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
  175. package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
  176. package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
  177. package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
  178. package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
  179. package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
  180. package/dist-library/types/local/evaluation/validation.d.ts +1 -1
  181. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  182. package/dist-library/types/local/html/html-details.d.ts +1 -1
  183. package/dist-library/types/local/html/html-entities.d.ts +11 -2
  184. package/dist-library/types/local/html/html-recovery.d.ts +1 -1
  185. package/dist-library/types/local/html/html-table.d.ts +1 -1
  186. package/dist-library/types/local/html/html.d.ts +40 -4
  187. package/dist-library/types/local/index.d.ts +14 -13
  188. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  189. package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
  190. package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
  191. package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
  192. package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
  193. package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
  194. package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
  195. package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
  196. package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
  197. package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
  198. package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
  199. package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
  200. package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
  201. package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
  202. package/dist-library/types/local/parsing/parser.d.ts +3 -3
  203. package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
  204. package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
  205. package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
  206. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  207. package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
  208. package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
  209. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  210. package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
  211. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  212. package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
  213. package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
  214. package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
  215. package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
  216. package/dist-library/types/local/rendering/render-types.d.ts +1 -1
  217. package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
  218. package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
  219. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  220. package/dist-library/types/local/runtime/retention.d.ts +1 -1
  221. package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
  222. package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
  223. package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
  224. package/dist-library/types/local/runtime/runtime.d.ts +4 -2
  225. package/dist-library/types/local/runtime/state.d.ts +1 -1
  226. package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
  227. package/dist-library/types/local/source/authoring.d.ts +1 -1
  228. package/dist-library/types/local/source/source-context.d.ts +23 -0
  229. package/dist-library/types/local/source/source-migration.d.ts +2 -2
  230. package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
  231. package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
  232. package/dist-library/types/local/transport/shared-data.d.ts +1 -1
  233. package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
  234. package/dist-library/types/local/transport/worker-job.d.ts +28 -0
  235. package/dist-library/types/local/transport/worker.d.ts +32 -46
  236. package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
  237. package/dist-library/types/pdf.d.ts +22 -0
  238. package/dist-library/types/presets/identity.d.ts +1 -0
  239. package/dist-library/types/presets/minimal.d.ts +2 -0
  240. package/dist-library/types/presets/plugin-packs.d.ts +1 -0
  241. package/dist-library/types/react/component-api.d.ts +20 -4
  242. package/dist-library/types/react/component-primitives.d.ts +10 -10
  243. package/dist-library/types/react/component-utils.d.ts +9 -1
  244. package/dist-library/types/react/index.d.ts +6 -5
  245. package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
  246. package/dist-library/types/react/minimal.d.ts +13 -0
  247. package/dist-library/types/react/package-core.d.ts +67 -0
  248. package/dist-library/types/react/package.d.ts +3 -67
  249. package/dist-library/types/react/runtime/common.d.ts +1 -1
  250. package/dist-library/types/react/sdk-core.d.ts +115 -0
  251. package/dist-library/types/react/sdk.d.ts +4 -110
  252. package/dist-library/types/react/server.d.ts +2 -2
  253. package/dist-library/types/react/use-draft-field.d.ts +5 -1
  254. package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
  255. package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
  256. package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
  257. package/dist-library/types/runtime-services/component-state.d.ts +1 -1
  258. package/dist-library/types/runtime-services/index.d.ts +2 -0
  259. package/dist-library/types/runtime-services/network.d.ts +86 -0
  260. package/dist-library/types/runtime-services/runtime.d.ts +1 -1
  261. package/dist-library/types/sdk/config.d.ts +1 -1
  262. package/dist-library/types/sdk/index.d.ts +1 -0
  263. package/dist-library/types/sdk/props.d.ts +1 -1
  264. package/dist-library/types/sdk/registry-core.d.ts +1 -1
  265. package/dist-library/types/sdk/theme.d.ts +5 -4
  266. package/dist-library/types/sdk/types.d.ts +2 -2
  267. package/dist-library/types/shareable.d.ts +6 -5
  268. package/dist-library/types/standalone/diagnostics.d.ts +1 -1
  269. package/dist-library/types/standalone/host.d.ts +5 -0
  270. package/dist-library/types/standalone/payload.d.ts +1 -1
  271. package/dist-library/types/standalone/prepare.d.ts +2 -2
  272. package/dist-library/types/standalone/session-core.d.ts +68 -0
  273. package/dist-library/types/standalone/session.d.ts +6 -68
  274. package/dist-library/types/themes/contract.d.ts +7 -0
  275. package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
  276. package/dist-library/types/vite/client.d.ts +19 -0
  277. package/dist-library/types/vite/index.d.ts +18 -3
  278. package/dist-library/types/vite/registration.d.ts +2 -2
  279. package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
  280. package/dist-library/validation-BEBA_HvS.js +1121 -0
  281. package/dist-library/visual-frame-CyV1FXzs.js +48 -0
  282. package/dist-library/visuals-B5KSafVk.js +3 -0
  283. package/dist-library/visuals-BZbZYA7w.js +72572 -0
  284. package/dist-standalone/reactive-md-standalone.css +1 -1
  285. package/dist-standalone/reactive-md-standalone.js +146 -137
  286. package/docs/README-ch.md +16 -11
  287. package/docs/README.md +16 -11
  288. package/docs/compatibility/compatibility-ch.md +8 -8
  289. package/docs/compatibility/compatibility-en.md +8 -8
  290. package/docs/compatibility/source-versioning-ch.md +1 -1
  291. package/docs/compatibility/source-versioning-en.md +1 -1
  292. package/docs/development/component-development-ch.md +2 -2
  293. package/docs/development/component-development-en.md +2 -2
  294. package/docs/development/component-development-reference-ch.md +4 -4
  295. package/docs/development/component-development-reference-en.md +4 -4
  296. package/docs/development/component-protocol-ch.md +14 -14
  297. package/docs/development/component-protocol-en.md +14 -14
  298. package/docs/development/extension-tutorial-ch.md +308 -0
  299. package/docs/development/extension-tutorial-en.md +308 -0
  300. package/docs/development/local-module-layout-ch.md +10 -50
  301. package/docs/development/local-module-layout-en.md +9 -49
  302. package/docs/development/performance-overview-ch.md +174 -154
  303. package/docs/development/performance-overview-en.md +174 -154
  304. package/docs/guides/local-guide-ch.md +2 -2
  305. package/docs/guides/local-guide-en.md +2 -2
  306. package/docs/integration/author-tools-ch.md +2 -2
  307. package/docs/integration/author-tools-en.md +2 -2
  308. package/docs/integration/compiler-ch.md +4 -2
  309. package/docs/integration/compiler-en.md +4 -2
  310. package/docs/integration/directory-discovery-ch.md +5 -1
  311. package/docs/integration/directory-discovery-en.md +5 -1
  312. package/docs/integration/editor-ch.md +35 -5
  313. package/docs/integration/editor-en.md +42 -4
  314. package/docs/integration/extension-sdk-ch.md +6 -4
  315. package/docs/integration/extension-sdk-en.md +6 -4
  316. package/docs/integration/local-integration-ch.md +201 -19
  317. package/docs/integration/local-integration-en.md +194 -18
  318. package/docs/integration/network-host-ch.md +75 -0
  319. package/docs/integration/network-host-en.md +75 -0
  320. package/docs/integration/shareable-export-ch.md +58 -16
  321. package/docs/integration/shareable-export-en.md +57 -15
  322. package/docs/reference/html-compatibility-ch.md +20 -67
  323. package/docs/reference/html-compatibility-en.md +19 -64
  324. package/docs/reference/local-interaction-syntax-ch.md +199 -26
  325. package/docs/reference/local-interaction-syntax-en.md +194 -27
  326. package/docs/reference/public-api-ch.md +416 -0
  327. package/docs/reference/public-api-en.md +416 -0
  328. package/docs/reference/theme-protocol-ch.md +27 -8
  329. package/docs/reference/theme-protocol-en.md +46 -8
  330. package/docs/releases/release-0.4.0-ch.md +2 -2
  331. package/docs/releases/release-0.4.0-en.md +2 -2
  332. package/docs/releases/release-0.8.0-ch.md +19 -3
  333. package/docs/releases/release-0.8.0-en.md +19 -3
  334. package/docs/releases/release-0.9.0-ch.md +44 -0
  335. package/docs/releases/release-0.9.0-en.md +44 -0
  336. package/docs/releases/release-0.9.1-ch.md +29 -0
  337. package/docs/releases/release-0.9.1-en.md +29 -0
  338. package/examples/component-package/README-ch.md +1 -1
  339. package/examples/component-package/README.md +1 -1
  340. package/examples/conformance/README-ch.md +3 -3
  341. package/examples/conformance/README.md +3 -3
  342. package/examples/game-2048-package/README-ch.md +3 -9
  343. package/examples/game-2048-package/README.md +8 -12
  344. package/examples/integration/README-ch.md +21 -2
  345. package/examples/integration/README.md +21 -2
  346. package/examples/integration/extension-sdk/README-ch.md +1 -1
  347. package/examples/integration/extension-sdk/README.md +1 -1
  348. package/examples/integration/streaming/index.html +48 -0
  349. package/examples/integration/streaming/main.js +175 -0
  350. package/examples/integration/streaming/package.json +13 -0
  351. package/examples/integration/streaming/worker.js +3 -0
  352. package/examples/local/README-ch.md +3 -3
  353. package/examples/local/README.md +2 -2
  354. package/examples/local/minimal-budget.reactive.md +48 -0
  355. package/examples/minimal-extension/README-ch.md +78 -0
  356. package/examples/minimal-extension/README.md +78 -0
  357. package/examples/minimal-extension/index.html +15 -0
  358. package/examples/minimal-extension/package.json +26 -0
  359. package/examples/minimal-extension/sample/document.reactive.md +10 -0
  360. package/examples/minimal-extension/scripts/build.mjs +32 -0
  361. package/examples/minimal-extension/scripts/export.mjs +72 -0
  362. package/examples/minimal-extension/scripts/test-node.mjs +75 -0
  363. package/examples/minimal-extension/src/extension.tsx +90 -0
  364. package/examples/minimal-extension/src/preview.tsx +12 -0
  365. package/examples/minimal-extension/src/source.ts +4 -0
  366. package/examples/minimal-extension/tsconfig.json +14 -0
  367. package/examples/network-survey/README.md +200 -0
  368. package/examples/network-survey/index.html +49 -0
  369. package/examples/network-survey/package.json +26 -0
  370. package/examples/network-survey/sample/document.reactive.md +51 -0
  371. package/examples/network-survey/src/components.tsx +325 -0
  372. package/examples/network-survey/src/host.ts +316 -0
  373. package/examples/network-survey/src/main.tsx +91 -0
  374. package/examples/network-survey/src/source.ts +1 -0
  375. package/examples/network-survey/tsconfig.json +26 -0
  376. package/examples/network-survey/vite.config.ts +227 -0
  377. package/examples/sci-fi-theme/README-ch.md +4 -2
  378. package/examples/sci-fi-theme/README.md +4 -2
  379. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
  380. package/examples/sci-fi-theme/demo/demo.css +129 -23
  381. package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
  382. package/examples/sci-fi-theme/demo/main.tsx +45 -10
  383. package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
  384. package/examples/sci-fi-theme/package.json +2 -1
  385. package/examples/sci-fi-theme/src/components.css +1064 -154
  386. package/examples/sci-fi-theme/src/notch.css +142 -0
  387. package/examples/sci-fi-theme/src/sci-fi.css +3 -1
  388. package/examples/sci-fi-theme/src/theme.ts +2 -0
  389. package/examples/sci-fi-theme/src/tokens.css +512 -408
  390. package/examples/tetris-package/README-ch.md +4 -4
  391. package/examples/tetris-package/README.md +4 -4
  392. package/package.json +70 -3
  393. package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
  394. package/dist-library/compiler--ea2CKQF.js +0 -61
  395. package/dist-library/component-state-Cq2K5gkS.js +0 -490
  396. package/dist-library/options-CX5m5n-J.js +0 -115
  397. package/dist-library/runtime-C-sbfpOX.js +0 -1157
  398. package/dist-library/types/local/contracts/locale.d.ts +0 -1
  399. package/dist-library/types/local/contracts/version.d.ts +0 -2
  400. package/dist-library/types/local/evaluation/dates.d.ts +0 -2
  401. package/dist-library/types/local/evaluation/expression.d.ts +0 -47
  402. package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
  403. package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
  404. package/dist-library/types/local/session/incremental.d.ts +0 -48
  405. package/dist-library/types/local/source/node-walk.d.ts +0 -3
  406. package/dist-library/types/local/source/text-length.d.ts +0 -13
  407. package/dist-library/types/local/theme/theme-name.d.ts +0 -3
  408. package/dist-library/types/local/widgets/visuals.d.ts +0 -25
  409. package/dist-library/types/react/default-theme.d.ts +0 -6
  410. package/dist-library/validation-W-bmny-x.js +0 -2253
  411. package/docs/development/releasing-ch.md +0 -12
  412. package/docs/development/releasing-en.md +0 -12
  413. package/docs/integration/codemirror-ch.md +0 -52
  414. package/docs/integration/codemirror-en.md +0 -29
  415. package/docs/integration/repository-split-ch.md +0 -40
  416. package/docs/integration/repository-split-en.md +0 -23
  417. package/docs/reference/computations-formatting-ch.md +0 -89
  418. package/docs/reference/computations-formatting-en.md +0 -89
  419. package/docs/reference/constraints-collections-ch.md +0 -104
  420. package/docs/reference/constraints-collections-en.md +0 -104
  421. package/docs/reference/local-components-v2-ch.md +0 -140
  422. package/docs/reference/local-components-v2-en.md +0 -106
  423. package/docs/reference/tolerance-ch.md +0 -64
  424. package/docs/reference/tolerance-en.md +0 -57
  425. /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
  426. /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
  427. /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
  428. /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
  429. /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
  430. /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
  431. /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
  432. /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
  433. /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
  434. /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
  435. /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
  436. /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
  437. /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
  438. /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
  439. /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
  440. /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
  441. /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
@@ -0,0 +1,20 @@
1
+ import { t as e } from "./registry-core-Bbad9Bm2.js";
2
+ import { t } from "./default-components-BwQf0oP-.js";
3
+ import { s as n } from "./config-BadfhjdP.js";
4
+ // src/sdk/registry.ts
5
+ function r() {
6
+ return t;
7
+ }
8
+ function i(e) {
9
+ return e ? n(e).registry : r();
10
+ }
11
+ function a(e, t) {
12
+ let n = i(t);
13
+ for (let t of n) if (t.name === e) return t;
14
+ }
15
+ function o(t) {
16
+ let n = /* @__PURE__ */ new Map();
17
+ for (let r of i(t)) n.set(r.name, e(r));
18
+ return n;
19
+ }
20
+ export { i as n, o as r, a as t };
@@ -0,0 +1,479 @@
1
+ import { j as e } from "./preset-core-CKc5YXSM.js";
2
+ // src/local/configuration/component-kernel.ts
3
+ function t(e, t, n) {
4
+ if (!e) return;
5
+ let r = e, i = e.options ?? [], a = e.constraints ?? (r.min !== void 0 || r.max !== void 0 || r.step !== void 0 ? {
6
+ ...r.min === void 0 ? {} : { min: { literal: r.min } },
7
+ ...r.max === void 0 ? {} : { max: { literal: r.max } },
8
+ ...r.step === void 0 ? {} : { step: { literal: r.step } }
9
+ } : void 0), o = e.family ?? (e.kind === "number" ? "number" : e.kind === "boolean" ? "boolean" : e.kind === "array" ? "multi-select" : i.length ? "choice" : "text");
10
+ return {
11
+ ...e,
12
+ family: o,
13
+ bind: e.bind ?? "bind",
14
+ initial: e.initial ?? "initial",
15
+ initialRule: e.initialRule ?? n ?? (t === "value" ? e.kind === "boolean" ? "false" : e.kind === "number" ? "nearest-zero" : "empty" : "nearest-zero"),
16
+ ...a ? { constraints: a } : {}
17
+ };
18
+ }
19
+ function n(e) {
20
+ return e.bindings.value;
21
+ }
22
+ function r(e) {
23
+ let t = [];
24
+ for (let [n, r] of Object.entries(e.bindings)) n !== "value" && t.push({
25
+ ...r,
26
+ slot: n
27
+ });
28
+ return t;
29
+ }
30
+ function i(e) {
31
+ return e.slotRelations;
32
+ }
33
+ function a(e) {
34
+ return e.structure ? e.structure : {
35
+ rule: e.childRule ?? (e.form === "leaf" ? "none" : e.form === "inline" ? "inline" : "any"),
36
+ label: e.label ?? "none",
37
+ ...e.parent ? { parents: e.parent } : {}
38
+ };
39
+ }
40
+ function o(e) {
41
+ return e.structure;
42
+ }
43
+ function s(e) {
44
+ return e.rules ?? [];
45
+ }
46
+ function c(e, t) {
47
+ for (let n of s(e)) if (n.kind === t) return n;
48
+ }
49
+ function l(e, t) {
50
+ return s(e).filter((e) => e.kind === t);
51
+ }
52
+ function u(e) {
53
+ return e.legacyHost === !0;
54
+ }
55
+ function d(e, t) {
56
+ if (t === e.bind) return e.options, {
57
+ kind: "string",
58
+ static: !0
59
+ };
60
+ switch (e.kind) {
61
+ case "number": return {
62
+ kind: "number",
63
+ static: !0
64
+ };
65
+ case "boolean": return {
66
+ kind: "boolean",
67
+ static: !0
68
+ };
69
+ default: return {
70
+ kind: "string",
71
+ static: !0
72
+ };
73
+ }
74
+ }
75
+ function f(e, t) {
76
+ let n = { ...e.props }, r = t?.bindings ?? e.bindings, i = r?.value ?? e.binding, a = r ? Object.entries(r).filter(([e]) => e !== "value").map(([, e]) => e) : (e.slots ?? []).map((e) => ({
77
+ kind: e.kind,
78
+ family: e.family,
79
+ bind: e.bind,
80
+ initial: e.initial,
81
+ initialRule: e.initialRule ?? "nearest-zero"
82
+ }));
83
+ for (let e of i ? [i] : []) Object.hasOwn(n, e.bind) || (n[e.bind] = d(e, e.bind)), Object.hasOwn(n, e.initial) || (n[e.initial] = d(e, e.initial)), Object.hasOwn(n, "disabled") || (n.disabled = {
84
+ kind: "boolean",
85
+ dynamic: !0,
86
+ default: !1
87
+ });
88
+ for (let e of a) Object.hasOwn(n, e.bind) || (n[e.bind] = d(e, e.bind)), Object.hasOwn(n, e.initial) || (n[e.initial] = d(e, e.initial));
89
+ return {
90
+ ...e,
91
+ props: n,
92
+ ...t?.structure ?? e.structure ? { structure: t?.structure ?? e.structure } : {},
93
+ ...t?.rules ?? e.rules ? { rules: t?.rules ?? e.rules } : {},
94
+ ...r ? { bindings: r } : {},
95
+ ...t?.slotRelations ?? e.slotRelations ? { slotRelations: t?.slotRelations ?? e.slotRelations } : {},
96
+ ...t?.legacyHost === !0 || e.legacyHost === !0 ? { legacyHost: !0 } : {}
97
+ };
98
+ }
99
+ function p(e, n) {
100
+ let r = f(e, n), i = {}, o = n?.bindings ?? e.bindings;
101
+ if (o) for (let [n, r] of Object.entries(o)) {
102
+ let a = t(r, n, n === "value" ? e.initialRule : void 0);
103
+ a && (i[n] = a);
104
+ }
105
+ else if (e.binding) {
106
+ let n = t(e.binding, "value", e.initialRule);
107
+ n && (i.value = n);
108
+ }
109
+ for (let n of e.slots ?? []) {
110
+ if (i[n.name] !== void 0) continue;
111
+ let e = t({
112
+ kind: n.kind,
113
+ family: n.family,
114
+ bind: n.bind,
115
+ initial: n.initial,
116
+ ...n.exclusive === void 0 ? {} : { exclusive: n.exclusive },
117
+ ...n.initialRule === void 0 ? {} : { initialRule: n.initialRule }
118
+ }, n.name);
119
+ e && (i[n.name] = e);
120
+ }
121
+ let s = {};
122
+ for (let [e, t] of Object.entries(r.props)) {
123
+ let n = t.values ?? t.enum;
124
+ if (n === void 0) {
125
+ s[e] = t;
126
+ continue;
127
+ }
128
+ let { enum: r, ...i } = t;
129
+ s[e] = {
130
+ ...i,
131
+ values: n
132
+ };
133
+ }
134
+ return Object.freeze({
135
+ name: r.name,
136
+ form: r.form,
137
+ props: Object.freeze(s),
138
+ bindings: Object.freeze(i),
139
+ structure: a(r),
140
+ rules: r.rules ?? [],
141
+ slotRelations: r.slotRelations ?? [],
142
+ legacyHost: r.legacyHost === !0
143
+ });
144
+ }
145
+ function m(e, t, n) {
146
+ if (n === void 0) return;
147
+ let r = t[n];
148
+ if (r) return !r.dynamic && typeof r.value == "number" ? r.value : void 0;
149
+ let i = e.props[n]?.default;
150
+ return typeof i == "number" ? i : void 0;
151
+ }
152
+ function h(e, t, n) {
153
+ if (n === void 0) return;
154
+ let r = t[n];
155
+ if (r) return !r.dynamic && typeof r.value == "string" ? r.value : void 0;
156
+ let i = e.props[n]?.default;
157
+ return typeof i == "string" ? i : void 0;
158
+ }
159
+ function g(e, t, n) {
160
+ return n === void 0 ? t : e[n]?.offset ?? t;
161
+ }
162
+ function _(e, t, n) {
163
+ let r = [], i = e.name, a = i, o = (e, t, n, i, a) => {
164
+ r.push({
165
+ code: e,
166
+ message: t,
167
+ start: n,
168
+ key: i,
169
+ ...a ? { params: a } : {}
170
+ });
171
+ };
172
+ for (let r of s(e)) switch (r.kind) {
173
+ case "numeric-range": {
174
+ let s = m(e, t, r.min), c = m(e, t, r.max);
175
+ s !== void 0 && c !== void 0 && (r.order === "increasing" ? !(s < c) : s > c) && o("local.constraint", r.order === "increasing" ? `${i} ${r.min ?? "min"} must be less than ${r.max ?? "max"}.` : `Component <${i}> min cannot exceed max.`, g(t, n.start, r.min), r.order === "increasing" ? "local.constraint.plot-range" : "local.constraint.number-min-max", r.order === "increasing" ? void 0 : { component: a });
176
+ let l = m(e, t, r.step);
177
+ l === void 0 || l > 0 && Number.isFinite(l) || o("local.constraint", `Component <${i}> step must be greater than 0.`, g(t, n.start, r.step), "local.constraint.number-step", { component: a });
178
+ let u = r.integer;
179
+ if (u !== void 0) {
180
+ let r = m(e, t, u);
181
+ r !== void 0 && !Number.isInteger(r) && o("local.constraint", `Attribute ${u} must be a whole number.`, g(t, n.start, u), "local.constraint.integer", {
182
+ name: u,
183
+ component: a
184
+ });
185
+ }
186
+ if (r.positiveInteger !== void 0) {
187
+ let i = m(e, t, r.positiveInteger);
188
+ i !== void 0 && (!Number.isInteger(i) || i <= 0) && o("local.constraint", `Attribute ${r.positiveInteger} must be a positive whole number.`, g(t, n.start, r.positiveInteger), "local.constraint.positive-integer", {
189
+ name: r.positiveInteger,
190
+ component: a
191
+ });
192
+ }
193
+ break;
194
+ }
195
+ case "text-length": {
196
+ let i = m(e, t, r.min) ?? 0, a = m(e, t, r.max);
197
+ a !== void 0 && a < i && o("local.constraint", "max-length cannot be less than min-length.", g(t, n.start, r.max), "local.constraint.length-order");
198
+ break;
199
+ }
200
+ case "date-bounds": {
201
+ let i = h(e, t, r.min), a = h(e, t, r.max);
202
+ i !== void 0 && !y(i) && o("local.attribute.type", `Date lower bound ${i} is not a valid YYYY-MM-DD.`, g(t, n.start, r.min), "local.attribute.type.date-lower", { value: i }), a !== void 0 && !y(a) && o("local.attribute.type", `Date upper bound ${a} is not a valid YYYY-MM-DD.`, g(t, n.start, r.max), "local.attribute.type.date-upper", { value: a }), i && a && i > a && o("local.constraint", "Date min cannot be later than max.", g(t, n.start, r.min), "local.constraint.date-order");
203
+ break;
204
+ }
205
+ case "nonempty": {
206
+ let e = t[r.attribute];
207
+ if (!e || e.dynamic) break;
208
+ (typeof e.value == "string" ? e.value : String(e.raw ?? "")).trim() || o("local.constraint", `Attribute ${r.attribute} of <${i}> cannot be empty.`, e.offset, `local.constraint.${i}-${r.attribute}`, {
209
+ name: r.attribute,
210
+ component: a
211
+ });
212
+ break;
213
+ }
214
+ case "progress-bounds": {
215
+ let n = m(e, t, r.max) ?? r.defaultMax, i = t[r.value];
216
+ i && !i.dynamic && typeof i.value == "number" && (i.value < 0 || i.value > n) && o("local.constraint", `progress value must be between 0 and ${n}, got ${i.value}.`, i.offset, "local.constraint.progress-range", {
217
+ max: n,
218
+ value: i.value
219
+ });
220
+ break;
221
+ }
222
+ case "timer-duration": {
223
+ let i = m(e, t, r.attribute) ?? r.default;
224
+ (!Number.isInteger(i) || i <= 0) && o("local.constraint", "timer duration must be a positive whole number of seconds.", g(t, n.start, r.attribute), "local.constraint.timer-duration");
225
+ break;
226
+ }
227
+ case "option-count": {
228
+ let a = m(e, t, r.max);
229
+ a !== void 0 && (!Number.isInteger(a) || a < 0) && o("local.constraint", `${i} ${r.max} must be a nonnegative whole number.`, g(t, n.start, r.max), `local.constraint.${i}`);
230
+ break;
231
+ }
232
+ case "selection-requires":
233
+ if (Object.hasOwn(t, r.key)) break;
234
+ for (let e of r.attributes) {
235
+ let n = t[e];
236
+ n && o("local.selection.key", `<${i}> ${e} requires a key attribute naming the selection column.`, n.offset, "local.selection.key.required", {
237
+ component: a,
238
+ name: e
239
+ });
240
+ }
241
+ }
242
+ return r;
243
+ }
244
+ var v = /^(\d{4})-(\d{2})-(\d{2})$/;
245
+ function y(e) {
246
+ if (e === "") return !0;
247
+ let t = v.exec(e);
248
+ if (!t) return !1;
249
+ let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]);
250
+ return n < 1 || r < 1 || r > 12 || i < 1 ? !1 : i <= [
251
+ 31,
252
+ n % 4 == 0 && n % 100 != 0 || n % 400 == 0 ? 29 : 28,
253
+ 31,
254
+ 30,
255
+ 31,
256
+ 30,
257
+ 31,
258
+ 31,
259
+ 30,
260
+ 31,
261
+ 30,
262
+ 31
263
+ ][r - 1];
264
+ }
265
+ function b(e, t, n) {
266
+ if (n === void 0) return;
267
+ if ("literal" in n) return n.literal;
268
+ let r = t[n.prop];
269
+ if (r) return r.dynamic ? void 0 : typeof r.value == "number" ? r.value : void 0;
270
+ let i = e.props[n.prop]?.default;
271
+ return typeof i == "number" ? i : void 0;
272
+ }
273
+ function x(e, t, n) {
274
+ let r = t.constraints;
275
+ if (!r) return { step: 1 };
276
+ let i = b(e, n, r.min), a = b(e, n, r.max), o = b(e, n, r.step) ?? 1, s = (e) => {
277
+ if (e === void 0 || !("prop" in e)) return;
278
+ let t = n[e.prop];
279
+ return t?.dynamic ? (t.expression ?? "").trim() : void 0;
280
+ }, c = s(r.min), l = s(r.max);
281
+ return {
282
+ ...i === void 0 ? {} : { min: i },
283
+ ...a === void 0 ? {} : { max: a },
284
+ step: o > 0 ? o : 1,
285
+ ...c === void 0 ? {} : { dynamicMin: c },
286
+ ...l === void 0 ? {} : { dynamicMax: l }
287
+ };
288
+ }
289
+ function S(e, t, n) {
290
+ return b(e, n, t.maxItems);
291
+ }
292
+ function C(e, t, n) {
293
+ let r = n === "min" ? e.dynamicMin : e.dynamicMax, i = n === "min" ? t.dynamicMin : t.dynamicMax;
294
+ return r !== void 0 || i !== void 0 ? r === i : e[n] === t[n];
295
+ }
296
+ function w(e) {
297
+ return `[${e.dynamicMin === void 0 ? e.min === void 0 ? "-∞" : String(e.min) : `{{ ${e.dynamicMin} }}`}, ${e.dynamicMax === void 0 ? e.max === void 0 ? "∞" : String(e.max) : `{{ ${e.dynamicMax} }}`}] / ${e.step}`;
298
+ }
299
+ function T(e, t, n) {
300
+ let r = (e - t) / n;
301
+ return Math.abs(r - Math.round(r)) <= 1e-9 * Math.max(1, Math.abs(r));
302
+ }
303
+ function E(e, t, n) {
304
+ let r = e ?? 0, i = e === void 0 ? -Infinity : Math.ceil((e - r) / n), a = t === void 0 ? Infinity : Math.floor((t - r) / n);
305
+ if (i > a) return null;
306
+ let o = -r / n, s = null;
307
+ for (let e of [Math.floor(o), Math.ceil(o)]) {
308
+ let t = Math.min(a, Math.max(i, e));
309
+ if (!Number.isFinite(t)) continue;
310
+ if (s === null) {
311
+ s = t;
312
+ continue;
313
+ }
314
+ let o = r + t * n, c = r + s * n;
315
+ (Math.abs(o) < Math.abs(c) || Math.abs(o) === Math.abs(c) && o < c) && (s = t);
316
+ }
317
+ if (s === null) return null;
318
+ let c = r + s * n;
319
+ return e !== void 0 && c < e || t !== void 0 && c > t ? null : c;
320
+ }
321
+ function D(e, t, n) {
322
+ switch (e) {
323
+ case "empty": return { value: "" };
324
+ case "false": return { value: !1 };
325
+ case "min": return { value: t?.min ?? 0 };
326
+ case "nearest-zero": {
327
+ let e = t ?? { step: 1 }, n = E(e.min, e.max, e.step);
328
+ return n === null ? { error: "no-step" } : { value: n };
329
+ }
330
+ case "duration": return { value: t?.max ?? 60 };
331
+ case "first-option":
332
+ case "first-tab":
333
+ case "first-step":
334
+ case "first-node": return { value: n[0] ?? "" };
335
+ case "checked": return { value: [] };
336
+ case "empty-array": return { value: [] };
337
+ case "max-step": {
338
+ let e = t ?? { step: 1 }, n = e.min ?? 0, r = (e.max ?? n) - n, i = n + Math.max(0, Math.floor(r / e.step + 1e-9)) * e.step;
339
+ return { value: Math.min(e.max ?? i, Math.max(e.min ?? i, i)) };
340
+ }
341
+ case "none": return { value: "" };
342
+ default: return { error: "cannot-derive" };
343
+ }
344
+ }
345
+ function O(e) {
346
+ switch (e) {
347
+ case "choice":
348
+ case "multi-select": return "options";
349
+ case "tabs": return "tabs";
350
+ case "steps": return "steps";
351
+ case "selection": return "selection";
352
+ case "diagram": return "diagram-nodes";
353
+ case "checklist": return "checklist";
354
+ default: return;
355
+ }
356
+ }
357
+ // src/sdk/registry-core.ts
358
+ var k = /* @__PURE__ */ new WeakMap();
359
+ function A(e) {
360
+ return {
361
+ kind: e.kind,
362
+ ...e.required === !0 ? { required: !0 } : {},
363
+ ...e.static === !0 ? { static: !0 } : {},
364
+ ...e.dynamic === void 0 ? {} : { dynamic: e.dynamic },
365
+ ...e.default === void 0 ? {} : { default: e.default },
366
+ ...e.nullable === !0 ? { nullable: !0 } : {},
367
+ ...e.enum ? { values: [...e.enum] } : {},
368
+ ...e.pattern === void 0 ? {} : { pattern: e.pattern },
369
+ ...e.min === void 0 ? {} : { min: e.min },
370
+ ...e.max === void 0 ? {} : { max: e.max },
371
+ ...e.integer === !0 ? { integer: !0 } : {},
372
+ ...e.positive === !0 ? { positive: !0 } : {},
373
+ ...e.color === !0 ? { color: !0 } : {},
374
+ ...e.coerce === void 0 ? {} : { coerce: e.coerce }
375
+ };
376
+ }
377
+ function j(e) {
378
+ return {
379
+ kind: e.kind,
380
+ family: e.family,
381
+ bind: e.bind,
382
+ initial: e.initial,
383
+ initialRule: e.initialRule,
384
+ required: e.required === !0,
385
+ ...e.exclusive === !0 ? { exclusive: !0 } : {},
386
+ ...e.options ? { options: e.options } : {},
387
+ ...e.constraints ? { constraints: e.constraints } : {},
388
+ ...e.maxItems ? { maxItems: e.maxItems } : {},
389
+ ...e.requiresAttributes ? { requiresAttributes: e.requiresAttributes } : {},
390
+ ...e.compare ? { compare: e.compare } : {},
391
+ ...e.retain === !1 ? { retain: !1 } : {}
392
+ };
393
+ }
394
+ function M(e, t) {
395
+ if (t === e.bind) return {
396
+ kind: "string",
397
+ static: !0
398
+ };
399
+ switch (e.kind) {
400
+ case "number": return {
401
+ kind: "number",
402
+ static: !0
403
+ };
404
+ case "boolean": return {
405
+ kind: "boolean",
406
+ static: !0
407
+ };
408
+ default: return {
409
+ kind: "string",
410
+ static: !0
411
+ };
412
+ }
413
+ }
414
+ function N(e, t) {
415
+ if (e === void 0) return t === "leaf" ? "none" : "any";
416
+ switch (e.rule) {
417
+ case "components": return e.child === "card" ? "cards" : e.child === "disclosure" ? "disclosures" : e.child === "column" ? "columns" : "any";
418
+ default: return e.rule;
419
+ }
420
+ }
421
+ function P(t) {
422
+ let n = k.get(t);
423
+ if (n !== void 0) return n;
424
+ let r = t.bindings ?? {}, i = t.structure ?? e(t.children), a = r.value, o = [];
425
+ for (let [e, t] of Object.entries(r)) e !== "value" && o.push(Object.freeze({
426
+ name: e,
427
+ bind: t.bind,
428
+ initial: t.initial,
429
+ kind: t.kind,
430
+ family: t.family,
431
+ exclusive: t.exclusive === !0,
432
+ initialRule: t.initialRule
433
+ }));
434
+ let s = {};
435
+ for (let [e, n] of Object.entries(t.props)) s[e] = A(n);
436
+ for (let e of Object.values(r)) {
437
+ let t = [e.bind, e.initial];
438
+ for (let n of t) Object.hasOwn(s, n) || (n !== e.initial || e.initialRule !== "checked" && e.initialRule !== "duration") && (s[n] = M(e, n));
439
+ }
440
+ let c = Object.freeze({
441
+ name: t.name,
442
+ form: t.form,
443
+ props: Object.freeze(s),
444
+ ...a ? { binding: Object.freeze(j(a)) } : {},
445
+ ...Object.keys(r).length ? { bindings: Object.freeze({ ...r }) } : {},
446
+ ...o.length ? { slots: Object.freeze(o) } : {},
447
+ ...i ? { structure: i } : {},
448
+ ...t.rules ? { rules: t.rules } : {},
449
+ ...t.slotRelations ? { slotRelations: t.slotRelations } : {},
450
+ ...t.legacyHost === !0 ? { legacyHost: !0 } : {},
451
+ childRule: N(i, t.form),
452
+ label: i?.label ?? "none",
453
+ ...i?.parents ? { parent: i.parents } : {},
454
+ ...a ? { initialRule: a.initialRule } : {}
455
+ });
456
+ return k.set(t, c), c;
457
+ }
458
+ function F(e) {
459
+ return P(e);
460
+ }
461
+ var I = /* @__PURE__ */ new WeakMap();
462
+ function L(t) {
463
+ let n = I.get(t);
464
+ if (n !== void 0) return n;
465
+ let r = t.structure ?? e(t.children), i = p({
466
+ name: t.name,
467
+ form: t.form,
468
+ props: t.props,
469
+ childRule: N(r, t.form)
470
+ }, {
471
+ ...r ? { structure: r } : {},
472
+ ...t.rules ? { rules: t.rules } : {},
473
+ ...t.bindings ? { bindings: t.bindings } : {},
474
+ ...t.slotRelations ? { slotRelations: t.slotRelations } : {},
475
+ ...t.legacyHost ? { legacyHost: !0 } : {}
476
+ });
477
+ return I.set(t, i), i;
478
+ }
479
+ export { i as _, _ as a, n as b, S as c, O as d, c as f, r as g, C as h, y as i, x as l, l as m, F as n, D as o, s as p, L as r, w as s, P as t, T as u, o as v, p as x, u as y };
@@ -1,5 +1,5 @@
1
- import { D as e, j as t, k as n } from "./identity-MYJXKSkB.js";
2
- import { u as r, y as i } from "./registry-B9Jc3FVe.js";
1
+ import { A as e, M as t, O as n } from "./preset-core-CKc5YXSM.js";
2
+ import { g as r, s as i } from "./config-BadfhjdP.js";
3
3
  // src/export/requirements.ts
4
4
  var a = 128, o = 16777216, s = 5e5;
5
5
  function c(e, t) {
@@ -18,35 +18,35 @@ function c(e, t) {
18
18
  function l(e) {
19
19
  return typeof e == "object" && !!e && !Array.isArray(e);
20
20
  }
21
- function u(t, n) {
22
- if (t === void 0) return [];
23
- let i = [], a = (e) => i.push(c("local.extension.requirements", e));
21
+ function u(e, t) {
22
+ if (e === void 0) return [];
23
+ let r = [], a = (e) => r.push(c("local.extension.requirements", e));
24
24
  try {
25
- if (!t || typeof t != "object" || Array.isArray(t)) return a("Extension requirements must be a plain object."), i;
26
- let o = t;
27
- if (o.protocol !== "reactive-md-extensions/v1" || !Array.isArray(o.components) || o.components.length > 64) return a("Unsupported or oversized extension requirements."), i;
28
- let s = n === void 0 ? void 0 : r(n), c = /* @__PURE__ */ new Set();
29
- for (let t of o.components) {
30
- if (!t || typeof t != "object" || typeof t.id != "string" || typeof t.name != "string" || typeof t.version != "string" || typeof t.digest != "string" || [
31
- t.id,
32
- t.name,
33
- t.version,
34
- t.digest
35
- ].some((e) => e.length > 256) || c.has(t.id)) {
25
+ if (!e || typeof e != "object" || Array.isArray(e)) return a("Extension requirements must be a plain object."), r;
26
+ let o = e;
27
+ if (o.protocol !== "reactive-md-extensions/v1" || !Array.isArray(o.components) || o.components.length > 64) return a("Unsupported or oversized extension requirements."), r;
28
+ let s = t === void 0 ? void 0 : i(t), c = /* @__PURE__ */ new Set();
29
+ for (let e of o.components) {
30
+ if (!e || typeof e != "object" || typeof e.id != "string" || typeof e.name != "string" || typeof e.version != "string" || typeof e.digest != "string" || [
31
+ e.id,
32
+ e.name,
33
+ e.version,
34
+ e.digest
35
+ ].some((e) => e.length > 256) || c.has(e.id)) {
36
36
  a("Invalid or duplicate component requirement.");
37
37
  continue;
38
38
  }
39
- c.add(t.id);
40
- let n = s?.registry.find((e) => e.id === t.id);
41
- n ? (n.name !== t.name || n.version !== t.version || e(n) !== t.digest) && a(`Component ${t.id}@${t.version} does not match the installed component contract.`) : a(`Component ${t.id}@${t.version} is not installed in this host.`);
39
+ c.add(e.id);
40
+ let t = s?.registry.find((t) => t.id === e.id);
41
+ t ? (t.name !== e.name || t.version !== e.version || n(t) !== e.digest) && a(`Component ${e.id}@${e.version} does not match the installed component contract.`) : a(`Component ${e.id}@${e.version} is not installed in this host.`);
42
42
  }
43
43
  } catch (e) {
44
44
  a(e instanceof Error ? e.message : String(e));
45
45
  }
46
- return i;
46
+ return r;
47
47
  }
48
- function d(e) {
49
- let r = [], i = (e) => r.push(c("local.extension.contract-metadata", e)), s = e.componentDefinitions;
48
+ function d(n) {
49
+ let r = [], i = (e) => r.push(c("local.extension.contract-metadata", e)), s = n.componentDefinitions;
50
50
  if (s === void 0) return {
51
51
  definitions: [],
52
52
  diagnostics: r
@@ -59,7 +59,7 @@ function d(e) {
59
59
  definitions: [],
60
60
  diagnostics: r
61
61
  };
62
- let l = n(s);
62
+ let l = e(s);
63
63
  if (!Number.isFinite(l) || l > o) return i(`Carried component definitions exceed the ${o}-byte budget.`), {
64
64
  definitions: [],
65
65
  diagnostics: r
@@ -116,47 +116,47 @@ function p(e) {
116
116
  diagnostics: n
117
117
  };
118
118
  }
119
- function m(t) {
120
- let n = [], r = (e) => n.push(c("local.extension.contract", e));
119
+ function m(e) {
120
+ let t = [], r = (e) => t.push(c("local.extension.contract", e));
121
121
  try {
122
- let { document: i, installed: a } = t, o = d(i);
123
- n.push(...o.diagnostics);
122
+ let { document: i, installed: a } = e, o = d(i);
123
+ t.push(...o.diagnostics);
124
124
  let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
125
125
  for (let e of a) s.set(e.id, e), c.set(e.name, e);
126
126
  let l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
127
- for (let t of o.definitions) {
128
- if (l.has(t.id) || u.has(t.name)) {
129
- r(`Carried component definition ${t.id} is declared more than once.`);
127
+ for (let e of o.definitions) {
128
+ if (l.has(e.id) || u.has(e.name)) {
129
+ r(`Carried component definition ${e.id} is declared more than once.`);
130
130
  continue;
131
131
  }
132
- l.set(t.id, t), u.set(t.name, t);
133
- let n = s.get(t.id) ?? c.get(t.name);
134
- n ? (n.id !== t.id || n.name !== t.name || n.version !== t.version || e(n) !== e(t)) && r(`Carried component ${t.id}@${t.version} does not match the installed component contract.`) : r(`Carried component ${t.id}@${t.version} is not installed in this host.`);
132
+ l.set(e.id, e), u.set(e.name, e);
133
+ let t = s.get(e.id) ?? c.get(e.name);
134
+ t ? (t.id !== e.id || t.name !== e.name || t.version !== e.version || n(t) !== n(e)) && r(`Carried component ${e.id}@${e.version} does not match the installed component contract.`) : r(`Carried component ${e.id}@${e.version} is not installed in this host.`);
135
135
  }
136
- let m = t.externalNames ?? /* @__PURE__ */ new Set();
136
+ let m = e.externalNames ?? /* @__PURE__ */ new Set();
137
137
  if (m.size > 0) {
138
- let t = p(i);
139
- n.push(...t.diagnostics);
138
+ let e = p(i);
139
+ t.push(...e.diagnostics);
140
140
  let a = f(i);
141
- for (let n of t.names) {
142
- if (!m.has(n)) continue;
143
- let t = c.get(n);
144
- if (!t) {
145
- r(`Component <${n}> is used but no matching installed component contract exists.`);
141
+ for (let t of e.names) {
142
+ if (!m.has(t)) continue;
143
+ let e = c.get(t);
144
+ if (!e) {
145
+ r(`Component <${t}> is used but no matching installed component contract exists.`);
146
146
  continue;
147
147
  }
148
- let i = a.get(n);
149
- i ? (i.id !== t.id || i.version !== t.version || i.digest !== e(t)) && r(`Component <${n}> requirement does not match the installed ${t.id}@${t.version}.`) : r(`Component <${n}> is used but the document has no extension requirement for ${t.id}@${t.version}.`);
148
+ let i = a.get(t);
149
+ i ? (i.id !== e.id || i.version !== e.version || i.digest !== n(e)) && r(`Component <${t}> requirement does not match the installed ${e.id}@${e.version}.`) : r(`Component <${t}> is used but the document has no extension requirement for ${e.id}@${e.version}.`);
150
150
  }
151
151
  }
152
152
  } catch (e) {
153
153
  r(e instanceof Error ? e.message : String(e));
154
154
  }
155
- return n;
155
+ return t;
156
156
  }
157
157
  // src/export/resources.ts
158
158
  function h(e) {
159
- return i(e);
159
+ return r(e);
160
160
  }
161
161
  function g(e) {
162
162
  let t = [], n = (e, n) => t.push({
@@ -1,4 +1,4 @@
1
- import { C as e, D as t, S as n, l as r } from "./component-state-Cq2K5gkS.js";
1
+ import { C as e, D as t, S as n, l as r } from "./component-state-BoLCGee4.js";
2
2
  // src/runtime-services/scheduler.ts
3
3
  var i = 64, a = 16;
4
4
  function o() {