reactive-md 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -0,0 +1,441 @@
1
+ {
2
+ "syntaxVersion": "local-draft-4",
3
+ "cases": [
4
+ {
5
+ "name": "shared numeric binding has one initial value and updates prose",
6
+ "source": "<number bind=\"n\" label=\"Count\" initial=\"2\" min=\"0\" max=\"10\">\n<slider bind=\"n\" label=\"Shared count\" min=\"0\" max=\"10\">\n\nTotal: {{ n * 2 }}",
7
+ "ok": true,
8
+ "initial": {
9
+ "n": 2
10
+ },
11
+ "actions": [
12
+ {
13
+ "bind": "n",
14
+ "value": 5
15
+ }
16
+ ],
17
+ "text": "Total: {{ n * 2 }}",
18
+ "expectedText": "Total: 10"
19
+ },
20
+ {
21
+ "name": "hidden controls initialize their bindings",
22
+ "source": "<toggle bind=\"show\" label=\"Show\">\n<if when=\"{{ show }}\">\n<number bind=\"n\" label=\"Hidden count\" initial=\"4\">\n</if>\n\n{{ n * 2 }}",
23
+ "ok": true,
24
+ "initial": {
25
+ "show": false,
26
+ "n": 4
27
+ },
28
+ "text": "{{ n * 2 }}",
29
+ "expectedText": "8"
30
+ },
31
+ {
32
+ "name": "invalid state writes keep the last valid value",
33
+ "source": "<number bind=\"n\" label=\"Count\" initial=\"4\" min=\"0\" max=\"10\">",
34
+ "ok": true,
35
+ "initial": {
36
+ "n": 4
37
+ },
38
+ "actions": [
39
+ {
40
+ "bind": "n",
41
+ "value": 11,
42
+ "codes": [
43
+ "local.runtime.value"
44
+ ]
45
+ }
46
+ ],
47
+ "text": "{{ n }}",
48
+ "expectedText": "4"
49
+ },
50
+ {
51
+ "name": "code fences keep controls and interpolation literal",
52
+ "source": "```markdown\n<counter bind=\"n\" label=\"Literal\">\n{{ missing }}\n```",
53
+ "ok": true,
54
+ "bindingNames": []
55
+ },
56
+ {
57
+ "name": "unknown components preserve source with a warning",
58
+ "source": "<slidr label=\"Typo\">\n</slidr>",
59
+ "ok": true,
60
+ "bindingNames": [],
61
+ "codes": [
62
+ "local.component.unknown"
63
+ ]
64
+ },
65
+ {
66
+ "name": "unbound expression names produce a compiler diagnostic",
67
+ "source": "Total: {{ missing * 2 }}",
68
+ "ok": false,
69
+ "codes": [
70
+ "local.binding.unknown"
71
+ ]
72
+ },
73
+ {
74
+ "name": "multi-select-values",
75
+ "source": "<multi-select bind=\"subjects\" label=\"Subjects\" max-selected=\"2\">\n<option value=\"math\">Math</option>\n<option value=\"physics\">Physics</option>\n</multi-select>",
76
+ "ok": true,
77
+ "codes": [],
78
+ "initial": {
79
+ "subjects": []
80
+ },
81
+ "bindingNames": [
82
+ "subjects"
83
+ ],
84
+ "actions": [
85
+ {
86
+ "bind": "subjects",
87
+ "value": [
88
+ "physics",
89
+ "math"
90
+ ],
91
+ "codes": []
92
+ }
93
+ ],
94
+ "text": "{{ len(subjects) }}",
95
+ "expectedText": "2"
96
+ },
97
+ {
98
+ "name": "range-slots",
99
+ "source": "<range-slider label=\"Interval\" bind-start=\"low\" bind-end=\"high\" initial-start=\"20\" initial-end=\"80\">",
100
+ "ok": true,
101
+ "codes": [],
102
+ "initial": {
103
+ "low": 20,
104
+ "high": 80
105
+ },
106
+ "bindingNames": [
107
+ "low",
108
+ "high"
109
+ ],
110
+ "text": "{{ high - low }}",
111
+ "expectedText": "60"
112
+ },
113
+ {
114
+ "name": "coordinate-slots",
115
+ "source": "<coordinate label=\"Point\" bind-x=\"px\" bind-y=\"py\" initial-x=\"1\" initial-y=\"2\">",
116
+ "ok": true,
117
+ "codes": [],
118
+ "initial": {
119
+ "px": 1,
120
+ "py": 2
121
+ },
122
+ "bindingNames": [
123
+ "px",
124
+ "py"
125
+ ],
126
+ "text": "{{ px + py }}",
127
+ "expectedText": "3"
128
+ },
129
+ {
130
+ "name": "steps-initialization",
131
+ "source": "<steps label=\"Path\" bind=\"lesson\">\n<step label=\"Read\">\nRead first.\n</step>\n<step label=\"Try\">\nTry next.\n</step>\n</steps>",
132
+ "ok": true,
133
+ "codes": [],
134
+ "initial": {
135
+ "lesson": "step-1"
136
+ },
137
+ "bindingNames": [
138
+ "lesson"
139
+ ],
140
+ "actions": [
141
+ {
142
+ "bind": "lesson",
143
+ "value": "step-2",
144
+ "codes": []
145
+ }
146
+ ],
147
+ "text": "{{ lesson }}",
148
+ "expectedText": "step-2"
149
+ },
150
+ {
151
+ "name": "jump-colored-prose",
152
+ "source": "<jump to=\"result\">Results</jump>\n\n<section color=\"#123\">\n\n<text color=\"red\">Important</text>\n\n</section>\n\n<anchor id=\"result\">\n\nDone.",
153
+ "ok": true,
154
+ "codes": []
155
+ },
156
+ {
157
+ "name": "quiz-choice",
158
+ "source": "<quiz label=\"Two plus three\" answer=\"b\">\n<option value=\"a\">4</option>\n<option value=\"b\">5</option>\n</quiz>",
159
+ "ok": true,
160
+ "codes": []
161
+ },
162
+ {
163
+ "name": "selection-key",
164
+ "source": "<table bind=\"project\" key=\"Project\" initial=\"Visual\">\n| Project | Cost |\n| --- | ---: |\n| Content | 120 |\n| Visual | 230 |\n</table>",
165
+ "ok": true,
166
+ "codes": [],
167
+ "initial": {
168
+ "project": "Visual"
169
+ },
170
+ "bindingNames": [
171
+ "project"
172
+ ],
173
+ "actions": [
174
+ {
175
+ "bind": "project",
176
+ "value": "Content",
177
+ "codes": []
178
+ }
179
+ ],
180
+ "text": "{{ project }}",
181
+ "expectedText": "Content"
182
+ },
183
+ {
184
+ "name": "computed-values-recalculate-from-controls-and-arrays",
185
+ "source": "<computed name=\"costs\" value=\"{{ [seats * 80, materials ? seats * 20 : 0] }}\">\n<computed name=\"total\" value=\"{{ sum(costs) }}\">\n\n<number bind=\"seats\" label=\"Seats\" initial=\"4\" min=\"1\" max=\"20\">\n<toggle bind=\"materials\" label=\"Materials\">\n\nTotal: {{ total }}.",
186
+ "ok": true,
187
+ "codes": [],
188
+ "initial": {
189
+ "seats": 4,
190
+ "materials": false
191
+ },
192
+ "bindingNames": [
193
+ "materials",
194
+ "seats"
195
+ ],
196
+ "actions": [
197
+ {
198
+ "bind": "materials",
199
+ "value": true,
200
+ "codes": []
201
+ },
202
+ {
203
+ "bind": "seats",
204
+ "value": 6,
205
+ "codes": []
206
+ }
207
+ ],
208
+ "text": "Total: {{ total }}.",
209
+ "expectedText": "Total: 600."
210
+ },
211
+ {
212
+ "id": "dynamic-number-max-narrows",
213
+ "component": "number",
214
+ "source": "<number bind=\"rooms\" label=\"Rooms\" initial=\"2\" min=\"1\" max=\"5\">\n<number bind=\"guests\" label=\"Guests\" initial=\"6\" min=\"1\" max=\"{{ rooms * 4 }}\">",
215
+ "ok": true,
216
+ "initial": {
217
+ "rooms": 2,
218
+ "guests": 6
219
+ },
220
+ "bindingNames": [
221
+ "guests",
222
+ "rooms"
223
+ ],
224
+ "codes": [],
225
+ "actions": [
226
+ {
227
+ "bind": "rooms",
228
+ "value": 1,
229
+ "codes": []
230
+ },
231
+ {
232
+ "bind": "guests",
233
+ "value": 6,
234
+ "codes": [
235
+ "local.runtime.value"
236
+ ]
237
+ },
238
+ {
239
+ "bind": "guests",
240
+ "value": 4,
241
+ "codes": []
242
+ }
243
+ ],
244
+ "text": "{{ guests }}",
245
+ "expectedText": "4"
246
+ },
247
+ {
248
+ "id": "dynamic-date-min-follows-departure",
249
+ "component": "date",
250
+ "source": "<date bind=\"departure\" label=\"Departure\" initial=\"2026-11-10\">\n<date bind=\"return\" label=\"Return\" initial=\"2026-11-12\" min=\"{{ departure }}\">",
251
+ "ok": true,
252
+ "initial": {
253
+ "departure": "2026-11-10",
254
+ "return": "2026-11-12"
255
+ },
256
+ "bindingNames": [
257
+ "departure",
258
+ "return"
259
+ ],
260
+ "codes": [],
261
+ "actions": [
262
+ {
263
+ "bind": "return",
264
+ "value": "2026-11-01",
265
+ "codes": [
266
+ "local.runtime.value"
267
+ ]
268
+ }
269
+ ],
270
+ "text": "{{ return }}",
271
+ "expectedText": "2026-11-12"
272
+ },
273
+ {
274
+ "id": "external-declaration-compiles",
275
+ "component": "external",
276
+ "source": "<external name=\"rate\" type=\"number\">\n<number bind=\"usd\" label=\"USD\" initial=\"10\" min=\"0\" max=\"1000\">\n\nUSD {{ usd }}",
277
+ "ok": true,
278
+ "initial": {
279
+ "usd": 10
280
+ },
281
+ "bindingNames": [
282
+ "usd"
283
+ ],
284
+ "codes": []
285
+ },
286
+ {
287
+ "id": "external-placement-is-rejected",
288
+ "component": "external",
289
+ "source": "<panel><external name=\"rate\" type=\"number\"></panel>",
290
+ "ok": false,
291
+ "codes": [
292
+ "local.external.placement"
293
+ ]
294
+ },
295
+ {
296
+ "id": "generated-data-formats-and-dynamic-options-compile",
297
+ "source": "<external name=\"subjects\" type=\"string-array\">\n<const name=\"months\" value=\"{{ range(1, 4) }}\">\n<data-table label=\"Months\" rows=\"{{ months }}\" key=\"{{ item }}\" bind=\"picked\" searchable sortable page-size=\"2\">\n<column label=\"Month\" value=\"{{ item }}\" format=\"number\" digits=\"0\">\n</data-table>\n<chart kind=\"bar\" rows=\"{{ months }}\" x=\"Month\" y=\"Revenue\">\n<column label=\"Month\" value=\"{{ item }}\">\n<column label=\"Revenue\" value=\"{{ item * 2 }}\" format=\"currency\" currency=\"USD\">\n</chart>\n<select bind=\"subject\" label=\"Subject\" options=\"{{ subjects }}\"></select>",
298
+ "ok": true,
299
+ "codes": [],
300
+ "initial": {
301
+ "picked": "",
302
+ "subject": ""
303
+ }
304
+ },
305
+ {
306
+ "id": "p0-conversions-collections-dates",
307
+ "source": "{{ number('12.5') * 2 }} {{ sum(range(1, 4)) }} {{ join(range(1, 4), '-') }} {{ dateAdd('2026-01-30', 3) }} {{ split('a,b', ',')[1] }} {{ string(3) }}",
308
+ "ok": true,
309
+ "codes": [],
310
+ "text": "{{ number('12.5') * 2 }} {{ sum(range(1, 4)) }} {{ join(range(1, 4), '-') }} {{ dateAdd('2026-01-30', 3) }} {{ split('a,b', ',')[1] }} {{ string(3) }}",
311
+ "expectedText": "25 6 1-2-3 2026-02-02 b 3"
312
+ },
313
+ {
314
+ "id": "else-branch-initializes-hidden-bindings",
315
+ "component": "else",
316
+ "source": "<toggle bind=\"show\" label=\"Show\">\n<if when=\"{{ show }}\">\nThen\n</if>\n<else>\n<number bind=\"n\" label=\"Hidden count\" initial=\"4\">\n</else>\n\n{{ n }}",
317
+ "ok": true,
318
+ "initial": {
319
+ "show": false,
320
+ "n": 4
321
+ },
322
+ "bindingNames": [
323
+ "n",
324
+ "show"
325
+ ],
326
+ "codes": [],
327
+ "text": "{{ n }}",
328
+ "expectedText": "4"
329
+ },
330
+ {
331
+ "id": "interaction-macro-output",
332
+ "source": "<!-- reactive-md: local-draft-4 + macros -->\n<use macro=\"counter\" start=\"{{ 2 }}\" bind-count=\"total\">\n<macro name=\"counter\" params=\"start\" outputs=\"count\">\n<number bind=\"count\" label=\"Count\" initial=\"{{ start }}\">\n</macro>",
333
+ "ok": true,
334
+ "bindingNames": ["total"],
335
+ "initial": {"total": 2},
336
+ "actions": [{"bind": "total", "value": 4}],
337
+ "text": "{{ total }}",
338
+ "expectedText": "4"
339
+ },
340
+ {
341
+ "id": "interaction-macro-recursion",
342
+ "source": "<!-- reactive-md: local-draft-4 + macros -->\n<macro name=\"loop\">\n<use macro=\"loop\">\n</macro>",
343
+ "ok": false,
344
+ "codes": ["local.macro.recursion"]
345
+ },
346
+ {
347
+ "id": "else-requires-preceding-if",
348
+ "component": "else",
349
+ "source": "<else>\nOrphan\n</else>",
350
+ "ok": false,
351
+ "codes": [
352
+ "local.else"
353
+ ]
354
+ },
355
+ {
356
+ "name": "transform-filter-pipeline-feeds-options",
357
+ "source": "<const name=\"routes\" value=\"{{ ['ridge', 'town', 'forest'] }}\">\n<computed name=\"open\" value=\"{{ filter(routes, item != 'forest') }}\">\n<select bind=\"route\" label=\"Route\" options=\"{{ open }}\"></select>\n\nOpen: {{ join(open, ', ') }}",
358
+ "ok": true,
359
+ "codes": [],
360
+ "bindingNames": [
361
+ "route"
362
+ ],
363
+ "text": "Open: {{ join(open, ', ') }}",
364
+ "expectedText": "Open: ridge, town"
365
+ },
366
+ {
367
+ "name": "transform-sortby-descending-keeps-tied-keys-in-source-order",
368
+ "source": "<const name=\"labels\" value=\"{{ ['bb', 'a', 'cc', 'd'] }}\">\n\nDescending: {{ join(sortBy(labels, len(item), 'desc'), '') }} · Ascending: {{ join(sortBy(labels, len(item)), '') }}",
369
+ "ok": true,
370
+ "codes": [],
371
+ "text": "Descending: {{ join(sortBy(labels, len(item), 'desc'), '') }} · Ascending: {{ join(sortBy(labels, len(item)), '') }}",
372
+ "expectedText": "Descending: bbccad · Ascending: adbbcc"
373
+ },
374
+ {
375
+ "name": "transform-map-numeric-pipeline",
376
+ "source": "<const name=\"nums\" value=\"{{ [1, 2, 3] }}\">\n<computed name=\"doubled\" value=\"{{ map(nums, item * 2) }}\">\n\nSum: {{ sum(doubled) }}. Rows: {{ join(map(nums, item * 10), ',') }}",
377
+ "ok": true,
378
+ "codes": [],
379
+ "text": "Sum: {{ sum(doubled) }}. Rows: {{ join(map(nums, item * 10), ',') }}",
380
+ "expectedText": "Sum: 12. Rows: 10,20,30"
381
+ },
382
+ {
383
+ "name": "transform-sortby-direction-must-be-a-literal",
384
+ "source": "<const name=\"names\" value=\"{{ ['b', 'a'] }}\">\n\n{{ join(sortBy(names, item, 'up'), ',') }}",
385
+ "ok": false,
386
+ "codes": [
387
+ "local.transform.order"
388
+ ]
389
+ },
390
+ {
391
+ "name": "nullish-coalescing-keeps-falsy-values",
392
+ "source": "<const name=\"items\" value=\"{{ ['a'] }}\">\n<const name=\"zero\" value=\"{{ 0 }}\">\n<const name=\"blank\" value=\"{{ '' }}\">\n<const name=\"missing\" value=\"{{ null }}\">\n\nMiss: {{ items[3] ?? 'none' }}. Zero: {{ zero ?? 5 }}. Blank: [{{ blank ?? 'none' }}]. Missing: {{ missing ?? 'none' }}.",
393
+ "ok": true,
394
+ "codes": [],
395
+ "text": "Miss: {{ items[3] ?? 'none' }}. Zero: {{ zero ?? 5 }}. Blank: [{{ blank ?? 'none' }}]. Missing: {{ missing ?? 'none' }}.",
396
+ "expectedText": "Miss: none. Zero: 0. Blank: []. Missing: none."
397
+ },
398
+ {
399
+ "name": "nullish-coalescing-skips-a-failing-right-side",
400
+ "source": "<const name=\"present\" value=\"{{ 3 }}\">\n\nValue: {{ present ?? 1 / 0 }}.",
401
+ "ok": true,
402
+ "codes": [],
403
+ "text": "Value: {{ present ?? 1 / 0 }}.",
404
+ "expectedText": "Value: 3."
405
+ },
406
+ {
407
+ "name": "ifblank-trims-surrounding-whitespace",
408
+ "source": "<input bind=\"name\" label=\"Name\" initial=\" Ada \">\n\nName: {{ ifBlank(name, 'anonymous') }}",
409
+ "ok": true,
410
+ "codes": [],
411
+ "bindingNames": [
412
+ "name"
413
+ ],
414
+ "initial": {
415
+ "name": " Ada "
416
+ },
417
+ "text": "Name: {{ ifBlank(name, 'anonymous') }}",
418
+ "expectedText": "Name: Ada"
419
+ },
420
+ {
421
+ "name": "ifblank-falls-back-for-blank-text",
422
+ "source": "<input bind=\"name\" label=\"Name\" initial=\" Ada \">\n\nName: {{ ifBlank(name, 'anonymous') }}",
423
+ "ok": true,
424
+ "codes": [],
425
+ "bindingNames": [
426
+ "name"
427
+ ],
428
+ "initial": {
429
+ "name": " Ada "
430
+ },
431
+ "actions": [
432
+ {
433
+ "bind": "name",
434
+ "value": " "
435
+ }
436
+ ],
437
+ "text": "Name: {{ ifBlank(name, 'anonymous') }}",
438
+ "expectedText": "Name: anonymous"
439
+ }
440
+ ]
441
+ }
@@ -8,7 +8,7 @@
8
8
 
9
9
  [扩展 SDK 使用方](extension-sdk/README-ch.md)面向`reactive-md@0.8.0`,通过公开导出验证静态分享和离线交互分享。准备发布时使用本地构建的 tarball,SDK 契约仍为 `0.7.0`。其余较早的示例保留其 0.6.0 固定版本。
10
10
 
11
- 用当前检出运行[流式源码](streaming)示例时,按下文打包并安装 `reactive-md-0.9.3.tgz`。示例独立使用时以 `package.json` 中固定的 `0.9.1` 为基线。
11
+ 用当前检出运行[流式源码](streaming)示例时,按下文打包并安装 `reactive-md-0.10.0.tgz`。示例独立使用时以 `package.json` 中固定的 `0.9.1` 为基线。
12
12
 
13
13
  ## 静态嵌入
14
14
 
@@ -72,7 +72,7 @@ UI 和调度连接位于 [worker/main.js](worker/main.js);Worker 入口是 [wo
72
72
  npm pack
73
73
 
74
74
  cd examples/integration/streaming
75
- npm install ../../../reactive-md-0.9.3.tgz
75
+ npm install ../../../reactive-md-0.10.0.tgz
76
76
  npm run dev
77
77
  ```
78
78
 
@@ -89,7 +89,7 @@ npm run dev
89
89
  npm pack
90
90
 
91
91
  cd examples/integration/chat-session
92
- npm install ../../../reactive-md-0.9.3.tgz
92
+ npm install ../../../reactive-md-0.10.0.tgz
93
93
  npm start
94
94
  ```
95
95
 
@@ -8,7 +8,7 @@ Most examples below target `reactive-md@0.6.0`. Copy the desired example directo
8
8
 
9
9
  The [extension SDK consumer](extension-sdk/README.md) targets `reactive-md@0.8.0` and verifies static and offline interactive sharing through public exports. Release preparation uses a locally built tarball; the SDK contract remains at `0.7.0`. The other older examples retain their 0.6.0 pins.
10
10
 
11
- To run the [streaming source](streaming) example against the current checkout, install the `reactive-md-0.9.3.tgz` built below. The example's standalone manifest pins `0.9.1` as its baseline.
11
+ To run the [streaming source](streaming) example against the current checkout, install the `reactive-md-0.10.0.tgz` built below. The example's standalone manifest pins `0.9.1` as its baseline.
12
12
 
13
13
  ## Static embed
14
14
 
@@ -72,7 +72,7 @@ Build a tarball from the current tree in the repository root, then install it in
72
72
  npm pack
73
73
 
74
74
  cd examples/integration/streaming
75
- npm install ../../../reactive-md-0.9.3.tgz
75
+ npm install ../../../reactive-md-0.10.0.tgz
76
76
  npm run dev
77
77
  ```
78
78
 
@@ -89,7 +89,7 @@ Build a tarball from the current tree in the repository root, then install it in
89
89
  npm pack
90
90
 
91
91
  cd examples/integration/chat-session
92
- npm install ../../../reactive-md-0.9.3.tgz
92
+ npm install ../../../reactive-md-0.10.0.tgz
93
93
  npm start
94
94
  ```
95
95
 
@@ -6,5 +6,5 @@
6
6
  "scripts": {
7
7
  "start": "node index.mjs"
8
8
  },
9
- "dependencies": { "reactive-md": "0.9.3" }
9
+ "dependencies": { "reactive-md": "0.10.0" }
10
10
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  **中文** · [English](README.md)
4
4
 
5
- 这些是 `local-draft-3` 的独立创作示例,说明见[本地交互语法规范](../../docs/reference/local-interaction-syntax-ch.md)。Playground 以[快速计算器](pricing.reactive.md)开始,随后是六个聚焦的[功能演示](showcase/README-ch.md)。组块分布在这六个场景中;诊断有独立的辅助菜单。宿主可通过[本地模式 API](../../docs/integration/local-integration-ch.md) 编译并渲染每份文档。
5
+ 这些是 `local-draft-4` 的独立创作示例,说明见[本地交互语法规范](../../docs/reference/local-interaction-syntax-ch.md)。Playground 以[快速计算器](pricing.reactive.md)开始,随后是六个聚焦的[功能演示](showcase/README-ch.md)。组块分布在这六个场景中;诊断有独立的辅助菜单。宿主可通过[本地模式 API](../../docs/integration/local-integration-ch.md) 编译并渲染每份文档。
6
6
 
7
7
  原有的十一个工作示例和一份故意损坏的诊断文档仍保留在本目录,中文版本在 [zh/](zh/)。六个功能演示位于 [showcase/](showcase/README-ch.md),中文源码在 [showcase/zh/](showcase/zh/)。每个文件都可独立运行。控件、表达式和可视化都使用本地状态。
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **English** · [中文](README-ch.md)
4
4
 
5
- These are standalone authoring examples for `local-draft-2`, described in the [local interaction syntax specification](../../docs/reference/local-interaction-syntax-en.md). The Playground starts with a [quick calculator](pricing.reactive.md), followed by six focused [feature tours](showcase/README.md). Components are distributed across these six scenarios; diagnostics has an auxiliary menu. Hosts can compile and render every document through the [local mode API](../../docs/integration/local-integration-en.md).
5
+ These are standalone authoring examples for `local-draft-4`, described in the [local interaction syntax specification](../../docs/reference/local-interaction-syntax-en.md). The Playground starts with a [quick calculator](pricing.reactive.md), followed by six focused [feature tours](showcase/README.md). Components are distributed across these six scenarios; diagnostics has an auxiliary menu. Hosts can compile and render every document through the [local mode API](../../docs/integration/local-integration-en.md).
6
6
 
7
7
  The original eleven working examples and one intentionally broken diagnostics document remain in this directory, with Chinese versions in [zh/](zh/). The six feature tours live in [showcase/](showcase/README.md), with Chinese sources in [showcase/zh/](showcase/zh/). Each file runs independently. Controls, expressions and visualizations use local state.
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-md",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
5
5
  "keywords": [
6
6
  "markdown",
@@ -305,6 +305,11 @@
305
305
  "optional": true
306
306
  }
307
307
  },
308
+ "overrides": {
309
+ "mafs": {
310
+ "katex": "$katex"
311
+ }
312
+ },
308
313
  "devDependencies": {
309
314
  "@jitl/quickjs-singlefile-browser-release-sync": "0.32.0",
310
315
  "@lezer/common": "1.5.4",