reactive-md 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG-ch.md +54 -4
  2. package/CHANGELOG.md +55 -4
  3. package/CONTRIBUTING-ch.md +13 -2
  4. package/CONTRIBUTING.md +13 -2
  5. package/README-ch.md +132 -23
  6. package/README-en.md +130 -21
  7. package/README.md +128 -21
  8. package/SECURITY-ch.md +3 -3
  9. package/SECURITY.md +3 -3
  10. package/THIRD_PARTY_NOTICES.md +111 -1
  11. package/cli/args.mjs +51 -1
  12. package/cli/assets.mjs +6 -1
  13. package/cli/build.mjs +125 -9
  14. package/cli/fs-utils.mjs +3 -3
  15. package/cli/help.mjs +12 -5
  16. package/cli/init.mjs +1 -1
  17. package/cli/package.mjs +1 -0
  18. package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
  19. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  20. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  21. package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
  22. package/dist-library/compile-wUv8KEge.js +1249 -0
  23. package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
  24. package/dist-library/compiler-eOfcinZs.js +62 -0
  25. package/dist-library/component-state-BoLCGee4.js +801 -0
  26. package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
  27. package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
  28. package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
  29. package/dist-library/controls-CcT6n7k_.js +6740 -0
  30. package/dist-library/coordinate-CWS9p5q_.js +293 -0
  31. package/dist-library/data-table-Bgccxd7h.js +296 -0
  32. package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
  33. package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
  34. package/dist-library/export-BqVmTXm8.js +369 -0
  35. package/dist-library/gallery-CY6mTx8i.js +360 -0
  36. package/dist-library/html-CNT4KD-2.js +757 -0
  37. package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
  38. package/dist-library/latex-1w7aQgD5.js +928 -0
  39. package/dist-library/layout-C0YlEPGr.js +562 -0
  40. package/dist-library/mount-preset-KxvtKgJb.js +13 -0
  41. package/dist-library/options-1aDLK7JY.js +121 -0
  42. package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
  43. package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
  44. package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
  45. package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
  46. package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
  47. package/dist-library/react-BbyAgeXc.js +6070 -0
  48. package/dist-library/react-D5iGiUdL.js +7 -0
  49. package/dist-library/reactive-md-authoring.js +222 -223
  50. package/dist-library/reactive-md-build.js +126 -72
  51. package/dist-library/reactive-md-compiler-standard.js +12 -10
  52. package/dist-library/reactive-md-compiler.js +3 -3
  53. package/dist-library/reactive-md-default-packs.js +2 -2
  54. package/dist-library/reactive-md-default-preset.js +4 -4
  55. package/dist-library/reactive-md-export-assets.js +57 -0
  56. package/dist-library/reactive-md-export.js +5 -111
  57. package/dist-library/reactive-md-minimal-preset.js +24 -0
  58. package/dist-library/reactive-md-minimal-react-preset.js +26 -0
  59. package/dist-library/reactive-md-minimal-styles.js +80 -0
  60. package/dist-library/reactive-md-minimal.css +2 -0
  61. package/dist-library/reactive-md-pdf.js +7582 -0
  62. package/dist-library/reactive-md-plugin-chart.js +13 -0
  63. package/dist-library/reactive-md-plugin-data.js +17 -0
  64. package/dist-library/reactive-md-plugin-diagram.js +18 -0
  65. package/dist-library/reactive-md-plugin-forms.js +18 -0
  66. package/dist-library/reactive-md-plugin-gallery.js +12 -0
  67. package/dist-library/reactive-md-plugin-navigation.js +15 -0
  68. package/dist-library/reactive-md-plugin-network.js +222 -0
  69. package/dist-library/reactive-md-plugin-plot.js +24 -0
  70. package/dist-library/reactive-md-print.css +5 -0
  71. package/dist-library/reactive-md-react-minimal.js +28 -0
  72. package/dist-library/reactive-md-react-server.js +34 -32
  73. package/dist-library/reactive-md-react-unstyled.js +14 -9
  74. package/dist-library/reactive-md-react.js +14 -9
  75. package/dist-library/reactive-md-runtime-browser.js +847 -15
  76. package/dist-library/reactive-md-runtime.js +3 -3
  77. package/dist-library/reactive-md-sdk.js +8 -6
  78. package/dist-library/reactive-md-standalone-configured.js +16 -0
  79. package/dist-library/reactive-md-standalone-host.js +9 -438
  80. package/dist-library/reactive-md-testing-browser.js +5 -4
  81. package/dist-library/reactive-md-testing-react.js +46 -44
  82. package/dist-library/reactive-md-testing.js +45 -44
  83. package/dist-library/reactive-md-vite.js +135 -37
  84. package/dist-library/reactive-md.css +1 -1
  85. package/dist-library/reactive-md.js +590 -498
  86. package/dist-library/registry-B9NGct4d.js +20 -0
  87. package/dist-library/registry-core-Bbad9Bm2.js +479 -0
  88. package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
  89. package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
  90. package/dist-library/runtime-kcA7bG7G.js +1282 -0
  91. package/dist-library/sample-bP4zHB3L.js +289 -0
  92. package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
  93. package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
  94. package/dist-library/session-core-nmJHuR9c.js +452 -0
  95. package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
  96. package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
  97. package/dist-library/types/authoring/catalog.d.ts +2 -3
  98. package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
  99. package/dist-library/types/authoring/index.d.ts +1 -1
  100. package/dist-library/types/authoring/insert.d.ts +1 -1
  101. package/dist-library/types/authoring/templates.d.ts +2 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/build/host.d.ts +1 -1
  104. package/dist-library/types/build/index.d.ts +1 -1
  105. package/dist-library/types/build/notices.d.ts +1 -1
  106. package/dist-library/types/build/resources.d.ts +1 -1
  107. package/dist-library/types/build/vite.d.ts +1 -1
  108. package/dist-library/types/compiler/index.d.ts +2 -2
  109. package/dist-library/types/compiler/result.d.ts +1 -1
  110. package/dist-library/types/compiler/standard.d.ts +2 -2
  111. package/dist-library/types/compiler/types.d.ts +1 -1
  112. package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
  113. package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
  114. package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
  115. package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
  116. package/dist-library/types/components/minimal-preset.d.ts +2 -0
  117. package/dist-library/types/components/mount-preset.d.ts +4 -0
  118. package/dist-library/types/components/network/submit-button.d.ts +10 -0
  119. package/dist-library/types/components/plot/coordinate.d.ts +2 -0
  120. package/dist-library/types/components/plugins/chart.d.ts +2 -0
  121. package/dist-library/types/components/plugins/data.d.ts +2 -0
  122. package/dist-library/types/components/plugins/diagram.d.ts +2 -0
  123. package/dist-library/types/components/plugins/forms.d.ts +2 -0
  124. package/dist-library/types/components/plugins/gallery.d.ts +2 -0
  125. package/dist-library/types/components/plugins/navigation.d.ts +2 -0
  126. package/dist-library/types/components/plugins/network.d.ts +2 -0
  127. package/dist-library/types/components/plugins/plot.d.ts +2 -0
  128. package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
  129. package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
  130. package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
  131. package/dist-library/types/export/component-state.d.ts +1 -1
  132. package/dist-library/types/export/index.d.ts +2 -1
  133. package/dist-library/types/export/print-document.d.ts +18 -0
  134. package/dist-library/types/export/render-markup.d.ts +23 -0
  135. package/dist-library/types/export/requirements.d.ts +1 -1
  136. package/dist-library/types/export/resources.d.ts +1 -1
  137. package/dist-library/types/export/restoration.d.ts +1 -1
  138. package/dist-library/types/export-assets/index.d.ts +25 -0
  139. package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
  140. package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
  141. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  142. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  143. package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
  144. package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
  145. package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
  146. package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
  147. package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
  148. package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
  149. package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
  150. package/dist-library/types/local/compilation/compiler.d.ts +7 -14
  151. package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
  152. package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
  153. package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
  154. package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
  155. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  156. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  157. package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
  158. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
  159. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
  160. package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
  161. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
  162. package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
  163. package/dist-library/types/local/configuration/options-core.d.ts +5 -4
  164. package/dist-library/types/local/configuration/options.d.ts +2 -1
  165. package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
  166. package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
  167. package/dist-library/types/local/configuration/schema.d.ts +1 -1
  168. package/dist-library/types/local/css/author-css.d.ts +66 -0
  169. package/dist-library/types/local/evaluation/computations.d.ts +2 -2
  170. package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
  171. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
  172. package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
  173. package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
  174. package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
  175. package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
  176. package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
  177. package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
  178. package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
  179. package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
  180. package/dist-library/types/local/evaluation/validation.d.ts +1 -1
  181. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  182. package/dist-library/types/local/html/html-details.d.ts +1 -1
  183. package/dist-library/types/local/html/html-entities.d.ts +11 -2
  184. package/dist-library/types/local/html/html-recovery.d.ts +1 -1
  185. package/dist-library/types/local/html/html-table.d.ts +1 -1
  186. package/dist-library/types/local/html/html.d.ts +40 -4
  187. package/dist-library/types/local/index.d.ts +14 -13
  188. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  189. package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
  190. package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
  191. package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
  192. package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
  193. package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
  194. package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
  195. package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
  196. package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
  197. package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
  198. package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
  199. package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
  200. package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
  201. package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
  202. package/dist-library/types/local/parsing/parser.d.ts +3 -3
  203. package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
  204. package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
  205. package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
  206. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  207. package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
  208. package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
  209. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  210. package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
  211. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  212. package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
  213. package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
  214. package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
  215. package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
  216. package/dist-library/types/local/rendering/render-types.d.ts +1 -1
  217. package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
  218. package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
  219. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  220. package/dist-library/types/local/runtime/retention.d.ts +1 -1
  221. package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
  222. package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
  223. package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
  224. package/dist-library/types/local/runtime/runtime.d.ts +4 -2
  225. package/dist-library/types/local/runtime/state.d.ts +1 -1
  226. package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
  227. package/dist-library/types/local/source/authoring.d.ts +1 -1
  228. package/dist-library/types/local/source/source-context.d.ts +23 -0
  229. package/dist-library/types/local/source/source-migration.d.ts +2 -2
  230. package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
  231. package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
  232. package/dist-library/types/local/transport/shared-data.d.ts +1 -1
  233. package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
  234. package/dist-library/types/local/transport/worker-job.d.ts +28 -0
  235. package/dist-library/types/local/transport/worker.d.ts +32 -46
  236. package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
  237. package/dist-library/types/pdf.d.ts +22 -0
  238. package/dist-library/types/presets/identity.d.ts +1 -0
  239. package/dist-library/types/presets/minimal.d.ts +2 -0
  240. package/dist-library/types/presets/plugin-packs.d.ts +1 -0
  241. package/dist-library/types/react/component-api.d.ts +20 -4
  242. package/dist-library/types/react/component-primitives.d.ts +10 -10
  243. package/dist-library/types/react/component-utils.d.ts +9 -1
  244. package/dist-library/types/react/index.d.ts +6 -5
  245. package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
  246. package/dist-library/types/react/minimal.d.ts +13 -0
  247. package/dist-library/types/react/package-core.d.ts +67 -0
  248. package/dist-library/types/react/package.d.ts +3 -67
  249. package/dist-library/types/react/runtime/common.d.ts +1 -1
  250. package/dist-library/types/react/sdk-core.d.ts +115 -0
  251. package/dist-library/types/react/sdk.d.ts +4 -110
  252. package/dist-library/types/react/server.d.ts +2 -2
  253. package/dist-library/types/react/use-draft-field.d.ts +5 -1
  254. package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
  255. package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
  256. package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
  257. package/dist-library/types/runtime-services/component-state.d.ts +1 -1
  258. package/dist-library/types/runtime-services/index.d.ts +2 -0
  259. package/dist-library/types/runtime-services/network.d.ts +86 -0
  260. package/dist-library/types/runtime-services/runtime.d.ts +1 -1
  261. package/dist-library/types/sdk/config.d.ts +1 -1
  262. package/dist-library/types/sdk/index.d.ts +1 -0
  263. package/dist-library/types/sdk/props.d.ts +1 -1
  264. package/dist-library/types/sdk/registry-core.d.ts +1 -1
  265. package/dist-library/types/sdk/theme.d.ts +5 -4
  266. package/dist-library/types/sdk/types.d.ts +2 -2
  267. package/dist-library/types/shareable.d.ts +6 -5
  268. package/dist-library/types/standalone/diagnostics.d.ts +1 -1
  269. package/dist-library/types/standalone/host.d.ts +5 -0
  270. package/dist-library/types/standalone/payload.d.ts +1 -1
  271. package/dist-library/types/standalone/prepare.d.ts +2 -2
  272. package/dist-library/types/standalone/session-core.d.ts +68 -0
  273. package/dist-library/types/standalone/session.d.ts +6 -68
  274. package/dist-library/types/themes/contract.d.ts +7 -0
  275. package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
  276. package/dist-library/types/vite/client.d.ts +19 -0
  277. package/dist-library/types/vite/index.d.ts +18 -3
  278. package/dist-library/types/vite/registration.d.ts +2 -2
  279. package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
  280. package/dist-library/validation-BEBA_HvS.js +1121 -0
  281. package/dist-library/visual-frame-CyV1FXzs.js +48 -0
  282. package/dist-library/visuals-B5KSafVk.js +3 -0
  283. package/dist-library/visuals-BZbZYA7w.js +72572 -0
  284. package/dist-standalone/reactive-md-standalone.css +1 -1
  285. package/dist-standalone/reactive-md-standalone.js +146 -137
  286. package/docs/README-ch.md +16 -11
  287. package/docs/README.md +16 -11
  288. package/docs/compatibility/compatibility-ch.md +8 -8
  289. package/docs/compatibility/compatibility-en.md +8 -8
  290. package/docs/compatibility/source-versioning-ch.md +1 -1
  291. package/docs/compatibility/source-versioning-en.md +1 -1
  292. package/docs/development/component-development-ch.md +2 -2
  293. package/docs/development/component-development-en.md +2 -2
  294. package/docs/development/component-development-reference-ch.md +4 -4
  295. package/docs/development/component-development-reference-en.md +4 -4
  296. package/docs/development/component-protocol-ch.md +14 -14
  297. package/docs/development/component-protocol-en.md +14 -14
  298. package/docs/development/extension-tutorial-ch.md +308 -0
  299. package/docs/development/extension-tutorial-en.md +308 -0
  300. package/docs/development/local-module-layout-ch.md +10 -50
  301. package/docs/development/local-module-layout-en.md +9 -49
  302. package/docs/development/performance-overview-ch.md +174 -154
  303. package/docs/development/performance-overview-en.md +174 -154
  304. package/docs/guides/local-guide-ch.md +2 -2
  305. package/docs/guides/local-guide-en.md +2 -2
  306. package/docs/integration/author-tools-ch.md +2 -2
  307. package/docs/integration/author-tools-en.md +2 -2
  308. package/docs/integration/compiler-ch.md +4 -2
  309. package/docs/integration/compiler-en.md +4 -2
  310. package/docs/integration/directory-discovery-ch.md +5 -1
  311. package/docs/integration/directory-discovery-en.md +5 -1
  312. package/docs/integration/editor-ch.md +35 -5
  313. package/docs/integration/editor-en.md +42 -4
  314. package/docs/integration/extension-sdk-ch.md +6 -4
  315. package/docs/integration/extension-sdk-en.md +6 -4
  316. package/docs/integration/local-integration-ch.md +201 -19
  317. package/docs/integration/local-integration-en.md +194 -18
  318. package/docs/integration/network-host-ch.md +75 -0
  319. package/docs/integration/network-host-en.md +75 -0
  320. package/docs/integration/shareable-export-ch.md +58 -16
  321. package/docs/integration/shareable-export-en.md +57 -15
  322. package/docs/reference/html-compatibility-ch.md +20 -67
  323. package/docs/reference/html-compatibility-en.md +19 -64
  324. package/docs/reference/local-interaction-syntax-ch.md +199 -26
  325. package/docs/reference/local-interaction-syntax-en.md +194 -27
  326. package/docs/reference/public-api-ch.md +416 -0
  327. package/docs/reference/public-api-en.md +416 -0
  328. package/docs/reference/theme-protocol-ch.md +27 -8
  329. package/docs/reference/theme-protocol-en.md +46 -8
  330. package/docs/releases/release-0.4.0-ch.md +2 -2
  331. package/docs/releases/release-0.4.0-en.md +2 -2
  332. package/docs/releases/release-0.8.0-ch.md +19 -3
  333. package/docs/releases/release-0.8.0-en.md +19 -3
  334. package/docs/releases/release-0.9.0-ch.md +44 -0
  335. package/docs/releases/release-0.9.0-en.md +44 -0
  336. package/docs/releases/release-0.9.1-ch.md +29 -0
  337. package/docs/releases/release-0.9.1-en.md +29 -0
  338. package/examples/component-package/README-ch.md +1 -1
  339. package/examples/component-package/README.md +1 -1
  340. package/examples/conformance/README-ch.md +3 -3
  341. package/examples/conformance/README.md +3 -3
  342. package/examples/game-2048-package/README-ch.md +3 -9
  343. package/examples/game-2048-package/README.md +8 -12
  344. package/examples/integration/README-ch.md +21 -2
  345. package/examples/integration/README.md +21 -2
  346. package/examples/integration/extension-sdk/README-ch.md +1 -1
  347. package/examples/integration/extension-sdk/README.md +1 -1
  348. package/examples/integration/streaming/index.html +48 -0
  349. package/examples/integration/streaming/main.js +175 -0
  350. package/examples/integration/streaming/package.json +13 -0
  351. package/examples/integration/streaming/worker.js +3 -0
  352. package/examples/local/README-ch.md +3 -3
  353. package/examples/local/README.md +2 -2
  354. package/examples/local/minimal-budget.reactive.md +48 -0
  355. package/examples/minimal-extension/README-ch.md +78 -0
  356. package/examples/minimal-extension/README.md +78 -0
  357. package/examples/minimal-extension/index.html +15 -0
  358. package/examples/minimal-extension/package.json +26 -0
  359. package/examples/minimal-extension/sample/document.reactive.md +10 -0
  360. package/examples/minimal-extension/scripts/build.mjs +32 -0
  361. package/examples/minimal-extension/scripts/export.mjs +72 -0
  362. package/examples/minimal-extension/scripts/test-node.mjs +75 -0
  363. package/examples/minimal-extension/src/extension.tsx +90 -0
  364. package/examples/minimal-extension/src/preview.tsx +12 -0
  365. package/examples/minimal-extension/src/source.ts +4 -0
  366. package/examples/minimal-extension/tsconfig.json +14 -0
  367. package/examples/network-survey/README.md +200 -0
  368. package/examples/network-survey/index.html +49 -0
  369. package/examples/network-survey/package.json +26 -0
  370. package/examples/network-survey/sample/document.reactive.md +51 -0
  371. package/examples/network-survey/src/components.tsx +325 -0
  372. package/examples/network-survey/src/host.ts +316 -0
  373. package/examples/network-survey/src/main.tsx +91 -0
  374. package/examples/network-survey/src/source.ts +1 -0
  375. package/examples/network-survey/tsconfig.json +26 -0
  376. package/examples/network-survey/vite.config.ts +227 -0
  377. package/examples/sci-fi-theme/README-ch.md +4 -2
  378. package/examples/sci-fi-theme/README.md +4 -2
  379. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
  380. package/examples/sci-fi-theme/demo/demo.css +129 -23
  381. package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
  382. package/examples/sci-fi-theme/demo/main.tsx +45 -10
  383. package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
  384. package/examples/sci-fi-theme/package.json +2 -1
  385. package/examples/sci-fi-theme/src/components.css +1064 -154
  386. package/examples/sci-fi-theme/src/notch.css +142 -0
  387. package/examples/sci-fi-theme/src/sci-fi.css +3 -1
  388. package/examples/sci-fi-theme/src/theme.ts +2 -0
  389. package/examples/sci-fi-theme/src/tokens.css +512 -408
  390. package/examples/tetris-package/README-ch.md +4 -4
  391. package/examples/tetris-package/README.md +4 -4
  392. package/package.json +70 -3
  393. package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
  394. package/dist-library/compiler--ea2CKQF.js +0 -61
  395. package/dist-library/component-state-Cq2K5gkS.js +0 -490
  396. package/dist-library/options-CX5m5n-J.js +0 -115
  397. package/dist-library/runtime-C-sbfpOX.js +0 -1157
  398. package/dist-library/types/local/contracts/locale.d.ts +0 -1
  399. package/dist-library/types/local/contracts/version.d.ts +0 -2
  400. package/dist-library/types/local/evaluation/dates.d.ts +0 -2
  401. package/dist-library/types/local/evaluation/expression.d.ts +0 -47
  402. package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
  403. package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
  404. package/dist-library/types/local/session/incremental.d.ts +0 -48
  405. package/dist-library/types/local/source/node-walk.d.ts +0 -3
  406. package/dist-library/types/local/source/text-length.d.ts +0 -13
  407. package/dist-library/types/local/theme/theme-name.d.ts +0 -3
  408. package/dist-library/types/local/widgets/visuals.d.ts +0 -25
  409. package/dist-library/types/react/default-theme.d.ts +0 -6
  410. package/dist-library/validation-W-bmny-x.js +0 -2253
  411. package/docs/development/releasing-ch.md +0 -12
  412. package/docs/development/releasing-en.md +0 -12
  413. package/docs/integration/codemirror-ch.md +0 -52
  414. package/docs/integration/codemirror-en.md +0 -29
  415. package/docs/integration/repository-split-ch.md +0 -40
  416. package/docs/integration/repository-split-en.md +0 -23
  417. package/docs/reference/computations-formatting-ch.md +0 -89
  418. package/docs/reference/computations-formatting-en.md +0 -89
  419. package/docs/reference/constraints-collections-ch.md +0 -104
  420. package/docs/reference/constraints-collections-en.md +0 -104
  421. package/docs/reference/local-components-v2-ch.md +0 -140
  422. package/docs/reference/local-components-v2-en.md +0 -106
  423. package/docs/reference/tolerance-ch.md +0 -64
  424. package/docs/reference/tolerance-en.md +0 -57
  425. /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
  426. /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
  427. /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
  428. /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
  429. /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
  430. /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
  431. /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
  432. /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
  433. /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
  434. /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
  435. /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
  436. /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
  437. /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
  438. /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
  439. /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
  440. /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
  441. /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
@@ -2,13 +2,11 @@
2
2
 
3
3
  **English** · [中文](local-interaction-syntax-ch.md)
4
4
 
5
- Syntax identifier: `local-draft-2`, 2026-10-23. If this is your first time with the syntax, read the [beginner guide](../guides/local-guide-en.md) first; this document is the complete specification. Hosts select local interaction mode through `compileLocal` and `LocalReactiveDocument`, see [integration notes](../integration/local-integration-en.md). See [Versions and compatibility](../compatibility/compatibility-en.md) for package version relationships, 0.x compatibility rules and migration, [Source revisions and migration](../compatibility/source-versioning-en.md) for the optional revision directive and `reactive-md migrate`, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the upgrade from `0.3.1` / `local-draft-1`. Complete examples are in the [example index](../../examples/local/README.md).
5
+ Syntax identifier: `local-draft-3`, 2026-10-31. If this is your first time with the syntax, read the [beginner guide](../guides/local-guide-en.md) first; this document is the complete specification. Hosts select local interaction mode through `compileLocal` and `LocalReactiveDocument`, see [integration notes](../integration/local-integration-en.md). See [Versions and compatibility](../compatibility/compatibility-en.md) for package version relationships, 0.x compatibility rules and migration, and [Source revisions and migration](../compatibility/source-versioning-en.md) for the optional revision directive and `reactive-md migrate`. Complete examples are in the [example index](../../examples/local/README.md).
6
6
 
7
7
  ## 1. Positioning and scope
8
8
 
9
- `0.4.0` adds invisible `computed`/`const` declarations and number, string and date functions. See [Reusing calculations and formatting values](computations-formatting-en.md) for declaration syntax, dependency and error rules, function signatures and deterministic defaults.
10
-
11
- For cross-field validation, conditional tones, arrays and bounded table-row generation, see [Constraints and collections](constraints-collections-en.md).
9
+ Named values, formatting and date functions, cross-field validation, conditional tones, arrays and bounded table-row generation are part of this revision: [5.4 Named values](#54-named-values), [5.5 Formatting, strings and dates](#55-formatting-strings-and-dates), [5.6 Arrays and aggregates](#56-arrays-and-aggregates), [4.4 Cross-field validation](#44-cross-field-validation), [7.2 Conditional tones](#72-conditional-tones) and [9.5 Generated tables](#95-generated-tables).
12
10
 
13
11
  See [Diagnostics and counting rules](diagnostics-counting-en.md) for source positions, text lengths and resource units. String `len()` and text-control length constraints count Unicode code points.
14
12
 
@@ -16,7 +14,7 @@ Reactive MD is for local interactive documents: authors write Markdown and place
16
14
 
17
15
  The base language requires only two connection rules: `bind` names an input, and `{{ expression }}` reads it elsewhere. Components handle their own selection, expansion, search, sorting, timing and reset.
18
16
 
19
- This draft does not include external service calls, form submission, asynchronous resources, named actions, event handlers, programmable collection edits, general loop templates or arbitrary scripts. Legacy `state/data/computed/actions` configuration blocks are not part of the new syntax. Expressions can produce string or numeric arrays; checklist and multi-select components produce string arrays. Tables can use prose Markdown or bounded local row generation through `data-table`.
17
+ This revision does not include external service calls, form submission, asynchronous resources, named actions, event handlers, programmable collection edits, general loop templates or arbitrary scripts. Legacy `state/data/computed/actions` configuration blocks are not part of this syntax. Expressions can produce string or numeric arrays; checklist and multi-select components produce string arrays. Tables can use prose Markdown or bounded local row generation through `data-table`.
20
18
 
21
19
  By default a document only keeps in-memory state for the current instance. Reopening starts from initial values; persistence is not part of the author syntax. No language version declaration, component import or YAML is required. A document may optionally declare its revision with one `<!-- reactive-md: local-draft-3 -->` line in the prologue, before the theme and body; unversioned documents use the current revision. See [Source revisions and migration](../compatibility/source-versioning-en.md). Hosts should explicitly select draft parsing mode and must not guess by mixing old and new syntax.
22
20
 
@@ -58,7 +56,7 @@ The inline components `badge`, `tooltip`, `jump` and `text` can be embedded in s
58
56
  | Void component | `<slider bind="a" label="Amplitude">` | No end tag; a trailing `/>` is also accepted |
59
57
  | Container with content | `<card title="Notes">` and `</card>` | Must be explicitly closed; nesting is allowed |
60
58
 
61
- Void components are fixed to `input`, `textarea`, `number`, `slider`, `range-slider`, `coordinate`, `toggle`, `checkbox`, `date`, `counter`, `timer`, `progress`, `anchor` and `edge`. The declaration tags `computed`, `const` and `validation`, and the structural `column`, also have no body. Every other component listed in this draft uses paired tags. `textarea` text is set through `initial`, so it is a void component.
59
+ Void components are fixed to `input`, `textarea`, `number`, `slider`, `range-slider`, `coordinate`, `toggle`, `checkbox`, `date`, `counter`, `timer`, `progress`, `anchor` and `edge`. The declaration tags `external`, `computed`, `const` and `validation`, and the structural `column`, also have no body. Every other component listed in this revision uses paired tags. `textarea` text is set through `initial`, so it is a void component.
62
60
 
63
61
  For example:
64
62
 
@@ -72,7 +70,7 @@ Total cost: {{ people * 100 }} USD.
72
70
  </card>
73
71
  ```
74
72
 
75
- Tag names and attribute names use lowercase kebab-case; an end tag must match the most recently unclosed container. Automatic closing and correction of mismatched tags are not allowed. Legacy directives such as `:::card` are not interpreted as new components.
73
+ Tag names and attribute names use lowercase kebab-case; an end tag must match the most recently unclosed container. Automatic closing and correction of mismatched tags are not allowed. Legacy directives such as `:::card` are not interpreted as components.
76
74
 
77
75
  ### 3.3 Attributes
78
76
 
@@ -97,7 +95,7 @@ Omitted boolean attributes use the component default rather than always assuming
97
95
 
98
96
  `bind`, `initial`, `name`, `id`, `value` (option identifier), `to`, `from`, `answer`, `kind`, field mappings and layout enums are static attributes. `min`, `max` and `required` are dynamic on `number`, `slider`, `date`, `input` and `textarea`: use one complete interpolation whose result is a number, a `YYYY-MM-DD` string (or empty string) or a boolean respectively. `step`, length limits, selector options and the range-slider/coordinate bounds remain static. Plot `min/max` may be dynamic to adjust the observed range. The `rows` attribute of `textarea` is a static row count, while `data-table.rows` is a required expression; do not confuse the two.
99
97
 
100
- Dynamic constraints are checked when a value is written and when the control is displayed. If another parameter narrows a range so that an existing value becomes invalid, the stored value is kept and the field shows the constraint error; it is never clamped or silently replaced. Shared bindings must declare the same static range and step and, when a bound is dynamic, the same expression.
98
+ Dynamic constraints are checked when a value is written and when the control is displayed. Writes use the constraints in effect at that moment and still commit atomically. If another parameter narrows a range so that an existing value becomes invalid, the stored value is kept and the field shows the constraint error; it is never clamped, reset or snapped to a nearby legal value. Reducing the field to satisfy the new range, or restoring the dependency, clears the error. Dynamic `required` switching to true while the field is empty shows a hint and does not fill the field. A dynamic bound that cannot be evaluated, a dynamic `min` greater than `max`, or an invalid dynamic date bound rejects the related write and leaves state and revision unchanged. `runtime.validate()` keeps its cross-field meaning; dynamic constraint failures are enforced on writes and displayed on the field. Shared bindings must declare the same static range and step and, when a bound is dynamic, the same expression. `step` and text-length limits remain static.
101
99
 
102
100
  Unknown components, unknown attributes, wrong positions or wrong attribute types all produce source diagnostics. Registered tags are not executed as arbitrary HTML; authors cannot use `script`, `style`, `onclick` or other script entry points.
103
101
 
@@ -164,6 +162,24 @@ Disabled controls do not accept reader input. A panel reset commits all paramete
164
162
 
165
163
  When a conditional region is hidden, existing state, tab selection and checklist checks are preserved. Timers in hidden regions pause and stay paused when shown again until the reader starts them. Disposing a document releases timers, subscriptions and component state.
166
164
 
165
+ ### 4.4 Cross-field validation
166
+
167
+ ```markdown
168
+ <number bind="people" label="Participants" initial="4" min="1" max="20">
169
+ <number bind="capacity" label="Room capacity" initial="3" min="1" max="20">
170
+ <validation when="{{ people <= capacity }}" message="Choose a room for at least {{ people }} people." fields="people capacity">
171
+ ```
172
+
173
+ `validation` is a void block component with required `when`, `message` and `fields`. `when` contains one complete boolean expression. `message` is text with optional ordinary interpolations. `fields` lists distinct public writable binding names separated by whitespace; names from multi-slot controls are accepted. A rule can read controls and computed values, including values declared later in the source. Fields identify the controls associated with the rule's hint, and read-only declarations cannot be fields.
174
+
175
+ Constraints report the current consistency of a document, so readers can still edit an inconsistent plan, including one whose initial values fail a cross-field rule. Changing the participant count from four to six can temporarily exceed room capacity; changing the room then clears the hint. Individual control rules such as numeric bounds and invalid calendar dates keep their write-rejection behavior.
176
+
177
+ `runtime.validate()` returns diagnostics for all current failed rules in source order. It reports `local.validation.failed` when `when` is false and `local.validation.expression` when an expression cannot be evaluated; an expression error counts as a failure. One failed rule does not stop independent rules. The result is cached for the current runtime revision and returned as defensive copies. Edits, atomic slot updates and resets refresh calculations and validation together.
178
+
179
+ The renderer displays failed-rule hints and associates them with the corresponding controls or their accessible groups through `aria-describedby` and `aria-invalid`. Hint IDs belong to the mounted document instance, and success removes the error text. Rules in hidden content remain active, as do their bindings; hidden hints do not announce themselves. A document supports at most 100 validation rules, including hidden regions, and diagnostic messages retain the existing 2,000-character bound.
180
+
181
+ `LocalDocument.validations` contains serializable `LocalValidation` metadata. Hosts can call `runtime.validate()` at any time without changing state, and the compiled document remains transferable to a Worker with `structuredClone`.
182
+
167
183
  ## 5. Text interpolation and expressions
168
184
 
169
185
  ```markdown
@@ -222,11 +238,109 @@ Price: {{ priceCny }} CNY
222
238
 
223
239
  The host supplies values through `externalValues` on `LocalReactiveDocument` or `runtime.setExternalValues()`. Values are validated against the declared type and the usual size budgets. When a value is missing, only expressions that read that name fail locally; independent content keeps working, and the dependent content recalculates when the value arrives. A missing value is never converted to `0`, `false` or an empty string. Static export and SSR behave the same way: pass the values into the host integration; an export does not fetch or embed them.
224
240
 
225
- This build adds named read-only values through top-level `computed` and `const` declarations. Short calculations can still be written in place; use declarations for intermediate results shared by prose, conditions, formulas and charts. See [Reusing calculations and formatting values](computations-formatting-en.md) for dependency, error and caching rules.
241
+ Top-level `computed` and `const` declarations provide named read-only values; see [5.4 Named values](#54-named-values). Short calculations can still be written in place; use declarations for intermediate results shared by prose, conditions, formulas and charts.
242
+
243
+ ### 5.4 Named values
244
+
245
+ ```markdown
246
+ <const name="unitPrice" value="{{ 12.5 }}">
247
+ <computed name="total" value="{{ quantity * unitPrice }}">
248
+ <computed name="invoice" value="{{ formatCurrency(total) }}">
249
+
250
+ <number bind="quantity" label="Quantity" initial="2" min="0" max="100">
251
+
252
+ Invoice: **{{ invoice }}**.
253
+
254
+ <if when="{{ total >= 100 }}">
255
+ Eligible for bulk delivery.
256
+ </if>
257
+ ```
258
+
259
+ `computed` and `const` are invisible, void declarations. Write each on its own line at document top level; `/>` is accepted too. Both require `name` and a complete `value="{{ expression }}"`. Their values use the expression types: number, string, boolean, null, string array or numeric array. The compiler infers the type; there is no type annotation or implicit conversion.
260
+
261
+ Names follow the same identifier and reserved-name rules as `bind`. Controls, multi-slot bindings and declarations share one namespace. A declaration cannot replace another declaration or a control. Declarations inside containers are compile errors. Code fences, inline code and comments remain literal or inert.
262
+
263
+ Declarations are visible throughout the document, including before their source position. A `computed` value may read controls, constants and other computations. A `const` may read other constants and built-in constants such as `pi`; it stays independent of controls and computations. Constants have no editing or reset control.
264
+
265
+ The compiler extracts dependencies from the expression AST, including all conditional branches, and orders declarations by dependency before inferring types. Unknown names, duplicate names, self references and indirect cycles produce source-positioned errors. A cycle in an unused branch is still a compile error. Type checking uses the same operator and function rules as ordinary expressions; runtime domain errors remain possible, for example division by a control that becomes zero. Names declared by top-level `<external>` tags are valid read-only dependencies for `computed` values, text and conditions; a `const` cannot depend on external data, and external names never become writable parameters.
266
+
267
+ Use a named value anywhere an expression is accepted: prose, dynamic attributes, conditions and numeric table cells used by charts. Computable LaTeX formulas read multi-letter numeric names as `\mathrm{total}`, for example `y = \mathrm{total} x`. Formatted strings belong in labels or prose; numeric chart cells and plot parameters need the underlying number.
268
+
269
+ Each runtime owns its calculation cache. Computations are reused within a revision and refreshed after a successful control edit, atomic multi-slot edit or panel reset. Constants are evaluated at compilation and copied into each runtime. Hiding a section keeps its inputs and calculations; reset follows the existing control subtree rules.
270
+
271
+ A failed calculation propagates its expression error when a consumer reads it. The runtime never substitutes zero, null or a previous successful value. Independent consumers continue to work, and a valid input edit lets failed consumers recover. Runtime logical and conditional operators keep their short-circuit behavior, so an unvisited branch does not read its failed value. A constant with an invalid static value is a compile error.
272
+
273
+ `document.bindings` and `document.initialState` describe writable controls. `document.computations` contains serializable declaration metadata, and `document.externals` contains the read-only external declarations. `runtime.snapshot().state` also contains successful named results for the current revision; failed results are absent. Use `runtime.evaluate(name)` to read a result with its error semantics. Declarations cannot be changed through `set` or `setMany`. Returned arrays remain protected from external mutation.
274
+
275
+ Declaration diagnostics use `local.computation.*`: `placement`, `name`, `reserved`, `duplicate`, `value`, `unknown`, `cycle`, `const`, `expression` and `budget`. Expression type errors keep the existing `local.expression.*` codes, and diagnostics include source ranges, lines and columns. The graph uses an iterative dependency order, so long chains do not require recursive evaluation. Existing source, syntax-node, expression and value budgets still apply, and cycle reports are capped by the diagnostic budget.
276
+
277
+ Expression function names are reserved identifiers. A binding or declaration cannot use `sum`, `formatNumber`, `dateDiff` or any other function listed in [5.1](#51-expression-set); the compiler reports the conflict with a reserved-name diagnostic. Rename the name and its references.
278
+
279
+ ### 5.5 Formatting, strings and dates
280
+
281
+ All four formatting functions return strings; optional arguments are positional.
282
+
283
+ | Function | Defaults and example |
284
+ | --- | --- |
285
+ | `formatNumber(value, digits, locale, grouping)` | `digits=2`, `locale="en-US"`, `grouping=true`; `formatNumber(1234.5)` gives `"1,234.50"` |
286
+ | `formatPercent(value, digits, locale)` | `digits=0`, `locale="en-US"`; `formatPercent(0.125, 1)` gives `"12.5%"` |
287
+ | `formatScientific(value, digits, locale)` | `digits=2`, `locale="en-US"`; `formatScientific(1234)` gives `"1.23E3"` |
288
+ | `formatCurrency(value, currency, digits, locale)` | `currency="USD"`, `digits=2`, `locale="en-US"`; `formatCurrency(12.5)` gives `"$12.50"` |
289
+
290
+ `digits` is an integer from 0 to 20 and fixes both minimum and maximum fraction digits, including for currencies such as JPY. `grouping` is a boolean. Supported locales are exactly `en-US`, `zh-CN`, `de-DE`, `fr-FR` and `ja-JP`; omission uses `en-US` regardless of the renderer's UI language or device settings, and an unsupported locale is an error. Currency codes are three uppercase ASCII letters accepted by `Intl.NumberFormat`; the check is syntactic and does not consult a registry of circulating currencies.
291
+
292
+ Formatting uses decimal `halfExpand` rounding: ties round away from zero, so `formatNumber(1.005)` gives `"1.01"` and `formatNumber(-1.005)` gives `"-1.01"`. Zero displays without a negative sign. Arithmetic still uses finite JavaScript numbers; `round(x)` keeps its `Math.round` rule, with ties toward positive infinity. Formatting changes presentation, not the source number.
293
+
294
+ A null value formats as an empty string. Other argument types remain strict, and strings are not converted into numbers, so guard optional dates or text explicitly before applying their functions. Locale-specific punctuation, currency symbols and spacing follow the host's `Intl` data; hosts that need byte-identical text across platforms pin their runtime and locale data.
295
+
296
+ | String function | Behavior |
297
+ | --- | --- |
298
+ | `trim(text)` | Remove leading and trailing JavaScript Unicode whitespace |
299
+ | `lower(text)`, `upper(text)` | Default Unicode case conversion, independent of locale |
300
+ | `startsWith(text, search)`, `endsWith(text, search)` | Case-sensitive literal checks; empty search matches |
301
+ | `replace(text, search, replacement)` | Replace every non-overlapping literal match; empty search is an error; replacement text such as `$&` stays literal |
302
+ | `slice(text, start, end)` | Unicode code point indices; end is exclusive and defaults to the length; negative indices count from the end; indices are integers and clamp to bounds |
303
+
304
+ These functions require strings, including when the value is null. No regular expressions or property access are available. Code points are distinct from grapheme clusters: a combined emoji or an accented letter can contain several code points. All results keep the existing string budget of 100,000 UTF-16 code units, and replacement expansion is checked before constructing an oversized result.
305
+
306
+ `dateCompare(a, b)` returns `-1`, `0` or `1`. `dateDiff(a, b, unit)` returns the signed difference **a minus b**; the default unit is `"days"`, and other units are `"hours"`, `"minutes"`, `"seconds"` and `"milliseconds"`.
307
+
308
+ Both arguments must be valid `YYYY-MM-DD` strings in years `0001` through `9999`, matching date controls. The calendar is Gregorian and leap days are validated. Each date means midnight UTC, so device timezone and daylight saving changes do not change the result: `dateDiff("2026-03-09", "2026-03-08", "hours")` is `24`. Timestamps, timezone suffixes and ambiguous regional date strings are rejected.
309
+
310
+ An empty date control contains `""`, which is an absent date rather than epoch zero. Empty or invalid dates produce a domain error, and null produces a type error. Guard optional dates explicitly:
311
+
312
+ ```markdown
313
+ <computed name="days" value="{{ startDate == '' || endDate == '' ? null : dateDiff(endDate, startDate) }}">
314
+ Days: {{ days == null ? 'Choose both dates' : formatNumber(days, 0) }}
315
+ ```
316
+
317
+ ### 5.6 Arrays and aggregates
318
+
319
+ ```markdown
320
+ <const name="fixedFees" value="{{ [100, 20, 5] }}">
321
+ <computed name="fees" value="{{ [people * 80, includeKit ? people * 20 : 0] }}">
322
+
323
+ First fee: {{ fees[0] }}. Total: {{ sum(fees) }}.
324
+ ```
325
+
326
+ Array literals contain only strings or only finite numbers. Expressions inside a literal can read the document's named values. Nested arrays, mixed element types, booleans and null elements are rejected. `[]` is an empty numeric array by default; a direct empty literal in a conditional branch adopts a string-array sibling's kind, so `show ? subjects : []` works for string selections. Checklist and multi-select values remain string arrays. The public type `LocalValue` gains `number[]`, and `LocalValueKind` gains `number-array`; the existing `array` kind continues to mean a string array.
327
+
328
+ Indexing is zero based: `values[0]` reads the first element. The index must be a finite safe integer. An integer outside the collection, including a negative index, returns null; a non-integer index is an error. Indexing a string or a scalar is a type error. Arrays cannot be interpolated as text; use an index, `len`, an aggregate or a data table.
329
+
330
+ `len` counts both kinds of array. `contains` accepts a string member for a string array, a number for a numeric array, and a substring for a string. Every array is bounded by 10,000 elements; array literals also consume the existing expression-length, AST-node and evaluation budgets. The total contents of a string array keep the existing character budget. Returned runtime arrays are copied, and snapshot arrays are frozen.
331
+
332
+ | Function | Result |
333
+ | --- | --- |
334
+ | `sum(values)` | Sum of a numeric array; empty input gives `0` |
335
+ | `average(values)` | Arithmetic mean; empty input gives null |
336
+ | `minOf(values)` | Smallest numeric member; empty input gives null |
337
+ | `maxOf(values)` | Largest numeric member; empty input gives null |
338
+
339
+ Aggregates accept numeric arrays, with no conversion of numeric-looking strings. Results use finite JavaScript numbers; an overflow in the sum or result is an expression error. `average` divides the sum by the count, so an overflowing intermediate sum is also an error. Null from an empty aggregate follows the existing nullable-expression rules, so guard it before numeric operations when needed. Scalar `min`, `max` and `round` keep their existing signatures and behavior.
226
340
 
227
341
  ## 6. Inputs and parameter panels
228
342
 
229
- All input components support `label`, optional `bind`, optional scalar `initial` and dynamic `disabled`. Additional attributes are listed below; unlisted attributes are not part of this draft.
343
+ All input components support `label`, optional `bind`, optional scalar `initial` and dynamic `disabled`. Additional attributes are listed below; unlisted attributes are not part of this revision.
230
344
 
231
345
  | Component | Additional attributes and defaults |
232
346
  | --- | --- |
@@ -241,7 +355,11 @@ All input components support `label`, optional `bind`, optional scalar `initial`
241
355
  | date | optional min/max dates (dynamic); required=false (dynamic) |
242
356
  | select, choices, radio-group, multi-select | Body is one or more options; multi-select adds max-selected and uses a string-array value |
243
357
 
244
- `range-slider` and `coordinate` expose independent number slots. Omit a slot's `bind-start`/`bind-end` or `bind-x`/`bind-y` to keep that slot internal; provide at most one explicit initial per slot. Crossing endpoints is rejected, not silently swapped. `multi-select` requires `label`, accepts `max-selected`, and normalizes writes to source order. These components also accept an optional `color`. See [local-draft-2 components and migration](local-components-v2-en.md) for the complete rules.
358
+ `range-slider` and `coordinate` are leaves with required `label`, optional `color` and dynamic `disabled`. Bounds and the positive step are static finite numbers. `range-slider` defaults to 0/100/1, with start=min and end=the largest valid step not exceeding max. Crossing is rejected rather than swapping endpoints. `coordinate` defaults to -5…5 on both axes, step 1, and the nearest legal zero per axis. It supports pointer dragging, keyboard control and numeric alternatives.
359
+
360
+ Each optional `bind-start`/`bind-end` or `bind-x`/`bind-y` names one exclusive numeric slot; an omitted name keeps that slot internal. `x` and `y` remain reserved parameter names. Slots initialize at compile time and reset atomically. Host APIs extend to `runtime.get(node, slot?)`, `runtime.set(node, value, slot?)` and `runtime.setMany(node, values)`. Slots are start/end for ranges and x/y for coordinates. Every write validates canonical registered slots; an invalid batch preserves the entire snapshot and revision, and existing one-value calls remain valid.
361
+
362
+ `multi-select` requires a `label` and one or more option children; `bind` is optional. Its exclusive string-array binding defaults to empty. `initial` is a comma-separated list of static values; values are nonempty, unique and comma-free. `max-selected` is a nonnegative integer, defaulting to the option count. Writes normalize to source order and obey the existing array budgets. Search and Clear are built in, and selected items remain removable at the limit. `disabled` may be dynamic; reset clears local search and restores the initial selection, while hiding preserves them. `multi-select` also accepts an optional `color`.
245
363
 
246
364
  Selector example:
247
365
 
@@ -271,7 +389,7 @@ option.value is a non-empty, static, unique string; the body is the option's inl
271
389
  | accordion | optional label | One or more disclosure |
272
390
  | disclosure | label required; open=false | Click to expand; multiple entries can be open at once |
273
391
  | if | when required, complete boolean interpolation | Shows Markdown and components when true |
274
- | alert | optional title; tone=info/success/warning, default info | Regular Markdown |
392
+ | alert | optional title; tone=info/success/warning/error, default info | Regular Markdown |
275
393
  | badge | tone=neutral/success/warning, default neutral | Inline text |
276
394
  | tooltip | text required | Focusable inline explanatory text |
277
395
 
@@ -291,9 +409,26 @@ When if's when is false, content is not displayed, but internal parameters are s
291
409
  | steps | optional label, bind and initial; exclusive string binding | One or more step children; first step selected by default |
292
410
  | step | label required; optional value | Markdown body; omitted values become step-1, step-2 and so on |
293
411
 
294
- `jump.to` and `anchor.id` match heading slugs or explicit IDs. Duplicate anchors, heading collisions and missing targets are compile errors. `quiz` answers are supplied in source for self-study; drafts and feedback stay inside the component and panel reset clears them. `steps` keeps inactive step content initialized and preserves its state; hidden timers pause. See [local-draft-2 components and migration](local-components-v2-en.md) for color validation and slot details.
412
+ `jump.to` is a static heading slug or explicit anchor ID, written without a leading `#`. Explicit IDs match `[A-Za-z_][A-Za-z0-9_-]*`. Duplicate anchors, heading collisions and missing targets are compile errors. DOM IDs are namespaced per rendered document. Jumps scroll and move focus, and a hidden target shows local feedback. Existing Markdown fragment links also resolve explicit anchors.
413
+
414
+ `text` and `section` require `color`. Other supported components accept an optional `color`: jump, badge, progress, slider, toggle, checkbox, select, choices, radio-group, checklist, multi-select, range-slider and coordinate. Static named colors from the shared table and `#RGB`/`#RRGGBB` are accepted. Expressions, CSS functions, variables and declarations are rejected. Text containers set foreground color, and inner values override inheritance; links and controls keep their own appearance. Other components use color for their accent, selected state or progress fill, while `tone` keeps its semantic meaning. Omitted values use the theme.
295
415
 
296
- Base layout uses Markdown; images use `![description](../path)`, links use `[text](../address)`, and horizontal rules use `---`. Images load only after the host explicitly allows them through a URL policy; by default no image requests are made. See [Image and link policy](../integration/local-integration-en.md#image-and-link-policy) for integration. This draft does not provide author tags for row, stack, spacer, icon, image or link-button, and does not expose class/style.
416
+ `quiz` requires `label` and `answer`. `type` defaults to `choice`, with option children and a matching answer. A numeric quiz has an empty body, a finite `answer` and a nonnegative absolute `tolerance` defaulting to 0. `explanation` is optional and supports text interpolation. Check answer, feedback and Try again are built in. Drafts and feedback stay inside the component; this revision has no `quiz` bind. Hiding preserves them and panel reset clears them. Answers are supplied in source for self-study.
417
+
418
+ `steps` accepts one or more `step` children, optional `label` and an exclusive string `bind`. `initial` defaults to the first step. Each `step` requires `label`; omitted values become `step-1`, `step-2` and so on, and values are unique within a group. Previous/Next and position are built in. Only active content is visible; all bindings still initialize, state persists between steps, and hidden timers pause. Reset restores the initial step and its subtree.
419
+
420
+ Base layout uses Markdown; images use `![description](../path)`, links use `[text](../address)`, and horizontal rules use `---`. Images load only after the host explicitly allows them through a URL policy; by default no image requests are made. See [Image and link policy](../integration/local-integration-en.md#image-and-link-policy) for integration. This revision does not provide author tags for row, stack, spacer, icon, image or link-button, and does not expose class/style.
421
+
422
+ ### 7.2 Conditional tones
423
+
424
+ ```markdown
425
+ <badge tone="{{ total <= budget ? 'success' : 'warning' }}">{{ formatCurrency(total) }}</badge>
426
+ <alert tone="{{ total <= budget ? 'info' : 'warning' }}">Review the estimate before booking.</alert>
427
+ ```
428
+
429
+ `badge` accepts dynamic `tone` with `neutral`, `success` and `warning`; `alert` accepts `info`, `success`, `warning` and `error`. Static `tone` values use the same enums. A dynamic expression must have string type, and the renderer checks the returned value against the component's allowed tones. An error or unsupported value uses the default tone and a visible computation hint. CSS classes, author styles and colors remain outside this conditional API.
430
+
431
+ The enum covers info, warning, success and error emphasis while keeping theme colors and contrast under host control. Broader conditional styling is outside the author syntax.
297
432
 
298
433
  ## 8. Checklists
299
434
 
@@ -310,7 +445,7 @@ Completed {{ len(done) }} / 3 items.
310
445
 
311
446
  The checklist body is a non-empty, single-level Markdown task list, checked by the reader by default. Plain Markdown task lists remain static content. Items may contain inline Markdown but must not contain nested task lists or interactive components.
312
447
 
313
- Fixed entries generate internal IDs `item-1`, `item-2` and so on in order; the public value is an array of checked IDs in source order, and `[]` when nothing is selected. Entries are not added, removed or reordered during a document instance; they are regenerated after editing the source and creating a new instance. Reset restores the initial state specified by `[x]` / `[ ]`. Supports label, optional bind and dynamic disabled.
448
+ Fixed entries generate internal IDs `item-1`, `item-2` and so on in order; the public value is an array of checked IDs in source order, and `[]` when nothing is selected. Entries are not added, removed or reordered during a document instance; they are regenerated after editing the source and creating a new instance. Reset restores the initial state specified by `[x]` / `[ ]`. Supports label, optional bind and dynamic disabled. Checked item text is struck through and muted, including initial `[x]` items; unchecking restores it, and only the checked item changes.
314
449
 
315
450
  progress is a void component; label/value are required, max defaults to 100, and value may be dynamic; max must be a positive finite number, value must be between 0 and max, and out-of-range values show a diagnostic instead of being silently clamped.
316
451
 
@@ -338,7 +473,9 @@ There is no need to declare a YAML array first, and remote URLs, data attributes
338
473
  </table>
339
474
  ```
340
475
 
341
- table supports optional label, searchable=true, sortable=true and page-size=10 (positive integer). It provides a search box, sortable headers and paging by default; paging controls are hidden when there is only one page. With `key` naming a static, nonempty, unique identifier column, `bind` and `initial` can expose the selected row as a stable string; without `key`, selection stays inside the renderer.
476
+ table supports optional label, searchable=true, sortable=true and page-size=10 (positive integer). It provides a search box, sortable headers and paging by default; paging controls are hidden when there is only one page.
477
+
478
+ `key` names a column of static, nonempty, unique text identifiers. Selection is enabled only when `key` is present, so `bind` and `initial` require it. The bound value is an empty string when no row is selected by default, and an explicit `initial` must match a row. Mouse or keyboard selection writes row identity. A table and a chart may share a selection binding only with identical ordered keys and at most one explicit initial. Sorting, searching, pagination and hidden chart legends preserve the selection; table filters still affect only that table, and components without `key` gain no implicit binding. Reset restores the initial selection along with the rest of the subtree.
342
479
 
343
480
  Search is a case-insensitive substring match over the displayed text of all columns, trimming whitespace from the query; sorting uses the full column type, numerically for numeric columns and by Unicode code point order for text otherwise, preserving the original order of equal rows. Clicking a header cycles ascending, descending and source order. Search or sort changes return to the first page, and reactive data changes clamp the current page to the valid range. No matches shows "No matching results". These interactions affect only the table.
344
481
 
@@ -366,12 +503,34 @@ line/area determine the horizontal axis as numeric or categorical from the full
366
503
 
367
504
  Interactive default-theme charts provide themed tooltips, legend highlighting and 200ms data transitions. Line and area charts read visible series in the same row; bars read one hovered bar; scatter charts find the nearest point; pie and donut charts show values and shares of the visible total. Static mode keeps the data graphics and removes hover interaction and animation.
368
505
 
369
- Numeric columns update with parameters. Calculation errors display in the corresponding chart and are not replaced with 0. With `key`, a chart can expose selection through `bind`, using the same stable row-key rules as `table`; a table and chart may share that binding only when their ordered keys match.
506
+ Numeric columns update with parameters. Calculation errors display in the corresponding chart and are not replaced with 0. With `key`, a chart exposes selection through `bind` under the same row-key rules as `table`.
370
507
 
371
508
  ### 9.4 Timelines
372
509
 
373
510
  timeline supports optional title and unit (display text, default "minutes"), and its body is a table with either `Task`, `Start` and `Duration` columns or `事项`, `开始` and `时长` columns, plus optional `Notes` or `说明`. These column names are fixed headers; start and duration are non-negative numbers. Sorting is stable by start time, overlapping intervals are allowed, and notes are viewed with a pointer or keyboard. Table content may use interpolation.
374
511
 
512
+ ### 9.5 Generated tables
513
+
514
+ ```markdown
515
+ <const name="subjects" value="{{ ['mathematics', 'physics', 'chemistry'] }}">
516
+
517
+ <data-table label="Subject preparation" rows="{{ subjects }}" key="{{ item }}" max-rows="3">
518
+ <column label="Subject" value="{{ item }}">
519
+ <column label="Position" value="{{ index + 1 }}">
520
+ <column label="Preparation" value="{{ item == 'chemistry' ? 'Prepare materials' : 'Prepare examples' }}">
521
+ </data-table>
522
+ ```
523
+
524
+ `data-table` is a paired block component. It requires an accessible `label`, a complete array expression in `rows`, and a complete string or number expression in `key`. Its only children are 1 to 20 void `column` declarations. A column requires a static `label` and a complete scalar `value` expression. Cells output plain text; null gives an empty cell.
525
+
526
+ Each row has two local names: `item` is the current string or number, and `index` is its current zero-based position. These names shadow same-named document values inside column expressions. Other references use the normal document environment. The source `rows` expression uses ordinary document scope.
527
+
528
+ Keys depend only on `item`, including at least one reference to it. They cannot depend on `index` or other document values. The table checks that every evaluated key is a nonempty string or finite number and is unique. Numeric and string keys have distinct identities; signed numeric zeros have the same identity. React rows retain their identities when their items reorder. For records with repeated display values, use a collection of distinct local IDs as `rows` and derive the display cells from those IDs. Duplicate or invalid keys produce a whole-table error.
529
+
530
+ `max-rows` is a static integer from 1 to 1,000, defaulting to 100. Across the document, declared row budgets may total at most 2,000 and row budgets multiplied by their column counts may total at most 10,000 cells. Hidden tables count too. Each generated table also has a budget of 100,000 UTF-16 code units for header text, cell text, error and empty placeholders, and encoded row keys. The renderer checks budgets before exposing rows; exceeding them reports an error without truncating the data.
531
+
532
+ An empty array displays the headers and an empty-state message. Failure of the row source or a key clears the table's rows and displays an error. A cell-expression failure is shown in that cell while independent cells remain readable. The component creates native table rows, not arbitrary repeated document sections or controls. Markdown tables and their existing chart inputs keep their original behavior.
533
+
375
534
  ## 10. LaTeX math and function plots
376
535
 
377
536
  ### 10.1 Display and plotting
@@ -405,23 +564,32 @@ $$ y = a \sin x + \frac{x^2}{10} $$
405
564
  </plot>
406
565
  ```
407
566
 
408
- The plot body may contain only whitespace and one or more display formula blocks. Each block defines one curve in one of three forms:
567
+ The plot body may contain only whitespace and one or more display formula blocks. Each block defines one curve in one of four forms:
409
568
 
410
569
  ```markdown
411
570
  <plot min="-10" max="10">
412
571
  $$ y = a \sin x + \frac{x^2}{10} $$
413
572
  $$ \begin{cases} x = t - \sin t \\ y = 1 - \cos t \end{cases} $$
573
+ $$ r = a(1 + \cos\theta) $$
414
574
  $$ (x^2 + y^2)^2 = 2a^2(x^2 - y^2) $$
415
575
  </plot>
416
576
  ```
417
577
 
418
578
  The first block is explicit `y = f(x)`. The second is parametric: `x` and `y` are written as functions of `t`, and `t` runs from `min` to `max`; both axes fit the sampled points. Any other equation in `x` and `y` is implicit and is traced as a contour over `min` to `max` on both axes; the axes then fit the traced curve. Use multiple formula blocks for multiple curves; do not use plain line breaks as separators.
419
579
 
420
- plot supports min=-10, max=10 (dynamic allowed, requiring min < max), samples=200 (static integer 2–2000), optional label, x-label="x" and y-label="y". Each plot has at most 16 curves. An explicit or parametric curve requests `samples` points; an implicit curve uses a `samples`×`samples` grid per axis, capped at 100 and raised to at least 32, and requests the corresponding grid area. The whole document may request at most 20,000 points across all curves, including hidden regions. Curves share a computation budget, and exceeding it stops computation and reports an error. The vertical axis is determined automatically from finite sample values in the current range; if there are no valid values, an empty state is shown. Constant curves should add visible vertical-axis headroom.
580
+ The third block is polar, `r = f(\theta)`: `min` and `max` set the angle interval in radians. Directly typed `θ` and `\theta` are equivalent and may be mixed. Both spellings are local to the curve, while other numeric parameters can read document bindings. Samples are projected to `x = r cos(θ)`, `y = r sin(θ)`, and both axes fit the result. Negative radii preserve direction; undefined radii form breaks. This example samples 1000 evenly spaced points over one full turn:
581
+
582
+ ```markdown
583
+ <plot min="0" max="{{ 2 * pi }}" points="1000">
584
+ $$ r = 1 + \cos\theta $$
585
+ </plot>
586
+ ```
587
+
588
+ plot supports min=-10, max=10 (dynamic allowed, requiring min < max), points=200 (static integer 2–2000), optional label, x-label="x" and y-label="y". Quote attribute values, as in `points="1000"`. The existing `samples` attribute remains supported; `points` takes precedence when both are supplied, and the default is 200 when both are omitted. Each plot has at most 16 curves. An explicit, parametric or polar curve requests the specified number of sample points, including both endpoints. An implicit curve uses the specified number of grid points per axis, capped at 100 and raised to at least 32, and requests the corresponding grid area. The whole document may request at most 20,000 points across all curves, including hidden regions. Curves share a computation budget, and exceeding it stops computation and reports an error. The vertical axis is determined automatically from finite sample values in the current range; if there are no valid values, an empty state is shown. Constant curves should add visible vertical-axis headroom.
421
589
 
422
590
  ### 10.2 Computable LaTeX
423
591
 
424
- The following math forms must be supported by plotting computation in this draft. Formula layout and computation capability are validated separately; being able to lay out a formula does not mean it can be evaluated.
592
+ This revision requires plotting computation to support the following math forms. Formula layout and computation capability are validated separately; being able to lay out a formula does not mean it can be evaluated.
425
593
 
426
594
  | Math content | Syntax |
427
595
  | --- | --- |
@@ -493,7 +661,7 @@ Nodes are clickable and keyboard-selectable by default, and the selected notes a
493
661
 
494
662
  ## 12. Component reference and syntax scope
495
663
 
496
- | Purpose | Draft components |
664
+ | Purpose | Components |
497
665
  | --- | --- |
498
666
  | Parameter input | input, textarea, number, slider, range-slider, coordinate, toggle, checkbox, date, select, choices, radio-group, multi-select, option |
499
667
  | Built-in actions | counter, timer, checklist, progress |
@@ -504,9 +672,9 @@ Nodes are clickable and keyboard-selectable by default, and the selected notes a
504
672
  | Declarations and generated data | external, computed, const, validation, data-table, column |
505
673
  | Visualization | table, chart, plot, timeline, diagram, node, edge |
506
674
 
507
- 49 tag names in total. `option`, `tab`, `disclosure`, `node`, `edge`, `step` and `column` are structural children of parent components. `external`, `external`, `computed`, `const` and `validation` are document declarations; they are parsed as tags but are not rendered controls. The leading `<theme>` declaration is metadata and is not counted here. Most articles only need Markdown and two or three input/display components. Plain amounts can be written directly as `{{ total }} USD`; currency formatting and statistic cards are not entry-level requirements.
675
+ 49 tag names in total. `option`, `tab`, `disclosure`, `node`, `edge`, `step` and `column` are structural children of parent components. `external`, `computed`, `const` and `validation` are document declarations; they are parsed as tags but are not rendered controls. The leading `<theme>` declaration is metadata and is not counted here. Most articles only need Markdown and two or three input/display components. Plain amounts can be written directly as `{{ total }} USD`; currency formatting and statistic cards are not entry-level requirements.
508
676
 
509
- This draft does not accept legacy tags such as form, submit, button, each, list, spinner, stat or value, nor set/reset action attributes or on-* event attributes. The panel reset is a fixed boolean option, not a programmable action.
677
+ This revision does not accept legacy tags such as form, submit, button, each, list, spinner, stat or value, nor set/reset action attributes or on-* event attributes. The panel reset is a fixed boolean option, not a programmable action.
510
678
 
511
679
  ## 13. Diagnostics and acceptance rules
512
680
 
@@ -530,7 +698,7 @@ Diagnostics include severity, category, a short explanation, source line/column
530
698
 
531
699
  Implementation acceptance must cover:
532
700
 
533
- 1. Every regular new example compiles according to this specification; the diagnostics example reports the expected errors it lists.
701
+ 1. Every regular example compiles according to this specification; the diagnostics example reports the expected errors it lists.
534
702
  2. Headings, tables, lists and code inside Markdown containers parse normally; tags and interpolations inside code and comments are inactive.
535
703
  3. Components without bind work independently; bindings across components stay in sync, and an explicit initial value is applied only once.
536
704
  4. Forward references, conditional hiding, tab switching and panel reset follow the same state rules.
@@ -549,7 +717,6 @@ Host components are not part of the portable author tag set. When the host regis
549
717
 
550
718
  A host schema may declare an optional scalar binding for `string`, `number` or `boolean`. The component then accepts `bind`, `initial` and dynamic `disabled` implicitly and shares the built-in binding families: a `number` binding can pair with `<number>` or `<slider>` when its static `min`, `max` and `step` match. The host renderer receives the current `value`, a validating `setValue`, `disabled`, `resetToken`, resolved `props` and a `report` function. Host schemas remain plain data; the renderer is trusted host code and never enters a worker.
551
719
 
552
- **local-draft-3** adds `<external>` and the dynamic constraint attributes; host component forms and bindings are controlled by the host component protocol, not by the author syntax revision.
553
-
720
+ `<external>` read-only declarations and dynamic constraint attributes are part of the current revision; host component forms and bindings are governed by the host component protocol, not by the author syntax revision.
554
721
 
555
- See [local-draft-2 components and migration](local-components-v2-en.md) for new tags, colors and slot state, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the upgrade checklist. `0.6.0` is available on both the `latest` and `next` channels.
722
+ See [Versions and compatibility](../compatibility/compatibility-en.md) for version mapping and compatibility rules, and [Source revisions and migration](../compatibility/source-versioning-en.md) for the revision directive and migration tools.