reactive-md 0.9.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 (162) hide show
  1. package/CHANGELOG-ch.md +13 -0
  2. package/CHANGELOG.md +13 -0
  3. package/README-ch.md +6 -6
  4. package/README-en.md +6 -6
  5. package/README.md +6 -6
  6. package/SECURITY-ch.md +3 -3
  7. package/SECURITY.md +3 -3
  8. package/THIRD_PARTY_NOTICES.md +111 -1
  9. package/cli/build.mjs +1 -0
  10. package/cli/init.mjs +1 -1
  11. package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-sthUP0ct.js} +10 -10
  12. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  13. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  14. package/dist-library/{authoring-Co_TiE-P.js → authoring-Dsune4Hy.js} +40 -20
  15. package/dist-library/{compile-LhpTKqCR.js → compile-wUv8KEge.js} +1 -1
  16. package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-As_m-MNm.js} +2449 -1742
  17. package/dist-library/{compiler-DfGbQhyD.js → compiler-eOfcinZs.js} +19 -19
  18. package/dist-library/{component-state-BBJ08vML.js → component-state-C52ZFJGl.js} +1 -1
  19. package/dist-library/{config-BUo-8O5C.js → config-BadfhjdP.js} +1 -1
  20. package/dist-library/{config-validation-C5kJYk-J.js → config-validation-F47AcE6o.js} +49 -1
  21. package/dist-library/{controls-BWiLLtBO.js → controls-CcT6n7k_.js} +2433 -2409
  22. package/dist-library/{coordinate-BSl6enWV.js → coordinate-CWS9p5q_.js} +108 -107
  23. package/dist-library/{data-table-DfvytZKQ.js → data-table-Bgccxd7h.js} +68 -65
  24. package/dist-library/{display-lw3BT1TA.js → display-B-VhqVND.js} +1 -1
  25. package/dist-library/{export-C7IDW9ul.js → export-BqVmTXm8.js} +145 -87
  26. package/dist-library/{gallery-B8kSt1oI.js → gallery-CY6mTx8i.js} +151 -147
  27. package/dist-library/html-CNT4KD-2.js +757 -0
  28. package/dist-library/{incremental-D_6vwAAE.js → incremental-Dv0FSp_U.js} +404 -142
  29. package/dist-library/layout-C0YlEPGr.js +562 -0
  30. package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-KxvtKgJb.js} +2 -2
  31. package/dist-library/options-1aDLK7JY.js +121 -0
  32. package/dist-library/{package-core-D0POW4Gd.js → package-core-WFK1RhAZ.js} +3 -3
  33. package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-Yuf3A_VI.js} +3270 -3778
  34. package/dist-library/react-D5iGiUdL.js +7 -0
  35. package/dist-library/reactive-md-authoring.js +16 -18
  36. package/dist-library/reactive-md-build.js +51 -51
  37. package/dist-library/reactive-md-compiler-standard.js +10 -9
  38. package/dist-library/reactive-md-compiler.js +3 -3
  39. package/dist-library/reactive-md-export.js +4 -4
  40. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  41. package/dist-library/reactive-md-pdf.js +127 -3
  42. package/dist-library/reactive-md-plugin-chart.js +2 -2
  43. package/dist-library/reactive-md-plugin-data.js +4 -4
  44. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  45. package/dist-library/reactive-md-plugin-forms.js +2 -2
  46. package/dist-library/reactive-md-plugin-gallery.js +2 -2
  47. package/dist-library/reactive-md-plugin-navigation.js +2 -2
  48. package/dist-library/reactive-md-plugin-network.js +117 -115
  49. package/dist-library/reactive-md-plugin-plot.js +3 -3
  50. package/dist-library/reactive-md-react-minimal.js +4 -4
  51. package/dist-library/reactive-md-react-server.js +6 -6
  52. package/dist-library/reactive-md-react-unstyled.js +10 -11
  53. package/dist-library/reactive-md-react.js +10 -11
  54. package/dist-library/reactive-md-sdk.js +3 -3
  55. package/dist-library/reactive-md-standalone-configured.js +2 -2
  56. package/dist-library/reactive-md-standalone-host.js +2 -2
  57. package/dist-library/reactive-md-testing-browser.js +2 -2
  58. package/dist-library/reactive-md-testing-react.js +6 -6
  59. package/dist-library/reactive-md-testing.js +4 -4
  60. package/dist-library/reactive-md.js +280 -193
  61. package/dist-library/{registry-05JiqmEp.js → registry-B9NGct4d.js} +1 -1
  62. package/dist-library/{resources-IeJomeUT.js → resources-D2GDQS0p.js} +1 -1
  63. package/dist-library/{runtime-CuOyRe9f.js → runtime-kcA7bG7G.js} +341 -341
  64. package/dist-library/{schema-C-AeByPp.js → schema-BufhKUSM.js} +5 -5
  65. package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-BoJT1SIt.js} +490 -150
  66. package/dist-library/{session-core-BGka5D1J.js → session-core-nmJHuR9c.js} +170 -156
  67. package/dist-library/{shareable-jkGi2g6y.js → shareable-DpbE-59H.js} +207 -242
  68. package/dist-library/types/authoring/catalog.d.ts +1 -2
  69. package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
  70. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  71. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  72. package/dist-library/types/local/compilation/compiler-services.d.ts +8 -4
  73. package/dist-library/types/local/compilation/compiler.d.ts +3 -3
  74. package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
  75. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  76. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  77. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +48 -0
  78. package/dist-library/types/local/configuration/options-core.d.ts +1 -2
  79. package/dist-library/types/local/configuration/options.d.ts +1 -0
  80. package/dist-library/types/local/css/author-css.d.ts +66 -0
  81. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  82. package/dist-library/types/local/html/html.d.ts +39 -3
  83. package/dist-library/types/local/index.d.ts +1 -1
  84. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  85. package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
  86. package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
  87. package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
  88. package/dist-library/types/local/parsing/parser.d.ts +2 -2
  89. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  90. package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
  91. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
  92. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  93. package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
  94. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  95. package/dist-library/types/local/transport/worker.d.ts +27 -4
  96. package/dist-library/types/local/types.d.ts +52 -16
  97. package/dist-library/types/react/component-api.d.ts +10 -1
  98. package/dist-library/types/react/component-utils.d.ts +9 -1
  99. package/dist-library/types/react/sdk-core.d.ts +4 -1
  100. package/dist-library/types/shareable.d.ts +5 -4
  101. package/dist-library/types/standalone/prepare.d.ts +1 -1
  102. package/dist-library/types/standalone/session-core.d.ts +3 -2
  103. package/dist-library/{types-BFC5rzC4.js → types-BeNtPqdY.js} +1 -1
  104. package/dist-library/{validation-BlDL2uD9.js → validation-BEBA_HvS.js} +88 -72
  105. package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-CyV1FXzs.js} +6 -5
  106. package/dist-library/{visuals-BkYRmYGO.js → visuals-BZbZYA7w.js} +24181 -24180
  107. package/dist-standalone/reactive-md-standalone.js +124 -117
  108. package/docs/README-ch.md +2 -1
  109. package/docs/README.md +2 -1
  110. package/docs/compatibility/compatibility-ch.md +6 -6
  111. package/docs/compatibility/compatibility-en.md +6 -6
  112. package/docs/compatibility/source-versioning-ch.md +1 -1
  113. package/docs/compatibility/source-versioning-en.md +1 -1
  114. package/docs/development/component-development-ch.md +2 -2
  115. package/docs/development/component-development-en.md +2 -2
  116. package/docs/development/component-development-reference-ch.md +2 -2
  117. package/docs/development/component-development-reference-en.md +2 -2
  118. package/docs/development/component-protocol-ch.md +2 -2
  119. package/docs/development/component-protocol-en.md +2 -2
  120. package/docs/development/extension-tutorial-ch.md +3 -3
  121. package/docs/development/extension-tutorial-en.md +3 -3
  122. package/docs/integration/author-tools-ch.md +1 -1
  123. package/docs/integration/author-tools-en.md +1 -1
  124. package/docs/integration/compiler-ch.md +3 -1
  125. package/docs/integration/compiler-en.md +3 -1
  126. package/docs/integration/editor-ch.md +3 -3
  127. package/docs/integration/editor-en.md +3 -3
  128. package/docs/integration/extension-sdk-ch.md +2 -2
  129. package/docs/integration/extension-sdk-en.md +2 -2
  130. package/docs/integration/local-integration-ch.md +130 -8
  131. package/docs/integration/local-integration-en.md +130 -8
  132. package/docs/integration/shareable-export-ch.md +4 -2
  133. package/docs/integration/shareable-export-en.md +4 -2
  134. package/docs/reference/html-compatibility-ch.md +20 -67
  135. package/docs/reference/html-compatibility-en.md +19 -64
  136. package/docs/reference/public-api-ch.md +10 -7
  137. package/docs/reference/public-api-en.md +10 -7
  138. package/docs/releases/release-0.9.1-ch.md +29 -0
  139. package/docs/releases/release-0.9.1-en.md +29 -0
  140. package/examples/component-package/README-ch.md +1 -1
  141. package/examples/component-package/README.md +1 -1
  142. package/examples/game-2048-package/README-ch.md +1 -1
  143. package/examples/game-2048-package/README.md +1 -1
  144. package/examples/integration/README-ch.md +21 -2
  145. package/examples/integration/README.md +21 -2
  146. package/examples/integration/extension-sdk/README-ch.md +1 -1
  147. package/examples/integration/extension-sdk/README.md +1 -1
  148. package/examples/integration/streaming/index.html +48 -0
  149. package/examples/integration/streaming/main.js +175 -0
  150. package/examples/integration/streaming/package.json +13 -0
  151. package/examples/integration/streaming/worker.js +3 -0
  152. package/examples/minimal-extension/README-ch.md +3 -3
  153. package/examples/minimal-extension/README.md +3 -3
  154. package/examples/tetris-package/README-ch.md +1 -1
  155. package/examples/tetris-package/README.md +1 -1
  156. package/package.json +6 -1
  157. package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
  158. package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
  159. package/dist-library/component-utils-BvHL8VGt.js +0 -298
  160. package/dist-library/layout-C22VjZh0.js +0 -542
  161. package/dist-library/options-CdSKOi7p.js +0 -116
  162. package/dist-library/react-LY5qsVeP.js +0 -7
package/CHANGELOG-ch.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  **中文** · [English](CHANGELOG.md)
4
4
 
5
+ ## 0.9.1(2026-11-22,latest 渠道)
6
+
7
+ 优化流式源码编译、文档内跳转滚动,以及更严格的源码阶段校验。
8
+
9
+ ### 变更
10
+
11
+ - 优化流式源码编译。编译会话、`LocalCompileScheduler`、Worker 和 `LocalReactiveDocument` 现在接受显式的 `streaming` 或 `final` 源码阶段;未完成区域以原文呈现,可修复问题进入 `transientDiagnostics`,确定性错误与最终严格/恢复语义保持不变。编辑器侧的对应快照处理随单独的编辑器版本发布。
12
+
13
+ ### 修复
14
+
15
+ - 将 `<jump>` 跳转限制在渲染文档外层最近的主机滚动容器内;嵌入预览只滚动自身视口,不再带动外层页面。
16
+ - 拒绝运行时不受支持的 `sourcePhase` 值,不再回退到可交互的最终渲染。
17
+
5
18
  ## 0.9.0(2026-11-20,latest 渠道)
6
19
 
7
20
  主题层叠与控件、18 个组件的精简预设、静态 PDF 导出、具名宿主网络通道,以及解析器、状态恢复和增量编辑修复。
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  **English** · [中文](CHANGELOG-ch.md)
4
4
 
5
+ ## 0.9.1 (2026-11-22, latest channel)
6
+
7
+ Streaming source compilation refinements, document-scoped jump scrolling, and stricter source-phase validation.
8
+
9
+ ### Changed
10
+
11
+ - Refine streaming source compilation. Compile sessions, `LocalCompileScheduler`, Workers and `LocalReactiveDocument` now accept explicit `streaming` or `final` phases; unfinished regions render as literal text and fixable issues are reported through `transientDiagnostics`, while deterministic errors and final strict/recovery semantics stay unchanged. Matching editor-side snapshot handling ships in a separate editor release.
12
+
13
+ ### Fixed
14
+
15
+ - Scope `<jump>` navigation to the nearest scroll container the host wraps around the rendered document; an embedded preview scrolls its own viewport instead of the surrounding page.
16
+ - Reject unsupported runtime `sourcePhase` values instead of falling back to interactive final rendering.
17
+
5
18
  ## 0.9.0 (2026-11-20, latest channel)
6
19
 
7
20
  Theme cascade and controls, a focused 18-component minimal preset, static PDF export, named host network channels, and parser, state restoration and incremental editing fixes.
package/README-ch.md CHANGED
@@ -192,15 +192,15 @@ Reactive MD 需要 Node.js 22.12 或更新版本,包只提供 ESM 入口:
192
192
  npm install reactive-md
193
193
  ```
194
194
 
195
- 0.9.0 稳定版使用 `latest` 渠道。项目也可以固定版本。
195
+ 0.9.1 稳定版使用 `latest` 渠道。项目也可以固定版本。
196
196
 
197
197
  ```sh
198
198
  npm install reactive-md
199
199
  # 或固定版本
200
- npm install reactive-md@0.9.0
200
+ npm install reactive-md@0.9.1
201
201
  ```
202
202
 
203
- 升级前请阅读 [0.9.0 发布说明](docs/releases/release-0.9.0-ch.md)和[兼容性说明](docs/compatibility/compatibility-ch.md)。
203
+ 升级前请阅读 [0.9.1 发布说明](docs/releases/release-0.9.1-ch.md)和[兼容性说明](docs/compatibility/compatibility-ch.md)。
204
204
 
205
205
  ### 升级到 0.8.0
206
206
 
@@ -359,7 +359,7 @@ export function Article({ source }: { source: string }) {
359
359
 
360
360
  ## 用 React 编辑源码
361
361
 
362
- 可复用的源码编辑器位于独立包 `reactive-md-editor`(0.8 发布中为 `0.1.0`),使用独立样式表,发布后与引擎一起安装。0.7 中它以 `reactive-md/editor` 提供。组件是受控的,需要 React 19:
362
+ 可复用的源码编辑器位于独立包 `reactive-md-editor`(`0.2.0`,支持 `reactive-md@0.9.x` 系列),使用独立样式表,与引擎一起安装。0.7 中它以 `reactive-md/editor` 提供;自 0.8 起独立为单独的包。组件是受控的,需要 React 19:
363
363
 
364
364
  ```tsx
365
365
  import { useState } from 'react';
@@ -410,13 +410,13 @@ benchmarks/ 带来源说明的精简性能数据
410
410
  - [扩展开发教程](docs/development/extension-tutorial-ch.md):选择入口、编写组件包并验证。
411
411
  - [版本与兼容性](docs/compatibility/compatibility-ch.md)。
412
412
  - [性能说明](docs/development/performance-overview-ch.md)与[发布清单](CONTRIBUTING-ch.md#发布流程)。
413
- - [0.9.0 发布说明](docs/releases/release-0.9.0-ch.md)和[历史发布记录](docs/releases)。
413
+ - [0.9.1 发布说明](docs/releases/release-0.9.1-ch.md)和[历史发布记录](docs/releases)。
414
414
 
415
415
  ## 支持与状态
416
416
 
417
417
  - CI 使用 Node 24 运行引擎检查和预设脚手架验证。打包消费者检查覆盖静态 SSR。构建后运行 `node scripts/verify-shareable.mjs`,可用 Chromium 验证单文件水合并测量 standalone 体积。
418
418
  - 0.x 次版本可能包含破坏性变更。请保存原始 `.reactive.md` 源码,而不是运行时 AST 或内存状态。
419
- - `0.9.0` 是 `latest` 渠道的稳定版本。安全修复可能随次版本发布。
419
+ - `0.9.1` 是 `latest` 渠道的稳定版本。安全修复可能随次版本发布。
420
420
  - 扩展 SDK 契约为 `0.7.0`。组件包、主题、Vite 适配器、离线构建和合规工具均使用公开入口。
421
421
 
422
422
  ## 贡献与安全
package/README-en.md CHANGED
@@ -192,15 +192,15 @@ Reactive MD requires Node.js 22.12 or newer and ships only ESM entries:
192
192
  npm install reactive-md
193
193
  ```
194
194
 
195
- The 0.9.0 stable release uses the `latest` channel. Pin the version if your project requires it.
195
+ The 0.9.1 stable release uses the `latest` channel. Pin the version if your project requires it.
196
196
 
197
197
  ```sh
198
198
  npm install reactive-md
199
199
  # or pin the version
200
- npm install reactive-md@0.9.0
200
+ npm install reactive-md@0.9.1
201
201
  ```
202
202
 
203
- Read the [0.9.0 release notes](docs/releases/release-0.9.0-en.md) and the [compatibility guide](docs/compatibility/compatibility-en.md) before upgrading.
203
+ Read the [0.9.1 release notes](docs/releases/release-0.9.1-en.md) and the [compatibility guide](docs/compatibility/compatibility-en.md) before upgrading.
204
204
 
205
205
  ### Upgrade to 0.8.0
206
206
 
@@ -359,7 +359,7 @@ export function Article({ source }: { source: string }) {
359
359
 
360
360
  ## Edit source with React
361
361
 
362
- The reusable source editor lives in the separate `reactive-md-editor` package (`0.1.0` in the 0.8 release), with its own stylesheet. Install it alongside the engine after publication. In 0.7 it shipped as `reactive-md/editor`. The component is controlled and requires React 19:
362
+ The reusable source editor lives in the separate `reactive-md-editor` package (`0.2.0`, supporting the `reactive-md@0.9.x` series), with its own stylesheet. Install it alongside the engine. In 0.7 it shipped as `reactive-md/editor`; it has been a separate package since 0.8. The component is controlled and requires React 19:
363
363
 
364
364
  ```tsx
365
365
  import { useState } from 'react';
@@ -410,13 +410,13 @@ benchmarks/ Condensed performance measurements with provenance
410
410
  - [Extension tutorial](docs/development/extension-tutorial-en.md): choose an entry, build a component package and verify it.
411
411
  - [Versions and compatibility](docs/compatibility/compatibility-en.md).
412
412
  - [Performance measurements](docs/development/performance-overview-en.md) and [release checklist](CONTRIBUTING.md#releasing).
413
- - [0.9.0 release notes](docs/releases/release-0.9.0-en.md) and [previous releases](docs/releases).
413
+ - [0.9.1 release notes](docs/releases/release-0.9.1-en.md) and [previous releases](docs/releases).
414
414
 
415
415
  ## Support and status
416
416
 
417
417
  - CI runs the engine checks and preset scaffold verification on Node 24. The packed-consumer check covers static SSR. Run `node scripts/verify-shareable.mjs` after building to test single-file hydration in Chromium and measure the standalone bundle.
418
418
  - 0.x minor releases may contain breaking changes. Persist the original `.reactive.md` source, not the runtime AST or in-memory state.
419
- - `0.9.0` is the stable release on `latest`. Security fixes may ship in minor releases.
419
+ - `0.9.1` is the stable release on `latest`. Security fixes may ship in minor releases.
420
420
  - The extension SDK contract is `0.7.0`. Component packages, themes, the Vite adapter, offline builds and compliance tools use the public entries.
421
421
 
422
422
  ## Contributing and security
package/README.md CHANGED
@@ -192,15 +192,15 @@ Reactive MD requires Node.js 22.12 or newer and ships only ESM entries:
192
192
  npm install reactive-md
193
193
  ```
194
194
 
195
- The 0.9.0 stable release uses the `latest` channel. Pin the version if your project requires it.
195
+ The 0.9.1 stable release uses the `latest` channel. Pin the version if your project requires it.
196
196
 
197
197
  ```sh
198
198
  npm install reactive-md
199
199
  # or pin the version
200
- npm install reactive-md@0.9.0
200
+ npm install reactive-md@0.9.1
201
201
  ```
202
202
 
203
- Read the [0.9.0 release notes](docs/releases/release-0.9.0-en.md) and the [compatibility guide](docs/compatibility/compatibility-en.md) before upgrading.
203
+ Read the [0.9.1 release notes](docs/releases/release-0.9.1-en.md) and the [compatibility guide](docs/compatibility/compatibility-en.md) before upgrading.
204
204
 
205
205
  ### Upgrade to 0.8.0
206
206
 
@@ -357,7 +357,7 @@ export function Article({ source }: { source: string }) {
357
357
 
358
358
  ## Edit source with React
359
359
 
360
- The reusable source editor lives in the separate `reactive-md-editor` package (`0.1.0` in the 0.8 release), with its own stylesheet. Install it alongside the engine after publication. In 0.7 it shipped as `reactive-md/editor`. The component is controlled and requires React 19:
360
+ The reusable source editor lives in the separate `reactive-md-editor` package (`0.2.0`, supporting the `reactive-md@0.9.x` series), with its own stylesheet. Install it alongside the engine. In 0.7 it shipped as `reactive-md/editor`; it has been a separate package since 0.8. The component is controlled and requires React 19:
361
361
 
362
362
  ```tsx
363
363
  import { useState } from 'react';
@@ -408,13 +408,13 @@ benchmarks/ Condensed performance measurements with provenance
408
408
  - [Extension tutorial](docs/development/extension-tutorial-en.md): choose an entry, build a component package and verify it.
409
409
  - [Versions and compatibility](docs/compatibility/compatibility-en.md).
410
410
  - [Performance measurements](docs/development/performance-overview-en.md) and [release checklist](CONTRIBUTING.md#releasing).
411
- - [0.9.0 release notes](docs/releases/release-0.9.0-en.md) and [previous releases](docs/releases).
411
+ - [0.9.1 release notes](docs/releases/release-0.9.1-en.md) and [previous releases](docs/releases).
412
412
 
413
413
  ## Support and status
414
414
 
415
415
  - CI runs the engine checks and preset scaffold verification on Node 24. The packed-consumer check covers static SSR. Run `node scripts/verify-shareable.mjs` after building to test single-file hydration in Chromium and measure the standalone bundle.
416
416
  - 0.x minor releases may contain breaking changes. Persist the original `.reactive.md` source, not the runtime AST or in-memory state.
417
- - `0.9.0` is the stable release on `latest`. Security fixes may ship in minor releases.
417
+ - `0.9.1` is the stable release on `latest`. Security fixes may ship in minor releases.
418
418
  - The extension SDK contract is `0.7.0`. Component packages, themes, the Vite adapter, offline builds and compliance tools use the public entries.
419
419
 
420
420
  ## Contributing and security
package/SECURITY-ch.md CHANGED
@@ -14,9 +14,9 @@ Reactive MD 渲染作者编写的本地交互文档。文档是不可信输入
14
14
 
15
15
  ### 文档内容
16
16
 
17
- - 三个 HTML 能力开关全部关闭时,作者脚本、事件属性和 CSS 保持惰性。P0 HTML 重建为受控节点和 React 元素。见 [HTML 部分兼容与暂时性分流政策](docs/reference/html-compatibility-ch.md)。
18
- - 开启 `enableCss`、`enableJavaScript` 或 `enableExtendedHtml` 中任意一个,整篇源码会在不带 `allow-same-origin` 的沙箱 iframe 中按原生 HTML 处理。其他开关继续约束作者源码;允许任意 JavaScript 后,脚本可以动态创建元素和样式,源码开关不构成运行时 DOM 权限。网络、表单和导航继续受 CSP 与沙箱限制。
19
- - 默认 React 渲染器仅注入按固定选项配置的 KaTeX 排版结果;作者源码与错误消息均作为转义文本处理。原生 HTML 通过解析和过滤后的 iframe `srcdoc` 渲染,与宿主 DOM 分离。
17
+ - 基础 HTML 重建为受控节点和 React 元素。作者 CSS 使用文内声明和文档作用域规则。JavaScript 与扩展 HTML 分别授权。参见 [HTML 兼容](docs/reference/html-compatibility-ch.md)。
18
+ - 文档脚本在专用 Worker 的 QuickJS 解释器中运行,受计算和内存预算约束。宿主校验绑定更新,动作登记归当前视图。扩展 HTML 片段使用独立来源的沙箱和嵌入策略。
19
+ - React 渲染器转义作者文本和错误消息。KaTeX 生成公式标记,HTML 净化器生成隔离 iframe 的内容。
20
20
  - 表达式使用自己的解析器和 AST 求值器,不使用 `eval`、`new Function`,不支持赋值、方法调用、属性访问、原型路径或导入。表达式只能读取文档声明的参数和内置函数。
21
21
  - KaTeX 将公式排版为 HTML 和用于辅助技术的 MathML。输入、宏展开及作者指定的尺寸受限;作者自定义宏、文件、网络和 HTML 入口关闭。无效或不支持的公式回退为有界的原始文本。绘图求值保留独立的受预算限制解析器。
22
22
  - 表达式、模板、表格和图表不会发起网络请求;图表数据必须写在文档里。
package/SECURITY.md CHANGED
@@ -14,9 +14,9 @@ The guarantees below are covered by compiler, runtime and renderer tests; capabi
14
14
 
15
15
  ### Document content
16
16
 
17
- - With the three HTML capability options off, author scripts, event attributes and CSS remain inert. P0 HTML is rebuilt as typed nodes and React elements. See [HTML compatibility and the temporary routing policy](docs/reference/html-compatibility-en.md).
18
- - Enabling `enableCss`, `enableJavaScript` or `enableExtendedHtml` routes the entire source to native HTML inside a sandboxed iframe without `allow-same-origin`. The other flags still constrain author source. Arbitrary enabled JavaScript can create DOM elements and styles dynamically; individual source flags are not runtime DOM permissions. CSP and sandbox restrictions continue to govern network access, forms and navigation.
19
- - The default React renderer injects only HTML generated by the configured KaTeX typesetter. Author source and error messages are escaped as text. Native HTML uses a parsed and filtered iframe `srcdoc`, separate from the host DOM.
17
+ - P0 HTML is rebuilt as typed nodes and React elements. Author CSS is limited to inline declarations and document-scoped rules. JavaScript and extended HTML require separate grants. See [HTML compatibility](docs/reference/html-compatibility-en.md).
18
+ - Document scripts run in a dedicated worker with a bounded QuickJS interpreter. The host validates the worker's binding updates and confines registrations to the current view. Extended HTML fragments use a sandbox with an independent origin and a source policy.
19
+ - The React renderer escapes author text and error messages. KaTeX generates formula markup, and the HTML sanitizer prepares iframe content for its isolated document.
20
20
  - Expressions use their own parser and AST evaluator, with no `eval` or `new Function`, and no support for assignment, method calls, property access, prototype paths or imports. Expressions can only read parameters declared by the document and built-in functions.
21
21
  - KaTeX typesets formulas as HTML with accessible MathML. Input, expansion and user-specified dimensions are bounded; author-defined macros, files, network and HTML entry points are disabled. Invalid or unsupported formulas fall back to bounded source text. Plot evaluation uses its separate budget-limited parser.
22
22
  - Expressions, templates, tables and charts do not make network requests; chart data must be written in the document.
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- Reactive MD bundles its Markdown, HTML parsing, syntax-highlighting, diagram-layout and KaTeX math typesetting dependencies, including KaTeX fonts and the mhchem extension. The standalone HTML runtime also bundles React, React DOM and scheduler. This file preserves license texts for those installed dependency trees, including supporting type packages. The library React entry uses host-provided React and React DOM peers.
3
+ Reactive MD bundles its Markdown, HTML parsing, syntax-highlighting, diagram-layout and KaTeX math typesetting dependencies, including KaTeX fonts and the mhchem extension. The author script worker bundles QuickJS and the Emscripten bindings. The standalone HTML runtime also bundles React, React DOM and scheduler. This file preserves license texts for those installed dependency trees, including supporting type packages. The library React entry uses host-provided React and React DOM peers.
4
4
 
5
5
  Regenerate after dependency updates with `node scripts/generate-notices.mjs`.
6
6
 
@@ -140,6 +140,88 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
140
140
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
141
141
  ```
142
142
 
143
+ ## @jitl/quickjs-ffi-types@0.32.0
144
+
145
+ Declared license: MIT
146
+
147
+ ```text
148
+ The MIT License
149
+
150
+ quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
151
+
152
+ Permission is hereby granted, free of charge, to any person obtaining a copy
153
+ of this software and associated documentation files (the "Software"), to deal
154
+ in the Software without restriction, including without limitation the rights
155
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
156
+ copies of the Software, and to permit persons to whom the Software is
157
+ furnished to do so, subject to the following conditions:
158
+
159
+ The above copyright notice and this permission notice shall be included in all
160
+ copies or substantial portions of the Software.
161
+
162
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
163
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
164
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
165
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
166
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
167
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
168
+ SOFTWARE.
169
+ ```
170
+
171
+ ## @jitl/quickjs-singlefile-browser-release-sync@0.32.0
172
+
173
+ Declared license: MIT
174
+
175
+ ```text
176
+ quickjs-emscripten:
177
+ The MIT License
178
+
179
+ quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
180
+
181
+ Permission is hereby granted, free of charge, to any person obtaining a copy
182
+ of this software and associated documentation files (the "Software"), to deal
183
+ in the Software without restriction, including without limitation the rights
184
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
185
+ copies of the Software, and to permit persons to whom the Software is
186
+ furnished to do so, subject to the following conditions:
187
+
188
+ The above copyright notice and this permission notice shall be included in all
189
+ copies or substantial portions of the Software.
190
+
191
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
192
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
193
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
194
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
195
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
196
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
197
+ SOFTWARE.
198
+
199
+
200
+ quickjs:
201
+ QuickJS Javascript Engine
202
+
203
+ Copyright (c) 2017-2021 Fabrice Bellard
204
+ Copyright (c) 2017-2021 Charlie Gordon
205
+
206
+ Permission is hereby granted, free of charge, to any person obtaining a copy
207
+ of this software and associated documentation files (the "Software"), to deal
208
+ in the Software without restriction, including without limitation the rights
209
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
210
+ copies of the Software, and to permit persons to whom the Software is
211
+ furnished to do so, subject to the following conditions:
212
+
213
+ The above copyright notice and this permission notice shall be included in
214
+ all copies or substantial portions of the Software.
215
+
216
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
217
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
218
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
219
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
220
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
221
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
222
+ THE SOFTWARE.
223
+ ```
224
+
143
225
  ## @juggle/resize-observer@3.4.0
144
226
 
145
227
  Declared license: Apache-2.0
@@ -3696,6 +3778,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
3696
3778
  THE SOFTWARE.
3697
3779
  ```
3698
3780
 
3781
+ ## quickjs-emscripten-core@0.32.0
3782
+
3783
+ Declared license: MIT
3784
+
3785
+ ```text
3786
+ The MIT License
3787
+
3788
+ quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
3789
+
3790
+ Permission is hereby granted, free of charge, to any person obtaining a copy
3791
+ of this software and associated documentation files (the "Software"), to deal
3792
+ in the Software without restriction, including without limitation the rights
3793
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3794
+ copies of the Software, and to permit persons to whom the Software is
3795
+ furnished to do so, subject to the following conditions:
3796
+
3797
+ The above copyright notice and this permission notice shall be included in all
3798
+ copies or substantial portions of the Software.
3799
+
3800
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3801
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3802
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3803
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3804
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3805
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3806
+ SOFTWARE.
3807
+ ```
3808
+
3699
3809
  ## react-dom@19.3.1
3700
3810
 
3701
3811
  Declared license: MIT
package/cli/build.mjs CHANGED
@@ -315,6 +315,7 @@ export async function runBuild(options, context) {
315
315
  const props = {
316
316
  document: baseline.document,
317
317
  runtime,
318
+ capabilityGrants: project?.host.compileOptions,
318
319
  mode: options.mode,
319
320
  locale: options.locale,
320
321
  colorScheme: options.colorScheme,
package/cli/init.mjs CHANGED
@@ -10,7 +10,7 @@ const SEMANTIC_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)
10
10
  const SCAFFOLD_PACKAGE_VERSION = '0.1.0';
11
11
  // The published engine package version used for generated npm dependencies and
12
12
  // install instructions. Kept in sync with package.json by check-versions.
13
- const SCAFFOLD_ENGINE_VERSION = '0.9.0';
13
+ const SCAFFOLD_ENGINE_VERSION = '0.9.1';
14
14
  // The SDK data contract version, independent of the engine release. Kept in
15
15
  // sync with src/sdk/version.ts by scripts/check-versions.mjs.
16
16
  const SCAFFOLD_SDK_VERSION = '0.7.0';
@@ -1,15 +1,15 @@
1
1
  import { z as e } from "./preset-core-CKc5YXSM.js";
2
2
  import t from "./reactive-md-default-preset.js";
3
- import { c as n } from "./sdk-core-BJLJaVR5.js";
4
- import { _ as r, a as ee, c as te, d as ne, f as re, g as ie, h as ae, i as oe, l as i, m as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./controls-BWiLLtBO.js";
5
- import { t as p } from "./data-table-DfvytZKQ.js";
6
- import { a as m, i as h, n as g, o as _, r as v, t as y } from "./visuals-BkYRmYGO.js";
7
- import { t as b } from "./coordinate-BSl6enWV.js";
8
- import { _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as se, i as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, x as z, y as B } from "./layout-C22VjZh0.js";
9
- import { n as V, t as H } from "./gallery-B8kSt1oI.js";
10
- import { r as U, t as W } from "./package-core-D0POW4Gd.js";
11
- import { t as G } from "./LocalDocumentViewCore-BLG4hMuO.js";
12
- import { t as K } from "./LocalReactiveDocumentCore-DVQ6WA9G.js";
3
+ import { G as n } from "./sdk-core-BoJT1SIt.js";
4
+ import { _ as r, a as ee, c as te, d as ne, f as re, g as ie, h as ae, i as oe, l as i, m as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./controls-CcT6n7k_.js";
5
+ import { t as p } from "./data-table-Bgccxd7h.js";
6
+ import { a as m, i as h, n as g, o as _, r as v, t as y } from "./visuals-BZbZYA7w.js";
7
+ import { t as b } from "./coordinate-CWS9p5q_.js";
8
+ import { _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as se, i as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, x as z, y as B } from "./layout-C0YlEPGr.js";
9
+ import { n as V, t as H } from "./gallery-CY6mTx8i.js";
10
+ import { r as U, t as W } from "./package-core-WFK1RhAZ.js";
11
+ import { t as G } from "./LocalDocumentViewCore-GiWV3bey.js";
12
+ import { t as K } from "./LocalReactiveDocumentCore-ZjQSGyHE.js";
13
13
  import { jsx as q } from "react/jsx-runtime";
14
14
  // src/components/default-preset.ts
15
15
  function J() {