reactive-md 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG-ch.md +18 -0
  2. package/CHANGELOG.md +18 -0
  3. package/README-ch.md +7 -6
  4. package/README-en.md +8 -6
  5. package/README.md +8 -6
  6. package/dist-library/reactive-md-react.js +1661 -1630
  7. package/dist-library/reactive-md.js +323 -307
  8. package/dist-library/{runtime-CXBdLQ3A.js → runtime-UiQPz5ZV.js} +5327 -4925
  9. package/dist-library/types/local/LocalDocumentView.d.ts +10 -2
  10. package/dist-library/types/local/diagnostics.d.ts +40 -0
  11. package/dist-library/types/local/html-names.d.ts +6 -0
  12. package/dist-library/types/local/index.d.ts +1 -1
  13. package/dist-library/types/local/limits.d.ts +8 -0
  14. package/dist-library/types/local/options.d.ts +6 -1
  15. package/dist-library/types/local/render-types.d.ts +11 -0
  16. package/dist-library/types/local/types.d.ts +18 -0
  17. package/dist-library/types/local/worker.d.ts +4 -1
  18. package/dist-library/types/react/index.d.ts +1 -1
  19. package/dist-standalone/reactive-md-standalone.js +32 -32
  20. package/docs/compatibility-ch.md +7 -5
  21. package/docs/compatibility-en.md +7 -5
  22. package/docs/component-development-ch.md +4 -4
  23. package/docs/component-development-en.md +3 -3
  24. package/docs/component-protocol-ch.md +48 -11
  25. package/docs/component-protocol-en.md +48 -11
  26. package/docs/local-integration-ch.md +26 -2
  27. package/docs/local-integration-en.md +26 -2
  28. package/docs/release-0.5.2-ch.md +35 -0
  29. package/docs/release-0.5.2-en.md +35 -0
  30. package/docs/releasing-ch.md +7 -7
  31. package/docs/releasing-en.md +8 -8
  32. package/examples/conformance/README.md +1 -1
  33. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
1
  # 发布清单
2
2
 
3
- 本文件是维护者的手动发布流程。本清单覆盖 `0.5.1` 预览版,目标渠道为 `next`,`latest` 仍为 `0.4.0`。版本规则见[版本与兼容性](compatibility-ch.md),面向使用者的说明见[0.5.1 发布说明](release-0.5.1-ch.md)。
3
+ 本文件是维护者的手动发布流程。本清单覆盖 `0.5.2` 预览版,目标渠道为 `next`,`latest` 仍为 `0.4.0`。版本规则见[版本与兼容性](compatibility-ch.md),面向使用者的说明见[0.5.2 发布说明](release-0.5.2-ch.md)。
4
4
 
5
5
  ## 发布前确认
6
6
 
7
7
  ### 包身份与元数据
8
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` 保持这些入口。不要把改名当作常规发布准备:改名会破坏导入、状态工具和文档。
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` 与 `0.5.2` 保持这些入口。不要把改名当作常规发布准备:改名会破坏导入、状态工具和文档。
10
10
 
11
11
  1. 除非维护者明确决定改用 scope,否则保持 `reactive-md`。scope 需要对应的 npm 账号或组织权限。
12
12
  2. 如果改名,同时更新 `package.json` 的 `name`、文档中的导入语句、tarball 文件名说明、示例和相关子路径,并在变更记录中按破坏性变更说明。
13
13
  3. 核对 `package.json` 的 `repository`、`homepage`、`bugs`、`license`、`engines` 等发布元数据;当前已设置,发布前确认 URL 和最低 Node 版本仍然正确,并确认 `private` 保持移除状态。
14
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
15
 
16
- 包名和版本决定 tarball 名称。当前 `0.5.1` 的预期文件名是 `reactive-md-0.5.1.tgz`;改名或改版本后以 `npm pack` 的实际输出为准。
16
+ 包名和版本决定 tarball 名称。当前 `0.5.2` 的预期文件名是 `reactive-md-0.5.2.tgz`;改名或改版本后以 `npm pack` 的实际输出为准。
17
17
 
18
18
  ### 第三方 notice
19
19
 
@@ -51,7 +51,7 @@ npm pack
51
51
  mkdir /tmp/reactive-md-consumer
52
52
  cd /tmp/reactive-md-consumer
53
53
  npm init -y
54
- npm install /path/to/reactive-md-0.5.1.tgz
54
+ npm install /path/to/reactive-md-0.5.2.tgz
55
55
  ```
56
56
 
57
57
  核心入口可在 Node 中直接检查:
@@ -96,12 +96,12 @@ import 'reactive-md/editor/styles.css';
96
96
 
97
97
  1. 确认工作区干净,变更已审查;`npm ci` 从锁文件安装成功。
98
98
  2. 在 Node 22.12 和受支持的较新 LTS(当前为 24)上运行 `npm run verify:release`。这是维护者和 CI 共用的完整门禁,不要用一组自行挑选的命令代替。
99
- 3. 确认版本号、`CHANGELOG-ch.md` 和发布说明一致。`0.5.1` 保持编辑器入口,但 `LOCAL_SYNTAX_VERSION`、组块协议和主题协议修订不变。仅在某条版本轴自身的契约变化时更新它。
99
+ 3. 确认版本号、`CHANGELOG-ch.md` 和发布说明一致。`0.5.2` 新增宿主组件,并把组块协议提升到 `component-protocol-2`;`LOCAL_SYNTAX_VERSION` 和主题协议不变。仅在某条版本轴自身的契约变化时更新它。
100
100
  4. 检查门禁保留的安装包,包括文件列表、大小和许可文件。手动重新运行 `npm pack` 会产生新候选包,需要单独完成安装验证。
101
101
  5. 核对安装包的 SHA256 与 `artifacts/release-package/package-verification.json` 一致,并记录到发布说明或内部发布记录。
102
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`。
103
+ 7. 手动创建并推送 tag,例如 `v0.5.2`。不要在自动发布工作流中保存 npm token。
104
+ 8. 在维护者本机完成 npm 登录和双因素认证后,手动发布已经验证的预览版安装包:`npm publish artifacts/release-package/reactive-md-0.5.2.tgz --access public --tag next`。预览版先发布到 `next`,本次 `latest` 保持 `0.4.0`。提升 `0.5.2` 需要单独决定:`npm dist-tag add reactive-md@0.5.2 latest`。
105
105
  9. 在 npm 和 GitHub Releases 上核对包内容、版本、README、许可与发布说明;从公开 registry 重新安装一次。
106
106
  10. 从 registry 验证 README 中的安装命令可用,核对 registry 的完整性摘要与发布 tarball 一致。
107
107
 
@@ -1,19 +1,19 @@
1
1
  # Release checklist
2
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.
3
+ This file is the maintainers' manual release process. This checklist covers the `0.5.2` 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.2 release notes](release-0.5.2-en.md) for the user-facing summary.
4
4
 
5
5
  ## Before release
6
6
 
7
7
  ### Package identity and metadata
8
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.
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` and `0.5.2` keep 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
10
 
11
11
  1. Keep `reactive-md` unless maintainers explicitly decide on a scoped rename. A scope requires the corresponding npm account or organization permissions.
12
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
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
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
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`.
16
+ The package name and version determine the tarball name. The expected filename for `0.5.2` is `reactive-md-0.5.2.tgz`; after renaming or changing the version, use the actual output of `npm pack`.
17
17
 
18
18
  ### Third-party notices
19
19
 
@@ -51,7 +51,7 @@ npm pack
51
51
  mkdir /tmp/reactive-md-consumer
52
52
  cd /tmp/reactive-md-consumer
53
53
  npm init -y
54
- npm install /path/to/reactive-md-0.5.1.tgz
54
+ npm install /path/to/reactive-md-0.5.2.tgz
55
55
  ```
56
56
 
57
57
  The core entry can be checked directly in Node:
@@ -86,7 +86,7 @@ Release notes are for users and must include at least:
86
86
 
87
87
  - The package version, `LOCAL_SYNTAX_VERSION`, component protocol revision and theme protocol revision; these are different version numbers.
88
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.
89
+ - User-visible changes, breaking changes and migration steps; link directly to the [changelog](../CHANGELOG.md) and the [0.5.2 release notes](release-0.5.2-en.md) for this cycle.
90
90
  - Verified platforms, plus unverified browsers, general SSR hydration and other scope.
91
91
  - Known limitations and a link to [SECURITY.md](../SECURITY.md).
92
92
 
@@ -96,12 +96,12 @@ Do not write results for checks that have not run, and do not present the existe
96
96
 
97
97
  1. Confirm the working tree is clean, changes have been reviewed, and `npm ci` installs successfully from the lockfile.
98
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.
99
+ 3. Confirm the version number, `CHANGELOG.md` and the release notes agree. `0.5.2` adds host components and raises the component protocol to `component-protocol-2`; `LOCAL_SYNTAX_VERSION` and the theme protocol are unchanged. Update a version axis only when its own contract changes.
100
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
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
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`.
103
+ 7. Create and push the tag manually, for example `v0.5.2`. 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.2.tgz --access public --tag next`. Preview releases start on `next`, and this release keeps `latest` on `0.4.0`. Promoting `0.5.2` requires a separate decision: `npm dist-tag add reactive-md@0.5.2 latest`.
105
105
  9. Verify the package contents, version, README, license and release notes on npm and GitHub Releases; reinstall once from the public registry.
106
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
107
 
@@ -14,7 +14,7 @@ The conformance sources are unversioned and use the current `local-draft-2` revi
14
14
 
15
15
  ## Component protocol conformance
16
16
 
17
- [component-protocol-1.json](component-protocol-1.json) provides representative cases for the [component protocol](../../docs/component-protocol-en.md), covering `slider`, `tabs`, `plot` and lazy degradation of unknown components. The [JSON Schema](component-protocol-1.schema.json) defines the conformance file format so tools from other implementations can read it. This JSON is test input and expected results; see the [development guide](../../docs/component-development-en.md) for the declaration template of a component proposal.
17
+ [component-protocol-1.json](component-protocol-1.json) provides representative cases for the [component protocol](../../docs/component-protocol-en.md), covering `slider`, `tabs`, `plot` and lazy degradation of unknown components. The existing `component-protocol-1.json` remains the frozen author-component baseline now that the protocol revision is `component-protocol-2`. The [JSON Schema](component-protocol-1.schema.json) defines the conformance file format so tools from other implementations can read it. This JSON is test input and expected results; see the [development guide](../../docs/component-development-en.md) for the declaration template of a component proposal.
18
18
 
19
19
  ```sh
20
20
  npm run test:components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-md",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Author interactive local documents in Markdown, with expression-bound inputs, charts and diagrams.",
5
5
  "keywords": [
6
6
  "markdown",