reactive-md 0.9.0 → 0.9.2

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 (338) hide show
  1. package/CHANGELOG-ch.md +333 -306
  2. package/CHANGELOG.md +334 -307
  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/THIRD_PARTY_NOTICES.md +111 -1
  11. package/bin/reactive-md.mjs +39 -39
  12. package/cli/args.mjs +263 -263
  13. package/cli/assets.mjs +395 -395
  14. package/cli/build.mjs +445 -444
  15. package/cli/check.mjs +444 -444
  16. package/cli/document.mjs +130 -130
  17. package/cli/errors.mjs +61 -61
  18. package/cli/fs-utils.mjs +133 -133
  19. package/cli/glob.mjs +203 -203
  20. package/cli/help.mjs +323 -323
  21. package/cli/init.mjs +1577 -1577
  22. package/cli/lint.mjs +177 -177
  23. package/cli/main.mjs +65 -65
  24. package/cli/migrate.mjs +368 -368
  25. package/cli/package-loader.mjs +41 -41
  26. package/cli/package.mjs +211 -211
  27. package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-BuqgJZEY.js} +11 -11
  28. package/dist-library/LocalDocumentViewCore-DXE0I0Qc.js +9830 -0
  29. package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +275 -0
  30. package/dist-library/{authoring-Co_TiE-P.js → authoring-Ci_KzJ0q.js} +87 -67
  31. package/dist-library/{compile-LhpTKqCR.js → compile-Dx6Uw3D9.js} +11 -11
  32. package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-DDDdvuLy.js} +2618 -1846
  33. package/dist-library/compiler-dxLPB9Ym.js +86 -0
  34. package/dist-library/{component-state-BBJ08vML.js → component-state-BRwvTV0d.js} +15 -14
  35. package/dist-library/component-state-CwKX_SN5.js +763 -0
  36. package/dist-library/{config-BUo-8O5C.js → config-DXLvctiZ.js} +68 -66
  37. package/dist-library/config-validation-D3D7Dy2J.js +586 -0
  38. package/dist-library/{controls-BWiLLtBO.js → controls-DoZyLCrV.js} +2434 -2410
  39. package/dist-library/{coordinate-BSl6enWV.js → coordinate-B1VFK9fd.js} +108 -107
  40. package/dist-library/{data-table-DfvytZKQ.js → data-table-8-3F15Jf.js} +69 -66
  41. package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
  42. package/dist-library/{display-lw3BT1TA.js → display-B_uutKkN.js} +1 -1
  43. package/dist-library/{config-validation-C5kJYk-J.js → document-theme-C8J6UyNO.js} +241 -731
  44. package/dist-library/export-CIAIPBov.js +370 -0
  45. package/dist-library/{gallery-B8kSt1oI.js → gallery-Dv1rOvL0.js} +151 -147
  46. package/dist-library/html-Cr4CBwAH.js +758 -0
  47. package/dist-library/identity-BUx0Q_-d.js +40 -0
  48. package/dist-library/{incremental-D_6vwAAE.js → incremental-9nx92u9c.js} +407 -143
  49. package/dist-library/layout-BBB2VF0S.js +562 -0
  50. package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-DMZ5wd3t.js} +3 -3
  51. package/dist-library/observability-4KqXhIEU.js +421 -0
  52. package/dist-library/observability-core-Bcu7vpnl.js +24 -0
  53. package/dist-library/options-BBp9IcHm.js +121 -0
  54. package/dist-library/{package-core-D0POW4Gd.js → package-core-K5xesGqy.js} +30 -29
  55. package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-CBA1-hdG.js} +3332 -3840
  56. package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
  57. package/dist-library/preset-core-DeZPA8IE.js +1298 -0
  58. package/dist-library/react-0DCh-Mar.js +7 -0
  59. package/dist-library/reactive-md-authoring.js +28 -30
  60. package/dist-library/reactive-md-build.js +99 -61
  61. package/dist-library/reactive-md-compiler-standard.js +10 -9
  62. package/dist-library/reactive-md-compiler.js +3 -3
  63. package/dist-library/reactive-md-default-packs.js +3 -2
  64. package/dist-library/reactive-md-default-preset.js +3 -2
  65. package/dist-library/reactive-md-export.js +4 -4
  66. package/dist-library/reactive-md-minimal-preset.js +2 -2
  67. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  68. package/dist-library/reactive-md-observability.js +4 -0
  69. package/dist-library/reactive-md-pdf.js +127 -3
  70. package/dist-library/reactive-md-plugin-chart.js +3 -3
  71. package/dist-library/reactive-md-plugin-data.js +5 -5
  72. package/dist-library/reactive-md-plugin-diagram.js +4 -4
  73. package/dist-library/reactive-md-plugin-forms.js +4 -4
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +3 -3
  76. package/dist-library/reactive-md-plugin-network.js +119 -116
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-print.css +304 -304
  79. package/dist-library/reactive-md-react-minimal.js +4 -4
  80. package/dist-library/reactive-md-react-server.js +6 -6
  81. package/dist-library/reactive-md-react-unstyled.js +11 -12
  82. package/dist-library/reactive-md-react.js +11 -12
  83. package/dist-library/reactive-md-runtime-browser.js +2 -1
  84. package/dist-library/reactive-md-runtime.js +4 -3
  85. package/dist-library/reactive-md-sdk.js +8 -7
  86. package/dist-library/reactive-md-standalone-configured.js +2 -2
  87. package/dist-library/reactive-md-standalone-host.js +2 -2
  88. package/dist-library/reactive-md-testing-browser.js +2 -2
  89. package/dist-library/reactive-md-testing-react.js +6 -6
  90. package/dist-library/reactive-md-testing.js +5 -5
  91. package/dist-library/reactive-md.js +649 -373
  92. package/dist-library/{registry-05JiqmEp.js → registry-D6OGkOcX.js} +3 -3
  93. package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
  94. package/dist-library/{resources-IeJomeUT.js → resources-B0x_w3s9.js} +71 -46
  95. package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
  96. package/dist-library/{runtime-CuOyRe9f.js → runtime-BpQdZmFI.js} +269 -263
  97. package/dist-library/{schema-C-AeByPp.js → schema-BryM_VRW.js} +14 -14
  98. package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-ChslheKs.js} +499 -158
  99. package/dist-library/{session-core-BGka5D1J.js → session-core-dxQCJBNa.js} +171 -156
  100. package/dist-library/{shareable-jkGi2g6y.js → shareable-B8xMoGEa.js} +265 -297
  101. package/dist-library/types/authoring/catalog.d.ts +1 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
  104. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  105. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  106. package/dist-library/types/local/compilation/compiler-services.d.ts +8 -4
  107. package/dist-library/types/local/compilation/compiler.d.ts +3 -3
  108. package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
  109. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  110. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  111. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +48 -0
  112. package/dist-library/types/local/configuration/options-core.d.ts +1 -2
  113. package/dist-library/types/local/configuration/options.d.ts +1 -0
  114. package/dist-library/types/local/css/author-css.d.ts +66 -0
  115. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  116. package/dist-library/types/local/html/html.d.ts +39 -3
  117. package/dist-library/types/local/index.d.ts +7 -1
  118. package/dist-library/types/local/observability-codes.d.ts +2 -0
  119. package/dist-library/types/local/observability-core.d.ts +25 -0
  120. package/dist-library/types/local/observability-messages.d.ts +6 -0
  121. package/dist-library/types/local/observability.d.ts +43 -0
  122. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  123. package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
  124. package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
  125. package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
  126. package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
  127. package/dist-library/types/local/parsing/parser.d.ts +2 -2
  128. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  129. package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
  130. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
  131. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  132. package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
  133. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  134. package/dist-library/types/local/transport/worker.d.ts +79 -5
  135. package/dist-library/types/local/types.d.ts +60 -16
  136. package/dist-library/types/observability.d.ts +7 -0
  137. package/dist-library/types/react/component-api.d.ts +10 -1
  138. package/dist-library/types/react/component-utils.d.ts +9 -1
  139. package/dist-library/types/react/sdk-core.d.ts +4 -1
  140. package/dist-library/types/shareable.d.ts +5 -4
  141. package/dist-library/types/standalone/prepare.d.ts +1 -1
  142. package/dist-library/types/standalone/session-core.d.ts +3 -2
  143. package/dist-library/{types-BFC5rzC4.js → types-Ib5kSScP.js} +1 -1
  144. package/dist-library/types-daDo2c_w.js +3 -0
  145. package/dist-library/{validation-BlDL2uD9.js → validation-B3RI0xOk.js} +218 -200
  146. package/dist-library/version-DAxuGOG2.js +147 -0
  147. package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-_rcd5HUv.js} +6 -5
  148. package/dist-library/{visuals-BkYRmYGO.js → visuals-DkDhNdEZ.js} +24191 -24190
  149. package/dist-standalone/reactive-md-standalone.js +124 -117
  150. package/docs/README-ch.md +101 -94
  151. package/docs/README.md +101 -94
  152. package/docs/compatibility/api-stability-ch.md +25 -0
  153. package/docs/compatibility/api-stability-en.md +25 -0
  154. package/docs/compatibility/compatibility-ch.md +146 -129
  155. package/docs/compatibility/compatibility-en.md +146 -129
  156. package/docs/compatibility/compatibility-manifest.schema.json +161 -0
  157. package/docs/compatibility/deprecation-ch.md +21 -0
  158. package/docs/compatibility/deprecation-en.md +21 -0
  159. package/docs/compatibility/source-versioning-ch.md +162 -162
  160. package/docs/compatibility/source-versioning-en.md +162 -162
  161. package/docs/compatibility/support-matrix-ch.md +108 -0
  162. package/docs/compatibility/support-matrix-en.md +108 -0
  163. package/docs/development/component-development-ch.md +66 -66
  164. package/docs/development/component-development-en.md +66 -66
  165. package/docs/development/component-development-reference-ch.md +253 -253
  166. package/docs/development/component-development-reference-en.md +238 -238
  167. package/docs/development/component-protocol-ch.md +748 -748
  168. package/docs/development/component-protocol-en.md +750 -750
  169. package/docs/development/extension-tutorial-ch.md +308 -308
  170. package/docs/development/extension-tutorial-en.md +308 -308
  171. package/docs/development/performance-overview-ch.md +422 -422
  172. package/docs/development/performance-overview-en.md +422 -422
  173. package/docs/guides/local-guide-ch.md +532 -532
  174. package/docs/guides/local-guide-en.md +532 -532
  175. package/docs/integration/author-tools-ch.md +64 -64
  176. package/docs/integration/author-tools-en.md +64 -64
  177. package/docs/integration/compiler-ch.md +49 -47
  178. package/docs/integration/compiler-en.md +36 -34
  179. package/docs/integration/directory-discovery-en.md +1 -1
  180. package/docs/integration/editor-ch.md +295 -295
  181. package/docs/integration/editor-en.md +303 -303
  182. package/docs/integration/extension-sdk-ch.md +394 -394
  183. package/docs/integration/extension-sdk-en.md +379 -379
  184. package/docs/integration/local-integration-ch.md +646 -524
  185. package/docs/integration/local-integration-en.md +662 -540
  186. package/docs/integration/shareable-export-ch.md +307 -305
  187. package/docs/integration/shareable-export-en.md +309 -307
  188. package/docs/reference/diagnostics-counting-ch.md +104 -104
  189. package/docs/reference/diagnostics-counting-en.md +104 -104
  190. package/docs/reference/html-compatibility-ch.md +93 -140
  191. package/docs/reference/html-compatibility-en.md +95 -140
  192. package/docs/reference/local-interaction-syntax-ch.md +724 -724
  193. package/docs/reference/local-interaction-syntax-en.md +722 -722
  194. package/docs/reference/public-api-ch.md +39 -7
  195. package/docs/reference/public-api-en.md +39 -7
  196. package/docs/reference/theme-protocol-ch.md +198 -198
  197. package/docs/reference/theme-protocol-en.md +217 -217
  198. package/docs/releases/release-0.4.0-ch.md +91 -91
  199. package/docs/releases/release-0.4.0-en.md +91 -91
  200. package/docs/releases/release-0.4.1-ch.md +25 -25
  201. package/docs/releases/release-0.4.1-en.md +25 -25
  202. package/docs/releases/release-0.5.0-ch.md +43 -43
  203. package/docs/releases/release-0.5.0-en.md +43 -43
  204. package/docs/releases/release-0.5.1-ch.md +41 -41
  205. package/docs/releases/release-0.5.1-en.md +41 -41
  206. package/docs/releases/release-0.5.2-ch.md +37 -37
  207. package/docs/releases/release-0.5.2-en.md +37 -37
  208. package/docs/releases/release-0.5.3-ch.md +26 -26
  209. package/docs/releases/release-0.5.3-en.md +26 -26
  210. package/docs/releases/release-0.6.0-ch.md +59 -59
  211. package/docs/releases/release-0.6.0-en.md +59 -59
  212. package/docs/releases/release-0.6.1-ch.md +29 -29
  213. package/docs/releases/release-0.6.1-en.md +29 -29
  214. package/docs/releases/release-0.7.0-ch.md +86 -86
  215. package/docs/releases/release-0.7.0-en.md +86 -86
  216. package/docs/releases/release-0.9.1-ch.md +29 -0
  217. package/docs/releases/release-0.9.1-en.md +29 -0
  218. package/docs/releases/release-0.9.2-ch.md +33 -0
  219. package/docs/releases/release-0.9.2-en.md +33 -0
  220. package/examples/component-package/README-ch.md +101 -101
  221. package/examples/component-package/README.md +133 -133
  222. package/examples/conformance/README-ch.md +55 -55
  223. package/examples/conformance/README.md +55 -55
  224. package/examples/conformance/component-protocol-1.json +482 -482
  225. package/examples/conformance/component-protocol-1.schema.json +76 -76
  226. package/examples/conformance/local-draft-1.json +50 -50
  227. package/examples/conformance/local-draft-2.json +212 -212
  228. package/examples/game-2048-package/LICENSE +21 -21
  229. package/examples/game-2048-package/NOTICES.md +11 -11
  230. package/examples/game-2048-package/README-ch.md +91 -91
  231. package/examples/game-2048-package/README.md +98 -98
  232. package/examples/game-2048-package/package.json +35 -35
  233. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  234. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  235. package/examples/game-2048-package/scripts/build.mjs +130 -130
  236. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  237. package/examples/game-2048-package/src/component.css +161 -161
  238. package/examples/game-2048-package/src/components.tsx +326 -326
  239. package/examples/game-2048-package/src/game-engine.ts +228 -228
  240. package/examples/game-2048-package/src/harness.tsx +34 -34
  241. package/examples/game-2048-package/src/manifest.ts +85 -85
  242. package/examples/game-2048-package/src/node-entry.ts +30 -30
  243. package/examples/game-2048-package/src/sample.ts +4 -4
  244. package/examples/game-2048-package/tsconfig.json +15 -15
  245. package/examples/integration/README-ch.md +82 -63
  246. package/examples/integration/README.md +82 -63
  247. package/examples/integration/core/index.mjs +32 -32
  248. package/examples/integration/extension-sdk/README-ch.md +24 -24
  249. package/examples/integration/extension-sdk/README.md +24 -24
  250. package/examples/integration/streaming/index.html +48 -0
  251. package/examples/integration/streaming/main.js +175 -0
  252. package/examples/integration/streaming/package.json +13 -0
  253. package/examples/integration/streaming/worker.js +3 -0
  254. package/examples/integration/worker/index.html +19 -19
  255. package/examples/integration/worker/main.js +61 -61
  256. package/examples/integration/worker/package.json +13 -13
  257. package/examples/integration/worker/worker.js +3 -3
  258. package/examples/local/README-ch.md +76 -76
  259. package/examples/local/README.md +76 -76
  260. package/examples/local/charts.reactive.md +73 -73
  261. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  262. package/examples/local/recipes/invoice.reactive.md +36 -36
  263. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  264. package/examples/local/recipes/workshop.reactive.md +33 -33
  265. package/examples/local/showcase/README-ch.md +22 -22
  266. package/examples/local/showcase/README.md +31 -31
  267. package/examples/local/showcase/explore.reactive.md +102 -102
  268. package/examples/local/showcase/flow.reactive.md +86 -86
  269. package/examples/local/showcase/forms.reactive.md +126 -126
  270. package/examples/local/showcase/functions.reactive.md +119 -119
  271. package/examples/local/showcase/layout.reactive.md +100 -100
  272. package/examples/local/showcase/statistics.reactive.md +108 -108
  273. package/examples/local/showcase/tasks.reactive.md +89 -89
  274. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  275. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  276. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  277. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  278. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  279. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  280. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  281. package/examples/minimal-extension/README-ch.md +78 -78
  282. package/examples/minimal-extension/README.md +78 -78
  283. package/examples/minimal-extension/index.html +15 -15
  284. package/examples/minimal-extension/package.json +26 -26
  285. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  286. package/examples/minimal-extension/scripts/build.mjs +32 -32
  287. package/examples/minimal-extension/scripts/export.mjs +72 -72
  288. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  289. package/examples/minimal-extension/src/extension.tsx +90 -90
  290. package/examples/minimal-extension/src/preview.tsx +12 -12
  291. package/examples/minimal-extension/src/source.ts +4 -4
  292. package/examples/minimal-extension/tsconfig.json +14 -14
  293. package/examples/sci-fi-theme/README-ch.md +133 -133
  294. package/examples/sci-fi-theme/README.md +148 -148
  295. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  296. package/examples/sci-fi-theme/demo/demo.css +638 -638
  297. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  298. package/examples/sci-fi-theme/demo/index.html +13 -13
  299. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  300. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  301. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  302. package/examples/sci-fi-theme/package.json +28 -28
  303. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  304. package/examples/sci-fi-theme/src/components.css +2370 -2370
  305. package/examples/sci-fi-theme/src/index.ts +6 -6
  306. package/examples/sci-fi-theme/src/notch.css +142 -142
  307. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  308. package/examples/sci-fi-theme/src/theme.ts +39 -39
  309. package/examples/sci-fi-theme/tsconfig.json +20 -20
  310. package/examples/sci-fi-theme/vite.config.ts +24 -24
  311. package/examples/tetris-package/LICENSE +21 -21
  312. package/examples/tetris-package/NOTICES.md +11 -11
  313. package/examples/tetris-package/README-ch.md +91 -91
  314. package/examples/tetris-package/README.md +95 -95
  315. package/examples/tetris-package/package.json +35 -35
  316. package/examples/tetris-package/sample/document.reactive.md +16 -16
  317. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  318. package/examples/tetris-package/scripts/build.mjs +130 -130
  319. package/examples/tetris-package/scripts/verify.mjs +173 -173
  320. package/examples/tetris-package/src/component.css +145 -145
  321. package/examples/tetris-package/src/components.tsx +334 -334
  322. package/examples/tetris-package/src/harness.tsx +34 -34
  323. package/examples/tetris-package/src/manifests.ts +93 -93
  324. package/examples/tetris-package/src/node-entry.ts +16 -16
  325. package/examples/tetris-package/src/sample.ts +4 -4
  326. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  327. package/examples/tetris-package/tsconfig.json +15 -15
  328. package/package.json +12 -1
  329. package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
  330. package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
  331. package/dist-library/compiler-DfGbQhyD.js +0 -62
  332. package/dist-library/component-state-BoLCGee4.js +0 -801
  333. package/dist-library/component-utils-BvHL8VGt.js +0 -298
  334. package/dist-library/export-C7IDW9ul.js +0 -311
  335. package/dist-library/layout-C22VjZh0.js +0 -542
  336. package/dist-library/options-CdSKOi7p.js +0 -116
  337. package/dist-library/preset-core-CKc5YXSM.js +0 -1443
  338. package/dist-library/react-LY5qsVeP.js +0 -7
@@ -1,121 +1,123 @@
1
- import { $ as e, A as t, F as n, I as r, N as i, Q as a, R as o, X as s, Z as c, a as l, i as u, it as d, q as f, st as p, t as m } from "./preset-core-CKc5YXSM.js";
2
- import { D as h, E as g, O as _, T as v, V as y, _ as b, a as x, c as S, d as C, h as w, i as T, m as ee, n as E, o as te, p as ne, r as D, s as re, t as ie, v as ae, y as O } from "./config-validation-C5kJYk-J.js";
3
- import { a as k, n as oe, s as se, t as ce } from "./compile-LhpTKqCR.js";
4
- import { n as le } from "./props-sJ8vk0cr.js";
5
- import { p as ue, r as de, x as fe } from "./registry-core-Bbad9Bm2.js";
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";
6
8
  // node_modules/devlop/lib/default.js
7
- function pe() {}
9
+ function me() {}
8
10
  // node_modules/mdast-util-to-string/lib/index.js
9
- var me = {};
10
- function he(e, t) {
11
- let n = t || me;
12
- return ge(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
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);
13
15
  }
14
- function ge(e, t, n) {
15
- if (ve(e)) {
16
+ function _e(e, t, n) {
17
+ if (ye(e)) {
16
18
  if ("value" in e) return e.type === "html" && !n ? "" : e.value;
17
19
  if (t && "alt" in e && e.alt) return e.alt;
18
- if ("children" in e) return _e(e.children, t, n);
20
+ if ("children" in e) return ve(e.children, t, n);
19
21
  }
20
- return Array.isArray(e) ? _e(e, t, n) : "";
22
+ return Array.isArray(e) ? ve(e, t, n) : "";
21
23
  }
22
- function _e(e, t, n) {
24
+ function ve(e, t, n) {
23
25
  let r = [], i = -1;
24
- for (; ++i < e.length;) r[i] = ge(e[i], t, n);
26
+ for (; ++i < e.length;) r[i] = _e(e[i], t, n);
25
27
  return r.join("");
26
28
  }
27
- function ve(e) {
29
+ function ye(e) {
28
30
  return !!(e && typeof e == "object");
29
31
  }
30
32
  // node_modules/micromark-util-chunked/index.js
31
- function A(e, t, n, r) {
33
+ function k(e, t, n, r) {
32
34
  let i = e.length, a = 0, o;
33
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);
34
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;
35
37
  }
36
- function ye(e, t) {
37
- return e.length > 0 ? (A(e, e.length, 0, t), e) : t;
38
+ function be(e, t) {
39
+ return e.length > 0 ? (k(e, e.length, 0, t), e) : t;
38
40
  }
39
41
  // node_modules/micromark-util-combine-extensions/index.js
40
- var j = {}.hasOwnProperty;
41
- function be(e) {
42
+ var A = {}.hasOwnProperty;
43
+ function xe(e) {
42
44
  let t = {}, n = -1;
43
- for (; ++n < e.length;) xe(t, e[n]);
45
+ for (; ++n < e.length;) Se(t, e[n]);
44
46
  return t;
45
47
  }
46
- function xe(e, t) {
48
+ function Se(e, t) {
47
49
  let n;
48
50
  for (n in t) {
49
- let r = (j.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
51
+ let r = (A.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
50
52
  if (i) for (a in i) {
51
- j.call(r, a) || (r[a] = []);
53
+ A.call(r, a) || (r[a] = []);
52
54
  let e = i[a];
53
- Se(r[a], Array.isArray(e) ? e : e ? [e] : []);
55
+ Ce(r[a], Array.isArray(e) ? e : e ? [e] : []);
54
56
  }
55
57
  }
56
58
  }
57
- function Se(e, t) {
59
+ function Ce(e, t) {
58
60
  let n = -1, r = [];
59
61
  for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
60
- A(e, 0, 0, r);
62
+ k(e, 0, 0, r);
61
63
  }
62
64
  // node_modules/micromark-util-normalize-identifier/index.js
63
- function Ce(e) {
65
+ function we(e) {
64
66
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
65
67
  }
66
68
  // node_modules/micromark-util-character/index.js
67
- var we = L(/[A-Za-z]/), Te = L(/[\dA-Za-z]/), Ee = L(/[#-'*+\--9=?A-Z^-~]/);
68
- function De(e) {
69
+ var Te = I(/[A-Za-z]/), Ee = I(/[\dA-Za-z]/), De = I(/[#-'*+\--9=?A-Z^-~]/);
70
+ function Oe(e) {
69
71
  return e !== null && (e < 32 || e === 127);
70
72
  }
71
- var Oe = L(/\d/), ke = L(/[\dA-Fa-f]/), Ae = L(/[!-/:-@[-`{-~]/);
72
- function M(e) {
73
+ var ke = I(/\d/), Ae = I(/[\dA-Fa-f]/), je = I(/[!-/:-@[-`{-~]/);
74
+ function j(e) {
73
75
  return e !== null && e < -2;
74
76
  }
75
- function N(e) {
77
+ function M(e) {
76
78
  return e !== null && (e < 0 || e === 32);
77
79
  }
78
- function P(e) {
80
+ function N(e) {
79
81
  return e === -2 || e === -1 || e === 32;
80
82
  }
81
- var F = L(/\p{P}|\p{S}/u), I = L(/\s/);
82
- function L(e) {
83
+ var P = I(/\p{P}|\p{S}/u), F = I(/\s/);
84
+ function I(e) {
83
85
  return t;
84
86
  function t(t) {
85
87
  return t !== null && t > -1 && e.test(String.fromCharCode(t));
86
88
  }
87
89
  }
88
90
  // node_modules/micromark-factory-space/index.js
89
- function R(e, t, n, r) {
91
+ function L(e, t, n, r) {
90
92
  let i = r ? r - 1 : Infinity, a = 0;
91
93
  return o;
92
94
  function o(r) {
93
- return P(r) ? (e.enter(n), s(r)) : t(r);
95
+ return N(r) ? (e.enter(n), s(r)) : t(r);
94
96
  }
95
97
  function s(r) {
96
- return P(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
98
+ return N(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
97
99
  }
98
100
  }
99
- function je(e, t, n, r, i, a) {
101
+ function Me(e, t, n, r, i, a) {
100
102
  let o = 0;
101
103
  return s;
102
104
  function s(t) {
103
- return a > 0 && P(t) ? (e.enter(r), c(t)) : l(t);
105
+ return a > 0 && N(t) ? (e.enter(r), c(t)) : l(t);
104
106
  }
105
107
  function c(t) {
106
- return P(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
108
+ return N(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
107
109
  }
108
110
  function l(e) {
109
111
  return o >= i ? t(e) : n(e);
110
112
  }
111
113
  }
112
114
  // node_modules/micromark-util-classify-character/index.js
113
- function Me(e) {
114
- if (e === null || N(e) || I(e)) return 1;
115
- if (F(e)) return 2;
115
+ function Ne(e) {
116
+ if (e === null || M(e) || F(e)) return 1;
117
+ if (P(e)) return 2;
116
118
  }
117
119
  // node_modules/micromark-util-resolve-all/index.js
118
- function Ne(e, t, n) {
120
+ function Pe(e, t, n) {
119
121
  let r = [], i = -1;
120
122
  for (; ++i < e.length;) {
121
123
  let a = e[i].resolveAll;
@@ -124,21 +126,21 @@ function Ne(e, t, n) {
124
126
  return t;
125
127
  }
126
128
  // node_modules/micromark-core-commonmark/lib/blank-line.js
127
- var Pe = {
129
+ var Fe = {
128
130
  partial: !0,
129
- tokenize: Fe
131
+ tokenize: Ie
130
132
  };
131
- function Fe(e, t, n) {
133
+ function Ie(e, t, n) {
132
134
  return r;
133
135
  function r(t) {
134
- return P(t) ? R(e, i, "linePrefix")(t) : i(t);
136
+ return N(t) ? L(e, i, "linePrefix")(t) : i(t);
135
137
  }
136
138
  function i(e) {
137
- return e === null || M(e) ? t(e) : n(e);
139
+ return e === null || j(e) ? t(e) : n(e);
138
140
  }
139
141
  }
140
142
  // src/local/html/html-table-names.ts
141
- var Ie = /* @__PURE__ */ new Set([
143
+ var Le = /* @__PURE__ */ new Set([
142
144
  "table",
143
145
  "caption",
144
146
  "colgroup",
@@ -149,7 +151,7 @@ var Ie = /* @__PURE__ */ new Set([
149
151
  "tr",
150
152
  "th",
151
153
  "td"
152
- ]), z = {
154
+ ]), R = {
153
155
  colgroup: /* @__PURE__ */ new Set(["span"]),
154
156
  col: /* @__PURE__ */ new Set(["span"]),
155
157
  td: /* @__PURE__ */ new Set([
@@ -167,13 +169,13 @@ var Ie = /* @__PURE__ */ new Set([
167
169
  "align"
168
170
  ])
169
171
  };
170
- function B(e, t) {
172
+ function z(e, t) {
171
173
  let n = t.trim();
172
174
  return [
173
175
  "colspan",
174
176
  "rowspan",
175
177
  "span"
176
- ].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? _(t) !== null : e !== "scope" || [
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" || [
177
179
  "row",
178
180
  "col",
179
181
  "rowgroup",
@@ -181,7 +183,7 @@ function B(e, t) {
181
183
  ].includes(n.toLowerCase());
182
184
  }
183
185
  // src/local/html/html-policy.ts
184
- var Le = {
186
+ var Re = {
185
187
  b: "strong",
186
188
  strong: "strong",
187
189
  i: "emphasis",
@@ -192,12 +194,12 @@ var Le = {
192
194
  mark: "mark",
193
195
  sup: "sup",
194
196
  sub: "sub"
195
- }, Re = /* @__PURE__ */ new Set([
197
+ }, ze = /* @__PURE__ */ new Set([
196
198
  "br",
197
199
  "hr",
198
200
  "img",
199
201
  "col"
200
- ]), ze = /* @__PURE__ */ new Set([
202
+ ]), Be = /* @__PURE__ */ new Set([
201
203
  "pre",
202
204
  "code",
203
205
  "script",
@@ -209,12 +211,12 @@ var Le = {
209
211
  "noembed",
210
212
  "noframes",
211
213
  "plaintext"
212
- ]), Be = /* @__PURE__ */ new Set([
214
+ ]), Ve = /* @__PURE__ */ new Set([
213
215
  "id",
214
216
  "title",
215
217
  "lang",
216
218
  "dir"
217
- ]), Ve = {
219
+ ]), He = {
218
220
  a: g,
219
221
  img: /* @__PURE__ */ new Set([
220
222
  "src",
@@ -224,9 +226,9 @@ var Le = {
224
226
  ]),
225
227
  ol: /* @__PURE__ */ new Set(["start"]),
226
228
  details: /* @__PURE__ */ new Set(["open"]),
227
- ...z
229
+ ...R
228
230
  };
229
- function He(e, t, n) {
231
+ function Ue(e, t, n) {
230
232
  let r = "";
231
233
  for (let i = t; i < n; i += 1) {
232
234
  let t = e[i];
@@ -236,36 +238,36 @@ function He(e, t, n) {
236
238
  }
237
239
  return -1;
238
240
  }
239
- function Ue(e, t, n) {
241
+ function We(e, t, n) {
240
242
  if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
241
243
  if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
242
244
  let r = e.indexOf("-->", t + 4);
243
245
  return r < 0 || r + 3 > n ? n : r + 3;
244
246
  }
245
- function We(e) {
247
+ function Ge(e) {
246
248
  return e.trim().replace(/[\u0000- ]+/g, "");
247
249
  }
248
- function V(e, t) {
249
- let n = /^([a-z][a-z0-9+.-]*):/i.exec(We(e));
250
+ function B(e, t) {
251
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(Ge(e));
250
252
  if (!n) return !1;
251
253
  let r = n[1].toLowerCase();
252
254
  return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
253
255
  }
254
- function Ge(e, t) {
255
- return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && v.has(e) || Be.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : Ve[e]?.has(t) ?? !1;
256
- }
257
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) {
258
260
  return !(e === "dir" && ![
259
261
  "ltr",
260
262
  "rtl",
261
263
  "auto"
262
- ].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()) || !B(e, t) || e === "href" && V(t, "link") || e === "src" && V(t, "image"));
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"));
263
265
  }
264
- function qe(e, t) {
265
- return v.has(e) ? _(t) : null;
266
+ function Je(e, t) {
267
+ return O.has(e) ? D(t) : null;
266
268
  }
267
- // src/local/types.ts
268
- var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.freeze({}), Ze = Object.freeze([
269
+ // src/local/parsing/parser-capabilities.ts
270
+ var Ye = Object.freeze({}), Xe = Object.freeze([
269
271
  "anchor",
270
272
  "checkbox",
271
273
  "column",
@@ -283,87 +285,100 @@ var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.f
283
285
  "toggle",
284
286
  "validation"
285
287
  ]);
286
- function Qe(e) {
288
+ function Ze(e) {
287
289
  let t = /* @__PURE__ */ new Set();
288
- for (let n of Ze) e(n) || t.add(n);
290
+ for (let n of Xe) e(n) || t.add(n);
289
291
  return t;
290
292
  }
291
293
  // src/sdk/compiler-config.ts
292
- var H = Object.freeze({
293
- id: u,
294
- version: l
295
- }), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap();
296
- function G(e, t = H) {
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) {
297
299
  if (e.length === 0) return;
298
- let n = t.id === H.id && t.version === H.version;
300
+ let n = t.id === V.id && t.version === V.version;
299
301
  if (n) {
300
- let t = U.get(e);
302
+ let t = H.get(e);
301
303
  if (t) return t;
302
304
  }
303
- let r = m({
304
- protocol: o,
305
+ let r = le({
306
+ protocol: i,
305
307
  id: t.id,
306
308
  version: t.version,
307
309
  components: e
308
310
  });
309
- return n && U.set(e, r), r;
311
+ return n && H.set(e, r), r;
310
312
  }
311
- function K(e, t, n, r, i = "reactive-md-config/v1") {
312
- let a = w(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
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({
313
315
  profile: i,
314
316
  key: r
315
317
  })] : []];
316
- return C(e, a, o);
318
+ return b(e, a, o);
317
319
  }
318
- function $e(e) {
319
- return x(e) || T("assembly", "must be an object."), D(e, /* @__PURE__ */ new Set([
320
+ function Qe(e) {
321
+ return v(e) || S("assembly", "must be an object."), E(e, /* @__PURE__ */ new Set([
320
322
  "protocol",
321
323
  "presets",
322
324
  "components",
323
325
  "replacementPolicy",
324
326
  "themes"
325
- ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && T("assembly.protocol", `must be "${i}".`), ee(e);
327
+ ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && S("assembly.protocol", `must be "${o}".`), C(e);
326
328
  }
327
- function et(e, a = [], o = []) {
328
- let s = ae(o);
329
- if (x(e) || T("config", "must be an object."), D(e, ie, "config"), e.protocol === "reactive-md-config/v2") {
330
- let n = $e(e.assembly), r = K(n, a, s);
331
- return t(n) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), r;
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;
332
334
  }
333
- e.protocol !== "reactive-md-config/v1" && T("config.protocol", `must be "${r}" (or legacy "${n}").`);
334
- let c = re(e.presets, H, s)[0] ?? H, l = b(c, s);
335
- l === void 0 && T("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${c.id}" ${c.version}.`);
336
- let u = l.legacyKeys[0];
337
- u === void 0 && T("presets", `local.config.migration-unsupported: profile "${l.name}" has no legacy key mapping.`), S(l, a);
338
- let d = te(e.components, a);
339
- d.some((e) => e.replaces !== void 0) && T("config", "replaces is not supported by reactive-md-config/v1.");
340
- let f = G(a, l.preset), p = Object.freeze({
341
- protocol: i,
342
- presets: Object.freeze(f ? [f] : []),
343
- components: d,
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,
344
346
  replacementPolicy: "forbid",
345
347
  themes: Object.freeze([])
346
- }), m = K(p, a, s, a.length > 0 ? ne(l.preset, d) : void 0, u.profile);
347
- return t(p) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), m;
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;
348
350
  }
349
- function tt(e) {
350
- let t = W.get(e);
351
+ function et(e) {
352
+ let t = U.get(e);
351
353
  if (t !== void 0) return t;
352
- let n = G(e), r = Object.freeze({
353
- protocol: i,
354
+ let n = W(e), r = Object.freeze({
355
+ protocol: o,
354
356
  presets: Object.freeze(n ? [n] : []),
355
357
  components: Object.freeze([]),
356
358
  replacementPolicy: "forbid",
357
359
  themes: Object.freeze([])
358
- }), a = w(r).key;
359
- return W.set(e, a), a;
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
+ };
360
375
  }
361
376
  // src/local/configuration/options-core.ts
362
377
  var nt = [
363
378
  "enableCss",
364
379
  "enableJavaScript",
365
380
  "enableExtendedHtml"
366
- ], rt = H;
381
+ ], rt = V;
367
382
  function q(e) {
368
383
  return typeof e == "object" && !!e && !Array.isArray(e);
369
384
  }
@@ -510,7 +525,7 @@ function ft(e, t) {
510
525
  if (e.length > 32) return Y("accepts at most 32 components.");
511
526
  let i = /* @__PURE__ */ new Set();
512
527
  for (let e of t) i.add(e.name.toLowerCase());
513
- for (let e of O) i.add(e.name.toLowerCase());
528
+ for (let e of ie) i.add(e.name.toLowerCase());
514
529
  for (let e of h) i.add(e.toLowerCase());
515
530
  i.add("theme");
516
531
  for (let t = 0; t < e.length; t += 1) {
@@ -527,7 +542,7 @@ function ft(e, t) {
527
542
  if (!l.ok) return l;
528
543
  let u = l.binding, d = a.props;
529
544
  if (!q(d)) return Y(`${o} "props" must be an object.`);
530
- let p = {};
545
+ let f = {};
531
546
  for (let e of Object.keys(d)) {
532
547
  if (!at.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
533
548
  if (u && lt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
@@ -568,18 +583,18 @@ function ft(e, t) {
568
583
  } catch {
569
584
  return Y(`${o} property "${e}" "pattern" is not a valid regular expression.`);
570
585
  }
571
- if (!f(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
586
+ if (!oe(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
572
587
  r.pattern = n;
573
588
  }
574
- p[e] = r;
589
+ f[e] = r;
575
590
  }
576
- let m = {
591
+ let p = {
577
592
  name: s,
578
593
  form: c,
579
- props: p,
594
+ props: f,
580
595
  ...u ? { binding: u } : {}
581
596
  };
582
- n.push(m), r.set(s, m);
597
+ n.push(p), r.set(s, p);
583
598
  }
584
599
  return {
585
600
  ok: !0,
@@ -609,7 +624,7 @@ function ht(e) {
609
624
  for (let i of e.components) {
610
625
  let e = {};
611
626
  for (let t of Object.keys(i.props)) e[t] = mt(i.props[t]);
612
- let a = le(i), o = {
627
+ let a = ue(i), o = {
613
628
  name: i.name,
614
629
  form: i.form,
615
630
  props: e,
@@ -628,7 +643,7 @@ function X(e, t) {
628
643
  for (let t of e) n.set(t.name, t);
629
644
  let r = /* @__PURE__ */ new Map();
630
645
  for (let e of t.values()) r.set(e.name, e);
631
- for (let e of O) r.has(e.name) || r.set(e.name, fe(e));
646
+ for (let e of ie) r.has(e.name) || r.set(e.name, pe(e));
632
647
  return {
633
648
  componentByName: n,
634
649
  schemaByName: r
@@ -636,36 +651,32 @@ function X(e, t) {
636
651
  }
637
652
  function Z(e) {
638
653
  let t = /* @__PURE__ */ new Map();
639
- for (let n of e) t.set(n.name, de(n));
654
+ for (let n of e) t.set(n.name, fe(n));
640
655
  return t;
641
656
  }
642
- function gt(e, t) {
643
- let n = t.defaults, r = new Set(n.map((e) => e.name));
657
+ function gt(e, r) {
658
+ let i = r.defaults, a = new Set(i.map((e) => e.name));
644
659
  if (e !== void 0 && !q(e)) return {
645
660
  ok: !1,
646
661
  message: "Compile options must be an object.",
647
662
  key: "local.options.invalid.object"
648
663
  };
649
- let i = e ?? {}, o = {
650
- enableCss: !1,
651
- enableJavaScript: !1,
652
- enableExtendedHtml: !1
653
- };
664
+ let o = e ?? {}, c = { ...K };
654
665
  for (let e of nt) {
655
- if (!Object.hasOwn(i, e)) continue;
656
- let t = i[e];
666
+ if (!Object.hasOwn(o, e)) continue;
667
+ let t = o[e];
657
668
  if (t !== void 0) {
658
669
  if (typeof t != "boolean") return {
659
670
  ok: !1,
660
671
  message: `Compile option ${e} must be a boolean.`,
661
672
  key: "local.options.invalid.html-flag"
662
673
  };
663
- o[e] = t;
674
+ c[e] = t;
664
675
  }
665
676
  }
666
677
  let l = !1;
667
- if (Object.hasOwn(i, "markdownBreaks")) {
668
- let e = i.markdownBreaks;
678
+ if (Object.hasOwn(o, "markdownBreaks")) {
679
+ let e = o.markdownBreaks;
669
680
  if (e !== void 0) {
670
681
  if (typeof e != "boolean") return {
671
682
  ok: !1,
@@ -676,8 +687,8 @@ function gt(e, t) {
676
687
  }
677
688
  }
678
689
  let u = !0;
679
- if (Object.hasOwn(i, "strict")) {
680
- let e = i.strict;
690
+ if (Object.hasOwn(o, "strict")) {
691
+ let e = o.strict;
681
692
  if (e !== void 0) {
682
693
  if (typeof e != "boolean") return {
683
694
  ok: !1,
@@ -687,7 +698,15 @@ function gt(e, t) {
687
698
  u = e;
688
699
  }
689
700
  }
690
- let d = i.limits, f = a, p = c, m = s;
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;
691
710
  if (d !== void 0) {
692
711
  if (!q(d)) return {
693
712
  ok: !1,
@@ -710,7 +729,7 @@ function gt(e, t) {
710
729
  if (!n.ok) return n;
711
730
  m = n.value;
712
731
  }
713
- let h = Object.hasOwn(i, "config") && i.config !== void 0, g = Object.hasOwn(i, "hostComponents") && i.hostComponents !== void 0;
732
+ let h = Object.hasOwn(o, "config") && o.config !== void 0, g = Object.hasOwn(o, "hostComponents") && o.hostComponents !== void 0;
714
733
  if (h && g) return {
715
734
  ok: !1,
716
735
  message: "Compile option config cannot be combined with hostComponents.",
@@ -719,7 +738,7 @@ function gt(e, t) {
719
738
  let _, v, y, b, x, S, C, w, T;
720
739
  if (h) {
721
740
  try {
722
- _ = t.readConfig(i.config, n);
741
+ _ = r.readConfig(o.config, i);
723
742
  } catch (e) {
724
743
  let t = e instanceof Error ? e.message : String(e);
725
744
  return {
@@ -731,22 +750,22 @@ function gt(e, t) {
731
750
  }
732
751
  let e = ht(_);
733
752
  v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
734
- let r = X(x, Z(x));
735
- S = r.schemaByName, C = r.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
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();
736
755
  } else if (g) {
737
- let e = ft(i.hostComponents, n);
756
+ let e = ft(o.hostComponents, i);
738
757
  if (!e.ok) return e;
739
- v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = n;
740
- let t = Z(n);
741
- for (let [n, r] of e.hostByName) t.set(n, fe({
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({
742
761
  ...r,
743
762
  legacyHost: !0
744
763
  }));
745
- let r = X(n, t);
746
- S = r.schemaByName, C = r.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
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());
747
766
  } else {
748
- v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = n;
749
- let e = X(n, Z(n));
767
+ v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i;
768
+ let e = X(i, Z(i));
750
769
  S = e.schemaByName, C = e.componentByName, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
751
770
  }
752
771
  return {
@@ -754,8 +773,7 @@ function gt(e, t) {
754
773
  maxSyntaxNodes: f,
755
774
  maxParseWork: p,
756
775
  maxMarkdownDepth: m,
757
- html: o,
758
- htmlActive: o.enableCss || o.enableJavaScript || o.enableExtendedHtml,
776
+ html: c,
759
777
  markdownBreaks: l,
760
778
  strict: u,
761
779
  hostComponents: v,
@@ -765,13 +783,13 @@ function gt(e, t) {
765
783
  registry: x,
766
784
  componentByName: C,
767
785
  schemaByName: S,
768
- defaultComponentNames: r,
769
- unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Qe((e) => S.has(e)) : /* @__PURE__ */ new Set(),
786
+ defaultComponentNames: a,
787
+ unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Ze((e) => S.has(e)) : /* @__PURE__ */ new Set(),
770
788
  externalComponentNames: w,
771
789
  legacyHostNames: T,
772
- componentConfigKey: _ ? t.configKey(_) : t.defaultConfigKey,
773
- capabilities: t.capabilities ?? Xe,
774
- ...t.preset ? { preset: t.preset } : {}
790
+ componentConfigKey: _ ? r.configKey(_) : r.defaultConfigKey,
791
+ capabilities: r.capabilities ?? Ye,
792
+ ...r.preset ? { preset: r.preset } : {}
775
793
  };
776
794
  }
777
795
  function _t(e, t = [], n) {
@@ -779,8 +797,8 @@ function _t(e, t = [], n) {
779
797
  return gt(e, {
780
798
  defaults: t,
781
799
  ...r ? { preset: r } : {},
782
- defaultConfigKey: tt(t),
783
- readConfig: et,
800
+ defaultConfigKey: et(t),
801
+ readConfig: $e,
784
802
  configKey: (e) => e.key,
785
803
  ...n ? { capabilities: n } : {}
786
804
  });
@@ -796,7 +814,7 @@ function Q(e) {
796
814
  }
797
815
  function yt(e) {
798
816
  let t = [];
799
- for (let n of ue(e)) switch (n.kind) {
817
+ for (let n of de(e)) switch (n.kind) {
800
818
  case "value-date":
801
819
  t.push(Q({
802
820
  kind: "date",
@@ -865,21 +883,21 @@ function Ct(e, t, n) {
865
883
  return r;
866
884
  }
867
885
  Object.freeze({
868
- arrayLength: e,
886
+ arrayLength: l,
869
887
  dataTableColumns: 20,
870
888
  plotCurves: 16,
871
- plotPoints: p
889
+ plotPoints: e
872
890
  });
873
891
  // src/local/evaluation/computations.ts
874
892
  function $(e, t, n) {
875
- let r = t ? oe(t, n) : void 0;
893
+ let r = t ? f(t, n) : void 0;
876
894
  return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
877
895
  }
878
896
  function wt(e, t, n, r = "local.expression") {
879
- t instanceof k ? 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);
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);
880
898
  }
881
899
  function Tt(e) {
882
- return e instanceof k ? e : new k("expression-eval", e instanceof Error ? e.message : String(e), 0);
900
+ return e instanceof d ? e : new d("expression-eval", e instanceof Error ? e.message : String(e), 0);
883
901
  }
884
902
  function Et(e, t) {
885
903
  let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
@@ -921,7 +939,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
921
939
  for (let e of c) {
922
940
  let t = s.get(e), r;
923
941
  try {
924
- r = i?.expression(t.source) ?? ce(t.source);
942
+ r = i?.expression(t.source) ?? m(t.source);
925
943
  } catch (r) {
926
944
  wt(n, r, t.expressionOffset), l.add(e);
927
945
  continue;
@@ -943,27 +961,27 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
943
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));
944
962
  }
945
963
  }
946
- let { order: f, cyclic: p } = Et(c, (e) => o.get(e) ?? []);
947
- if (p.length > 0) {
948
- let e = new Set(p), t = [], r = /* @__PURE__ */ new Map(), i = p[0];
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];
949
967
  for (; !r.has(i);) {
950
968
  r.set(i, t.length), t.push(i);
951
969
  let n = (o.get(i) ?? []).find((t) => e.has(t));
952
970
  if (n === void 0) break;
953
971
  i = n;
954
972
  }
955
- let a = r.has(i) ? t.slice(r.get(i)) : [p[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
973
+ let a = r.has(i) ? t.slice(r.get(i)) : [h[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
956
974
  for (let e of a.slice(0, 100)) {
957
975
  let t = s.get(e);
958
976
  n("local.computation.cycle", `Computation "${e}" is part of a dependency cycle: ${c}.`, t.range.start, t.range.end);
959
977
  }
960
- for (let e of p) l.add(e);
978
+ for (let e of h) l.add(e);
961
979
  }
962
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)) {
963
981
  let t = s.get(e);
964
982
  n("local.computation.const", `Constant "${e}" indirectly depends on a value that is not a constant.`, t.expressionOffset), d.add(e);
965
983
  }
966
- let m = {}, h = { ...t };
984
+ let g = {}, _ = { ...t };
967
985
  for (let e of f) {
968
986
  if (l.has(e)) continue;
969
987
  let t = s.get(e);
@@ -973,18 +991,18 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
973
991
  }
974
992
  let r = a.get(e);
975
993
  try {
976
- let t = i ? i.infer(r, h) : r.inferType(h);
977
- m[e] = t, h[e] = t;
994
+ let t = i ? i.infer(r, _) : r.inferType(_);
995
+ g[e] = t, _[e] = t;
978
996
  } catch (r) {
979
997
  wt(n, r, t.expressionOffset), l.add(e);
980
998
  }
981
999
  }
982
- let g = {}, _ = {}, v = /* @__PURE__ */ Error("failed constant read"), y = (e) => {
983
- l.add(e), Object.defineProperty(_, e, {
1000
+ let v = {}, y = {}, b = /* @__PURE__ */ Error("failed constant read"), x = (e) => {
1001
+ l.add(e), Object.defineProperty(y, e, {
984
1002
  enumerable: !0,
985
1003
  configurable: !0,
986
1004
  get() {
987
- throw v;
1005
+ throw b;
988
1006
  }
989
1007
  });
990
1008
  };
@@ -992,42 +1010,42 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
992
1010
  if (l.has(e) || s.get(e).kind !== "const" || d.has(e)) continue;
993
1011
  let t = s.get(e), r = a.get(e);
994
1012
  try {
995
- let i = r.evaluate(_), a = se(i);
1013
+ let i = r.evaluate(y), a = p(i);
996
1014
  if (a) {
997
- n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), y(e);
1015
+ n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), x(e);
998
1016
  continue;
999
1017
  }
1000
- g[e] = Array.isArray(i) ? i.slice() : i, _[e] = g[e];
1018
+ v[e] = Array.isArray(i) ? i.slice() : i, y[e] = v[e];
1001
1019
  } catch (r) {
1002
- if (r === v) {
1003
- y(e);
1020
+ if (r === b) {
1021
+ x(e);
1004
1022
  continue;
1005
1023
  }
1006
1024
  let i = Tt(r);
1007
- n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), y(e);
1025
+ n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), x(e);
1008
1026
  }
1009
1027
  }
1010
- let b = {};
1028
+ let S = {};
1011
1029
  for (let e of c) {
1012
1030
  let t = s.get(e);
1013
- if (l.has(e) || m[e] === void 0) continue;
1031
+ if (l.has(e) || g[e] === void 0) continue;
1014
1032
  let n = {
1015
1033
  name: e,
1016
1034
  kind: t.kind,
1017
1035
  source: t.source,
1018
1036
  dependencies: [...o.get(e) ?? []],
1019
- type: m[e],
1037
+ type: g[e],
1020
1038
  nodeId: t.nodeId,
1021
1039
  range: { ...t.range }
1022
1040
  };
1023
- t.kind === "const" && Object.hasOwn(g, e) && (n.value = g[e]), b[e] = n;
1041
+ t.kind === "const" && Object.hasOwn(v, e) && (n.value = v[e]), S[e] = n;
1024
1042
  }
1025
1043
  return {
1026
- computations: b,
1027
- kinds: m,
1044
+ computations: S,
1045
+ kinds: g,
1028
1046
  order: f.filter((e) => !l.has(e)),
1029
1047
  expressions: a,
1030
- constValues: g
1048
+ constValues: v
1031
1049
  };
1032
1050
  }
1033
1051
  function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
@@ -1046,8 +1064,8 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1046
1064
  if (!t || t.kind === "const") continue;
1047
1065
  let i = n.get(r);
1048
1066
  if (i) try {
1049
- let e = i.evaluate(c), t = se(e);
1050
- if (t) throw new k("expression-budget", t, 0);
1067
+ let e = i.evaluate(c), t = p(e);
1068
+ if (t) throw new d("expression-budget", t, 0);
1051
1069
  o[r] = e, c[r] = e;
1052
1070
  } catch (e) {
1053
1071
  let t = Tt(e);
@@ -1068,7 +1086,7 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1068
1086
  // src/local/evaluation/validation.ts
1069
1087
  var At = "local.validation.failed", jt = "local.validation.expression", Mt = "Validation failed.";
1070
1088
  function Nt(e) {
1071
- return e.length > 2e3 ? `${y(e, d - 1)}…` : e;
1089
+ return e.length > 2e3 ? `${u(e, c - 1)}…` : e;
1072
1090
  }
1073
1091
  function Pt(e) {
1074
1092
  let t = e.trim();
@@ -1102,4 +1120,4 @@ function Lt(e, t, n, r, i) {
1102
1120
  column: o - t[c] + 1
1103
1121
  };
1104
1122
  }
1105
- export { A as $, z as A, Ee as B, ze as C, He as D, Ue as E, Me as F, M as G, Oe as H, R as I, F as J, N as K, je as L, B as M, Pe as N, Ge as O, Ne as P, ye as Q, we as R, Le as S, qe as T, ke as U, De as V, Ae as W, Ce as X, I as Y, be as Z, vt as _, It as a, Ye as b, Lt as c, Ot as d, he as et, St as f, nt as g, yt as h, Nt as i, Ie as j, Ke as k, kt as l, Ct as m, At as n, Ft as o, bt as p, P as q, Mt as r, Pt as s, jt as t, pe as tt, Dt as u, _t as v, Re as w, Je as x, gt as y, Te as z };
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 };