reactive-md 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +47 -15
- package/CHANGELOG.md +47 -15
- package/CONTRIBUTING-ch.md +10 -5
- package/CONTRIBUTING.md +10 -5
- package/README-ch.md +38 -36
- package/README-en.md +45 -42
- package/README.md +45 -42
- package/SECURITY-ch.md +1 -1
- package/SECURITY.md +1 -1
- package/THIRD_PARTY_NOTICES.md +481 -1
- package/cli/build.mjs +1 -1
- package/cli/package.mjs +1 -0
- package/dist-library/authoring-DSC0VsNK.js +842 -0
- package/dist-library/{runtime-UiQPz5ZV.js → compiler-CRD88BMt.js} +8944 -5847
- package/dist-library/react-Dk94rcOp.js +59658 -0
- package/dist-library/reactive-md-authoring.js +1514 -0
- package/dist-library/reactive-md-editor.js +589 -570
- package/dist-library/reactive-md-print.css +284 -0
- package/dist-library/reactive-md-react-unstyled.js +1 -0
- package/dist-library/reactive-md-react.js +1 -13208
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +308 -1126
- package/dist-library/runtime-D8KbnCd0.js +498 -0
- package/dist-library/types/authoring/index.d.ts +24 -0
- package/dist-library/types/editor/command-types.d.ts +10 -0
- package/dist-library/types/editor/editor-commands.d.ts +2 -2
- package/dist-library/types/editor/editor-i18n.d.ts +1 -1
- package/dist-library/types/editor/native-components.d.ts +1 -1
- package/dist-library/types/editor/source-authoring.d.ts +5 -3
- package/dist-library/types/editor/types.d.ts +7 -10
- package/dist-library/types/local/LocalDocumentView.d.ts +4 -2
- package/dist-library/types/local/authoring.d.ts +9 -5
- package/dist-library/types/local/code-block.d.ts +3 -1
- package/dist-library/types/local/code-languages.d.ts +7 -0
- package/dist-library/types/local/compiled-data.d.ts +6 -0
- package/dist-library/types/local/compiler.d.ts +1 -0
- package/dist-library/types/local/diagnostics.d.ts +71 -0
- package/dist-library/types/local/diagram-layout.d.ts +69 -0
- package/dist-library/types/local/html-names.d.ts +6 -0
- package/dist-library/types/local/html-table.d.ts +25 -0
- package/dist-library/types/local/index.d.ts +1 -0
- package/dist-library/types/local/math-display.d.ts +73 -0
- package/dist-library/types/local/math-view.d.ts +2 -0
- package/dist-library/types/local/options.d.ts +3 -1
- package/dist-library/types/local/table-surface.d.ts +10 -0
- package/dist-library/types/local/types.d.ts +12 -0
- package/dist-library/types/local/visuals.d.ts +9 -0
- package/dist-library/types/local/worker.d.ts +3 -2
- package/dist-library/types/react/index.d.ts +1 -1
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +79 -51
- package/docs/README.md +84 -0
- package/docs/{compatibility-ch.md → compatibility/compatibility-ch.md} +28 -18
- package/docs/{compatibility-en.md → compatibility/compatibility-en.md} +28 -18
- package/docs/{source-versioning-ch.md → compatibility/source-versioning-ch.md} +2 -2
- package/docs/{source-versioning-en.md → compatibility/source-versioning-en.md} +2 -2
- package/docs/{component-development-ch.md → development/component-development-ch.md} +7 -7
- package/docs/{component-development-en.md → development/component-development-en.md} +7 -7
- package/docs/{component-protocol-ch.md → development/component-protocol-ch.md} +17 -17
- package/docs/{component-protocol-en.md → development/component-protocol-en.md} +17 -17
- package/docs/{performance-ch.md → development/performance-ch.md} +2 -2
- package/docs/{performance-en.md → development/performance-en.md} +2 -2
- package/docs/{releasing-ch.md → development/releasing-ch.md} +12 -12
- package/docs/{releasing-en.md → development/releasing-en.md} +12 -12
- package/docs/guides/local-guide-ch.md +513 -0
- package/docs/guides/local-guide-en.md +513 -0
- package/docs/{author-tools-ch.md → integration/author-tools-ch.md} +13 -7
- package/docs/{author-tools-en.md → integration/author-tools-en.md} +13 -7
- package/docs/{editor-ch.md → integration/editor-ch.md} +238 -235
- package/docs/{editor-en.md → integration/editor-en.md} +238 -235
- package/docs/{local-integration-ch.md → integration/local-integration-ch.md} +410 -390
- package/docs/{local-integration-en.md → integration/local-integration-en.md} +410 -390
- package/docs/{shareable-export-ch.md → integration/shareable-export-ch.md} +16 -4
- package/docs/{shareable-export-en.md → integration/shareable-export-en.md} +16 -4
- package/docs/{computations-formatting-ch.md → reference/computations-formatting-ch.md} +2 -2
- package/docs/{computations-formatting-en.md → reference/computations-formatting-en.md} +2 -2
- package/docs/{constraints-collections-ch.md → reference/constraints-collections-ch.md} +2 -2
- package/docs/{constraints-collections-en.md → reference/constraints-collections-en.md} +2 -2
- package/docs/{diagnostics-counting-ch.md → reference/diagnostics-counting-ch.md} +22 -2
- package/docs/{diagnostics-counting-en.md → reference/diagnostics-counting-en.md} +22 -2
- package/docs/{html-compatibility-ch.md → reference/html-compatibility-ch.md} +42 -4
- package/docs/{html-compatibility-en.md → reference/html-compatibility-en.md} +42 -4
- package/docs/{local-components-v2-ch.md → reference/local-components-v2-ch.md} +2 -2
- package/docs/{local-components-v2-en.md → reference/local-components-v2-en.md} +2 -2
- package/docs/{local-interaction-syntax-ch.md → reference/local-interaction-syntax-ch.md} +26 -7
- package/docs/{local-interaction-syntax-en.md → reference/local-interaction-syntax-en.md} +26 -7
- package/docs/{theme-protocol-ch.md → reference/theme-protocol-ch.md} +1 -1
- package/docs/{theme-protocol-en.md → reference/theme-protocol-en.md} +1 -1
- package/docs/{release-0.4.0-ch.md → releases/release-0.4.0-ch.md} +6 -6
- package/docs/{release-0.4.0-en.md → releases/release-0.4.0-en.md} +6 -6
- package/docs/{release-0.4.1-ch.md → releases/release-0.4.1-ch.md} +2 -2
- package/docs/{release-0.4.1-en.md → releases/release-0.4.1-en.md} +2 -2
- package/docs/{release-0.5.0-ch.md → releases/release-0.5.0-ch.md} +4 -4
- package/docs/{release-0.5.0-en.md → releases/release-0.5.0-en.md} +4 -4
- package/docs/{release-0.5.1-ch.md → releases/release-0.5.1-ch.md} +4 -4
- package/docs/{release-0.5.1-en.md → releases/release-0.5.1-en.md} +4 -4
- package/docs/{release-0.5.2-ch.md → releases/release-0.5.2-ch.md} +3 -3
- package/docs/{release-0.5.2-en.md → releases/release-0.5.2-en.md} +3 -3
- package/docs/releases/release-0.5.3-ch.md +25 -0
- package/docs/releases/release-0.5.3-en.md +25 -0
- package/docs/releases/release-0.6.0-ch.md +57 -0
- package/docs/releases/release-0.6.0-en.md +57 -0
- package/examples/conformance/README.md +4 -4
- package/examples/integration/README.md +10 -8
- package/examples/integration/worker/package.json +1 -1
- package/examples/local/README.md +5 -5
- package/examples/local/html-compat.reactive.md +19 -0
- package/package.json +20 -3
- package/docs/local-guide-ch.md +0 -967
- package/docs/local-guide-en.md +0 -967
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Protocol revision `component-protocol-2` · applicable syntax `local-draft-2` · current package version `0.5.2` (preview)
|
|
4
4
|
|
|
5
|
-
Components are the building blocks of the Reactive MD language. This protocol defines the shared contract for contribution, implementation and acceptance, connecting author syntax, the compiler, the runtime, the React reference adapter and machine conformance data. Authors writing documents follow the [local interaction syntax specification](local-interaction-syntax-en.md); hosts integrating follow [local mode integration](local-integration-en.md); this document is for contributors, reviewers and tests.
|
|
5
|
+
Components are the building blocks of the Reactive MD language. This protocol defines the shared contract for contribution, implementation and acceptance, connecting author syntax, the compiler, the runtime, the React reference adapter and machine conformance data. Authors writing documents follow the [local interaction syntax specification](../reference/local-interaction-syntax-en.md); hosts integrating follow [local mode integration](../integration/local-integration-en.md); this document is for contributors, reviewers and tests.
|
|
6
6
|
|
|
7
7
|
| To learn about | Read |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| How to write documents | [Beginner guide](local-guide-en.md), [syntax specification](local-interaction-syntax-en.md) |
|
|
9
|
+
| How to write documents | [Beginner guide](../guides/local-guide-en.md), [syntax specification](../reference/local-interaction-syntax-en.md) |
|
|
10
10
|
| How to add or change components | [Component development guide](component-development-en.md), sections 12 and 13 of this document |
|
|
11
|
-
| How to run acceptance | [Language conformance data](
|
|
12
|
-
| Version and migration rules | [Versions and compatibility](compatibility-en.md) |
|
|
13
|
-
| Security boundary | [Security policy](
|
|
11
|
+
| How to run acceptance | [Language conformance data](../../examples/conformance/README.md), section 11 of this document |
|
|
12
|
+
| Version and migration rules | [Versions and compatibility](../compatibility/compatibility-en.md) |
|
|
13
|
+
| Security boundary | [Security policy](../../SECURITY.md) |
|
|
14
14
|
|
|
15
15
|
## 1. Status, terminology and normative force
|
|
16
16
|
|
|
@@ -31,10 +31,10 @@ The protocol revision is independent of the package version and syntax version.
|
|
|
31
31
|
|
|
32
32
|
When this protocol restates existing behavior, the following files are authoritative:
|
|
33
33
|
|
|
34
|
-
- Author syntax: [local interaction syntax specification](local-interaction-syntax-en.md).
|
|
35
|
-
- Core and React API: [local mode integration](local-integration-en.md).
|
|
36
|
-
- Security boundary and host responsibilities: [security policy](
|
|
37
|
-
- Versions, diagnostics contract and platform scope: [Versions and compatibility](compatibility-en.md).
|
|
34
|
+
- Author syntax: [local interaction syntax specification](../reference/local-interaction-syntax-en.md).
|
|
35
|
+
- Core and React API: [local mode integration](../integration/local-integration-en.md).
|
|
36
|
+
- Security boundary and host responsibilities: [security policy](../../SECURITY.md).
|
|
37
|
+
- Versions, diagnostics contract and platform scope: [Versions and compatibility](../compatibility/compatibility-en.md).
|
|
38
38
|
- Implementation code: the parser, declaration table, compiler, runtime and renderer under `src/local/`.
|
|
39
39
|
|
|
40
40
|
This protocol does not copy the full attribute tables. Attribute defaults, allowed values and static/dynamic markers follow `src/local/schema.ts` and the syntax specification.
|
|
@@ -81,7 +81,7 @@ This document defines contribution and acceptance contracts. The author tutorial
|
|
|
81
81
|
| Declarations | `computed`, `const`, `validation` | Parsed tags that are not rendered controls |
|
|
82
82
|
| Generated data and visualization | `data-table`, `column`, `table`, `chart`, `plot`, `timeline`, `diagram`, `node`, `edge` | Generated rows, tables, charts, function curves, timelines and diagrams |
|
|
83
83
|
|
|
84
|
-
`option`, `tab`, `disclosure`, `node`, `edge`, `step` and `column` are structural children that appear only inside their specified parent components. `computed` and `const` are invisible declarations; `validation` produces accessible hints when its rule fails. The leading `<theme>` declaration is document metadata, not a component. See [section 12 of the syntax specification](local-interaction-syntax-en.md#12-component-reference-and-syntax-scope) for the complete names and purposes.
|
|
84
|
+
`option`, `tab`, `disclosure`, `node`, `edge`, `step` and `column` are structural children that appear only inside their specified parent components. `computed` and `const` are invisible declarations; `validation` produces accessible hints when its rule fails. The leading `<theme>` declaration is document metadata, not a component. See [section 12 of the syntax specification](../reference/local-interaction-syntax-en.md#12-component-reference-and-syntax-scope) for the complete names and purposes.
|
|
85
85
|
|
|
86
86
|
### CP-MODEL-02 Three shapes (existing)
|
|
87
87
|
|
|
@@ -212,7 +212,7 @@ Components without `bind` still have internal state under the internal key `@<no
|
|
|
212
212
|
| `steps` | Current step value, exclusive | `steps` |
|
|
213
213
|
| `selection` | Stable row key, empty string when unselected | `table` and `chart` with key |
|
|
214
214
|
|
|
215
|
-
Each numeric slot of range-slider and coordinate is also exclusive. Bounds, steps, defaults and atomic batch writes are defined in the [extension declarations](local-components-v2-en.md). Selection can be shared by tables and charts only with identical ordered keys. The initialization, rejection, visibility, reset and disposal clauses below continue to apply.
|
|
215
|
+
Each numeric slot of range-slider and coordinate is also exclusive. Bounds, steps, defaults and atomic batch writes are defined in the [extension declarations](../reference/local-components-v2-en.md). Selection can be shared by tables and charts only with identical ordered keys. The initialization, rejection, visibility, reset and disposal clauses below continue to apply.
|
|
216
216
|
|
|
217
217
|
`timer`, `checklist`, `tabs` and `diagram` are also exclusive families: a public parameter can be owned by only one component, and other controls cannot declare a same-name binding. Hosts can still call the public `runtime.set` through the owning node, and writes follow the same validation.
|
|
218
218
|
|
|
@@ -351,7 +351,7 @@ A false condition, inactive tab or closed disclosure affects display only, not c
|
|
|
351
351
|
|
|
352
352
|
### CP-DIAG-06 Diagnostic code stability (contract)
|
|
353
353
|
|
|
354
|
-
Existing diagnostic codes keep their meaning within one 0.x minor series; new codes may be added. Removal, renaming or a change of meaning requires a new minor version and migration notes. Messages are localized display text. Tests and machine conformance use codes and structured fields. See [Diagnostics and counting rules](diagnostics-counting-en.md) for units and budget scopes.
|
|
354
|
+
Existing diagnostic codes keep their meaning within one 0.x minor series; new codes may be added. Removal, renaming or a change of meaning requires a new minor version and migration notes. Messages are localized display text. Tests and machine conformance use codes and structured fields. See [Diagnostics and counting rules](../reference/diagnostics-counting-en.md) for units and budget scopes.
|
|
355
355
|
|
|
356
356
|
## 6. Accessibility, themes and styling
|
|
357
357
|
|
|
@@ -369,7 +369,7 @@ The machine conformance data of this protocol does not cover browser behavior su
|
|
|
369
369
|
|
|
370
370
|
### CP-STYLE-01 Global styles and themes (existing)
|
|
371
371
|
|
|
372
|
-
`reactive-md/styles.css` is a global stylesheet, not isolated through Shadow DOM or CSS Modules. The host imports it explicitly once. Theme variables are declared on `.md-document` and `.reactive-md-theme`. Document selection, registration and color schemes follow the [theme protocol](theme-protocol-en.md). `colorScheme="auto"` reads the nearest explicit ancestor preference or the system, retaining support for `data-theme="dark|light"`.
|
|
372
|
+
`reactive-md/styles.css` is a global stylesheet, not isolated through Shadow DOM or CSS Modules. The host imports it explicitly once. Theme variables are declared on `.md-document` and `.reactive-md-theme`. Document selection, registration and color schemes follow the [theme protocol](../reference/theme-protocol-en.md). `colorScheme="auto"` reads the nearest explicit ancestor preference or the system, retaining support for `data-theme="dark|light"`.
|
|
373
373
|
|
|
374
374
|
### CP-STYLE-02 Style hooks are not an API (existing)
|
|
375
375
|
|
|
@@ -450,7 +450,7 @@ All images are rejected by default, including relative paths; they load only whe
|
|
|
450
450
|
| Document generated cell budget | 10,000 |
|
|
451
451
|
| Generated table text | 100,000 UTF-16 code units per table |
|
|
452
452
|
|
|
453
|
-
Here, characters means UTF-16 code units. Text-control `min-length` / `max-length` and string `len()` count Unicode code points. Writes over a limit are rejected and the runtime keeps the last valid state; compile-time overruns return diagnostics. Expressions and math evaluation have additional length, node, depth and token budgets. See [Diagnostics and counting rules](diagnostics-counting-en.md) for all units and scopes. Hidden regions count toward plotting budgets. Hosts still control request size, concurrency and timeouts.
|
|
453
|
+
Here, characters means UTF-16 code units. Text-control `min-length` / `max-length` and string `len()` count Unicode code points. Writes over a limit are rejected and the runtime keeps the last valid state; compile-time overruns return diagnostics. Expressions and math evaluation have additional length, node, depth and token budgets. See [Diagnostics and counting rules](../reference/diagnostics-counting-en.md) for all units and scopes. Hidden regions count toward plotting budgets. Hosts still control request size, concurrency and timeouts.
|
|
454
454
|
|
|
455
455
|
### CP-SEC-04 Host responsibilities (existing)
|
|
456
456
|
|
|
@@ -565,7 +565,7 @@ Persist only the original `.reactive.md` source and the syntax revision used. `L
|
|
|
565
565
|
|
|
566
566
|
The root object of a machine conformance set contains only `protocolVersion`, `syntaxVersion` and a non-empty `cases` array. The current author-component set fixes them to `component-protocol-1` and `local-draft-2`; it remains the frozen v1 baseline described in section 14. The package version is identified by `package.json` and is not inferred from these fields.
|
|
567
567
|
|
|
568
|
-
Each case contains at least a unique string `id`, component name `component`, source `source`, boolean `ok` and a deduplicated diagnostic code set `codes`. Optional fields `initial`, `bindingNames`, `actions`, `reset`, `text`, `expectedText`, `htmlIncludes` and `htmlExcludes` follow the [language conformance data notes](
|
|
568
|
+
Each case contains at least a unique string `id`, component name `component`, source `source`, boolean `ok` and a deduplicated diagnostic code set `codes`. Optional fields `initial`, `bindingNames`, `actions`, `reset`, `text`, `expectedText`, `htmlIncludes` and `htmlExcludes` follow the [language conformance data notes](../../examples/conformance/README.md) and the JSON Schema shipped with the repository. The full format follows that document and the Schema; this protocol defines only the semantic gates.
|
|
569
569
|
|
|
570
570
|
The runner must:
|
|
571
571
|
|
|
@@ -606,7 +606,7 @@ Local browser verification has used Microsoft Edge (Chromium-based); Linux CI us
|
|
|
606
606
|
|
|
607
607
|
### CP-ACCEPT-05 Command gate and exemptions (required)
|
|
608
608
|
|
|
609
|
-
The protocol sample gate uses `npm run test:components`, which runs `examples/conformance/component-protocol-1.json` and language conformance; it does not replace full tests, builds, documentation checks or manual browser checks. See the [contributing guide](
|
|
609
|
+
The protocol sample gate uses `npm run test:components`, which runs `examples/conformance/component-protocol-1.json` and language conformance; it does not replace full tests, builds, documentation checks or manual browser checks. See the [contributing guide](../../CONTRIBUTING.md) and the [component development guide](component-development-en.md) for the full check commands.
|
|
610
610
|
|
|
611
611
|
Only SHOULD clauses can be exempted; exemptions must record the rationale, alternative evidence and impact in the proposal. MUST clauses cannot be exempted and can only be changed through a protocol revision.
|
|
612
612
|
|
|
@@ -744,4 +744,4 @@ Portable machine cases remain `examples/conformance/component-protocol-1.json`,
|
|
|
744
744
|
| `component-protocol-1` | 2026-10-23 | Initial version; originally applied to `local-draft-1` and package version `0.3.0`, defining component contribution, acceptance and extension boundaries. It now applies to `local-draft-2` and the `0.4.0` preview release without changing its MUST clauses or machine format. |
|
|
745
745
|
|
|
746
746
|
|
|
747
|
-
See [local-draft-2 components and migration](local-components-v2-en.md) for new tags, colors and slot state, and [0.4.0 release and migration](release-0.4.0-en.md) for the upgrade checklist. `0.
|
|
747
|
+
See [local-draft-2 components and migration](../reference/local-components-v2-en.md) for new tags, colors and slot state, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the upgrade checklist. `0.6.0` is available on both the `latest` and `next` channels.
|
|
@@ -27,9 +27,9 @@ npm run benchmark
|
|
|
27
27
|
|
|
28
28
|
## 宿主中的大文档
|
|
29
29
|
|
|
30
|
-
文档源码上限为 1,000,000 个 UTF-16 代码单元,绘图和表达式还有独立计算预算,详见[安全策略](
|
|
30
|
+
文档源码上限为 1,000,000 个 UTF-16 代码单元,绘图和表达式还有独立计算预算,详见[安全策略](../../SECURITY-ch.md)。资源上限控制工作量,编译 API 仍是同步调用。编辑器可以合并连续输入触发的编译;处理来源不可信或较大的文档时,可以在宿主 Worker 或独立进程中编译,并由宿主控制并发和超时。
|
|
31
31
|
|
|
32
|
-
语法节点预算默认 10,000,宿主可用 `compileLocal(source, { limits: { maxSyntaxNodes: 50_000 } })` 按次调整,见[核心 API](local-integration-ch.md#核心-api)。提高预算后应同时测量编译、内存和最终预览渲染成本。
|
|
32
|
+
语法节点预算默认 10,000,宿主可用 `compileLocal(source, { limits: { maxSyntaxNodes: 50_000 } })` 按次调整,见[核心 API](../integration/local-integration-ch.md#核心-api)。提高预算后应同时测量编译、内存和最终预览渲染成本。
|
|
33
33
|
|
|
34
34
|
## 渲染优化契约
|
|
35
35
|
|
|
@@ -27,9 +27,9 @@ These numbers measure compilation, evaluation and sampling in Node; they do not
|
|
|
27
27
|
|
|
28
28
|
## Large documents in the host
|
|
29
29
|
|
|
30
|
-
Document source is limited to 1,000,000 UTF-16 code units, and plotting and expressions have separate computation budgets; see the [security policy](
|
|
30
|
+
Document source is limited to 1,000,000 UTF-16 code units, and plotting and expressions have separate computation budgets; see the [security policy](../../SECURITY.md) for details. Resource limits bound the work, but the compile API remains synchronous. Editors can coalesce compilations triggered by consecutive input; when handling untrusted or large documents, compile in a host Worker or a separate process, with the host controlling concurrency and timeouts.
|
|
31
31
|
|
|
32
|
-
The syntax node budget defaults to 10,000, and hosts can adjust it per call with `compileLocal(source, { limits: { maxSyntaxNodes: 50_000 } })`, see the [Core API](local-integration-en.md#core-api). After raising the budget, measure compilation, memory and final preview rendering costs together.
|
|
32
|
+
The syntax node budget defaults to 10,000, and hosts can adjust it per call with `compileLocal(source, { limits: { maxSyntaxNodes: 50_000 } })`, see the [Core API](../integration/local-integration-en.md#core-api). After raising the budget, measure compilation, memory and final preview rendering costs together.
|
|
33
33
|
|
|
34
34
|
## Rendering optimization contract
|
|
35
35
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# 发布清单
|
|
2
2
|
|
|
3
|
-
本文件是维护者的手动发布流程。本清单覆盖 `0.
|
|
3
|
+
本文件是维护者的手动发布流程。本清单覆盖 `0.6.0`,同时更新 `latest` 与 `next`。版本规则见[版本与兼容性](../compatibility/compatibility-ch.md),面向使用者的说明见[0.6.0 发布说明](../releases/release-0.6.0-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.6.0` 保持这些入口。不要把改名当作常规发布准备:改名会破坏导入、状态工具和文档。
|
|
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.
|
|
16
|
+
包名和版本决定 tarball 名称。当前 `0.6.0` 的预期文件名是 `reactive-md-0.6.0.tgz`;改名或改版本后以 `npm pack` 的实际输出为准。
|
|
17
17
|
|
|
18
18
|
### 第三方 notice
|
|
19
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` 保留这些打包依赖的版权和许可声明。
|
|
20
|
+
库产物打包了 `remark-gfm@4.0.1`、`remark-parse@11.0.0`、`unified@11.0.5`、`elkjs@0.12.0`、`mhchemparser@4.2.1` 及其依赖。独立 HTML 运行时还打包了 React、React DOM 和 scheduler;库的 React 入口使用宿主提供的 peer dependency。`THIRD_PARTY_NOTICES.md` 保留这些打包依赖的版权和许可声明。
|
|
21
21
|
|
|
22
22
|
维护者在发布前:
|
|
23
23
|
|
|
24
|
-
1. 运行 `npm run notices`,从已安装依赖重新生成 `THIRD_PARTY_NOTICES.md`。生成脚本覆盖 `remark-gfm`、`remark-parse`、`unified`、`react`、`react-dom` 的依赖树和实际许可证文本,包括 scheduler。
|
|
24
|
+
1. 运行 `npm run notices`,从已安装依赖重新生成 `THIRD_PARTY_NOTICES.md`。生成脚本覆盖 `remark-gfm`、`remark-parse`、`unified`、`parse5`、`lowlight`、`elkjs`、`mhchemparser`、`react`、`react-dom` 的依赖树和实际许可证文本,包括 scheduler。
|
|
25
25
|
2. 确认 `package.json` 的 `files` 包含 `THIRD_PARTY_NOTICES.md`,并随 tarball 分发。
|
|
26
26
|
3. 检查 `npm pack --dry-run` 的输出,确认没有 `node_modules`、`demo/`、`demo/artifacts/`、测试产物或本地缓存。
|
|
27
27
|
4. 核对依赖许可证与打包内容一致;新增或升级 Markdown 依赖后重新生成 notice。
|
|
@@ -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.
|
|
54
|
+
npm install /path/to/reactive-md-0.6.0.tgz
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
核心入口可在 Node 中直接检查:
|
|
@@ -85,10 +85,10 @@ import 'reactive-md/editor/styles.css';
|
|
|
85
85
|
发布说明面向使用者,至少包含:
|
|
86
86
|
|
|
87
87
|
- 包版本、`LOCAL_SYNTAX_VERSION`、组块协议修订与主题协议修订;这些不是同一个版本号。
|
|
88
|
-
- 安装方式:`npm install reactive-md@next`,或使用 `npm install reactive-md@<version>` 固定版本;并提供可下载 tarball 作为离线安装选项。
|
|
89
|
-
- 用户可见变化、破坏性变更和迁移步骤;直接链接[变更记录](
|
|
88
|
+
- 安装方式:`npm install reactive-md`、`npm install reactive-md@next`,或使用 `npm install reactive-md@<version>` 固定版本;并提供可下载 tarball 作为离线安装选项。
|
|
89
|
+
- 用户可见变化、破坏性变更和迁移步骤;直接链接[变更记录](../../CHANGELOG-ch.md),本轮同时链接[0.5.0 发布说明](../releases/release-0.5.0-ch.md)。
|
|
90
90
|
- 已验证的平台,以及未验证的浏览器、通用 SSR 水合等范围。
|
|
91
|
-
- 已知限制和安全说明链接 [SECURITY-ch.md](
|
|
91
|
+
- 已知限制和安全说明链接 [SECURITY-ch.md](../../SECURITY-ch.md)。
|
|
92
92
|
|
|
93
93
|
不要写尚未执行的检查结果,也不要把 CI 配置存在写成 CI 已通过。
|
|
94
94
|
|
|
@@ -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.
|
|
99
|
+
3. 确认版本号、`CHANGELOG-ch.md` 和发布说明一致。`0.6.0` 新增原生 HTML 表格、扩展数学与代码高亮、分层图解和宿主修复;语法修订 `local-draft-2`、组块协议 `component-protocol-2` 和主题协议 `reactive-md-theme-1` 均保持不变。仅在某条版本轴自身的契约变化时更新它。
|
|
100
100
|
4. 检查门禁保留的安装包,包括文件列表、大小和许可文件。手动重新运行 `npm pack` 会产生新候选包,需要单独完成安装验证。
|
|
101
101
|
5. 核对安装包的 SHA256 与 `artifacts/release-package/package-verification.json` 一致,并记录到发布说明或内部发布记录。
|
|
102
102
|
6. 合并发布提交,等待 `main` 上的 CI 全部通过。
|
|
103
|
-
7. 手动创建并推送 tag,例如 `v0.
|
|
104
|
-
8. 在维护者本机完成 npm
|
|
103
|
+
7. 手动创建并推送 tag,例如 `v0.6.0`。不要在自动发布工作流中保存 npm token。
|
|
104
|
+
8. 在维护者本机完成 npm 登录和双因素认证后,手动发布已经验证的安装包:`npm publish artifacts/release-package/reactive-md-0.6.0.tgz --access public --tag next`。预览版先发布到 `next`。本次已授权同时更新默认版本,发包成功后执行 `npm dist-tag add reactive-md@0.6.0 latest`,并重新查询 dist-tags 确认两个渠道。`latest` 未在本次授权范围内时保持原版本。
|
|
105
105
|
9. 在 npm 和 GitHub Releases 上核对包内容、版本、README、许可与发布说明;从公开 registry 重新安装一次。
|
|
106
106
|
10. 从 registry 验证 README 中的安装命令可用,核对 registry 的完整性摘要与发布 tarball 一致。
|
|
107
107
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# Release checklist
|
|
2
2
|
|
|
3
|
-
This file is the maintainers' manual release process. This checklist covers
|
|
3
|
+
This file is the maintainers' manual release process. This checklist covers `0.6.0`, which updates both `latest` and `next`. See [Versions and compatibility](../compatibility/compatibility-en.md) for version rules and the [0.6.0 release notes](../releases/release-0.6.0-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`
|
|
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` through `0.6.0` 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.
|
|
16
|
+
The package name and version determine the tarball name. The expected filename for `0.6.0` is `reactive-md-0.6.0.tgz`; after renaming or changing the version, use the actual output of `npm pack`.
|
|
17
17
|
|
|
18
18
|
### Third-party notices
|
|
19
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`.
|
|
20
|
+
The library bundles `remark-gfm@4.0.1`, `remark-parse@11.0.0`, `unified@11.0.5`, `elkjs@0.12.0`, `mhchemparser@4.2.1` 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
21
|
|
|
22
22
|
Before releasing, maintainers:
|
|
23
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.
|
|
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`, `parse5`, `lowlight`, `elkjs`, `mhchemparser`, `react` and `react-dom`, including scheduler.
|
|
25
25
|
2. Confirm `files` in `package.json` includes `THIRD_PARTY_NOTICES.md` so it ships in the tarball.
|
|
26
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
27
|
4. Check that dependency licenses match the packaged content; regenerate notices after adding or upgrading Markdown dependencies.
|
|
@@ -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.
|
|
54
|
+
npm install /path/to/reactive-md-0.6.0.tgz
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
The core entry can be checked directly in Node:
|
|
@@ -85,10 +85,10 @@ Static SSR rendering is covered by the packed check. The editor entry is importe
|
|
|
85
85
|
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
|
-
- 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](
|
|
88
|
+
- The install command `npm install reactive-md`, `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.6.0 release notes](../releases/release-0.6.0-en.md) for this cycle.
|
|
90
90
|
- Verified platforms, plus unverified browsers, general SSR hydration and other scope.
|
|
91
|
-
- Known limitations and a link to [SECURITY.md](
|
|
91
|
+
- Known limitations and a link to [SECURITY.md](../../SECURITY.md).
|
|
92
92
|
|
|
93
93
|
Do not write results for checks that have not run, and do not present the existence of CI configuration as CI passing.
|
|
94
94
|
|
|
@@ -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.
|
|
99
|
+
3. Confirm the version number, `CHANGELOG.md` and the release notes agree. `0.6.0` adds native HTML tables, expanded math and code highlighting, layered diagrams and host fixes; syntax revision `local-draft-2`, component protocol `component-protocol-2` and theme protocol `reactive-md-theme-1` 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.
|
|
104
|
-
8. After signing in to npm and completing two-factor authentication on the maintainer's machine, publish the verified
|
|
103
|
+
7. Create and push the tag manually, for example `v0.6.0`. 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 tarball manually: `npm publish artifacts/release-package/reactive-md-0.6.0.tgz --access public --tag next`. Preview releases start on `next`. This release is authorized to update the default version too, so after publication run `npm dist-tag add reactive-md@0.6.0 latest` and query dist-tags again to confirm both channels. If `latest` is not in scope, keep the existing default version.
|
|
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
|
|