reactive-md 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG-ch.md +333 -319
  2. package/CHANGELOG.md +334 -320
  3. package/CONTRIBUTING-ch.md +22 -22
  4. package/CONTRIBUTING.md +22 -22
  5. package/README-ch.md +431 -431
  6. package/README-en.md +431 -431
  7. package/README.md +429 -429
  8. package/SECURITY-ch.md +83 -83
  9. package/SECURITY.md +83 -83
  10. package/bin/reactive-md.mjs +39 -39
  11. package/cli/args.mjs +263 -263
  12. package/cli/assets.mjs +395 -395
  13. package/cli/build.mjs +445 -445
  14. package/cli/check.mjs +444 -444
  15. package/cli/document.mjs +130 -130
  16. package/cli/errors.mjs +61 -61
  17. package/cli/fs-utils.mjs +133 -133
  18. package/cli/glob.mjs +203 -203
  19. package/cli/help.mjs +323 -323
  20. package/cli/init.mjs +1577 -1577
  21. package/cli/lint.mjs +177 -177
  22. package/cli/main.mjs +65 -65
  23. package/cli/migrate.mjs +368 -368
  24. package/cli/package-loader.mjs +41 -41
  25. package/cli/package.mjs +211 -211
  26. package/dist-library/{LocalDocumentView-sthUP0ct.js → LocalDocumentView-BuqgJZEY.js} +11 -11
  27. package/dist-library/{LocalDocumentViewCore-GiWV3bey.js → LocalDocumentViewCore-DXE0I0Qc.js} +210 -209
  28. package/dist-library/{LocalReactiveDocumentCore-ZjQSGyHE.js → LocalReactiveDocumentCore-CWBe4Mm5.js} +8 -8
  29. package/dist-library/{authoring-Dsune4Hy.js → authoring-Ci_KzJ0q.js} +53 -53
  30. package/dist-library/{compile-wUv8KEge.js → compile-Dx6Uw3D9.js} +11 -11
  31. package/dist-library/{compiler-core-As_m-MNm.js → compiler-core-DDDdvuLy.js} +883 -818
  32. package/dist-library/compiler-dxLPB9Ym.js +86 -0
  33. package/dist-library/{component-state-C52ZFJGl.js → component-state-BRwvTV0d.js} +15 -14
  34. package/dist-library/component-state-CwKX_SN5.js +763 -0
  35. package/dist-library/{config-BadfhjdP.js → config-DXLvctiZ.js} +68 -66
  36. package/dist-library/config-validation-D3D7Dy2J.js +586 -0
  37. package/dist-library/{controls-CcT6n7k_.js → controls-DoZyLCrV.js} +3 -3
  38. package/dist-library/{coordinate-CWS9p5q_.js → coordinate-B1VFK9fd.js} +2 -2
  39. package/dist-library/{data-table-Bgccxd7h.js → data-table-8-3F15Jf.js} +3 -3
  40. package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
  41. package/dist-library/{display-B-VhqVND.js → display-B_uutKkN.js} +1 -1
  42. package/dist-library/{config-validation-F47AcE6o.js → document-theme-C8J6UyNO.js} +193 -731
  43. package/dist-library/{export-BqVmTXm8.js → export-CIAIPBov.js} +35 -34
  44. package/dist-library/{gallery-CY6mTx8i.js → gallery-Dv1rOvL0.js} +1 -1
  45. package/dist-library/{html-CNT4KD-2.js → html-Cr4CBwAH.js} +42 -41
  46. package/dist-library/identity-BUx0Q_-d.js +40 -0
  47. package/dist-library/{incremental-Dv0FSp_U.js → incremental-9nx92u9c.js} +12 -10
  48. package/dist-library/{layout-C0YlEPGr.js → layout-BBB2VF0S.js} +1 -1
  49. package/dist-library/{mount-preset-KxvtKgJb.js → mount-preset-DMZ5wd3t.js} +3 -3
  50. package/dist-library/observability-4KqXhIEU.js +421 -0
  51. package/dist-library/observability-core-Bcu7vpnl.js +24 -0
  52. package/dist-library/{options-1aDLK7JY.js → options-BBp9IcHm.js} +4 -4
  53. package/dist-library/{package-core-WFK1RhAZ.js → package-core-K5xesGqy.js} +30 -29
  54. package/dist-library/{parser-standard-Yuf3A_VI.js → parser-standard-CBA1-hdG.js} +352 -352
  55. package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
  56. package/dist-library/preset-core-DeZPA8IE.js +1298 -0
  57. package/dist-library/react-0DCh-Mar.js +7 -0
  58. package/dist-library/reactive-md-authoring.js +19 -19
  59. package/dist-library/reactive-md-build.js +48 -10
  60. package/dist-library/reactive-md-compiler-standard.js +6 -6
  61. package/dist-library/reactive-md-compiler.js +3 -3
  62. package/dist-library/reactive-md-default-packs.js +3 -2
  63. package/dist-library/reactive-md-default-preset.js +3 -2
  64. package/dist-library/reactive-md-export.js +4 -4
  65. package/dist-library/reactive-md-minimal-preset.js +2 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  67. package/dist-library/reactive-md-observability.js +4 -0
  68. package/dist-library/reactive-md-plugin-chart.js +3 -3
  69. package/dist-library/reactive-md-plugin-data.js +5 -5
  70. package/dist-library/reactive-md-plugin-diagram.js +4 -4
  71. package/dist-library/reactive-md-plugin-forms.js +4 -4
  72. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  73. package/dist-library/reactive-md-plugin-navigation.js +3 -3
  74. package/dist-library/reactive-md-plugin-network.js +4 -3
  75. package/dist-library/reactive-md-plugin-plot.js +4 -4
  76. package/dist-library/reactive-md-print.css +304 -304
  77. package/dist-library/reactive-md-react-minimal.js +4 -4
  78. package/dist-library/reactive-md-react-server.js +6 -6
  79. package/dist-library/reactive-md-react-unstyled.js +11 -11
  80. package/dist-library/reactive-md-react.js +11 -11
  81. package/dist-library/reactive-md-runtime-browser.js +2 -1
  82. package/dist-library/reactive-md-runtime.js +4 -3
  83. package/dist-library/reactive-md-sdk.js +8 -7
  84. package/dist-library/reactive-md-standalone-configured.js +2 -2
  85. package/dist-library/reactive-md-standalone-host.js +2 -2
  86. package/dist-library/reactive-md-testing-browser.js +2 -2
  87. package/dist-library/reactive-md-testing-react.js +6 -6
  88. package/dist-library/reactive-md-testing.js +5 -5
  89. package/dist-library/reactive-md.js +556 -367
  90. package/dist-library/{registry-B9NGct4d.js → registry-D6OGkOcX.js} +3 -3
  91. package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
  92. package/dist-library/{resources-D2GDQS0p.js → resources-B0x_w3s9.js} +71 -46
  93. package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
  94. package/dist-library/{runtime-kcA7bG7G.js → runtime-BpQdZmFI.js} +311 -305
  95. package/dist-library/{schema-BufhKUSM.js → schema-BryM_VRW.js} +14 -14
  96. package/dist-library/{sdk-core-BoJT1SIt.js → sdk-core-ChslheKs.js} +33 -32
  97. package/dist-library/{session-core-nmJHuR9c.js → session-core-dxQCJBNa.js} +15 -14
  98. package/dist-library/{shareable-DpbE-59H.js → shareable-B8xMoGEa.js} +179 -176
  99. package/dist-library/types/build/diagnostics.d.ts +1 -1
  100. package/dist-library/types/local/index.d.ts +6 -0
  101. package/dist-library/types/local/observability-codes.d.ts +2 -0
  102. package/dist-library/types/local/observability-core.d.ts +25 -0
  103. package/dist-library/types/local/observability-messages.d.ts +6 -0
  104. package/dist-library/types/local/observability.d.ts +43 -0
  105. package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
  106. package/dist-library/types/local/transport/worker.d.ts +52 -1
  107. package/dist-library/types/local/types.d.ts +8 -0
  108. package/dist-library/types/observability.d.ts +7 -0
  109. package/dist-library/{types-BeNtPqdY.js → types-Ib5kSScP.js} +1 -1
  110. package/dist-library/types-daDo2c_w.js +3 -0
  111. package/dist-library/{validation-BEBA_HvS.js → validation-B3RI0xOk.js} +251 -249
  112. package/dist-library/version-DAxuGOG2.js +147 -0
  113. package/dist-library/{visual-frame-CyV1FXzs.js → visual-frame-_rcd5HUv.js} +1 -1
  114. package/dist-library/{visuals-BZbZYA7w.js → visuals-DkDhNdEZ.js} +17 -17
  115. package/dist-standalone/reactive-md-standalone.js +118 -118
  116. package/docs/README-ch.md +101 -95
  117. package/docs/README.md +101 -95
  118. package/docs/compatibility/api-stability-ch.md +25 -0
  119. package/docs/compatibility/api-stability-en.md +25 -0
  120. package/docs/compatibility/compatibility-ch.md +146 -129
  121. package/docs/compatibility/compatibility-en.md +146 -129
  122. package/docs/compatibility/compatibility-manifest.schema.json +161 -0
  123. package/docs/compatibility/deprecation-ch.md +21 -0
  124. package/docs/compatibility/deprecation-en.md +21 -0
  125. package/docs/compatibility/source-versioning-ch.md +162 -162
  126. package/docs/compatibility/source-versioning-en.md +162 -162
  127. package/docs/compatibility/support-matrix-ch.md +108 -0
  128. package/docs/compatibility/support-matrix-en.md +108 -0
  129. package/docs/development/component-development-ch.md +66 -66
  130. package/docs/development/component-development-en.md +66 -66
  131. package/docs/development/component-development-reference-ch.md +253 -253
  132. package/docs/development/component-development-reference-en.md +238 -238
  133. package/docs/development/component-protocol-ch.md +748 -748
  134. package/docs/development/component-protocol-en.md +750 -750
  135. package/docs/development/extension-tutorial-ch.md +308 -308
  136. package/docs/development/extension-tutorial-en.md +308 -308
  137. package/docs/development/performance-overview-ch.md +422 -422
  138. package/docs/development/performance-overview-en.md +422 -422
  139. package/docs/guides/local-guide-ch.md +532 -532
  140. package/docs/guides/local-guide-en.md +532 -532
  141. package/docs/integration/author-tools-ch.md +64 -64
  142. package/docs/integration/author-tools-en.md +64 -64
  143. package/docs/integration/compiler-ch.md +49 -49
  144. package/docs/integration/compiler-en.md +36 -36
  145. package/docs/integration/directory-discovery-en.md +1 -1
  146. package/docs/integration/editor-ch.md +295 -295
  147. package/docs/integration/editor-en.md +303 -303
  148. package/docs/integration/extension-sdk-ch.md +394 -394
  149. package/docs/integration/extension-sdk-en.md +379 -379
  150. package/docs/integration/local-integration-ch.md +646 -646
  151. package/docs/integration/local-integration-en.md +662 -662
  152. package/docs/integration/shareable-export-ch.md +307 -307
  153. package/docs/integration/shareable-export-en.md +309 -309
  154. package/docs/reference/diagnostics-counting-ch.md +104 -104
  155. package/docs/reference/diagnostics-counting-en.md +104 -104
  156. package/docs/reference/html-compatibility-ch.md +93 -93
  157. package/docs/reference/html-compatibility-en.md +95 -95
  158. package/docs/reference/local-interaction-syntax-ch.md +724 -724
  159. package/docs/reference/local-interaction-syntax-en.md +722 -722
  160. package/docs/reference/public-api-ch.md +33 -4
  161. package/docs/reference/public-api-en.md +33 -4
  162. package/docs/reference/theme-protocol-ch.md +198 -198
  163. package/docs/reference/theme-protocol-en.md +217 -217
  164. package/docs/releases/release-0.4.0-ch.md +91 -91
  165. package/docs/releases/release-0.4.0-en.md +91 -91
  166. package/docs/releases/release-0.4.1-ch.md +25 -25
  167. package/docs/releases/release-0.4.1-en.md +25 -25
  168. package/docs/releases/release-0.5.0-ch.md +43 -43
  169. package/docs/releases/release-0.5.0-en.md +43 -43
  170. package/docs/releases/release-0.5.1-ch.md +41 -41
  171. package/docs/releases/release-0.5.1-en.md +41 -41
  172. package/docs/releases/release-0.5.2-ch.md +37 -37
  173. package/docs/releases/release-0.5.2-en.md +37 -37
  174. package/docs/releases/release-0.5.3-ch.md +26 -26
  175. package/docs/releases/release-0.5.3-en.md +26 -26
  176. package/docs/releases/release-0.6.0-ch.md +59 -59
  177. package/docs/releases/release-0.6.0-en.md +59 -59
  178. package/docs/releases/release-0.6.1-ch.md +29 -29
  179. package/docs/releases/release-0.6.1-en.md +29 -29
  180. package/docs/releases/release-0.7.0-ch.md +86 -86
  181. package/docs/releases/release-0.7.0-en.md +86 -86
  182. package/docs/releases/release-0.9.2-ch.md +33 -0
  183. package/docs/releases/release-0.9.2-en.md +33 -0
  184. package/examples/component-package/README-ch.md +101 -101
  185. package/examples/component-package/README.md +133 -133
  186. package/examples/conformance/README-ch.md +55 -55
  187. package/examples/conformance/README.md +55 -55
  188. package/examples/conformance/component-protocol-1.json +482 -482
  189. package/examples/conformance/component-protocol-1.schema.json +76 -76
  190. package/examples/conformance/local-draft-1.json +50 -50
  191. package/examples/conformance/local-draft-2.json +212 -212
  192. package/examples/game-2048-package/LICENSE +21 -21
  193. package/examples/game-2048-package/NOTICES.md +11 -11
  194. package/examples/game-2048-package/README-ch.md +91 -91
  195. package/examples/game-2048-package/README.md +98 -98
  196. package/examples/game-2048-package/package.json +35 -35
  197. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  198. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  199. package/examples/game-2048-package/scripts/build.mjs +130 -130
  200. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  201. package/examples/game-2048-package/src/component.css +161 -161
  202. package/examples/game-2048-package/src/components.tsx +326 -326
  203. package/examples/game-2048-package/src/game-engine.ts +228 -228
  204. package/examples/game-2048-package/src/harness.tsx +34 -34
  205. package/examples/game-2048-package/src/manifest.ts +85 -85
  206. package/examples/game-2048-package/src/node-entry.ts +30 -30
  207. package/examples/game-2048-package/src/sample.ts +4 -4
  208. package/examples/game-2048-package/tsconfig.json +15 -15
  209. package/examples/integration/README-ch.md +82 -82
  210. package/examples/integration/README.md +82 -82
  211. package/examples/integration/core/index.mjs +32 -32
  212. package/examples/integration/extension-sdk/README-ch.md +24 -24
  213. package/examples/integration/extension-sdk/README.md +24 -24
  214. package/examples/integration/worker/index.html +19 -19
  215. package/examples/integration/worker/main.js +61 -61
  216. package/examples/integration/worker/package.json +13 -13
  217. package/examples/integration/worker/worker.js +3 -3
  218. package/examples/local/README-ch.md +76 -76
  219. package/examples/local/README.md +76 -76
  220. package/examples/local/charts.reactive.md +73 -73
  221. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  222. package/examples/local/recipes/invoice.reactive.md +36 -36
  223. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  224. package/examples/local/recipes/workshop.reactive.md +33 -33
  225. package/examples/local/showcase/README-ch.md +22 -22
  226. package/examples/local/showcase/README.md +31 -31
  227. package/examples/local/showcase/explore.reactive.md +102 -102
  228. package/examples/local/showcase/flow.reactive.md +86 -86
  229. package/examples/local/showcase/forms.reactive.md +126 -126
  230. package/examples/local/showcase/functions.reactive.md +119 -119
  231. package/examples/local/showcase/layout.reactive.md +100 -100
  232. package/examples/local/showcase/statistics.reactive.md +108 -108
  233. package/examples/local/showcase/tasks.reactive.md +89 -89
  234. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  235. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  236. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  237. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  238. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  239. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  240. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  241. package/examples/minimal-extension/README-ch.md +78 -78
  242. package/examples/minimal-extension/README.md +78 -78
  243. package/examples/minimal-extension/index.html +15 -15
  244. package/examples/minimal-extension/package.json +26 -26
  245. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  246. package/examples/minimal-extension/scripts/build.mjs +32 -32
  247. package/examples/minimal-extension/scripts/export.mjs +72 -72
  248. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  249. package/examples/minimal-extension/src/extension.tsx +90 -90
  250. package/examples/minimal-extension/src/preview.tsx +12 -12
  251. package/examples/minimal-extension/src/source.ts +4 -4
  252. package/examples/minimal-extension/tsconfig.json +14 -14
  253. package/examples/sci-fi-theme/README-ch.md +133 -133
  254. package/examples/sci-fi-theme/README.md +148 -148
  255. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  256. package/examples/sci-fi-theme/demo/demo.css +638 -638
  257. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  258. package/examples/sci-fi-theme/demo/index.html +13 -13
  259. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  260. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  261. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  262. package/examples/sci-fi-theme/package.json +28 -28
  263. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  264. package/examples/sci-fi-theme/src/components.css +2370 -2370
  265. package/examples/sci-fi-theme/src/index.ts +6 -6
  266. package/examples/sci-fi-theme/src/notch.css +142 -142
  267. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  268. package/examples/sci-fi-theme/src/theme.ts +39 -39
  269. package/examples/sci-fi-theme/tsconfig.json +20 -20
  270. package/examples/sci-fi-theme/vite.config.ts +24 -24
  271. package/examples/tetris-package/LICENSE +21 -21
  272. package/examples/tetris-package/NOTICES.md +11 -11
  273. package/examples/tetris-package/README-ch.md +91 -91
  274. package/examples/tetris-package/README.md +95 -95
  275. package/examples/tetris-package/package.json +35 -35
  276. package/examples/tetris-package/sample/document.reactive.md +16 -16
  277. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  278. package/examples/tetris-package/scripts/build.mjs +130 -130
  279. package/examples/tetris-package/scripts/verify.mjs +173 -173
  280. package/examples/tetris-package/src/component.css +145 -145
  281. package/examples/tetris-package/src/components.tsx +334 -334
  282. package/examples/tetris-package/src/harness.tsx +34 -34
  283. package/examples/tetris-package/src/manifests.ts +93 -93
  284. package/examples/tetris-package/src/node-entry.ts +16 -16
  285. package/examples/tetris-package/src/sample.ts +4 -4
  286. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  287. package/examples/tetris-package/tsconfig.json +15 -15
  288. package/package.json +7 -1
  289. package/dist-library/compiler-eOfcinZs.js +0 -62
  290. package/dist-library/component-state-BoLCGee4.js +0 -801
  291. package/dist-library/preset-core-CKc5YXSM.js +0 -1443
  292. package/dist-library/react-D5iGiUdL.js +0 -7
@@ -1,129 +1,146 @@
1
- # Versions and compatibility
2
-
3
- **English** · [中文](compatibility-ch.md)
4
-
5
- Reactive MD is currently a 0.x preview. This page covers package versions, syntax versions, what can be persisted, the diagnostics contract and the current platform scope. See [Source revisions and migration](source-versioning-en.md) for explicit revision declarations, the migration API and `reactive-md migrate`, [Local mode integration](../integration/local-integration-en.md) for the public API and style integration, the [0.9.1 release notes](../releases/release-0.9.1-en.md) for this release, the [0.9.0 release notes](../releases/release-0.9.0-en.md) for the previous release, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for that minor series.
6
-
7
- ## Version mapping
8
-
9
- | Item | Current value | Notes |
10
- | --- | --- | --- |
11
- | Package version | `0.9.1` | Stable release, 2026-11-22 |
12
- | Distribution tags | `latest`: `0.9.1` | `next` is maintained independently; query npm when selecting that channel |
13
- | SDK contract | `0.7.0` | `LOCAL_SDK_VERSION`; independent of the package version and unchanged by `0.9.1` |
14
- | Syntax version | `local-draft-3` | `LOCAL_SYNTAX_VERSION`; this revision is the only one accepted by the package |
15
- | Source revision directive | Optional `<!-- reactive-md: local-draft-3 -->` | One line in the document prologue; unversioned source keeps current-revision behavior |
16
- | Component protocol | `component-protocol-3` | Contribution and acceptance contract, see [Component protocol](../development/component-protocol-en.md); not a runtime version selection parameter |
17
- | Theme protocol | `reactive-md-theme-1` | Document themes and host CSS integration |
18
- | Authoring entry | `reactive-md/authoring` | Schema, catalog and editor helpers, without React or CSS |
19
- | Unstyled React entry | `reactive-md/react/unstyled` | React renderer without a stylesheet dependency |
20
- | Core entry | `reactive-md` | Compilation, expressions and runtime, without loading React |
21
- | React entry | `reactive-md/react` | `LocalReactiveDocument`, `LocalDocumentView` |
22
- | Editor entry | `reactive-md-editor` | `ReactiveMarkdownEditor` and its types in the separate `0.2.0` package for the `0.9.x` engine series; requires React 19. Engine 0.8 and later no longer export `reactive-md/editor` |
23
- | Renderer style entry | `reactive-md/styles.css` | Document and component styles, explicitly imported by the host |
24
- | Screen style entry | `reactive-md/screen.css` | Alias of `reactive-md/styles.css` |
25
- | Print style entry | `reactive-md/print.css` | Optional document print layout and page margins |
26
- | Editor style entry | `reactive-md-editor/styles.css` | Independent editor styles, scoped to the editor root |
27
-
28
- One package version corresponds to exactly one syntax revision. Before upgrading the package, record the `LOCAL_SYNTAX_VERSION` your application uses. If document sources come from another syntax revision, keep rendering them with the old package version or rewrite them according to the migration notes below. `compileLocal(source, options?)` has no syntax version parameter; hosts can adjust the syntax node budget for a single compilation through `options.limits.maxSyntaxNodes`, see [Local mode integration](../integration/local-integration-en.md).
29
-
30
- ## Explicit source revisions
31
-
32
- A source may declare its revision with one `<!-- reactive-md: local-draft-3 -->` line in the prologue. Unversioned source is read as the current revision, without a new warning. An explicit older (for example `local-draft-1` or `local-draft-2`) or unknown revision is rejected with a `local.version.*` diagnostic and no runtime is created; declaring an old revision does not select an old parser. Malformed, duplicate and misplaced directives are rejected the same way.
33
-
34
- Readers built before this directive existed, including `0.3.1`, treat it as an ordinary comment and do not enforce the check. Migrate old documents before relying on it. `inspectLocalSourceVersion`, `checkLocalUpgrade` and `migrateLocalSource` expose the declaration outside the compiler, and `reactive-md migrate` performs the single-source metadata migration. See [Source revisions and migration](source-versioning-en.md).
35
-
36
- ## Compatibility rules for 0.x
37
-
38
- - Minor versions (`0.3` to `0.4`) may contain breaking changes; patch versions contain only compatibility and security fixes.
39
- - The 0.x phase does not promise a fixed deprecation period. Every breaking change is recorded in the [changelog](../../CHANGELOG.md), with the old form, new form and migration steps.
40
- - Before 1.0, treat every upgrade as potentially requiring changes to document sources or host code.
41
- - Applications should pin the package version, keep the original `.reactive.md` sources, and rerun compile and render checks with their own documents and examples after upgrading.
42
-
43
- ## Core semantic compatibility
44
-
45
- Within a syntax revision, compatible package updates preserve the meaning of accepted source:
46
-
47
- - Controls keep their public value types, initial-value rules, shared-binding constraints and validation rules. Hidden controls still initialize, and showing them again does not reset their values.
48
- - Expressions keep strict operand types, operator precedence, short-circuit evaluation and finite-number rules. A failed local calculation does not replace a valid input or stop unrelated content.
49
- - Invalid parameter writes leave the last valid state unchanged; multi-value writes commit atomically. Panel reset restores its own controls and component state, and dependent content updates consistently.
50
- - Prose, formulas and visualizations read the same parameter values. Code and inert fallback regions stay literal. Source locations remain one-based with UTF-16 offsets and half-open ranges.
51
- - Rendered content, control labels and interactions are semantic outputs. Generated node/DOM IDs, internal `@` keys, AST layout, caches, pixel layout and diagnostic wording are outside the stable source contract.
52
-
53
- From `local-draft-1` to `local-draft-2`, this promise covers the common supported language after upgrade checks. New reserved identifiers and newly active tags require manual source changes. Text-length counting is an explicit compatibility exception that the migrator requires you to accept; completed-checklist styling is a visual exception. A semantic change outside these recorded exceptions requires a syntax revision and migration notes.
54
-
55
- Regression data in [the historical corpus](../../examples/conformance/history/v0.3.1/provenance.json) preserves actual `v0.3.1` sources, their source commit and SHA256 digests. The regression suite checks the original conformance expectations, public values, rejected writes, initialization, resets and migration rendering. Internal IDs are excluded from comparisons.
56
-
57
- ## Breaking changes and migration
58
-
59
- `0.5.0` added the `reactive-md/editor` entry and its independent stylesheet. `0.5.1` adds editor views, theme palettes and HTML compatibility. They keep `local-draft-2`, `component-protocol-1` and `reactive-md-theme-1`. Existing `reactive-md`, `reactive-md/react` and `reactive-md/styles.css` imports keep working, and documents written for 0.4.x need no migration. The editor requires React 19; see the [editor guide](../integration/editor-en.md) for its history and rendering boundaries.
60
-
61
- `0.6.1` switches formula display to KaTeX with bundled WOFF2 fonts and accessible MathML. Plot evaluation and protocol revisions are unchanged. Invalid formulas fall back to bounded source text with a warning. `align` now numbers rows; use `align*` or `aligned` to omit automatic numbers. See the [0.6.1 release notes](../releases/release-0.6.1-en.md).
62
-
63
- `0.8.0` moves the source editor out of the engine package. Replace `reactive-md/editor` with `reactive-md-editor`, `reactive-md/editor/codemirror` with `reactive-md-editor/codemirror`, and the matching `styles.css` imports. Install `reactive-md-editor@0.1.0` separately; it requires React 19 and is published after the engine. Syntax `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the `0.7.0` SDK contract are unchanged, so document sources and state files need no migration. The new compiler entries, runtime services and Vite directory discovery are additive. See the [0.8.0 release notes](../releases/release-0.8.0-en.md).
64
-
65
- `0.7.0` establishes `local-draft-3` and raises the component protocol to `component-protocol-3`. `local-draft-3` adds `<external>` read-only declarations and dynamic `min`/`max`/`required` constraints; `component-protocol-3` adds host inline/container forms and scalar bindings. Explicit `local-draft-1` and `local-draft-2` declarations are rejected; use `reactive-md migrate` before upgrading, and note that migration from `local-draft-2` blocks newly active `<external>` tags. The editor uses CM6 only, removes `textareaRef` / `getTextarea`, and keeps `reactive-md/editor/codemirror` as an alias. The public extension SDK ships in this release. See the [0.7.0 release notes](../releases/release-0.7.0-en.md).
66
-
67
- `0.6.0` adds native HTML tables, `align` and link `target`/`rel`, more math environments and commands, mhchem chemistry and expanded code highlighting, and switches diagrams to a layered layout. Unparseable native HTML now falls back to source. `compileLocal` returns only plain objects and arrays, and the editor adds `insertText`. Syntax, component and theme revisions remain unchanged, and existing imports keep working. See the [0.6.0 release notes](../releases/release-0.6.0-en.md).
68
-
69
- `0.5.3` adds host authoring tools, consistent compile options, math fallback diagnostics and separate screen/print stylesheets. Existing entries remain available; import `reactive-md/print.css` explicitly for document print layout. Syntax, component and theme revisions remain unchanged. See the [0.5.3 release notes](../releases/release-0.5.3-en.md).
70
-
71
- `0.5.2` adds the opt-in host component extension axis and raises the component protocol to `component-protocol-2`. The syntax revision and theme protocol remain unchanged, existing imports keep working, and documents written for 0.5.x need no migration. See the [0.5.2 release notes](../releases/release-0.5.2-en.md).
72
-
73
- `0.4.0` adds [constraints and collections](../reference/local-interaction-syntax-en.md): `LocalRuntime.validate()`, serializable `LocalValidation` rules, numeric arrays and generated tables. Hosts implementing a runtime adapter need the new `validate()` method; exhaustive value-kind checks need `number-array`. Rename bindings colliding with `sum`, `average`, `minOf` or `maxOf`.
74
-
75
- `0.4.0` adds [named calculations and formatting functions](../reference/local-interaction-syntax-en.md). `computed`/`const` use the existing local tag syntax. The new built-in function names become reserved; rename colliding input bindings and their references before using this release. `document.bindings` and `initialState` still contain writable controls; snapshots also expose successful calculated values.
76
-
77
- `0.4.0` establishes `local-draft-2`. Unversioned source that uses supported `local-draft-1` forms remains valid; an explicit `local-draft-1` declaration is rejected until migrated. The build now recognizes 15 additional tag names: the ten `local-draft-2` components plus `computed`, `const`, `validation`, `data-table` and `column`. Text that previously displayed as an unknown or literal tag now parses as a component or declaration; move literal examples into code spans or fences. The leading `<theme>` declaration is document metadata and is not counted as a component. See [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the complete rename and upgrade checklist.
78
-
79
- Author-visible syntax changes establish a new syntax revision, such as `local-draft-3`, and raise the minor version and update `LOCAL_SYNTAX_VERSION`. Changes to the core or React API are also recorded in the changelog. The project does not rewrite document bodies automatically. `reactive-md migrate` moves one source's metadata declaration and blocks body-level conflicts; after upgrading, authors or hosts complete any remaining source changes according to the record.
80
-
81
- Legacy configuration syntax is not part of `local-draft-3`. Common replacements:
82
-
83
- | Old form | What to do in `local-draft-3` |
84
- | --- | --- |
85
- | Directives such as `:::card`, `:::row` | Tags such as `<card>`, `<grid>` |
86
- | YAML `state:` declaring parameters | `bind` and `initial` on controls |
87
- | YAML `computed:` | `{{ expression }}` in the prose |
88
- | `actions:`, button actions, `on-*` events | No equivalent entry point; use component built-in interactions and panel reset |
89
- | `data:` or external API data | Markdown tables written directly in the prose; parameters are declared by controls |
90
- | Persisted runtime state | The host saves the original source. Public parameters may additionally be exported as a validated `reactive-md-state/v1` file; it is tied to the source digest, syntax revision and exact public parameter set and is not a document format. |
91
-
92
- ## What to persist
93
-
94
- Persist the original `.reactive.md` source. A `reactive-md-state/v1` file may preserve public parameter values for the same source and syntax revision; it is rejected when the digest, revision or parameter set differs. Migration changes the source digest, so export a fresh state file after migrating; migration never rewrites state files. Do not persist `LocalDocument`, `LocalNode`, `node.id`, `initialState`, `LocalSnapshot` or internal `@` runtime keys: they belong to the current runtime object and their structure and field meanings are not guaranteed across versions. `node.id` is regenerated when the source changes. Diagnostic line numbers, columns and offsets locate the current source and are not stable persistence identifiers.
95
-
96
- ## Diagnostics contract
97
-
98
- `Diagnostic` contains `code`, `message`, `severity`, `range`, `line` and `column`.
99
-
100
- - Lines and columns are one-based. Columns and half-open ranges count UTF-16 code units in the original source.
101
- - `line`, `column` and `range` can be used for programmatic location and editor jumps.
102
- - `code` is a string identifier, such as `local.type`, `expression-type` or `latex-plot-range`. Existing codes keep their meaning within one 0.x minor series. New codes may be added; removal, renaming or a change of meaning requires a new minor version and migration notes.
103
- - `message` contains default English display text. Use `formatLocalDiagnostic(diagnostic, 'zh')` for Chinese. Wording may improve; do not parse messages or make business decisions based on their complete text. Language changes preserve machine fields.
104
- - `severity` is `warning` or `error`. Structurally complete unknown tags keep their source and produce fallback warnings, and compilation can still succeed; footnotes render normally. Compile errors make `result.ok` `false` and disable the preview. Runtime local errors affect only the corresponding content.
105
-
106
- See [Diagnostics and counting rules](../reference/diagnostics-counting-en.md) for units and resource-budget scopes.
107
-
108
- ## Platforms and runtimes
109
-
110
- | Environment | Current status |
111
- | --- | --- |
112
- | Node.js 22.12+ | Minimum for development and Node-side consumption; CI targets both 22.12 and 24 |
113
- | ESM | The only module format; no CommonJS entry |
114
- | React 19 | Required by `reactive-md/react` and the separate `reactive-md-editor` package; the core entry does not depend on React |
115
- | Vite 8 | Optional peer of `reactive-md`, required only when using `reactive-md/vite` |
116
- | Microsoft Edge (Chromium-based) | Local browser verification has used Edge |
117
- | Playwright Chromium | Full Linux CI browser suite |
118
- | Playwright Firefox and WebKit | Core workflows at 1280px and 375px, including personal documents and interactive HTML export; included in the browser release gate and CI |
119
- | Safari on Apple devices | Device testing remains separate from Playwright WebKit engine checks |
120
- | Shareable state format | `reactive-md-state/v1`: public parameter values with a syntax version and source digest; see [Shareable documents](../integration/shareable-export-en.md) |
121
- | Single-file HTML format | `reactive-md-html/v1`: interactive or static export, with an inline standalone runtime only in interactive mode |
122
- | SSR | `react-dom/server` static rendering is covered by the packed check. The editor entry has no top-level DOM access and can be imported and rendered on the server; editing interactions run on the client. Static-first hydration of the single-file export is covered in Playwright Chromium/Edge; general SSR hydration is unverified and should be checked before use |
123
-
124
- Node-side consumption means importing `reactive-md` in Node and calling `compileLocal` and `createLocalRuntime` without a DOM. React rendering requires a browser environment, or the host must handle server output itself.
125
-
126
- See the [syntax specification](../reference/local-interaction-syntax-en.md) for the language scope, and the [security policy](../../SECURITY.md) for the security boundary and host responsibilities.
127
-
128
-
129
- See the [syntax specification](../reference/local-interaction-syntax-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.9.1` uses the `latest` channel.
1
+ # Versions and compatibility
2
+
3
+ **English** · [中文](compatibility-ch.md)
4
+
5
+ Reactive MD is currently a 0.x preview. This page covers package versions, syntax versions, what can be persisted, the diagnostics contract and the current platform scope. See [Source revisions and migration](source-versioning-en.md) for explicit revision declarations, the migration API and `reactive-md migrate`, [Local mode integration](../integration/local-integration-en.md) for the public API and style integration, the [0.9.2 release notes](../releases/release-0.9.2-en.md) for this release, the [0.9.1 release notes](../releases/release-0.9.1-en.md) for the previous release, the [0.9.0 release notes](../releases/release-0.9.0-en.md), and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for that minor series.
6
+
7
+ ## Version mapping
8
+
9
+ | Item | Current value | Notes |
10
+ | --- | --- | --- |
11
+ | Package version | `0.9.2` | Stable release, 2026-11-23 |
12
+ | Distribution tags | `latest`: `0.9.2` | `next` is maintained independently; query npm when selecting that channel |
13
+ | SDK contract | `0.7.0` | `LOCAL_SDK_VERSION`; independent of the package version and unchanged by `0.9.2` |
14
+ | Syntax version | `local-draft-3` | `LOCAL_SYNTAX_VERSION`; this revision is the only one accepted by the package |
15
+ | Source revision directive | Optional `<!-- reactive-md: local-draft-3 -->` | One line in the document prologue; unversioned source keeps current-revision behavior |
16
+ | Component protocol | `component-protocol-3` | Contribution and acceptance contract, see [Component protocol](../development/component-protocol-en.md); not a runtime version selection parameter |
17
+ | Theme protocol | `reactive-md-theme-1` | Document themes and host CSS integration |
18
+ | Authoring entry | `reactive-md/authoring` | Schema, catalog and editor helpers, without React or CSS |
19
+ | Unstyled React entry | `reactive-md/react/unstyled` | React renderer without a stylesheet dependency |
20
+ | Core entry | `reactive-md` | Compilation, expressions and runtime, without loading React |
21
+ | React entry | `reactive-md/react` | `LocalReactiveDocument`, `LocalDocumentView` |
22
+ | Editor entry | `reactive-md-editor` | `ReactiveMarkdownEditor` and its types in the separate `0.2.1` package for the `^0.9.2` engine series; requires React 19. Engine 0.8 and later no longer export `reactive-md/editor` |
23
+ | Renderer style entry | `reactive-md/styles.css` | Document and component styles, explicitly imported by the host |
24
+ | Screen style entry | `reactive-md/screen.css` | Alias of `reactive-md/styles.css` |
25
+ | Print style entry | `reactive-md/print.css` | Optional document print layout and page margins |
26
+ | Editor style entry | `reactive-md-editor/styles.css` | Independent editor styles, scoped to the editor root |
27
+ | Machine-readable manifest | [compatibility-manifest.json](https://github.com/yao1145/ReactiveMD/blob/main/docs/compatibility/compatibility-manifest.json) | Cross-package versions, protocols, Demo candidates, runtime versions and the recommended install set. See the [schema](compatibility-manifest.schema.json). Run `npm run compatibility:verify` to check the manifest. |
28
+
29
+ The same identities are recorded in the machine-readable manifest, validated against its JSON Schema, and checked against the engine constants, installed runtime versions, the editor package and the Demo tarballs. Declared ranges and tested versions are stored separately.
30
+
31
+ | Editor | Engine peer | Paired engine |
32
+ | --- | --- | --- |
33
+ | `0.2.1` | `^0.9.2` | `0.9.2` |
34
+ | `0.2.0` | `^0.9.0` | `0.9.1` (previous verified pair) |
35
+
36
+ Run `npm run compatibility:verify` from the engine repository before a paired release. Publish the engine artifact listed in the manifest first. Compare its npm integrity value with the candidate pinned by the editor, then publish the editor.
37
+
38
+ One package version corresponds to exactly one syntax revision. Before upgrading the package, record the `LOCAL_SYNTAX_VERSION` your application uses. If document sources come from another syntax revision, keep rendering them with the old package version or rewrite them according to the migration notes below. `compileLocal(source, options?)` has no syntax version parameter; hosts can adjust the syntax node budget for a single compilation through `options.limits.maxSyntaxNodes`, see [Local mode integration](../integration/local-integration-en.md).
39
+
40
+ ## Explicit source revisions
41
+
42
+ A source may declare its revision with one `<!-- reactive-md: local-draft-3 -->` line in the prologue. Unversioned source is read as the current revision, without a new warning. An explicit older (for example `local-draft-1` or `local-draft-2`) or unknown revision is rejected with a `local.version.*` diagnostic and no runtime is created; declaring an old revision does not select an old parser. Malformed, duplicate and misplaced directives are rejected the same way.
43
+
44
+ Readers built before this directive existed, including `0.3.1`, treat it as an ordinary comment and do not enforce the check. Migrate old documents before relying on it. `inspectLocalSourceVersion`, `checkLocalUpgrade` and `migrateLocalSource` expose the declaration outside the compiler, and `reactive-md migrate` performs the single-source metadata migration. See [Source revisions and migration](source-versioning-en.md).
45
+
46
+ ## Compatibility rules for 0.x
47
+
48
+ - A 0.x minor release can break compatibility under the deprecation policy. Patch releases preserve existing stable contracts and may add compatible capabilities and fixes.
49
+ - The [stable public API](api-stability-en.md) defines the supported entry points, types and protocols of both packages.
50
+ - The [deprecation and migration policy](deprecation-en.md) defines announcements, notice periods, removal releases and migration records.
51
+ - Applications should pin the package version, keep the original `.reactive.md` sources, and rerun compile and render checks with their own documents and examples after upgrading.
52
+
53
+ ## Core semantic compatibility
54
+
55
+ Within a syntax revision, compatible package updates preserve the meaning of accepted source:
56
+
57
+ - Controls keep their public value types, initial-value rules, shared-binding constraints and validation rules. Hidden controls still initialize, and showing them again does not reset their values.
58
+ - Expressions keep strict operand types, operator precedence, short-circuit evaluation and finite-number rules. A failed local calculation does not replace a valid input or stop unrelated content.
59
+ - Invalid parameter writes leave the last valid state unchanged; multi-value writes commit atomically. Panel reset restores its own controls and component state, and dependent content updates consistently.
60
+ - Prose, formulas and visualizations read the same parameter values. Code and inert fallback regions stay literal. Source locations remain one-based with UTF-16 offsets and half-open ranges.
61
+ - Rendered content, control labels and interactions are semantic outputs. Generated node/DOM IDs, internal `@` keys, AST layout, caches, pixel layout and diagnostic wording are outside the stable source contract.
62
+
63
+ From `local-draft-1` to `local-draft-2`, this promise covers the common supported language after upgrade checks. New reserved identifiers and newly active tags require manual source changes. Text-length counting is an explicit compatibility exception that the migrator requires you to accept; completed-checklist styling is a visual exception. A semantic change outside these recorded exceptions requires a syntax revision and migration notes.
64
+
65
+ Regression data in [the historical corpus](../../examples/conformance/history/v0.3.1/provenance.json) preserves actual `v0.3.1` sources, their source commit and SHA256 digests. The regression suite checks the original conformance expectations, public values, rejected writes, initialization, resets and migration rendering. Internal IDs are excluded from comparisons.
66
+
67
+ ## Breaking changes and migration
68
+
69
+ `0.5.0` added the `reactive-md/editor` entry and its independent stylesheet. `0.5.1` adds editor views, theme palettes and HTML compatibility. They keep `local-draft-2`, `component-protocol-1` and `reactive-md-theme-1`. Existing `reactive-md`, `reactive-md/react` and `reactive-md/styles.css` imports keep working, and documents written for 0.4.x need no migration. The editor requires React 19; see the [editor guide](../integration/editor-en.md) for its history and rendering boundaries.
70
+
71
+ `0.6.1` switches formula display to KaTeX with bundled WOFF2 fonts and accessible MathML. Plot evaluation and protocol revisions are unchanged. Invalid formulas fall back to bounded source text with a warning. `align` now numbers rows; use `align*` or `aligned` to omit automatic numbers. See the [0.6.1 release notes](../releases/release-0.6.1-en.md).
72
+
73
+ `0.8.0` moves the source editor out of the engine package. Replace `reactive-md/editor` with `reactive-md-editor`, `reactive-md/editor/codemirror` with `reactive-md-editor/codemirror`, and the matching `styles.css` imports. Install `reactive-md-editor@0.1.0` separately; it requires React 19 and is published after the engine. Syntax `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the `0.7.0` SDK contract are unchanged, so document sources and state files need no migration. The new compiler entries, runtime services and Vite directory discovery are additive. See the [0.8.0 release notes](../releases/release-0.8.0-en.md).
74
+
75
+ `0.7.0` establishes `local-draft-3` and raises the component protocol to `component-protocol-3`. `local-draft-3` adds `<external>` read-only declarations and dynamic `min`/`max`/`required` constraints; `component-protocol-3` adds host inline/container forms and scalar bindings. Explicit `local-draft-1` and `local-draft-2` declarations are rejected; use `reactive-md migrate` before upgrading, and note that migration from `local-draft-2` blocks newly active `<external>` tags. The editor uses CM6 only, removes `textareaRef` / `getTextarea`, and keeps `reactive-md/editor/codemirror` as an alias. The public extension SDK ships in this release. See the [0.7.0 release notes](../releases/release-0.7.0-en.md).
76
+
77
+ `0.6.0` adds native HTML tables, `align` and link `target`/`rel`, more math environments and commands, mhchem chemistry and expanded code highlighting, and switches diagrams to a layered layout. Unparseable native HTML now falls back to source. `compileLocal` returns only plain objects and arrays, and the editor adds `insertText`. Syntax, component and theme revisions remain unchanged, and existing imports keep working. See the [0.6.0 release notes](../releases/release-0.6.0-en.md).
78
+
79
+ `0.5.3` adds host authoring tools, consistent compile options, math fallback diagnostics and separate screen/print stylesheets. Existing entries remain available; import `reactive-md/print.css` explicitly for document print layout. Syntax, component and theme revisions remain unchanged. See the [0.5.3 release notes](../releases/release-0.5.3-en.md).
80
+
81
+ `0.5.2` adds the opt-in host component extension axis and raises the component protocol to `component-protocol-2`. The syntax revision and theme protocol remain unchanged, existing imports keep working, and documents written for 0.5.x need no migration. See the [0.5.2 release notes](../releases/release-0.5.2-en.md).
82
+
83
+ `0.4.0` adds [constraints and collections](../reference/local-interaction-syntax-en.md): `LocalRuntime.validate()`, serializable `LocalValidation` rules, numeric arrays and generated tables. Hosts implementing a runtime adapter need the new `validate()` method; exhaustive value-kind checks need `number-array`. Rename bindings colliding with `sum`, `average`, `minOf` or `maxOf`.
84
+
85
+ `0.4.0` adds [named calculations and formatting functions](../reference/local-interaction-syntax-en.md). `computed`/`const` use the existing local tag syntax. The new built-in function names become reserved; rename colliding input bindings and their references before using this release. `document.bindings` and `initialState` still contain writable controls; snapshots also expose successful calculated values.
86
+
87
+ `0.4.0` establishes `local-draft-2`. Unversioned source that uses supported `local-draft-1` forms remains valid; an explicit `local-draft-1` declaration is rejected until migrated. The build now recognizes 15 additional tag names: the ten `local-draft-2` components plus `computed`, `const`, `validation`, `data-table` and `column`. Text that previously displayed as an unknown or literal tag now parses as a component or declaration; move literal examples into code spans or fences. The leading `<theme>` declaration is document metadata and is not counted as a component. See [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the complete rename and upgrade checklist.
88
+
89
+ Author-visible syntax changes establish a new syntax revision, such as `local-draft-3`, and raise the minor version and update `LOCAL_SYNTAX_VERSION`. Changes to the core or React API are also recorded in the changelog. The project does not rewrite document bodies automatically. `reactive-md migrate` moves one source's metadata declaration and blocks body-level conflicts; after upgrading, authors or hosts complete any remaining source changes according to the record.
90
+
91
+ Legacy configuration syntax is not part of `local-draft-3`. Common replacements:
92
+
93
+ | Old form | What to do in `local-draft-3` |
94
+ | --- | --- |
95
+ | Directives such as `:::card`, `:::row` | Tags such as `<card>`, `<grid>` |
96
+ | YAML `state:` declaring parameters | `bind` and `initial` on controls |
97
+ | YAML `computed:` | `{{ expression }}` in the prose |
98
+ | `actions:`, button actions, `on-*` events | No equivalent entry point; use component built-in interactions and panel reset |
99
+ | `data:` or external API data | Markdown tables written directly in the prose; parameters are declared by controls |
100
+ | Persisted runtime state | The host saves the original source. Public parameters may additionally be exported as a validated `reactive-md-state/v1` file; it is tied to the source digest, syntax revision and exact public parameter set and is not a document format. |
101
+
102
+ ## What to persist
103
+
104
+ Persist the original `.reactive.md` source. A `reactive-md-state/v1` file may preserve public parameter values for the same source and syntax revision; it is rejected when the digest, revision or parameter set differs. Migration changes the source digest, so export a fresh state file after migrating; migration never rewrites state files. Do not persist `LocalDocument`, `LocalNode`, `node.id`, `initialState`, `LocalSnapshot` or internal `@` runtime keys: they belong to the current runtime object and their structure and field meanings are not guaranteed across versions. `node.id` is regenerated when the source changes. Diagnostic line numbers, columns and offsets locate the current source and are not stable persistence identifiers.
105
+
106
+ ## Diagnostics contract
107
+
108
+ `Diagnostic` contains `code`, `message`, `severity`, `range`, `line` and `column`. Optional fields include `phase`, `recoverable` and structured `details`. Hosts can use `recoverable` to determine whether the current operation can continue.
109
+
110
+ - Lines and columns are one-based. Columns and half-open ranges count UTF-16 code units in the original source.
111
+ - `line`, `column` and `range` can be used for programmatic location and editor jumps.
112
+ - `code` is a string identifier, such as `local.type`, `expression-type` or `latex-plot-range`. Existing codes keep their meaning within one 0.x minor series. New codes may be added; removal, renaming or a change of meaning requires a new minor version and migration notes.
113
+ - `message` contains default English display text. Use `formatLocalDiagnostic(diagnostic, 'zh')` for Chinese. Wording may improve; do not parse messages or make business decisions based on their complete text. Language changes preserve machine fields.
114
+ - `severity` is `warning` or `error`. Structurally complete unknown tags keep their source and produce fallback warnings, and compilation can still succeed; footnotes render normally. Compile errors make `result.ok` `false` and disable the preview. Runtime local errors affect only the corresponding content.
115
+
116
+ See [Diagnostics and counting rules](../reference/diagnostics-counting-en.md) for units and resource-budget scopes.
117
+
118
+ ## Platforms and runtimes
119
+
120
+ The [support matrix](support-matrix-en.md) is the authoritative status and verification page for these environments.
121
+
122
+ | Environment | Current status |
123
+ | --- | --- |
124
+ | Node.js 22.x | Minimum 22.12.0 for development and Node-side consumption; verified locally on 22.17.0 |
125
+ | Node.js 24.x | Declared; run the version check on Node 24 in the release environment |
126
+ | ESM | The only module format; no CommonJS entry |
127
+ | React 19 | Required by `reactive-md/react` and the separate `reactive-md-editor` package; the core entry does not depend on React |
128
+ | Vite 8 | Optional peer of `reactive-md`, required only when using `reactive-md/vite` |
129
+ | Playwright Chromium | Bundled browser check available; outside the current verified set |
130
+ | Google Chrome | Engine browser fixture verified locally through the installed Chrome channel |
131
+ | Microsoft Edge (Chromium-based) | Engine browser fixture verified locally through the installed Edge channel |
132
+ | Playwright Firefox and WebKit | Engine browser fixtures available locally; outside the current verified set |
133
+ | Safari on Apple devices | Device testing remains separate from Playwright WebKit engine checks |
134
+ | Shareable state format | `reactive-md-state/v1`: public parameter values with a syntax version and source digest; see [Shareable documents](../integration/shareable-export-en.md) |
135
+ | Single-file HTML format | `reactive-md-html/v1`: interactive or static export, with an inline standalone runtime only in interactive mode |
136
+ | SSR static rendering | `react-dom/server` static rendering is covered by the packed check. The editor entry has no top-level DOM access and can be imported and rendered on the server; editing interactions run on the client |
137
+ | Interactive single-file HTML boot | The exported `reactive-md-html/v1` file boots its inline runtime offline and updates content after an interaction; verified in Microsoft Edge by the Demo smoke check. General host hydration is outside the supported scope |
138
+ | Engine Worker | `LocalCompileScheduler` and `LocalCompileWorker` are covered by the engine Worker unit suite |
139
+ | Editor analysis Worker | The packed consumer checks the emitted analysis Worker asset and imports; browser behavior follows the browser rows above |
140
+
141
+ Node-side consumption means importing `reactive-md` in Node and calling `compileLocal` and `createLocalRuntime` without a DOM. React rendering requires a browser environment, or the host must handle server output itself.
142
+
143
+ See the [syntax specification](../reference/local-interaction-syntax-en.md) for the language scope, and the [security policy](../../SECURITY.md) for the security boundary and host responsibilities.
144
+
145
+
146
+ See the [syntax specification](../reference/local-interaction-syntax-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.9.2` uses the `latest` channel.
@@ -0,0 +1,161 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/yao1145/ReactiveMD/blob/main/docs/compatibility/compatibility-manifest.schema.json",
4
+ "title": "Reactive MD compatibility manifest",
5
+ "description": "Cross-package versions, protocols, Demo candidates, verified versions, the recommended install set and the optional previous verified combination.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["$schema", "schema", "engine", "editor", "demo", "protocols", "verified", "runtimes", "install"],
9
+ "properties": {
10
+ "$schema": { "const": "./compatibility-manifest.schema.json" },
11
+ "schema": { "const": "reactive-md-compatibility/v1" },
12
+ "engine": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["name", "version"],
16
+ "properties": {
17
+ "name": { "const": "reactive-md" },
18
+ "version": { "$ref": "#/$defs/semver" }
19
+ }
20
+ },
21
+ "editor": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": ["name", "version", "enginePeer", "repository"],
25
+ "properties": {
26
+ "name": { "const": "reactive-md-editor" },
27
+ "version": { "$ref": "#/$defs/semver" },
28
+ "enginePeer": { "type": "string", "pattern": "^\\^\\d+\\.\\d+\\.\\d+$" },
29
+ "repository": { "type": "string", "minLength": 1 }
30
+ }
31
+ },
32
+ "previous": { "$ref": "#/$defs/previousCombination" },
33
+ "demo": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["repository", "candidates"],
37
+ "properties": {
38
+ "repository": { "type": "string", "minLength": 1 },
39
+ "candidates": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["engine", "editor"],
43
+ "properties": {
44
+ "engine": { "$ref": "#/$defs/candidate" },
45
+ "editor": { "$ref": "#/$defs/candidate" }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "protocols": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["sdk", "syntax", "component", "theme"],
54
+ "properties": {
55
+ "sdk": { "type": "string", "minLength": 1 },
56
+ "syntax": { "type": "string", "minLength": 1 },
57
+ "component": { "type": "string", "minLength": 1 },
58
+ "theme": { "type": "string", "minLength": 1 }
59
+ }
60
+ },
61
+ "verified": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["date", "node", "browsers"],
65
+ "properties": {
66
+ "date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
67
+ "node": { "$ref": "#/$defs/semver" },
68
+ "browsers": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "uniqueItems": true,
72
+ "items": {
73
+ "enum": [
74
+ "Google Chrome",
75
+ "Microsoft Edge",
76
+ "Playwright Chromium",
77
+ "Playwright Firefox",
78
+ "Playwright WebKit",
79
+ "Safari"
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "runtimes": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["react", "react-dom", "vite"],
89
+ "properties": {
90
+ "react": { "$ref": "#/$defs/testedRuntime" },
91
+ "react-dom": { "$ref": "#/$defs/testedRuntime" },
92
+ "vite": { "$ref": "#/$defs/testedRuntime" }
93
+ }
94
+ },
95
+ "install": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["command", "packages", "optional"],
99
+ "properties": {
100
+ "command": { "type": "string", "minLength": 1 },
101
+ "packages": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": ["reactive-md", "reactive-md-editor", "react", "react-dom"],
105
+ "properties": {
106
+ "reactive-md": { "type": "string", "minLength": 1 },
107
+ "reactive-md-editor": { "type": "string", "minLength": 1 },
108
+ "react": { "type": "string", "minLength": 1 },
109
+ "react-dom": { "type": "string", "minLength": 1 }
110
+ }
111
+ },
112
+ "optional": {
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": ["vite"],
116
+ "properties": {
117
+ "vite": { "type": "string", "minLength": 1 }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ },
123
+ "$defs": {
124
+ "semver": {
125
+ "type": "string",
126
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
127
+ },
128
+ "candidate": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": ["package", "version", "tarball", "sha256"],
132
+ "properties": {
133
+ "package": { "type": "string", "minLength": 1 },
134
+ "version": { "$ref": "#/$defs/semver" },
135
+ "tarball": { "type": "string", "pattern": "^vendor/.+\\.tgz$" },
136
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
137
+ }
138
+ },
139
+ "previousCombination": {
140
+ "description": "Previously verified engine and editor pairing. Historical tarballs are not required to be present.",
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["engine", "editor", "enginePeer"],
144
+ "properties": {
145
+ "engine": { "$ref": "#/$defs/semver" },
146
+ "editor": { "$ref": "#/$defs/semver" },
147
+ "enginePeer": { "type": "string", "pattern": "^\\^\\d+\\.\\d+\\.\\d+$" }
148
+ }
149
+ },
150
+ "testedRuntime": {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": ["declared", "tested"],
154
+ "properties": {
155
+ "declared": { "type": "string", "minLength": 1 },
156
+ "tested": { "$ref": "#/$defs/semver" },
157
+ "optional": { "type": "boolean" }
158
+ }
159
+ }
160
+ }
161
+ }
@@ -0,0 +1,21 @@
1
+ # 弃用与迁移政策
2
+
3
+ **中文** · [English](deprecation-en.md)
4
+
5
+ 本政策从 `reactive-md@0.9.2` 和 `reactive-md-editor@0.2.1` 生效,适用于[稳定公共 API](api-stability-ch.md)。两包独立计版本和弃用周期。
6
+
7
+ ## 公告、保留与移除
8
+
9
+ 1. 在版本变更记录和相应 API 文档中公告弃用。记录受影响的入口或符号、首次公告版本、建议替代项、最早移除版本,以及可执行的迁移步骤。可标记的 TypeScript 声明加上 `@deprecated`,并指向替代项。
10
+ 2. 保留旧接口至少 90 天,并覆盖首次公告之后完整的一个 minor 发布线。旧接口继续在同一 minor 的补丁中接受兼容性和安全修复。
11
+ 3. 两项保留条件均满足后,在后续的次版本或主版本移除,并在变更记录中确认移除版本和迁移方式。例如,在 `0.9.x` 公告的弃用应覆盖 `0.10.x`,最早在公告满 90 天后的 `0.11.0` 移除。
12
+
13
+ 安全漏洞、数据损坏或外部平台强制变更需要缩短保留期时,在发布记录说明原因、影响范围和可用的回退或迁移路径。安全问题可以在修复发布时披露。0.x 次版本中的其它不兼容改动也须公开列出旧用法、新用法和适用版本。
14
+
15
+ ## 当前宿主迁移
16
+
17
+ 编辑器 `0.2.1` 的最低引擎版本为 `0.9.2`,peer 范围为 `^0.9.2`。已有安装可以成对升级,或在引擎 `0.9.0`、`0.9.1` 上继续使用编辑器 `0.2.0`。这是本次候选公开记录的配对要求变更。现有编辑器入口和组件导入仍可使用。
18
+
19
+ 公开的 `LocalComponentPropValue` 是早期标量类型别名,已在声明中标记弃用。新的扩展应使用 `LocalComponentValue`,需要标量时先缩窄类型。该别名的保留期从本政策首次记录的发布开始计算。
20
+
21
+ 源码迁移独立于宿主 API 弃用。跨语法修订时,先使用 [源码修订和迁移工具](source-versioning-ch.md) 检查源码。迁移后的源码应重新导出状态文件,以更新源码摘要。引擎 `0.9.2` 继续使用 `local-draft-3` 与 `reactive-md-state/v1`。
@@ -0,0 +1,21 @@
1
+ # Deprecation and migration policy
2
+
3
+ [中文](deprecation-ch.md) · **English**
4
+
5
+ This policy takes effect with `reactive-md@0.9.2` and `reactive-md-editor@0.2.1` for the [stable public API](api-stability-en.md). Each package tracks its own release versions and notice periods.
6
+
7
+ ## Announcement, notice period and removal
8
+
9
+ 1. Announce a deprecation in the changelog and the associated API documentation. Record the affected entry or symbol, first announced release, replacement, earliest possible removal and actionable migration steps. Mark applicable TypeScript declarations with `@deprecated` and point to the replacement.
10
+ 2. Keep the deprecated interface for at least 90 days and for one complete minor release line after the initial announcement. It continues to receive compatibility and security fixes in patches on that line.
11
+ 3. Remove the deprecated interface in a later minor or major release once both conditions are met. Record the removal and migration path in the changelog. For example, a deprecation announced in `0.9.x` stays available through `0.10.x` and can be removed in `0.11.0` once 90 days have elapsed.
12
+
13
+ Security vulnerabilities, data corruption and mandatory upstream platform changes can require a shorter window. Release notes record the reason, affected scope and available fallback or migration. A security issue may be disclosed when the fix ships. Other incompatible changes in 0.x minor releases also list the old usage, replacement and affected versions.
14
+
15
+ ## Current host migrations
16
+
17
+ Editor `0.2.1` requires engine `0.9.2` or a later `0.9.x` release through its `^0.9.2` peer. Upgrade the packages together or keep editor `0.2.0` with engine `0.9.0` or `0.9.1`. This pairing change is documented for the current release. Existing editor entry points and component imports remain available.
18
+
19
+ `LocalComponentPropValue` is the deprecated phase-one scalar alias. New extensions can use `LocalComponentValue` and narrow it where a scalar is required. The notice period for the alias starts with its first recorded release under this policy.
20
+
21
+ Source migrations follow their own syntax revisions. Run the [source revision and migration tools](source-versioning-en.md) before upgrading across revisions. Export a fresh state file after migration to record the new source digest. Engine `0.9.2` keeps `local-draft-3` and `reactive-md-state/v1`.