reactive-md 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +54 -4
- package/CHANGELOG.md +55 -4
- package/CONTRIBUTING-ch.md +13 -2
- package/CONTRIBUTING.md +13 -2
- package/README-ch.md +132 -23
- package/README-en.md +130 -21
- package/README.md +128 -21
- package/SECURITY-ch.md +3 -3
- package/SECURITY.md +3 -3
- package/THIRD_PARTY_NOTICES.md +111 -1
- package/cli/args.mjs +51 -1
- package/cli/assets.mjs +6 -1
- package/cli/build.mjs +125 -9
- package/cli/fs-utils.mjs +3 -3
- package/cli/help.mjs +12 -5
- package/cli/init.mjs +1 -1
- package/cli/package.mjs +1 -0
- package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
- package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
- package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
- package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
- package/dist-library/compile-wUv8KEge.js +1249 -0
- package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
- package/dist-library/compiler-eOfcinZs.js +62 -0
- package/dist-library/component-state-BoLCGee4.js +801 -0
- package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
- package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
- package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
- package/dist-library/controls-CcT6n7k_.js +6740 -0
- package/dist-library/coordinate-CWS9p5q_.js +293 -0
- package/dist-library/data-table-Bgccxd7h.js +296 -0
- package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
- package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
- package/dist-library/export-BqVmTXm8.js +369 -0
- package/dist-library/gallery-CY6mTx8i.js +360 -0
- package/dist-library/html-CNT4KD-2.js +757 -0
- package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
- package/dist-library/latex-1w7aQgD5.js +928 -0
- package/dist-library/layout-C0YlEPGr.js +562 -0
- package/dist-library/mount-preset-KxvtKgJb.js +13 -0
- package/dist-library/options-1aDLK7JY.js +121 -0
- package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
- package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
- package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
- package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
- package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
- package/dist-library/react-BbyAgeXc.js +6070 -0
- package/dist-library/react-D5iGiUdL.js +7 -0
- package/dist-library/reactive-md-authoring.js +222 -223
- package/dist-library/reactive-md-build.js +126 -72
- package/dist-library/reactive-md-compiler-standard.js +12 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-default-packs.js +2 -2
- package/dist-library/reactive-md-default-preset.js +4 -4
- package/dist-library/reactive-md-export-assets.js +57 -0
- package/dist-library/reactive-md-export.js +5 -111
- package/dist-library/reactive-md-minimal-preset.js +24 -0
- package/dist-library/reactive-md-minimal-react-preset.js +26 -0
- package/dist-library/reactive-md-minimal-styles.js +80 -0
- package/dist-library/reactive-md-minimal.css +2 -0
- package/dist-library/reactive-md-pdf.js +7582 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -0
- package/dist-library/reactive-md-plugin-data.js +17 -0
- package/dist-library/reactive-md-plugin-diagram.js +18 -0
- package/dist-library/reactive-md-plugin-forms.js +18 -0
- package/dist-library/reactive-md-plugin-gallery.js +12 -0
- package/dist-library/reactive-md-plugin-navigation.js +15 -0
- package/dist-library/reactive-md-plugin-network.js +222 -0
- package/dist-library/reactive-md-plugin-plot.js +24 -0
- package/dist-library/reactive-md-print.css +5 -0
- package/dist-library/reactive-md-react-minimal.js +28 -0
- package/dist-library/reactive-md-react-server.js +34 -32
- package/dist-library/reactive-md-react-unstyled.js +14 -9
- package/dist-library/reactive-md-react.js +14 -9
- package/dist-library/reactive-md-runtime-browser.js +847 -15
- package/dist-library/reactive-md-runtime.js +3 -3
- package/dist-library/reactive-md-sdk.js +8 -6
- package/dist-library/reactive-md-standalone-configured.js +16 -0
- package/dist-library/reactive-md-standalone-host.js +9 -438
- package/dist-library/reactive-md-testing-browser.js +5 -4
- package/dist-library/reactive-md-testing-react.js +46 -44
- package/dist-library/reactive-md-testing.js +45 -44
- package/dist-library/reactive-md-vite.js +135 -37
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +590 -498
- package/dist-library/registry-B9NGct4d.js +20 -0
- package/dist-library/registry-core-Bbad9Bm2.js +479 -0
- package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
- package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
- package/dist-library/runtime-kcA7bG7G.js +1282 -0
- package/dist-library/sample-bP4zHB3L.js +289 -0
- package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
- package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
- package/dist-library/session-core-nmJHuR9c.js +452 -0
- package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
- package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
- package/dist-library/types/authoring/catalog.d.ts +2 -3
- package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/authoring/insert.d.ts +1 -1
- package/dist-library/types/authoring/templates.d.ts +2 -2
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/build/host.d.ts +1 -1
- package/dist-library/types/build/index.d.ts +1 -1
- package/dist-library/types/build/notices.d.ts +1 -1
- package/dist-library/types/build/resources.d.ts +1 -1
- package/dist-library/types/build/vite.d.ts +1 -1
- package/dist-library/types/compiler/index.d.ts +2 -2
- package/dist-library/types/compiler/result.d.ts +1 -1
- package/dist-library/types/compiler/standard.d.ts +2 -2
- package/dist-library/types/compiler/types.d.ts +1 -1
- package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
- package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
- package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
- package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
- package/dist-library/types/components/minimal-preset.d.ts +2 -0
- package/dist-library/types/components/mount-preset.d.ts +4 -0
- package/dist-library/types/components/network/submit-button.d.ts +10 -0
- package/dist-library/types/components/plot/coordinate.d.ts +2 -0
- package/dist-library/types/components/plugins/chart.d.ts +2 -0
- package/dist-library/types/components/plugins/data.d.ts +2 -0
- package/dist-library/types/components/plugins/diagram.d.ts +2 -0
- package/dist-library/types/components/plugins/forms.d.ts +2 -0
- package/dist-library/types/components/plugins/gallery.d.ts +2 -0
- package/dist-library/types/components/plugins/navigation.d.ts +2 -0
- package/dist-library/types/components/plugins/network.d.ts +2 -0
- package/dist-library/types/components/plugins/plot.d.ts +2 -0
- package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
- package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
- package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
- package/dist-library/types/export/component-state.d.ts +1 -1
- package/dist-library/types/export/index.d.ts +2 -1
- package/dist-library/types/export/print-document.d.ts +18 -0
- package/dist-library/types/export/render-markup.d.ts +23 -0
- package/dist-library/types/export/requirements.d.ts +1 -1
- package/dist-library/types/export/resources.d.ts +1 -1
- package/dist-library/types/export/restoration.d.ts +1 -1
- package/dist-library/types/export-assets/index.d.ts +25 -0
- package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
- package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
- package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
- package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
- package/dist-library/types/local/compilation/compiler.d.ts +7 -14
- package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
- package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
- package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
- package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
- package/dist-library/types/local/compilation/streaming.d.ts +27 -0
- package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
- package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
- package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
- package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
- package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
- package/dist-library/types/local/configuration/options-core.d.ts +5 -4
- package/dist-library/types/local/configuration/options.d.ts +2 -1
- package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
- package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
- package/dist-library/types/local/configuration/schema.d.ts +1 -1
- package/dist-library/types/local/css/author-css.d.ts +66 -0
- package/dist-library/types/local/evaluation/computations.d.ts +2 -2
- package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
- package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
- package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
- package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
- package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
- package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
- package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/validation.d.ts +1 -1
- package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
- package/dist-library/types/local/html/html-details.d.ts +1 -1
- package/dist-library/types/local/html/html-entities.d.ts +11 -2
- package/dist-library/types/local/html/html-recovery.d.ts +1 -1
- package/dist-library/types/local/html/html-table.d.ts +1 -1
- package/dist-library/types/local/html/html.d.ts +40 -4
- package/dist-library/types/local/index.d.ts +14 -13
- package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
- package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
- package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
- package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
- package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
- package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
- package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
- package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
- package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
- package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
- package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
- package/dist-library/types/local/parsing/parser.d.ts +3 -3
- package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
- package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
- package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
- package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
- package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
- package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
- package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
- package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
- package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
- package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
- package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
- package/dist-library/types/local/rendering/render-types.d.ts +1 -1
- package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
- package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
- package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
- package/dist-library/types/local/runtime/retention.d.ts +1 -1
- package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
- package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
- package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
- package/dist-library/types/local/runtime/runtime.d.ts +4 -2
- package/dist-library/types/local/runtime/state.d.ts +1 -1
- package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
- package/dist-library/types/local/source/authoring.d.ts +1 -1
- package/dist-library/types/local/source/source-context.d.ts +23 -0
- package/dist-library/types/local/source/source-migration.d.ts +2 -2
- package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
- package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
- package/dist-library/types/local/transport/shared-data.d.ts +1 -1
- package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
- package/dist-library/types/local/transport/worker-job.d.ts +28 -0
- package/dist-library/types/local/transport/worker.d.ts +32 -46
- package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
- package/dist-library/types/pdf.d.ts +22 -0
- package/dist-library/types/presets/identity.d.ts +1 -0
- package/dist-library/types/presets/minimal.d.ts +2 -0
- package/dist-library/types/presets/plugin-packs.d.ts +1 -0
- package/dist-library/types/react/component-api.d.ts +20 -4
- package/dist-library/types/react/component-primitives.d.ts +10 -10
- package/dist-library/types/react/component-utils.d.ts +9 -1
- package/dist-library/types/react/index.d.ts +6 -5
- package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
- package/dist-library/types/react/minimal.d.ts +13 -0
- package/dist-library/types/react/package-core.d.ts +67 -0
- package/dist-library/types/react/package.d.ts +3 -67
- package/dist-library/types/react/runtime/common.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +115 -0
- package/dist-library/types/react/sdk.d.ts +4 -110
- package/dist-library/types/react/server.d.ts +2 -2
- package/dist-library/types/react/use-draft-field.d.ts +5 -1
- package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
- package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
- package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
- package/dist-library/types/runtime-services/component-state.d.ts +1 -1
- package/dist-library/types/runtime-services/index.d.ts +2 -0
- package/dist-library/types/runtime-services/network.d.ts +86 -0
- package/dist-library/types/runtime-services/runtime.d.ts +1 -1
- package/dist-library/types/sdk/config.d.ts +1 -1
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/props.d.ts +1 -1
- package/dist-library/types/sdk/registry-core.d.ts +1 -1
- package/dist-library/types/sdk/theme.d.ts +5 -4
- package/dist-library/types/sdk/types.d.ts +2 -2
- package/dist-library/types/shareable.d.ts +6 -5
- package/dist-library/types/standalone/diagnostics.d.ts +1 -1
- package/dist-library/types/standalone/host.d.ts +5 -0
- package/dist-library/types/standalone/payload.d.ts +1 -1
- package/dist-library/types/standalone/prepare.d.ts +2 -2
- package/dist-library/types/standalone/session-core.d.ts +68 -0
- package/dist-library/types/standalone/session.d.ts +6 -68
- package/dist-library/types/themes/contract.d.ts +7 -0
- package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
- package/dist-library/types/vite/client.d.ts +19 -0
- package/dist-library/types/vite/index.d.ts +18 -3
- package/dist-library/types/vite/registration.d.ts +2 -2
- package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
- package/dist-library/validation-BEBA_HvS.js +1121 -0
- package/dist-library/visual-frame-CyV1FXzs.js +48 -0
- package/dist-library/visuals-B5KSafVk.js +3 -0
- package/dist-library/visuals-BZbZYA7w.js +72572 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +146 -137
- package/docs/README-ch.md +16 -11
- package/docs/README.md +16 -11
- package/docs/compatibility/compatibility-ch.md +8 -8
- package/docs/compatibility/compatibility-en.md +8 -8
- package/docs/compatibility/source-versioning-ch.md +1 -1
- package/docs/compatibility/source-versioning-en.md +1 -1
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-development-reference-ch.md +4 -4
- package/docs/development/component-development-reference-en.md +4 -4
- package/docs/development/component-protocol-ch.md +14 -14
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/development/extension-tutorial-ch.md +308 -0
- package/docs/development/extension-tutorial-en.md +308 -0
- package/docs/development/local-module-layout-ch.md +10 -50
- package/docs/development/local-module-layout-en.md +9 -49
- package/docs/development/performance-overview-ch.md +174 -154
- package/docs/development/performance-overview-en.md +174 -154
- package/docs/guides/local-guide-ch.md +2 -2
- package/docs/guides/local-guide-en.md +2 -2
- package/docs/integration/author-tools-ch.md +2 -2
- package/docs/integration/author-tools-en.md +2 -2
- package/docs/integration/compiler-ch.md +4 -2
- package/docs/integration/compiler-en.md +4 -2
- package/docs/integration/directory-discovery-ch.md +5 -1
- package/docs/integration/directory-discovery-en.md +5 -1
- package/docs/integration/editor-ch.md +35 -5
- package/docs/integration/editor-en.md +42 -4
- package/docs/integration/extension-sdk-ch.md +6 -4
- package/docs/integration/extension-sdk-en.md +6 -4
- package/docs/integration/local-integration-ch.md +201 -19
- package/docs/integration/local-integration-en.md +194 -18
- package/docs/integration/network-host-ch.md +75 -0
- package/docs/integration/network-host-en.md +75 -0
- package/docs/integration/shareable-export-ch.md +58 -16
- package/docs/integration/shareable-export-en.md +57 -15
- package/docs/reference/html-compatibility-ch.md +20 -67
- package/docs/reference/html-compatibility-en.md +19 -64
- package/docs/reference/local-interaction-syntax-ch.md +199 -26
- package/docs/reference/local-interaction-syntax-en.md +194 -27
- package/docs/reference/public-api-ch.md +416 -0
- package/docs/reference/public-api-en.md +416 -0
- package/docs/reference/theme-protocol-ch.md +27 -8
- package/docs/reference/theme-protocol-en.md +46 -8
- package/docs/releases/release-0.4.0-ch.md +2 -2
- package/docs/releases/release-0.4.0-en.md +2 -2
- package/docs/releases/release-0.8.0-ch.md +19 -3
- package/docs/releases/release-0.8.0-en.md +19 -3
- package/docs/releases/release-0.9.0-ch.md +44 -0
- package/docs/releases/release-0.9.0-en.md +44 -0
- package/docs/releases/release-0.9.1-ch.md +29 -0
- package/docs/releases/release-0.9.1-en.md +29 -0
- package/examples/component-package/README-ch.md +1 -1
- package/examples/component-package/README.md +1 -1
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/game-2048-package/README-ch.md +3 -9
- package/examples/game-2048-package/README.md +8 -12
- package/examples/integration/README-ch.md +21 -2
- package/examples/integration/README.md +21 -2
- package/examples/integration/extension-sdk/README-ch.md +1 -1
- package/examples/integration/extension-sdk/README.md +1 -1
- package/examples/integration/streaming/index.html +48 -0
- package/examples/integration/streaming/main.js +175 -0
- package/examples/integration/streaming/package.json +13 -0
- package/examples/integration/streaming/worker.js +3 -0
- package/examples/local/README-ch.md +3 -3
- package/examples/local/README.md +2 -2
- package/examples/local/minimal-budget.reactive.md +48 -0
- package/examples/minimal-extension/README-ch.md +78 -0
- package/examples/minimal-extension/README.md +78 -0
- package/examples/minimal-extension/index.html +15 -0
- package/examples/minimal-extension/package.json +26 -0
- package/examples/minimal-extension/sample/document.reactive.md +10 -0
- package/examples/minimal-extension/scripts/build.mjs +32 -0
- package/examples/minimal-extension/scripts/export.mjs +72 -0
- package/examples/minimal-extension/scripts/test-node.mjs +75 -0
- package/examples/minimal-extension/src/extension.tsx +90 -0
- package/examples/minimal-extension/src/preview.tsx +12 -0
- package/examples/minimal-extension/src/source.ts +4 -0
- package/examples/minimal-extension/tsconfig.json +14 -0
- package/examples/network-survey/README.md +200 -0
- package/examples/network-survey/index.html +49 -0
- package/examples/network-survey/package.json +26 -0
- package/examples/network-survey/sample/document.reactive.md +51 -0
- package/examples/network-survey/src/components.tsx +325 -0
- package/examples/network-survey/src/host.ts +316 -0
- package/examples/network-survey/src/main.tsx +91 -0
- package/examples/network-survey/src/source.ts +1 -0
- package/examples/network-survey/tsconfig.json +26 -0
- package/examples/network-survey/vite.config.ts +227 -0
- package/examples/sci-fi-theme/README-ch.md +4 -2
- package/examples/sci-fi-theme/README.md +4 -2
- package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
- package/examples/sci-fi-theme/demo/demo.css +129 -23
- package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
- package/examples/sci-fi-theme/demo/main.tsx +45 -10
- package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
- package/examples/sci-fi-theme/package.json +2 -1
- package/examples/sci-fi-theme/src/components.css +1064 -154
- package/examples/sci-fi-theme/src/notch.css +142 -0
- package/examples/sci-fi-theme/src/sci-fi.css +3 -1
- package/examples/sci-fi-theme/src/theme.ts +2 -0
- package/examples/sci-fi-theme/src/tokens.css +512 -408
- package/examples/tetris-package/README-ch.md +4 -4
- package/examples/tetris-package/README.md +4 -4
- package/package.json +70 -3
- package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
- package/dist-library/compiler--ea2CKQF.js +0 -61
- package/dist-library/component-state-Cq2K5gkS.js +0 -490
- package/dist-library/options-CX5m5n-J.js +0 -115
- package/dist-library/runtime-C-sbfpOX.js +0 -1157
- package/dist-library/types/local/contracts/locale.d.ts +0 -1
- package/dist-library/types/local/contracts/version.d.ts +0 -2
- package/dist-library/types/local/evaluation/dates.d.ts +0 -2
- package/dist-library/types/local/evaluation/expression.d.ts +0 -47
- package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
- package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
- package/dist-library/types/local/session/incremental.d.ts +0 -48
- package/dist-library/types/local/source/node-walk.d.ts +0 -3
- package/dist-library/types/local/source/text-length.d.ts +0 -13
- package/dist-library/types/local/theme/theme-name.d.ts +0 -3
- package/dist-library/types/local/widgets/visuals.d.ts +0 -25
- package/dist-library/types/react/default-theme.d.ts +0 -6
- package/dist-library/validation-W-bmny-x.js +0 -2253
- package/docs/development/releasing-ch.md +0 -12
- package/docs/development/releasing-en.md +0 -12
- package/docs/integration/codemirror-ch.md +0 -52
- package/docs/integration/codemirror-en.md +0 -29
- package/docs/integration/repository-split-ch.md +0 -40
- package/docs/integration/repository-split-en.md +0 -23
- package/docs/reference/computations-formatting-ch.md +0 -89
- package/docs/reference/computations-formatting-en.md +0 -89
- package/docs/reference/constraints-collections-ch.md +0 -104
- package/docs/reference/constraints-collections-en.md +0 -104
- package/docs/reference/local-components-v2-ch.md +0 -140
- package/docs/reference/local-components-v2-en.md +0 -106
- package/docs/reference/tolerance-ch.md +0 -64
- package/docs/reference/tolerance-en.md +0 -57
- /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
- /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
- /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
- /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
- /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
- /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
package/docs/README-ch.md
CHANGED
|
@@ -7,17 +7,18 @@
|
|
|
7
7
|
| 目录 | 内容 |
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| [guides/](guides/) | 入门指南 |
|
|
10
|
-
| [reference/](reference/) |
|
|
10
|
+
| [reference/](reference/) | 公开接口、语法、诊断与主题参考 |
|
|
11
11
|
| [integration/](integration/) | 宿主集成、编辑器、作者工具与导出 |
|
|
12
12
|
| [compatibility/](compatibility/) | 版本兼容、迁移与源码版本标记 |
|
|
13
|
-
| [development/](development/) |
|
|
13
|
+
| [development/](development/) | 组件开发、协议与性能 |
|
|
14
14
|
| [releases/](releases/) | 各版本发布记录 |
|
|
15
|
+
| [plan/](plan/) | 本地规划区;不随包发布 |
|
|
15
16
|
|
|
16
17
|
## 从这里开始
|
|
17
18
|
|
|
18
19
|
- **编写文档**:先读[入门指南](guides/local-guide-ch.md),再查语法参考;可运行的示例见 [examples/local](../examples/local/README-ch.md)。
|
|
19
|
-
-
|
|
20
|
-
-
|
|
20
|
+
- **接入项目**:先查[公开接口参考](reference/public-api-ch.md)确认入口,再读[本地模式集成](integration/local-integration-ch.md);独立项目示例见 [examples/integration](../examples/integration/README-ch.md)。
|
|
21
|
+
- 升级前请参阅[兼容性](compatibility/compatibility-ch.md)和目标版本的发布记录。主文档适用于 0.9.1。
|
|
21
22
|
|
|
22
23
|
## 入门
|
|
23
24
|
|
|
@@ -29,13 +30,10 @@
|
|
|
29
30
|
|
|
30
31
|
| 主题 | 中文 |
|
|
31
32
|
| --- | --- |
|
|
33
|
+
| 公开接口参考 | [中文](reference/public-api-ch.md) |
|
|
32
34
|
| 本地交互语法 | [中文](reference/local-interaction-syntax-ch.md) |
|
|
33
|
-
| 本地组件 | [中文](reference/local-components-v2-ch.md) |
|
|
34
|
-
| 计算与格式化 | [中文](reference/computations-formatting-ch.md) |
|
|
35
|
-
| 约束与集合 | [中文](reference/constraints-collections-ch.md) |
|
|
36
35
|
| 诊断与计数 | [中文](reference/diagnostics-counting-ch.md) |
|
|
37
36
|
| HTML 兼容 | [中文](reference/html-compatibility-ch.md) |
|
|
38
|
-
| 严格模式与局部恢复 | [中文](reference/tolerance-ch.md) |
|
|
39
37
|
| 主题协议 | [中文](reference/theme-protocol-ch.md) |
|
|
40
38
|
|
|
41
39
|
## 接入
|
|
@@ -43,11 +41,13 @@
|
|
|
43
41
|
| 主题 | 中文 |
|
|
44
42
|
| --- | --- |
|
|
45
43
|
| 本地模式集成 | [中文](integration/local-integration-ch.md) |
|
|
46
|
-
|
|
|
44
|
+
| 目录接入 | [中文](integration/directory-discovery-ch.md) |
|
|
45
|
+
| 单次编译入口 | [中文](integration/compiler-ch.md) |
|
|
47
46
|
| 扩展 SDK 预览 | [中文](integration/extension-sdk-ch.md) |
|
|
48
47
|
| React 源码编辑器 | [中文](integration/editor-ch.md) |
|
|
49
48
|
| 作者工具 | [中文](integration/author-tools-ch.md) |
|
|
50
49
|
| 分享与静态导出 | [中文](integration/shareable-export-ch.md) |
|
|
50
|
+
| 宿主网络通道 | [中文](integration/network-host-ch.md) |
|
|
51
51
|
|
|
52
52
|
## 兼容与迁移
|
|
53
53
|
|
|
@@ -60,16 +60,21 @@
|
|
|
60
60
|
|
|
61
61
|
| 主题 | 中文 |
|
|
62
62
|
| --- | --- |
|
|
63
|
+
| 扩展作者教程(定义到离线导出) | [中文](development/extension-tutorial-ch.md) |
|
|
63
64
|
| 组件插件开发 | [中文](development/component-development-ch.md) |
|
|
65
|
+
| 组件插件开发契约 | [中文](development/component-development-reference-ch.md) |
|
|
64
66
|
| 组件协议 | [中文](development/component-protocol-ch.md) |
|
|
65
67
|
| 性能 | [优化历史与当前复测总览](development/performance-overview-ch.md) |
|
|
66
|
-
| 发布流程 | [中文](
|
|
68
|
+
| 发布流程 | [中文](../CONTRIBUTING-ch.md#发布流程) |
|
|
67
69
|
| local 模块目录与归属 | [中文](development/local-module-layout-ch.md) |
|
|
68
70
|
|
|
69
71
|
## 发布记录
|
|
70
72
|
|
|
71
73
|
| 版本 | 中文 |
|
|
72
74
|
| --- | --- |
|
|
75
|
+
| 0.9.1 | [中文](releases/release-0.9.1-ch.md) |
|
|
76
|
+
| 0.9.0 | [中文](releases/release-0.9.0-ch.md) |
|
|
77
|
+
| 0.8.0 | [中文](releases/release-0.8.0-ch.md) |
|
|
73
78
|
| 0.7.0 | [中文](releases/release-0.7.0-ch.md) |
|
|
74
79
|
| 0.6.1 | [中文](releases/release-0.6.1-ch.md) |
|
|
75
80
|
| 0.6.0 | [中文](releases/release-0.6.0-ch.md) |
|
|
@@ -87,4 +92,4 @@
|
|
|
87
92
|
- 贡献指南:[中文](../CONTRIBUTING-ch.md)
|
|
88
93
|
- 一致性用例:[examples/conformance](../examples/conformance/README-ch.md)
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
新增文档时放入对应目录,在本页补充中文链接,并检查本地链接和标题锚点。
|
package/docs/README.md
CHANGED
|
@@ -7,17 +7,18 @@ Documents are grouped by purpose. Each topic has an English version (`-en.md`);
|
|
|
7
7
|
| Directory | Contents |
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| [guides/](guides/) | Getting started |
|
|
10
|
-
| [reference/](reference/) |
|
|
10
|
+
| [reference/](reference/) | Public API, syntax, diagnostics and themes |
|
|
11
11
|
| [integration/](integration/) | Integration, editor, author tools and export |
|
|
12
12
|
| [compatibility/](compatibility/) | Compatibility, migration and source versioning |
|
|
13
|
-
| [development/](development/) | Development, protocols
|
|
13
|
+
| [development/](development/) | Development, protocols and performance |
|
|
14
14
|
| [releases/](releases/) | Release notes |
|
|
15
|
+
| [plan/](plan/) | Local planning area; not published with the package |
|
|
15
16
|
|
|
16
17
|
## Start here
|
|
17
18
|
|
|
18
19
|
- **Authors**: read the [beginner guide](guides/local-guide-en.md), then the syntax reference. Runnable examples are in [examples/local](../examples/local/README.md).
|
|
19
|
-
- **Integrators**:
|
|
20
|
-
-
|
|
20
|
+
- **Integrators**: check the [public API reference](reference/public-api-en.md) for every entry, then read [local mode integration](integration/local-integration-en.md). Copyable projects are in [examples/integration](../examples/integration/README.md).
|
|
21
|
+
- If you are upgrading, check [compatibility](compatibility/compatibility-en.md) and the release notes for your target version. The main guides cover 0.9.1.
|
|
21
22
|
|
|
22
23
|
## Guides
|
|
23
24
|
|
|
@@ -29,13 +30,10 @@ Documents are grouped by purpose. Each topic has an English version (`-en.md`);
|
|
|
29
30
|
|
|
30
31
|
| Topic | English |
|
|
31
32
|
| --- | --- |
|
|
33
|
+
| Public API reference | [English](reference/public-api-en.md) |
|
|
32
34
|
| Local interaction syntax | [English](reference/local-interaction-syntax-en.md) |
|
|
33
|
-
| Local components v2 | [English](reference/local-components-v2-en.md) |
|
|
34
|
-
| Computations and formatting | [English](reference/computations-formatting-en.md) |
|
|
35
|
-
| Constraints and collections | [English](reference/constraints-collections-en.md) |
|
|
36
35
|
| Diagnostics and counting | [English](reference/diagnostics-counting-en.md) |
|
|
37
36
|
| HTML compatibility | [English](reference/html-compatibility-en.md) |
|
|
38
|
-
| Strict parsing and local recovery | [English](reference/tolerance-en.md) |
|
|
39
37
|
| Theme protocol | [English](reference/theme-protocol-en.md) |
|
|
40
38
|
|
|
41
39
|
## Integration
|
|
@@ -43,11 +41,13 @@ Documents are grouped by purpose. Each topic has an English version (`-en.md`);
|
|
|
43
41
|
| Topic | English |
|
|
44
42
|
| --- | --- |
|
|
45
43
|
| Local mode integration | [English](integration/local-integration-en.md) |
|
|
46
|
-
|
|
|
44
|
+
| Directory discovery | [English](integration/directory-discovery-en.md) |
|
|
45
|
+
| One-shot compilation | [English](integration/compiler-en.md) |
|
|
47
46
|
| Extension SDK preview | [English](integration/extension-sdk-en.md) |
|
|
48
47
|
| React source editor | [English](integration/editor-en.md) |
|
|
49
48
|
| Author tools | [English](integration/author-tools-en.md) |
|
|
50
49
|
| Sharing and static export | [English](integration/shareable-export-en.md) |
|
|
50
|
+
| Host network channels | [English](integration/network-host-en.md) |
|
|
51
51
|
|
|
52
52
|
## Compatibility and migration
|
|
53
53
|
|
|
@@ -60,16 +60,21 @@ Documents are grouped by purpose. Each topic has an English version (`-en.md`);
|
|
|
60
60
|
|
|
61
61
|
| Topic | English |
|
|
62
62
|
| --- | --- |
|
|
63
|
+
| Extension author tutorial (definition to offline export) | [English](development/extension-tutorial-en.md) |
|
|
63
64
|
| Component plugin development | [English](development/component-development-en.md) |
|
|
65
|
+
| Component development contract | [English](development/component-development-reference-en.md) |
|
|
64
66
|
| Component protocol | [English](development/component-protocol-en.md) |
|
|
65
67
|
| Local module layout | [English](development/local-module-layout-en.md) |
|
|
66
68
|
| Performance | [English](development/performance-overview-en.md) |
|
|
67
|
-
| Publishing | [English](
|
|
69
|
+
| Publishing | [English](../CONTRIBUTING.md#releasing) |
|
|
68
70
|
|
|
69
71
|
## Releases
|
|
70
72
|
|
|
71
73
|
| Version | English |
|
|
72
74
|
| --- | --- |
|
|
75
|
+
| 0.9.1 | [English](releases/release-0.9.1-en.md) |
|
|
76
|
+
| 0.9.0 | [English](releases/release-0.9.0-en.md) |
|
|
77
|
+
| 0.8.0 | [English](releases/release-0.8.0-en.md) |
|
|
73
78
|
| 0.7.0 | [English](releases/release-0.7.0-en.md) |
|
|
74
79
|
| 0.6.1 | [English](releases/release-0.6.1-en.md) |
|
|
75
80
|
| 0.6.0 | [English](releases/release-0.6.0-en.md) |
|
|
@@ -87,4 +92,4 @@ Documents are grouped by purpose. Each topic has an English version (`-en.md`);
|
|
|
87
92
|
- Contributing: [English](../CONTRIBUTING.md)
|
|
88
93
|
- Conformance fixtures: [examples/conformance](../examples/conformance/README.md)
|
|
89
94
|
|
|
90
|
-
When adding a topic, place the English version in the matching directory, add it here, and
|
|
95
|
+
When adding a topic, place the English version in the matching directory, add it here, and check local links and heading anchors.
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](compatibility-en.md)
|
|
4
4
|
|
|
5
|
-
Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可持久化的内容、诊断契约和当前平台范围。显式修订声明、迁移 API 与 `reactive-md migrate` 见[源码修订与迁移](source-versioning-ch.md),公开 API 与样式接入见[本地模式集成](../integration/local-integration-ch.md),本版本见[0.
|
|
5
|
+
Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可持久化的内容、诊断契约和当前平台范围。显式修订声明、迁移 API 与 `reactive-md migrate` 见[源码修订与迁移](source-versioning-ch.md),公开 API 与样式接入见[本地模式集成](../integration/local-integration-ch.md),本版本见[0.9.1 发布说明](../releases/release-0.9.1-ch.md),上一版本见[0.9.0 发布说明](../releases/release-0.9.0-ch.md),该 minor 系列见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
|
|
6
6
|
|
|
7
7
|
## 版本对应
|
|
8
8
|
|
|
9
9
|
| 项目 | 当前值 | 说明 |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| 包版本 | `0.
|
|
12
|
-
| 分发标签 | `latest`:`0.
|
|
13
|
-
| SDK 契约 | `0.7.0` | `LOCAL_SDK_VERSION`;与包版本独立,`0.
|
|
11
|
+
| 包版本 | `0.9.1` | 稳定版,2026-11-22 |
|
|
12
|
+
| 分发标签 | `latest`:`0.9.1` | `next` 独立维护;使用该渠道前请查询 npm |
|
|
13
|
+
| SDK 契约 | `0.7.0` | `LOCAL_SDK_VERSION`;与包版本独立,`0.9.1` 不改变它 |
|
|
14
14
|
| 语法版本 | `local-draft-3` | `LOCAL_SYNTAX_VERSION`;本包只接受这一修订 |
|
|
15
15
|
| 源码修订指令 | 可选 `<!-- reactive-md: local-draft-3 -->` | 文档前导区中的一行;无指令源码继续按当前修订解析 |
|
|
16
16
|
| 组块协议 | `component-protocol-3` | 贡献与验收契约,见[组块协议](../development/component-protocol-ch.md);不是运行时版本选择参数 |
|
|
@@ -19,7 +19,7 @@ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可
|
|
|
19
19
|
| 无样式 React 入口 | `reactive-md/react/unstyled` | 不依赖样式表的 React 渲染器 |
|
|
20
20
|
| 核心入口 | `reactive-md` | 编译、表达式与运行时,不加载 React |
|
|
21
21
|
| React 入口 | `reactive-md/react` | `LocalReactiveDocument`、`LocalDocumentView` |
|
|
22
|
-
| 编辑器入口 | `reactive-md-editor` | 独立 `0.
|
|
22
|
+
| 编辑器入口 | `reactive-md-editor` | 独立 `0.2.0` 包中的 `ReactiveMarkdownEditor` 及其类型,面向 `0.9.x` 引擎系列;需要 React 19。引擎 0.8 及之后的版本不再导出 `reactive-md/editor` |
|
|
23
23
|
| 渲染器样式入口 | `reactive-md/styles.css` | 文档与组块样式,由宿主显式引入 |
|
|
24
24
|
| 屏幕样式入口 | `reactive-md/screen.css` | `reactive-md/styles.css` 的别名 |
|
|
25
25
|
| 打印样式入口 | `reactive-md/print.css` | 可选的文档打印布局与页边距 |
|
|
@@ -70,9 +70,9 @@ Reactive MD 目前是 0.x 预览版。本页说明包版本、语法版本、可
|
|
|
70
70
|
|
|
71
71
|
`0.5.2` 新增可选的宿主组件扩展轴,并把组块协议提升到 `component-protocol-2`。语法修订和主题协议保持不变,现有导入继续有效,为 0.5.x 编写的文档无需迁移。见[0.5.2 发布说明](../releases/release-0.5.2-ch.md)。
|
|
72
72
|
|
|
73
|
-
`0.4.0` 新增[
|
|
73
|
+
`0.4.0` 新增[跨字段校验、数组与生成表格](../reference/local-interaction-syntax-ch.md):`LocalRuntime.validate()`、可序列化的 `LocalValidation` 规则、数字数组及生成表格。自行实现运行时适配器的宿主需补充 `validate()`,值类型穷举需加入 `number-array`;与 `sum`、`average`、`minOf`、`maxOf` 同名的旧绑定应重命名。
|
|
74
74
|
|
|
75
|
-
`0.4.0` 新增[命名计算与格式化函数](../reference/
|
|
75
|
+
`0.4.0` 新增[命名计算与格式化函数](../reference/local-interaction-syntax-ch.md)。`computed`/`const` 使用现有本地标签形式;新函数名成为保留字,使用本版本前需重命名冲突的输入绑定并同步修改引用。`document.bindings` 和 `initialState` 继续只包含可写控件,快照同时提供成功求值的计算结果。
|
|
76
76
|
|
|
77
77
|
`0.4.0` 建立 `local-draft-2`。使用受支持 `local-draft-1` 写法的无指令源码继续有效;显式 `local-draft-1` 声明在迁移前会被拒绝。构建新增识别 15 个标签名:十个 `local-draft-2` 组块,以及 `computed`、`const`、`validation`、`data-table`、`column`。以前作为未知标签或普通文字显示的内容现在会解析为组块或声明;字面示例应移入行内代码或代码围栏。开头的 `<theme>` 声明是文档元数据,不计入组块。完整的重命名与升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
|
|
78
78
|
|
|
@@ -126,4 +126,4 @@ Node 端消费指在 Node 中导入 `reactive-md`、调用 `compileLocal` 和 `c
|
|
|
126
126
|
语言范围见[语法规范](../reference/local-interaction-syntax-ch.md),安全边界与宿主责任见[安全策略](../../SECURITY-ch.md)。
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
当前语法修订的完整规则见[本地交互语法规范](../reference/local-interaction-syntax-ch.md),升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。`0.9.1` 使用 `latest` 渠道。
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](compatibility-ch.md)
|
|
4
4
|
|
|
5
|
-
Reactive MD is currently a 0.x preview. This page covers package versions, syntax versions, what can be persisted, the diagnostics contract and the current platform scope. See [Source revisions and migration](source-versioning-en.md) for explicit revision declarations, the migration API and `reactive-md migrate`, [Local mode integration](../integration/local-integration-en.md) for the public API and style integration, the [0.
|
|
5
|
+
Reactive MD is currently a 0.x preview. This page covers package versions, syntax versions, what can be persisted, the diagnostics contract and the current platform scope. See [Source revisions and migration](source-versioning-en.md) for explicit revision declarations, the migration API and `reactive-md migrate`, [Local mode integration](../integration/local-integration-en.md) for the public API and style integration, the [0.9.1 release notes](../releases/release-0.9.1-en.md) for this release, the [0.9.0 release notes](../releases/release-0.9.0-en.md) for the previous release, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for that minor series.
|
|
6
6
|
|
|
7
7
|
## Version mapping
|
|
8
8
|
|
|
9
9
|
| Item | Current value | Notes |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| Package version | `0.
|
|
12
|
-
| Distribution tags | `latest`: `0.
|
|
13
|
-
| SDK contract | `0.7.0` | `LOCAL_SDK_VERSION`; independent of the package version and unchanged by `0.
|
|
11
|
+
| Package version | `0.9.1` | Stable release, 2026-11-22 |
|
|
12
|
+
| Distribution tags | `latest`: `0.9.1` | `next` is maintained independently; query npm when selecting that channel |
|
|
13
|
+
| SDK contract | `0.7.0` | `LOCAL_SDK_VERSION`; independent of the package version and unchanged by `0.9.1` |
|
|
14
14
|
| Syntax version | `local-draft-3` | `LOCAL_SYNTAX_VERSION`; this revision is the only one accepted by the package |
|
|
15
15
|
| Source revision directive | Optional `<!-- reactive-md: local-draft-3 -->` | One line in the document prologue; unversioned source keeps current-revision behavior |
|
|
16
16
|
| Component protocol | `component-protocol-3` | Contribution and acceptance contract, see [Component protocol](../development/component-protocol-en.md); not a runtime version selection parameter |
|
|
@@ -19,7 +19,7 @@ Reactive MD is currently a 0.x preview. This page covers package versions, synta
|
|
|
19
19
|
| Unstyled React entry | `reactive-md/react/unstyled` | React renderer without a stylesheet dependency |
|
|
20
20
|
| Core entry | `reactive-md` | Compilation, expressions and runtime, without loading React |
|
|
21
21
|
| React entry | `reactive-md/react` | `LocalReactiveDocument`, `LocalDocumentView` |
|
|
22
|
-
| Editor entry | `reactive-md-editor` | `ReactiveMarkdownEditor` and its types in the separate `0.
|
|
22
|
+
| Editor entry | `reactive-md-editor` | `ReactiveMarkdownEditor` and its types in the separate `0.2.0` package for the `0.9.x` engine series; requires React 19. Engine 0.8 and later no longer export `reactive-md/editor` |
|
|
23
23
|
| Renderer style entry | `reactive-md/styles.css` | Document and component styles, explicitly imported by the host |
|
|
24
24
|
| Screen style entry | `reactive-md/screen.css` | Alias of `reactive-md/styles.css` |
|
|
25
25
|
| Print style entry | `reactive-md/print.css` | Optional document print layout and page margins |
|
|
@@ -70,9 +70,9 @@ Regression data in [the historical corpus](../../examples/conformance/history/v0
|
|
|
70
70
|
|
|
71
71
|
`0.5.2` adds the opt-in host component extension axis and raises the component protocol to `component-protocol-2`. The syntax revision and theme protocol remain unchanged, existing imports keep working, and documents written for 0.5.x need no migration. See the [0.5.2 release notes](../releases/release-0.5.2-en.md).
|
|
72
72
|
|
|
73
|
-
`0.4.0` adds [constraints and collections](../reference/
|
|
73
|
+
`0.4.0` adds [constraints and collections](../reference/local-interaction-syntax-en.md): `LocalRuntime.validate()`, serializable `LocalValidation` rules, numeric arrays and generated tables. Hosts implementing a runtime adapter need the new `validate()` method; exhaustive value-kind checks need `number-array`. Rename bindings colliding with `sum`, `average`, `minOf` or `maxOf`.
|
|
74
74
|
|
|
75
|
-
`0.4.0` adds [named calculations and formatting functions](../reference/
|
|
75
|
+
`0.4.0` adds [named calculations and formatting functions](../reference/local-interaction-syntax-en.md). `computed`/`const` use the existing local tag syntax. The new built-in function names become reserved; rename colliding input bindings and their references before using this release. `document.bindings` and `initialState` still contain writable controls; snapshots also expose successful calculated values.
|
|
76
76
|
|
|
77
77
|
`0.4.0` establishes `local-draft-2`. Unversioned source that uses supported `local-draft-1` forms remains valid; an explicit `local-draft-1` declaration is rejected until migrated. The build now recognizes 15 additional tag names: the ten `local-draft-2` components plus `computed`, `const`, `validation`, `data-table` and `column`. Text that previously displayed as an unknown or literal tag now parses as a component or declaration; move literal examples into code spans or fences. The leading `<theme>` declaration is document metadata and is not counted as a component. See [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the complete rename and upgrade checklist.
|
|
78
78
|
|
|
@@ -126,4 +126,4 @@ Node-side consumption means importing `reactive-md` in Node and calling `compile
|
|
|
126
126
|
See the [syntax specification](../reference/local-interaction-syntax-en.md) for the language scope, and the [security policy](../../SECURITY.md) for the security boundary and host responsibilities.
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
See [
|
|
129
|
+
See the [syntax specification](../reference/local-interaction-syntax-en.md) for new tags, colors and slot state, and [0.4.0 release and migration](../releases/release-0.4.0-en.md) for the upgrade checklist. `0.9.1` uses the `latest` channel.
|
|
@@ -159,4 +159,4 @@ reactive-md migrate old.reactive.md --from local-draft-1 --accept-semantic-chang
|
|
|
159
159
|
|
|
160
160
|
迁移处理声明的元数据变化,并检查正文能否跨越修订边界。它不是旧版读取器:不解释 YAML `state`/`data`/`computed`/`actions` 配置块、directive 或其他 draft 之前的语法,也不改写正文。在 `local-draft-3` 下已经无法编译的源码会保持阻止状态,直到作者修复报告的位置。
|
|
161
161
|
|
|
162
|
-
`0.8.0` 继续以 `local-draft-3` 作为唯一接受的修订,不新增源码修订。本页的指令规则、迁移 API 和 CLI 选项保持不变,因此在 `0.7.0` 下可编译的文档无需为 `0.8.0` 迁移。从 `local-draft-1` 或 `local-draft-2` 迁移仍以 `local-draft-3` 为目标;迁移 `local-draft-2` 文档时仍会阻止新激活的 `<external>` 标签,作者需要先把它们保存为字面代码。`0.
|
|
162
|
+
`0.8.0` 继续以 `local-draft-3` 作为唯一接受的修订,不新增源码修订。本页的指令规则、迁移 API 和 CLI 选项保持不变,因此在 `0.7.0` 下可编译的文档无需为 `0.8.0` 迁移。从 `local-draft-1` 或 `local-draft-2` 迁移仍以 `local-draft-3` 为目标;迁移 `local-draft-2` 文档时仍会阻止新激活的 `<external>` 标签,作者需要先把它们保存为字面代码。`latest` 渠道的 `0.9.1` 继续使用 `local-draft-3`。
|
|
@@ -159,4 +159,4 @@ The command migrates one source at a time. This build has no `--write` mode, no
|
|
|
159
159
|
|
|
160
160
|
Migration handles the declared metadata change and checks whether the body can cross the revision boundary. It is not a legacy reader: it does not interpret YAML `state`/`data`/`computed`/`actions` blocks, directives or other pre-draft syntax, and it does not rewrite the body. Source that already fails to compile under `local-draft-3` stays blocked until the author fixes the reported positions.
|
|
161
161
|
|
|
162
|
-
`0.8.0` keeps `local-draft-3` as the only accepted revision and adds no new source revision. The directive rules, migration API and CLI options on this page apply unchanged, so a document that compiles under `0.7.0` needs no migration for `0.8.0`. Migrating from `local-draft-1` or `local-draft-2` still targets `local-draft-3`; migration from `local-draft-2` continues to block newly active `<external>` tags and requires the author to preserve them as literal code first. `0.
|
|
162
|
+
`0.8.0` keeps `local-draft-3` as the only accepted revision and adds no new source revision. The directive rules, migration API and CLI options on this page apply unchanged, so a document that compiles under `0.7.0` needs no migration for `0.8.0`. Migrating from `local-draft-1` or `local-draft-2` still targets `local-draft-3`; migration from `local-draft-2` continues to block newly active `<external>` tags and requires the author to preserve them as literal code first. `0.9.1` is available on `latest` and continues to use `local-draft-3`.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](component-development-en.md) · [完整开发契约](component-development-reference-ch.md)
|
|
4
4
|
|
|
5
|
-
先用一个可以展开 Markdown 的提示容器跑通预览。扩展 SDK
|
|
5
|
+
先用一个可以展开 Markdown 的提示容器跑通预览。扩展 SDK 自 `reactive-md@0.8.0` 起提供,SDK 契约在 `0.9.1` 中仍为 0.7.0,直接安装当前公开包即可。
|
|
6
6
|
|
|
7
7
|
## 创建并启动
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx reactive-md init component ../my-note --name my-note --id acme/my-note --form container --props '{"label":{"kind":"string","default":"Note"}}' --yes
|
|
11
11
|
cd ../my-note
|
|
12
|
-
npm install reactive-md@0.
|
|
12
|
+
npm install reactive-md@0.9.1 react@^19 react-dom@^19
|
|
13
13
|
npm run dev
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](component-development-ch.md) · [Full development contract](component-development-reference-en.md)
|
|
4
4
|
|
|
5
|
-
Start with a note container that can expand Markdown. The extension SDK
|
|
5
|
+
Start with a note container that can expand Markdown. The extension SDK has shipped since `reactive-md@0.8.0`, and its `0.7.0` contract is unchanged in `0.9.1`; install the current published package.
|
|
6
6
|
|
|
7
7
|
## Create and run
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx reactive-md init component ../my-note --name my-note --id acme/my-note --form container --props '{"label":{"kind":"string","default":"Note"}}' --yes
|
|
11
11
|
cd ../my-note
|
|
12
|
-
npm install reactive-md@0.
|
|
12
|
+
npm install reactive-md@0.9.1 react@^19 react-dom@^19
|
|
13
13
|
npm run dev
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
这里的插件是宿主通过 npm 安装、显式导入并组合的组件包或主题包。组件声明、React 实现、编辑器信息与资源共同形成开发契约;宿主用 `createLocalConfig` 和 `createReactConfig` 装配它们。
|
|
6
6
|
|
|
7
|
-
扩展 SDK
|
|
7
|
+
扩展 SDK 自 `reactive-md@0.8.0` 起提供,SDK 契约仍为 0.7.0。以下流程安装当前公开包;只有测试尚未发布的 SDK 改动时才需要从当前源码打包 tarball。完整类型与限制见 [SDK 指南](../integration/extension-sdk-ch.md)。历史实现与验收记录已归档,不再随文档维护。
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
## 便捷定义与宿主组合
|
|
@@ -51,7 +51,7 @@ export default { plugins: [reactiveMd()] };
|
|
|
51
51
|
|
|
52
52
|
准备 Node 22.12 或更高版本。React 适配器使用 React 19;模板的构建与浏览器测试依赖以它的 `package.json` 为准。
|
|
53
53
|
|
|
54
|
-
把 [examples/component-package](../../examples/component-package/README-ch.md) 复制到仓库之外的新目录,与 ReactiveMD 仓库并列,命名为 `my-reactivemd-plugin
|
|
54
|
+
把 [examples/component-package](../../examples/component-package/README-ch.md) 复制到仓库之外的新目录,与 ReactiveMD 仓库并列,命名为 `my-reactivemd-plugin`。模板的 `package.json` 声明 `reactive-md@^0.8.0`;新建组件包时,把该范围提升到目标发布版本。在新目录执行:
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
57
|
npm install
|
|
@@ -182,11 +182,11 @@ export function Playground() {
|
|
|
182
182
|
|
|
183
183
|
### 接入本仓库 Demo
|
|
184
184
|
|
|
185
|
-
把包的公开 React 入口转出到宿主 `plugin/<名称>/index.ts`,默认导出组件包。Demo 的 `plugin/tetris/` 与 `plugin/game-2048/`
|
|
185
|
+
把包的公开 React 入口转出到宿主 `plugin/<名称>/index.ts`,默认导出组件包。Demo 的 `plugin/tetris/` 与 `plugin/game-2048/` 是站点直接运行的本地实现;对应提交的 tarball 是安装包测试夹具,主题放在 `theme/`。预览、编辑器目录和离线导出共用生成的 host。修改包源码后重新构建与打包,使用带内容摘要的 vendor 文件名更新 Demo 依赖及 lockfile。
|
|
186
186
|
|
|
187
187
|
`resources.id` 与 manifest 的 `styles` 对应。Demo 接受内联 CSS 和 data URL;包可导出 CSS 文本,或由 Vite 通过 `?inline` 读取 CSS 文件。样例源码可以直接由包导出,登记中英文元数据后自动进入目录。Vite 去重和编译选项由宿主统一设置,新增包沿用这些设置。
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
在 `ReactiveMD-Demo` 仓库运行 `npm run build`,再运行 `npm run test:runtime-extensions`;加 `-- --dev` 复验开发模式。脚本覆盖真实 Worker、目录、控制操作与断网导出。此装配层属于 Demo,插件的公共契约仍是 manifest、React 实现、主题与资源;独立宿主按本节前面的示例装配。完整字段和限制见 [Demo 说明](https://github.com/yao1145/ReactiveMD-Demo/blob/main/README.md)。
|
|
190
190
|
|
|
191
191
|
## 6. 样式与独立主题
|
|
192
192
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A plugin is an npm component or theme package that a host installs, imports and composes explicitly. Its contract consists of data manifests, React implementations, authoring information and resources. Hosts assemble it with `createLocalConfig` and `createReactConfig`.
|
|
6
6
|
|
|
7
|
-
The SDK
|
|
7
|
+
The SDK has shipped since `reactive-md@0.8.0`. Install the current published package for this workflow; use a tarball built from the current source only when testing unreleased SDK changes. See the [SDK reference](../integration/extension-sdk-en.md) for types and limits. Historical delivery evidence is archived outside the published documentation.
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
## Convenience packages and host composition
|
|
@@ -36,7 +36,7 @@ New documents carry `componentConfigKey` through Worker transport and incrementa
|
|
|
36
36
|
|
|
37
37
|
Use Node 22.12 or later and React 19 for the React adapter. The template's `package.json` declares its build and browser test dependencies.
|
|
38
38
|
|
|
39
|
-
Copy [examples/component-package](../../examples/component-package/README.md) into a new sibling directory named `my-reactivemd-plugin`. The template
|
|
39
|
+
Copy [examples/component-package](../../examples/component-package/README.md) into a new sibling directory named `my-reactivemd-plugin`. The template's `package.json` declares `reactive-md@^0.8.0`; raise the range to the release you target when starting a new package. From that directory run:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
42
|
npm install
|
|
@@ -167,11 +167,11 @@ The editor reads titles, descriptions, category and insertion template from `aut
|
|
|
167
167
|
|
|
168
168
|
### Use the repository Demo
|
|
169
169
|
|
|
170
|
-
Forward the package's public React entry from the host project's `plugin/<name>/index.ts` as the default package export. The Demo's `plugin/tetris/` and `plugin/game-2048/` directories
|
|
170
|
+
Forward the package's public React entry from the host project's `plugin/<name>/index.ts` as the default package export. The Demo's `plugin/tetris/` and `plugin/game-2048/` directories hold local implementations that the site runs directly; their committed tarballs are installed-package fixtures, and CSS themes live under `theme/`. Preview, authoring and offline export share the generated host. After changing a package, rebuild and pack it, then update the Demo vendor dependency and lockfile using a content-addressed filename.
|
|
171
171
|
|
|
172
172
|
Resource IDs match manifest `styles`. Supply inline CSS with data URLs, either exported by the package or imported from a CSS file with Vite's `?inline`. Example source can come directly from the package; bilingual metadata registers it in the catalog. The host maintains Vite deduplication and compiler options for every package.
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
In the `ReactiveMD-Demo` repository, run `npm run build`, then `npm run test:runtime-extensions`; add `-- --dev` to exercise development mode. The script checks the real Worker, catalog, controls and exports opened offline. This assembly layer belongs to the Demo; packages retain the public manifest, React, theme and resource contracts. Independent hosts use the assembly example above. See the [Demo guide](https://github.com/yao1145/ReactiveMD-Demo/blob/main/README.md) for fields and limits.
|
|
175
175
|
|
|
176
176
|
## 6. Styles and independent themes
|
|
177
177
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](component-protocol-en.md)
|
|
4
4
|
|
|
5
|
-
协议修订 `component-protocol-3` · 适用语法 `local-draft-3` · 当前包版本 `0.
|
|
5
|
+
协议修订 `component-protocol-3` · 适用语法 `local-draft-3` · 当前包版本 `0.9.1`
|
|
6
6
|
|
|
7
7
|
Reactive MD 的组块就是语言中的组件。本协议规定组块在贡献、实现和验收中的共同契约,连接作者语法、编译器、运行时、React 参考适配器和机器验收数据。作者写文档时以[本地交互语法规范](../reference/local-interaction-syntax-ch.md)为准;宿主接入以[本地模式集成](../integration/local-integration-ch.md)为准;本文供贡献者、评审和测试使用。
|
|
8
8
|
|
|
@@ -114,7 +114,7 @@ Reactive MD 分别维护以下版本轴:
|
|
|
114
114
|
| 兼容分类 | 能力新增、破坏性变更或实现/编辑性变更 |
|
|
115
115
|
| 验收证据 | 自动测试、机器验收数据和人工浏览器检查 |
|
|
116
116
|
|
|
117
|
-
当前声明表是 `src/local/configuration/schema.ts`,标签词法集合在 `src/local/parsing/parser.ts`,语义校验在 `src/local/compilation/compiler.ts`,写入约束在 `src/local/runtime/runtime.ts`,渲染在 `src/local/rendering/LocalDocumentView.tsx` 和 `src/local/
|
|
117
|
+
当前声明表是 `src/local/configuration/schema.ts`,标签词法集合在 `src/local/parsing/parser.ts`,语义校验在 `src/local/compilation/compiler.ts`,写入约束在 `src/local/runtime/runtime.ts`,渲染在 `src/local/rendering/document/LocalDocumentView.tsx` 和 `src/local/rendering/visuals.tsx`。只改声明表不会自动获得解析、校验或渲染能力。
|
|
118
118
|
|
|
119
119
|
### CP-MODEL-04 名称集合(现有)
|
|
120
120
|
|
|
@@ -214,7 +214,7 @@ $$ y = x^2 $$
|
|
|
214
214
|
| `steps` | 当前步骤 value,独占 | `steps` |
|
|
215
215
|
| `selection` | 稳定行标识,空字符串表示未选 | 带 key 的 `table`、`chart` |
|
|
216
216
|
|
|
217
|
-
range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围、步长、默认值和原子批量写入见[
|
|
217
|
+
range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围、步长、默认值和原子批量写入见[语法规范](../reference/local-interaction-syntax-ch.md)。selection 允许表格和图表共享,但有序标识集合必须相同。新组件继续遵守以下初始化、拒绝写入、隐藏、重置和销毁条款。
|
|
218
218
|
|
|
219
219
|
`timer`、`checklist`、`tabs`、`diagram` 同时是独占 family:一个公开参数只能由一个组块拥有,其他控件不能声明同名绑定。宿主仍可通过所属节点调用公开的 `runtime.set`,写入遵守同一套校验。
|
|
220
220
|
|
|
@@ -314,12 +314,12 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
314
314
|
|
|
315
315
|
`plot` 是计算型可视化的代表:
|
|
316
316
|
|
|
317
|
-
- 正文只能是空白和一个或多个 `$$...$$` 公式块;每块定义一条显式 `y = 表达式` 曲线、一条参数方程 `\begin{cases} x = f(t) \\ y = g(t) \end{cases}` 曲线,或一条关于 `x` 和 `y` 的隐式方程。
|
|
318
|
-
- `min`、`max` 可以动态,要求 `min < max`;静态范围在编译期校验,动态范围在渲染时校验,非法范围显示局部错误,不静默截断。对显式曲线它们是横轴范围,对参数方程是 `t`
|
|
319
|
-
- `
|
|
320
|
-
-
|
|
317
|
+
- 正文只能是空白和一个或多个 `$$...$$` 公式块;每块定义一条显式 `y = 表达式` 曲线、一条参数方程 `\begin{cases} x = f(t) \\ y = g(t) \end{cases}` 曲线、一条极坐标 `r = f(\theta)` 曲线,或一条关于 `x` 和 `y` 的隐式方程。
|
|
318
|
+
- `min`、`max` 可以动态,要求 `min < max`;静态范围在编译期校验,动态范围在渲染时校验,非法范围显示局部错误,不静默截断。对显式曲线它们是横轴范围,对参数方程是 `t` 的范围,对极坐标是以弧度计的角度范围,对隐式方程决定方形追踪区域。
|
|
319
|
+
- `points` 是静态整数,范围 2 到 2000;旧属性 `samples` 继续有效,同时设置时以 `points` 为准,均省略时默认 200;每个 `plot` 最多 16 条曲线。
|
|
320
|
+
- 显式、参数或极坐标曲线请求指定数量的采样点,包含区间两端;隐式曲线每轴使用指定数量的网格点(上限 100、下限 32),按网格面积计入请求点数。
|
|
321
321
|
- 整篇文档的曲线采样点总数最多 20,000,包括隐藏区域;绘图计算共享 2,000,000 步预算。
|
|
322
|
-
- 公式只能引用已声明的数字参数;未声明参数或非数字参数在编译期诊断。参数方程块内的 `t`
|
|
322
|
+
- 公式只能引用已声明的数字参数;未声明参数或非数字参数在编译期诊断。参数方程块内的 `t` 和极坐标方程内的 `\theta` 分别是局部变量,在对应曲线中不读取同名文档参数。极坐标按 `x = r cos(θ)`、`y = r sin(θ)` 绘制并保留负半径的方向。
|
|
323
323
|
- 非有限采样形成断点,不把断点两侧直接连线;没有有效值时显示空态。
|
|
324
324
|
- 参考适配器提供图例、指针和键盘读数;真实指针、键盘和窄屏行为按第 11 节人工检查。
|
|
325
325
|
|
|
@@ -498,7 +498,7 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
498
498
|
|
|
499
499
|
本修订描述组件贡献要求和第 14 节的旧宿主接口。`LOCAL_COMPONENTS` 是默认预设的内部兼容投影;`hostComponents` 为单次编译接受纯 schema 数据,并作为输入适配到统一内核,组件实现由宿主提供。
|
|
500
500
|
|
|
501
|
-
[扩展 SDK](../integration/extension-sdk-ch.md)
|
|
501
|
+
[扩展 SDK](../integration/extension-sdk-ch.md)自 `reactive-md@0.8.0` 起提供,使用独立的 `reactive-md-component/v1` 数据契约和实例级配置,提供注册校验、React 实现绑定、编辑器目录、离线构建、版本恢复和公开合规工具。48 个默认渲染与结构组件采用同一公开契约。组件代码由宿主主动安装,文档声明不会装载代码。
|
|
502
502
|
|
|
503
503
|
## 10. 兼容、名称治理、修订和迁移
|
|
504
504
|
|
|
@@ -625,11 +625,11 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
625
625
|
| 组块声明 | `src/local/configuration/schema.ts` | 名称、形态、子项规则、属性、绑定、初值规则 |
|
|
626
626
|
| 编译校验 | `src/local/compilation/compiler.ts` | 结构、属性、初值、共享约束、表达式、表格和绘图预算 |
|
|
627
627
|
| 运行时 | `src/local/runtime/runtime.ts` | `get`、`set`、`evaluate`、`text`、`reset`、`resetToken`、`dispose` |
|
|
628
|
-
| React 参考适配器 | `src/local/rendering/LocalDocumentView.tsx` | 文档容器、控件、布局、可访问名称、重置和生命周期 |
|
|
629
|
-
| 可视化适配器 | `src/local/
|
|
630
|
-
| 样式 | `src/styles.css`、`src/
|
|
628
|
+
| React 参考适配器 | `src/local/rendering/document/LocalDocumentView.tsx` | 文档容器、控件、布局、可访问名称、重置和生命周期 |
|
|
629
|
+
| 可视化适配器 | `src/local/rendering/visuals.tsx`、`src/local/evaluation/math/latex.ts`、`src/local/rendering/math-view.tsx` | 表格、图表、绘图、时间轴、图解和数学渲染 |
|
|
630
|
+
| 样式 | `src/styles/index.css`、`src/themes/default/`、`src/components/` 中的 CSS、`src/local/rendering/document/local.css` | 公共入口、完整默认值和组件样式 |
|
|
631
631
|
| 预算 | `src/local/configuration/limits.ts` | 共享资源上限 |
|
|
632
|
-
| 版本 | `src/local/
|
|
632
|
+
| 版本 | `src/local/types.ts`、`package.json` | 语法修订和包版本 |
|
|
633
633
|
| 验收 | `tests/`、`examples/conformance/` | 语言测试和机器验收数据 |
|
|
634
634
|
| 文档 | `docs/`、`README.md`、`CONTRIBUTING-ch.md`、`SECURITY-ch.md` | 语法、集成、兼容、安全和贡献规则 |
|
|
635
635
|
|
|
@@ -745,4 +745,4 @@ React 视图把 `hostComponent` 节点分发给 `hostRenderer(node, data, ctx)`
|
|
|
745
745
|
| `component-protocol-1` | 2026-10-23 | 初版;最初适用于 `local-draft-1` 和包版本 `0.3.0`,定义组块贡献、验收和扩展边界。现在适用于 `local-draft-2` 和 `0.4.0` 预览版,MUST 条款和机器格式不变。 |
|
|
746
746
|
|
|
747
747
|
|
|
748
|
-
|
|
748
|
+
组块与状态规则见[本地交互语法规范](../reference/local-interaction-syntax-ch.md),升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](component-protocol-ch.md)
|
|
4
4
|
|
|
5
|
-
Protocol revision `component-protocol-3` · applicable syntax `local-draft-3` · current package version `0.
|
|
5
|
+
Protocol revision `component-protocol-3` · applicable syntax `local-draft-3` · current package version `0.9.1`
|
|
6
6
|
|
|
7
7
|
Components are the building blocks of the Reactive MD language. This protocol defines the shared contract for contribution, implementation and acceptance, connecting author syntax, the compiler, the runtime, the React reference adapter and machine conformance data. Authors writing documents follow the [local interaction syntax specification](../reference/local-interaction-syntax-en.md); hosts integrating follow [local mode integration](../integration/local-integration-en.md); this document is for contributors, reviewers and tests.
|
|
8
8
|
|
|
@@ -114,7 +114,7 @@ A component proposal declaration contains at least the following information; it
|
|
|
114
114
|
| Compatibility classification | Capability addition, breaking change or implementation/editorial change |
|
|
115
115
|
| Acceptance evidence | Automated tests, machine conformance data and manual browser checks |
|
|
116
116
|
|
|
117
|
-
The current declaration table is `src/local/configuration/schema.ts`; the tag lexical sets are in `src/local/parsing/parser.ts`, semantic validation in `src/local/compilation/compiler.ts`, write constraints in `src/local/runtime/runtime.ts`, and rendering in `src/local/rendering/LocalDocumentView.tsx` and `src/local/
|
|
117
|
+
The current declaration table is `src/local/configuration/schema.ts`; the tag lexical sets are in `src/local/parsing/parser.ts`, semantic validation in `src/local/compilation/compiler.ts`, write constraints in `src/local/runtime/runtime.ts`, and rendering in `src/local/rendering/document/LocalDocumentView.tsx` and `src/local/rendering/visuals.tsx`. Changing only the declaration table does not automatically provide parsing, validation or rendering.
|
|
118
118
|
|
|
119
119
|
### CP-MODEL-04 Name set (existing)
|
|
120
120
|
|
|
@@ -214,7 +214,7 @@ Components without `bind` still have internal state under the internal key `@<no
|
|
|
214
214
|
| `steps` | Current step value, exclusive | `steps` |
|
|
215
215
|
| `selection` | Stable row key, empty string when unselected | `table` and `chart` with key |
|
|
216
216
|
|
|
217
|
-
Each numeric slot of range-slider and coordinate is also exclusive. Bounds, steps, defaults and atomic batch writes are defined in the [
|
|
217
|
+
Each numeric slot of range-slider and coordinate is also exclusive. Bounds, steps, defaults and atomic batch writes are defined in the [syntax specification](../reference/local-interaction-syntax-en.md). Selection can be shared by tables and charts only with identical ordered keys. The initialization, rejection, visibility, reset and disposal clauses below continue to apply.
|
|
218
218
|
|
|
219
219
|
`timer`, `checklist`, `tabs` and `diagram` are also exclusive families: a public parameter can be owned by only one component, and other controls cannot declare a same-name binding. Hosts can still call the public `runtime.set` through the owning node, and writes follow the same validation.
|
|
220
220
|
|
|
@@ -315,12 +315,12 @@ Intermediate input in number and text fields that is not yet valid is kept in a
|
|
|
315
315
|
|
|
316
316
|
`plot` represents a computational visualization:
|
|
317
317
|
|
|
318
|
-
- The body may contain only whitespace and one or more `$$...$$` formula blocks. Each block defines one explicit `y = expression` curve, one parametric `\begin{cases} x = f(t) \\ y = g(t) \end{cases}` curve, or one implicit equation in `x` and `y`.
|
|
319
|
-
- `min` and `max` may be dynamic and require `min < max`; static ranges are validated at compile time and dynamic ranges at render time. Invalid ranges show a local error instead of being silently clamped. They set the horizontal range for explicit curves, the `t` range for parametric curves, and the square tracing region for implicit curves.
|
|
320
|
-
- `
|
|
321
|
-
- An explicit or
|
|
318
|
+
- The body may contain only whitespace and one or more `$$...$$` formula blocks. Each block defines one explicit `y = expression` curve, one parametric `\begin{cases} x = f(t) \\ y = g(t) \end{cases}` curve, one polar `r = f(\theta)` curve, or one implicit equation in `x` and `y`.
|
|
319
|
+
- `min` and `max` may be dynamic and require `min < max`; static ranges are validated at compile time and dynamic ranges at render time. Invalid ranges show a local error instead of being silently clamped. They set the horizontal range for explicit curves, the `t` range for parametric curves, the angle interval in radians for polar curves, and the square tracing region for implicit curves.
|
|
320
|
+
- `points` is a static integer from 2 to 2000. The existing `samples` attribute remains supported; `points` takes precedence when both are supplied, and the default is 200 when both are omitted. Each `plot` has at most 16 curves.
|
|
321
|
+
- An explicit, parametric or polar curve requests the specified number of points, including both endpoints. An implicit curve uses the specified number of grid points per axis (capped at 100, raised to at least 32) and requests the grid area.
|
|
322
322
|
- The whole document has at most 20,000 curve sample points, including hidden regions; plotting computation shares a budget of 2,000,000 steps.
|
|
323
|
-
- Formulas may reference only declared numeric parameters; undeclared or non-numeric parameters are diagnosed at compile time. `t` is local to a parametric block and
|
|
323
|
+
- Formulas may reference only declared numeric parameters; undeclared or non-numeric parameters are diagnosed at compile time. `t` is local to a parametric block, and `\theta` is local to a polar equation; neither reads the same-named document parameter in its curve. Polar samples use `x = r cos(θ)`, `y = r sin(θ)` and preserve the direction of negative radii.
|
|
324
324
|
- Non-finite samples form breaks, and the two sides of a break are not connected directly; when there are no valid values, an empty state is shown.
|
|
325
325
|
- The reference adapter provides legends and pointer/keyboard readouts; real pointer, keyboard and narrow-screen behavior is checked manually as described in section 11.
|
|
326
326
|
|
|
@@ -499,7 +499,7 @@ Components that reuse public rules need a definition, implementation and registr
|
|
|
499
499
|
|
|
500
500
|
This revision describes contribution requirements and the legacy host interface in section 14. `LOCAL_COMPONENTS` is an internal compatibility projection of the default preset. `hostComponents` accepts plain schema data for one compilation and adapts it to the shared kernel, with implementations supplied by the host.
|
|
501
501
|
|
|
502
|
-
The source tree's [extension SDK](../integration/extension-sdk-en.md)
|
|
502
|
+
The source tree's [extension SDK](../integration/extension-sdk-en.md) has shipped since `reactive-md@0.8.0` and uses a separate `reactive-md-component/v1` data contract and instance configuration for registration validation, React implementations, editor catalogs, offline builds, versioned restoration and public compliance tools. All 48 default rendered and structural components use this contract. Hosts explicitly install component code; document declarations never load it.
|
|
503
503
|
|
|
504
504
|
## 10. Compatibility, name governance, revisions and migration
|
|
505
505
|
|
|
@@ -626,11 +626,11 @@ Only SHOULD clauses can be exempted; exemptions must record the rationale, alter
|
|
|
626
626
|
| Component declarations | `src/local/configuration/schema.ts` | Names, shapes, child rules, attributes, bindings, initial-value rules |
|
|
627
627
|
| Compile validation | `src/local/compilation/compiler.ts` | Structure, attributes, initial values, shared constraints, expressions, table and plot budgets |
|
|
628
628
|
| Runtime | `src/local/runtime/runtime.ts` | `get`, `set`, `evaluate`, `text`, `reset`, `resetToken`, `dispose` |
|
|
629
|
-
| React reference adapter | `src/local/rendering/LocalDocumentView.tsx` | Document container, controls, layout, accessible names, reset and lifecycle |
|
|
630
|
-
| Visualization adapter | `src/local/
|
|
631
|
-
| Styles | `src/styles.css`, `src/
|
|
629
|
+
| React reference adapter | `src/local/rendering/document/LocalDocumentView.tsx` | Document container, controls, layout, accessible names, reset and lifecycle |
|
|
630
|
+
| Visualization adapter | `src/local/rendering/visuals.tsx`, `src/local/evaluation/math/latex.ts`, `src/local/rendering/math-view.tsx` | Tables, charts, plots, timelines, diagrams and math rendering |
|
|
631
|
+
| Styles | `src/styles/index.css`, `src/themes/default/`, component CSS under `src/components/`, `src/local/rendering/document/local.css` | Public entry, complete defaults and component styles |
|
|
632
632
|
| Budgets | `src/local/configuration/limits.ts` | Shared resource limits |
|
|
633
|
-
| Versions | `src/local/
|
|
633
|
+
| Versions | `src/local/types.ts`, `package.json` | Syntax revision and package version |
|
|
634
634
|
| Acceptance | `tests/`, `examples/conformance/` | Language tests and machine conformance data |
|
|
635
635
|
| Documentation | `docs/`, `README.md`, `CONTRIBUTING.md`, `SECURITY.md` | Syntax, integration, compatibility, security and contribution rules |
|
|
636
636
|
|
|
@@ -747,4 +747,4 @@ Portable machine cases remain `examples/conformance/component-protocol-1.json`,
|
|
|
747
747
|
| `component-protocol-1` | 2026-10-23 | Initial version; originally applied to `local-draft-1` and package version `0.3.0`, defining component contribution, acceptance and extension boundaries. It now applies to `local-draft-2` and the `0.4.0` preview release without changing its MUST clauses or machine format. |
|
|
748
748
|
|
|
749
749
|
|
|
750
|
-
See [
|
|
750
|
+
See the [syntax specification](../reference/local-interaction-syntax-en.md) for tags, colors, slot state and selection rules, and [Versions and compatibility](../compatibility/compatibility-en.md) for version mapping and migration guidance.
|