reactive-md 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG-ch.md +54 -4
  2. package/CHANGELOG.md +55 -4
  3. package/CONTRIBUTING-ch.md +13 -2
  4. package/CONTRIBUTING.md +13 -2
  5. package/README-ch.md +132 -23
  6. package/README-en.md +130 -21
  7. package/README.md +128 -21
  8. package/SECURITY-ch.md +3 -3
  9. package/SECURITY.md +3 -3
  10. package/THIRD_PARTY_NOTICES.md +111 -1
  11. package/cli/args.mjs +51 -1
  12. package/cli/assets.mjs +6 -1
  13. package/cli/build.mjs +125 -9
  14. package/cli/fs-utils.mjs +3 -3
  15. package/cli/help.mjs +12 -5
  16. package/cli/init.mjs +1 -1
  17. package/cli/package.mjs +1 -0
  18. package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
  19. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  20. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  21. package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
  22. package/dist-library/compile-wUv8KEge.js +1249 -0
  23. package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
  24. package/dist-library/compiler-eOfcinZs.js +62 -0
  25. package/dist-library/component-state-BoLCGee4.js +801 -0
  26. package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
  27. package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
  28. package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
  29. package/dist-library/controls-CcT6n7k_.js +6740 -0
  30. package/dist-library/coordinate-CWS9p5q_.js +293 -0
  31. package/dist-library/data-table-Bgccxd7h.js +296 -0
  32. package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
  33. package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
  34. package/dist-library/export-BqVmTXm8.js +369 -0
  35. package/dist-library/gallery-CY6mTx8i.js +360 -0
  36. package/dist-library/html-CNT4KD-2.js +757 -0
  37. package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
  38. package/dist-library/latex-1w7aQgD5.js +928 -0
  39. package/dist-library/layout-C0YlEPGr.js +562 -0
  40. package/dist-library/mount-preset-KxvtKgJb.js +13 -0
  41. package/dist-library/options-1aDLK7JY.js +121 -0
  42. package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
  43. package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
  44. package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
  45. package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
  46. package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
  47. package/dist-library/react-BbyAgeXc.js +6070 -0
  48. package/dist-library/react-D5iGiUdL.js +7 -0
  49. package/dist-library/reactive-md-authoring.js +222 -223
  50. package/dist-library/reactive-md-build.js +126 -72
  51. package/dist-library/reactive-md-compiler-standard.js +12 -10
  52. package/dist-library/reactive-md-compiler.js +3 -3
  53. package/dist-library/reactive-md-default-packs.js +2 -2
  54. package/dist-library/reactive-md-default-preset.js +4 -4
  55. package/dist-library/reactive-md-export-assets.js +57 -0
  56. package/dist-library/reactive-md-export.js +5 -111
  57. package/dist-library/reactive-md-minimal-preset.js +24 -0
  58. package/dist-library/reactive-md-minimal-react-preset.js +26 -0
  59. package/dist-library/reactive-md-minimal-styles.js +80 -0
  60. package/dist-library/reactive-md-minimal.css +2 -0
  61. package/dist-library/reactive-md-pdf.js +7582 -0
  62. package/dist-library/reactive-md-plugin-chart.js +13 -0
  63. package/dist-library/reactive-md-plugin-data.js +17 -0
  64. package/dist-library/reactive-md-plugin-diagram.js +18 -0
  65. package/dist-library/reactive-md-plugin-forms.js +18 -0
  66. package/dist-library/reactive-md-plugin-gallery.js +12 -0
  67. package/dist-library/reactive-md-plugin-navigation.js +15 -0
  68. package/dist-library/reactive-md-plugin-network.js +222 -0
  69. package/dist-library/reactive-md-plugin-plot.js +24 -0
  70. package/dist-library/reactive-md-print.css +5 -0
  71. package/dist-library/reactive-md-react-minimal.js +28 -0
  72. package/dist-library/reactive-md-react-server.js +34 -32
  73. package/dist-library/reactive-md-react-unstyled.js +14 -9
  74. package/dist-library/reactive-md-react.js +14 -9
  75. package/dist-library/reactive-md-runtime-browser.js +847 -15
  76. package/dist-library/reactive-md-runtime.js +3 -3
  77. package/dist-library/reactive-md-sdk.js +8 -6
  78. package/dist-library/reactive-md-standalone-configured.js +16 -0
  79. package/dist-library/reactive-md-standalone-host.js +9 -438
  80. package/dist-library/reactive-md-testing-browser.js +5 -4
  81. package/dist-library/reactive-md-testing-react.js +46 -44
  82. package/dist-library/reactive-md-testing.js +45 -44
  83. package/dist-library/reactive-md-vite.js +135 -37
  84. package/dist-library/reactive-md.css +1 -1
  85. package/dist-library/reactive-md.js +590 -498
  86. package/dist-library/registry-B9NGct4d.js +20 -0
  87. package/dist-library/registry-core-Bbad9Bm2.js +479 -0
  88. package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
  89. package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
  90. package/dist-library/runtime-kcA7bG7G.js +1282 -0
  91. package/dist-library/sample-bP4zHB3L.js +289 -0
  92. package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
  93. package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
  94. package/dist-library/session-core-nmJHuR9c.js +452 -0
  95. package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
  96. package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
  97. package/dist-library/types/authoring/catalog.d.ts +2 -3
  98. package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
  99. package/dist-library/types/authoring/index.d.ts +1 -1
  100. package/dist-library/types/authoring/insert.d.ts +1 -1
  101. package/dist-library/types/authoring/templates.d.ts +2 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/build/host.d.ts +1 -1
  104. package/dist-library/types/build/index.d.ts +1 -1
  105. package/dist-library/types/build/notices.d.ts +1 -1
  106. package/dist-library/types/build/resources.d.ts +1 -1
  107. package/dist-library/types/build/vite.d.ts +1 -1
  108. package/dist-library/types/compiler/index.d.ts +2 -2
  109. package/dist-library/types/compiler/result.d.ts +1 -1
  110. package/dist-library/types/compiler/standard.d.ts +2 -2
  111. package/dist-library/types/compiler/types.d.ts +1 -1
  112. package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
  113. package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
  114. package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
  115. package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
  116. package/dist-library/types/components/minimal-preset.d.ts +2 -0
  117. package/dist-library/types/components/mount-preset.d.ts +4 -0
  118. package/dist-library/types/components/network/submit-button.d.ts +10 -0
  119. package/dist-library/types/components/plot/coordinate.d.ts +2 -0
  120. package/dist-library/types/components/plugins/chart.d.ts +2 -0
  121. package/dist-library/types/components/plugins/data.d.ts +2 -0
  122. package/dist-library/types/components/plugins/diagram.d.ts +2 -0
  123. package/dist-library/types/components/plugins/forms.d.ts +2 -0
  124. package/dist-library/types/components/plugins/gallery.d.ts +2 -0
  125. package/dist-library/types/components/plugins/navigation.d.ts +2 -0
  126. package/dist-library/types/components/plugins/network.d.ts +2 -0
  127. package/dist-library/types/components/plugins/plot.d.ts +2 -0
  128. package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
  129. package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
  130. package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
  131. package/dist-library/types/export/component-state.d.ts +1 -1
  132. package/dist-library/types/export/index.d.ts +2 -1
  133. package/dist-library/types/export/print-document.d.ts +18 -0
  134. package/dist-library/types/export/render-markup.d.ts +23 -0
  135. package/dist-library/types/export/requirements.d.ts +1 -1
  136. package/dist-library/types/export/resources.d.ts +1 -1
  137. package/dist-library/types/export/restoration.d.ts +1 -1
  138. package/dist-library/types/export-assets/index.d.ts +25 -0
  139. package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
  140. package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
  141. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  142. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  143. package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
  144. package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
  145. package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
  146. package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
  147. package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
  148. package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
  149. package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
  150. package/dist-library/types/local/compilation/compiler.d.ts +7 -14
  151. package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
  152. package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
  153. package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
  154. package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
  155. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  156. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  157. package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
  158. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
  159. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
  160. package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
  161. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
  162. package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
  163. package/dist-library/types/local/configuration/options-core.d.ts +5 -4
  164. package/dist-library/types/local/configuration/options.d.ts +2 -1
  165. package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
  166. package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
  167. package/dist-library/types/local/configuration/schema.d.ts +1 -1
  168. package/dist-library/types/local/css/author-css.d.ts +66 -0
  169. package/dist-library/types/local/evaluation/computations.d.ts +2 -2
  170. package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
  171. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
  172. package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
  173. package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
  174. package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
  175. package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
  176. package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
  177. package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
  178. package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
  179. package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
  180. package/dist-library/types/local/evaluation/validation.d.ts +1 -1
  181. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  182. package/dist-library/types/local/html/html-details.d.ts +1 -1
  183. package/dist-library/types/local/html/html-entities.d.ts +11 -2
  184. package/dist-library/types/local/html/html-recovery.d.ts +1 -1
  185. package/dist-library/types/local/html/html-table.d.ts +1 -1
  186. package/dist-library/types/local/html/html.d.ts +40 -4
  187. package/dist-library/types/local/index.d.ts +14 -13
  188. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  189. package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
  190. package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
  191. package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
  192. package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
  193. package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
  194. package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
  195. package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
  196. package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
  197. package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
  198. package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
  199. package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
  200. package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
  201. package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
  202. package/dist-library/types/local/parsing/parser.d.ts +3 -3
  203. package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
  204. package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
  205. package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
  206. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  207. package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
  208. package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
  209. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  210. package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
  211. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  212. package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
  213. package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
  214. package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
  215. package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
  216. package/dist-library/types/local/rendering/render-types.d.ts +1 -1
  217. package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
  218. package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
  219. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  220. package/dist-library/types/local/runtime/retention.d.ts +1 -1
  221. package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
  222. package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
  223. package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
  224. package/dist-library/types/local/runtime/runtime.d.ts +4 -2
  225. package/dist-library/types/local/runtime/state.d.ts +1 -1
  226. package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
  227. package/dist-library/types/local/source/authoring.d.ts +1 -1
  228. package/dist-library/types/local/source/source-context.d.ts +23 -0
  229. package/dist-library/types/local/source/source-migration.d.ts +2 -2
  230. package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
  231. package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
  232. package/dist-library/types/local/transport/shared-data.d.ts +1 -1
  233. package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
  234. package/dist-library/types/local/transport/worker-job.d.ts +28 -0
  235. package/dist-library/types/local/transport/worker.d.ts +32 -46
  236. package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
  237. package/dist-library/types/pdf.d.ts +22 -0
  238. package/dist-library/types/presets/identity.d.ts +1 -0
  239. package/dist-library/types/presets/minimal.d.ts +2 -0
  240. package/dist-library/types/presets/plugin-packs.d.ts +1 -0
  241. package/dist-library/types/react/component-api.d.ts +20 -4
  242. package/dist-library/types/react/component-primitives.d.ts +10 -10
  243. package/dist-library/types/react/component-utils.d.ts +9 -1
  244. package/dist-library/types/react/index.d.ts +6 -5
  245. package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
  246. package/dist-library/types/react/minimal.d.ts +13 -0
  247. package/dist-library/types/react/package-core.d.ts +67 -0
  248. package/dist-library/types/react/package.d.ts +3 -67
  249. package/dist-library/types/react/runtime/common.d.ts +1 -1
  250. package/dist-library/types/react/sdk-core.d.ts +115 -0
  251. package/dist-library/types/react/sdk.d.ts +4 -110
  252. package/dist-library/types/react/server.d.ts +2 -2
  253. package/dist-library/types/react/use-draft-field.d.ts +5 -1
  254. package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
  255. package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
  256. package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
  257. package/dist-library/types/runtime-services/component-state.d.ts +1 -1
  258. package/dist-library/types/runtime-services/index.d.ts +2 -0
  259. package/dist-library/types/runtime-services/network.d.ts +86 -0
  260. package/dist-library/types/runtime-services/runtime.d.ts +1 -1
  261. package/dist-library/types/sdk/config.d.ts +1 -1
  262. package/dist-library/types/sdk/index.d.ts +1 -0
  263. package/dist-library/types/sdk/props.d.ts +1 -1
  264. package/dist-library/types/sdk/registry-core.d.ts +1 -1
  265. package/dist-library/types/sdk/theme.d.ts +5 -4
  266. package/dist-library/types/sdk/types.d.ts +2 -2
  267. package/dist-library/types/shareable.d.ts +6 -5
  268. package/dist-library/types/standalone/diagnostics.d.ts +1 -1
  269. package/dist-library/types/standalone/host.d.ts +5 -0
  270. package/dist-library/types/standalone/payload.d.ts +1 -1
  271. package/dist-library/types/standalone/prepare.d.ts +2 -2
  272. package/dist-library/types/standalone/session-core.d.ts +68 -0
  273. package/dist-library/types/standalone/session.d.ts +6 -68
  274. package/dist-library/types/themes/contract.d.ts +7 -0
  275. package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
  276. package/dist-library/types/vite/client.d.ts +19 -0
  277. package/dist-library/types/vite/index.d.ts +18 -3
  278. package/dist-library/types/vite/registration.d.ts +2 -2
  279. package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
  280. package/dist-library/validation-BEBA_HvS.js +1121 -0
  281. package/dist-library/visual-frame-CyV1FXzs.js +48 -0
  282. package/dist-library/visuals-B5KSafVk.js +3 -0
  283. package/dist-library/visuals-BZbZYA7w.js +72572 -0
  284. package/dist-standalone/reactive-md-standalone.css +1 -1
  285. package/dist-standalone/reactive-md-standalone.js +146 -137
  286. package/docs/README-ch.md +16 -11
  287. package/docs/README.md +16 -11
  288. package/docs/compatibility/compatibility-ch.md +8 -8
  289. package/docs/compatibility/compatibility-en.md +8 -8
  290. package/docs/compatibility/source-versioning-ch.md +1 -1
  291. package/docs/compatibility/source-versioning-en.md +1 -1
  292. package/docs/development/component-development-ch.md +2 -2
  293. package/docs/development/component-development-en.md +2 -2
  294. package/docs/development/component-development-reference-ch.md +4 -4
  295. package/docs/development/component-development-reference-en.md +4 -4
  296. package/docs/development/component-protocol-ch.md +14 -14
  297. package/docs/development/component-protocol-en.md +14 -14
  298. package/docs/development/extension-tutorial-ch.md +308 -0
  299. package/docs/development/extension-tutorial-en.md +308 -0
  300. package/docs/development/local-module-layout-ch.md +10 -50
  301. package/docs/development/local-module-layout-en.md +9 -49
  302. package/docs/development/performance-overview-ch.md +174 -154
  303. package/docs/development/performance-overview-en.md +174 -154
  304. package/docs/guides/local-guide-ch.md +2 -2
  305. package/docs/guides/local-guide-en.md +2 -2
  306. package/docs/integration/author-tools-ch.md +2 -2
  307. package/docs/integration/author-tools-en.md +2 -2
  308. package/docs/integration/compiler-ch.md +4 -2
  309. package/docs/integration/compiler-en.md +4 -2
  310. package/docs/integration/directory-discovery-ch.md +5 -1
  311. package/docs/integration/directory-discovery-en.md +5 -1
  312. package/docs/integration/editor-ch.md +35 -5
  313. package/docs/integration/editor-en.md +42 -4
  314. package/docs/integration/extension-sdk-ch.md +6 -4
  315. package/docs/integration/extension-sdk-en.md +6 -4
  316. package/docs/integration/local-integration-ch.md +201 -19
  317. package/docs/integration/local-integration-en.md +194 -18
  318. package/docs/integration/network-host-ch.md +75 -0
  319. package/docs/integration/network-host-en.md +75 -0
  320. package/docs/integration/shareable-export-ch.md +58 -16
  321. package/docs/integration/shareable-export-en.md +57 -15
  322. package/docs/reference/html-compatibility-ch.md +20 -67
  323. package/docs/reference/html-compatibility-en.md +19 -64
  324. package/docs/reference/local-interaction-syntax-ch.md +199 -26
  325. package/docs/reference/local-interaction-syntax-en.md +194 -27
  326. package/docs/reference/public-api-ch.md +416 -0
  327. package/docs/reference/public-api-en.md +416 -0
  328. package/docs/reference/theme-protocol-ch.md +27 -8
  329. package/docs/reference/theme-protocol-en.md +46 -8
  330. package/docs/releases/release-0.4.0-ch.md +2 -2
  331. package/docs/releases/release-0.4.0-en.md +2 -2
  332. package/docs/releases/release-0.8.0-ch.md +19 -3
  333. package/docs/releases/release-0.8.0-en.md +19 -3
  334. package/docs/releases/release-0.9.0-ch.md +44 -0
  335. package/docs/releases/release-0.9.0-en.md +44 -0
  336. package/docs/releases/release-0.9.1-ch.md +29 -0
  337. package/docs/releases/release-0.9.1-en.md +29 -0
  338. package/examples/component-package/README-ch.md +1 -1
  339. package/examples/component-package/README.md +1 -1
  340. package/examples/conformance/README-ch.md +3 -3
  341. package/examples/conformance/README.md +3 -3
  342. package/examples/game-2048-package/README-ch.md +3 -9
  343. package/examples/game-2048-package/README.md +8 -12
  344. package/examples/integration/README-ch.md +21 -2
  345. package/examples/integration/README.md +21 -2
  346. package/examples/integration/extension-sdk/README-ch.md +1 -1
  347. package/examples/integration/extension-sdk/README.md +1 -1
  348. package/examples/integration/streaming/index.html +48 -0
  349. package/examples/integration/streaming/main.js +175 -0
  350. package/examples/integration/streaming/package.json +13 -0
  351. package/examples/integration/streaming/worker.js +3 -0
  352. package/examples/local/README-ch.md +3 -3
  353. package/examples/local/README.md +2 -2
  354. package/examples/local/minimal-budget.reactive.md +48 -0
  355. package/examples/minimal-extension/README-ch.md +78 -0
  356. package/examples/minimal-extension/README.md +78 -0
  357. package/examples/minimal-extension/index.html +15 -0
  358. package/examples/minimal-extension/package.json +26 -0
  359. package/examples/minimal-extension/sample/document.reactive.md +10 -0
  360. package/examples/minimal-extension/scripts/build.mjs +32 -0
  361. package/examples/minimal-extension/scripts/export.mjs +72 -0
  362. package/examples/minimal-extension/scripts/test-node.mjs +75 -0
  363. package/examples/minimal-extension/src/extension.tsx +90 -0
  364. package/examples/minimal-extension/src/preview.tsx +12 -0
  365. package/examples/minimal-extension/src/source.ts +4 -0
  366. package/examples/minimal-extension/tsconfig.json +14 -0
  367. package/examples/network-survey/README.md +200 -0
  368. package/examples/network-survey/index.html +49 -0
  369. package/examples/network-survey/package.json +26 -0
  370. package/examples/network-survey/sample/document.reactive.md +51 -0
  371. package/examples/network-survey/src/components.tsx +325 -0
  372. package/examples/network-survey/src/host.ts +316 -0
  373. package/examples/network-survey/src/main.tsx +91 -0
  374. package/examples/network-survey/src/source.ts +1 -0
  375. package/examples/network-survey/tsconfig.json +26 -0
  376. package/examples/network-survey/vite.config.ts +227 -0
  377. package/examples/sci-fi-theme/README-ch.md +4 -2
  378. package/examples/sci-fi-theme/README.md +4 -2
  379. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
  380. package/examples/sci-fi-theme/demo/demo.css +129 -23
  381. package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
  382. package/examples/sci-fi-theme/demo/main.tsx +45 -10
  383. package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
  384. package/examples/sci-fi-theme/package.json +2 -1
  385. package/examples/sci-fi-theme/src/components.css +1064 -154
  386. package/examples/sci-fi-theme/src/notch.css +142 -0
  387. package/examples/sci-fi-theme/src/sci-fi.css +3 -1
  388. package/examples/sci-fi-theme/src/theme.ts +2 -0
  389. package/examples/sci-fi-theme/src/tokens.css +512 -408
  390. package/examples/tetris-package/README-ch.md +4 -4
  391. package/examples/tetris-package/README.md +4 -4
  392. package/package.json +70 -3
  393. package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
  394. package/dist-library/compiler--ea2CKQF.js +0 -61
  395. package/dist-library/component-state-Cq2K5gkS.js +0 -490
  396. package/dist-library/options-CX5m5n-J.js +0 -115
  397. package/dist-library/runtime-C-sbfpOX.js +0 -1157
  398. package/dist-library/types/local/contracts/locale.d.ts +0 -1
  399. package/dist-library/types/local/contracts/version.d.ts +0 -2
  400. package/dist-library/types/local/evaluation/dates.d.ts +0 -2
  401. package/dist-library/types/local/evaluation/expression.d.ts +0 -47
  402. package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
  403. package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
  404. package/dist-library/types/local/session/incremental.d.ts +0 -48
  405. package/dist-library/types/local/source/node-walk.d.ts +0 -3
  406. package/dist-library/types/local/source/text-length.d.ts +0 -13
  407. package/dist-library/types/local/theme/theme-name.d.ts +0 -3
  408. package/dist-library/types/local/widgets/visuals.d.ts +0 -25
  409. package/dist-library/types/react/default-theme.d.ts +0 -6
  410. package/dist-library/validation-W-bmny-x.js +0 -2253
  411. package/docs/development/releasing-ch.md +0 -12
  412. package/docs/development/releasing-en.md +0 -12
  413. package/docs/integration/codemirror-ch.md +0 -52
  414. package/docs/integration/codemirror-en.md +0 -29
  415. package/docs/integration/repository-split-ch.md +0 -40
  416. package/docs/integration/repository-split-en.md +0 -23
  417. package/docs/reference/computations-formatting-ch.md +0 -89
  418. package/docs/reference/computations-formatting-en.md +0 -89
  419. package/docs/reference/constraints-collections-ch.md +0 -104
  420. package/docs/reference/constraints-collections-en.md +0 -104
  421. package/docs/reference/local-components-v2-ch.md +0 -140
  422. package/docs/reference/local-components-v2-en.md +0 -106
  423. package/docs/reference/tolerance-ch.md +0 -64
  424. package/docs/reference/tolerance-en.md +0 -57
  425. /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
  426. /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
  427. /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
  428. /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
  429. /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
  430. /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
  431. /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
  432. /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
  433. /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
  434. /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
  435. /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
  436. /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
  437. /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
  438. /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
  439. /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
  440. /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
  441. /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
@@ -4,9 +4,11 @@
4
4
 
5
5
  本文说明 `local-draft-2` 新增的单文件 HTML 导出能力。编译与运行时接口见[本地模式集成](local-integration-ch.md),语法见[交互语法规范](../reference/local-interaction-syntax-ch.md),修订声明与迁移见[源码修订与迁移](../compatibility/source-versioning-ch.md),升级说明见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
6
6
 
7
- ## 两种产物
7
+ ## 导出产物
8
8
 
9
- 默认 ReactiveMD 文档遵循下述导出规则。原生 HTML 文档的交互导出保留 `compileOptions` 和整篇 HTML 路径,静态导出禁用作者 JavaScript;这类文档没有 ReactiveMD 参数。编译开关、隔离和暂时性分流政策见 [HTML 部分兼容](../reference/html-compatibility-ch.md)。
9
+ 交互导出保存 RMD 状态基线、能力开关与 `sourceSemantics: "mixed-rmd-v1"`。运行时按旧语义读取历史导出。静态导出使用选择的状态而不启动作者脚本。参见 [HTML 兼容](../reference/html-compatibility-ch.md)。
10
+
11
+ 直接调用 `createShareableHtml` 时,请用与导出一致的 CSS 和扩展 HTML 授权渲染 `staticMarkup`。导出关闭某项能力时,函数会拒绝仍使用该能力的快照。
10
12
 
11
13
  **交互式 HTML** 是一个自包含的 `.html` 文件。它内嵌原始源码、独立浏览器运行时、React 19、样式表和打印样式。读者通过 `file://` 打开即可交互,不需要 Node.js、React、reactive-md 包或网络连接。
12
14
 
@@ -14,7 +16,7 @@
14
16
 
15
17
  **静态 HTML**(`--mode static`)只包含只读结果,不携带可执行运行时。它适合邮件附件、归档和静态站点。供交互使用的按钮、表单控件和重置操作会被移除。
16
18
 
17
- 两种模式都复用 React 渲染器,因此条件内容、插值、表格、公式、图表和布局都按运行时状态求值。
19
+ **静态 PDF**(`--format pdf`)使用 Chromium 将静态 HTML 排版为分页文档。三个产物共用 React 渲染,使用所选状态计算条件内容、插值、表格、公式和图表。
18
20
 
19
21
  ## CLI
20
22
 
@@ -33,7 +35,9 @@ reactive-md lint "docs/**/*.reactive.md" --json --strict
33
35
  | 选项 | 含义 |
34
36
  | --- | --- |
35
37
  | `-o, --output <file>` | 必填输出路径;父目录必须已存在。 |
36
- | `--mode interactive\|static` | 输出模式,默认 `interactive`。 |
38
+ | `--mode interactive\|static` | HTML 默认 `interactive`,PDF 使用 `static`。 |
39
+ | `--format html\|pdf` | 文件格式,默认 HTML。 |
40
+ | `--project-root <dir>` | 在可信项目目录中装配精简预设,自动发现 `plugin/` 与 `theme/`。需要 Vite。 |
37
41
  | `--state-file <json>` | 使用经过校验的 `reactive-md-state/v1` 文件作为打开和重置基线。 |
38
42
  | `--component-state-file <json>` | 将经过校验的 `reactive-md-component-state/v1` sidecar 写入交互式 HTML;静态导出拒绝该选项。 |
39
43
  | `--document-id <id>` | 组件状态的稳定文档身份;默认使用源码摘要。 |
@@ -55,11 +59,21 @@ reactive-md lint "docs/**/*.reactive.md" --json --strict
55
59
  | `4` | 输入/输出文件错误 |
56
60
  | `5` | 资源或安全策略错误 |
57
61
 
58
- CLI 没有“当前预览”概念,只有 `--state-file` 可以选择非初值基线。本版本暂不提供 `format`。
62
+ 使用 `--state-file` 指定导出状态。直接构建 PDF 时先安装可选引擎。
63
+
64
+ ```sh
65
+ npm install playwright
66
+ npx playwright install chromium
67
+ reactive-md build doc.reactive.md -o doc.pdf --format pdf --pdf-margin 12mm
68
+ ```
69
+
70
+ 默认纸张为 A4,纵向排版并打印背景。可用 `--pdf-paper Letter`、`--pdf-landscape` 和 `--pdf-background off` 调整。Node 调用方也可以将静态 HTML 传给 `reactive-md/pdf` 的 `renderLocalPdf`,获取 PDF 字节。
71
+
72
+ `--pdf-margin` 覆盖默认页边距。Chromium 无法解码图片时,CLI 会发出警告。加上 `--strict` 会终止导出。
59
73
 
60
74
  ## 迁移源码
61
75
 
62
- `reactive-md migrate` 把单份源码的修订声明迁移到 `local-draft-2`:
76
+ `reactive-md migrate` 把单份源码的修订声明迁移到 `local-draft-3`:
63
77
 
64
78
  ```sh
65
79
  reactive-md migrate old.reactive.md --from local-draft-1 -o new.reactive.md
@@ -79,7 +93,7 @@ reactive-md migrate old.reactive.md --check --json
79
93
  ```json
80
94
  {
81
95
  "format": "reactive-md-state/v1",
82
- "syntax": "local-draft-2",
96
+ "syntax": "local-draft-3",
83
97
  "sourceDigest": "fnv1a32:0123abcd",
84
98
  "parameters": {
85
99
  "people": 7,
@@ -212,7 +226,7 @@ handle.unmount();
212
226
  ```html
213
227
  <div id="doc"></div>
214
228
  <script type="application/reactive-md+json" data-reactive-md-auto>
215
- {"version":1,"target":"doc","source":"# Hello","state":{"format":"reactive-md-state/v1","syntax":"local-draft-2","sourceDigest":"fnv1a32:01209266","parameters":{}},"locale":"en","colorScheme":"auto","hydrate":false}
229
+ {"version":1,"target":"doc","source":"# Hello","state":{"format":"reactive-md-state/v1","syntax":"local-draft-3","sourceDigest":"fnv1a32:01209266","parameters":{}},"locale":"en","colorScheme":"auto","hydrate":false}
216
230
  </script>
217
231
  ```
218
232
 
@@ -234,6 +248,37 @@ IIFE 会注册一个 Light DOM 自定义元素。简单选项通过属性传递
234
248
 
235
249
  元素使用 Light DOM,以复用现有文档样式、标题锚点和打印样式。本版本不提供 Shadow DOM。
236
250
 
251
+ ## 导出资源清单
252
+
253
+ 需要引擎文件本身来生成导出 HTML 或独立页面时,使用 `reactive-md/export-assets`:
254
+
255
+ ```ts
256
+ import { listExportAssets, readExportAsset, resolveExportAsset } from 'reactive-md/export-assets';
257
+
258
+ for (const asset of listExportAssets().assets) {
259
+ console.log(asset.id, asset.specifier, asset.description);
260
+ }
261
+
262
+ const css = readExportAsset('base-css');
263
+ const runtimeUrl = resolveExportAsset('runtime'); // 文件 URL
264
+ ```
265
+
266
+ 清单的 `protocol` 为 `reactive-md-export-assets/v1`,条目列表冻结,id 在版本之间保持稳定:
267
+
268
+ | id | 公开 specifier | 内容 |
269
+ | --- | --- | --- |
270
+ | `base-css` | `reactive-md/styles.css` | 文档样式表 |
271
+ | `print-css` | `reactive-md/print.css` | 打印样式表 |
272
+ | `notices` | `reactive-md/notices` | 第三方许可证声明 |
273
+ | `package-json` | `reactive-md/package.json` | 包元数据,包含导出记录使用的版本号 |
274
+ | `runtime` | `reactive-md/assets/standalone.js` | 独立浏览器运行时 |
275
+
276
+ `resolveExportAsset(id)` 通过 `import.meta.resolve` 解析已安装包并返回文件 URL,`readExportAsset(id)` 返回 UTF-8 内容,未知 id 抛出 `TypeError`。
277
+
278
+ 稳定性范围包括协议字符串、id 和 `specifier` 的含义。tarball 内部布局与条目背后的文件数量会随发布变化,因此构建工具通过这个入口读取资源,而不去遍历 `node_modules/reactive-md`。该入口使用 `node:fs`,服务于 Vite、构建和 CLI 工具;浏览器、React、编译器和根入口都不引用它。
279
+
280
+ Demo 的 `vite.export-assets.ts` 用它把样式表、打印样式表、notices、包元数据和独立运行时暴露为构建期字符串模块。
281
+
237
282
  ## 安全边界
238
283
 
239
284
  - 核心与 React 入口继续保持 React external;只有 standalone IIFE 打包 React。
@@ -245,21 +290,18 @@ IIFE 会注册一个 Light DOM 自定义元素。简单选项通过属性传递
245
290
 
246
291
  ## 产物体积基线
247
292
 
248
- `npm run test:shareable` 会记录 standalone 产物体积,并在超过以下回归阈值时失败:
293
+ 在引擎源码目录完成构建后,运行 `node scripts/verify-shareable.mjs` 检查静态首屏水合并测量原始及 gzip 体积。体积阈值以当前完整预设构建为基线。
249
294
 
250
295
  | 产物 | 当前基线 | 报警阈值 |
251
296
  | --- | --- | --- |
252
- | `reactive-md-standalone.js` | 约 925 kB(gzip 约 276 kB) | 1024 KiB / gzip 320 KiB |
253
- | `reactive-md-standalone.css` | 约 81.2 kB(gzip 约 13.5 kB) | 80 KiB / gzip 20 KiB |
254
-
255
- 0.5 基线包含语法高亮器和常见语言语法,离线文件也能高亮。
297
+ | `reactive-md-standalone.js` | 3.66 MiB / gzip 1,135 KiB | 4 MiB / gzip 1,250 KiB |
298
+ | `reactive-md-standalone.css` | 616 KiB / gzip 293 KiB | 680 KiB / gzip 325 KiB |
256
299
 
257
- 数值会随压缩器和 React 补丁版本小幅变化。阈值远高于正常波动,同时能捕获 React 或渲染器被重复打包的退化。完整 HTML 还包含源码、notices 和内联图片,因此会大于这个基线。
300
+ 生成的 HTML 还包含源码、notices 和内联图片。
258
301
 
259
302
  ## 当前范围
260
303
 
261
- 已实现:CLI 的 `build`/`lint`/`migrate`、交互与静态 HTML、状态文件、组件状态 sidecar、本地位图内联、打印输出、standalone 挂载 API、自动挂载和 Web Component。
304
+ CLI 提供 `build`、`lint` 和 `migrate`。导出格式包括交互 HTML、静态 HTML 和静态 PDF。标准 HTML 导出支持状态文件和本地位图内联,交互 HTML 还支持组件状态 sidecar、自动挂载、standalone API 和 Web Component。
262
305
 
263
- 本版本不包含:`format`、UMD、远程图片抓取、SVG 内联、框架插件(Vite、Astro、Docusaurus、Next.js)、Shadow DOM,以及单文件导出之外的通用 SSR 水合保证。
264
306
 
265
307
  单文件静态首屏水合由 Playwright Chromium 和本地 Edge 检查覆盖。Firefox、Safari/WebKit 以及通用服务端水合尚未验证,不作支持声明。
@@ -6,7 +6,9 @@ This guide covers the single-file HTML exporter introduced with `local-draft-2`.
6
6
 
7
7
  ## Output modes
8
8
 
9
- The rules below describe default ReactiveMD documents. Native HTML interactive export preserves `compileOptions` and whole-document HTML routing; static export disables author JavaScript. These documents have no ReactiveMD parameters. See [HTML compatibility](../reference/html-compatibility-en.md) for capability flags, isolation and the temporary routing policy.
9
+ Interactive exports save the RMD state baseline, capability flags and `sourceSemantics: "mixed-rmd-v1"`. The runtime’s legacy reader preserves the original interpretation of older exports. Static output uses the selected state without executing author scripts. See [HTML compatibility](../reference/html-compatibility-en.md).
10
+
11
+ When calling `createShareableHtml` directly, render `staticMarkup` with the same CSS and Extended HTML grants as the export. The function rejects a snapshot that still uses a capability disabled for the export.
10
12
 
11
13
  **Interactive HTML** is one self-contained `.html` file. It embeds the original source, the standalone browser runtime, React 19, the current stylesheet and print styles. Readers can open it through `file://` without Node.js, React, the reactive-md package or network access.
12
14
 
@@ -14,7 +16,7 @@ The first rendered pass is static. After the embedded runtime hydrates it, contr
14
16
 
15
17
  **Static HTML** (`--mode static`) contains read-only values and no executable script cargo. It is intended for archives, static sites and email attachments. Interactive action buttons, form widgets and the reset action are removed.
16
18
 
17
- Both modes use the same renderer as the React integration, so conditional content, interpolation, tables, formulas, charts and layout follow the runtime state.
19
+ **Static PDF** (`--format pdf`) prints the static HTML through Chromium. All three formats use the same React renderer and evaluate conditional content, interpolations, tables, formulas, and charts against the selected state.
18
20
 
19
21
  ## CLI
20
22
 
@@ -35,7 +37,9 @@ Build options:
35
37
  | Option | Meaning |
36
38
  | --- | --- |
37
39
  | `-o, --output <file>` | Required output path. Its parent directory must already exist. |
38
- | `--mode interactive\|static` | Output mode. Default: `interactive`. |
40
+ | `--mode interactive\|static` | HTML defaults to `interactive`. PDF uses `static`. |
41
+ | `--format html\|pdf` | File format. Defaults to HTML. |
42
+ | `--project-root <dir>` | Use the minimal preset and discover `plugin/` and `theme/` in a trusted project directory. Requires Vite. |
39
43
  | `--state-file <json>` | Use a validated `reactive-md-state/v1` file as the starting and reset baseline. |
40
44
  | `--component-state-file <json>` | Embed a validated `reactive-md-component-state/v1` sidecar in interactive HTML. Static output rejects it. |
41
45
  | `--document-id <id>` | Stable document identity used to scope component state. Default: the source digest. |
@@ -57,11 +61,21 @@ Exit codes are separate so build automation can distinguish failures:
57
61
  | `4` | Input/output file failure |
58
62
  | `5` | Asset or security-policy failure |
59
63
 
60
- The CLI does not use a current preview implicitly. `--state-file` is the only way to select a non-initial baseline. `format` is not part of this release.
64
+ Pass `--state-file` to select the export state. Install the optional print engine to build a PDF.
65
+
66
+ ```sh
67
+ npm install playwright
68
+ npx playwright install chromium
69
+ reactive-md build doc.reactive.md -o doc.pdf --format pdf --pdf-margin 12mm
70
+ ```
71
+
72
+ PDF output defaults to A4 portrait with backgrounds. Use `--pdf-paper Letter`, `--pdf-landscape`, or `--pdf-background off` to change those settings. In Node, pass static HTML to `renderLocalPdf` from `reactive-md/pdf` to get the PDF bytes.
73
+
74
+ Use `--pdf-margin` to override the default page margins. The CLI warns when Chromium cannot decode an image. With `--strict`, it stops the export.
61
75
 
62
76
  ## Migrating source
63
77
 
64
- `reactive-md migrate` moves one source revision declaration to `local-draft-2`:
78
+ `reactive-md migrate` moves one source revision declaration to `local-draft-3`:
65
79
 
66
80
  ```sh
67
81
  reactive-md migrate old.reactive.md --from local-draft-1 -o new.reactive.md
@@ -81,7 +95,7 @@ A state file has this versioned shape:
81
95
  ```json
82
96
  {
83
97
  "format": "reactive-md-state/v1",
84
- "syntax": "local-draft-2",
98
+ "syntax": "local-draft-3",
85
99
  "sourceDigest": "fnv1a32:0123abcd",
86
100
  "parameters": {
87
101
  "people": 7,
@@ -214,7 +228,7 @@ handle.unmount();
214
228
  ```html
215
229
  <div id="doc"></div>
216
230
  <script type="application/reactive-md+json" data-reactive-md-auto>
217
- {"version":1,"target":"doc","source":"# Hello","state":{"format":"reactive-md-state/v1","syntax":"local-draft-2","sourceDigest":"fnv1a32:01209266","parameters":{}},"locale":"en","colorScheme":"auto","hydrate":false}
231
+ {"version":1,"target":"doc","source":"# Hello","state":{"format":"reactive-md-state/v1","syntax":"local-draft-3","sourceDigest":"fnv1a32:01209266","parameters":{}},"locale":"en","colorScheme":"auto","hydrate":false}
218
232
  </script>
219
233
  ```
220
234
 
@@ -236,6 +250,37 @@ The IIFE registers a light-DOM custom element. Simple options are attributes; co
236
250
 
237
251
  The element uses Light DOM so the existing document CSS, heading anchors and print styles apply. Shadow DOM is intentionally out of scope for this release.
238
252
 
253
+ ## Export assets for hosts
254
+
255
+ Hosts that assemble exported or standalone HTML need the engine files themselves. `reactive-md/export-assets` is the supported way to find and read them:
256
+
257
+ ```ts
258
+ import { listExportAssets, readExportAsset, resolveExportAsset } from 'reactive-md/export-assets';
259
+
260
+ for (const asset of listExportAssets().assets) {
261
+ console.log(asset.id, asset.specifier, asset.description);
262
+ }
263
+
264
+ const css = readExportAsset('base-css');
265
+ const runtimeUrl = resolveExportAsset('runtime'); // file URL
266
+ ```
267
+
268
+ The manifest reports `protocol: 'reactive-md-export-assets/v1'` and a frozen entry list. Ids stay stable across releases:
269
+
270
+ | Id | Public specifier | Content |
271
+ | --- | --- | --- |
272
+ | `base-css` | `reactive-md/styles.css` | Document stylesheet |
273
+ | `print-css` | `reactive-md/print.css` | Print stylesheet |
274
+ | `notices` | `reactive-md/notices` | Third-party license notices |
275
+ | `package-json` | `reactive-md/package.json` | Package metadata, including the version exports record |
276
+ | `runtime` | `reactive-md/assets/standalone.js` | Standalone browser runtime |
277
+
278
+ `resolveExportAsset(id)` resolves the installed package through `import.meta.resolve` and returns a file URL; `readExportAsset(id)` returns the UTF-8 contents. Unknown ids throw a `TypeError`.
279
+
280
+ The stability contract covers the protocol string, the ids and the meaning of `specifier`. Tarball layout and the files behind an entry change between releases, so build tooling reads assets through this entry point instead of walking `node_modules/reactive-md`. The entry uses `node:fs` and belongs to Vite, build and CLI tooling; no browser, React, compiler or root entry imports it.
281
+
282
+ The demo's `vite.export-assets.ts` uses it to expose the stylesheet, print stylesheet, notices, package metadata and standalone runtime as build-time string modules.
283
+
239
284
  ## Security boundaries
240
285
 
241
286
  - Core and React entry points keep React external. Only the standalone IIFE bundles React.
@@ -247,21 +292,18 @@ The element uses Light DOM so the existing document CSS, heading anchors and pri
247
292
 
248
293
  ## Bundle baseline
249
294
 
250
- `npm run test:shareable` records the standalone artifact size and fails above these regression alarms:
295
+ In the engine checkout, run `node scripts/verify-shareable.mjs` after building. It tests static-first hydration and reports the raw and gzip sizes. The current full-preset build sets the baseline for the current size limits.
251
296
 
252
297
  | Artifact | Current baseline | Alarm |
253
298
  | --- | --- | --- |
254
- | `reactive-md-standalone.js` | ≈925 kB (≈276 kB gzip) | 1024 KiB / 320 KiB gzip |
255
- | `reactive-md-standalone.css` | ≈81.2 kB (≈13.5 kB gzip) | 80 KiB / 20 KiB gzip |
256
-
257
- The 0.5 baseline includes the syntax highlighter and common language grammars for offline use.
299
+ | `reactive-md-standalone.js` | 3.66 MiB / 1,135 KiB gzip | 4 MiB / 1,250 KiB gzip |
300
+ | `reactive-md-standalone.css` | 616 KiB / 293 KiB gzip | 680 KiB / 325 KiB gzip |
258
301
 
259
- Sizes vary slightly with the minifier and React patch release. The alarm is intentionally well above normal noise while catching a React or renderer duplication regression. The full generated HTML also contains the source, notices and inline images, so it is larger than this baseline.
302
+ The generated HTML also contains the source, notices and any inlined images.
260
303
 
261
304
  ## Current scope
262
305
 
263
- Included: CLI `build`/`lint`/`migrate`, interactive and static HTML, state files, component-state sidecars, local raster inlining, print output, standalone mount APIs, auto-mount, and the Web Component.
306
+ The CLI provides `build`, `lint`, and `migrate`. Export formats include interactive HTML, static HTML, and static PDF. Standard HTML export supports state files and local raster inlining. Interactive HTML also supports component-state sidecars, standalone mount APIs, auto-mount, and the Web Component.
264
307
 
265
- Not included in this release: `format`, UMD, remote image fetching, SVG inlining, framework plugins (Vite, Astro, Docusaurus, Next.js), Shadow DOM, and general SSR hydration guarantees outside the single-file export path.
266
308
 
267
309
  Single-file static-first hydration is covered by the Playwright Chromium checks and local Edge checks. Firefox, Safari/WebKit and general server-side hydration remain unverified and are not claimed as supported.
@@ -1,60 +1,28 @@
1
- # HTML 部分兼容与暂时性分流政策
1
+ # HTML 兼容与作者能力
2
2
 
3
3
  **中文** · [English](html-compatibility-en.md)
4
4
 
5
- 此功能面向下个发行版。默认文档继续使用 Markdown、ReactiveMD 控件和表达式,并支持下表中的 P0 HTML。CSS、JavaScript 和扩展 HTML 由宿主分别开启,默认全部关闭。
6
-
7
- `strict: false` 可在默认文档路径中启用[局部结构恢复](tolerance-ch.md),无需开启上述能力。`details` 的 `summary` 与正文可连续换行,呈现为单个 disclosure 的 accordion,支持富文本标题和键盘切换。
8
-
9
- ## 暂时性分流政策
10
-
11
- 为了避开作者 CSS、JavaScript、扩展 HTML 与 ReactiveMD 之间的混合解析和渲染冲突,本版采用整篇分流:
12
-
13
- | 编译选项 | 文档行为 |
14
- | --- | --- |
15
- | 三个开关全部关闭或省略 | 使用 ReactiveMD 解析器和现有 React 渲染器,支持 P0 HTML |
16
- | 任意一个开关为 `true` | 整篇源码按原生 HTML 处理,在隔离的 iframe 中渲染 |
17
-
18
- 原生 HTML 路径中的 `# 标题`、`**强调**`、LaTeX 和 `{{ 表达式 }}` 保持普通文本;`<input>`、`<table>` 等按 HTML 语义处理,ReactiveMD 组件不建立绑定。关闭全部开关会重新编译回默认模式。此政策是本版的过渡方案,后续版本再评估混合兼容。
19
-
20
- 开关是宿主能力设置,源码、参数状态文件和文档标签不能自行开启它们。Demo 始终显示当前模式,刷新页面后回到三个开关全部关闭的状态。
21
-
22
- ## 开关与 API
23
-
24
- ```ts
25
- import { compileLocal } from 'reactive-md';
26
-
27
- // Markdown、ReactiveMD 与 P0 HTML。
28
- const reactive = compileLocal(source);
29
-
30
- // 整篇按原生 HTML 处理;只允许作者 CSS。
31
- const html = compileLocal(source, {
32
- enableCss: true,
33
- enableJavaScript: false,
34
- enableExtendedHtml: false,
35
- });
36
- ```
5
+ 同一份文档可混排 Markdown、RMD 组件、表达式和基础 HTML。宿主独立控制三项能力。
37
6
 
38
7
  | 选项 | 默认值 | 作用 |
39
8
  | --- | --- | --- |
40
- | `enableCss` | `false` | 允许作者 CSS |
41
- | `enableJavaScript` | `false` | 允许作者脚本和事件处理代码 |
42
- | `enableExtendedHtml` | `false` | 允许 P1 标签、嵌入、表单、SVG/MathML 和整页 HTML 功能 |
9
+ | `enableCss` | `true` | 文档样式、组件行内声明及获准 HTML 片段中的样式 |
10
+ | `enableJavaScript` | `false` | 在交互挂载时执行作者脚本 |
11
+ | `enableExtendedHtml` | `false` | 允许额外的原生 HTML 片段 |
43
12
 
44
- 选项必须是布尔值。开启一个开关不会顺带开启其他两个。带样式的扩展元素需要同时允许扩展 HTML 和 CSS;扩展元素中的脚本需要同时允许扩展 HTML 和 JavaScript。内置组件使用的样式、交互代码、图表 SVG 和公式 MathML 不受作者能力开关影响。
13
+ 源码视图从 `LocalReactiveDocument.compileOptions` 取得授权。预编译视图通过 `LocalDocumentView.capabilityGrants` 授权,缺省为 CSS 开、JavaScript 关、扩展 HTML 关。每项能力需要编译与当前挂载同时允许。单独切换开关保留源码视图的运行时状态。
45
14
 
46
- 现有源码长度和 `limits.maxSyntaxNodes` 预算继续生效。HTML 路径按解析遍历的节点计数,嵌套 `srcdoc` 共用累计预算。
15
+ ### 样式
47
16
 
48
- React 快捷组件通过 `compileOptions` 接收同样的设置:
17
+ 在正文前放一个或多个成对的 `<css>` 块,按源码顺序层叠。组件实例的 `css` 属性接收 CSS 声明,应用到可见根。文档选择器止于嵌套文档根,DOM 的 CSS 继承照常生效。作者样式使用文内规则,外链样式表和样式资源请求受策略过滤。迟置样式块和无可见根的组件会收到定点诊断。已注册的 `css`、`javascript` 组件保留各自的标签,组件 schema 自行定义的 `css` 属性保留原有语义。
49
18
 
50
- ```tsx
51
- <LocalReactiveDocument
52
- source={source}
53
- compileOptions={{ enableCss: true }}
54
- />
55
- ```
19
+ ### 脚本
20
+
21
+ 用成对的 `<javascript>` 声明代码。交互运行时恢复状态后,隔离 Worker 按源码顺序执行脚本。每个块有自己的词法作用域。通过 `await rmd.get(name)` 读取命名绑定,通过 `await rmd.set(name, value)` 写入单项,或通过 `await rmd.setMany(values)` 原子更新多项。写入沿用组件的约束和只读规则。
56
22
 
57
- 底层宿主把 `compileLocal` 生成的文档交给 `LocalDocumentView`。原生 HTML 文档的 `document.html` 记录三个归一化开关;参数和绑定集合为空。该字段属于运行时元数据,保存文档时保留原始源码和宿主设置。
23
+ 通过计数器的 `action-id` 命名实例。调用 `rmd.handleAction(id, "increment", callback)` 接管该实例的增加动作。计数器还提供 `decrement` 和 `reset`。用 `rmd.observeAction` 观察动作,默认处理照常运行。替换脚本、撤销授权或卸载文档时清理会话。静态 HTML、PDF 和 hydration 的静态阶段使用给定的 RMD 状态。
24
+
25
+ 异步预览重新编译时,可用 `LocalDocumentView.authorScriptPaused` 暂停作者动作和绑定请求。确认脚本未变后恢复原会话。撤销计数器 `action-id` 的删除后,同一脚本会话可继续接管这个动作。
58
26
 
59
27
  ## 默认支持的 P0 HTML
60
28
 
@@ -83,7 +51,7 @@ React 快捷组件通过 `compileOptions` 接收同样的设置:
83
51
  <p align="right">右对齐的 **Markdown** 段落。</p>
84
52
  ```
85
53
 
86
- 对齐不需要开启 CSS 或扩展 HTML,容器内的 Markdown 和绑定继续生效;嵌套元素可以设置自己的对齐。原生 HTML 路径同样接受这些限定值。
54
+ 对齐不需要开启 CSS 或扩展 HTML,容器内的 Markdown 和绑定继续生效;嵌套元素可以设置自己的对齐。
87
55
 
88
56
  通用属性按允许列表接收,支持文档标识、标题、语言、方向和可访问性属性。默认模式中的作者 `style`、事件处理属性及不支持的标签保持惰性源码或产生定位诊断。图片仍需宿主明确允许后才加载。代码与不支持区域不执行脚本。
89
57
 
@@ -114,27 +82,12 @@ React 快捷组件通过 `compileOptions` 接收同样的设置:
114
82
 
115
83
  无法编译的局部原生 HTML 按原文显示,其余 Markdown、公式和控件继续工作。回退覆盖不支持的标签或属性、无效的原生表格,以及缺少完整结束标记的 HTML 片段。无法找到结束标签时,片段截至当前段落或外层 ReactiveMD 容器的结束标签。回退片段中的 Markdown、`{{ 表达式 }}`、组件和脚本均保留为文本。
116
84
 
117
- 原生 HTML 路径中,不支持的属性会使所在元素回退为原文;相邻元素继续渲染。整篇解析、序列化或编译预算检查失败时,React 预览和 standalone 挂载显示完整源码,保留换行并转义标签。`compileLocal` 的错误结果、资源限制和 `onDiagnostics` 诊断仍保留;配置错误及 ReactiveMD 组件语法错误继续按原规则处理。
118
-
119
- ## 扩展 HTML
120
-
121
- `enableExtendedHtml` 管理以下作者语法:
122
-
123
- - 定义列表:`dl`、`dt`、`dd`。
124
- - 补充文字语义:`small`、`kbd`、`samp`、`var`、`abbr`、`q`、`cite`、`ins`。
125
- - 图文和结构:`figure`、`figcaption`、`article`、`section`、`aside`、`header`、`footer`、`ruby`、`rt`、`rp`、`wbr`。
126
- - 原生表单、`iframe`、`object`、`embed`、`dialog`、任意 SVG/MathML 和整页 HTML 功能。
127
-
128
- 在默认模式中,ReactiveMD `<table>` 按正文结构与原生表格区分;`<section>`、`<input>`、`<select>` 等同名组件继续采用当前语义。在原生 HTML 模式中,同名元素采用浏览器语义。
129
-
130
- ## 隔离与导出
131
-
132
- 作者 HTML 放在不带 `allow-same-origin` 的沙箱 iframe 中。源码中的整页结构、样式和脚本作用于该隔离文档。资源加载、表单提交和导航仍受 CSP 与沙箱限制;启用扩展 HTML 不代表获得全部网络能力。
85
+ ## 扩展 HTML 与导出
133
86
 
134
- 本版支持内联 CSS 和 JavaScript,自动外部资源请求仍受限:外部脚本、样式表、图片、媒体及嵌入资源不会因开启开关而自动加载。扩展 HTML 允许隔离文档中的 HTTP(S) 表单提交和 `<base>` 地址解析,保留顶层导航与宿主访问限制。iframe 可用 `srcdoc` 提供内联内容;`object`、`embed` 的外部资源仍受 CSP 限制。
87
+ 已注册组件优先。比如 `<input bind="name">` 仍是 RMD 输入框,`details` 的正文继续支持 Markdown 和表达式。净化后的普通定义列表等结构直接进入文档,包含嵌入、作者脚本或样式的片段由沙箱承载。未获准的片段在原位置显示转义源码。
135
88
 
136
- 启用任意 JavaScript 后,脚本可以动态创建元素和样式,另两个开关主要约束作者源码。宿主隔离仍有效,但这些开关不承诺逐项阻止脚本的运行时 DOM 操作。
89
+ 自包含嵌入可用经净化的 `srcdoc`。通过挂载参数 `allowedFrameOrigins` 开放精确的 HTTPS 来源。片段样式和脚本继续受对应开关管理,沙箱约束导航、表单和对父文档的访问。
137
90
 
138
- 交互导出保留本次编译选项和文档路径。原生 HTML 的静态导出保留浏览器内建的折叠和表单行为,并禁用作者 JavaScript。这类文档没有可保存的 ReactiveMD 参数。旧导出载荷省略编译选项时采用三个开关全部关闭的默认行为。
91
+ 新版交互导出记录 `sourceSemantics: "mixed-rmd-v1"`、开关和状态基线。缺少该字段的 v1/v2 导出按原语义打开,包含此前显式开启能力时的整页 HTML 路径。载荷的 v1/v2 继续区分恢复契约。
139
92
 
140
- 相关规则见[集成说明](../integration/local-integration-ch.md)、[可分享导出](../integration/shareable-export-ch.md)和[安全约定](../../SECURITY-ch.md)。
93
+ 参见[集成说明](../integration/local-integration-ch.md)、[可分享导出](../integration/shareable-export-ch.md)和[安全约定](../../SECURITY-ch.md)。
@@ -1,60 +1,28 @@
1
- # Partial HTML compatibility and temporary routing policy
1
+ # HTML compatibility and author capabilities
2
2
 
3
3
  **English** · [中文](html-compatibility-ch.md)
4
4
 
5
- Pass `strict: false` to enable [local structural recovery](tolerance-en.md) in the default document path. It grants no additional HTML capability. A details summary and body can use consecutive lines without blank separators; they render as a single disclosure in an accordion, with rich summary text and keyboard support.
6
-
7
- This feature targets the next release. Documents use Markdown, ReactiveMD controls and expressions by default, with the P0 HTML subset below. Host applications can enable author CSS, JavaScript and extended HTML separately. All three options default to `false`.
8
-
9
- ## Temporary routing policy
10
-
11
- This release routes whole documents to avoid mixed parsing and rendering conflicts between author CSS, JavaScript, extended HTML and ReactiveMD.
12
-
13
- | Compile options | Document behavior |
14
- | --- | --- |
15
- | All three options omitted or `false` | ReactiveMD parsing and the existing React renderer, including P0 HTML |
16
- | Any option `true` | Native HTML for the entire source, rendered in an isolated iframe |
17
-
18
- In native HTML mode, `# headings`, `**emphasis**`, LaTeX and `{{ expressions }}` remain ordinary text. Elements such as `input` and `table` use HTML semantics. ReactiveMD components establish no bindings. Turning all options off recompiles the document in the default mode. This is a transitional policy for this release; mixed compatibility can be evaluated later.
19
-
20
- Options are host capabilities. Source tags and parameter state files cannot grant them. The demo displays the active mode and resets all three capabilities when the page reloads.
21
-
22
- ## Options and API
23
-
24
- ```ts
25
- import { compileLocal } from 'reactive-md';
26
-
27
- // Markdown, ReactiveMD and P0 HTML.
28
- const reactive = compileLocal(source);
29
-
30
- // Native HTML for the entire source; author CSS is enabled.
31
- const html = compileLocal(source, {
32
- enableCss: true,
33
- enableJavaScript: false,
34
- enableExtendedHtml: false,
35
- });
36
- ```
5
+ ReactiveMD documents mix Markdown, RMD components, expressions and basic HTML. The host controls author capabilities independently.
37
6
 
38
7
  | Option | Default | Capability |
39
8
  | --- | --- | --- |
40
- | `enableCss` | `false` | Author CSS |
41
- | `enableJavaScript` | `false` | Author scripts and event handlers |
42
- | `enableExtendedHtml` | `false` | P1 elements, embeds, forms, SVG/MathML and whole-page HTML features |
9
+ | `enableCss` | `true` | Document styles, component declarations and styles in granted HTML fragments |
10
+ | `enableJavaScript` | `false` | Author scripts in interactive mounts |
11
+ | `enableExtendedHtml` | `false` | Additional native HTML fragments |
43
12
 
44
- Each option must be boolean. Enabling one does not enable the others. Styled extended elements require both extended HTML and CSS; scripts in extended elements require both extended HTML and JavaScript. Built-in styles, interactions, chart SVG and formula MathML continue to work independently of these author capabilities.
13
+ Give a source view its grants through `LocalReactiveDocument.compileOptions`. Give a precompiled view its own grants through `LocalDocumentView.capabilityGrants`. A direct mount defaults to CSS on, JavaScript off and extended HTML off. Effective permission requires both compilation and mount permission. Changing only these capabilities preserves the source view's runtime state.
45
14
 
46
- Source-length limits and `limits.maxSyntaxNodes` still apply. The HTML path counts traversed parse-tree nodes, with a cumulative budget shared by nested `srcdoc` documents.
15
+ ### Styles
47
16
 
48
- The React convenience component accepts the same settings through `compileOptions`:
17
+ Place paired `<css>` blocks before the body. Multiple blocks cascade in source order. A component's `css` attribute applies declarations to its visible root. Document selectors stop at nested document roots. Ordinary inheritance still applies when the host nests documents. External author stylesheets and CSS resource loads are outside the inline style policy. A late style block or a declaration on a node without a visible root produces a source diagnostic. A registered component named `css` or `javascript` keeps its tag. A component schema's own `css` property keeps its original meaning.
49
18
 
50
- ```tsx
51
- <LocalReactiveDocument
52
- source={source}
53
- compileOptions={{ enableCss: true }}
54
- />
55
- ```
19
+ ### Scripts
20
+
21
+ Place code in a paired `<javascript>` block. After an interactive mount restores its state, an isolated worker initializes the blocks in source order. Each block has its own lexical scope. Use `await rmd.get(name)`, `await rmd.set(name, value)` and `await rmd.setMany(values)` to operate on named bindings. Writes follow the component's existing validation and read-only rules.
22
+
23
+ The counter exposes `increment`, `decrement` and `reset`. Give a counter an `action-id` and register `rmd.handleAction(id, "increment", callback)` to take over that action on that instance. `rmd.observeAction` observes an action without changing its default handler. Revocation, script replacement and unmount end the session. Static HTML, PDF and the static phase of hydration use the supplied RMD state.
56
24
 
57
- Lower-level hosts pass the compiled document to `LocalDocumentView`. Native HTML documents have a `document.html` field with the three normalized flags and empty parameter and binding collections. This field is runtime metadata. Store the original source and host settings when saving a document.
25
+ Set `LocalDocumentView.authorScriptPaused` to pause author actions and binding requests while an asynchronous preview recompiles. When the script is unchanged, resume the existing session. Restoring a counter's `action-id` restores its registration within that session.
58
26
 
59
27
  ## P0 HTML in the default mode
60
28
 
@@ -116,25 +84,12 @@ Native HTML fragments that cannot compile are displayed as their original text,
116
84
 
117
85
  In the native HTML route, an unsupported attribute makes its element fall back to source while neighboring elements continue to render. If whole-document parsing, serialization or compilation budget checks fail, React previews and standalone mounts display the complete source with preserved line breaks and escaped tags. Error results from `compileLocal`, resource limits and `onDiagnostics` reports are retained. Invalid host options and ReactiveMD component syntax errors keep their existing behavior.
118
86
 
119
- ## Extended HTML
120
-
121
- `enableExtendedHtml` controls the following author syntax:
122
-
123
- - Definition lists: `dl`, `dt`, `dd`.
124
- - Additional text semantics: `small`, `kbd`, `samp`, `var`, `abbr`, `q`, `cite`, `ins`.
125
- - Figures and structure: `figure`, `figcaption`, `article`, `section`, `aside`, `header`, `footer`, `ruby`, `rt`, `rp`, `wbr`.
126
- - Native forms, `iframe`, `object`, `embed`, `dialog`, arbitrary SVG/MathML and whole-page HTML features.
127
-
128
- In the default mode, `table` distinguishes native and ReactiveMD syntax by its body; existing components such as `section`, `input` and `select` retain their current meanings. In native HTML mode, these names use browser semantics.
129
-
130
- ## Isolation and export
131
-
132
- Author HTML runs inside a sandboxed iframe without `allow-same-origin`. Whole-page structure, styles and scripts apply to this isolated document. CSP and sandbox restrictions still govern resources, form submission and navigation. Extended HTML does not grant unrestricted network access.
87
+ ## Extended HTML and export
133
88
 
134
- This release supports inline CSS and JavaScript. Enabling the options does not automatically load external scripts, stylesheets, images, media or embedded resources. Extended HTML permits HTTP(S) form submission and `base` URL resolution inside the isolated document while retaining host-access and top-navigation restrictions. Iframes can use `srcdoc` for inline content; external `object` and `embed` resources remain subject to CSP.
89
+ Registered components take precedence. For example, `<input bind="name">` remains an RMD input, and `details` keeps Markdown and expressions in its body. Sanitized definition lists and other inert structures render in the document. Embeds, fragment scripts and styles run inside a sandbox. Denied fragments appear as source at their original positions.
135
90
 
136
- Once arbitrary JavaScript is enabled, scripts can create elements and styles dynamically. The other options primarily constrain author source; they do not promise to block individual runtime DOM operations. Host isolation remains in place.
91
+ Use sanitized `srcdoc` for self-contained embeds. Grant exact remote HTTPS origins with the mount's `allowedFrameOrigins` option. Fragment styles and scripts require their respective grants. The sandbox governs navigation, forms and parent document access.
137
92
 
138
- Interactive export preserves compile options and the selected rendering path. Native HTML static export retains built-in browser disclosure and form behavior while disabling author JavaScript. These documents have no ReactiveMD parameters to save. Older export payloads without compile options use the default with all three capabilities off.
93
+ New interactive exports record `sourceSemantics: "mixed-rmd-v1"`, the capability flags and the chosen state baseline. Old v1/v2 files without the field retain their original interpretation, including whole-document HTML where a capability was enabled. The envelope version continues to distinguish restoration contracts.
139
94
 
140
- See [integration](../integration/local-integration-en.md), [shareable export](../integration/shareable-export-en.md) and [security](../../SECURITY.md).
95
+ See [local integration](../integration/local-integration-en.md), [shareable export](../integration/shareable-export-en.md) and the [security policy](../../SECURITY.md).