reactive-md 0.9.3 → 0.10.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 +34 -0
- package/CHANGELOG.md +34 -0
- package/README-ch.md +7 -7
- package/README-en.md +7 -7
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +0 -57
- package/cli/help.mjs +6 -4
- package/cli/init.mjs +1 -1
- package/cli/migrate.mjs +1 -1
- package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
- package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
- package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
- package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
- package/dist-library/authoring-Bwu_zCWs.js +768 -0
- package/dist-library/choice-values-BItGjPD2.js +58 -0
- package/dist-library/compile-B35rfzKr.js +1742 -0
- package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
- package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
- package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
- package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
- package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
- package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
- package/dist-library/conditional-branches-CIhJXasR.js +17 -0
- package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
- package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
- package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
- package/dist-library/data-table-CSAkm1eU.js +290 -0
- package/dist-library/data-table-model-DruztQFt.js +391 -0
- package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
- package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
- package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
- package/dist-library/default-options-By16CVw1.js +131 -0
- package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
- package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
- package/dist-library/display-Bb6hAG5T.js +2065 -0
- package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
- package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
- package/dist-library/font-aliases-CKYjwn4o.js +4 -0
- package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
- package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
- package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
- package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
- package/dist-library/layout-CPQggKxk.js +592 -0
- package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
- package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
- package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
- package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
- package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
- package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
- package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
- package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
- package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
- package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
- package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
- package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
- package/dist-library/reactive-md-authoring.js +277 -269
- package/dist-library/reactive-md-build.js +327 -33
- package/dist-library/reactive-md-compiler-session.js +3 -3
- package/dist-library/reactive-md-compiler-standard.js +10 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +4 -4
- package/dist-library/reactive-md-default-packs.js +4 -3
- package/dist-library/reactive-md-default-preset.js +3 -3
- package/dist-library/reactive-md-export.js +6 -6
- package/dist-library/reactive-md-minimal-preset.js +3 -2
- package/dist-library/reactive-md-minimal-react-preset.js +18 -17
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +2 -2
- package/dist-library/reactive-md-pack-style-manifest.js +8 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -9
- package/dist-library/reactive-md-plugin-data.js +4 -4
- package/dist-library/reactive-md-plugin-diagram.js +3 -3
- package/dist-library/reactive-md-plugin-forms.js +5 -5
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +10 -10
- package/dist-library/reactive-md-plugin-network.js +5 -5
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-react-component-accordion.js +3 -3
- package/dist-library/reactive-md-react-component-alert.js +3 -3
- package/dist-library/reactive-md-react-component-anchor.js +3 -3
- package/dist-library/reactive-md-react-component-badge.js +3 -3
- package/dist-library/reactive-md-react-component-card.js +3 -3
- package/dist-library/reactive-md-react-component-chart.js +2 -2
- package/dist-library/reactive-md-react-component-checkbox.js +2 -2
- package/dist-library/reactive-md-react-component-checklist.js +2 -2
- package/dist-library/reactive-md-react-component-choices.js +2 -2
- package/dist-library/reactive-md-react-component-column.js +1 -1
- package/dist-library/reactive-md-react-component-coordinate.js +2 -2
- package/dist-library/reactive-md-react-component-counter.js +2 -2
- package/dist-library/reactive-md-react-component-data-table.js +2 -2
- package/dist-library/reactive-md-react-component-date.js +2 -2
- package/dist-library/reactive-md-react-component-diagram.js +2 -2
- package/dist-library/reactive-md-react-component-disclosure.js +3 -3
- package/dist-library/reactive-md-react-component-edge.js +1 -1
- package/dist-library/reactive-md-react-component-else.js +10 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
- package/dist-library/reactive-md-react-component-gallery.js +2 -2
- package/dist-library/reactive-md-react-component-grid.js +3 -3
- package/dist-library/reactive-md-react-component-if.js +3 -3
- package/dist-library/reactive-md-react-component-input.js +2 -2
- package/dist-library/reactive-md-react-component-jump.js +3 -3
- package/dist-library/reactive-md-react-component-multi-select.js +2 -2
- package/dist-library/reactive-md-react-component-node.js +2 -2
- package/dist-library/reactive-md-react-component-number.js +2 -2
- package/dist-library/reactive-md-react-component-option.js +1 -1
- package/dist-library/reactive-md-react-component-panel.js +3 -3
- package/dist-library/reactive-md-react-component-plot.js +2 -2
- package/dist-library/reactive-md-react-component-progress.js +2 -2
- package/dist-library/reactive-md-react-component-quiz.js +2 -2
- package/dist-library/reactive-md-react-component-radio-group.js +2 -2
- package/dist-library/reactive-md-react-component-range-slider.js +2 -2
- package/dist-library/reactive-md-react-component-section.js +3 -3
- package/dist-library/reactive-md-react-component-select.js +2 -2
- package/dist-library/reactive-md-react-component-slider.js +2 -2
- package/dist-library/reactive-md-react-component-step.js +3 -3
- package/dist-library/reactive-md-react-component-steps.js +3 -3
- package/dist-library/reactive-md-react-component-tab.js +3 -3
- package/dist-library/reactive-md-react-component-table.js +2 -2
- package/dist-library/reactive-md-react-component-tabs.js +3 -3
- package/dist-library/reactive-md-react-component-text.js +3 -3
- package/dist-library/reactive-md-react-component-textarea.js +2 -2
- package/dist-library/reactive-md-react-component-timeline.js +2 -2
- package/dist-library/reactive-md-react-component-timer.js +2 -2
- package/dist-library/reactive-md-react-component-toggle.js +2 -2
- package/dist-library/reactive-md-react-component-tooltip.js +3 -3
- package/dist-library/reactive-md-react-component-validation.js +3 -3
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +4 -4
- package/dist-library/reactive-md-react-pack-data.js +3 -3
- package/dist-library/reactive-md-react-pack-layout.js +25 -24
- package/dist-library/reactive-md-react-pack-visuals.js +2 -2
- package/dist-library/reactive-md-react-packed.js +6 -6
- package/dist-library/reactive-md-react-server.js +37 -36
- package/dist-library/reactive-md-react-static-server.js +2 -2
- package/dist-library/reactive-md-react-static.js +1 -1
- package/dist-library/reactive-md-react-unstyled.js +12 -12
- package/dist-library/reactive-md-react.js +12 -12
- package/dist-library/reactive-md-scan.js +1 -1
- package/dist-library/reactive-md-sdk.js +23 -9
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +6 -6
- package/dist-library/reactive-md-vite.js +25 -9
- package/dist-library/reactive-md-worker-pool.js +3 -3
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +52 -43
- package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
- package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
- package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
- package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
- package/dist-library/rmd-pack-layout.css +9 -0
- package/dist-library/rmd-pack-resource-layout.css +9 -0
- package/dist-library/runtime-BHeuLOv_.js +1369 -0
- package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
- package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
- package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
- package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
- package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
- package/dist-library/shareable-CHCDnl6j.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +3 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
- package/dist-library/types/components/chart/default-chart.d.ts +7 -0
- package/dist-library/types/components/entries/else.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +5 -0
- package/dist-library/types/components/shared/visuals.d.ts +1 -1
- package/dist-library/types/components/table/data-table-model.d.ts +95 -2
- package/dist-library/types/components/table/data-table.d.ts +2 -2
- package/dist-library/types/contracts/component-kernel.d.ts +5 -0
- package/dist-library/types/contracts/font-aliases.d.ts +18 -0
- package/dist-library/types/contracts/number-literal.d.ts +2 -0
- package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
- package/dist-library/types/export/index.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
- package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
- package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
- package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
- package/dist-library/types/local/evaluation/computations.d.ts +13 -5
- package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
- package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
- package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
- package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
- package/dist-library/types/local/evaluation/validation.d.ts +8 -6
- package/dist-library/types/local/index.d.ts +4 -3
- package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
- package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
- package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
- package/dist-library/types/local/runtime/runtime.d.ts +3 -1
- package/dist-library/types/local/runtime/state.d.ts +30 -15
- package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
- package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
- package/dist-library/types/local/source/authoring.d.ts +10 -0
- package/dist-library/types/local/source/source-migration.d.ts +1 -0
- package/dist-library/types/local/types.d.ts +33 -2
- package/dist-library/types/react/component-api.d.ts +21 -2
- package/dist-library/types/react/component-utils.d.ts +11 -0
- package/dist-library/types/react/font-aliases.d.ts +2 -0
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
- package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
- package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +3 -1
- package/dist-library/types/sdk/assembly.d.ts +3 -0
- package/dist-library/types/sdk/font.d.ts +13 -0
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/theme.d.ts +5 -0
- package/dist-library/types/sdk/types.d.ts +6 -0
- package/dist-library/types/sdk/version.d.ts +1 -1
- package/dist-library/types/shareable.d.ts +15 -3
- package/dist-library/types/standalone/prepare.d.ts +4 -2
- package/dist-library/types/standalone/session-core.d.ts +4 -1
- package/dist-library/types/vite/index.d.ts +3 -0
- package/dist-library/types/vite/registration.d.ts +1 -0
- package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
- package/dist-library/types-FYhRWRn9.js +3 -0
- package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
- package/dist-library/validation-DRuW0Wl9.js +433 -0
- package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
- package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
- package/dist-library/visuals-7xzoL9ql.js +49340 -0
- package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +128 -368
- package/docs/README-ch.md +3 -1
- package/docs/README.md +3 -1
- package/docs/compatibility/api-stability-ch.md +1 -1
- package/docs/compatibility/api-stability-en.md +1 -1
- package/docs/compatibility/compatibility-ch.md +15 -15
- package/docs/compatibility/compatibility-en.md +15 -15
- package/docs/compatibility/compatibility-manifest.schema.json +3 -2
- package/docs/compatibility/deprecation-ch.md +2 -2
- package/docs/compatibility/deprecation-en.md +2 -2
- package/docs/compatibility/source-versioning-ch.md +22 -14
- package/docs/compatibility/source-versioning-en.md +22 -13
- package/docs/compatibility/support-matrix-ch.md +4 -3
- package/docs/compatibility/support-matrix-en.md +4 -3
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-protocol-ch.md +18 -18
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/guides/local-guide-ch.md +109 -20
- package/docs/guides/local-guide-en.md +109 -20
- package/docs/integration/author-tools-ch.md +1 -1
- package/docs/integration/author-tools-en.md +1 -1
- package/docs/integration/editor-ch.md +3 -3
- package/docs/integration/editor-en.md +3 -3
- package/docs/integration/extension-sdk-ch.md +29 -3
- package/docs/integration/extension-sdk-en.md +29 -3
- package/docs/integration/local-integration-ch.md +3 -3
- package/docs/integration/local-integration-en.md +3 -3
- package/docs/integration/pdf-export-ch.md +42 -0
- package/docs/integration/pdf-export-en.md +42 -0
- package/docs/integration/shareable-export-ch.md +11 -19
- package/docs/integration/shareable-export-en.md +11 -19
- package/docs/reference/diagnostics-counting-ch.md +24 -1
- package/docs/reference/diagnostics-counting-en.md +24 -1
- package/docs/reference/local-interaction-syntax-ch.md +222 -33
- package/docs/reference/local-interaction-syntax-en.md +220 -31
- package/docs/reference/public-api-ch.md +24 -18
- package/docs/reference/public-api-en.md +24 -18
- package/docs/reference/theme-protocol-ch.md +1 -1
- package/docs/reference/theme-protocol-en.md +1 -1
- package/docs/releases/release-0.10.0-ch.md +45 -0
- package/docs/releases/release-0.10.0-en.md +45 -0
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/conformance/local-draft-4.json +441 -0
- package/examples/integration/README-ch.md +3 -3
- package/examples/integration/README.md +3 -3
- package/examples/integration/chat-session/package.json +1 -1
- package/examples/local/README-ch.md +1 -1
- package/examples/local/README.md +1 -1
- package/package.json +6 -1
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
- package/dist-library/authoring-B14SsOXZ.js +0 -893
- package/dist-library/compile-D50B5_Ww.js +0 -1249
- package/dist-library/computations-CffoW7Ff.js +0 -340
- package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
- package/dist-library/default-options-DU5dxuU6.js +0 -125
- package/dist-library/layout-BfUzzO2b.js +0 -553
- package/dist-library/runtime-CuJndKqK.js +0 -1289
- package/dist-library/shareable-C6mUerpQ.js +0 -817
- package/dist-library/types-daDo2c_w.js +0 -3
- package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
- package/dist-library/visuals-CoVSjVD8.js +0 -49159
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
| 包 | 版本 | 职责 |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| `reactive-md` | `0.
|
|
12
|
-
| `reactive-md-editor` | `0.
|
|
11
|
+
| `reactive-md` | `0.10.0` | 编译器、运行时、作者服务、SDK、React 与 SSR 渲染、导出、构建适配 |
|
|
12
|
+
| `reactive-md-editor` | `0.3.0` | CodeMirror 6 源码编辑器、工具栏、编辑器侧导航 |
|
|
13
13
|
| `reactive-md-demo` | 私有 | 站点、示例与部署,不提供对外接口 |
|
|
14
14
|
|
|
15
15
|
引擎只提供 ESM 入口,Node 侧要求 Node.js 22.12 或更新版本。React 19 与 Vite 8 都是可选 peer,各自只服务一部分入口。
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
| `reactive-md/worker-pool` | ESM | 否 | 否 | 通过有界 Worker 队列编译多份文档 |
|
|
27
27
|
| `reactive-md/react` | ESM | 是 | 否 | React 文档渲染器与组件开发接口 |
|
|
28
28
|
| `reactive-md/react/unstyled` | ESM | 是 | 否 | 同一渲染器,但不产生样式表副作用 |
|
|
29
|
-
| `reactive-md/react/minimal` | ESM | 是 | 否 | 基于
|
|
29
|
+
| `reactive-md/react/minimal` | ESM | 是 | 否 | 基于 19 个组件精简预设的渲染器 |
|
|
30
30
|
| `reactive-md/react/packed` | ESM | 是 | 否 | 组合和渲染宿主选定的 React 预设 |
|
|
31
31
|
| `reactive-md/react/static` | ESM | 是 | 否 | 渲染编译器判定可静态输出的文档,无需运行时或编译会话 |
|
|
32
32
|
| `reactive-md/react/static/server` | ESM | 是 | 是 | 将同一静态视图渲染为可水合的服务端标记 |
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
| `reactive-md/react/runtime` | ESM | 是 | 否 | 面向组件的 React hooks:计时、帧、滑动、按键、状态 |
|
|
35
35
|
| `reactive-md/sdk` | ESM | 否 | 否 | 组件、预设与主题清单定义及校验 |
|
|
36
36
|
| `reactive-md/contracts` | ESM | 否 | 否 | 纯跨阶段类型与辅助函数:资源上限、组件内核、schema、颜色与 HTML 名称 |
|
|
37
|
-
| `reactive-md/presets/default` | ESM | 否 | 否 |
|
|
37
|
+
| `reactive-md/presets/default` | ESM | 否 | 否 | 49 个组件的默认预设(纯数据) |
|
|
38
38
|
| `reactive-md/presets/default/packs` | ESM | 否 | 否 | 默认预设的四个命名子集 |
|
|
39
39
|
| `reactive-md/presets/default/packs/react/<pack>` | ESM | 是 | 否 | `controls`、`layout`、`data` 或 `visuals` 的 React 实现与 CSS 资源 |
|
|
40
|
-
| `reactive-md/presets/minimal` | ESM | 否 | 否 |
|
|
40
|
+
| `reactive-md/presets/minimal` | ESM | 否 | 否 | 19 个组件的精简预设 |
|
|
41
41
|
| `reactive-md/presets/minimal/react` | ESM | 是 | 否 | 精简预设的 React 实现 |
|
|
42
42
|
| `reactive-md/plugins/*` | ESM | 是 | 否 | 八个可选官方组件包 |
|
|
43
43
|
| `reactive-md/authoring` | ESM | 否 | 否 | 分析、补全、重命名、格式化、目录、工具栏命令 |
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
| `reactive-md/runtime` | ESM | 否 | 否 | 文档标识、种子、随机、调度、组件状态注册表、网络通道 |
|
|
55
55
|
| `reactive-md/runtime/browser` | ESM | 否 | 否 | `localStorage` 持久化、页面隐藏刷写、HTTP/SSE、WebSocket、WebRTC 适配 |
|
|
56
56
|
| `reactive-md/observability` | ESM | 否 | 否 | 观察编译、Worker 和渲染事件,生成诊断与性能报告 |
|
|
57
|
-
| `reactive-md/pdf` | ESM | 否 | 是 |
|
|
57
|
+
| `reactive-md/pdf` | ESM | 否 | 是 | 预览:将准备好的静态 HTML 渲染为 PDF 字节 |
|
|
58
58
|
| `reactive-md/styles.css` | CSS | — | — | 文档、组件与主题样式 |
|
|
59
59
|
| `reactive-md/styles/minimal.css` | CSS | — | — | 精简预设所需样式 |
|
|
60
60
|
| `reactive-md/screen.css` | CSS | — | — | `styles.css` 的别名 |
|
|
@@ -113,13 +113,15 @@
|
|
|
113
113
|
| 后台编译 | `LocalCompileScheduler`、`startLocalCompileWorker`、`LOCAL_COMPILE_DELAY_MS`、`LOCAL_COMPILE_PREPARATION_DELAY_MS`、`compileFailureDiagnostic`、`localWorkerOptionsKey`、`LocalCompileOutcome`、`LocalCompileRequest`、`LocalCompileResponse` |
|
|
114
114
|
| 结果补丁 | `LOCAL_RESULT_PATCH_PROTOCOL`、`diffSourceEdit`、`applySourceEdit`、`encodeLocalResultPatch`、`applyLocalResultPatch` |
|
|
115
115
|
| 主题 | `LOCAL_THEME_PROTOCOL`、`DEFAULT_LOCAL_THEME`、`resolveLocalTheme`、`isLocalThemeName` |
|
|
116
|
-
| HTML 信封 | `createShareableHtml`、`resolveLocalStateBaseline`、`SHAREABLE_HTML_FORMAT`、`SHAREABLE_HTML_FORMAT_V2`、`serializeForScript` |
|
|
116
|
+
| HTML 信封 | `createShareableHtml`、`resolveLocalStateBaseline`、`SHAREABLE_HTML_FORMAT`、`SHAREABLE_HTML_FORMAT_V2`、`serializeForScript`、`escapeInlineScript` |
|
|
117
117
|
| 组件状态 | `localSourceDigest` 及 `./export/component-state` 一族 |
|
|
118
118
|
|
|
119
119
|
宿主在内存中编译、运行并持久化文档时用这个入口。`compileLocal()` 是一次性完整编译器;`createLocalCompileSession()` 在连续编辑中复用未变动的 Markdown 块;`createLocalRuntime()` 持有参数、订阅与销毁。运行时本身不写存储、Cookie 或网络。
|
|
120
120
|
|
|
121
121
|
`LocalCompileOptions.sourcePhase` 把快照标记为 `streaming` 或 `final`;会话接受 `compile(source, options?, phase?)` 和 `compileShared(source, options?, phase?)`,`LocalCompileScheduler.schedule(source, options?, hint?, phase?)` 使用同一阶段,`final` 跳过防抖。显式阶段结果增加 `status`(`partial`、`valid`、`recovered`、`failed`),流式结果还可带 `transientDiagnostics`;暂态诊断不会出现在 `diagnostics` 中。Worker 的完整请求与响应在声明了阶段时回显 `sourcePhase`(请求字段或 options 对象均可);未声明阶段的旧客户端省略该字段。`LocalCompileOutcome.sourcePhase` 报告该阶段,修订号保持单调递增,流式结果永不建立补丁基线。一次性 `compileLocal` 与编译器入口仍只做最终编译。
|
|
122
122
|
|
|
123
|
+
宏文档可用 `captureLocalMacroState(runtime)` 保存私有控件值。有编译文档与快照时,可调用 `createLocalMacroStateFile(document, snapshot.state)`。这两种方式都生成 `reactive-md-macro-state/v1` 文件。调用 `applyLocalState(runtime, state, { macroState })` 可在同一事务中恢复普通参数与宏私有状态。恢复要求源码的 UTF-16LE SHA-256 摘要、编译配置和全部宏私有绑定匹配。
|
|
124
|
+
|
|
123
125
|
### `reactive-md/compiler`
|
|
124
126
|
|
|
125
127
|
单次编译器,不安装任何组件预设。保留 CommonMark、ReactiveMD 结构、表达式、绑定、语义检查与资源预算。它不创建会话、Worker、定时器或缓存,也不加载 React、CSS、主题实现或预设。
|
|
@@ -198,7 +200,7 @@ React 接口完全相同,但不导入 `styles.css`。宿主自行注入样式
|
|
|
198
200
|
|
|
199
201
|
### `reactive-md/react/minimal`
|
|
200
202
|
|
|
201
|
-
同样两个组件与辅助函数,但基于
|
|
203
|
+
同样两个组件与辅助函数,但基于 19 个组件的精简预设。这里的 `createReactHost()` 与 `createReactConfig()` 搭配 `reactive-md/presets/minimal` 和 `reactive-md/styles/minimal.css`。
|
|
202
204
|
|
|
203
205
|
### `reactive-md/react/server`
|
|
204
206
|
|
|
@@ -260,10 +262,10 @@ SDK、语言核心与组件包共用的纯跨阶段类型和辅助函数。该
|
|
|
260
262
|
|
|
261
263
|
| 入口 | 内容 |
|
|
262
264
|
| --- | --- |
|
|
263
|
-
| `reactive-md/presets/default` | `defaultPreset`,id `reactive-md/default`,
|
|
264
|
-
| `reactive-md/presets/default/packs` | `controlsPack`(19)、`layoutPack`(
|
|
265
|
-
| `reactive-md/presets/minimal` | `minimalPreset`,id `reactive-md/minimal`,
|
|
266
|
-
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`:上述
|
|
265
|
+
| `reactive-md/presets/default` | `defaultPreset`,id `reactive-md/default`,49 个组件:`input`、`textarea`、`number`、`slider`、`range-slider`、`coordinate`、`toggle`、`checkbox`、`date`、`select`、`choices`、`radio-group`、`multi-select`、`option`、`counter`、`timer`、`checklist`、`progress`、`jump`、`anchor`、`text`、`section`、`quiz`、`panel`、`card`、`grid`、`gallery`、`gallery-item`、`tabs`、`tab`、`steps`、`step`、`accordion`、`disclosure`、`if`、`else`、`alert`、`badge`、`tooltip`、`validation`、`data-table`、`column`、`table`、`chart`、`plot`、`timeline`、`diagram`、`node`、`edge` |
|
|
266
|
+
| `reactive-md/presets/default/packs` | `controlsPack`(19)、`layoutPack`(21)、`dataPack`(4)、`visualsPack`(5) |
|
|
267
|
+
| `reactive-md/presets/minimal` | `minimalPreset`,id `reactive-md/minimal`,19 个组件:`input`、`textarea`、`number`、`slider`、`toggle`、`date`、`select`、`option`、`jump`、`anchor`、`text`、`section`、`panel`、`card`、`grid`、`if`、`else`、`alert`、`badge` |
|
|
268
|
+
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`:上述 19 个组件的 React 实现 |
|
|
267
269
|
|
|
268
270
|
packs 是普通预设,可为 packed React 宿主选择一个或多个。`visualsPack` 声明依赖 `dataPack`;使用 visuals pack 时需一并传入。`column` 是 data-table 的子组件,因此归属于 `dataPack`;`layoutPack` 与 `dataPack` 可在 packed 或普通 React 宿主中组合。同名组件的契约或实现冲突时,宿主仍会报配置错误。
|
|
269
271
|
|
|
@@ -277,7 +279,7 @@ packs 是普通预设,可为 packed React 宿主选择一个或多个。`visua
|
|
|
277
279
|
| `reactive-md/plugins/network` | `reactive-md/network` | `submit-button` | 无,可与任意基座共用 |
|
|
278
280
|
| `reactive-md/plugins/navigation` | `reactive-md/navigation` | `tabs`、`tab`、`steps`、`step`、`accordion`、`disclosure`、`tooltip`、`validation` | 未声明 |
|
|
279
281
|
| `reactive-md/plugins/data` | `reactive-md/data` | `data-table`、`column`、`table`、`timeline` | 未声明 |
|
|
280
|
-
| `reactive-md/plugins/chart` | `reactive-md/chart` | `chart` | 未声明 |
|
|
282
|
+
| `reactive-md/plugins/chart` | `reactive-md/chart` | `chart`、`column` | 未声明 |
|
|
281
283
|
| `reactive-md/plugins/plot` | `reactive-md/plot` | `coordinate`、`plot` | 未声明 |
|
|
282
284
|
| `reactive-md/plugins/diagram` | `reactive-md/diagram` | `diagram`、`node`、`edge` | 未声明 |
|
|
283
285
|
| `reactive-md/plugins/gallery` | `reactive-md/gallery` | `gallery`、`gallery-item` | 未声明 |
|
|
@@ -315,6 +317,7 @@ packs 是普通预设,可为 packed React 宿主选择一个或多个。`visua
|
|
|
315
317
|
| `createLocalBundleManifest`、`createLocalRestorationRequirements`、`validateLocalRestorationRequirements`、`localThemeContractDigest`、`localExportContentDigest` | bundle 与恢复元数据 |
|
|
316
318
|
| `resolveLocalComponentStateExport` | 在嵌入之前按文档校验组件状态 sidecar |
|
|
317
319
|
| `readLocalExportResources` | 校验并规范化宿主样式资源 |
|
|
320
|
+
| `escapeInlineScript` | 为内联 `<script>` 转义 JavaScript 源码,不改变字符串、模板或正则中的值 |
|
|
318
321
|
| `prepareLocalPrintHtml`、`waitForLocalPrintImages` | 为打印准备静态 HTML |
|
|
319
322
|
| `validateLocalComponentContracts`、`validateLocalExtensionRequirements` | 与 CLI 共用的契约检查 |
|
|
320
323
|
|
|
@@ -336,7 +339,7 @@ packs 是普通预设,可为 packed React 宿主选择一个或多个。`visua
|
|
|
336
339
|
|
|
337
340
|
### `reactive-md/build`
|
|
338
341
|
|
|
339
|
-
Node
|
|
342
|
+
Node 适配器,只读取宿主显式指定的模块,第三方代码始终是宿主自身的依赖。入口模块同时会打进浏览器 bundle,因此 Node 内置模块导入会以 `local.build.host-browser` 拒绝。
|
|
340
343
|
|
|
341
344
|
| 导出 | 用途 |
|
|
342
345
|
| --- | --- |
|
|
@@ -366,7 +369,7 @@ Node 适配器,只读取宿主显式指定的模块,第三方代码始终是
|
|
|
366
369
|
|
|
367
370
|
### `reactive-md/pdf`
|
|
368
371
|
|
|
369
|
-
`renderLocalPdf(html, options)` 返回 PDF 字节。选项覆盖纸张、方向、页边距、背景打印与严格模式。CLI 按需加载该入口,只有输出 PDF 时才需要 Playwright 与 Chromium。
|
|
372
|
+
**预览。** `renderLocalPdf(html, options)` 返回 PDF 字节。选项覆盖纸张、方向、页边距、背景打印与严格模式。CLI 按需加载该入口,只有输出 PDF 时才需要 Playwright 与 Chromium。[PDF 导出](../integration/pdf-export-ch.md)介绍 CLI 参数、Node API 与当前的预览范围。
|
|
370
373
|
|
|
371
374
|
## 浏览器运行时
|
|
372
375
|
|
|
@@ -381,6 +384,8 @@ Node 适配器,只读取宿主显式指定的模块,第三方代码始终是
|
|
|
381
384
|
|
|
382
385
|
该入口不自动挂载,也不隐式注册组件,适合自建页面的宿主。
|
|
383
386
|
|
|
387
|
+
交互 HTML 可通过 `macroState` 携带私有状态。导出时,用同一组普通参数和宏状态渲染首屏。独立挂载在首屏前恢复该状态,`handle.getMacroState()` 可读取新快照。普通 SSR 和静态 HTML 使用宏的作者初值。
|
|
388
|
+
|
|
384
389
|
### `reactive-md/standalone/host`
|
|
385
390
|
|
|
386
391
|
同样的挂载函数,但绑定宿主 bundle 里固定的 React 配置。不带编译器面,也不自动挂载。
|
|
@@ -490,10 +495,11 @@ IIFE 产物,暴露全局 `ReactiveMD`,加载时对 `application/reactive-md+
|
|
|
490
495
|
|
|
491
496
|
| 常量 | 值 | 作用范围 |
|
|
492
497
|
| --- | --- | --- |
|
|
493
|
-
| 包版本 | `0.
|
|
498
|
+
| 包版本 | `0.10.0` | 引擎发布 |
|
|
494
499
|
| SDK 契约 | `0.7.0`(`LOCAL_SDK_VERSION`) | 组件、预设与配置清单 |
|
|
495
|
-
| 语法修订 | `local-draft-
|
|
500
|
+
| 语法修订 | `local-draft-4`(`LOCAL_SYNTAX_VERSION`) | 文档源码 |
|
|
496
501
|
| 状态文件 | `reactive-md-state/v1`(`LOCAL_STATE_FORMAT`) | 导出的参数 |
|
|
502
|
+
| 宏状态 | `reactive-md-macro-state/v1`(`LOCAL_MACRO_STATE_FORMAT`) | 对应确切源码和编译配置的私有控件值 |
|
|
497
503
|
| 组件状态 | `reactive-md-component-state/v1` | 组件状态 sidecar |
|
|
498
504
|
| HTML 信封 | `reactive-md-html/v1`、`reactive-md-html/v2` | 单文件导出 |
|
|
499
505
|
| bundle 清单 | `reactive-md-bundle/v1` | 封印的独立 bundle |
|
|
@@ -503,7 +509,7 @@ IIFE 产物,暴露全局 `ReactiveMD`,加载时对 `application/reactive-md+
|
|
|
503
509
|
| 诊断报告 | `reactive-md-diagnostic/v1` | 诊断报告的格式版本 |
|
|
504
510
|
| 组件协议 | `reactive-md-component/v1`、`component-protocol-3` | 组件贡献 |
|
|
505
511
|
| 主题协议 | `reactive-md-theme-1` | 文档主题 |
|
|
506
|
-
| 编辑器包 | `0.
|
|
512
|
+
| 编辑器包 | `0.3.0` | 编辑器发布,peer `reactive-md: ^0.10.0` |
|
|
507
513
|
|
|
508
514
|
每个常量独立演进:一次包发布可以引入新的 HTML 信封而不动语法修订,新的主题协议也不会改变 SDK 契约。
|
|
509
515
|
|
|
@@ -8,8 +8,8 @@ Three packages exist. Each has its own version and release workflow.
|
|
|
8
8
|
|
|
9
9
|
| Package | Version | Responsibility |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| `reactive-md` | `0.
|
|
12
|
-
| `reactive-md-editor` | `0.
|
|
11
|
+
| `reactive-md` | `0.10.0` | Compiler, runtime, authoring services, SDK, React and SSR rendering, export, build adapters |
|
|
12
|
+
| `reactive-md-editor` | `0.3.0` | CodeMirror 6 source editor, toolbar, editor-side navigation |
|
|
13
13
|
| `reactive-md-demo` | private | Website, examples and deployment. No public API |
|
|
14
14
|
|
|
15
15
|
The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. React 19 and Vite 8 are optional peers, each used by a subset of the entries.
|
|
@@ -26,7 +26,7 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
26
26
|
| `reactive-md/worker-pool` | ESM | No | No | Compile multiple documents with a bounded Worker queue |
|
|
27
27
|
| `reactive-md/react` | ESM | Yes | No | React document renderer and component development API |
|
|
28
28
|
| `reactive-md/react/unstyled` | ESM | Yes | No | The same renderer without the stylesheet side effect |
|
|
29
|
-
| `reactive-md/react/minimal` | ESM | Yes | No | Renderer built on the
|
|
29
|
+
| `reactive-md/react/minimal` | ESM | Yes | No | Renderer built on the 19-component minimal preset |
|
|
30
30
|
| `reactive-md/react/packed` | ESM | Yes | No | Compose and render explicitly selected React presets |
|
|
31
31
|
| `reactive-md/react/static` | ESM | Yes | No | Render a compiler-proven static document without a runtime or compile session |
|
|
32
32
|
| `reactive-md/react/static/server` | ESM | Yes | Yes | Render the same static view to hydratable server markup |
|
|
@@ -34,10 +34,10 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
34
34
|
| `reactive-md/react/runtime` | ESM | Yes | No | Component-facing React hooks: timers, frames, swipe, keys, state |
|
|
35
35
|
| `reactive-md/sdk` | ESM | No | No | Component, preset and theme manifests with validation |
|
|
36
36
|
| `reactive-md/contracts` | ESM | No | No | Pure cross-stage types and helpers: limits, component kernel, schema, colors and HTML names |
|
|
37
|
-
| `reactive-md/presets/default` | ESM | No | No | The
|
|
37
|
+
| `reactive-md/presets/default` | ESM | No | No | The 49-component default preset as plain data |
|
|
38
38
|
| `reactive-md/presets/default/packs` | ESM | No | No | Four named subsets of the default preset |
|
|
39
39
|
| `reactive-md/presets/default/packs/react/<pack>` | ESM | Yes | No | React implementation and CSS resources for `controls`, `layout`, `data` or `visuals` |
|
|
40
|
-
| `reactive-md/presets/minimal` | ESM | No | No | The
|
|
40
|
+
| `reactive-md/presets/minimal` | ESM | No | No | The 19-component minimal preset |
|
|
41
41
|
| `reactive-md/presets/minimal/react` | ESM | Yes | No | React implementations for the minimal preset |
|
|
42
42
|
| `reactive-md/plugins/*` | ESM | Yes | No | Eight optional official component packages |
|
|
43
43
|
| `reactive-md/authoring` | ESM | No | No | Analysis, completion, rename, formatting, catalog, toolbar commands |
|
|
@@ -54,7 +54,7 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
54
54
|
| `reactive-md/runtime` | ESM | No | No | Document identity, seeds, random, scheduler, component-state registry, network channels |
|
|
55
55
|
| `reactive-md/runtime/browser` | ESM | No | No | `localStorage` persistence, page-hide flush, HTTP/SSE, WebSocket, WebRTC adapters |
|
|
56
56
|
| `reactive-md/observability` | ESM | No | No | Observe compilation, Workers and rendering, and produce diagnostic and performance reports |
|
|
57
|
-
| `reactive-md/pdf` | ESM | No | Yes |
|
|
57
|
+
| `reactive-md/pdf` | ESM | No | Yes | Preview: render prepared static HTML to PDF bytes through Playwright |
|
|
58
58
|
| `reactive-md/styles.css` | CSS | — | — | Document, component and theme styles |
|
|
59
59
|
| `reactive-md/styles/minimal.css` | CSS | — | — | Styles for the minimal preset |
|
|
60
60
|
| `reactive-md/screen.css` | CSS | — | — | Alias of `styles.css` |
|
|
@@ -113,13 +113,15 @@ The full core surface. No React, no stylesheet, no DOM.
|
|
|
113
113
|
| Background compile | `LocalCompileScheduler`, `startLocalCompileWorker`, `LOCAL_COMPILE_DELAY_MS`, `LOCAL_COMPILE_PREPARATION_DELAY_MS`, `compileFailureDiagnostic`, `localWorkerOptionsKey`, `LocalCompileOutcome`, `LocalCompileRequest`, `LocalCompileResponse` |
|
|
114
114
|
| Result patches | `LOCAL_RESULT_PATCH_PROTOCOL`, `diffSourceEdit`, `applySourceEdit`, `encodeLocalResultPatch`, `applyLocalResultPatch` |
|
|
115
115
|
| Themes | `LOCAL_THEME_PROTOCOL`, `DEFAULT_LOCAL_THEME`, `resolveLocalTheme`, `isLocalThemeName` |
|
|
116
|
-
| HTML envelope | `createShareableHtml`, `resolveLocalStateBaseline`, `SHAREABLE_HTML_FORMAT`, `SHAREABLE_HTML_FORMAT_V2`, `serializeForScript` |
|
|
116
|
+
| HTML envelope | `createShareableHtml`, `resolveLocalStateBaseline`, `SHAREABLE_HTML_FORMAT`, `SHAREABLE_HTML_FORMAT_V2`, `serializeForScript`, `escapeInlineScript` |
|
|
117
117
|
| Component state | `LOCAL_STATE_FORMAT`, `localSourceDigest`, plus the `./export/component-state` surface |
|
|
118
118
|
|
|
119
119
|
Use this entry when a host compiles, runs and persists documents in memory. `compileLocal()` is the one-shot full compiler; `createLocalCompileSession()` reuses unchanged Markdown blocks across edits; `createLocalRuntime()` owns parameters, subscriptions and disposal. The runtime writes no storage, cookies or network on its own.
|
|
120
120
|
|
|
121
121
|
`LocalCompileOptions.sourcePhase` marks a snapshot as `streaming` or `final`; sessions accept `compile(source, options?, phase?)` and `compileShared(source, options?, phase?)`, and `LocalCompileScheduler.schedule(source, options?, hint?, phase?)` takes the same phase, with `final` bypassing the debounce. Explicit phases add `status` (`partial`, `valid`, `recovered`, `failed`), and streaming results may add `transientDiagnostics`; transient diagnostics never appear in `diagnostics`. Worker full requests and responses echo `sourcePhase` when a phase was declared (on the request or the options object); phase-less legacy jobs omit it. `LocalCompileOutcome.sourcePhase` reports it, revisions stay monotonic, and streaming results never become patch baselines. One-shot `compileLocal` and the compiler entries remain final-only.
|
|
122
122
|
|
|
123
|
+
Use `captureLocalMacroState(runtime)` to save a macro document's private controls, or pass a compiled document and snapshot to `createLocalMacroStateFile(document, snapshot.state)`. Both produce a `reactive-md-macro-state/v1` file. Call `applyLocalState(runtime, state, { macroState })` to restore public parameters and private controls in one transaction. Restoration requires the exact UTF-16LE source digest, compilation configuration, and complete private binding set.
|
|
124
|
+
|
|
123
125
|
### `reactive-md/compiler`
|
|
124
126
|
|
|
125
127
|
A single-pass compiler with no component preset. It keeps CommonMark, ReactiveMD structure, expressions, bindings, semantic checks and budgets. It creates no session, Worker, timer or cache, and loads no React, CSS, theme implementation or preset.
|
|
@@ -198,7 +200,7 @@ The identical React surface without importing `styles.css`. Hosts that inject th
|
|
|
198
200
|
|
|
199
201
|
### `reactive-md/react/minimal`
|
|
200
202
|
|
|
201
|
-
The same two components and helpers, built on the
|
|
203
|
+
The same two components and helpers, built on the 19-component minimal preset. `createReactHost()` and `createReactConfig()` here pair with `reactive-md/presets/minimal` and `reactive-md/styles/minimal.css`.
|
|
202
204
|
|
|
203
205
|
### `reactive-md/react/server`
|
|
204
206
|
|
|
@@ -260,10 +262,10 @@ The pure cross-stage types and helpers shared by the SDK, the language core and
|
|
|
260
262
|
|
|
261
263
|
| Entry | Contents |
|
|
262
264
|
| --- | --- |
|
|
263
|
-
| `reactive-md/presets/default` | `defaultPreset`, id `reactive-md/default`,
|
|
264
|
-
| `reactive-md/presets/default/packs` | `controlsPack` (19), `layoutPack` (
|
|
265
|
-
| `reactive-md/presets/minimal` | `minimalPreset`, id `reactive-md/minimal`,
|
|
266
|
-
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`: React implementations for those
|
|
265
|
+
| `reactive-md/presets/default` | `defaultPreset`, id `reactive-md/default`, 49 components: `input`, `textarea`, `number`, `slider`, `range-slider`, `coordinate`, `toggle`, `checkbox`, `date`, `select`, `choices`, `radio-group`, `multi-select`, `option`, `counter`, `timer`, `checklist`, `progress`, `jump`, `anchor`, `text`, `section`, `quiz`, `panel`, `card`, `grid`, `gallery`, `gallery-item`, `tabs`, `tab`, `steps`, `step`, `accordion`, `disclosure`, `if`, `else`, `alert`, `badge`, `tooltip`, `validation`, `data-table`, `column`, `table`, `chart`, `plot`, `timeline`, `diagram`, `node`, `edge` |
|
|
266
|
+
| `reactive-md/presets/default/packs` | `controlsPack` (19), `layoutPack` (21), `dataPack` (4), `visualsPack` (5) |
|
|
267
|
+
| `reactive-md/presets/minimal` | `minimalPreset`, id `reactive-md/minimal`, 19 components: `input`, `textarea`, `number`, `slider`, `toggle`, `date`, `select`, `option`, `jump`, `anchor`, `text`, `section`, `panel`, `card`, `grid`, `if`, `else`, `alert`, `badge` |
|
|
268
|
+
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`: React implementations for those 19 components |
|
|
267
269
|
|
|
268
270
|
Packs are ordinary presets. Select one or more packs for a packed React host. `visualsPack` declares a dependency on `dataPack`; pass both when using the visuals pack. `column` belongs to `dataPack` because it is a data-table child, so `layoutPack` and `dataPack` can be combined in packed and common React hosts. Hosts still reject duplicate entries with conflicting contracts or implementations.
|
|
269
271
|
|
|
@@ -277,7 +279,7 @@ Each `reactive-md/plugins/<name>` entry exports a React preset package as its de
|
|
|
277
279
|
| `reactive-md/plugins/network` | `reactive-md/network` | `submit-button` | none; works with every base |
|
|
278
280
|
| `reactive-md/plugins/navigation` | `reactive-md/navigation` | `tabs`, `tab`, `steps`, `step`, `accordion`, `disclosure`, `tooltip`, `validation` | none declared |
|
|
279
281
|
| `reactive-md/plugins/data` | `reactive-md/data` | `data-table`, `column`, `table`, `timeline` | none declared |
|
|
280
|
-
| `reactive-md/plugins/chart` | `reactive-md/chart` | `chart` | none declared |
|
|
282
|
+
| `reactive-md/plugins/chart` | `reactive-md/chart` | `chart`, `column` | none declared |
|
|
281
283
|
| `reactive-md/plugins/plot` | `reactive-md/plot` | `coordinate`, `plot` | none declared |
|
|
282
284
|
| `reactive-md/plugins/diagram` | `reactive-md/diagram` | `diagram`, `node`, `edge` | none declared |
|
|
283
285
|
| `reactive-md/plugins/gallery` | `reactive-md/gallery` | `gallery`, `gallery-item` | none declared |
|
|
@@ -315,6 +317,7 @@ Pass the same `LocalCompileOptions` used for rendering, so diagnostics, host com
|
|
|
315
317
|
| `createLocalBundleManifest`, `createLocalRestorationRequirements`, `validateLocalRestorationRequirements`, `localThemeContractDigest`, `localExportContentDigest` | Bundle and restoration metadata |
|
|
316
318
|
| `resolveLocalComponentStateExport` | Validate a component-state sidecar against the document before embedding |
|
|
317
319
|
| `readLocalExportResources` | Validate and normalize host style resources |
|
|
320
|
+
| `escapeInlineScript` | Escape JavaScript source for an inline `<script>` element without changing string, template or regular expression values |
|
|
318
321
|
| `prepareLocalPrintHtml`, `waitForLocalPrintImages` | Prepare static HTML for printing |
|
|
319
322
|
| `validateLocalComponentContracts`, `validateLocalExtensionRequirements` | Contract checks shared with the CLI |
|
|
320
323
|
|
|
@@ -336,7 +339,7 @@ Read assets through this entry. Tarball layout and file names change between rel
|
|
|
336
339
|
|
|
337
340
|
### `reactive-md/build`
|
|
338
341
|
|
|
339
|
-
Node adapter that reads only modules the host names explicitly, so third-party code stays a host dependency.
|
|
342
|
+
Node adapter that reads only modules the host names explicitly, so third-party code stays a host dependency. Because the host entry is also bundled for the browser, Node built-in imports are rejected with `local.build.host-browser`.
|
|
340
343
|
|
|
341
344
|
| Export | Purpose |
|
|
342
345
|
| --- | --- |
|
|
@@ -366,7 +369,7 @@ Directory and manual options are mutually exclusive. `loadLocalDirectoryHost` ex
|
|
|
366
369
|
|
|
367
370
|
### `reactive-md/pdf`
|
|
368
371
|
|
|
369
|
-
`renderLocalPdf(html, options)` returns PDF bytes. Options cover paper format, orientation, margins, background printing and a strict mode. The CLI loads this entry on demand, so Playwright and Chromium are only required for PDF output.
|
|
372
|
+
**Preview.** `renderLocalPdf(html, options)` returns PDF bytes. Options cover paper format, orientation, margins, background printing and a strict mode. The CLI loads this entry on demand, so Playwright and Chromium are only required for PDF output. [PDF export](../integration/pdf-export-en.md) documents the CLI flags, the Node API and the current preview scope.
|
|
370
373
|
|
|
371
374
|
## Browser runtime
|
|
372
375
|
|
|
@@ -381,6 +384,8 @@ Directory and manual options are mutually exclusive. `loadLocalDirectoryHost` ex
|
|
|
381
384
|
|
|
382
385
|
This entry performs no automatic mount and registers no implicit components. A host that builds its own page uses it.
|
|
383
386
|
|
|
387
|
+
Interactive HTML accepts a `macroState` sidecar. Render the initial markup with the same public and private values used in the payload. The standalone runtime restores those values before its first render. Read a fresh sidecar with `handle.getMacroState()`. Ordinary SSR and static HTML use author defaults for private macro values.
|
|
388
|
+
|
|
384
389
|
### `reactive-md/standalone/host`
|
|
385
390
|
|
|
386
391
|
The same mounting functions bound to a fixed React configuration from the host bundle. No compiler surface and no auto-mount.
|
|
@@ -490,10 +495,11 @@ The DOM-free toolbar commands, re-exported from `reactive-md/authoring`, with th
|
|
|
490
495
|
|
|
491
496
|
| Constant | Value | Scope |
|
|
492
497
|
| --- | --- | --- |
|
|
493
|
-
| Package version | `0.
|
|
498
|
+
| Package version | `0.10.0` | Engine releases |
|
|
494
499
|
| SDK contract | `0.7.0` (`LOCAL_SDK_VERSION`) | Component, preset and configuration manifests |
|
|
495
|
-
| Syntax revision | `local-draft-
|
|
500
|
+
| Syntax revision | `local-draft-4` (`LOCAL_SYNTAX_VERSION`) | Document source |
|
|
496
501
|
| State file | `reactive-md-state/v1` (`LOCAL_STATE_FORMAT`) | Exported parameters |
|
|
502
|
+
| Macro state | `reactive-md-macro-state/v1` (`LOCAL_MACRO_STATE_FORMAT`) | Private controls for the exact source and compilation configuration |
|
|
497
503
|
| Component state | `reactive-md-component-state/v1` | Component-state sidecar |
|
|
498
504
|
| HTML envelope | `reactive-md-html/v1`, `reactive-md-html/v2` | Single-file export |
|
|
499
505
|
| Bundle manifest | `reactive-md-bundle/v1` | Sealed standalone bundle |
|
|
@@ -503,7 +509,7 @@ The DOM-free toolbar commands, re-exported from `reactive-md/authoring`, with th
|
|
|
503
509
|
| Diagnostic report | `reactive-md-diagnostic/v1` | Diagnostic report format version |
|
|
504
510
|
| Component protocol | `reactive-md-component/v1`, `component-protocol-3` | Component contribution |
|
|
505
511
|
| Theme protocol | `reactive-md-theme-1` | Document themes |
|
|
506
|
-
| Editor package | `0.
|
|
512
|
+
| Editor package | `0.3.0` | Editor releases, peer `reactive-md: ^0.10.0` |
|
|
507
513
|
|
|
508
514
|
Each constant is versioned independently: a package release can ship a new HTML envelope without moving the syntax revision, and a new theme protocol does not change the SDK contract.
|
|
509
515
|
|
|
@@ -104,7 +104,7 @@ export function Article({ source }: { source: string }) {
|
|
|
104
104
|
| 状态 | `--info`、`--info-soft`、`--success`、`--success-soft`、`--success-line`、`--warning`、`--warning-soft`、`--warning-line`、`--danger`、`--danger-soft`、`--danger-line`、`--neutral-soft` |
|
|
105
105
|
| 焦点 | `--focus`、`--focus-outline`、`--focus-ring` |
|
|
106
106
|
| 数据与代码 | `--chart-1` 至 `--chart-8`、`--chart-grid`、`--chart-axis`、`--code-bg`、`--code-bg-deep`、`--code-ink` |
|
|
107
|
-
| 字体 | `--font-sans`、`--font-mono`、`--text-xs` 至 `--text-xl`、`--text-2xl`、`--text-h5`、`--text-h6`、`--text-block-title`、`--text-block-subtitle` |
|
|
107
|
+
| 字体 | `--font-sans`、`--font-serif`、`--font-mono`、`--text-xs` 至 `--text-xl`、`--text-2xl`、`--text-h5`、`--text-h6`、`--text-block-title`、`--text-block-subtitle` |
|
|
108
108
|
| 行高与字重 | `--leading-tight`、`--leading-snug`、`--leading-normal`、`--leading-relaxed`、`--weight-regular`、`--weight-medium`、`--weight-semibold`、`--weight-bold` |
|
|
109
109
|
| 间距 | `--space-1` 至 `--space-7`、`--field-gap` |
|
|
110
110
|
| 圆角 | `--radius-control`、`--radius-card`、`--radius-panel`、`--radius-pill`、`--radius-field`、`--radius-field-multiline` |
|
|
@@ -121,7 +121,7 @@ internal DOM nesting remain component implementation details.
|
|
|
121
121
|
| Status | `--info`, `--info-soft`, `--success`, `--success-soft`, `--success-line`, `--warning`, `--warning-soft`, `--warning-line`, `--danger`, `--danger-soft`, `--danger-line`, `--neutral-soft` |
|
|
122
122
|
| Focus | `--focus`, `--focus-outline`, `--focus-ring` |
|
|
123
123
|
| Data and code | `--chart-1` through `--chart-8`, `--chart-grid`, `--chart-axis`, `--code-bg`, `--code-bg-deep`, `--code-ink` |
|
|
124
|
-
| Fonts | `--font-sans`, `--font-mono`, `--text-xs` through `--text-xl`, `--text-2xl`, `--text-h5`, `--text-h6`, `--text-block-title`, `--text-block-subtitle` |
|
|
124
|
+
| Fonts | `--font-sans`, `--font-serif`, `--font-mono`, `--text-xs` through `--text-xl`, `--text-2xl`, `--text-h5`, `--text-h6`, `--text-block-title`, `--text-block-subtitle` |
|
|
125
125
|
| Line height and weight | `--leading-tight`, `--leading-snug`, `--leading-normal`, `--leading-relaxed`, `--weight-regular`, `--weight-medium`, `--weight-semibold`, `--weight-bold` |
|
|
126
126
|
| Spacing | `--space-1` through `--space-7`, `--field-gap` |
|
|
127
127
|
| Radius | `--radius-control`, `--radius-card`, `--radius-panel`, `--radius-pill`, `--radius-field`, `--radius-field-multiline` |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ReactiveMD 0.10.0
|
|
2
|
+
|
|
3
|
+
**中文** · [English](release-0.10.0-en.md)
|
|
4
|
+
|
|
5
|
+
从 npm 安装 `reactive-md@0.10.0`:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.10.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
0.10.0 功能版本发布说明(2026-12-01)。
|
|
12
|
+
|
|
13
|
+
## 重点
|
|
14
|
+
|
|
15
|
+
### local-draft-4 与迁移
|
|
16
|
+
|
|
17
|
+
引擎现在接受 `local-draft-4` 源码。原生 Markdown 数据集、`<else>` 分支、新的表达式辅助函数与数组变换都属于这一修订。声明 `local-draft-3` 的源码必须先运行 `reactive-md migrate`,该引擎才接受;迁移会在源码位置报告每个新激活的 `<else>` 与 `<dataset>` 标签。draft-4 的辅助函数与变换名称仍可作为绑定和声明名使用,名称后接 `(` 表示调用形式。
|
|
18
|
+
|
|
19
|
+
### 条件 else 分支
|
|
20
|
+
|
|
21
|
+
同一容器内的 `<else>` 与 `<if>` 成对。它必须直接跟在 `<if>` 之后;注释和空行可以隔开,一个 `<if>` 最多配一个 `<else>`。交互与静态输出都会渲染两个分支,分支对保持共享绑定与状态一致。
|
|
22
|
+
|
|
23
|
+
### 表达式辅助函数与有界变换
|
|
24
|
+
|
|
25
|
+
`??` 只在左侧为 null 时返回右侧,因此 `0`、`false` 与空字符串会直接通过。新增辅助函数覆盖数字与字符串转换、集合(`join`、`range`、`split`)、日期(`dateAdd`、`formatDate`)与空文本(`ifBlank`);`round` 接受可选小数位。`filter`、`map` 与 `sortBy` 派生数组,表达式内可使用 `item` 与 `index`。每个表达式受以下限制:数组 10,000 项,条件、投影或键求值 50,000 次,嵌套三层变换,字符串数组预算 100,000 个 UTF-16 单元。
|
|
26
|
+
|
|
27
|
+
### 生成数据视图与动态选项
|
|
28
|
+
|
|
29
|
+
`chart` 通过 `rows` 从数组读取 `<column>` 子节点,与 `data-table` 生成行的方式一致。生成单元格与图表读数使用列的 `format`、`digits`、`currency` 和 `locale`;静态 Markdown 表格单元格与图表坐标轴保持纯文本显示。`data-table` 新增 `searchable`、`sortable`、`page-size`、`bind` 与 `initial`。选择控件接受 `options="{{ expression }}"` 传入字符串数组;数组替代 `<option>` 子节点,同时提供值与标签。
|
|
30
|
+
|
|
31
|
+
### data-table 汇总与对齐
|
|
32
|
+
|
|
33
|
+
数值列接受 `summary="sum"` 或 `summary="average"`,表尾按列格式显示。`align` 设置表格或列对齐,`row-align` 用 `item` 与 `index` 为每个正文行选择对齐,静态 `empty` 替换默认空表提示。
|
|
34
|
+
|
|
35
|
+
### 交互宏
|
|
36
|
+
|
|
37
|
+
文档声明 `<!-- reactive-md: local-draft-4 + macros -->`,用 `<macro name="…" params="…" outputs="…">` 定义可复用的控件组。`<use macro="…">` 调用可以出现在定义之前。参数接受静态文本或一个完整表达式,输出通过 `bind-<output>` 映射到调用方绑定,嵌套调用在父作用域读取参数。每个实例拥有自己的绑定;Panel 重置恢复该子树。上限为 50 个宏、每个宏 20 个参数与 20 个输出、200 个实例和八层嵌套。
|
|
38
|
+
|
|
39
|
+
### 行内排版与作用域字体
|
|
40
|
+
|
|
41
|
+
`<text>` 接受主题档位或像素的 `size`,以及主题令牌或已注册别名的 `font`。宿主用 `defineLocalFont` 与 `createReactHost({ fonts })` 注册别名;主题通过 `defineLocalTheme` 或 `theme.json` 添加别名,目录加载器会内联相对字体文件。同名时主题别名优先于宿主别名。
|
|
42
|
+
|
|
43
|
+
## 兼容性
|
|
44
|
+
|
|
45
|
+
本版本发布 `local-draft-4`,属于破坏性语法变更。请迁移 draft-3 源码,并在迁移后重新导出状态文件,以更新源码摘要;状态协议仍为 `reactive-md-state/v1`。SDK 契约 `0.7.0`、`component-protocol-3` 与 `reactive-md-theme-1` 不变。本版本与 `reactive-md-editor@0.3.0` 配对,该版本声明 `reactive-md@^0.10.0`,请一起发布。`reactive-md-editor@0.2.1` 的 `^0.9.2` peer 不接受 `0.10.0`,仍留在 `0.9.x` 引擎系列。PDF 导出仍为预览功能,版式、分页与打印诊断可能调整。Demo 候选按其仓库流程更新。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ReactiveMD 0.10.0
|
|
2
|
+
|
|
3
|
+
**English** · [中文](release-0.10.0-ch.md)
|
|
4
|
+
|
|
5
|
+
Install `reactive-md@0.10.0` from npm:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.10.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Release notes for the 0.10.0 feature release (2026-12-01).
|
|
12
|
+
|
|
13
|
+
## Highlights
|
|
14
|
+
|
|
15
|
+
### Local-draft-4 and migration
|
|
16
|
+
|
|
17
|
+
The engine now accepts `local-draft-4` sources. Native Markdown datasets, `<else>` branches, the new expression helpers and the array transforms belong to this revision. Sources that declare `local-draft-3` must migrate with `reactive-md migrate` before this engine accepts them; the migration reports each newly active `<else>` and `<dataset>` tag at its source position. Draft-4 helper and transform names remain valid binding and declaration names, and a name followed by `(` selects the call form.
|
|
18
|
+
|
|
19
|
+
### Conditional else branches
|
|
20
|
+
|
|
21
|
+
A sibling `<else>` pairs with an `<if>` in the same container. It must directly follow the `<if>`; comments and blank lines may separate them, and an `<if>` accepts at most one `<else>`. Interactive and static output render both branches, and a branch pair keeps shared bindings and state consistent.
|
|
22
|
+
|
|
23
|
+
### Expression helpers and bounded transforms
|
|
24
|
+
|
|
25
|
+
`??` returns its right side only when the left side is null, so `0`, `false` and the empty string pass through. New helpers cover number and string conversion, collection (`join`, `range`, `split`), dates (`dateAdd`, `formatDate`) and blank text (`ifBlank`); `round` accepts an optional digit count. `filter`, `map` and `sortBy` derive arrays with `item` and `index` in their expressions. Each expression is bounded at 10,000 elements, 50,000 condition, projection or key evaluations, three nested transform levels and a 100,000 UTF-16-unit string budget.
|
|
26
|
+
|
|
27
|
+
### Generated data views and dynamic choices
|
|
28
|
+
|
|
29
|
+
`chart` reads `<column>` children from an array through `rows`, the same way `data-table` generates rows. Generated cells and chart readouts honor column `format`, `digits`, `currency` and `locale`; static Markdown table cells and chart axes keep their plain display. `data-table` adds `searchable`, `sortable`, `page-size`, `bind` and `initial`. Selectors accept `options="{{ expression }}"` for a string array; the array replaces `<option>` children and supplies both values and labels.
|
|
30
|
+
|
|
31
|
+
### Data-table summaries and alignment
|
|
32
|
+
|
|
33
|
+
Numeric columns accept `summary="sum"` or `summary="average"` and format the footer with the column format. `align` sets table or column alignment, `row-align` chooses alignment per body row from `item` and `index`, and a static `empty` replaces the default empty-table message.
|
|
34
|
+
|
|
35
|
+
### Interaction macros
|
|
36
|
+
|
|
37
|
+
Documents declare `<!-- reactive-md: local-draft-4 + macros -->` and define reusable control groups with `<macro name="…" params="…" outputs="…">`. `<use macro="…">` calls may appear before the definition. Parameters accept static text or one complete expression, outputs map to caller bindings with `bind-<output>`, and nested calls read their arguments in the parent scope. Each instance owns its bindings; Panel Reset restores that subtree. Limits cover 50 macros, 20 parameters and outputs per macro, 200 instances and eight nesting levels.
|
|
38
|
+
|
|
39
|
+
### Inline typography and scoped fonts
|
|
40
|
+
|
|
41
|
+
`<text>` accepts `size` in theme steps or pixels and `font` from the theme tokens or a registered alias. Hosts register aliases with `defineLocalFont` and `createReactHost({ fonts })`; themes add aliases through `defineLocalTheme` or `theme.json`, and the directory loader inlines relative font files. A same-name theme alias takes precedence over a host alias.
|
|
42
|
+
|
|
43
|
+
## Compatibility
|
|
44
|
+
|
|
45
|
+
This release publishes `local-draft-4` and is a breaking syntax change. Migrate draft-3 sources and re-export state files after migration so the source digest is current; the state protocol remains `reactive-md-state/v1`. The SDK contract `0.7.0`, `component-protocol-3` and `reactive-md-theme-1` are unchanged. This release pairs with `reactive-md-editor@0.3.0`, which declares `reactive-md@^0.10.0`; publish the two together. `reactive-md-editor@0.2.1` stays on the `0.9.x` engine series, since its `^0.9.2` peer does not accept `0.10.0`. PDF export remains a preview feature; layout, pagination and print diagnostics may change. The Demo candidate follows its own repository workflow.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](README.md)
|
|
4
4
|
|
|
5
|
-
[local-draft-
|
|
5
|
+
[local-draft-4.json](local-draft-4.json) 是当前可复制的最小语义一致性套件,包含源文档、编译结果、初始参数、状态写入和期望文本。该数据随 npm 包分发,便于其他工具或实现读取同一份 JSON。`local-draft-1.json`、`local-draft-2.json` 与 `local-draft-3.json` 继续作为旧修订的保留 fixture。
|
|
6
6
|
|
|
7
7
|
- `syntaxVersion` 与核心导出的 `LOCAL_SYNTAX_VERSION` 一致。
|
|
8
8
|
- `ok` 是期望的编译结果;`codes` 是去重后的期望诊断码集合,省略时表示不期望产生诊断。成功编译仍可能包含降级警告。
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
- `actions` 按 `bind` 查找控件并提交 `value`;存在 `codes` 时表示期望该写入被拒绝,否则期望写入成功。
|
|
11
11
|
- `text` 使用更新后的状态求值,结果应等于 `expectedText`。
|
|
12
12
|
|
|
13
|
-
运行器位于仓库的 `tests/conformance.test.ts`;运行 `npm test`
|
|
13
|
+
运行器位于仓库的 `tests/conformance.test.ts`;运行 `npm test` 即可检查。该套件覆盖共享参数、隐藏初始化、写入约束、代码隔离、诊断、多槽控件、多选、生成表格选择、一次计算值聚合重算,以及类型转换、集合、舍入和日期表达式函数、生成数据与动态选项。它不覆盖校验提示、生成表格渲染、HTML 导出、作者工具或浏览器行为;这些有专门的测试和发布门禁。完整的语法一致性还包括其他语言测试和浏览器检查,规则见[语法规范](../../docs/reference/local-interaction-syntax-ch.md)。诊断码的跨版本保证见[兼容性说明](../../docs/compatibility/compatibility-ch.md)。
|
|
14
14
|
|
|
15
|
-
一致性源文件不带版本号,使用当前的 `local-draft-
|
|
15
|
+
一致性源文件不带版本号,使用当前的 `local-draft-4` 修订。可选的序言版本声明属于编译元数据,不会改变这些语义用例。版本拒绝与迁移行为有专门的测试和历史 fixture。见[源码修订与迁移](../../docs/compatibility/source-versioning-ch.md)。
|
|
16
16
|
|
|
17
17
|
## 组块协议一致性
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](README-ch.md)
|
|
4
4
|
|
|
5
|
-
[local-draft-
|
|
5
|
+
[local-draft-4.json](local-draft-4.json) is the current copyable minimal semantic conformance suite containing source documents, compilation results, initial parameters, state writes and expected text. The data is distributed with the npm package so other tools or implementations can read the same JSON. `local-draft-1.json`, `local-draft-2.json` and `local-draft-3.json` remain retained fixtures for earlier revisions.
|
|
6
6
|
|
|
7
7
|
- `syntaxVersion` matches the core export `LOCAL_SYNTAX_VERSION`.
|
|
8
8
|
- `ok` is the expected compilation result; `codes` is the deduplicated set of expected diagnostic codes, and when omitted no diagnostics are expected. A successful compile can still contain degradation warnings.
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
- `actions` finds controls by `bind` and submits `value`; when `codes` is present the write is expected to be rejected, otherwise it is expected to succeed.
|
|
11
11
|
- `text` is evaluated with the updated state and the result should equal `expectedText`.
|
|
12
12
|
|
|
13
|
-
The runner lives at `tests/conformance.test.ts` in the repository; run `npm test` to check it. This suite covers shared parameters, hidden initialization, write constraints, code isolation, diagnostics, multi-slot controls, multiple selection, generated-table selection
|
|
13
|
+
The runner lives at `tests/conformance.test.ts` in the repository; run `npm test` to check it. This suite covers shared parameters, hidden initialization, write constraints, code isolation, diagnostics, multi-slot controls, multiple selection, generated-table selection, a computed-value aggregate recalculation and the conversion, collection, rounding and date expression helpers, and generated data with dynamic options. It does not cover validation hints, generated table rendering, HTML export, author tooling or browser behavior; those have dedicated tests and the release gate. Full syntax conformance also includes other language tests and browser checks, with rules in the [syntax specification](../../docs/reference/local-interaction-syntax-en.md). See the [compatibility notes](../../docs/compatibility/compatibility-en.md) for cross-version guarantees on diagnostic codes.
|
|
14
14
|
|
|
15
|
-
The conformance sources are unversioned and use the current `local-draft-
|
|
15
|
+
The conformance sources are unversioned and use the current `local-draft-4` revision. The optional prologue version declaration is compile metadata and does not change these semantic cases. Version rejection and migration behavior have dedicated tests and historical fixtures. See [Source revisions and migration](../../docs/compatibility/source-versioning-en.md).
|
|
16
16
|
|
|
17
17
|
## Component protocol conformance
|
|
18
18
|
|