reactive-md 0.5.3 → 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.
Files changed (95) hide show
  1. package/CHANGELOG-ch.md +45 -24
  2. package/CHANGELOG.md +45 -24
  3. package/CONTRIBUTING-ch.md +10 -5
  4. package/CONTRIBUTING.md +10 -5
  5. package/README-ch.md +38 -36
  6. package/README-en.md +45 -42
  7. package/README.md +45 -42
  8. package/SECURITY-ch.md +1 -1
  9. package/SECURITY.md +1 -1
  10. package/THIRD_PARTY_NOTICES.md +481 -1
  11. package/dist-library/{authoring-DJJjKYg9.js → authoring-DSC0VsNK.js} +58 -58
  12. package/dist-library/{compiler-UyPwGzJZ.js → compiler-CRD88BMt.js} +6218 -3363
  13. package/dist-library/react-Dk94rcOp.js +59658 -0
  14. package/dist-library/reactive-md-authoring.js +2 -2
  15. package/dist-library/reactive-md-editor.js +13 -0
  16. package/dist-library/reactive-md-react-unstyled.js +1 -1
  17. package/dist-library/reactive-md-react.js +1 -1
  18. package/dist-library/reactive-md.css +1 -1
  19. package/dist-library/reactive-md.js +123 -123
  20. package/dist-library/{runtime-DXtle_6c.js → runtime-D8KbnCd0.js} +151 -151
  21. package/dist-library/types/editor/types.d.ts +2 -0
  22. package/dist-library/types/local/code-block.d.ts +3 -1
  23. package/dist-library/types/local/code-languages.d.ts +7 -0
  24. package/dist-library/types/local/compiled-data.d.ts +6 -0
  25. package/dist-library/types/local/compiler.d.ts +1 -0
  26. package/dist-library/types/local/diagnostics.d.ts +31 -0
  27. package/dist-library/types/local/diagram-layout.d.ts +69 -0
  28. package/dist-library/types/local/html-names.d.ts +6 -0
  29. package/dist-library/types/local/html-table.d.ts +25 -0
  30. package/dist-library/types/local/math-display.d.ts +1 -0
  31. package/dist-library/types/local/table-surface.d.ts +10 -0
  32. package/dist-library/types/local/types.d.ts +2 -0
  33. package/dist-library/types/local/visuals.d.ts +9 -0
  34. package/dist-standalone/reactive-md-standalone.css +1 -1
  35. package/dist-standalone/reactive-md-standalone.js +75 -51
  36. package/docs/README.md +84 -0
  37. package/docs/{compatibility-ch.md → compatibility/compatibility-ch.md} +28 -18
  38. package/docs/{compatibility-en.md → compatibility/compatibility-en.md} +28 -18
  39. package/docs/{source-versioning-ch.md → compatibility/source-versioning-ch.md} +2 -2
  40. package/docs/{source-versioning-en.md → compatibility/source-versioning-en.md} +2 -2
  41. package/docs/{component-development-ch.md → development/component-development-ch.md} +7 -7
  42. package/docs/{component-development-en.md → development/component-development-en.md} +7 -7
  43. package/docs/{component-protocol-ch.md → development/component-protocol-ch.md} +17 -17
  44. package/docs/{component-protocol-en.md → development/component-protocol-en.md} +17 -17
  45. package/docs/{performance-ch.md → development/performance-ch.md} +2 -2
  46. package/docs/{performance-en.md → development/performance-en.md} +2 -2
  47. package/docs/{releasing-ch.md → development/releasing-ch.md} +12 -12
  48. package/docs/{releasing-en.md → development/releasing-en.md} +12 -12
  49. package/docs/guides/local-guide-ch.md +513 -0
  50. package/docs/guides/local-guide-en.md +513 -0
  51. package/docs/{author-tools-ch.md → integration/author-tools-ch.md} +8 -8
  52. package/docs/{author-tools-en.md → integration/author-tools-en.md} +8 -8
  53. package/docs/{editor-ch.md → integration/editor-ch.md} +7 -6
  54. package/docs/{editor-en.md → integration/editor-en.md} +7 -6
  55. package/docs/{local-integration-ch.md → integration/local-integration-ch.md} +33 -15
  56. package/docs/{local-integration-en.md → integration/local-integration-en.md} +33 -15
  57. package/docs/{shareable-export-ch.md → integration/shareable-export-ch.md} +16 -4
  58. package/docs/{shareable-export-en.md → integration/shareable-export-en.md} +16 -4
  59. package/docs/{computations-formatting-ch.md → reference/computations-formatting-ch.md} +2 -2
  60. package/docs/{computations-formatting-en.md → reference/computations-formatting-en.md} +2 -2
  61. package/docs/{constraints-collections-ch.md → reference/constraints-collections-ch.md} +2 -2
  62. package/docs/{constraints-collections-en.md → reference/constraints-collections-en.md} +2 -2
  63. package/docs/{diagnostics-counting-ch.md → reference/diagnostics-counting-ch.md} +22 -2
  64. package/docs/{diagnostics-counting-en.md → reference/diagnostics-counting-en.md} +22 -2
  65. package/docs/{html-compatibility-ch.md → reference/html-compatibility-ch.md} +42 -4
  66. package/docs/{html-compatibility-en.md → reference/html-compatibility-en.md} +42 -4
  67. package/docs/{local-components-v2-ch.md → reference/local-components-v2-ch.md} +2 -2
  68. package/docs/{local-components-v2-en.md → reference/local-components-v2-en.md} +2 -2
  69. package/docs/{local-interaction-syntax-ch.md → reference/local-interaction-syntax-ch.md} +26 -7
  70. package/docs/{local-interaction-syntax-en.md → reference/local-interaction-syntax-en.md} +26 -7
  71. package/docs/{theme-protocol-ch.md → reference/theme-protocol-ch.md} +1 -1
  72. package/docs/{theme-protocol-en.md → reference/theme-protocol-en.md} +1 -1
  73. package/docs/{release-0.4.0-ch.md → releases/release-0.4.0-ch.md} +6 -6
  74. package/docs/{release-0.4.0-en.md → releases/release-0.4.0-en.md} +6 -6
  75. package/docs/{release-0.4.1-ch.md → releases/release-0.4.1-ch.md} +2 -2
  76. package/docs/{release-0.4.1-en.md → releases/release-0.4.1-en.md} +2 -2
  77. package/docs/{release-0.5.0-ch.md → releases/release-0.5.0-ch.md} +4 -4
  78. package/docs/{release-0.5.0-en.md → releases/release-0.5.0-en.md} +4 -4
  79. package/docs/{release-0.5.1-ch.md → releases/release-0.5.1-ch.md} +4 -4
  80. package/docs/{release-0.5.1-en.md → releases/release-0.5.1-en.md} +4 -4
  81. package/docs/{release-0.5.2-ch.md → releases/release-0.5.2-ch.md} +3 -3
  82. package/docs/{release-0.5.2-en.md → releases/release-0.5.2-en.md} +3 -3
  83. package/docs/{release-0.5.3-ch.md → releases/release-0.5.3-ch.md} +1 -1
  84. package/docs/{release-0.5.3-en.md → releases/release-0.5.3-en.md} +1 -1
  85. package/docs/releases/release-0.6.0-ch.md +57 -0
  86. package/docs/releases/release-0.6.0-en.md +57 -0
  87. package/examples/conformance/README.md +4 -4
  88. package/examples/integration/README.md +10 -8
  89. package/examples/integration/worker/package.json +1 -1
  90. package/examples/local/README.md +5 -5
  91. package/examples/local/html-compat.reactive.md +19 -0
  92. package/package.json +9 -2
  93. package/dist-library/react-fizgU3i8.js +0 -12764
  94. package/docs/local-guide-ch.md +0 -967
  95. package/docs/local-guide-en.md +0 -967
package/README-en.md CHANGED
@@ -4,26 +4,28 @@
4
4
 
5
5
  Write local interactive documents in Markdown. Add input controls, name parameters with `bind`, and connect prose, formulas, charts and diagrams with `{{ expressions }}`. Document authors do not write JavaScript or CSS.
6
6
 
7
- Local mode uses HTML-style tags, with parameters and table data written directly in the prose; LaTeX formulas can drive function plots. The TypeScript core and the React renderer can be integrated independently. `0.5.3` is the preview for the `next` channel and adds host integration and authoring patches; `latest` remains `0.4.0`. Syntax revision stays `local-draft-2`, and the component protocol is `component-protocol-2`. See [README-ch.md](README-ch.md) for the Chinese overview.
7
+ Local mode uses HTML-style tags, with parameters and table data written directly in the prose; LaTeX formulas can drive function plots. The TypeScript core and the React renderer can be integrated independently. `0.6.0` is available on both `latest` and `next` and adds native HTML tables, expanded math and code highlighting, layered diagrams and form fixes. Syntax revision stays `local-draft-2`, and the component protocol is `component-protocol-2`. See [README-ch.md](README-ch.md) for the Chinese overview.
8
8
 
9
9
  ## Start here
10
10
 
11
- - [Beginner guide](docs/local-guide-en.md): move from Markdown to interactive documents, with a complete exercise and an error quick reference.
12
- - [Local interaction syntax specification](docs/local-interaction-syntax-en.md) · [Feature tours and examples](examples/local/README.md): 48 tag names, tags, in-place parameters and LaTeX plots.
13
- - [Local mode integration](docs/local-integration-en.md): `compileLocal`, the state runtime, React embedding, URL policy and style scoping.
14
- - [HTML compatibility](docs/html-compatibility-en.md): P0 HTML and the next release's temporary routing policy for author CSS, JavaScript and extended HTML.
15
- - [Shareable documents and static export](docs/shareable-export-en.md): single-file interactive HTML, static output, versioned state files, assets, the CLI and the standalone browser API.
16
- - [Theme protocol](docs/theme-protocol-en.md): document theme selection, custom CSS and light/dark modes.
17
- - [Author tools](docs/author-tools-en.md): source highlighting, completion, binding navigation, rename, formatting and command-line lint.
18
- - [React source editor](docs/editor-en.md): controlled editor, props, ref handle, diagnostics, locale, theme and history.
11
+ - [Documentation index](docs/README.md): guides, references, integration, compatibility, development and releases.
12
+ - [Beginner guide](docs/guides/local-guide-en.md): move from Markdown to interactive documents, with a complete exercise and an error quick reference.
13
+ - [Local interaction syntax specification](docs/reference/local-interaction-syntax-en.md) · [Feature tours and examples](examples/local/README.md): 48 tag names, tags, in-place parameters and LaTeX plots.
14
+ - [Local mode integration](docs/integration/local-integration-en.md): `compileLocal`, the state runtime, React embedding, URL policy and style scoping.
15
+ - [HTML compatibility](docs/reference/html-compatibility-en.md): P0 HTML and the next release's temporary routing policy for author CSS, JavaScript and extended HTML.
16
+ - [Shareable documents and static export](docs/integration/shareable-export-en.md): single-file interactive HTML, static output, versioned state files, assets, the CLI and the standalone browser API.
17
+ - [Theme protocol](docs/reference/theme-protocol-en.md): document theme selection, custom CSS and light/dark modes.
18
+ - [Author tools](docs/integration/author-tools-en.md): source highlighting, completion, binding navigation, rename, formatting and command-line lint.
19
+ - [React source editor](docs/integration/editor-en.md): controlled editor, props, ref handle, diagnostics, locale, theme and history.
19
20
  - [Standalone integration examples](examples/integration/README.md): Node core and React pages you can copy and run outside the repository.
20
- - [Versions and compatibility](docs/compatibility-en.md): 0.x rules, migration, the diagnostics contract and supported platforms.
21
- - [Component protocol](docs/component-protocol-en.md) · [Component development guide](docs/component-development-en.md): declarations, behavior contracts and compatibility acceptance for new components.
22
- - [0.5.3 release notes](docs/release-0.5.3-en.md): host integration and authoring patches.
23
- - [0.5.1 release notes](docs/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
24
- - [0.5.0 release notes](docs/release-0.5.0-en.md): the editor entry and document rendering fixes.
25
- - [0.4.1 release notes](docs/release-0.4.1-en.md): visual and interaction fixes, compatible with 0.4.0.
26
- - [0.4.0 release and migration](docs/release-0.4.0-en.md): what the minor series adds and how to upgrade from `0.3.1` / `local-draft-1`.
21
+ - [Versions and compatibility](docs/compatibility/compatibility-en.md): 0.x rules, migration, the diagnostics contract and supported platforms.
22
+ - [Component protocol](docs/development/component-protocol-en.md) · [Component development guide](docs/development/component-development-en.md): declarations, behavior contracts and compatibility acceptance for new components.
23
+ - [0.6.0 release notes](docs/releases/release-0.6.0-en.md): native HTML tables, math and code highlighting, layered diagrams and host fixes.
24
+ - [0.5.3 release notes](docs/releases/release-0.5.3-en.md): host integration and authoring patches.
25
+ - [0.5.1 release notes](docs/releases/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
26
+ - [0.5.0 release notes](docs/releases/release-0.5.0-en.md): the editor entry and document rendering fixes.
27
+ - [0.4.1 release notes](docs/releases/release-0.4.1-en.md): visual and interaction fixes, compatible with 0.4.0.
28
+ - [0.4.0 release and migration](docs/releases/release-0.4.0-en.md): what the minor series adds and how to upgrade from `0.3.1` / `local-draft-1`.
27
29
 
28
30
  ## Write a document
29
31
 
@@ -38,7 +40,7 @@ Monthly cost: **{{ people * (annual ? 80 : 100) }} USD**.
38
40
 
39
41
  Inputs update the result immediately, and the panel includes a restore-defaults action. A standalone counter is a single line: `<counter label="People">`.
40
42
 
41
- `0.4.0` adds `local-draft-2`, named calculations, validation, collections, themes and offline HTML export. The earlier `0.3.1` release uses `local-draft-1`. See [0.4.0 release and migration](docs/release-0.4.0-en.md).
43
+ `0.4.0` adds `local-draft-2`, named calculations, validation, collections, themes and offline HTML export. The earlier `0.3.1` release uses `local-draft-1`. See [0.4.0 release and migration](docs/releases/release-0.4.0-en.md).
42
44
 
43
45
  ## Install
44
46
 
@@ -48,17 +50,17 @@ Reactive MD requires Node.js 22.12 or newer and ships only ESM entries:
48
50
  npm install reactive-md
49
51
  ```
50
52
 
51
- `latest` resolves to `0.4.0`. The 0.5.3 preview targets `next`:
53
+ `latest` and `next` both resolve to `0.6.0`:
52
54
 
53
55
  ```sh
54
- npm install reactive-md@next
55
- # or pin the preview
56
- npm install reactive-md@0.5.3
56
+ npm install reactive-md
57
+ # or pin the version
58
+ npm install reactive-md@0.6.0
57
59
  ```
58
60
 
59
- Read the [0.5.3 release notes](docs/release-0.5.3-en.md) before using the preview, and the [migration guide](docs/release-0.4.0-en.md) before upgrading from `0.3.1` / `local-draft-1`.
61
+ Read the [0.6.0 release notes](docs/releases/release-0.6.0-en.md) for this release, and the [migration guide](docs/releases/release-0.4.0-en.md) before upgrading from `0.3.1` / `local-draft-1`.
60
62
 
61
- The `reactive-md` entry provides the local compiler, expressions and runtime; `reactive-md/react` provides the React renderer. Import component styles from `reactive-md/styles.css`. The `reactive-md/editor` entry provides the source editor with its own stylesheet at `reactive-md/editor/styles.css`. Existing renderer and style imports are unchanged in 0.5.3.
63
+ The `reactive-md` entry provides the local compiler, expressions and runtime; `reactive-md/react` provides the React renderer. Import component styles from `reactive-md/styles.css`. The `reactive-md/editor` entry provides the source editor with its own stylesheet at `reactive-md/editor/styles.css`. Existing renderer and style imports are unchanged in 0.6.0.
62
64
 
63
65
  The core `reactive-md` entry does not depend on React:
64
66
 
@@ -73,9 +75,9 @@ if (result.ok) {
73
75
  }
74
76
  ```
75
77
 
76
- See [Local mode integration](docs/local-integration-en.md) for the full compile and runtime APIs, host URL policy, lifecycle and style overrides.
78
+ See [Local mode integration](docs/integration/local-integration-en.md) for the full compile and runtime APIs, host URL policy, lifecycle and style overrides.
77
79
 
78
- 0.x minor releases may contain breaking changes. Before upgrading, read the [changelog](CHANGELOG.md) and [compatibility rules](docs/compatibility-en.md), and keep the original `.reactive.md` sources.
80
+ 0.x minor releases may contain breaking changes. Before upgrading, read the [changelog](CHANGELOG.md) and [compatibility rules](docs/compatibility/compatibility-en.md), and keep the original `.reactive.md` sources.
79
81
 
80
82
  ## Use with React
81
83
 
@@ -94,7 +96,7 @@ export function Article({ source }: { source: string }) {
94
96
  }
95
97
  ```
96
98
 
97
- `LocalReactiveDocument` compiles and manages the runtime for you. To control compilation, lifecycle or URL policy yourself, use `LocalDocumentView` as described in [Local mode integration](docs/local-integration-en.md).
99
+ `LocalReactiveDocument` compiles and manages the runtime for you. To control compilation, lifecycle or URL policy yourself, use `LocalDocumentView` as described in [Local mode integration](docs/integration/local-integration-en.md).
98
100
 
99
101
  ## Edit source with React
100
102
 
@@ -111,7 +113,7 @@ export function Editor() {
111
113
  }
112
114
  ```
113
115
 
114
- The editor handles highlighting, formatting and insertion tools, completion, binding tools, undo and redo, and line numbers. It does not compile or render a preview; keep the source in your app and render it with `reactive-md/react`. See [React source editor](docs/editor-en.md) for the props, ref handle, diagnostics, themes, locales and history.
116
+ The editor handles highlighting, formatting and insertion tools, completion, binding tools, undo and redo, and line numbers. It does not compile or render a preview; keep the source in your app and render it with `reactive-md/react`. See [React source editor](docs/integration/editor-en.md) for the props, ref handle, diagnostics, themes, locales and history.
115
117
 
116
118
  ## Share documents
117
119
 
@@ -125,7 +127,7 @@ npx reactive-md build examples/local/counter.reactive.md -o counter-static.html
125
127
 
126
128
  The interactive file embeds the original source, React 19, the runtime, styles and any verified local images. It hydrates a static first screen, so it remains readable with JavaScript disabled. Use `--state-file doc.state.json` to export a saved `reactive-md-state/v1` baseline; without it, the author initial values are used and become the reader's reset baseline. The demo export dialog can save the current preview parameters as such a file.
127
129
 
128
- See [Shareable documents and static export](docs/shareable-export-en.md) for image limits, CSP/security, printing, exit codes, `ReactiveMD.mount`/`mountAll` and `<reactive-md-doc>`.
130
+ See [Shareable documents and static export](docs/integration/shareable-export-en.md) for image limits, CSP/security, printing, exit codes, `ReactiveMD.mount`/`mountAll` and `<reactive-md-doc>`.
129
131
 
130
132
  ## Try the demo
131
133
 
@@ -148,33 +150,34 @@ demo/ Standalone Playground app
148
150
 
149
151
  ## Documentation
150
152
 
151
- - [Beginner guide](docs/local-guide-en.md) and [local interaction syntax specification](docs/local-interaction-syntax-en.md).
152
- - [Local mode integration](docs/local-integration-en.md): core and React API, URL policy, lifecycle, styling and version pinning.
153
- - [Shareable documents and static export](docs/shareable-export-en.md): CLI build/lint, state files, local image inlining, printing and the standalone browser runtime.
153
+ - [Beginner guide](docs/guides/local-guide-en.md) and [local interaction syntax specification](docs/reference/local-interaction-syntax-en.md).
154
+ - [Local mode integration](docs/integration/local-integration-en.md): core and React API, URL policy, lifecycle, styling and version pinning.
155
+ - [Shareable documents and static export](docs/integration/shareable-export-en.md): CLI build/lint, state files, local image inlining, printing and the standalone browser runtime.
154
156
  - [Feature tours and examples](examples/local/README.md) and [standalone integrations](examples/integration/README.md).
155
- - [React source editor](docs/editor-en.md): controlled editor for `.reactive.md` source, with its own stylesheet.
156
- - [Versions and compatibility](docs/compatibility-en.md): 0.x rules, migration, diagnostics and supported platforms.
157
- - [0.5.3 release notes](docs/release-0.5.3-en.md): host integration and authoring patches.
158
- - [0.5.1 release notes](docs/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
159
- - [0.5.0 release notes](docs/release-0.5.0-en.md): the editor entry and document rendering fixes.
160
- - [0.4.0 release and migration](docs/release-0.4.0-en.md): the upgrade checklist for that minor series.
161
- - [Component protocol](docs/component-protocol-en.md) and [component development guide](docs/component-development-en.md): contribution contracts, a proposal template and acceptance cases.
162
- - [Performance measurements](docs/performance-en.md) and [release checklist](docs/releasing-en.md).
157
+ - [React source editor](docs/integration/editor-en.md): controlled editor for `.reactive.md` source, with its own stylesheet.
158
+ - [Versions and compatibility](docs/compatibility/compatibility-en.md): 0.x rules, migration, diagnostics and supported platforms.
159
+ - [0.6.0 release notes](docs/releases/release-0.6.0-en.md): native HTML tables, math and code highlighting, layered diagrams and host fixes.
160
+ - [0.5.3 release notes](docs/releases/release-0.5.3-en.md): host integration and authoring patches.
161
+ - [0.5.1 release notes](docs/releases/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
162
+ - [0.5.0 release notes](docs/releases/release-0.5.0-en.md): the editor entry and document rendering fixes.
163
+ - [0.4.0 release and migration](docs/releases/release-0.4.0-en.md): the upgrade checklist for that minor series.
164
+ - [Component protocol](docs/development/component-protocol-en.md) and [component development guide](docs/development/component-development-en.md): contribution contracts, a proposal template and acceptance cases.
165
+ - [Performance measurements](docs/development/performance-en.md) and [release checklist](docs/development/releasing-en.md).
163
166
 
164
167
  See the [contributing guide](CONTRIBUTING.md) for development and test commands.
165
168
 
166
169
  ## Support and status
167
170
 
168
- - CI targets Node 22.12 and Node 24 with Playwright Chromium; local browser checks use Microsoft Edge. The packed check covers static SSR, and `npm run test:shareable` covers the single-file export's static-first hydration. General SSR hydration outside that path, Firefox and WebKit remain unverified.
171
+ - CI targets Node 22.12 and Node 24 with Playwright Chromium for the full browser gate and Firefox/WebKit for core workflows; local browser checks use Microsoft Edge. The packed check covers static SSR, and `npm run test:shareable` covers the single-file export's static-first hydration. General SSR hydration outside that path and the full Firefox/WebKit interaction suites remain unverified.
169
172
  - 0.x minor releases may contain breaking changes. Persist the original `.reactive.md` source, not the runtime AST or in-memory state.
170
- - `latest` is `0.4.0`; the `0.5.3` preview targets `next`. Security fixes may ship in minor releases.
173
+ - `latest` and `next` are both `0.6.0`. Security fixes may ship in minor releases.
171
174
 
172
175
  ## Contributing and security
173
176
 
174
177
  - [Contributing guide](CONTRIBUTING.md): environment, check commands and change requirements.
175
178
  - [Security policy](SECURITY.md): threat boundary, resource limits, host responsibilities and vulnerability reporting.
176
179
  - [Changelog](CHANGELOG.md).
177
- - [Release checklist](docs/releasing-en.md): the verification gate, notices, tarball and the manual release flow for maintainers.
180
+ - [Release checklist](docs/development/releasing-en.md): the verification gate, notices, tarball and the manual release flow for maintainers.
178
181
 
179
182
  ## License
180
183
 
package/README.md CHANGED
@@ -4,26 +4,28 @@
4
4
 
5
5
  Write local interactive documents in Markdown. Add input controls, name parameters with `bind`, and connect prose, formulas, charts and diagrams with `{{ expressions }}`. Document authors do not write JavaScript or CSS.
6
6
 
7
- Local mode uses HTML-style tags, with parameters and table data written directly in the prose; LaTeX formulas can drive function plots. The TypeScript core and the React renderer can be integrated independently. `0.5.3` is the preview for the `next` channel and adds host integration and authoring patches; `latest` remains `0.4.0`. Syntax revision stays `local-draft-2`, and the component protocol is `component-protocol-2`. See [README-ch.md](README-ch.md) for the Chinese overview.
7
+ Local mode uses HTML-style tags, with parameters and table data written directly in the prose; LaTeX formulas can drive function plots. The TypeScript core and the React renderer can be integrated independently. `0.6.0` is available on both `latest` and `next` and adds native HTML tables, expanded math and code highlighting, layered diagrams and form fixes. Syntax revision stays `local-draft-2`, and the component protocol is `component-protocol-2`. See [README-ch.md](README-ch.md) for the Chinese overview.
8
8
 
9
9
  ## Start here
10
10
 
11
- - [Beginner guide](docs/local-guide-en.md): move from Markdown to interactive documents, with a complete exercise and an error quick reference.
12
- - [Local interaction syntax specification](docs/local-interaction-syntax-en.md) · [Feature tours and examples](examples/local/README.md): 48 tag names, tags, in-place parameters and LaTeX plots.
13
- - [Local mode integration](docs/local-integration-en.md): `compileLocal`, the state runtime, React embedding, URL policy and style scoping.
14
- - [HTML compatibility](docs/html-compatibility-en.md): P0 HTML and the next release's temporary routing policy for author CSS, JavaScript and extended HTML.
15
- - [Shareable documents and static export](docs/shareable-export-en.md): single-file interactive HTML, static output, versioned state files, assets, the CLI and the standalone browser API.
16
- - [Theme protocol](docs/theme-protocol-en.md): document theme selection, custom CSS and light/dark modes.
17
- - [Author tools](docs/author-tools-en.md): source highlighting, completion, binding navigation, rename, formatting and command-line lint.
18
- - [React source editor](docs/editor-en.md): controlled editor, props, ref handle, diagnostics, locale, theme and history.
11
+ - [Documentation index](docs/README.md): guides, references, integration, compatibility, development and releases.
12
+ - [Beginner guide](docs/guides/local-guide-en.md): move from Markdown to interactive documents, with a complete exercise and an error quick reference.
13
+ - [Local interaction syntax specification](docs/reference/local-interaction-syntax-en.md) · [Feature tours and examples](examples/local/README.md): 48 tag names, tags, in-place parameters and LaTeX plots.
14
+ - [Local mode integration](docs/integration/local-integration-en.md): `compileLocal`, the state runtime, React embedding, URL policy and style scoping.
15
+ - [HTML compatibility](docs/reference/html-compatibility-en.md): P0 HTML and the next release's temporary routing policy for author CSS, JavaScript and extended HTML.
16
+ - [Shareable documents and static export](docs/integration/shareable-export-en.md): single-file interactive HTML, static output, versioned state files, assets, the CLI and the standalone browser API.
17
+ - [Theme protocol](docs/reference/theme-protocol-en.md): document theme selection, custom CSS and light/dark modes.
18
+ - [Author tools](docs/integration/author-tools-en.md): source highlighting, completion, binding navigation, rename, formatting and command-line lint.
19
+ - [React source editor](docs/integration/editor-en.md): controlled editor, props, ref handle, diagnostics, locale, theme and history.
19
20
  - [Standalone integration examples](examples/integration/README.md): Node core and React pages you can copy and run outside the repository.
20
- - [Versions and compatibility](docs/compatibility-en.md): 0.x rules, migration, the diagnostics contract and supported platforms.
21
- - [Component protocol](docs/component-protocol-en.md) · [Component development guide](docs/component-development-en.md): declarations, behavior contracts and compatibility acceptance for new components.
22
- - [0.5.3 release notes](docs/release-0.5.3-en.md): host integration and authoring patches.
23
- - [0.5.1 release notes](docs/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
24
- - [0.5.0 release notes](docs/release-0.5.0-en.md): the editor entry and document rendering fixes.
25
- - [0.4.1 release notes](docs/release-0.4.1-en.md): visual and interaction fixes, compatible with 0.4.0.
26
- - [0.4.0 release and migration](docs/release-0.4.0-en.md): what the minor series adds and how to upgrade from `0.3.1` / `local-draft-1`.
21
+ - [Versions and compatibility](docs/compatibility/compatibility-en.md): 0.x rules, migration, the diagnostics contract and supported platforms.
22
+ - [Component protocol](docs/development/component-protocol-en.md) · [Component development guide](docs/development/component-development-en.md): declarations, behavior contracts and compatibility acceptance for new components.
23
+ - [0.6.0 release notes](docs/releases/release-0.6.0-en.md): native HTML tables, math and code highlighting, layered diagrams and host fixes.
24
+ - [0.5.3 release notes](docs/releases/release-0.5.3-en.md): host integration and authoring patches.
25
+ - [0.5.1 release notes](docs/releases/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
26
+ - [0.5.0 release notes](docs/releases/release-0.5.0-en.md): the editor entry and document rendering fixes.
27
+ - [0.4.1 release notes](docs/releases/release-0.4.1-en.md): visual and interaction fixes, compatible with 0.4.0.
28
+ - [0.4.0 release and migration](docs/releases/release-0.4.0-en.md): what the minor series adds and how to upgrade from `0.3.1` / `local-draft-1`.
27
29
 
28
30
  ## Write a document
29
31
 
@@ -38,7 +40,7 @@ Monthly cost: **{{ people * (annual ? 80 : 100) }} USD**.
38
40
 
39
41
  Inputs update the result immediately, and the panel includes a restore-defaults action. A standalone counter is a single line: `<counter label="People">`.
40
42
 
41
- `0.4.0` adds `local-draft-2`, named calculations, validation, collections, themes and offline HTML export. The earlier `0.3.1` release uses `local-draft-1`. See [0.4.0 release and migration](docs/release-0.4.0-en.md).
43
+ `0.4.0` adds `local-draft-2`, named calculations, validation, collections, themes and offline HTML export. The earlier `0.3.1` release uses `local-draft-1`. See [0.4.0 release and migration](docs/releases/release-0.4.0-en.md).
42
44
 
43
45
  ## Install
44
46
 
@@ -48,17 +50,17 @@ Reactive MD requires Node.js 22.12 or newer and ships only ESM entries:
48
50
  npm install reactive-md
49
51
  ```
50
52
 
51
- `latest` resolves to `0.4.0`. The 0.5.3 preview targets `next`:
53
+ `latest` and `next` both resolve to `0.6.0`:
52
54
 
53
55
  ```sh
54
- npm install reactive-md@next
55
- # or pin the preview
56
- npm install reactive-md@0.5.3
56
+ npm install reactive-md
57
+ # or pin the version
58
+ npm install reactive-md@0.6.0
57
59
  ```
58
60
 
59
- Read the [0.5.3 release notes](docs/release-0.5.3-en.md) before using the preview, and the [migration guide](docs/release-0.4.0-en.md) before upgrading from `0.3.1` / `local-draft-1`.
61
+ Read the [0.6.0 release notes](docs/releases/release-0.6.0-en.md) for this release, and the [migration guide](docs/releases/release-0.4.0-en.md) before upgrading from `0.3.1` / `local-draft-1`.
60
62
 
61
- The `reactive-md` entry provides the local compiler, expressions and runtime; `reactive-md/react` provides the React renderer. Import component styles from `reactive-md/styles.css`. The `reactive-md/editor` entry provides the source editor with its own stylesheet at `reactive-md/editor/styles.css`. Existing renderer and style imports are unchanged in 0.5.3.
63
+ The `reactive-md` entry provides the local compiler, expressions and runtime; `reactive-md/react` provides the React renderer. Import component styles from `reactive-md/styles.css`. The `reactive-md/editor` entry provides the source editor with its own stylesheet at `reactive-md/editor/styles.css`. Existing renderer and style imports are unchanged in 0.6.0.
62
64
 
63
65
  The core `reactive-md` entry does not depend on React:
64
66
 
@@ -73,9 +75,9 @@ if (result.ok) {
73
75
  }
74
76
  ```
75
77
 
76
- See [Local mode integration](docs/local-integration-en.md) for the full compile and runtime APIs, host URL policy, lifecycle and style overrides.
78
+ See [Local mode integration](docs/integration/local-integration-en.md) for the full compile and runtime APIs, host URL policy, lifecycle and style overrides.
77
79
 
78
- 0.x minor releases may contain breaking changes. Before upgrading, read the [changelog](CHANGELOG.md) and [compatibility rules](docs/compatibility-en.md), and keep the original `.reactive.md` sources.
80
+ 0.x minor releases may contain breaking changes. Before upgrading, read the [changelog](CHANGELOG.md) and [compatibility rules](docs/compatibility/compatibility-en.md), and keep the original `.reactive.md` sources.
79
81
 
80
82
  ## Use with React
81
83
 
@@ -94,7 +96,7 @@ export function Article({ source }: { source: string }) {
94
96
  }
95
97
  ```
96
98
 
97
- `LocalReactiveDocument` compiles and manages the runtime for you. To control compilation, lifecycle or URL policy yourself, use `LocalDocumentView` as described in [Local mode integration](docs/local-integration-en.md).
99
+ `LocalReactiveDocument` compiles and manages the runtime for you. To control compilation, lifecycle or URL policy yourself, use `LocalDocumentView` as described in [Local mode integration](docs/integration/local-integration-en.md).
98
100
 
99
101
  ## Edit source with React
100
102
 
@@ -111,7 +113,7 @@ export function Editor() {
111
113
  }
112
114
  ```
113
115
 
114
- The editor handles highlighting, formatting and insertion tools, completion, binding tools, undo and redo, and line numbers. It does not compile or render a preview; keep the source in your app and render it with `reactive-md/react`. See [React source editor](docs/editor-en.md) for the props, ref handle, diagnostics, themes, locales and history.
116
+ The editor handles highlighting, formatting and insertion tools, completion, binding tools, undo and redo, and line numbers. It does not compile or render a preview; keep the source in your app and render it with `reactive-md/react`. See [React source editor](docs/integration/editor-en.md) for the props, ref handle, diagnostics, themes, locales and history.
115
117
 
116
118
  ## Share documents
117
119
 
@@ -125,7 +127,7 @@ npx reactive-md build examples/local/counter.reactive.md -o counter-static.html
125
127
 
126
128
  The interactive file embeds the original source, React 19, the runtime, styles and any verified local images. It hydrates a static first screen, so it remains readable with JavaScript disabled. Use `--state-file doc.state.json` to export a saved `reactive-md-state/v1` baseline; without it, the author initial values are used and become the reader's reset baseline. The demo export dialog can save the current preview parameters as such a file.
127
129
 
128
- See [Shareable documents and static export](docs/shareable-export-en.md) for image limits, CSP/security, printing, exit codes, `ReactiveMD.mount`/`mountAll` and `<reactive-md-doc>`.
130
+ See [Shareable documents and static export](docs/integration/shareable-export-en.md) for image limits, CSP/security, printing, exit codes, `ReactiveMD.mount`/`mountAll` and `<reactive-md-doc>`.
129
131
 
130
132
  ## Try the demo
131
133
 
@@ -148,33 +150,34 @@ demo/ Standalone Playground app
148
150
 
149
151
  ## Documentation
150
152
 
151
- - [Beginner guide](docs/local-guide-en.md) and [local interaction syntax specification](docs/local-interaction-syntax-en.md).
152
- - [Local mode integration](docs/local-integration-en.md): core and React API, URL policy, lifecycle, styling and version pinning.
153
- - [Shareable documents and static export](docs/shareable-export-en.md): CLI build/lint, state files, local image inlining, printing and the standalone browser runtime.
153
+ - [Beginner guide](docs/guides/local-guide-en.md) and [local interaction syntax specification](docs/reference/local-interaction-syntax-en.md).
154
+ - [Local mode integration](docs/integration/local-integration-en.md): core and React API, URL policy, lifecycle, styling and version pinning.
155
+ - [Shareable documents and static export](docs/integration/shareable-export-en.md): CLI build/lint, state files, local image inlining, printing and the standalone browser runtime.
154
156
  - [Feature tours and examples](examples/local/README.md) and [standalone integrations](examples/integration/README.md).
155
- - [React source editor](docs/editor-en.md): controlled editor for `.reactive.md` source, with its own stylesheet.
156
- - [Versions and compatibility](docs/compatibility-en.md): 0.x rules, migration, diagnostics and supported platforms.
157
- - [0.5.3 release notes](docs/release-0.5.3-en.md): host integration and authoring patches.
158
- - [0.5.1 release notes](docs/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
159
- - [0.5.0 release notes](docs/release-0.5.0-en.md): the editor entry and document rendering fixes.
160
- - [0.4.0 release and migration](docs/release-0.4.0-en.md): the upgrade checklist for that minor series.
161
- - [Component protocol](docs/component-protocol-en.md) and [component development guide](docs/component-development-en.md): contribution contracts, a proposal template and acceptance cases.
162
- - [Performance measurements](docs/performance-en.md) and [release checklist](docs/releasing-en.md).
157
+ - [React source editor](docs/integration/editor-en.md): controlled editor for `.reactive.md` source, with its own stylesheet.
158
+ - [Versions and compatibility](docs/compatibility/compatibility-en.md): 0.x rules, migration, diagnostics and supported platforms.
159
+ - [0.6.0 release notes](docs/releases/release-0.6.0-en.md): native HTML tables, math and code highlighting, layered diagrams and host fixes.
160
+ - [0.5.3 release notes](docs/releases/release-0.5.3-en.md): host integration and authoring patches.
161
+ - [0.5.1 release notes](docs/releases/release-0.5.1-en.md): editor views and themes, plus HTML compatibility.
162
+ - [0.5.0 release notes](docs/releases/release-0.5.0-en.md): the editor entry and document rendering fixes.
163
+ - [0.4.0 release and migration](docs/releases/release-0.4.0-en.md): the upgrade checklist for that minor series.
164
+ - [Component protocol](docs/development/component-protocol-en.md) and [component development guide](docs/development/component-development-en.md): contribution contracts, a proposal template and acceptance cases.
165
+ - [Performance measurements](docs/development/performance-en.md) and [release checklist](docs/development/releasing-en.md).
163
166
 
164
167
  See the [contributing guide](CONTRIBUTING.md) for development and test commands.
165
168
 
166
169
  ## Support and status
167
170
 
168
- - CI targets Node 22.12 and Node 24 with Playwright Chromium; local browser checks use Microsoft Edge. The packed check covers static SSR, and `npm run test:shareable` covers the single-file export's static-first hydration. General SSR hydration outside that path, Firefox and WebKit remain unverified.
171
+ - CI targets Node 22.12 and Node 24 with Playwright Chromium for the full browser gate and Firefox/WebKit for core workflows; local browser checks use Microsoft Edge. The packed check covers static SSR, and `npm run test:shareable` covers the single-file export's static-first hydration. General SSR hydration outside that path and the full Firefox/WebKit interaction suites remain unverified.
169
172
  - 0.x minor releases may contain breaking changes. Persist the original `.reactive.md` source, not the runtime AST or in-memory state.
170
- - `latest` is `0.4.0`; the `0.5.3` preview targets `next`. Security fixes may ship in minor releases.
173
+ - `latest` and `next` are both `0.6.0`. Security fixes may ship in minor releases.
171
174
 
172
175
  ## Contributing and security
173
176
 
174
177
  - [Contributing guide](CONTRIBUTING.md): environment, check commands and change requirements.
175
178
  - [Security policy](SECURITY.md): threat boundary, resource limits, host responsibilities and vulnerability reporting.
176
179
  - [Changelog](CHANGELOG.md).
177
- - [Release checklist](docs/releasing-en.md): the verification gate, notices, tarball and the manual release flow for maintainers.
180
+ - [Release checklist](docs/development/releasing-en.md): the verification gate, notices, tarball and the manual release flow for maintainers.
178
181
 
179
182
  ## License
180
183
 
package/SECURITY-ch.md CHANGED
@@ -12,7 +12,7 @@ Reactive MD 渲染作者编写的本地交互文档。文档是不可信输入
12
12
 
13
13
  ### 文档内容
14
14
 
15
- - 三个 HTML 能力开关全部关闭时,作者脚本、事件属性和 CSS 保持惰性。P0 HTML 重建为受控节点和 React 元素。见 [HTML 部分兼容与暂时性分流政策](docs/html-compatibility-ch.md)。
15
+ - 三个 HTML 能力开关全部关闭时,作者脚本、事件属性和 CSS 保持惰性。P0 HTML 重建为受控节点和 React 元素。见 [HTML 部分兼容与暂时性分流政策](docs/reference/html-compatibility-ch.md)。
16
16
  - 开启 `enableCss`、`enableJavaScript` 或 `enableExtendedHtml` 中任意一个,整篇源码会在不带 `allow-same-origin` 的沙箱 iframe 中按原生 HTML 处理。其他开关继续约束作者源码;允许任意 JavaScript 后,脚本可以动态创建元素和样式,源码开关不构成运行时 DOM 权限。网络、表单和导航继续受 CSP 与沙箱限制。
17
17
  - 默认 React 渲染器不调用 `dangerouslySetInnerHTML`,也不把文档内容写入 `innerHTML`。原生 HTML 通过解析和过滤后的 iframe `srcdoc` 渲染,与宿主 DOM 分离。
18
18
  - 表达式使用自己的解析器和 AST 求值器,不使用 `eval`、`new Function`,不支持赋值、方法调用、属性访问、原型路径或导入。表达式只能读取文档声明的参数和内置函数。
package/SECURITY.md CHANGED
@@ -12,7 +12,7 @@ The guarantees below are covered by compiler, runtime and renderer tests; capabi
12
12
 
13
13
  ### Document content
14
14
 
15
- - With the three HTML capability options off, author scripts, event attributes and CSS remain inert. P0 HTML is rebuilt as typed nodes and React elements. See [HTML compatibility and the temporary routing policy](docs/html-compatibility-en.md).
15
+ - With the three HTML capability options off, author scripts, event attributes and CSS remain inert. P0 HTML is rebuilt as typed nodes and React elements. See [HTML compatibility and the temporary routing policy](docs/reference/html-compatibility-en.md).
16
16
  - Enabling `enableCss`, `enableJavaScript` or `enableExtendedHtml` routes the entire source to native HTML inside a sandboxed iframe without `allow-same-origin`. The other flags still constrain author source. Arbitrary enabled JavaScript can create DOM elements and styles dynamically; individual source flags are not runtime DOM permissions. CSP and sandbox restrictions continue to govern network access, forms and navigation.
17
17
  - The default React renderer does not call `dangerouslySetInnerHTML` or write document content into `innerHTML`. Native HTML uses a parsed and filtered iframe `srcdoc`, separate from the host DOM.
18
18
  - Expressions use their own parser and AST evaluator, with no `eval` or `new Function`, and no support for assignment, method calls, property access, prototype paths or imports. Expressions can only read parameters declared by the document and built-in functions.