reactive-md 0.4.1 → 0.5.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 (98) hide show
  1. package/CHANGELOG-ch.md +144 -113
  2. package/CHANGELOG.md +144 -113
  3. package/LICENSE +21 -21
  4. package/README-ch.md +154 -123
  5. package/README-en.md +179 -147
  6. package/README.md +179 -147
  7. package/SECURITY-ch.md +4 -3
  8. package/SECURITY.md +4 -3
  9. package/THIRD_PARTY_NOTICES.md +138 -1
  10. package/bin/reactive-md.mjs +1 -1
  11. package/dist-library/reactive-md-editor.css +2 -0
  12. package/dist-library/reactive-md-editor.js +3834 -0
  13. package/dist-library/reactive-md-react.js +9324 -1670
  14. package/dist-library/reactive-md.css +1 -1
  15. package/dist-library/reactive-md.js +426 -305
  16. package/dist-library/{runtime-D3QTVYaz.js → runtime-CXBdLQ3A.js} +8950 -2895
  17. package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +7 -0
  18. package/dist-library/types/editor/editor-commands.d.ts +50 -0
  19. package/dist-library/types/editor/editor-i18n.d.ts +109 -0
  20. package/dist-library/types/editor/editor-toolbar.d.ts +24 -0
  21. package/dist-library/types/editor/editor-view-bar.d.ts +11 -0
  22. package/dist-library/types/editor/extended-native-components.d.ts +58 -0
  23. package/dist-library/types/editor/index.d.ts +9 -0
  24. package/dist-library/types/editor/locale.d.ts +13 -0
  25. package/dist-library/types/editor/native-components.d.ts +47 -0
  26. package/dist-library/types/editor/source-authoring.d.ts +57 -0
  27. package/dist-library/types/editor/types.d.ts +51 -0
  28. package/dist-library/types/editor/use-gutter-metrics.d.ts +5 -0
  29. package/dist-library/types/editor/use-source-history.d.ts +16 -0
  30. package/dist-library/types/local/LocalDocumentView.d.ts +10 -3
  31. package/dist-library/types/local/code-block.d.ts +26 -0
  32. package/dist-library/types/local/diagnostics.d.ts +25 -0
  33. package/dist-library/types/local/footnotes.d.ts +51 -0
  34. package/dist-library/types/local/heading-anchors.d.ts +2 -0
  35. package/dist-library/types/local/html.d.ts +16 -0
  36. package/dist-library/types/local/image-view.d.ts +23 -0
  37. package/dist-library/types/local/index.d.ts +1 -1
  38. package/dist-library/types/local/options.d.ts +29 -0
  39. package/dist-library/types/local/types.d.ts +42 -1
  40. package/dist-library/types/local/worker.d.ts +18 -6
  41. package/dist-library/types/shareable.d.ts +9 -1
  42. package/dist-standalone/reactive-md-standalone.css +1 -1
  43. package/dist-standalone/reactive-md-standalone.js +49 -38
  44. package/docs/compatibility-ch.md +12 -8
  45. package/docs/compatibility-en.md +12 -8
  46. package/docs/component-protocol-ch.md +2 -2
  47. package/docs/component-protocol-en.md +2 -2
  48. package/docs/editor-ch.md +235 -0
  49. package/docs/editor-en.md +235 -0
  50. package/docs/html-compatibility-ch.md +98 -0
  51. package/docs/html-compatibility-en.md +98 -0
  52. package/docs/local-guide-ch.md +11 -5
  53. package/docs/local-guide-en.md +11 -5
  54. package/docs/local-integration-ch.md +4 -1
  55. package/docs/local-integration-en.md +4 -1
  56. package/docs/local-interaction-syntax-ch.md +9 -2
  57. package/docs/local-interaction-syntax-en.md +7 -2
  58. package/docs/release-0.4.1-ch.md +23 -23
  59. package/docs/release-0.4.1-en.md +23 -23
  60. package/docs/release-0.5.0-ch.md +41 -0
  61. package/docs/release-0.5.0-en.md +41 -0
  62. package/docs/release-0.5.1-ch.md +39 -0
  63. package/docs/release-0.5.1-en.md +39 -0
  64. package/docs/releasing-ch.md +108 -101
  65. package/docs/releasing-en.md +108 -101
  66. package/docs/shareable-export-ch.md +6 -2
  67. package/docs/shareable-export-en.md +6 -2
  68. package/examples/integration/core/package.json +7 -7
  69. package/examples/integration/react/index.html +12 -12
  70. package/examples/integration/react/main.jsx +21 -21
  71. package/examples/integration/react/package.json +9 -9
  72. package/examples/integration/react-editor.tsx +74 -0
  73. package/examples/local/README.md +2 -0
  74. package/examples/local/catalog.reactive.md +20 -20
  75. package/examples/local/checklist.reactive.md +32 -32
  76. package/examples/local/comparison.reactive.md +47 -47
  77. package/examples/local/components.reactive.md +44 -44
  78. package/examples/local/counter.reactive.md +7 -7
  79. package/examples/local/diagnostics.reactive.md +54 -54
  80. package/examples/local/diagram.reactive.md +44 -44
  81. package/examples/local/gallery.reactive.md +61 -61
  82. package/examples/local/html-compat.reactive.md +24 -0
  83. package/examples/local/parameters.reactive.md +36 -36
  84. package/examples/local/planning.reactive.md +24 -24
  85. package/examples/local/pricing.reactive.md +20 -20
  86. package/examples/local/zh/catalog.reactive.md +20 -20
  87. package/examples/local/zh/charts.reactive.md +73 -73
  88. package/examples/local/zh/checklist.reactive.md +32 -32
  89. package/examples/local/zh/comparison.reactive.md +47 -47
  90. package/examples/local/zh/components.reactive.md +44 -44
  91. package/examples/local/zh/counter.reactive.md +7 -7
  92. package/examples/local/zh/diagnostics.reactive.md +54 -54
  93. package/examples/local/zh/diagram.reactive.md +44 -44
  94. package/examples/local/zh/gallery.reactive.md +61 -61
  95. package/examples/local/zh/parameters.reactive.md +36 -36
  96. package/examples/local/zh/planning.reactive.md +24 -24
  97. package/examples/local/zh/pricing.reactive.md +20 -20
  98. package/package.json +135 -91
@@ -0,0 +1,41 @@
1
+ # 0.5.0 preview release
2
+
3
+ `reactive-md@0.5.0` is a 0.x preview that targets the `next` channel. It keeps syntax revision `local-draft-2`, component protocol `component-protocol-1` and theme protocol `reactive-md-theme-1`. Existing 0.4.x imports and documents need no migration. `latest` remains `0.4.0`.
4
+
5
+ ```sh
6
+ npm install reactive-md@next
7
+ # or pin the preview
8
+ npm install reactive-md@0.5.0
9
+ ```
10
+
11
+ For offline installation, use the [npm tarball](https://registry.npmjs.org/reactive-md/-/reactive-md-0.5.0.tgz).
12
+
13
+ ## Editor entry
14
+
15
+ `0.5.0` adds `reactive-md/editor`, a controlled React 19 source editor extracted from the Playground. It handles source highlighting, Markdown formatting, component insertion templates, completion, binding navigation, rename, format, undo and redo, line numbers and scroll synchronization. Locale and theme are configured per instance.
16
+
17
+ The editor has an independent stylesheet at `reactive-md/editor/styles.css`. Its rules are scoped to the editor root, so it can be loaded without the document renderer styles. A host that shows a preview imports `reactive-md/styles.css` as before.
18
+
19
+ `ReactiveMarkdownEditor` takes `value` and `onChange` and exposes a ref handle for focus, selection, textarea access, undo and redo. Optional `diagnostics` and `document` props add gutter markers and binding value types. Authoring tools analyze source locally; the host manages preview, storage and the toolbar export action through `onExport`. See [React source editor](editor-en.md) for the full prop table, history rules, read-only modes and server rendering notes.
20
+
21
+ ## Document rendering
22
+
23
+ Documents now preserve ordinary generic or comparison text and currency instead of reading it as a component tag or formula. Attribute-free `<b>`, `<i>`, `<u>`, `<s>`, `<mark>` and `<br>` are supported as basic HTML formatting. Markdown footnotes render with rich definitions, numbering, repeated references and return links.
24
+
25
+ These additions extend prose parsing and document rendering. The syntax revision, component protocol and theme protocol keep their current versions.
26
+
27
+ Fenced code blocks highlight common languages, including JavaScript, TypeScript, Python, JSON, Bash, HTML and CSS. A copy button copies the original text with success or failure feedback. Unknown languages and blocks longer than 20,000 characters remain plain text. Static output keeps highlighting; copy controls are omitted from static output and printing.
28
+
29
+ Images approved by the host URL policy open in a modal viewer. Enter or Space opens the image; the close button, Escape or the backdrop dismisses it and restores focus. Linked images keep their link navigation. Static output keeps ordinary images. See the [author guide](local-guide-en.md) and [host integration](local-integration-en.md) for usage.
30
+
31
+ ## Compatibility
32
+
33
+ Existing `reactive-md`, `reactive-md/react` and `reactive-md/styles.css` imports keep working, and the renderer entry is unchanged. Documents written for `0.4.x` need no edit. The release adds a public entry; projects that only render documents can upgrade without changes.
34
+
35
+ The editor requires React 19. The core `reactive-md` entry still does not depend on React. See the [changelog](../CHANGELOG.md) and [Versions and compatibility](compatibility-en.md) for the version axes.
36
+
37
+ ## Validation and limits
38
+
39
+ The 0.5.0 release gate covers core and renderer tests, the editor entry, type checking, package exports, documentation links, offline tarball consumers, static rendering and browser interaction. CI targets Node 22.12 and 24 with Chromium; local browser checks use Microsoft Edge. General SSR hydration outside exported HTML, Firefox and WebKit remain unverified.
40
+
41
+ The project remains a 0.x preview. Security boundaries and host responsibilities are documented in [SECURITY.md](../SECURITY.md).
@@ -0,0 +1,39 @@
1
+ # 0.5.1 预览版发布说明
2
+
3
+ `reactive-md@0.5.1` 是面向 `next` 渠道的 0.x 预览版。语法仍为 `local-draft-2`,组块协议为 `component-protocol-1`,主题协议为 `reactive-md-theme-1`。现有 0.5.x 导入和文档无需迁移。`latest` 仍为 `0.4.0`。
4
+
5
+ ```sh
6
+ npm install reactive-md@next
7
+ # 或固定预览版
8
+ npm install reactive-md@0.5.1
9
+ ```
10
+
11
+ 离线安装可下载 [npm 安装包](https://registry.npmjs.org/reactive-md/-/reactive-md-0.5.1.tgz)。
12
+
13
+ ## 编辑器视图与主题
14
+
15
+ `ReactiveMarkdownEditor` 在编辑区下方新增底栏,显示 Unicode 字数和键盘提示,并提供编辑、并排和预览三种视图。传入 `preview` 后,宿主内容会渲染在编辑器框架内;`viewMode` 和 `onViewModeChange` 用于受控切换,`defaultViewMode` 设置非受控实例的初始视图。切换视图会保留源码选区、撤销记录和预览组件的状态。
16
+
17
+ 容器宽度不超过 600px 时只提供编辑和预览。仅编辑源码的实例保留字数和键盘提示。在源码中先按 Esc 再按 Tab 可把焦点移到工具栏。
18
+
19
+ 编辑区、行号、语法高亮、工具栏和菜单跟随实例主题。浅色模式使用白色编辑区,深色模式保留深蓝底色,`auto` 跟随系统设置。宿主页面主题与编辑器主题相互独立。
20
+
21
+ 完整属性表和视图行为见 [React 源码编辑器](editor-ch.md)。
22
+
23
+ ## HTML 兼容
24
+
25
+ 默认渲染器新增 P0 HTML 子集,包括富文本折叠、容器、标题、代码、列表、链接和图片。宿主可额外开启作者 CSS、JavaScript 和扩展 HTML;三个选项默认全部关闭。任意开启一个,整篇文档分流到隔离的原生 HTML 路径,该路径停止解析 Markdown 和 ReactiveMD。
26
+
27
+ 这项分流是下一版本前的暂时策略。静态导出禁用作者 JavaScript。支持的子集、选项和冲突规则见 [HTML 部分兼容](html-compatibility-ch.md)。
28
+
29
+ ## 兼容性
30
+
31
+ 现有 `reactive-md`、`reactive-md/react`、`reactive-md/editor` 和 `reactive-md/styles.css` 导入保持不变。为 `0.4.x` 和 `0.5.0` 编写的文档无需修改。语法修订、组块协议和主题协议版本不变。
32
+
33
+ 编辑器需要 React 19;核心 `reactive-md` 入口仍不依赖 React。版本轴说明见[变更记录](../CHANGELOG-ch.md)和[版本与兼容性](compatibility-ch.md)。
34
+
35
+ ## 验证与限制
36
+
37
+ 0.5.1 发布门禁覆盖核心与渲染器测试、编辑器入口及其视图、类型检查、包入口、文档链接、离线安装包消费、静态渲染和浏览器交互。CI 使用 Node 22.12 和 24 搭配 Chromium;本机浏览器检查使用 Microsoft Edge。导出 HTML 之外的通用 SSR 水合、Firefox 和 WebKit 尚未验证。
38
+
39
+ 项目仍处于 0.x 预览阶段。安全边界和宿主责任见 [SECURITY-ch.md](../SECURITY-ch.md)。
@@ -0,0 +1,39 @@
1
+ # 0.5.1 preview release
2
+
3
+ `reactive-md@0.5.1` is a 0.x preview that targets the `next` channel. It keeps syntax revision `local-draft-2`, component protocol `component-protocol-1` and theme protocol `reactive-md-theme-1`. Existing 0.5.x imports and documents need no migration. `latest` remains `0.4.0`.
4
+
5
+ ```sh
6
+ npm install reactive-md@next
7
+ # or pin the preview
8
+ npm install reactive-md@0.5.1
9
+ ```
10
+
11
+ For offline installation, use the [npm tarball](https://registry.npmjs.org/reactive-md/-/reactive-md-0.5.1.tgz).
12
+
13
+ ## Editor views and themes
14
+
15
+ `ReactiveMarkdownEditor` adds a status bar below the editing area. It shows the Unicode character count and a keyboard hint, and switches between Edit, Split and Preview. Pass `preview` to render host content inside the editor frame; `viewMode` and `onViewModeChange` control the mode from the host, while `defaultViewMode` sets the initial mode for an uncontrolled instance. Switching views keeps the source selection, undo history and preview component state.
16
+
17
+ Containers up to 600px wide offer only Edit and Preview. A source-only editor keeps the count and keyboard hint. Press Esc, then Tab in the source to move focus to the toolbar.
18
+
19
+ The editor source surface, gutter, syntax highlighting, toolbar and menus now follow the instance theme. Light mode uses a white editor surface, dark mode keeps the deep blue surface, and `auto` follows the system preference. The host page theme and the editor theme remain independent.
20
+
21
+ See [React source editor](editor-en.md) for the full prop table and view behavior.
22
+
23
+ ## HTML compatibility
24
+
25
+ The default renderer now accepts a P0 HTML subset, including disclosures, containers, headings, code, lists, links and images. Three host-owned options add author CSS, JavaScript and extended HTML. All three are off by default. Enabling any one routes the whole document to isolated native HTML, which stops Markdown and ReactiveMD interpretation for that path.
26
+
27
+ This routing is a temporary policy for the next release. Static export disables author JavaScript. See [HTML compatibility](html-compatibility-en.md) for the supported subset, options and conflict rules.
28
+
29
+ ## Compatibility
30
+
31
+ Existing `reactive-md`, `reactive-md/react`, `reactive-md/editor` and `reactive-md/styles.css` imports keep working. Documents written for `0.4.x` and `0.5.0` need no edit. The syntax revision, component protocol and theme protocol keep their current versions.
32
+
33
+ The editor requires React 19. The core `reactive-md` entry still does not depend on React. See the [changelog](../CHANGELOG.md) and [Versions and compatibility](compatibility-en.md) for the version axes.
34
+
35
+ ## Validation and limits
36
+
37
+ The 0.5.1 release gate covers core and renderer tests, the editor entry and its views, type checking, package exports, documentation links, offline tarball consumers, static rendering and browser interaction. CI targets Node 22.12 and 24 with Chromium; local browser checks use Microsoft Edge. General SSR hydration outside exported HTML, Firefox and WebKit remain unverified.
38
+
39
+ The project remains a 0.x preview. Security boundaries and host responsibilities are documented in [SECURITY.md](../SECURITY.md).
@@ -1,101 +1,108 @@
1
- # 发布清单
2
-
3
- 本文件是维护者的手动发布流程。本清单覆盖 `0.4.1` 预览版,目前 `latest` 和 `next` 均指向该版本。版本规则见[版本与兼容性](compatibility-ch.md),面向使用者的升级说明见[0.4.1 发布说明](release-0.4.1-ch.md)。
4
-
5
- ## 发布前确认
6
-
7
- ### 包身份与元数据
8
-
9
- 非 scope 名称 `reactive-md` 已由已发布的 `0.3.0`、`0.3.1` 建立,`reactive-md/react` 和 `reactive-md/styles.css` 子路径也随这些版本生效。不要把改名当作常规发布准备:改名会破坏导入、状态工具和文档。
10
-
11
- 1. 除非维护者明确决定改用 scope,否则保持 `reactive-md`。scope 需要对应的 npm 账号或组织权限。
12
- 2. 如果改名,同时更新 `package.json` 的 `name`、文档中的导入语句、tarball 文件名说明、示例和两个子路径,并在变更记录中按破坏性变更说明。
13
- 3. 核对 `package.json` 的 `repository`、`homepage`、`bugs`、`license`、`engines` 等发布元数据;当前已设置,发布前确认 URL 和最低 Node 版本仍然正确,并确认 `private` 保持移除状态。
14
- 4. 确认 `files` 覆盖发布所需内容。当前包含 `dist-library`、`dist-standalone`、`bin`、`cli`、README(`README.md`、`README-en.md`、`README-ch.md`)、中英文贡献指南、变更记录与安全策略、`THIRD_PARTY_NOTICES.md`、`docs` 和 `examples`;新增文档或 notice 时同步加入 `files`。
15
-
16
- 包名和版本决定 tarball 名称。当前 `0.4.1` 的预期文件名是 `reactive-md-0.4.1.tgz`;改名或改版本后以 `npm pack` 的实际输出为准。
17
-
18
- ### 第三方 notice
19
-
20
- 库产物打包了 `remark-gfm@4.0.1`、`remark-parse@11.0.0`、`unified@11.0.5` 及其依赖。独立 HTML 运行时还打包了 React、React DOM 和 scheduler;库的 React 入口使用宿主提供的 peer dependency。`THIRD_PARTY_NOTICES.md` 保留这些打包依赖的版权和许可声明。
21
-
22
- 维护者在发布前:
23
-
24
- 1. 运行 `npm run notices`,从已安装依赖重新生成 `THIRD_PARTY_NOTICES.md`。生成脚本覆盖 `remark-gfm`、`remark-parse`、`unified`、`react`、`react-dom` 的依赖树和实际许可证文本,包括 scheduler。
25
- 2. 确认 `package.json` 的 `files` 包含 `THIRD_PARTY_NOTICES.md`,并随 tarball 分发。
26
- 3. 检查 `npm pack --dry-run` 的输出,确认没有 `node_modules`、`demo/`、`demo/artifacts/`、测试产物或本地缓存。
27
- 4. 核对依赖许可证与打包内容一致;新增或升级 Markdown 依赖后重新生成 notice。
28
-
29
- ## 本地 tarball 安装
30
-
31
- 完整的本地门禁是:
32
-
33
- ```sh
34
- npm ci
35
- npm run verify:release
36
- ```
37
-
38
- `verify:release` 运行 Node 端与浏览器检查,构建包,在仓库外安装真实 tarball,并验证多份能力组合后的文档行为;它自行管理预览服务和浏览器生命周期。CI 通过 `verify:release:node` 和 `verify:release:browser` 分片运行同一门禁。本机需已安装浏览器。
39
-
40
- packed 检查会在 `artifacts/release-package/` 保留经过验证的原始安装包,并在同目录的 `package-verification.json` 记录 SHA256 与 npm integrity。完整门禁通过后发布这一安装包;源码、包元数据或随包文档变化后重新验证。
41
-
42
- 需要手工检查包内容时,直接使用 tarball。在仓库根目录:
43
-
44
- ```sh
45
- npm pack
46
- ```
47
-
48
- `npm pack` 会通过 `prepack` 先运行构建和 `npm run notices`,生成 `dist-library/` 与 `THIRD_PARTY_NOTICES.md`。`dist-library/` 是 `package.json` 的 `exports` 指向的目录。随后在一个空目录中验证安装:
49
-
50
- ```sh
51
- mkdir /tmp/reactive-md-consumer
52
- cd /tmp/reactive-md-consumer
53
- npm init -y
54
- npm install /path/to/reactive-md-0.4.1.tgz
55
- ```
56
-
57
- 核心入口可在 Node 中直接检查:
58
-
59
- ```sh
60
- node --input-type=module -e "import { compileLocal, LOCAL_SYNTAX_VERSION } from 'reactive-md'; console.log(LOCAL_SYNTAX_VERSION, compileLocal('# ok').ok)"
61
- ```
62
-
63
- React 入口需要另装 React 19:
64
-
65
- ```sh
66
- npm install react@19 react-dom@19
67
- ```
68
-
69
- ```tsx
70
- import { LocalReactiveDocument } from 'reactive-md/react';
71
- import 'reactive-md/styles.css';
72
- ```
73
-
74
- 静态 SSR 渲染由 packed 检查覆盖。单文件导出的静态首屏水合由 Playwright Chromium 和本地 Edge 浏览器检查覆盖;该路径之外的通用 SSR 水合尚未验证。安装验证还应确认 tarball 中的 `dist-library/types`、`dist-standalone`、`bin`、`cli`、`README.md`、`README-en.md`、`README-ch.md`、`CHANGELOG-ch.md`、`SECURITY-ch.md`、`THIRD_PARTY_NOTICES.md`、`docs` 和 `examples` 完整,并检查 `docs` 中没有指向未打包 `demo/`、`src/`、`tests/` 或 `.tasks/` 文件的本地链接。
75
-
76
- ## 发布说明
77
-
78
- 发布说明面向使用者,至少包含:
79
-
80
- - 包版本、`LOCAL_SYNTAX_VERSION`、组块协议修订与主题协议修订;这些不是同一个版本号。
81
- - 安装方式:`npm install reactive-md@next`,或使用 `npm install reactive-md@<version>` 固定版本;并提供可下载 tarball 作为离线安装选项。
82
- - 用户可见变化、破坏性变更和迁移步骤;直接链接[变更记录](../CHANGELOG-ch.md),本轮同时链接[0.4.1 发布说明](release-0.4.1-ch.md)。
83
- - 已验证的平台,以及未验证的浏览器、通用 SSR 水合等范围。
84
- - 已知限制和安全说明链接 [SECURITY-ch.md](../SECURITY-ch.md)。
85
-
86
- 不要写尚未执行的检查结果,也不要把 CI 配置存在写成 CI 已通过。
87
-
88
- ## 人工发布清单
89
-
90
- 1. 确认工作区干净,变更已审查;`npm ci` 从锁文件安装成功。
91
- 2. 在 Node 22.12 和受支持的较新 LTS(当前为 24)上运行 `npm run verify:release`。这是维护者和 CI 共用的完整门禁,不要用一组自行挑选的命令代替。
92
- 3. 确认版本号、`CHANGELOG-ch.md` 和发布说明一致。语法变化时更新 `LOCAL_SYNTAX_VERSION`;组块或主题协议修订仅在各自契约变化时更新,这些版本轴保持独立。
93
- 4. 检查门禁保留的安装包,包括文件列表、大小和许可文件。手动重新运行 `npm pack` 会产生新候选包,需要单独完成安装验证。
94
- 5. 核对安装包的 SHA256 与 `artifacts/release-package/package-verification.json` 一致,并记录到发布说明或内部发布记录。
95
- 6. 合并发布提交,等待 `main` 上的 CI 全部通过。
96
- 7. 手动创建并推送 tag,例如 `v0.4.1`。不要在自动发布工作流中保存 npm token。
97
- 8. 在维护者本机完成 npm 登录和双因素认证后,手动发布已经验证的预览版安装包:`npm publish artifacts/release-package/reactive-md-0.4.1.tgz --access public --tag next`。预览版先发布到 `next`。维护者决定提升后,使用 `npm dist-tag add reactive-md@<version> latest` 更新默认版本。当前 `latest` 的兼容补丁版在发布验证后,同步更新这两个渠道。
98
- 9. 在 npm 和 GitHub Releases 上核对包内容、版本、README、许可与发布说明;从公开 registry 重新安装一次。
99
- 10. 从 registry 验证 README 中的安装命令可用,核对 registry 的完整性摘要与发布 tarball 一致。
100
-
101
- README 中的版本与安装命令应在打包前准备好,并在发布后验证。发布过程中不要提交 token、`.npmrc` 凭据或本机路径。
1
+ # 发布清单
2
+
3
+ 本文件是维护者的手动发布流程。本清单覆盖 `0.5.1` 预览版,目标渠道为 `next`,`latest` 仍为 `0.4.0`。版本规则见[版本与兼容性](compatibility-ch.md),面向使用者的说明见[0.5.1 发布说明](release-0.5.1-ch.md)。
4
+
5
+ ## 发布前确认
6
+
7
+ ### 包身份与元数据
8
+
9
+ 非 scope 名称 `reactive-md` 已由已发布的 `0.3.0`、`0.3.1` 建立,`reactive-md/react` 和 `reactive-md/styles.css` 子路径也随这些版本生效。`0.5.0` 新增 `reactive-md/editor` 和 `reactive-md/editor/styles.css`,`0.5.1` 保持这些入口。不要把改名当作常规发布准备:改名会破坏导入、状态工具和文档。
10
+
11
+ 1. 除非维护者明确决定改用 scope,否则保持 `reactive-md`。scope 需要对应的 npm 账号或组织权限。
12
+ 2. 如果改名,同时更新 `package.json` 的 `name`、文档中的导入语句、tarball 文件名说明、示例和相关子路径,并在变更记录中按破坏性变更说明。
13
+ 3. 核对 `package.json` 的 `repository`、`homepage`、`bugs`、`license`、`engines` 等发布元数据;当前已设置,发布前确认 URL 和最低 Node 版本仍然正确,并确认 `private` 保持移除状态。
14
+ 4. 确认 `files` 覆盖发布所需内容。当前包含 `dist-library`、`dist-standalone`、`bin`、`cli`、README(`README.md`、`README-en.md`、`README-ch.md`)、中英文贡献指南、变更记录与安全策略、`THIRD_PARTY_NOTICES.md`、`docs` 和 `examples`;新增文档或 notice 时同步加入 `files`。
15
+
16
+ 包名和版本决定 tarball 名称。当前 `0.5.1` 的预期文件名是 `reactive-md-0.5.1.tgz`;改名或改版本后以 `npm pack` 的实际输出为准。
17
+
18
+ ### 第三方 notice
19
+
20
+ 库产物打包了 `remark-gfm@4.0.1`、`remark-parse@11.0.0`、`unified@11.0.5` 及其依赖。独立 HTML 运行时还打包了 React、React DOM 和 scheduler;库的 React 入口使用宿主提供的 peer dependency。`THIRD_PARTY_NOTICES.md` 保留这些打包依赖的版权和许可声明。
21
+
22
+ 维护者在发布前:
23
+
24
+ 1. 运行 `npm run notices`,从已安装依赖重新生成 `THIRD_PARTY_NOTICES.md`。生成脚本覆盖 `remark-gfm`、`remark-parse`、`unified`、`react`、`react-dom` 的依赖树和实际许可证文本,包括 scheduler。
25
+ 2. 确认 `package.json` 的 `files` 包含 `THIRD_PARTY_NOTICES.md`,并随 tarball 分发。
26
+ 3. 检查 `npm pack --dry-run` 的输出,确认没有 `node_modules`、`demo/`、`demo/artifacts/`、测试产物或本地缓存。
27
+ 4. 核对依赖许可证与打包内容一致;新增或升级 Markdown 依赖后重新生成 notice。
28
+
29
+ ## 本地 tarball 安装
30
+
31
+ 完整的本地门禁是:
32
+
33
+ ```sh
34
+ npm ci
35
+ npm run verify:release
36
+ ```
37
+
38
+ `verify:release` 运行 Node 端与浏览器检查,构建包,在仓库外安装真实 tarball,并验证多份能力组合后的文档行为;它自行管理预览服务和浏览器生命周期。门禁同时覆盖编辑器入口、其样式表及同一页面的两个编辑器实例。CI 通过 `verify:release:node` 和 `verify:release:browser` 分片运行同一门禁。本机需已安装浏览器。
39
+
40
+ packed 检查会在 `artifacts/release-package/` 保留经过验证的原始安装包,并在同目录的 `package-verification.json` 记录 SHA256 与 npm integrity。完整门禁通过后发布这一安装包;源码、包元数据或随包文档变化后重新验证。
41
+
42
+ 需要手工检查包内容时,直接使用 tarball。在仓库根目录:
43
+
44
+ ```sh
45
+ npm pack
46
+ ```
47
+
48
+ `npm pack` 会通过 `prepack` 先运行构建和 `npm run notices`,生成 `dist-library/` 与 `THIRD_PARTY_NOTICES.md`。`dist-library/` 是 `package.json` 的 `exports` 指向的目录。随后在一个空目录中验证安装:
49
+
50
+ ```sh
51
+ mkdir /tmp/reactive-md-consumer
52
+ cd /tmp/reactive-md-consumer
53
+ npm init -y
54
+ npm install /path/to/reactive-md-0.5.1.tgz
55
+ ```
56
+
57
+ 核心入口可在 Node 中直接检查:
58
+
59
+ ```sh
60
+ node --input-type=module -e "import { compileLocal, LOCAL_SYNTAX_VERSION } from 'reactive-md'; console.log(LOCAL_SYNTAX_VERSION, compileLocal('# ok').ok)"
61
+ ```
62
+
63
+ React 入口需要另装 React 19:
64
+
65
+ ```sh
66
+ npm install react@19 react-dom@19
67
+ ```
68
+
69
+ ```tsx
70
+ import { LocalReactiveDocument } from 'reactive-md/react';
71
+ import 'reactive-md/styles.css';
72
+ ```
73
+
74
+ 编辑器入口使用相同的 React peer 和独立样式表:
75
+
76
+ ```tsx
77
+ import { ReactiveMarkdownEditor } from 'reactive-md/editor';
78
+ import 'reactive-md/editor/styles.css';
79
+ ```
80
+
81
+ 静态 SSR 渲染由 packed 检查覆盖。编辑器入口在服务端渲染检查中导入,并在浏览器检查中运行。单文件导出的静态首屏水合由 Playwright Chromium 和本地 Edge 浏览器检查覆盖;该路径之外的通用 SSR 水合尚未验证。安装验证还应确认 tarball 中的 `dist-library/types`(包括编辑器入口和样式表)、`dist-standalone`、`bin`、`cli`、`README.md`、`README-en.md`、`README-ch.md`、`CHANGELOG-ch.md`、`SECURITY-ch.md`、`THIRD_PARTY_NOTICES.md`、`docs` 和 `examples` 完整,并检查 `docs` 中没有指向未打包 `demo/`、`src/`、`tests/` 或 `.tasks/` 文件的本地链接。
82
+
83
+ ## 发布说明
84
+
85
+ 发布说明面向使用者,至少包含:
86
+
87
+ - 包版本、`LOCAL_SYNTAX_VERSION`、组块协议修订与主题协议修订;这些不是同一个版本号。
88
+ - 安装方式:`npm install reactive-md@next`,或使用 `npm install reactive-md@<version>` 固定版本;并提供可下载 tarball 作为离线安装选项。
89
+ - 用户可见变化、破坏性变更和迁移步骤;直接链接[变更记录](../CHANGELOG-ch.md),本轮同时链接[0.5.0 发布说明](release-0.5.0-ch.md)。
90
+ - 已验证的平台,以及未验证的浏览器、通用 SSR 水合等范围。
91
+ - 已知限制和安全说明链接 [SECURITY-ch.md](../SECURITY-ch.md)。
92
+
93
+ 不要写尚未执行的检查结果,也不要把 CI 配置存在写成 CI 已通过。
94
+
95
+ ## 人工发布清单
96
+
97
+ 1. 确认工作区干净,变更已审查;`npm ci` 从锁文件安装成功。
98
+ 2. 在 Node 22.12 和受支持的较新 LTS(当前为 24)上运行 `npm run verify:release`。这是维护者和 CI 共用的完整门禁,不要用一组自行挑选的命令代替。
99
+ 3. 确认版本号、`CHANGELOG-ch.md` 和发布说明一致。`0.5.1` 保持编辑器入口,但 `LOCAL_SYNTAX_VERSION`、组块协议和主题协议修订不变。仅在某条版本轴自身的契约变化时更新它。
100
+ 4. 检查门禁保留的安装包,包括文件列表、大小和许可文件。手动重新运行 `npm pack` 会产生新候选包,需要单独完成安装验证。
101
+ 5. 核对安装包的 SHA256 与 `artifacts/release-package/package-verification.json` 一致,并记录到发布说明或内部发布记录。
102
+ 6. 合并发布提交,等待 `main` 上的 CI 全部通过。
103
+ 7. 手动创建并推送 tag,例如 `v0.5.1`。不要在自动发布工作流中保存 npm token。
104
+ 8. 在维护者本机完成 npm 登录和双因素认证后,手动发布已经验证的预览版安装包:`npm publish artifacts/release-package/reactive-md-0.5.1.tgz --access public --tag next`。预览版先发布到 `next`,本次 `latest` 保持 `0.4.0`。提升 `0.5.1` 需要单独决定:`npm dist-tag add reactive-md@0.5.1 latest`。
105
+ 9. 在 npm 和 GitHub Releases 上核对包内容、版本、README、许可与发布说明;从公开 registry 重新安装一次。
106
+ 10. 从 registry 验证 README 中的安装命令可用,核对 registry 的完整性摘要与发布 tarball 一致。
107
+
108
+ README 中的版本与安装命令应在打包前准备好,并在发布后验证。发布过程中不要提交 token、`.npmrc` 凭据或本机路径。
@@ -1,101 +1,108 @@
1
- # Release checklist
2
-
3
- This file is the maintainers' manual release process. This checklist covers the `0.4.1` preview release, now available on both `latest` and `next`. See [Versions and compatibility](compatibility-en.md) for version rules and [0.4.1 release notes](release-0.4.1-en.md) for the user-facing upgrade summary.
4
-
5
- ## Before release
6
-
7
- ### Package identity and metadata
8
-
9
- The unscoped name `reactive-md` is already established by the published `0.3.0` and `0.3.1` releases, together with the `reactive-md/react` and `reactive-md/styles.css` subpaths. Do not treat a rename as routine release preparation: changing the name is a breaking change for imports, state tooling and documentation.
10
-
11
- 1. Keep `reactive-md` unless maintainers explicitly decide on a scoped rename. A scope requires the corresponding npm account or organization permissions.
12
- 2. If renaming, update `name` in `package.json`, import statements in the documentation, tarball filename references, examples and both subpaths, then record the change as breaking in the changelog.
13
- 3. Check release metadata in `package.json`: `repository`, `homepage`, `bugs`, `license`, `engines` and similar fields. They are currently set; before releasing, confirm the URLs and minimum Node version are still correct and that `private` remains removed.
14
- 4. Confirm `files` covers what needs to be published. It currently includes `dist-library`, `dist-standalone`, `bin`, `cli`, the READMEs (`README.md`, `README-en.md`, `README-ch.md`), the contributing, changelog and security guides in both languages, `THIRD_PARTY_NOTICES.md`, `docs` and `examples`; add any new documentation or notices to `files` as well.
15
-
16
- The package name and version determine the tarball name. The expected filename for `0.4.1` is `reactive-md-0.4.1.tgz`; after renaming or changing the version, use the actual output of `npm pack`.
17
-
18
- ### Third-party notices
19
-
20
- The library bundles `remark-gfm@4.0.1`, `remark-parse@11.0.0`, `unified@11.0.5` and their dependencies. The standalone HTML runtime also bundles React, React DOM and scheduler; the library React entry uses host-provided peers. All these bundles retain the installed dependencies' copyright and license notices in `THIRD_PARTY_NOTICES.md`.
21
-
22
- Before releasing, maintainers:
23
-
24
- 1. Run `npm run notices` to regenerate `THIRD_PARTY_NOTICES.md` from installed dependencies. The generation script covers the dependency trees and actual license texts of `remark-gfm`, `remark-parse`, `unified`, `react` and `react-dom`, including scheduler.
25
- 2. Confirm `files` in `package.json` includes `THIRD_PARTY_NOTICES.md` so it ships in the tarball.
26
- 3. Inspect the output of `npm pack --dry-run` and confirm there is no `node_modules`, `demo/`, `demo/artifacts/`, test output or local cache.
27
- 4. Check that dependency licenses match the packaged content; regenerate notices after adding or upgrading Markdown dependencies.
28
-
29
- ## Local tarball installation
30
-
31
- The complete local gate is:
32
-
33
- ```sh
34
- npm ci
35
- npm run verify:release
36
- ```
37
-
38
- `verify:release` runs the Node-side and browser checks, builds the package, installs the real tarball outside the repository and exercises combined document behavior. It manages the preview server and browser lifecycle itself. CI splits the same gate with `verify:release:node` and `verify:release:browser`. A browser must already be installed locally.
39
-
40
- The packed check retains the exact verified archive in `artifacts/release-package/` and records its SHA256 and npm integrity in `package-verification.json` there. Publish that archive after the complete gate passes. Re-run verification if source, package metadata or packaged documentation changes.
41
-
42
- To inspect the package manually, use the tarball directly. In the repository root:
43
-
44
- ```sh
45
- npm pack
46
- ```
47
-
48
- `npm pack` runs the build and `npm run notices` through `prepack` first, producing `dist-library/` and `THIRD_PARTY_NOTICES.md`. `dist-library/` is the directory targeted by `exports` in `package.json`. Then verify installation in an empty directory:
49
-
50
- ```sh
51
- mkdir /tmp/reactive-md-consumer
52
- cd /tmp/reactive-md-consumer
53
- npm init -y
54
- npm install /path/to/reactive-md-0.4.1.tgz
55
- ```
56
-
57
- The core entry can be checked directly in Node:
58
-
59
- ```sh
60
- node --input-type=module -e "import { compileLocal, LOCAL_SYNTAX_VERSION } from 'reactive-md'; console.log(LOCAL_SYNTAX_VERSION, compileLocal('# ok').ok)"
61
- ```
62
-
63
- The React entry requires React 19 to be installed separately:
64
-
65
- ```sh
66
- npm install react@19 react-dom@19
67
- ```
68
-
69
- ```tsx
70
- import { LocalReactiveDocument } from 'reactive-md/react';
71
- import 'reactive-md/styles.css';
72
- ```
73
-
74
- Static SSR rendering is covered by the packed check. Single-file export static-first hydration is covered by the Playwright Chromium and local Edge browser checks; general SSR hydration outside that path is unverified. Installation verification should also confirm that the tarball contains complete `dist-library/types`, `dist-standalone`, `bin`, `cli`, `README.md`, `README-en.md`, `README-ch.md`, `CHANGELOG.md`, `SECURITY.md`, `THIRD_PARTY_NOTICES.md`, `docs` and `examples`, and check that `docs` contains no local links to unpackaged `demo/`, `src/`, `tests/` or `.tasks/` files.
75
-
76
- ## Release notes
77
-
78
- Release notes are for users and must include at least:
79
-
80
- - The package version, `LOCAL_SYNTAX_VERSION`, component protocol revision and theme protocol revision; these are different version numbers.
81
- - The install command `npm install reactive-md@next`, or `npm install reactive-md@<version>` to pin the release, with a downloadable tarball as an offline installation option.
82
- - User-visible changes, breaking changes and migration steps; link directly to the [changelog](../CHANGELOG.md) and the [0.4.1 release notes](release-0.4.1-en.md) for this cycle.
83
- - Verified platforms, plus unverified browsers, general SSR hydration and other scope.
84
- - Known limitations and a link to [SECURITY.md](../SECURITY.md).
85
-
86
- Do not write results for checks that have not run, and do not present the existence of CI configuration as CI passing.
87
-
88
- ## Manual release checklist
89
-
90
- 1. Confirm the working tree is clean, changes have been reviewed, and `npm ci` installs successfully from the lockfile.
91
- 2. On Node 22.12 and a supported newer LTS (currently 24), run `npm run verify:release`. This is the same complete gate local maintainers and CI use; do not replace it with a list of hand-picked commands.
92
- 3. Confirm the version number, `CHANGELOG.md` and the release notes agree. Update `LOCAL_SYNTAX_VERSION` when syntax changes; update component or theme protocol revisions only when their own contracts change. These version axes remain independent.
93
- 4. Inspect the verified archive retained by the gate, including its file list, size and license files. A fresh manual `npm pack` produces a new candidate that needs its own installation verification.
94
- 5. Compare the archive's SHA256 with `artifacts/release-package/package-verification.json` and record it in the release notes or an internal release record.
95
- 6. Merge the release commit and wait for all CI on `main` to pass.
96
- 7. Create and push the tag manually, for example `v0.4.1`. Do not store npm tokens in an automated release workflow.
97
- 8. After signing in to npm and completing two-factor authentication on the maintainer's machine, publish the verified preview tarball manually: `npm publish artifacts/release-package/reactive-md-0.4.1.tgz --access public --tag next`. Preview releases start on `next`. Promote a verified version only after the maintainer decides: `npm dist-tag add reactive-md@<version> latest`. For a compatible patch to the current `latest`, verify the published version and update both channels to the patch.
98
- 9. Verify the package contents, version, README, license and release notes on npm and GitHub Releases; reinstall once from the public registry.
99
- 10. Verify that the install command in the README works from the registry, and that the registry integrity digest matches the released tarball.
100
-
101
- The version and install command in the README should be ready before packaging and verified after release. Do not commit tokens, `.npmrc` credentials or local paths during the release process.
1
+ # Release checklist
2
+
3
+ This file is the maintainers' manual release process. This checklist covers the `0.5.1` preview release, which targets the `next` channel; `latest` remains `0.4.0`. See [Versions and compatibility](compatibility-en.md) for version rules and [0.5.1 release notes](release-0.5.1-en.md) for the user-facing summary.
4
+
5
+ ## Before release
6
+
7
+ ### Package identity and metadata
8
+
9
+ The unscoped name `reactive-md` is already established by the published `0.3.0` and `0.3.1` releases, together with the `reactive-md/react` and `reactive-md/styles.css` subpaths. `0.5.0` adds `reactive-md/editor` and `reactive-md/editor/styles.css`; `0.5.1` keeps those entries. Do not treat a rename as routine release preparation: changing the name is a breaking change for imports, state tooling and documentation.
10
+
11
+ 1. Keep `reactive-md` unless maintainers explicitly decide on a scoped rename. A scope requires the corresponding npm account or organization permissions.
12
+ 2. If renaming, update `name` in `package.json`, import statements in the documentation, tarball filename references, examples and the relevant subpaths, then record the change as breaking in the changelog.
13
+ 3. Check release metadata in `package.json`: `repository`, `homepage`, `bugs`, `license`, `engines` and similar fields. They are currently set; before releasing, confirm the URLs and minimum Node version are still correct and that `private` remains removed.
14
+ 4. Confirm `files` covers what needs to be published. It currently includes `dist-library`, `dist-standalone`, `bin`, `cli`, the READMEs (`README.md`, `README-en.md`, `README-ch.md`), the contributing, changelog and security guides in both languages, `THIRD_PARTY_NOTICES.md`, `docs` and `examples`; add any new documentation or notices to `files` as well.
15
+
16
+ The package name and version determine the tarball name. The expected filename for `0.5.1` is `reactive-md-0.5.1.tgz`; after renaming or changing the version, use the actual output of `npm pack`.
17
+
18
+ ### Third-party notices
19
+
20
+ The library bundles `remark-gfm@4.0.1`, `remark-parse@11.0.0`, `unified@11.0.5` and their dependencies. The standalone HTML runtime also bundles React, React DOM and scheduler; the library React entry uses host-provided peers. All these bundles retain the installed dependencies' copyright and license notices in `THIRD_PARTY_NOTICES.md`.
21
+
22
+ Before releasing, maintainers:
23
+
24
+ 1. Run `npm run notices` to regenerate `THIRD_PARTY_NOTICES.md` from installed dependencies. The generation script covers the dependency trees and actual license texts of `remark-gfm`, `remark-parse`, `unified`, `react` and `react-dom`, including scheduler.
25
+ 2. Confirm `files` in `package.json` includes `THIRD_PARTY_NOTICES.md` so it ships in the tarball.
26
+ 3. Inspect the output of `npm pack --dry-run` and confirm there is no `node_modules`, `demo/`, `demo/artifacts/`, test output or local cache.
27
+ 4. Check that dependency licenses match the packaged content; regenerate notices after adding or upgrading Markdown dependencies.
28
+
29
+ ## Local tarball installation
30
+
31
+ The complete local gate is:
32
+
33
+ ```sh
34
+ npm ci
35
+ npm run verify:release
36
+ ```
37
+
38
+ `verify:release` runs the Node-side and browser checks, builds the package, installs the real tarball outside the repository and exercises combined document behavior. It manages the preview server and browser lifecycle itself. The gate also covers the editor entry, its stylesheet and two editor instances on one page. CI splits the same gate with `verify:release:node` and `verify:release:browser`. A browser must already be installed locally.
39
+
40
+ The packed check retains the exact verified archive in `artifacts/release-package/` and records its SHA256 and npm integrity in `package-verification.json` there. Publish that archive after the complete gate passes. Re-run verification if source, package metadata or packaged documentation changes.
41
+
42
+ To inspect the package manually, use the tarball directly. In the repository root:
43
+
44
+ ```sh
45
+ npm pack
46
+ ```
47
+
48
+ `npm pack` runs the build and `npm run notices` through `prepack` first, producing `dist-library/` and `THIRD_PARTY_NOTICES.md`. `dist-library/` is the directory targeted by `exports` in `package.json`. Then verify installation in an empty directory:
49
+
50
+ ```sh
51
+ mkdir /tmp/reactive-md-consumer
52
+ cd /tmp/reactive-md-consumer
53
+ npm init -y
54
+ npm install /path/to/reactive-md-0.5.1.tgz
55
+ ```
56
+
57
+ The core entry can be checked directly in Node:
58
+
59
+ ```sh
60
+ node --input-type=module -e "import { compileLocal, LOCAL_SYNTAX_VERSION } from 'reactive-md'; console.log(LOCAL_SYNTAX_VERSION, compileLocal('# ok').ok)"
61
+ ```
62
+
63
+ The React entry requires React 19 to be installed separately:
64
+
65
+ ```sh
66
+ npm install react@19 react-dom@19
67
+ ```
68
+
69
+ ```tsx
70
+ import { LocalReactiveDocument } from 'reactive-md/react';
71
+ import 'reactive-md/styles.css';
72
+ ```
73
+
74
+ The editor entry uses the same React peer and a separate stylesheet:
75
+
76
+ ```tsx
77
+ import { ReactiveMarkdownEditor } from 'reactive-md/editor';
78
+ import 'reactive-md/editor/styles.css';
79
+ ```
80
+
81
+ Static SSR rendering is covered by the packed check. The editor entry is imported in the server-render check and exercised in the browser check. Single-file export static-first hydration is covered by the Playwright Chromium and local Edge browser checks; general SSR hydration outside that path is unverified. Installation verification should also confirm that the tarball contains complete `dist-library/types`, including the editor entry and stylesheet, `dist-standalone`, `bin`, `cli`, `README.md`, `README-en.md`, `README-ch.md`, `CHANGELOG.md`, `SECURITY.md`, `THIRD_PARTY_NOTICES.md`, `docs` and `examples`, and check that `docs` contains no local links to unpackaged `demo/`, `src/`, `tests/` or `.tasks/` files.
82
+
83
+ ## Release notes
84
+
85
+ Release notes are for users and must include at least:
86
+
87
+ - The package version, `LOCAL_SYNTAX_VERSION`, component protocol revision and theme protocol revision; these are different version numbers.
88
+ - The install command `npm install reactive-md@next`, or `npm install reactive-md@<version>` to pin the release, with a downloadable tarball as an offline installation option.
89
+ - User-visible changes, breaking changes and migration steps; link directly to the [changelog](../CHANGELOG.md) and the [0.5.1 release notes](release-0.5.1-en.md) for this cycle.
90
+ - Verified platforms, plus unverified browsers, general SSR hydration and other scope.
91
+ - Known limitations and a link to [SECURITY.md](../SECURITY.md).
92
+
93
+ Do not write results for checks that have not run, and do not present the existence of CI configuration as CI passing.
94
+
95
+ ## Manual release checklist
96
+
97
+ 1. Confirm the working tree is clean, changes have been reviewed, and `npm ci` installs successfully from the lockfile.
98
+ 2. On Node 22.12 and a supported newer LTS (currently 24), run `npm run verify:release`. This is the same complete gate local maintainers and CI use; do not replace it with a list of hand-picked commands.
99
+ 3. Confirm the version number, `CHANGELOG.md` and the release notes agree. `0.5.1` keeps the editor entry but keeps `LOCAL_SYNTAX_VERSION` and the component and theme protocol revisions. Update a version axis only when its own contract changes.
100
+ 4. Inspect the verified archive retained by the gate, including its file list, size and license files. A fresh manual `npm pack` produces a new candidate that needs its own installation verification.
101
+ 5. Compare the archive's SHA256 with `artifacts/release-package/package-verification.json` and record it in the release notes or an internal release record.
102
+ 6. Merge the release commit and wait for all CI on `main` to pass.
103
+ 7. Create and push the tag manually, for example `v0.5.1`. Do not store npm tokens in an automated release workflow.
104
+ 8. After signing in to npm and completing two-factor authentication on the maintainer's machine, publish the verified preview tarball manually: `npm publish artifacts/release-package/reactive-md-0.5.1.tgz --access public --tag next`. Preview releases start on `next`, and this release keeps `latest` on `0.4.0`. Promoting `0.5.1` requires a separate decision: `npm dist-tag add reactive-md@0.5.1 latest`.
105
+ 9. Verify the package contents, version, README, license and release notes on npm and GitHub Releases; reinstall once from the public registry.
106
+ 10. Verify that the install command in the README works from the registry, and that the registry integrity digest matches the released tarball.
107
+
108
+ The version and install command in the README should be ready before packaging and verified after release. Do not commit tokens, `.npmrc` credentials or local paths during the release process.
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## 两种产物
6
6
 
7
+ 默认 ReactiveMD 文档遵循下述导出规则。原生 HTML 文档的交互导出保留 `compileOptions` 和整篇 HTML 路径,静态导出禁用作者 JavaScript;这类文档没有 ReactiveMD 参数。编译开关、隔离和暂时性分流政策见 [HTML 部分兼容](html-compatibility-ch.md)。
8
+
7
9
  **交互式 HTML** 是一个自包含的 `.html` 文件。它内嵌原始源码、独立浏览器运行时、React 19、样式表和打印样式。读者通过 `file://` 打开即可交互,不需要 Node.js、React、reactive-md 包或网络连接。
8
10
 
9
11
  首次渲染是静态内容;内嵌运行时水合完成后再增强为控件。禁用 JavaScript 时,正文、当前值、表格、公式和图表仍然可读。读者刷新后回到导出基线,后续修改不会自动保存。
@@ -191,8 +193,10 @@ IIFE 会注册一个 Light DOM 自定义元素。简单选项通过属性传递
191
193
 
192
194
  | 产物 | 当前基线 | 报警阈值 |
193
195
  | --- | --- | --- |
194
- | `reactive-md-standalone.js` | 约 625.5 kB(gzip 约 186 kB) | 800 KiB / gzip 240 KiB |
195
- | `reactive-md-standalone.css` | 约 59.7 kB(gzip 约 10.1 kB) | 80 KiB / gzip 20 KiB |
196
+ | `reactive-md-standalone.js` | 约 925 kB(gzip 约 276 kB) | 1024 KiB / gzip 320 KiB |
197
+ | `reactive-md-standalone.css` | 约 81.2 kB(gzip 约 13.5 kB) | 80 KiB / gzip 20 KiB |
198
+
199
+ 0.5 基线包含语法高亮器和常见语言语法,离线文件也能高亮。
196
200
 
197
201
  数值会随压缩器和 React 补丁版本小幅变化。阈值远高于正常波动,同时能捕获 React 或渲染器被重复打包的退化。完整 HTML 还包含源码、notices 和内联图片,因此会大于这个基线。
198
202
 
@@ -4,6 +4,8 @@ This guide covers the single-file HTML exporter introduced with `local-draft-2`.
4
4
 
5
5
  ## Output modes
6
6
 
7
+ 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](html-compatibility-en.md) for capability flags, isolation and the temporary routing policy.
8
+
7
9
  **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.
8
10
 
9
11
  The first rendered pass is static. After the embedded runtime hydrates it, controls become interactive. With JavaScript disabled the same static values, tables, formulas and charts remain readable. Refreshing restores the exported baseline; the reader's changes are not persisted.
@@ -193,8 +195,10 @@ The element uses Light DOM so the existing document CSS, heading anchors and pri
193
195
 
194
196
  | Artifact | Current baseline | Alarm |
195
197
  | --- | --- | --- |
196
- | `reactive-md-standalone.js` | ≈625.5 kB (≈186 kB gzip) | 800 KiB / 240 KiB gzip |
197
- | `reactive-md-standalone.css` | ≈59.7 kB (≈10.1 kB gzip) | 80 KiB / 20 KiB gzip |
198
+ | `reactive-md-standalone.js` | ≈925 kB (≈276 kB gzip) | 1024 KiB / 320 KiB gzip |
199
+ | `reactive-md-standalone.css` | ≈81.2 kB (≈13.5 kB gzip) | 80 KiB / 20 KiB gzip |
200
+
201
+ The 0.5 baseline includes the syntax highlighter and common language grammars for offline use.
198
202
 
199
203
  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.
200
204