reactive-md 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/CHANGELOG-ch.md +66 -0
  2. package/CHANGELOG.md +66 -0
  3. package/CONTRIBUTING-ch.md +6 -62
  4. package/CONTRIBUTING.md +5 -63
  5. package/README-ch.md +232 -67
  6. package/README-en.md +209 -71
  7. package/README.md +209 -71
  8. package/SECURITY-ch.md +3 -1
  9. package/SECURITY.md +3 -1
  10. package/THIRD_PARTY_NOTICES.md +1909 -87
  11. package/cli/args.mjs +33 -1
  12. package/cli/build.mjs +62 -1
  13. package/cli/check.mjs +444 -0
  14. package/cli/help.mjs +181 -3
  15. package/cli/init.mjs +1577 -0
  16. package/cli/main.mjs +11 -1
  17. package/cli/package-loader.mjs +41 -0
  18. package/dist-library/LocalDocumentView-6trX7xJc.js +97920 -0
  19. package/dist-library/{authoring-BEVyth5X.js → authoring-BsfSwQRm.js} +237 -209
  20. package/dist-library/compiler--ea2CKQF.js +61 -0
  21. package/dist-library/compiler-core-kPiH-gOV.js +11805 -0
  22. package/dist-library/component-state-Cq2K5gkS.js +490 -0
  23. package/dist-library/component-state-D_cw_EHe.js +54 -0
  24. package/dist-library/config-validation-DXTynAw7.js +3005 -0
  25. package/dist-library/default-components-Z_YMio5P.js +2346 -0
  26. package/dist-library/identity-MYJXKSkB.js +1443 -0
  27. package/dist-library/math-display-BJz4gbFc.js +24000 -0
  28. package/dist-library/math-sample-BGEW49zY.js +1124 -0
  29. package/dist-library/options-CX5m5n-J.js +115 -0
  30. package/dist-library/parser-standard-DlCk7sLo.js +10122 -0
  31. package/dist-library/props-DGlBk0e5.js +183 -0
  32. package/dist-library/react-ByOHunUW.js +122 -0
  33. package/dist-library/reactive-md-authoring.js +712 -1077
  34. package/dist-library/reactive-md-build.js +7966 -0
  35. package/dist-library/reactive-md-compiler-standard.js +33 -0
  36. package/dist-library/reactive-md-compiler.js +22 -0
  37. package/dist-library/reactive-md-default-packs.js +71 -0
  38. package/dist-library/reactive-md-default-preset.js +10 -0
  39. package/dist-library/reactive-md-export.js +111 -0
  40. package/dist-library/reactive-md-print.css +18 -3
  41. package/dist-library/reactive-md-react-runtime.js +251 -0
  42. package/dist-library/reactive-md-react-server.js +55 -0
  43. package/dist-library/reactive-md-react-unstyled.js +9 -1
  44. package/dist-library/reactive-md-react.js +9 -1
  45. package/dist-library/reactive-md-runtime-browser.js +51 -0
  46. package/dist-library/reactive-md-runtime.js +3 -0
  47. package/dist-library/reactive-md-sdk.js +6 -0
  48. package/dist-library/reactive-md-standalone-host.js +442 -0
  49. package/dist-library/reactive-md-testing-browser.js +523 -0
  50. package/dist-library/reactive-md-testing-react.js +221 -0
  51. package/dist-library/reactive-md-testing.js +638 -0
  52. package/dist-library/reactive-md-vite.js +959 -0
  53. package/dist-library/reactive-md.css +1 -1
  54. package/dist-library/reactive-md.js +1080 -795
  55. package/dist-library/registry-B9Jc3FVe.js +1174 -0
  56. package/dist-library/resources-BGt8mpDA.js +204 -0
  57. package/dist-library/runtime-C-sbfpOX.js +1157 -0
  58. package/dist-library/runtime-Dkq7ldyg.js +172 -0
  59. package/dist-library/schema-ZFufO8V0.js +39 -0
  60. package/dist-library/shareable-DDVL4Fi9.js +844 -0
  61. package/dist-library/types/authoring/catalog.d.ts +168 -0
  62. package/dist-library/types/authoring/conformance.d.ts +24 -0
  63. package/dist-library/types/{editor → authoring}/editor-i18n.d.ts +3 -24
  64. package/dist-library/types/authoring/extensions.d.ts +13 -0
  65. package/dist-library/types/authoring/index.d.ts +14 -11
  66. package/dist-library/types/authoring/insert.d.ts +16 -0
  67. package/dist-library/types/{editor → authoring}/native-components.d.ts +19 -2
  68. package/dist-library/types/authoring/templates.d.ts +65 -0
  69. package/dist-library/types/build/diagnostics.d.ts +8 -0
  70. package/dist-library/types/build/digest.d.ts +5 -0
  71. package/dist-library/types/build/entry.d.ts +9 -0
  72. package/dist-library/types/build/host.d.ts +36 -0
  73. package/dist-library/types/build/index.d.ts +99 -0
  74. package/dist-library/types/build/notices.d.ts +29 -0
  75. package/dist-library/types/build/resources.d.ts +60 -0
  76. package/dist-library/types/build/vite.d.ts +15 -0
  77. package/dist-library/types/compiler/index.d.ts +22 -0
  78. package/dist-library/types/compiler/result.d.ts +30 -0
  79. package/dist-library/types/compiler/standard.d.ts +16 -0
  80. package/dist-library/types/compiler/types.d.ts +69 -0
  81. package/dist-library/types/components/chart-motion.d.ts +12 -0
  82. package/dist-library/types/components/controls.d.ts +21 -0
  83. package/dist-library/types/{local → components}/data-table.d.ts +10 -24
  84. package/dist-library/types/components/default-chart-types.d.ts +22 -0
  85. package/dist-library/types/components/default-chart.d.ts +2 -0
  86. package/dist-library/types/components/default-preset.d.ts +10 -0
  87. package/dist-library/types/components/diagram-inspector.d.ts +24 -0
  88. package/dist-library/types/components/gallery.d.ts +6 -0
  89. package/dist-library/types/components/layout.d.ts +23 -0
  90. package/dist-library/types/components/mafs-plot-grid.d.ts +57 -0
  91. package/dist-library/types/components/mafs-visuals.d.ts +40 -0
  92. package/dist-library/types/components/numeric-sliders.d.ts +3 -0
  93. package/dist-library/types/components/uiarc/calendar/calendar.d.ts +26 -0
  94. package/dist-library/types/components/uiarc/date-picker/date-picker.d.ts +29 -0
  95. package/dist-library/types/components/uiarc/lib/motion-tokens.d.ts +2 -0
  96. package/dist-library/types/components/uiarc/lib/use-today.d.ts +2 -0
  97. package/dist-library/types/components/uiarc/motion-tokens.d.ts +60 -0
  98. package/dist-library/types/components/uiarc/rmd-motion.d.ts +12 -0
  99. package/dist-library/types/components/uiarc/select/select.d.ts +21 -0
  100. package/dist-library/types/components/uiarc/slider/slider.d.ts +53 -0
  101. package/dist-library/types/components/use-hydrated.d.ts +6 -0
  102. package/dist-library/types/components/visuals.d.ts +13 -0
  103. package/dist-library/types/export/component-state.d.ts +39 -0
  104. package/dist-library/types/export/index.d.ts +47 -0
  105. package/dist-library/types/export/requirements.d.ts +23 -0
  106. package/dist-library/types/export/resources.d.ts +8 -0
  107. package/dist-library/types/export/restoration.d.ts +52 -0
  108. package/dist-library/types/index.d.ts +1 -0
  109. package/dist-library/types/local/compilation/compiler-core.d.ts +16 -0
  110. package/dist-library/types/local/compilation/compiler-services.d.ts +64 -0
  111. package/dist-library/types/local/compilation/compiler-structure.d.ts +46 -0
  112. package/dist-library/types/local/compilation/compiler-values.d.ts +9 -0
  113. package/dist-library/types/local/compilation/compiler.d.ts +34 -0
  114. package/dist-library/types/local/compilation/component-kernel.d.ts +487 -0
  115. package/dist-library/types/local/{dependencies.d.ts → compilation/dependencies.d.ts} +4 -3
  116. package/dist-library/types/local/{diagnostics.d.ts → configuration/diagnostic-messages.d.ts} +193 -65
  117. package/dist-library/types/local/configuration/diagnostics.d.ts +58 -0
  118. package/dist-library/types/local/{limits.d.ts → configuration/limits.d.ts} +15 -2
  119. package/dist-library/types/local/configuration/options-core.d.ts +120 -0
  120. package/dist-library/types/local/configuration/options.d.ts +17 -0
  121. package/dist-library/types/local/configuration/portable-options.d.ts +3 -0
  122. package/dist-library/types/local/configuration/schema-core.d.ts +32 -0
  123. package/dist-library/types/local/configuration/schema.d.ts +12 -0
  124. package/dist-library/types/local/contracts/types.d.ts +519 -0
  125. package/dist-library/types/local/{version.d.ts → contracts/version.d.ts} +1 -1
  126. package/dist-library/types/local/{computations.d.ts → evaluation/computations.d.ts} +6 -3
  127. package/dist-library/types/local/{expression.d.ts → evaluation/expression.d.ts} +2 -2
  128. package/dist-library/types/local/{math-display.d.ts → evaluation/math-display.d.ts} +2 -16
  129. package/dist-library/types/local/evaluation/math-sample.d.ts +23 -0
  130. package/dist-library/types/local/evaluation/math.d.ts +73 -0
  131. package/dist-library/types/local/{validation.d.ts → evaluation/validation.d.ts} +1 -1
  132. package/dist-library/types/local/html/html-details.d.ts +16 -0
  133. package/dist-library/types/local/html/html-entities.d.ts +7 -0
  134. package/dist-library/types/local/html/html-policy.d.ts +43 -0
  135. package/dist-library/types/local/html/html-recovery.d.ts +16 -0
  136. package/dist-library/types/local/html/html-table-names.d.ts +9 -0
  137. package/dist-library/types/local/{html-table.d.ts → html/html-table.d.ts} +2 -6
  138. package/dist-library/types/local/{html.d.ts → html/html.d.ts} +1 -1
  139. package/dist-library/types/local/index.d.ts +31 -24
  140. package/dist-library/types/local/markdown/fast-markdown.d.ts +137 -0
  141. package/dist-library/types/local/{footnotes.d.ts → markdown/footnotes.d.ts} +1 -1
  142. package/dist-library/types/local/{heading-anchors.d.ts → markdown/heading-anchors.d.ts} +12 -2
  143. package/dist-library/types/local/markdown/markdown-blocks.d.ts +55 -0
  144. package/dist-library/types/local/markdown/markdown-structure.d.ts +3 -0
  145. package/dist-library/types/local/markdown/plain-paragraphs.d.ts +10 -0
  146. package/dist-library/types/local/parsing/lexical.d.ts +21 -0
  147. package/dist-library/types/local/parsing/parse-budget.d.ts +67 -0
  148. package/dist-library/types/local/parsing/parser-capabilities.d.ts +42 -0
  149. package/dist-library/types/local/parsing/parser-core.d.ts +65 -0
  150. package/dist-library/types/local/parsing/parser-standard.d.ts +7 -0
  151. package/dist-library/types/local/parsing/parser.d.ts +16 -0
  152. package/dist-library/types/local/parsing/rmd-recovery.d.ts +48 -0
  153. package/dist-library/types/local/{LocalDocumentView.d.ts → rendering/LocalDocumentView.d.ts} +67 -24
  154. package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +36 -0
  155. package/dist-library/types/local/rendering/render-types.d.ts +57 -0
  156. package/dist-library/types/local/rendering/view-revision.d.ts +75 -0
  157. package/dist-library/types/local/{retention.d.ts → runtime/retention.d.ts} +1 -1
  158. package/dist-library/types/local/runtime/runtime.d.ts +34 -0
  159. package/dist-library/types/local/{state.d.ts → runtime/state.d.ts} +4 -4
  160. package/dist-library/types/local/session/compiler-cache.d.ts +44 -0
  161. package/dist-library/types/local/session/incremental.d.ts +48 -0
  162. package/dist-library/types/local/session/parse-session.d.ts +62 -0
  163. package/dist-library/types/local/session/row-reuse.d.ts +46 -0
  164. package/dist-library/types/local/{authoring.d.ts → source/authoring.d.ts} +11 -3
  165. package/dist-library/types/local/source/node-walk.d.ts +3 -0
  166. package/dist-library/types/local/source/source-context.d.ts +63 -0
  167. package/dist-library/types/local/{source-migration.d.ts → source/source-migration.d.ts} +2 -2
  168. package/dist-library/types/local/{i18n.d.ts → theme/i18n.d.ts} +2 -2
  169. package/dist-library/types/local/theme/theme-name.d.ts +3 -0
  170. package/dist-library/types/local/{theme.d.ts → theme/theme.d.ts} +3 -3
  171. package/dist-library/types/local/transport/compile-patch.d.ts +127 -0
  172. package/dist-library/types/local/{compiled-data.d.ts → transport/compiled-data.d.ts} +1 -1
  173. package/dist-library/types/local/transport/flat-compiled-data.d.ts +17 -0
  174. package/dist-library/types/local/transport/shared-data.d.ts +10 -0
  175. package/dist-library/types/local/transport/worker.d.ts +265 -0
  176. package/dist-library/types/local/widgets/visuals.d.ts +25 -0
  177. package/dist-library/types/presets/default-authoring.d.ts +50 -0
  178. package/dist-library/types/presets/default-components.d.ts +4 -0
  179. package/dist-library/types/presets/default-semantics.d.ts +8 -0
  180. package/dist-library/types/presets/default.d.ts +11 -0
  181. package/dist-library/types/presets/identity.d.ts +7 -0
  182. package/dist-library/types/presets/packs.d.ts +4 -0
  183. package/dist-library/types/react/component-api.d.ts +260 -0
  184. package/dist-library/types/react/component-primitives.d.ts +21 -0
  185. package/dist-library/types/react/component-utils.d.ts +125 -0
  186. package/dist-library/types/react/default-theme.d.ts +6 -0
  187. package/dist-library/types/react/field-validation.d.ts +11 -0
  188. package/dist-library/types/react/index.d.ts +17 -5
  189. package/dist-library/types/react/overflow-text-tooltip.d.ts +6 -0
  190. package/dist-library/types/react/package.d.ts +69 -0
  191. package/dist-library/types/react/runtime/common.d.ts +4 -0
  192. package/dist-library/types/react/runtime/index.d.ts +8 -0
  193. package/dist-library/types/react/runtime/useComponentState.d.ts +30 -0
  194. package/dist-library/types/react/runtime/useKeys.d.ts +16 -0
  195. package/dist-library/types/react/runtime/useSwipe.d.ts +27 -0
  196. package/dist-library/types/react/runtime/useTicker.d.ts +17 -0
  197. package/dist-library/types/react/sdk.d.ts +110 -0
  198. package/dist-library/types/react/server.d.ts +15 -0
  199. package/dist-library/types/react/tooltip-layer.d.ts +10 -0
  200. package/dist-library/types/react/use-draft-field.d.ts +17 -0
  201. package/dist-library/types/runtime-services/browser/index.d.ts +63 -0
  202. package/dist-library/types/runtime-services/component-state.d.ts +152 -0
  203. package/dist-library/types/runtime-services/identity.d.ts +41 -0
  204. package/dist-library/types/runtime-services/index.d.ts +10 -0
  205. package/dist-library/types/runtime-services/random.d.ts +42 -0
  206. package/dist-library/types/runtime-services/runtime.d.ts +51 -0
  207. package/dist-library/types/runtime-services/scheduler.d.ts +44 -0
  208. package/dist-library/types/sdk/assembly.d.ts +73 -0
  209. package/dist-library/types/sdk/compat-profile.d.ts +57 -0
  210. package/dist-library/types/sdk/compiler-config.d.ts +33 -0
  211. package/dist-library/types/sdk/config-validation.d.ts +33 -0
  212. package/dist-library/types/sdk/config.d.ts +35 -0
  213. package/dist-library/types/sdk/hash.d.ts +9 -0
  214. package/dist-library/types/sdk/index.d.ts +10 -0
  215. package/dist-library/types/sdk/manifest.d.ts +49 -0
  216. package/dist-library/types/sdk/pattern.d.ts +11 -0
  217. package/dist-library/types/sdk/preset-core.d.ts +11 -0
  218. package/dist-library/types/sdk/preset.d.ts +9 -0
  219. package/dist-library/types/sdk/props.d.ts +33 -0
  220. package/dist-library/types/sdk/registry-core.d.ts +16 -0
  221. package/dist-library/types/sdk/registry.d.ts +18 -0
  222. package/dist-library/types/sdk/theme.d.ts +73 -0
  223. package/dist-library/types/sdk/types.d.ts +221 -0
  224. package/dist-library/types/sdk/version.d.ts +49 -0
  225. package/dist-library/types/shareable.d.ts +29 -3
  226. package/dist-library/types/standalone/diagnostics.d.ts +16 -0
  227. package/dist-library/types/standalone/events.d.ts +4 -0
  228. package/dist-library/types/standalone/library.d.ts +6 -0
  229. package/dist-library/types/standalone/payload.d.ts +15 -0
  230. package/dist-library/types/standalone/prepare.d.ts +21 -0
  231. package/dist-library/types/standalone/session.d.ts +68 -0
  232. package/dist-library/types/standalone/version.d.ts +7 -0
  233. package/dist-library/types/testing/behavior.d.ts +19 -0
  234. package/dist-library/types/testing/browser.d.ts +126 -0
  235. package/dist-library/types/testing/cases.d.ts +16 -0
  236. package/dist-library/types/testing/index.d.ts +13 -0
  237. package/dist-library/types/testing/manifest.d.ts +10 -0
  238. package/dist-library/types/testing/react.d.ts +45 -0
  239. package/dist-library/types/testing/report.d.ts +20 -0
  240. package/dist-library/types/testing/types.d.ts +125 -0
  241. package/dist-library/types/testing/values.d.ts +22 -0
  242. package/dist-library/types/vite/client.d.ts +36 -0
  243. package/dist-library/types/vite/discovery.d.ts +51 -0
  244. package/dist-library/types/vite/index.d.ts +31 -0
  245. package/dist-library/types/vite/registration.d.ts +109 -0
  246. package/dist-library/types-BFCrMrg0.js +52 -0
  247. package/dist-library/validation-W-bmny-x.js +2253 -0
  248. package/dist-library/values-CIt8AjiU.js +134 -0
  249. package/dist-standalone/reactive-md-standalone.css +1 -1
  250. package/dist-standalone/reactive-md-standalone.js +591 -95
  251. package/docs/README-ch.md +90 -0
  252. package/docs/README.md +87 -81
  253. package/docs/compatibility/compatibility-ch.md +22 -14
  254. package/docs/compatibility/compatibility-en.md +22 -14
  255. package/docs/compatibility/source-versioning-ch.md +15 -12
  256. package/docs/compatibility/source-versioning-en.md +16 -13
  257. package/docs/development/component-development-ch.md +51 -195
  258. package/docs/development/component-development-en.md +51 -195
  259. package/docs/development/component-development-reference-ch.md +253 -0
  260. package/docs/development/component-development-reference-en.md +238 -0
  261. package/docs/development/component-protocol-ch.md +51 -50
  262. package/docs/development/component-protocol-en.md +52 -49
  263. package/docs/development/local-module-layout-ch.md +59 -0
  264. package/docs/development/local-module-layout-en.md +59 -0
  265. package/docs/development/performance-overview-ch.md +402 -0
  266. package/docs/development/performance-overview-en.md +402 -0
  267. package/docs/development/releasing-ch.md +8 -104
  268. package/docs/development/releasing-en.md +8 -104
  269. package/docs/guides/local-guide-ch.md +28 -9
  270. package/docs/guides/local-guide-en.md +31 -12
  271. package/docs/integration/author-tools-ch.md +4 -2
  272. package/docs/integration/author-tools-en.md +4 -2
  273. package/docs/integration/codemirror-ch.md +52 -0
  274. package/docs/integration/codemirror-en.md +29 -0
  275. package/docs/integration/compiler-ch.md +47 -0
  276. package/docs/integration/compiler-en.md +34 -0
  277. package/docs/integration/directory-discovery-ch.md +53 -0
  278. package/docs/integration/directory-discovery-en.md +31 -0
  279. package/docs/integration/editor-ch.md +48 -21
  280. package/docs/integration/editor-en.md +48 -21
  281. package/docs/integration/extension-sdk-ch.md +392 -0
  282. package/docs/integration/extension-sdk-en.md +377 -0
  283. package/docs/integration/local-integration-ch.md +63 -9
  284. package/docs/integration/local-integration-en.md +89 -13
  285. package/docs/integration/repository-split-ch.md +40 -0
  286. package/docs/integration/repository-split-en.md +23 -0
  287. package/docs/integration/shareable-export-ch.md +46 -2
  288. package/docs/integration/shareable-export-en.md +46 -2
  289. package/docs/reference/computations-formatting-ch.md +4 -2
  290. package/docs/reference/computations-formatting-en.md +4 -2
  291. package/docs/reference/constraints-collections-ch.md +21 -1
  292. package/docs/reference/constraints-collections-en.md +21 -1
  293. package/docs/reference/diagnostics-counting-ch.md +1 -1
  294. package/docs/reference/diagnostics-counting-en.md +1 -1
  295. package/docs/reference/html-compatibility-ch.md +4 -0
  296. package/docs/reference/html-compatibility-en.md +4 -0
  297. package/docs/reference/local-components-v2-ch.md +2 -0
  298. package/docs/reference/local-components-v2-en.md +2 -0
  299. package/docs/reference/local-interaction-syntax-ch.md +51 -15
  300. package/docs/reference/local-interaction-syntax-en.md +58 -14
  301. package/docs/reference/theme-protocol-ch.md +79 -7
  302. package/docs/reference/theme-protocol-en.md +79 -7
  303. package/docs/reference/tolerance-ch.md +64 -0
  304. package/docs/reference/tolerance-en.md +57 -0
  305. package/docs/releases/release-0.4.0-ch.md +2 -0
  306. package/docs/releases/release-0.4.0-en.md +2 -0
  307. package/docs/releases/release-0.4.1-ch.md +2 -0
  308. package/docs/releases/release-0.4.1-en.md +2 -0
  309. package/docs/releases/release-0.5.0-ch.md +2 -0
  310. package/docs/releases/release-0.5.0-en.md +2 -0
  311. package/docs/releases/release-0.5.1-ch.md +2 -0
  312. package/docs/releases/release-0.5.1-en.md +2 -0
  313. package/docs/releases/release-0.5.2-ch.md +2 -0
  314. package/docs/releases/release-0.5.2-en.md +2 -0
  315. package/docs/releases/release-0.5.3-ch.md +2 -0
  316. package/docs/releases/release-0.5.3-en.md +2 -0
  317. package/docs/releases/release-0.6.0-ch.md +2 -0
  318. package/docs/releases/release-0.6.0-en.md +2 -0
  319. package/docs/releases/release-0.6.1-ch.md +2 -0
  320. package/docs/releases/release-0.6.1-en.md +2 -0
  321. package/docs/releases/release-0.7.0-ch.md +86 -0
  322. package/docs/releases/release-0.7.0-en.md +86 -0
  323. package/docs/releases/release-0.8.0-ch.md +126 -0
  324. package/docs/releases/release-0.8.0-en.md +126 -0
  325. package/examples/component-package/LICENSE +21 -0
  326. package/examples/component-package/NOTICES.md +12 -0
  327. package/examples/component-package/README-ch.md +101 -0
  328. package/examples/component-package/README.md +133 -0
  329. package/examples/component-package/package.json +35 -0
  330. package/examples/component-package/sample/document.reactive.md +14 -0
  331. package/examples/component-package/scripts/build-export.mjs +44 -0
  332. package/examples/component-package/scripts/build.mjs +130 -0
  333. package/examples/component-package/scripts/verify.mjs +257 -0
  334. package/examples/component-package/src/assets/notice.svg +4 -0
  335. package/examples/component-package/src/component.css +40 -0
  336. package/examples/component-package/src/components.tsx +105 -0
  337. package/examples/component-package/src/harness.tsx +34 -0
  338. package/examples/component-package/src/manifests.ts +71 -0
  339. package/examples/component-package/src/node-entry.ts +18 -0
  340. package/examples/component-package/src/sample.ts +4 -0
  341. package/examples/component-package/src/theme.css +44 -0
  342. package/examples/component-package/src/theme.ts +22 -0
  343. package/examples/component-package/tsconfig.json +15 -0
  344. package/examples/conformance/README-ch.md +55 -0
  345. package/examples/conformance/README.md +2 -0
  346. package/examples/conformance/local-draft-3.json +296 -0
  347. package/examples/game-2048-package/LICENSE +21 -0
  348. package/examples/game-2048-package/NOTICES.md +11 -0
  349. package/examples/game-2048-package/README-ch.md +97 -0
  350. package/examples/game-2048-package/README.md +102 -0
  351. package/examples/game-2048-package/package.json +35 -0
  352. package/examples/game-2048-package/sample/document.reactive.md +17 -0
  353. package/examples/game-2048-package/scripts/build-export.mjs +44 -0
  354. package/examples/game-2048-package/scripts/build.mjs +130 -0
  355. package/examples/game-2048-package/scripts/verify.mjs +180 -0
  356. package/examples/game-2048-package/src/component.css +161 -0
  357. package/examples/game-2048-package/src/components.tsx +326 -0
  358. package/examples/game-2048-package/src/game-engine.ts +228 -0
  359. package/examples/game-2048-package/src/harness.tsx +34 -0
  360. package/examples/game-2048-package/src/manifest.ts +85 -0
  361. package/examples/game-2048-package/src/node-entry.ts +30 -0
  362. package/examples/game-2048-package/src/sample.ts +4 -0
  363. package/examples/game-2048-package/tsconfig.json +15 -0
  364. package/examples/integration/README-ch.md +63 -0
  365. package/examples/integration/README.md +17 -1
  366. package/examples/integration/extension-sdk/README-ch.md +24 -0
  367. package/examples/integration/extension-sdk/README.md +24 -0
  368. package/examples/integration/extension-sdk/advanced-standalone.ts +6 -0
  369. package/examples/integration/extension-sdk/advanced.tsx +101 -0
  370. package/examples/integration/extension-sdk/env.d.ts +2 -0
  371. package/examples/integration/extension-sdk/extensions.tsx +97 -0
  372. package/examples/integration/extension-sdk/index.html +3 -0
  373. package/examples/integration/extension-sdk/main.tsx +10 -0
  374. package/examples/integration/extension-sdk/package.json +6 -0
  375. package/examples/integration/extension-sdk/standalone.ts +7 -0
  376. package/examples/integration/extension-sdk/tsconfig.json +8 -0
  377. package/examples/integration/react-comprehensive/index.html +12 -0
  378. package/examples/integration/react-comprehensive/main.jsx +123 -0
  379. package/examples/integration/react-comprehensive/package.json +18 -0
  380. package/examples/local/README-ch.md +76 -0
  381. package/examples/local/README.md +4 -2
  382. package/examples/local/scenarios/blog-zh.reactive.md +71 -0
  383. package/examples/local/scenarios/blog.reactive.md +71 -0
  384. package/examples/local/scenarios/classroom-zh.reactive.md +97 -0
  385. package/examples/local/scenarios/classroom.reactive.md +97 -0
  386. package/examples/local/scenarios/proposal-zh.reactive.md +79 -0
  387. package/examples/local/scenarios/proposal.reactive.md +79 -0
  388. package/examples/local/scenarios/survey-zh.reactive.md +74 -0
  389. package/examples/local/scenarios/survey.reactive.md +74 -0
  390. package/examples/local/showcase/README-ch.md +22 -0
  391. package/examples/local/showcase/README.md +9 -3
  392. package/examples/local/showcase/features.reactive.md +637 -0
  393. package/examples/local/showcase/zh/features.reactive.md +637 -0
  394. package/examples/sci-fi-theme/README-ch.md +131 -0
  395. package/examples/sci-fi-theme/README.md +146 -0
  396. package/examples/sci-fi-theme/demo/demo.css +532 -0
  397. package/examples/sci-fi-theme/demo/document.reactive.md +185 -0
  398. package/examples/sci-fi-theme/demo/index.html +13 -0
  399. package/examples/sci-fi-theme/demo/main.tsx +180 -0
  400. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -0
  401. package/examples/sci-fi-theme/docs/design-system.md +474 -0
  402. package/examples/sci-fi-theme/package.json +27 -0
  403. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -0
  404. package/examples/sci-fi-theme/src/components.css +1460 -0
  405. package/examples/sci-fi-theme/src/index.ts +6 -0
  406. package/examples/sci-fi-theme/src/sci-fi.css +5 -0
  407. package/examples/sci-fi-theme/src/theme.ts +37 -0
  408. package/examples/sci-fi-theme/src/tokens.css +408 -0
  409. package/examples/sci-fi-theme/tsconfig.json +20 -0
  410. package/examples/sci-fi-theme/vite.config.ts +24 -0
  411. package/examples/tetris-package/LICENSE +21 -0
  412. package/examples/tetris-package/NOTICES.md +11 -0
  413. package/examples/tetris-package/README-ch.md +91 -0
  414. package/examples/tetris-package/README.md +95 -0
  415. package/examples/tetris-package/package.json +35 -0
  416. package/examples/tetris-package/sample/document.reactive.md +16 -0
  417. package/examples/tetris-package/scripts/build-export.mjs +44 -0
  418. package/examples/tetris-package/scripts/build.mjs +130 -0
  419. package/examples/tetris-package/scripts/verify.mjs +173 -0
  420. package/examples/tetris-package/src/component.css +145 -0
  421. package/examples/tetris-package/src/components.tsx +334 -0
  422. package/examples/tetris-package/src/harness.tsx +34 -0
  423. package/examples/tetris-package/src/manifests.ts +93 -0
  424. package/examples/tetris-package/src/node-entry.ts +16 -0
  425. package/examples/tetris-package/src/sample.ts +4 -0
  426. package/examples/tetris-package/src/tetris-engine.ts +325 -0
  427. package/examples/tetris-package/tsconfig.json +15 -0
  428. package/package.json +98 -44
  429. package/dist-library/compiler-Cm3ppMxG.js +0 -46044
  430. package/dist-library/react-Bh7_oxZp.js +0 -59655
  431. package/dist-library/reactive-md-editor.css +0 -2
  432. package/dist-library/reactive-md-editor.js +0 -3853
  433. package/dist-library/runtime-DlFYQ4s_.js +0 -498
  434. package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +0 -7
  435. package/dist-library/types/editor/editor-toolbar.d.ts +0 -24
  436. package/dist-library/types/editor/editor-view-bar.d.ts +0 -11
  437. package/dist-library/types/editor/extended-native-components.d.ts +0 -58
  438. package/dist-library/types/editor/index.d.ts +0 -9
  439. package/dist-library/types/editor/locale.d.ts +0 -13
  440. package/dist-library/types/editor/source-authoring.d.ts +0 -59
  441. package/dist-library/types/editor/types.d.ts +0 -48
  442. package/dist-library/types/editor/use-gutter-metrics.d.ts +0 -5
  443. package/dist-library/types/editor/use-source-history.d.ts +0 -16
  444. package/dist-library/types/local/compiler.d.ts +0 -4
  445. package/dist-library/types/local/math.d.ts +0 -48
  446. package/dist-library/types/local/options.d.ts +0 -36
  447. package/dist-library/types/local/parser.d.ts +0 -13
  448. package/dist-library/types/local/render-types.d.ts +0 -27
  449. package/dist-library/types/local/runtime.d.ts +0 -2
  450. package/dist-library/types/local/schema.d.ts +0 -77
  451. package/dist-library/types/local/types.d.ts +0 -263
  452. package/dist-library/types/local/visuals.d.ts +0 -12
  453. package/dist-library/types/local/worker.d.ts +0 -98
  454. package/docs/development/performance-ch.md +0 -76
  455. package/docs/development/performance-en.md +0 -76
  456. /package/dist-library/types/{editor → authoring}/command-types.d.ts +0 -0
  457. /package/dist-library/types/{editor → authoring}/editor-commands.d.ts +0 -0
  458. /package/dist-library/types/local/{locale.d.ts → contracts/locale.d.ts} +0 -0
  459. /package/dist-library/types/local/{collection-functions.d.ts → evaluation/collection-functions.d.ts} +0 -0
  460. /package/dist-library/types/local/{data-functions.d.ts → evaluation/data-functions.d.ts} +0 -0
  461. /package/dist-library/types/local/{dates.d.ts → evaluation/dates.d.ts} +0 -0
  462. /package/dist-library/types/local/{formatting.d.ts → evaluation/formatting.d.ts} +0 -0
  463. /package/dist-library/types/local/{html-names.d.ts → html/html-names.d.ts} +0 -0
  464. /package/dist-library/types/local/{text-length.d.ts → source/text-length.d.ts} +0 -0
  465. /package/dist-library/types/local/{colors.d.ts → theme/colors.d.ts} +0 -0
  466. /package/dist-library/types/local/{code-block.d.ts → widgets/code-block.d.ts} +0 -0
  467. /package/dist-library/types/local/{code-languages.d.ts → widgets/code-languages.d.ts} +0 -0
  468. /package/dist-library/types/local/{diagram-layout.d.ts → widgets/diagram-layout.d.ts} +0 -0
  469. /package/dist-library/types/local/{image-view.d.ts → widgets/image-view.d.ts} +0 -0
  470. /package/dist-library/types/local/{math-view.d.ts → widgets/math-view.d.ts} +0 -0
  471. /package/dist-library/types/local/{table-surface.d.ts → widgets/table-surface.d.ts} +0 -0
@@ -0,0 +1,90 @@
1
+ # 文档导航
2
+
3
+ [English](README.md) · **中文**
4
+
5
+ 文档按用途分类。每个主题都有中文版本(`-ch.md`);英文导航见 [README.md](README.md)。
6
+
7
+ | 目录 | 内容 |
8
+ | --- | --- |
9
+ | [guides/](guides/) | 入门指南 |
10
+ | [reference/](reference/) | 语法、组件与主题参考 |
11
+ | [integration/](integration/) | 宿主集成、编辑器、作者工具与导出 |
12
+ | [compatibility/](compatibility/) | 版本兼容、迁移与源码版本标记 |
13
+ | [development/](development/) | 组件开发、协议、性能与发布流程 |
14
+ | [releases/](releases/) | 各版本发布记录 |
15
+
16
+ ## 从这里开始
17
+
18
+ - **编写文档**:先读[入门指南](guides/local-guide-ch.md),再查语法参考;可运行的示例见 [examples/local](../examples/local/README-ch.md)。
19
+ - **接入项目**:从[本地模式集成](integration/local-integration-ch.md)开始,独立项目示例见 [examples/integration](../examples/integration/README-ch.md)。
20
+ - **升级版本**:先查[兼容性](compatibility/compatibility-ch.md),再读目标版本的发布记录。当前文档版本为 0.7.0;各版本记录保留当时的行为与迁移说明。
21
+
22
+ ## 入门
23
+
24
+ | 主题 | 中文 |
25
+ | --- | --- |
26
+ | 新用户入门 | [中文](guides/local-guide-ch.md) |
27
+
28
+ ## 参考
29
+
30
+ | 主题 | 中文 |
31
+ | --- | --- |
32
+ | 本地交互语法 | [中文](reference/local-interaction-syntax-ch.md) |
33
+ | 本地组件 | [中文](reference/local-components-v2-ch.md) |
34
+ | 计算与格式化 | [中文](reference/computations-formatting-ch.md) |
35
+ | 约束与集合 | [中文](reference/constraints-collections-ch.md) |
36
+ | 诊断与计数 | [中文](reference/diagnostics-counting-ch.md) |
37
+ | HTML 兼容 | [中文](reference/html-compatibility-ch.md) |
38
+ | 严格模式与局部恢复 | [中文](reference/tolerance-ch.md) |
39
+ | 主题协议 | [中文](reference/theme-protocol-ch.md) |
40
+
41
+ ## 接入
42
+
43
+ | 主题 | 中文 |
44
+ | --- | --- |
45
+ | 本地模式集成 | [中文](integration/local-integration-ch.md) |
46
+ | 单次编译入口(工作区新增) | [中文](integration/compiler-ch.md) |
47
+ | 扩展 SDK 预览 | [中文](integration/extension-sdk-ch.md) |
48
+ | React 源码编辑器 | [中文](integration/editor-ch.md) |
49
+ | 作者工具 | [中文](integration/author-tools-ch.md) |
50
+ | 分享与静态导出 | [中文](integration/shareable-export-ch.md) |
51
+
52
+ ## 兼容与迁移
53
+
54
+ | 主题 | 中文 |
55
+ | --- | --- |
56
+ | 版本与兼容性 | [中文](compatibility/compatibility-ch.md) |
57
+ | 源码版本标记 | [中文](compatibility/source-versioning-ch.md) |
58
+
59
+ ## 开发维护
60
+
61
+ | 主题 | 中文 |
62
+ | --- | --- |
63
+ | 组件插件开发 | [中文](development/component-development-ch.md) |
64
+ | 组件协议 | [中文](development/component-protocol-ch.md) |
65
+ | 性能 | [优化历史与当前复测总览](development/performance-overview-ch.md) |
66
+ | 发布流程 | [中文](development/releasing-ch.md) |
67
+ | local 模块目录与归属 | [中文](development/local-module-layout-ch.md) |
68
+
69
+ ## 发布记录
70
+
71
+ | 版本 | 中文 |
72
+ | --- | --- |
73
+ | 0.7.0 | [中文](releases/release-0.7.0-ch.md) |
74
+ | 0.6.1 | [中文](releases/release-0.6.1-ch.md) |
75
+ | 0.6.0 | [中文](releases/release-0.6.0-ch.md) |
76
+ | 0.5.3 | [中文](releases/release-0.5.3-ch.md) |
77
+ | 0.5.2 | [中文](releases/release-0.5.2-ch.md) |
78
+ | 0.5.1 | [中文](releases/release-0.5.1-ch.md) |
79
+ | 0.5.0 | [中文](releases/release-0.5.0-ch.md) |
80
+ | 0.4.1 | [中文](releases/release-0.4.1-ch.md) |
81
+ | 0.4.0 | [中文](releases/release-0.4.0-ch.md) |
82
+
83
+ ## 相关资料
84
+
85
+ - 项目概览:[中文](../README-ch.md)
86
+ - 更新日志:[中文](../CHANGELOG-ch.md)
87
+ - 贡献指南:[中文](../CONTRIBUTING-ch.md)
88
+ - 一致性用例:[examples/conformance](../examples/conformance/README-ch.md)
89
+
90
+ 新增文档时放入对应目录,在本页补充中文链接,并运行 `npm run test:docs` 检查本地链接和标题锚点。
package/docs/README.md CHANGED
@@ -1,84 +1,90 @@
1
- # 文档导航 · Documentation
1
+ # Documentation
2
2
 
3
- 文档按用途分类,每个主题都有中文(`-ch.md`)和英文(`-en.md`)版本。
4
- Documents are grouped by purpose, with Chinese and English versions of each topic.
3
+ **English** · [中文](README-ch.md)
5
4
 
6
- | 目录 / Directory | 内容 / Contents |
5
+ Documents are grouped by purpose. Each topic has an English version (`-en.md`); the Chinese navigation is [README-ch.md](README-ch.md).
6
+
7
+ | Directory | Contents |
8
+ | --- | --- |
9
+ | [guides/](guides/) | Getting started |
10
+ | [reference/](reference/) | Syntax, components and themes |
11
+ | [integration/](integration/) | Integration, editor, author tools and export |
12
+ | [compatibility/](compatibility/) | Compatibility, migration and source versioning |
13
+ | [development/](development/) | Development, protocols, performance and publishing |
14
+ | [releases/](releases/) | Release notes |
15
+
16
+ ## Start here
17
+
18
+ - **Authors**: read the [beginner guide](guides/local-guide-en.md), then the syntax reference. Runnable examples are in [examples/local](../examples/local/README.md).
19
+ - **Integrators**: start with [local mode integration](integration/local-integration-en.md). Copyable projects are in [examples/integration](../examples/integration/README.md).
20
+ - **Upgrading**: check [compatibility](compatibility/compatibility-en.md), then the release notes for the target version. The current documentation baseline is 0.7.0; older release pages keep the behavior and migration notes of their release.
21
+
22
+ ## Guides
23
+
24
+ | Topic | English |
25
+ | --- | --- |
26
+ | Beginner guide | [English](guides/local-guide-en.md) |
27
+
28
+ ## Reference
29
+
30
+ | Topic | English |
31
+ | --- | --- |
32
+ | Local interaction syntax | [English](reference/local-interaction-syntax-en.md) |
33
+ | Local components v2 | [English](reference/local-components-v2-en.md) |
34
+ | Computations and formatting | [English](reference/computations-formatting-en.md) |
35
+ | Constraints and collections | [English](reference/constraints-collections-en.md) |
36
+ | Diagnostics and counting | [English](reference/diagnostics-counting-en.md) |
37
+ | HTML compatibility | [English](reference/html-compatibility-en.md) |
38
+ | Strict parsing and local recovery | [English](reference/tolerance-en.md) |
39
+ | Theme protocol | [English](reference/theme-protocol-en.md) |
40
+
41
+ ## Integration
42
+
43
+ | Topic | English |
44
+ | --- | --- |
45
+ | Local mode integration | [English](integration/local-integration-en.md) |
46
+ | One-shot compilation (new in workspace) | [English](integration/compiler-en.md) |
47
+ | Extension SDK preview | [English](integration/extension-sdk-en.md) |
48
+ | React source editor | [English](integration/editor-en.md) |
49
+ | Author tools | [English](integration/author-tools-en.md) |
50
+ | Sharing and static export | [English](integration/shareable-export-en.md) |
51
+
52
+ ## Compatibility and migration
53
+
54
+ | Topic | English |
55
+ | --- | --- |
56
+ | Versions and compatibility | [English](compatibility/compatibility-en.md) |
57
+ | Source versioning | [English](compatibility/source-versioning-en.md) |
58
+
59
+ ## Development
60
+
61
+ | Topic | English |
62
+ | --- | --- |
63
+ | Component plugin development | [English](development/component-development-en.md) |
64
+ | Component protocol | [English](development/component-protocol-en.md) |
65
+ | Local module layout | [English](development/local-module-layout-en.md) |
66
+ | Performance | [English](development/performance-overview-en.md) |
67
+ | Publishing | [English](development/releasing-en.md) |
68
+
69
+ ## Releases
70
+
71
+ | Version | English |
7
72
  | --- | --- |
8
- | [guides/](guides/) | 入门指南 / Getting started |
9
- | [reference/](reference/) | 语法、组件与主题参考 / Syntax, components and themes |
10
- | [integration/](integration/) | 宿主集成、编辑器、作者工具与导出 / Integration, editor, author tools and export |
11
- | [compatibility/](compatibility/) | 版本兼容、迁移与源码版本标记 / Compatibility, migration and source versioning |
12
- | [development/](development/) | 组件开发、协议、性能与发布流程 / Development, protocols, performance and publishing |
13
- | [releases/](releases/) | 各版本发布记录 / Release notes |
14
-
15
- ## 从这里开始 · Start here
16
-
17
- - **编写文档 / Authors**:先读[入门指南](guides/local-guide-ch.md)([English](guides/local-guide-en.md)),再查语法参考;可运行的示例见 [examples/local](../examples/local/README.md)。
18
- - **接入项目 / Integrators**:从[本地模式集成](integration/local-integration-ch.md)([English](integration/local-integration-en.md))开始,独立项目示例见 [examples/integration](../examples/integration/README.md)。
19
- - **升级版本 / Upgrading**:先查[兼容性](compatibility/compatibility-ch.md)([English](compatibility/compatibility-en.md)),再读目标版本的发布记录。当前文档版本为 0.6.0;各版本记录保留当时的行为与迁移说明。
20
-
21
- ## 入门 · Guides
22
-
23
- | 主题 / Topic | 中文 | English |
24
- | --- | --- | --- |
25
- | 新用户入门 / Beginner guide | [中文](guides/local-guide-ch.md) | [English](guides/local-guide-en.md) |
26
-
27
- ## 参考 · Reference
28
-
29
- | 主题 / Topic | 中文 | English |
30
- | --- | --- | --- |
31
- | 本地交互语法 / Local interaction syntax | [中文](reference/local-interaction-syntax-ch.md) | [English](reference/local-interaction-syntax-en.md) |
32
- | 本地组件 / Local components v2 | [中文](reference/local-components-v2-ch.md) | [English](reference/local-components-v2-en.md) |
33
- | 计算与格式化 / Computations and formatting | [中文](reference/computations-formatting-ch.md) | [English](reference/computations-formatting-en.md) |
34
- | 约束与集合 / Constraints and collections | [中文](reference/constraints-collections-ch.md) | [English](reference/constraints-collections-en.md) |
35
- | 诊断与计数 / Diagnostics and counting | [中文](reference/diagnostics-counting-ch.md) | [English](reference/diagnostics-counting-en.md) |
36
- | HTML 兼容 / HTML compatibility | [中文](reference/html-compatibility-ch.md) | [English](reference/html-compatibility-en.md) |
37
- | 主题协议 / Theme protocol | [中文](reference/theme-protocol-ch.md) | [English](reference/theme-protocol-en.md) |
38
-
39
- ## 接入 · Integration
40
-
41
- | 主题 / Topic | 中文 | English |
42
- | --- | --- | --- |
43
- | 本地模式集成 / Local mode integration | [中文](integration/local-integration-ch.md) | [English](integration/local-integration-en.md) |
44
- | React 源码编辑器 / React source editor | [中文](integration/editor-ch.md) | [English](integration/editor-en.md) |
45
- | 作者工具 / Author tools | [中文](integration/author-tools-ch.md) | [English](integration/author-tools-en.md) |
46
- | 分享与静态导出 / Sharing and static export | [中文](integration/shareable-export-ch.md) | [English](integration/shareable-export-en.md) |
47
-
48
- ## 兼容与迁移 · Compatibility and migration
49
-
50
- | 主题 / Topic | 中文 | English |
51
- | --- | --- | --- |
52
- | 版本与兼容性 / Versions and compatibility | [中文](compatibility/compatibility-ch.md) | [English](compatibility/compatibility-en.md) |
53
- | 源码版本标记 / Source versioning | [中文](compatibility/source-versioning-ch.md) | [English](compatibility/source-versioning-en.md) |
54
-
55
- ## 开发维护 · Development
56
-
57
- | 主题 / Topic | 中文 | English |
58
- | --- | --- | --- |
59
- | 组件开发 / Component development | [中文](development/component-development-ch.md) | [English](development/component-development-en.md) |
60
- | 组件协议 / Component protocol | [中文](development/component-protocol-ch.md) | [English](development/component-protocol-en.md) |
61
- | 性能 / Performance | [中文](development/performance-ch.md) | [English](development/performance-en.md) |
62
- | 发布流程 / Publishing | [中文](development/releasing-ch.md) | [English](development/releasing-en.md) |
63
-
64
- ## 发布记录 · Releases
65
-
66
- | 版本 / Version | 中文 | English |
67
- | --- | --- | --- |
68
- | 0.6.0 | [中文](releases/release-0.6.0-ch.md) | [English](releases/release-0.6.0-en.md) |
69
- | 0.5.3 | [中文](releases/release-0.5.3-ch.md) | [English](releases/release-0.5.3-en.md) |
70
- | 0.5.2 | [中文](releases/release-0.5.2-ch.md) | [English](releases/release-0.5.2-en.md) |
71
- | 0.5.1 | [中文](releases/release-0.5.1-ch.md) | [English](releases/release-0.5.1-en.md) |
72
- | 0.5.0 | [中文](releases/release-0.5.0-ch.md) | [English](releases/release-0.5.0-en.md) |
73
- | 0.4.1 | [中文](releases/release-0.4.1-ch.md) | [English](releases/release-0.4.1-en.md) |
74
- | 0.4.0 | [中文](releases/release-0.4.0-ch.md) | [English](releases/release-0.4.0-en.md) |
75
-
76
- ## 相关资料 · Related resources
77
-
78
- - 项目概览 / Project overview:[中文](../README-ch.md) · [English](../README-en.md)
79
- - 更新日志 / Changelog:[中文](../CHANGELOG-ch.md) · [English](../CHANGELOG.md)
80
- - 贡献指南 / Contributing:[中文](../CONTRIBUTING-ch.md) · [English](../CONTRIBUTING.md)
81
- - 一致性用例 / Conformance fixtures:[examples/conformance](../examples/conformance/README.md)
82
-
83
- 新增文档时放入对应目录,在本页补充中英文链接,并运行 `npm run test:docs` 检查本地链接和标题锚点。
84
- When adding a topic, place both language versions in the matching directory, list them here, and run `npm run test:docs`.
73
+ | 0.7.0 | [English](releases/release-0.7.0-en.md) |
74
+ | 0.6.1 | [English](releases/release-0.6.1-en.md) |
75
+ | 0.6.0 | [English](releases/release-0.6.0-en.md) |
76
+ | 0.5.3 | [English](releases/release-0.5.3-en.md) |
77
+ | 0.5.2 | [English](releases/release-0.5.2-en.md) |
78
+ | 0.5.1 | [English](releases/release-0.5.1-en.md) |
79
+ | 0.5.0 | [English](releases/release-0.5.0-en.md) |
80
+ | 0.4.1 | [English](releases/release-0.4.1-en.md) |
81
+ | 0.4.0 | [English](releases/release-0.4.0-en.md) |
82
+
83
+ ## Related resources
84
+
85
+ - Project overview: [English](../README-en.md)
86
+ - Changelog: [English](../CHANGELOG.md)
87
+ - Contributing: [English](../CONTRIBUTING.md)
88
+ - Conformance fixtures: [examples/conformance](../examples/conformance/README.md)
89
+
90
+ When adding a topic, place the English version in the matching directory, add it here, and run `npm run test:docs`.
@@ -1,32 +1,35 @@
1
1
  # 版本与兼容性
2
2
 
3
- Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可持久化的内容、诊断契约和当前平台范围。显式修订声明、迁移 API 与 `reactive-md migrate` 见[源码修订与迁移](source-versioning-ch.md),公开 API 与样式接入见[本地模式集成](../integration/local-integration-ch.md),当前版本见[0.6.1 发布说明](../releases/release-0.6.1-ch.md),该 minor 系列见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
3
+ **中文** · [English](compatibility-en.md)
4
+
5
+ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可持久化的内容、诊断契约和当前平台范围。显式修订声明、迁移 API 与 `reactive-md migrate` 见[源码修订与迁移](source-versioning-ch.md),公开 API 与样式接入见[本地模式集成](../integration/local-integration-ch.md),本版本见[0.8.0 发布说明](../releases/release-0.8.0-ch.md),上一版本见[0.7.0 发布说明](../releases/release-0.7.0-ch.md),该 minor 系列见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
4
6
 
5
7
  ## 版本对应
6
8
 
7
9
  | 项目 | 当前值 | 说明 |
8
10
  | --- | --- | --- |
9
- | 包版本 | `0.6.1` | 0.x 预览版;0.6.1 同时提供于 `latest` 与 `next` |
10
- | 分发标签 | `latest` → `0.6.1`;`next` → `0.6.1` | 默认安装使用 `latest` |
11
- | 语法版本 | `local-draft-2` | `LOCAL_SYNTAX_VERSION`;当前构建只接受这一修订 |
12
- | 源码修订指令 | 可选 `<!-- reactive-md: local-draft-2 -->` | 文档前导区中的一行;无指令源码继续按当前修订解析 |
13
- | 组块协议 | `component-protocol-2` | 贡献与验收契约,见[组块协议](../development/component-protocol-ch.md);不是运行时版本选择参数 |
11
+ | 包版本 | `0.8.0` | 稳定版,2026-11-12 |
12
+ | 分发标签 | `latest`:`0.8.0` | `next` 独立维护;使用该渠道前请查询 npm |
13
+ | SDK 契约 | `0.7.0` | `LOCAL_SDK_VERSION`;与包版本独立,`0.8.0` 不改变它 |
14
+ | 语法版本 | `local-draft-3` | `LOCAL_SYNTAX_VERSION`;本包只接受这一修订 |
15
+ | 源码修订指令 | 可选 `<!-- reactive-md: local-draft-3 -->` | 文档前导区中的一行;无指令源码继续按当前修订解析 |
16
+ | 组块协议 | `component-protocol-3` | 贡献与验收契约,见[组块协议](../development/component-protocol-ch.md);不是运行时版本选择参数 |
14
17
  | 主题协议 | `reactive-md-theme-1` | 文档主题与宿主 CSS 接入 |
15
18
  | 作者工具入口 | `reactive-md/authoring` | schema、目录与编辑辅助函数,不加载 React 或 CSS |
16
19
  | 无样式 React 入口 | `reactive-md/react/unstyled` | 不依赖样式表的 React 渲染器 |
17
20
  | 核心入口 | `reactive-md` | 编译、表达式与运行时,不加载 React |
18
21
  | React 入口 | `reactive-md/react` | `LocalReactiveDocument`、`LocalDocumentView` |
19
- | 编辑器入口 | `reactive-md/editor` | `ReactiveMarkdownEditor` 及其类型;需要 React 19 |
22
+ | 编辑器入口 | `reactive-md-editor` | 独立 `0.1.0` 包中的 `ReactiveMarkdownEditor` 及其类型;需要 React 19。引擎 0.8 不再导出 `reactive-md/editor` |
20
23
  | 渲染器样式入口 | `reactive-md/styles.css` | 文档与组块样式,由宿主显式引入 |
21
24
  | 屏幕样式入口 | `reactive-md/screen.css` | `reactive-md/styles.css` 的别名 |
22
25
  | 打印样式入口 | `reactive-md/print.css` | 可选的文档打印布局与页边距 |
23
- | 编辑器样式入口 | `reactive-md/editor/styles.css` | 独立编辑器样式,作用域限定在编辑器根节点 |
26
+ | 编辑器样式入口 | `reactive-md-editor/styles.css` | 独立编辑器样式,作用域限定在编辑器根节点 |
24
27
 
25
28
  一个包版本只对应一个语法修订。升级包之前,记录应用使用的 `LOCAL_SYNTAX_VERSION`。如果文档源码来自另一个语法修订,保留旧包版本渲染,或按下面的迁移说明改写。`compileLocal(source, options?)` 不提供语法版本参数;宿主可以通过 `options.limits.maxSyntaxNodes` 调整单次编译的语法节点预算,见[本地模式集成](../integration/local-integration-ch.md)。
26
29
 
27
30
  ## 显式源码修订
28
31
 
29
- 源码可以在前导区用一行 `<!-- reactive-md: local-draft-2 -->` 声明修订。无指令源码按当前修订读取,不新增警告。显式 `local-draft-1` 或未知修订会以 `local.version.*` 诊断拒绝,不创建运行时;声明旧修订不会选择旧解析器。格式错误、重复和位置错误的指令同样被拒绝。
32
+ 源码可以在前导区用一行 `<!-- reactive-md: local-draft-3 -->` 声明修订。无指令源码按当前修订读取,不新增警告。显式旧修订(例如 `local-draft-1`、`local-draft-2`)或未知修订会以 `local.version.*` 诊断拒绝,不创建运行时;声明旧修订不会选择旧解析器。格式错误、重复和位置错误的指令同样被拒绝。
30
33
 
31
34
  在这一指令出现之前构建的读者(包括 `0.3.1`)会把它当作普通注释,不执行这项检查。依赖检查前请先迁移旧文档。`inspectLocalSourceVersion`、`checkLocalUpgrade` 和 `migrateLocalSource` 在编译器之外读取声明,`reactive-md migrate` 对单份源码执行元数据迁移。见[源码修订与迁移](source-versioning-ch.md)。
32
35
 
@@ -57,6 +60,10 @@ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可
57
60
 
58
61
  `0.6.1` 将公式展示改为 KaTeX,随包提供 WOFF2 数学字体和用于辅助技术的 MathML。绘图求值与协议修订保持不变。无效公式给出警告,并回退为有界原文。`align` 现在自动按行编号;使用 `align*` 或 `aligned` 可省略自动编号。见[0.6.1 发布说明](../releases/release-0.6.1-ch.md)。
59
62
 
63
+ `0.8.0` 将源码编辑器移出引擎包。把 `reactive-md/editor` 替换为 `reactive-md-editor`,`reactive-md/editor/codemirror` 替换为 `reactive-md-editor/codemirror`,并替换对应的 `styles.css` 导入。`reactive-md-editor@0.1.0` 需要单独安装,要求 React 19,并在引擎之后发布。语法 `local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 和 `0.7.0` SDK 契约保持不变,文档源码和状态文件无需迁移。新增的编译入口、运行时服务和 Vite 目录发现均为增量能力。见[0.8.0 发布说明](../releases/release-0.8.0-ch.md)。
64
+
65
+ `0.7.0` 建立 `local-draft-3`,并把组块协议提升为 `component-protocol-3`。`local-draft-3` 新增 `<external>` 只读声明和动态 `min`/`max`/`required` 约束;`component-protocol-3` 新增宿主 inline/container 形态与标量绑定。显式声明 `local-draft-1` 或 `local-draft-2` 的文档会被拒绝,升级前请使用 `reactive-md migrate`;从 `local-draft-2` 迁移时,新激活的 `<external>` 标签会被阻止。编辑器只使用 CM6,移除 `textareaRef` / `getTextarea`,`reactive-md/editor/codemirror` 保留为别名。公开扩展 SDK 随本版本发布。见[0.7.0 发布说明](../releases/release-0.7.0-ch.md)。
66
+
60
67
  `0.6.0` 新增原生 HTML 表格、`align` 与链接 `target`/`rel`、更多数学环境与命令、mhchem 化学式和扩展代码高亮,并把图解改为分层布局。无法解析的原生 HTML 改为按原文回退。`compileLocal` 的返回值只包含普通对象和数组,编辑器新增 `insertText`。语法、组块和主题修订均保持不变,现有导入继续有效。见[0.6.0 发布说明](../releases/release-0.6.0-ch.md)。
61
68
 
62
69
  `0.5.3` 新增宿主作者工具、统一编译选项、数学降级诊断,以及独立的屏幕与打印样式。现有入口继续有效;需要文档打印布局时显式引入 `reactive-md/print.css`。语法、组块和主题修订均保持不变。见[0.5.3 发布说明](../releases/release-0.5.3-ch.md)。
@@ -69,11 +76,11 @@ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可
69
76
 
70
77
  `0.4.0` 建立 `local-draft-2`。使用受支持 `local-draft-1` 写法的无指令源码继续有效;显式 `local-draft-1` 声明在迁移前会被拒绝。构建新增识别 15 个标签名:十个 `local-draft-2` 组块,以及 `computed`、`const`、`validation`、`data-table`、`column`。以前作为未知标签或普通文字显示的内容现在会解析为组块或声明;字面示例应移入行内代码或代码围栏。开头的 `<theme>` 声明是文档元数据,不计入组块。完整的重命名与升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
71
78
 
72
- 作者可见的语法变化会建立新的语法修订,例如本次的 `local-draft-2`,并提升次版本、更新 `LOCAL_SYNTAX_VERSION`。核心或 React API 的变化也会记录在变更记录中。项目不自动改写文档正文。`reactive-md migrate` 迁移单份源码的元数据声明,并阻止正文级冲突;升级后由作者或宿主按记录完成其余源码修改。
79
+ 作者可见的语法变化会建立新的语法修订,例如 `local-draft-3`,并提升次版本、更新 `LOCAL_SYNTAX_VERSION`。核心或 React API 的变化也会记录在变更记录中。项目不自动改写文档正文。`reactive-md migrate` 迁移单份源码的元数据声明,并阻止正文级冲突;升级后由作者或宿主按记录完成其余源码修改。
73
80
 
74
- 旧版配置语法不属于 `local-draft-2`。常见替换如下:
81
+ 旧版配置语法不属于 `local-draft-3`。常见替换如下:
75
82
 
76
- | 旧写法 | `local-draft-2` 中的做法 |
83
+ | 旧写法 | `local-draft-3` 中的做法 |
77
84
  | --- | --- |
78
85
  | `:::card`、`:::row` 等 directive | `<card>`、`<grid>` 等标签 |
79
86
  | YAML `state:` 声明参数 | 控件上的 `bind` 与 `initial` |
@@ -104,7 +111,8 @@ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可
104
111
  | --- | --- |
105
112
  | Node.js 22.12+ | 开发和 Node 端消费的最低版本;CI 目标为 22.12 与 24 |
106
113
  | ESM | 唯一模块格式;不提供 CommonJS 入口 |
107
- | React 19 | `reactive-md/react` 和 `reactive-md/editor` 的要求;核心入口不依赖 React |
114
+ | React 19 | `reactive-md/react` 和独立的 `reactive-md-editor` 包的要求;核心入口不依赖 React |
115
+ | Vite 8 | `reactive-md` 的可选 peer,仅在使用的 `reactive-md/vite` 时需要 |
108
116
  | Microsoft Edge(Chromium 内核) | 本地浏览器验证使用 Edge |
109
117
  | Playwright Chromium | Linux CI 的完整浏览器验证 |
110
118
  | Playwright Firefox、WebKit | 1280px、375px 核心流程,包含个人文档和交互 HTML 导出;纳入浏览器发布门禁与 CI |
@@ -118,4 +126,4 @@ Node 端消费指在 Node 中导入 `reactive-md`、调用 `compileLocal` 和 `c
118
126
  语言范围见[语法规范](../reference/local-interaction-syntax-ch.md),安全边界与宿主责任见[安全策略](../../SECURITY-ch.md)。
119
127
 
120
128
 
121
- 新增组块、颜色、槽位状态与迁移规则见[local-draft-2 扩展说明](../reference/local-components-v2-ch.md),升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。0.6.1 同时提供于 `latest` 与 `next`。
129
+ 新增组块、颜色、槽位状态与迁移规则见[local-draft-2 扩展说明](../reference/local-components-v2-ch.md),升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。`0.8.0` 使用 `latest` 渠道。
@@ -1,32 +1,35 @@
1
1
  # Versions and compatibility
2
2
 
3
- 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.6.1 release notes](../releases/release-0.6.1-en.md) for the current release, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for that minor series.
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.8.0 release notes](../releases/release-0.8.0-en.md) for this release, the [0.7.0 release notes](../releases/release-0.7.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.
4
6
 
5
7
  ## Version mapping
6
8
 
7
9
  | Item | Current value | Notes |
8
10
  | --- | --- | --- |
9
- | Package version | `0.6.1` | 0.x preview; 0.6.1 is available on both `latest` and `next` |
10
- | Distribution tags | `latest` → `0.6.1`; `next` → `0.6.1` | Default installs use `latest` |
11
- | Syntax version | `local-draft-2` | `LOCAL_SYNTAX_VERSION`; the current build accepts only this revision |
12
- | Source revision directive | Optional `<!-- reactive-md: local-draft-2 -->` | One line in the document prologue; unversioned source keeps current-revision behavior |
13
- | Component protocol | `component-protocol-2` | Contribution and acceptance contract, see [Component protocol](../development/component-protocol-en.md); not a runtime version selection parameter |
11
+ | Package version | `0.8.0` | Stable release, 2026-11-12 |
12
+ | Distribution tags | `latest`: `0.8.0` | `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.8.0` |
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 |
14
17
  | Theme protocol | `reactive-md-theme-1` | Document themes and host CSS integration |
15
18
  | Authoring entry | `reactive-md/authoring` | Schema, catalog and editor helpers, without React or CSS |
16
19
  | Unstyled React entry | `reactive-md/react/unstyled` | React renderer without a stylesheet dependency |
17
20
  | Core entry | `reactive-md` | Compilation, expressions and runtime, without loading React |
18
21
  | React entry | `reactive-md/react` | `LocalReactiveDocument`, `LocalDocumentView` |
19
- | Editor entry | `reactive-md/editor` | `ReactiveMarkdownEditor` and its types; requires React 19 |
22
+ | Editor entry | `reactive-md-editor` | `ReactiveMarkdownEditor` and its types in the separate `0.1.0` package; requires React 19. Engine 0.8 no longer exports `reactive-md/editor` |
20
23
  | Renderer style entry | `reactive-md/styles.css` | Document and component styles, explicitly imported by the host |
21
24
  | Screen style entry | `reactive-md/screen.css` | Alias of `reactive-md/styles.css` |
22
25
  | Print style entry | `reactive-md/print.css` | Optional document print layout and page margins |
23
- | Editor style entry | `reactive-md/editor/styles.css` | Independent editor styles, scoped to the editor root |
26
+ | Editor style entry | `reactive-md-editor/styles.css` | Independent editor styles, scoped to the editor root |
24
27
 
25
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).
26
29
 
27
30
  ## Explicit source revisions
28
31
 
29
- A source may declare its revision with one `<!-- reactive-md: local-draft-2 -->` line in the prologue. Unversioned source is read as the current revision, without a new warning. An explicit `local-draft-1` 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.
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.
30
33
 
31
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).
32
35
 
@@ -57,6 +60,10 @@ Regression data in [the historical corpus](../../examples/conformance/history/v0
57
60
 
58
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).
59
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
+
60
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).
61
68
 
62
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).
@@ -69,11 +76,11 @@ Regression data in [the historical corpus](../../examples/conformance/history/v0
69
76
 
70
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.
71
78
 
72
- Author-visible syntax changes establish a new syntax revision, such as `local-draft-2`, 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.
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.
73
80
 
74
- Legacy configuration syntax is not part of `local-draft-2`. Common replacements:
81
+ Legacy configuration syntax is not part of `local-draft-3`. Common replacements:
75
82
 
76
- | Old form | What to do in `local-draft-2` |
83
+ | Old form | What to do in `local-draft-3` |
77
84
  | --- | --- |
78
85
  | Directives such as `:::card`, `:::row` | Tags such as `<card>`, `<grid>` |
79
86
  | YAML `state:` declaring parameters | `bind` and `initial` on controls |
@@ -104,7 +111,8 @@ See [Diagnostics and counting rules](../reference/diagnostics-counting-en.md) fo
104
111
  | --- | --- |
105
112
  | Node.js 22.12+ | Minimum for development and Node-side consumption; CI targets both 22.12 and 24 |
106
113
  | ESM | The only module format; no CommonJS entry |
107
- | React 19 | Required by `reactive-md/react` and `reactive-md/editor`; the core entry does not depend on React |
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` |
108
116
  | Microsoft Edge (Chromium-based) | Local browser verification has used Edge |
109
117
  | Playwright Chromium | Full Linux CI browser suite |
110
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 |
@@ -118,4 +126,4 @@ Node-side consumption means importing `reactive-md` in Node and calling `compile
118
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.
119
127
 
120
128
 
121
- See [local-draft-2 components and migration](../reference/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.1 is available on both `latest` and `next`.
129
+ See [local-draft-2 components and migration](../reference/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.8.0` uses the `latest` channel.
@@ -1,5 +1,7 @@
1
1
  # 源码修订与迁移
2
2
 
3
+ **中文** · [English](source-versioning-en.md)
4
+
3
5
  本文说明 `0.4.0` 中的显式源码修订、编译器的处理方式,以及纯核心 API 与 CLI 迁移工具。语法规则见[语法规范](../reference/local-interaction-syntax-ch.md),包版本与 API 兼容规则见[版本与兼容性](compatibility-ch.md),组块升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
4
6
 
5
7
  ## 声明修订
@@ -7,7 +9,7 @@
7
9
  源码用一行 HTML 注释声明修订:
8
10
 
9
11
  ```markdown
10
- <!-- reactive-md: local-draft-2 -->
12
+ <!-- reactive-md: local-draft-3 -->
11
13
  ```
12
14
 
13
15
  该指令属于文档前导区,位于 `<theme>` 声明和正文之前。BOM、空行和普通 Markdown 注释可以出现在它前面。只允许一条指令。
@@ -18,8 +20,9 @@
18
20
 
19
21
  | 源码 | 结果 |
20
22
  | --- | --- |
21
- | 没有指令 | 按当前修订 `local-draft-2` 解析,与之前一致;不新增警告 |
22
- | `local-draft-2` | 正常解析 |
23
+ | 没有指令 | 按当前修订 `local-draft-3` 解析;不新增警告 |
24
+ | `local-draft-3` | 正常解析 |
25
+ | `local-draft-1` 或 `local-draft-2` | 以 `local.version.*` 诊断拒绝;先迁移 |
23
26
  | `local-draft-1` 或其他显式旧修订 | 以 `local.version.*` 诊断拒绝 |
24
27
  | 未知、格式错误、重复或位置错误的指令 | 以 `local.version.*` 诊断拒绝 |
25
28
 
@@ -50,7 +53,7 @@ const info = inspectLocalSourceVersion(source);
50
53
  - `range` 指向原始源码中的指令;没有指令时为 `null`。
51
54
  - `diagnostics` 使用 `local.version.*` 前缀报告格式错误、重复、位置错误、旧修订或未知声明。
52
55
 
53
- 无指令源码返回 `declaredVersion: null`、`effectiveVersion: 'local-draft-2'`、`supported: true`,不产生版本诊断。
56
+ 无指令源码返回 `declaredVersion: null`、`effectiveVersion: 'local-draft-3'`、`supported: true`,不产生版本诊断。
54
57
 
55
58
  ## 检查升级
56
59
 
@@ -61,7 +64,7 @@ const check = checkLocalUpgrade(source);
61
64
  // {
62
65
  // ok: boolean,
63
66
  // fromVersion: string,
64
- // toVersion: 'local-draft-2',
67
+ // toVersion: 'local-draft-3',
65
68
  // needsMigration: boolean,
66
69
  // diagnostics: Diagnostic[]
67
70
  // }
@@ -78,7 +81,7 @@ type LocalUpgradeOptions = {
78
81
  const check = checkLocalUpgrade(oldSource, { fromVersion: 'local-draft-1' });
79
82
  ```
80
83
 
81
- 无版本声明的历史文档需要传入 `fromVersion: 'local-draft-1'`,才会执行 draft-1 检查。显式 `fromVersion` 与声明不一致时,检查被拒绝。迁移源只接受 `local-draft-1` 和当前的 `local-draft-2`;旧版 YAML 修订和未知名称会被拒绝。
84
+ 无版本声明的历史文档需要传入 `fromVersion: 'local-draft-1'`,才会执行 draft-1 检查。显式 `fromVersion` 与声明不一致时,检查被拒绝。迁移源接受 `local-draft-1`、`local-draft-2` 和当前的 `local-draft-3`;旧版 YAML 修订和未知名称会被拒绝。
82
85
 
83
86
  `needsMigration` 表示源码需要写入或替换声明:无声明源码需要补上当前指令,当前源码已经完整,draft-1 源码需要替换指令。版本变化本身可以识别、但存在阻止安全迁移的条件时,`ok` 为 `false`。
84
87
 
@@ -91,7 +94,7 @@ const result = migrateLocalSource(oldSource, { fromVersion: 'local-draft-1' });
91
94
  // {
92
95
  // ok: boolean,
93
96
  // fromVersion: string,
94
- // toVersion: 'local-draft-2',
97
+ // toVersion: 'local-draft-3',
95
98
  // needsMigration: boolean,
96
99
  // diagnostics: Diagnostic[],
97
100
  // source: string,
@@ -102,10 +105,10 @@ const result = migrateLocalSource(oldSource, { fromVersion: 'local-draft-1' });
102
105
 
103
106
  迁移只写入或替换元数据注释,保留正文。正文原始字节、UTF-8 BOM 和 CRLF 换行保持不变;操作幂等,已迁移到当前版本的源码返回 `changed: false` 和相同文本。`edits` 定位每处替换。迁移被阻止时不产生迁移结果,调用方传入的内容保持不变。
104
107
 
105
- 把 `local-draft-1` 源码迁移到 `local-draft-2` 之前,迁移会阻止:
108
+ 把 `local-draft-1` 源码迁移到 `local-draft-3` 之前,迁移会阻止:
106
109
 
107
110
  - 使用 17 个新增保留表达式名的绑定:`sum`、`average`、`minOf`、`maxOf`、`formatNumber`、`formatPercent`、`formatScientific`、`formatCurrency`、`trim`、`lower`、`upper`、`startsWith`、`endsWith`、`replace`、`slice`、`dateCompare`、`dateDiff`;
108
- - 代码之外出现的 15 个新增可识别标签名:`jump`、`anchor`、`text`、`section`、`multi-select`、`range-slider`、`coordinate`、`quiz`、`steps`、`step`、`computed`、`const`、`validation`、`data-table`、`column`;
111
+ - 代码之外出现的、在旧修订中不执行的新增标签名:`jump`、`anchor`、`text`、`section`、`multi-select`、`range-slider`、`coordinate`、`quiz`、`steps`、`step`、`computed`、`const`、`validation`、`data-table`、`column`、`external`;
109
112
  - 表达式中的数组语法或新增内置函数调用;字符串字面量中的文本不触发此检查;
110
113
  - 源码当前的编译错误。
111
114
 
@@ -139,7 +142,7 @@ reactive-md migrate old.reactive.md --from local-draft-1 --accept-semantic-chang
139
142
  | 选项 | 含义 |
140
143
  | --- | --- |
141
144
  | `[file\|-]` | 输入文件;`-` 表示标准输入 |
142
- | `--from local-draft-1\|local-draft-2` | 源修订;默认取声明或当前修订 |
145
+ | `--from local-draft-1\|local-draft-2\|local-draft-3` | 源修订;默认取声明或当前修订 |
143
146
  | `--check` | 只报告是否需要迁移,从不写入 |
144
147
  | `--json` | 标准输出结构化报告,且是唯一的 stdout 内容 |
145
148
  | `-o, --output <file>` | 新建文件;拒绝任何已存在的路径,包括输入文件本身 |
@@ -154,6 +157,6 @@ reactive-md migrate old.reactive.md --from local-draft-1 --accept-semantic-chang
154
157
 
155
158
  ## 范围
156
159
 
157
- 迁移处理声明的元数据变化,并检查正文能否跨越修订边界。它不是旧版读取器:不解释 YAML `state`/`data`/`computed`/`actions` 配置块、directive 或其他 draft 之前的语法,也不改写正文。在 `local-draft-2` 下已经无法编译的源码会保持阻止状态,直到作者修复报告的位置。
160
+ 迁移处理声明的元数据变化,并检查正文能否跨越修订边界。它不是旧版读取器:不解释 YAML `state`/`data`/`computed`/`actions` 配置块、directive 或其他 draft 之前的语法,也不改写正文。在 `local-draft-3` 下已经无法编译的源码会保持阻止状态,直到作者修复报告的位置。
158
161
 
159
- `0.6.0` 同时提供于 `latest` 与 `next` 渠道。本页说明从 `0.4.0` 起提供的迁移工具。
162
+ `0.8.0` 继续以 `local-draft-3` 作为唯一接受的修订,不新增源码修订。本页的指令规则、迁移 API 和 CLI 选项保持不变,因此在 `0.7.0` 下可编译的文档无需为 `0.8.0` 迁移。从 `local-draft-1` 或 `local-draft-2` 迁移仍以 `local-draft-3` 为目标;迁移 `local-draft-2` 文档时仍会阻止新激活的 `<external>` 标签,作者需要先把它们保存为字面代码。`0.8.0` 使用 `latest` 渠道。