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
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
`sum`、`average`、`minOf`、`maxOf`、`formatNumber`、`formatPercent`、`formatScientific`、`formatCurrency`、`trim`、`lower`、`upper`、`startsWith`、`endsWith`、`replace`、`slice`、`dateCompare`、`dateDiff`。
|
|
44
44
|
|
|
45
|
-
它们与原有保留名共同生效:数学与集合函数(`abs`、`sqrt`、`floor`、`ceil`、`round`、`min`、`max`、`pow`、`sin`、`cos`、`tan`、`asin`、`acos`、`atan`、`exp`、`log`、`len`、`contains`、`clamp`)、常量 `pi` 与 `e`、绘图名 `x` 与 `y`、字面量 `true`、`false`、`null`,以及 `__proto__`、`prototype`、`constructor`。详见[
|
|
45
|
+
它们与原有保留名共同生效:数学与集合函数(`abs`、`sqrt`、`floor`、`ceil`、`round`、`min`、`max`、`pow`、`sin`、`cos`、`tan`、`asin`、`acos`、`atan`、`exp`、`log`、`len`、`contains`、`clamp`)、常量 `pi` 与 `e`、绘图名 `x` 与 `y`、字面量 `true`、`false`、`null`,以及 `__proto__`、`prototype`、`constructor`。详见[本地交互语法规范](../reference/local-interaction-syntax-ch.md)。
|
|
46
46
|
|
|
47
47
|
### 新增可识别标签名
|
|
48
48
|
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
|
|
89
89
|
静态 SSR 由 packed 检查覆盖。单文件导出的静态首屏水合由 Playwright Chromium 和本地 Edge 检查覆盖。该路径之外的通用 SSR 水合、Firefox 与 Safari/WebKit 尚未验证,不作支持声明。
|
|
90
90
|
|
|
91
|
-
版本规则与诊断契约见[版本与兼容性](../compatibility/compatibility-ch.md),修订指令与迁移工具见[源码修订与迁移](../compatibility/source-versioning-ch.md),HTML 与状态格式见[可分享文档与静态导出](../integration/shareable-export-ch.md)
|
|
91
|
+
版本规则与诊断契约见[版本与兼容性](../compatibility/compatibility-ch.md),修订指令与迁移工具见[源码修订与迁移](../compatibility/source-versioning-ch.md),HTML 与状态格式见[可分享文档与静态导出](../integration/shareable-export-ch.md),组块与规则见[本地交互语法规范](../reference/local-interaction-syntax-ch.md)。
|
|
@@ -42,7 +42,7 @@ The new expression functions are reserved binding names. Rename any existing con
|
|
|
42
42
|
|
|
43
43
|
`sum`, `average`, `minOf`, `maxOf`, `formatNumber`, `formatPercent`, `formatScientific`, `formatCurrency`, `trim`, `lower`, `upper`, `startsWith`, `endsWith`, `replace`, `slice`, `dateCompare`, `dateDiff`.
|
|
44
44
|
|
|
45
|
-
These join the existing reserved names: math and collection functions (`abs`, `sqrt`, `floor`, `ceil`, `round`, `min`, `max`, `pow`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `exp`, `log`, `len`, `contains`, `clamp`), the constants `pi` and `e`, the plot names `x` and `y`, the literals `true`, `false` and `null`, and `__proto__`, `prototype` and `constructor`. See [
|
|
45
|
+
These join the existing reserved names: math and collection functions (`abs`, `sqrt`, `floor`, `ceil`, `round`, `min`, `max`, `pow`, `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `exp`, `log`, `len`, `contains`, `clamp`), the constants `pi` and `e`, the plot names `x` and `y`, the literals `true`, `false` and `null`, and `__proto__`, `prototype` and `constructor`. See [Formatting, strings and dates](../reference/local-interaction-syntax-en.md#55-formatting-strings-and-dates).
|
|
46
46
|
|
|
47
47
|
### Newly recognized tag names
|
|
48
48
|
|
|
@@ -88,4 +88,4 @@ The `0.4.0` build targets Node.js 22.12 and Node 24; its CI gate uses Playwright
|
|
|
88
88
|
|
|
89
89
|
Static SSR is covered by the packed check. Single-file export static-first hydration is covered by the Playwright Chromium and local Edge checks. General SSR hydration outside that path, Firefox and Safari/WebKit are unverified and are not claimed as supported.
|
|
90
90
|
|
|
91
|
-
Use [Versions and compatibility](../compatibility/compatibility-en.md) for the version rules and diagnostics contract, [Source revisions and migration](../compatibility/source-versioning-en.md) for the directive and migration tools, [Shareable documents and static export](../integration/shareable-export-en.md) for the HTML and state formats, and [
|
|
91
|
+
Use [Versions and compatibility](../compatibility/compatibility-en.md) for the version rules and diagnostics contract, [Source revisions and migration](../compatibility/source-versioning-en.md) for the directive and migration tools, [Shareable documents and static export](../integration/shareable-export-en.md) for the HTML and state formats, and the [syntax specification](../reference/local-interaction-syntax-en.md) for the component additions.
|
|
@@ -38,10 +38,26 @@ npm install react@19 react-dom@19
|
|
|
38
38
|
| `reactive-md/editor/styles.css` | `reactive-md-editor/styles.css` |
|
|
39
39
|
| `reactive-md/editor/codemirror/styles.css` | `reactive-md-editor/codemirror/styles.css` |
|
|
40
40
|
|
|
41
|
-
编辑器仍是受控的 React 19 组件,编辑能力保持不变:高亮、工具栏与插入命令、补全、绑定导航、重命名与格式化、撤销重做、诊断和 ref 句柄。见[编辑器指南](../integration/editor-ch.md)和[
|
|
41
|
+
编辑器仍是受控的 React 19 组件,编辑能力保持不变:高亮、工具栏与插入命令、补全、绑定导航、重命名与格式化、撤销重做、诊断和 ref 句柄。见[编辑器指南](../integration/editor-ch.md)和[仓库拆分与导入迁移](#仓库拆分与导入迁移)。
|
|
42
42
|
|
|
43
43
|
本次变更不附带文档语法或状态格式迁移。`local-draft-3` 仍是唯一接受的修订,SDK、组块、主题和状态协议保持原值。恢复状态时仍校验源码摘要、组件配置键和身份。
|
|
44
44
|
|
|
45
|
+
## 仓库拆分与导入迁移
|
|
46
|
+
|
|
47
|
+
三个仓库独立安装、构建、维护版本和发布:
|
|
48
|
+
|
|
49
|
+
| 仓库 | 准备发布的版本 | 交付 |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| [ReactiveMD](https://github.com/yao1145/ReactiveMD) | `reactive-md@0.8.0` | 编译器、运行时、编译会话、Worker、作者服务、SDK、React/SSR、导出 |
|
|
52
|
+
| [ReactiveMD-Editor](https://github.com/yao1145/ReactiveMD-Editor) | `reactive-md-editor@0.1.0` | CodeMirror、工具栏、导航、诊断呈现、编辑器 Worker |
|
|
53
|
+
| [ReactiveMD-Demo](https://github.com/yao1145/ReactiveMD-Demo) | 私有网站包 `0.1.0` | 示例网站、组件装配、静态资源和部署 |
|
|
54
|
+
|
|
55
|
+
导入替换表见上文[破坏性变更](#破坏性变更)。编辑器只通过 `reactive-md` 和 `reactive-md/authoring` 的公开 API 使用引擎;纯作者命令和组件目录可直接从 `reactive-md/authoring` 使用,不需要编辑器 UI。
|
|
56
|
+
|
|
57
|
+
候选消费者提交内容寻址的 `vendor/*.tgz` tarball 和 lockfile integrity。编辑器按公共 API 兼容性声明引擎 peer 范围;其开发安装与 Demo 用精确 tarball 固定候选组合。先发布引擎 0.8.0,再发布编辑器 0.1.0。更新候选组合时,在引擎运行 `npm run check` 和 `npm run notices`,用 `--ignore-scripts` 打包,将包复制到编辑器的 `vendor` 目录,在编辑器中安装、运行检查并打包,最后按需更新 Demo 的 vendor 依赖。候选包内容变化时更新实际 tarball 和锁文件。正式发布后改用 registry 版本范围,并在干净目录重新安装验证。
|
|
58
|
+
|
|
59
|
+
引擎 CI 使用一个 Node 24 作业:类型、构建、保留的回归和真实打包消费。编辑器检查自身 UI 服务与公开引擎消费;Demo 检查网站、导出和桌面/手机交互。旧阶段矩阵已停用,历史可通过 Git 追溯。站点部署遵循 Demo 仓库的 `AGENTS.md`;编辑器首次发布前需配置独立的 trusted publisher 和 `publish.yml`。
|
|
60
|
+
|
|
45
61
|
## 最小升级步骤
|
|
46
62
|
|
|
47
63
|
1. 将引擎升级到 `reactive-md@0.8.0`。
|
|
@@ -58,12 +74,12 @@ import { createCompiler } from 'reactive-md/compiler';
|
|
|
58
74
|
import { createStandardCompiler } from 'reactive-md/compiler/standard';
|
|
59
75
|
|
|
60
76
|
const minimal = createCompiler().compile('# Notes');
|
|
61
|
-
const standard = createStandardCompiler().compile('<number bind="n" initial="2">\n\n{{ n * 3 }}');
|
|
77
|
+
const standard = createStandardCompiler().compile('<number bind="n" label="数量" initial="2">\n\n{{ n * 3 }}');
|
|
62
78
|
```
|
|
63
79
|
|
|
64
80
|
`createCompiler` 不注册组件,保留 CommonMark、RMD 结构、表达式、绑定和预算。`createStandardCompiler` 安装默认预设和 KaTeX 展示检查。编译不创建编辑会话、Worker 或运行时,也不加载 React、主题实现或 CSS。结果使用 `status: 'valid' | 'recovered' | 'failed'`,并保留 `ok`、`document` 读取方式。最小入口的结果带有自己的组件配置键,把它交给使用默认配置的现有渲染器会报告 `local.extension.config-mismatch`;现有 React 与 SSR 宿主应使用标准入口。
|
|
65
81
|
|
|
66
|
-
两个工厂都接受 `strict`,严格模式是默认值。设置 `strict: false` 后,未闭合或错配的区域保留为原始文本,每个最终恢复产生一条稳定 warning,编译在可靠边界继续。可恢复的结构问题不会降级绑定、类型、配置、版本或预算错误。两种模式都把无空行的 `<details>` / `<summary>` 片段映射为单个 disclosure。见[单次编译入口](../integration/compiler-ch.md)和[
|
|
82
|
+
两个工厂都接受 `strict`,严格模式是默认值。设置 `strict: false` 后,未闭合或错配的区域保留为原始文本,每个最终恢复产生一条稳定 warning,编译在可靠边界继续。可恢复的结构问题不会降级绑定、类型、配置、版本或预算错误。两种模式都把无空行的 `<details>` / `<summary>` 片段映射为单个 disclosure。见[单次编译入口](../integration/compiler-ch.md)和[严格解析与局部恢复](../integration/local-integration-ch.md#严格解析与局部恢复)。
|
|
67
83
|
|
|
68
84
|
## 运行时服务与持久化
|
|
69
85
|
|
|
@@ -38,10 +38,26 @@ The engine package no longer exports the editor. The old entries belong to publi
|
|
|
38
38
|
| `reactive-md/editor/styles.css` | `reactive-md-editor/styles.css` |
|
|
39
39
|
| `reactive-md/editor/codemirror/styles.css` | `reactive-md-editor/codemirror/styles.css` |
|
|
40
40
|
|
|
41
|
-
The editor remains a controlled React 19 component with the same editing surface: highlighting, toolbar and insertion commands, completion, binding navigation, rename and format, undo and redo, diagnostics and the ref handle. See the [editor guide](../integration/editor-en.md) and
|
|
41
|
+
The editor remains a controlled React 19 component with the same editing surface: highlighting, toolbar and insertion commands, completion, binding navigation, rename and format, undo and redo, diagnostics and the ref handle. See the [editor guide](../integration/editor-en.md) and [repository split and import migration](#repository-split-and-import-migration).
|
|
42
42
|
|
|
43
43
|
No document-syntax or state-format migration accompanies this change. `local-draft-3` remains the only accepted revision, and the SDK, component, theme and state protocols keep their previous values. State restoration still checks the source digest, component configuration key and identity.
|
|
44
44
|
|
|
45
|
+
## Repository split and import migration
|
|
46
|
+
|
|
47
|
+
The engine, editor and website have independent repositories, versions and release workflows:
|
|
48
|
+
|
|
49
|
+
| Repository | Prepared release | Responsibility |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| [ReactiveMD](https://github.com/yao1145/ReactiveMD) | `reactive-md@0.8.0` | Compiler, runtime, sessions, Worker, authoring services, SDK, React/SSR, export |
|
|
52
|
+
| [ReactiveMD-Editor](https://github.com/yao1145/ReactiveMD-Editor) | `reactive-md-editor@0.1.0` | CodeMirror, toolbar, navigation, diagnostics, editor Worker |
|
|
53
|
+
| [ReactiveMD-Demo](https://github.com/yao1145/ReactiveMD-Demo) | Private website package `0.1.0` | Website, examples, extension assembly, deployment |
|
|
54
|
+
|
|
55
|
+
The import replacement table is in [Breaking changes](#breaking-changes) above. The editor consumes only public `reactive-md` and `reactive-md/authoring` APIs; authoring commands and catalogs stay available from `reactive-md/authoring` without the editor UI.
|
|
56
|
+
|
|
57
|
+
Candidate consumers commit content-addressed `vendor/*.tgz` tarballs with lockfile integrity. The editor declares its engine peer range from public API compatibility; its development install and the Demo pin exact tarballs. Publish the 0.8.0 engine before the 0.1.0 editor. To update the candidates: run the engine `npm run check` and `npm run notices`, pack with `--ignore-scripts`, copy the package into the editor `vendor` directory, install in the editor, run its check and pack it, then update the Demo vendor if a website update is requested. Refresh tarballs and lockfiles whenever candidate contents change. After registry publication, switch to registry version ranges and verify a clean install.
|
|
58
|
+
|
|
59
|
+
Engine CI runs one Node 24 job for types, build, retained regressions and actual package consumption. Editor checks own UI services and public-engine consumption; Demo checks the website, export and desktop/mobile interaction. Historical phase matrices are retired; Git history preserves them. Website deployment follows the Demo repository's `AGENTS.md`, and the editor needs its own trusted publisher and `publish.yml`.
|
|
60
|
+
|
|
45
61
|
## Minimal upgrade
|
|
46
62
|
|
|
47
63
|
1. Update the engine to `reactive-md@0.8.0`.
|
|
@@ -58,12 +74,12 @@ import { createCompiler } from 'reactive-md/compiler';
|
|
|
58
74
|
import { createStandardCompiler } from 'reactive-md/compiler/standard';
|
|
59
75
|
|
|
60
76
|
const minimal = createCompiler().compile('# Notes');
|
|
61
|
-
const standard = createStandardCompiler().compile('<number bind="n" initial="2">\n\n{{ n * 3 }}');
|
|
77
|
+
const standard = createStandardCompiler().compile('<number bind="n" label="Count" initial="2">\n\n{{ n * 3 }}');
|
|
62
78
|
```
|
|
63
79
|
|
|
64
80
|
`createCompiler` registers no components and keeps CommonMark, RMD structure, expressions, bindings and budgets. `createStandardCompiler` installs the default preset and the KaTeX display checks. Compilation creates no editing session, Worker or runtime and loads no React, theme implementation or CSS. Results use `status: 'valid' | 'recovered' | 'failed'` and keep the `ok` and `document` read path. A minimal result carries its own component configuration key, so passing it to the existing renderer with its default configuration reports `local.extension.config-mismatch`; use the standard entry for the existing React and SSR hosts.
|
|
65
81
|
|
|
66
|
-
Both factories accept `strict`. Strict mode is the default. With `strict: false`, an unclosed or mismatched region stays as literal source, each finalized recovery produces one stable warning, and compilation resumes at a reliable boundary. Recoverable structure does not downgrade binding, type, configuration, version or budget errors. Both modes map a blank-line-free `<details>` / `<summary>` fragment to one disclosure. See [one-shot compilation](../integration/compiler-en.md) and [strict parsing and local recovery](../
|
|
82
|
+
Both factories accept `strict`. Strict mode is the default. With `strict: false`, an unclosed or mismatched region stays as literal source, each finalized recovery produces one stable warning, and compilation resumes at a reliable boundary. Recoverable structure does not downgrade binding, type, configuration, version or budget errors. Both modes map a blank-line-free `<details>` / `<summary>` fragment to one disclosure. See [one-shot compilation](../integration/compiler-en.md) and [strict parsing and local recovery](../integration/local-integration-en.md#strict-parsing-and-local-recovery).
|
|
67
83
|
|
|
68
84
|
## Runtime services and persistence
|
|
69
85
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# ReactiveMD 0.9.0
|
|
2
|
+
|
|
3
|
+
[English](release-0.9.0-en.md) · **中文**
|
|
4
|
+
|
|
5
|
+
从 npm 安装 `reactive-md@0.9.0`。
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 主要更新
|
|
12
|
+
|
|
13
|
+
### 主题层叠与控件
|
|
14
|
+
|
|
15
|
+
默认主题现以语义 token 和 CSS 层定义文档结构及组件样式基线。宿主和扩展可以在共享 token 的同时覆盖主题层。标题比例覆盖 h1 至 h6,默认控件与表格样式也已和文档排版统一。详见[主题协议](../reference/theme-protocol-ch.md)和[主题集成指南](../integration/local-integration-ch.md)。
|
|
16
|
+
|
|
17
|
+
### 18 个组件的精简预设
|
|
18
|
+
|
|
19
|
+
`reactive-md/presets/minimal` 与 `reactive-md/react/minimal` 提供输入、基础布局、条件内容、提示、徽标、导航和文本组件,不加载完整默认组件集。图表、网络或其他官方包可通过扩展 SDK 显式添加。精简预设由 minimal-budget 示例和脚手架检查覆盖。
|
|
20
|
+
|
|
21
|
+
### 静态 PDF 导出
|
|
22
|
+
|
|
23
|
+
CLI 新增 `--format pdf`,Node 宿主可从 `reactive-md/pdf` 调用 `renderLocalPdf`。PDF 使用 Chromium 渲染静态 HTML,并支持纸张、横向、页边距和打印背景设置。导出环境需要安装 Playwright 及其 Chromium 浏览器。
|
|
24
|
+
|
|
25
|
+
### 具名宿主网络通道
|
|
26
|
+
|
|
27
|
+
宿主可以通过运行时向文档开放命名提交与订阅通道。文档使用通道名,宿主管理端点、凭据、校验、传输、取消和幂等键。适配器包括 HTTP 提交、SSE、WebSocket 和 WebRTC。通道限制 JSON 负载大小,也可将订阅数据映射到外部变量。参阅[宿主网络指南](../integration/network-host-ch.md)和[网络问卷示例](../../examples/network-survey/README.md)。
|
|
28
|
+
|
|
29
|
+
### 绘图公式与扩展入门
|
|
30
|
+
|
|
31
|
+
`<plot>` 支持 `r = f(θ)` 等极坐标方程,并允许为显式、参数和极坐标曲线配置采样点数。采样遵守整篇文档的计算预算。扩展作者教程现覆盖组件创建、预览、SSR、离线导出和包检查。`reactive-md/export-assets` 入口为构建工具提供 HTML 导出文件的稳定清单。
|
|
32
|
+
|
|
33
|
+
### 其他更新
|
|
34
|
+
|
|
35
|
+
- 提示框新增 `error` 色调和 `role="alert"`。静态属性和动态色调表达式都支持 `error`。
|
|
36
|
+
- 修复解析器屏蔽、表格管道符、HTML 属性解码、状态恢复校验、动态约束和增量会话边界。
|
|
37
|
+
- 诊断、状态采样、图表标签与 CLI 输出截断时,不会留下落单的 UTF-16 高代理项。
|
|
38
|
+
- 已按当前源码布局重新测量性能总览。
|
|
39
|
+
|
|
40
|
+
## 兼容性
|
|
41
|
+
|
|
42
|
+
本次包发布不改变语法、SDK、主题、组件或状态协议版本。`local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 和 `0.7.0` SDK 契约继续有效。升级引擎包无需迁移已有文档源码和状态文件。
|
|
43
|
+
|
|
44
|
+
引擎、编辑器与 Demo 分别发布。通过 `reactive-md-editor` 安装编辑器。
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# ReactiveMD 0.9.0
|
|
2
|
+
|
|
3
|
+
**English** · [中文](release-0.9.0-ch.md)
|
|
4
|
+
|
|
5
|
+
Install `reactive-md@0.9.0` from npm.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Highlights
|
|
12
|
+
|
|
13
|
+
### Theme cascade and controls
|
|
14
|
+
|
|
15
|
+
The default theme now uses semantic tokens and cascade layers to define a stable baseline for document structure and component styling. Host and extension styles can override theme layers while sharing the same tokens. The heading scale now covers h1 through h6, and the default control and table styles have been aligned with the document typography. See the [theme protocol](../reference/theme-protocol-en.md) and the [theme integration guide](../integration/local-integration-en.md).
|
|
16
|
+
|
|
17
|
+
### 18-component minimal profile
|
|
18
|
+
|
|
19
|
+
`reactive-md/presets/minimal` and `reactive-md/react/minimal` provide inputs, basic layout, conditional content, alerts, badges, navigation, and text components without loading the full default component set. Add charting, networking, or other official packages explicitly through the extension SDK. The profile is covered by the minimal-budget example and scaffold checks.
|
|
20
|
+
|
|
21
|
+
### Static PDF export
|
|
22
|
+
|
|
23
|
+
The CLI accepts `--format pdf`, and Node hosts can call `renderLocalPdf` from `reactive-md/pdf`. PDF output renders static HTML with Chromium and supports paper size, landscape orientation, margins, and background printing. Install Playwright and its Chromium browser in the exporting environment.
|
|
24
|
+
|
|
25
|
+
### Named host network channels
|
|
26
|
+
|
|
27
|
+
Hosts can expose named submit and subscription channels through the runtime. Documents use channel names. Hosts manage endpoints, credentials, validation, transport, cancellation and idempotency. Adapters include HTTP submit, SSE, WebSocket and WebRTC. Channels limit JSON payload size and can map subscription values to document externals. See the [host network guide](../integration/network-host-en.md) and the [network survey example](../../examples/network-survey/README.md).
|
|
28
|
+
|
|
29
|
+
### Plot formulas and extension onboarding
|
|
30
|
+
|
|
31
|
+
`<plot>` accepts polar equations such as `r = f(θ)` and a configurable point count for explicit, parametric and polar curves. Sampling shares document-level computation budgets. The extension author tutorial now walks through component creation, preview, SSR, offline export and package checks. The `reactive-md/export-assets` entry gives build tools a stable manifest for the files used by HTML export.
|
|
32
|
+
|
|
33
|
+
### Other updates
|
|
34
|
+
|
|
35
|
+
- The `error` tone renders a danger callout with `role="alert"` and works in literal values and dynamic tone expressions.
|
|
36
|
+
- Parser shielding, table-pipe handling, HTML attribute decoding, restored-state validation, dynamic constraints and incremental-session boundaries have been corrected.
|
|
37
|
+
- Diagnostics, state samples, chart labels and CLI output truncate without leaving an unpaired UTF-16 surrogate.
|
|
38
|
+
- The performance overview has been rerun against the current source layout.
|
|
39
|
+
|
|
40
|
+
## Compatibility
|
|
41
|
+
|
|
42
|
+
No syntax, SDK, theme, component, or state protocol revision changes in this package release. `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1`, and the SDK contract `0.7.0` remain current. Existing document source and state files need no migration for the engine package update.
|
|
43
|
+
|
|
44
|
+
The engine remains independent from the editor and Demo releases. The 0.8 repository split still applies: use `reactive-md-editor` for the editor package.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ReactiveMD 0.9.1
|
|
2
|
+
|
|
3
|
+
[English](release-0.9.1-en.md) · **中文**
|
|
4
|
+
|
|
5
|
+
从 npm 安装 `reactive-md@0.9.1`:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.1
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
0.9.1 补丁版本发布说明(2026-11-22)。
|
|
12
|
+
|
|
13
|
+
## 主要更新
|
|
14
|
+
|
|
15
|
+
### 流式源码编译优化
|
|
16
|
+
|
|
17
|
+
流式源码路径现在支持显式的 `streaming` 或 `final` 阶段,覆盖编译会话、`LocalCompileScheduler`、Worker 和 `LocalReactiveDocument`。未完成的区域以原文显示,可由后续源码修复的问题通过 `transientDiagnostics` 报告。确定性错误以及最终阶段的严格与恢复语义保持不变。详见[流式源码编译](../integration/local-integration-ch.md#流式源码编译)。
|
|
18
|
+
|
|
19
|
+
### `<jump>` 跳转限定在文档滚动容器内
|
|
20
|
+
|
|
21
|
+
`<jump>` 跳转只滚动文档所在的最近宿主滚动容器。嵌入页面的预览滚动自己的视口,不再带动外层页面。
|
|
22
|
+
|
|
23
|
+
### 更严格的源码阶段校验
|
|
24
|
+
|
|
25
|
+
运行时会拒绝不支持的 `sourcePhase` 值,不再回退到交互式最终渲染。
|
|
26
|
+
|
|
27
|
+
## 兼容性
|
|
28
|
+
|
|
29
|
+
本次补丁发布不改变语法、SDK、主题、组件或状态协议版本。`local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 和 `0.7.0` SDK 契约继续有效。升级引擎包无需迁移已有文档源码和状态文件。已发布的 `reactive-md-editor@0.2.0` 仍兼容 `0.9.x` 引擎系列;编辑器侧的对应快照优化随单独的编辑器版本发布。
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ReactiveMD 0.9.1
|
|
2
|
+
|
|
3
|
+
**English** · [中文](release-0.9.1-ch.md)
|
|
4
|
+
|
|
5
|
+
Install `reactive-md@0.9.1` from npm:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.1
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Release notes for the 0.9.1 patch release (2026-11-22).
|
|
12
|
+
|
|
13
|
+
## Highlights
|
|
14
|
+
|
|
15
|
+
### Streaming source compilation improvements
|
|
16
|
+
|
|
17
|
+
The streaming source path now accepts explicit `streaming` or `final` phases across compile sessions, `LocalCompileScheduler`, Workers and `LocalReactiveDocument`. Unfinished regions render as literal text, and fixable issues are reported through `transientDiagnostics`. Deterministic errors and the final strict and recovery semantics remain unchanged. See [Streaming source compilation](../integration/local-integration-en.md#streaming-source-compilation).
|
|
18
|
+
|
|
19
|
+
### Document-scoped jump scrolling
|
|
20
|
+
|
|
21
|
+
`<jump>` navigation is scoped to the nearest host scroll container around the rendered document. An embedded preview scrolls its own viewport instead of the outer page.
|
|
22
|
+
|
|
23
|
+
### Stricter source-phase validation
|
|
24
|
+
|
|
25
|
+
The runtime rejects unsupported `sourcePhase` values instead of falling back to interactive final rendering.
|
|
26
|
+
|
|
27
|
+
## Compatibility
|
|
28
|
+
|
|
29
|
+
No syntax, SDK, theme, component or state protocol revision changes. `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the SDK contract `0.7.0` remain current. Existing document source and state files need no migration. The published `reactive-md-editor@0.2.0` remains compatible with the `0.9.x` engine series; editor-side snapshot refinements ship in a separate editor release.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
这是一个可复制的 npm 组件包,定义评分控件与 Markdown 提示容器,附带主题包和内联 SVG 资源,并用公开合规工具验证安装后的包。所有导入都来自公开的 `reactive-md` 入口。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本模板声明 `reactive-md@^0.8.0`。把本目录复制到仓库之外,并把范围调整为要验证的发布版本。常规安装运行 `npm install` 从 registry 获取;测试尚未发布的候选版本时,改用当前源码新打包出的引擎 tarball。SDK 契约仍为 `0.7.0`。
|
|
8
8
|
|
|
9
9
|
## 公开入口
|
|
10
10
|
|
|
@@ -7,7 +7,7 @@ container, ships a package theme and an inlined SVG asset, and runs the public
|
|
|
7
7
|
compliance tools against the installed package. Every import comes from a
|
|
8
8
|
public `reactive-md` entry.
|
|
9
9
|
|
|
10
|
-
This template
|
|
10
|
+
This template declares `reactive-md@^0.8.0`. Copy this folder outside the repository and adjust the range to the release you are validating. Install from the registry with `npm install`; for an unreleased candidate, install a tarball packed from the current source instead. The SDK contract remains at `0.7.0`.
|
|
11
11
|
|
|
12
12
|
## Public entries
|
|
13
13
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](README.md)
|
|
4
4
|
|
|
5
|
-
[local-draft-
|
|
5
|
+
[local-draft-3.json](local-draft-3.json) 是当前可复制的最小语义一致性套件,包含源文档、编译结果、初始参数、状态写入和期望文本。该数据随 npm 包分发,便于其他工具或实现读取同一份 JSON。`local-draft-1.json` 与 `local-draft-2.json` 继续作为旧修订的保留 fixture。
|
|
6
6
|
|
|
7
7
|
- `syntaxVersion` 与核心导出的 `LOCAL_SYNTAX_VERSION` 一致。
|
|
8
8
|
- `ok` 是期望的编译结果;`codes` 是去重后的期望诊断码集合,省略时表示不期望产生诊断。成功编译仍可能包含降级警告。
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
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-3` 修订。可选的序言版本声明属于编译元数据,不会改变这些语义用例。版本拒绝与迁移行为有专门的测试和历史 fixture。见[源码修订与迁移](../../docs/compatibility/source-versioning-ch.md)。
|
|
16
16
|
|
|
17
17
|
## 组块协议一致性
|
|
18
18
|
|
|
19
|
-
[component-protocol-1.json](component-protocol-1.json) 为[组块协议](../../docs/development/component-protocol-ch.md)提供代表性用例,覆盖 `slider`、`tabs`、`plot` 以及未知组块的延迟降级。协议修订现为 `component-protocol-
|
|
19
|
+
[component-protocol-1.json](component-protocol-1.json) 为[组块协议](../../docs/development/component-protocol-ch.md)提供代表性用例,覆盖 `slider`、`tabs`、`plot` 以及未知组块的延迟降级。协议修订现为 `component-protocol-3`,现有 `component-protocol-1.json` 仍是冻结的作者组件基线。[JSON Schema](component-protocol-1.schema.json) 定义了该一致性文件的格式,便于其他实现的工具读取。这份 JSON 是测试输入与期望结果;组件提案的声明模板见[开发指南](../../docs/development/component-development-ch.md)。
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
22
|
npm run test:components
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](README-ch.md)
|
|
4
4
|
|
|
5
|
-
[local-draft-
|
|
5
|
+
[local-draft-3.json](local-draft-3.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` and `local-draft-2.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.
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
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 and a computed-value aggregate recalculation. 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-3` 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
|
|
|
19
|
-
[component-protocol-1.json](component-protocol-1.json) provides representative cases for the [component protocol](../../docs/development/component-protocol-en.md), covering `slider`, `tabs`, `plot` and lazy degradation of unknown components. The existing `component-protocol-1.json` remains the frozen author-component baseline now that the protocol revision is `component-protocol-
|
|
19
|
+
[component-protocol-1.json](component-protocol-1.json) provides representative cases for the [component protocol](../../docs/development/component-protocol-en.md), covering `slider`, `tabs`, `plot` and lazy degradation of unknown components. The existing `component-protocol-1.json` remains the frozen author-component baseline now that the protocol revision is `component-protocol-3`. The [JSON Schema](component-protocol-1.schema.json) defines the conformance file format so tools from other implementations can read it. This JSON is test input and expected results; see the [development guide](../../docs/development/component-development-en.md) for the declaration template of a component proposal.
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
22
|
npm run test:components
|
|
@@ -25,7 +25,7 @@ npm pack ./examples/game-2048-package --ignore-scripts
|
|
|
25
25
|
再在宿主项目中安装生成的两个 `.tgz`:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
npm install ../ReactiveMD/reactive-md
|
|
28
|
+
npm install ../ReactiveMD/reactive-md-<version>.tgz ../ReactiveMD/reactive-md-game-2048-package-0.1.0.tgz
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
ReactiveMD、React 和 React DOM 声明为 peer dependencies,由宿主提供同一份实例。
|
|
@@ -60,14 +60,8 @@ export const { config, reactConfig } = host;
|
|
|
60
60
|
|
|
61
61
|
## 在本仓库 Demo 中体验
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
[
|
|
65
|
-
Demo 通过依赖声明安装 `demo/vendor/` 中的 npm tarball,从
|
|
66
|
-
`reactive-md-game-2048-package/react` 读取实现、CSS 文本与样例,通过
|
|
67
|
-
`reactive-md-game-2048-package/notices?raw` 读取署名。修改本包源码后,在仓库
|
|
68
|
-
根目录运行 `npm run update:demo-2048`,重新构建、打包和安装;更新后的 tarball、
|
|
69
|
-
依赖声明和锁文件一起提交。预览、编辑器目录和离线 HTML 共用这份清单,具体字段见
|
|
70
|
-
[Demo 说明](https://github.com/yao1145/ReactiveMD/blob/main/demo/README.md)。
|
|
63
|
+
Demo 站点运行 `plugin/game-2048/` 下的本地副本;`vendor/` 中提交的 tarball 是安装包兼容性夹具。修改本包源码后,重新构建与打包,再按
|
|
64
|
+
[Demo 候选包流程](https://github.com/yao1145/ReactiveMD-Demo/blob/main/docs/candidate-package-updates-ch.md)替换 vendor tarball、依赖路径和锁文件。
|
|
71
65
|
|
|
72
66
|
## 命令
|
|
73
67
|
|
|
@@ -27,7 +27,7 @@ npm pack ./examples/game-2048-package --ignore-scripts
|
|
|
27
27
|
Then install both tarballs in the host project:
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
npm install ../ReactiveMD/reactive-md
|
|
30
|
+
npm install ../ReactiveMD/reactive-md-<version>.tgz ../ReactiveMD/reactive-md-game-2048-package-0.1.0.tgz
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
ReactiveMD, React and React DOM are peer dependencies supplied by the host.
|
|
@@ -61,17 +61,13 @@ Keyboard: arrows or `W A S D` move tiles, `R` restarts. The buttons cover
|
|
|
61
61
|
pointer and touch input. The same `seed` always produces the same opening
|
|
62
62
|
position, so static rendering and hydration stay reproducible.
|
|
63
63
|
|
|
64
|
-
## Try it in the
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
pack and install the replacement. Commit the tarball, dependency declaration
|
|
72
|
-
and lockfile together. Preview, the editor catalog and offline HTML use that
|
|
73
|
-
same registration; see the [Demo guide](https://github.com/yao1145/ReactiveMD-Demo/blob/main/README.md)
|
|
74
|
-
for fields.
|
|
64
|
+
## Try it in the Demo
|
|
65
|
+
|
|
66
|
+
The Demo site runs the local copy under `plugin/game-2048/`; the committed
|
|
67
|
+
tarball in `vendor/` is an installed-package compatibility fixture. After editing
|
|
68
|
+
this package, rebuild and pack it, then follow the
|
|
69
|
+
[Demo candidate guide](https://github.com/yao1145/ReactiveMD-Demo/blob/main/docs/candidate-package-updates-en.md)
|
|
70
|
+
to replace the vendor tarball, dependency path and lockfile.
|
|
75
71
|
|
|
76
72
|
## Commands
|
|
77
73
|
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
这些目录使用包的公开入口,可以复制到仓库之外。以下命令均从当前目录开始执行。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
以下多数示例面向 `reactive-md@0.6.0`,该版本同时发布在 `latest` 和 `next` 渠道。把所需的示例目录复制到仓库之外,然后按下面的方式从 npm 安装固定版本。React 和 Vite 在需要时从示例自身的依赖安装。
|
|
8
8
|
|
|
9
|
-
[扩展 SDK 使用方](extension-sdk/README-ch.md)面向`reactive-md@0.8.0`,通过公开导出验证静态分享和离线交互分享。准备发布时使用本地构建的 tarball,SDK 契约仍为 `0.7.0
|
|
9
|
+
[扩展 SDK 使用方](extension-sdk/README-ch.md)面向`reactive-md@0.8.0`,通过公开导出验证静态分享和离线交互分享。准备发布时使用本地构建的 tarball,SDK 契约仍为 `0.7.0`。其余较早的示例保留其 0.6.0 固定版本。
|
|
10
|
+
|
|
11
|
+
[流式源码](streaming)示例使用 `reactive-md@0.9.1`,该版本已包含流式源码编译接口。按下面的说明,从本仓库打包的 tarball 运行它。
|
|
10
12
|
|
|
11
13
|
## Node 核心
|
|
12
14
|
|
|
@@ -44,6 +46,23 @@ npm run dev
|
|
|
44
46
|
|
|
45
47
|
UI 和调度连接位于 [worker/main.js](worker/main.js);Worker 入口是 [worker/worker.js](worker/worker.js)。
|
|
46
48
|
|
|
49
|
+
## 流式源码编译
|
|
50
|
+
|
|
51
|
+
[streaming](streaming) 是流式源码编译的确定性浏览器示例。它按定时器追加固定文本片段,用 `sourcePhase: 'streaming'` 提交每个完整快照,最后用 `sourcePhase: 'final'` 提交完成后的源码。页面展示暂态状态、暂态诊断、最终诊断和编译快照摘要。取消或重新开始会使当前轮次失效;旧轮次的结果只计入丢弃数量,不会重绘页面。示例不调用模型服务、不发起网络请求,也不持有凭据。
|
|
52
|
+
|
|
53
|
+
在仓库根目录打包 tarball,然后在示例中安装:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
# 在仓库根目录
|
|
57
|
+
npm pack
|
|
58
|
+
|
|
59
|
+
cd examples/integration/streaming
|
|
60
|
+
npm install ../../../reactive-md-0.9.1.tgz
|
|
61
|
+
npm run dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
如果目录已复制到仓库之外,请改用 tarball 的绝对路径安装。示例只使用 `reactive-md` 的公开入口;调度逻辑位于 [streaming/main.js](streaming/main.js),Worker 入口是 [streaming/worker.js](streaming/worker.js)。
|
|
65
|
+
|
|
47
66
|
## 综合宿主示例
|
|
48
67
|
|
|
49
68
|
[react-comprehensive](react-comprehensive) 在一个页面中组合了面向宿主的各项新增能力:宿主提供的汇率和库存、动态 `max="{{ inventory }}"`、与内置控件共享绑定的 `host-rating` 组块、通过 `initialParameters` 和 `onParametersChange` 保存与恢复公开参数,以及通过 `onSourceNavigate` 从预览导航到源码。
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
These directories use the package's public entry points and can be copied outside the repository. The commands below start from the current directory.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Most examples below target `reactive-md@0.6.0`, published on both `latest` and `next`. Copy the desired example directory outside the repository, then install the pinned version from npm as shown below. React and Vite are installed from the example's own dependencies where needed.
|
|
8
8
|
|
|
9
|
-
The [extension SDK consumer](extension-sdk/README.md) targets `reactive-md@0.8.0` and verifies static and offline interactive sharing through public exports. Release preparation uses a locally built tarball; the SDK contract remains at `0.7.0`. The older examples
|
|
9
|
+
The [extension SDK consumer](extension-sdk/README.md) targets `reactive-md@0.8.0` and verifies static and offline interactive sharing through public exports. Release preparation uses a locally built tarball; the SDK contract remains at `0.7.0`. The other older examples retain their 0.6.0 pins.
|
|
10
|
+
|
|
11
|
+
The [streaming source](streaming) example uses `reactive-md@0.9.1`, which includes the streaming-source compilation API. Run it from a tarball packed in this repository as described below.
|
|
10
12
|
|
|
11
13
|
## Node core
|
|
12
14
|
|
|
@@ -44,6 +46,23 @@ npm run dev
|
|
|
44
46
|
|
|
45
47
|
The UI and scheduler wiring live in [worker/main.js](worker/main.js); the Worker entry is [worker/worker.js](worker/worker.js).
|
|
46
48
|
|
|
49
|
+
## Streaming source compilation
|
|
50
|
+
|
|
51
|
+
[streaming](streaming) is a deterministic browser example for streaming-source compilation. It appends fixed text chunks on a timer, submits each complete snapshot with `sourcePhase: 'streaming'`, then submits the completed source with `sourcePhase: 'final'`. The page shows the provisional status, transient diagnostics, final diagnostics and a compiled snapshot summary. Cancel or restart invalidates the current run; results from an older run are counted and discarded instead of repainting the page. It uses no model service, network request or credential.
|
|
52
|
+
|
|
53
|
+
Build a tarball in the repository root, then install it in the example:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
# in the repository root
|
|
57
|
+
npm pack
|
|
58
|
+
|
|
59
|
+
cd examples/integration/streaming
|
|
60
|
+
npm install ../../../reactive-md-0.9.1.tgz
|
|
61
|
+
npm run dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If the directory was copied outside the repository, pass the tarball's absolute path to `npm install` instead. The example uses only `reactive-md` public entries; scheduling lives in [streaming/main.js](streaming/main.js) and the Worker entry is [streaming/worker.js](streaming/worker.js).
|
|
65
|
+
|
|
47
66
|
## Comprehensive host example
|
|
48
67
|
|
|
49
68
|
[react-comprehensive](react-comprehensive) combines the host-facing additions in one page: a host-provided exchange rate and inventory, dynamic `max="{{ inventory }}"`, a `host-rating` component that shares its binding with built-in controls, saved and restored public parameters through `initialParameters` and `onParametersChange`, and preview-to-source navigation through `onSourceNavigate`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`advanced.tsx` 增加了坐标控件、字符串集合、数字集合和 Markdown 容器。坐标、多选和卡片契约来自 `defaultPreset.components`;项目提供自己的 React 实现。其验收检查覆盖原子回滚、数组限制与复制、重置、禁用/隐藏状态、静态输出、SSR,以及离线桌面/移动端恢复。`advanced-standalone.ts` 为该项导出打包同一组已安装实现。
|
|
8
8
|
|
|
9
|
-
本 fixture
|
|
9
|
+
本 fixture 固定 `reactive-md@0.8.0`,SDK 契约仍为 `0.7.0`。验证器在独立目录中安装引擎和 peer 依赖;请把固定版本调整为要验证的发布版本,只有测试尚未发布的候选版本时才使用新打包的引擎 tarball。
|
|
10
10
|
|
|
11
11
|
在仓库根目录:
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ This fixture defines a rating control, a Markdown hint container, and a light/da
|
|
|
6
6
|
|
|
7
7
|
`advanced.tsx` adds a coordinate control, string collection, numeric collection and Markdown container. The coordinate, multi-select and card contracts come from `defaultPreset.components`; the project supplies its own React implementations. Its acceptance checks cover atomic rollback, array limits and copies, reset, disabled/hidden states, static output, SSR and offline desktop/mobile restoration. `advanced-standalone.ts` bundles the same installed implementations for that export.
|
|
8
8
|
|
|
9
|
-
This fixture
|
|
9
|
+
This fixture pins `reactive-md@0.8.0`; its SDK contract remains at `0.7.0`. The verifier installs the engine and peer dependencies in a separate directory. Raise the pin to the release being validated; use a freshly packed engine tarball only for an unreleased candidate.
|
|
10
10
|
|
|
11
11
|
From the repository root:
|
|
12
12
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Reactive MD streaming source compilation</title>
|
|
7
|
+
<style>
|
|
8
|
+
body { font: 16px/1.5 system-ui, sans-serif; margin: 2rem auto; max-width: 72ch; padding: 0 1rem; }
|
|
9
|
+
pre { background: #f4f4f5; border: 1px solid #e4e4e7; overflow: auto; padding: 0.75rem; white-space: pre-wrap; }
|
|
10
|
+
button { margin-right: 0.5rem; }
|
|
11
|
+
.muted { color: #52525b; }
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<main>
|
|
16
|
+
<h1>Streaming source compilation</h1>
|
|
17
|
+
<p>
|
|
18
|
+
Fixed text chunks arrive on a timer. Each complete snapshot is submitted with
|
|
19
|
+
<code>sourcePhase: "streaming"</code>; the last submission is
|
|
20
|
+
<code>sourcePhase: "final"</code>. No model service or credential is involved.
|
|
21
|
+
</p>
|
|
22
|
+
<p>
|
|
23
|
+
<button id="start" type="button">Start / restart</button>
|
|
24
|
+
<button id="cancel" type="button">Cancel generation</button>
|
|
25
|
+
</p>
|
|
26
|
+
<p class="muted">
|
|
27
|
+
Cancel invalidates the current generation. A result that arrives later is discarded
|
|
28
|
+
instead of updating this page.
|
|
29
|
+
</p>
|
|
30
|
+
<p id="status" role="status">Starting...</p>
|
|
31
|
+
|
|
32
|
+
<h2>Source submitted</h2>
|
|
33
|
+
<pre id="source"></pre>
|
|
34
|
+
|
|
35
|
+
<h2>Transient diagnostics</h2>
|
|
36
|
+
<pre id="transient">None.</pre>
|
|
37
|
+
|
|
38
|
+
<h2>Final diagnostics</h2>
|
|
39
|
+
<pre id="diagnostics">None.</pre>
|
|
40
|
+
|
|
41
|
+
<h2>Compiled snapshot</h2>
|
|
42
|
+
<pre id="preview">Waiting for the first snapshot.</pre>
|
|
43
|
+
|
|
44
|
+
<p id="stale" class="muted">0 stale results discarded.</p>
|
|
45
|
+
</main>
|
|
46
|
+
<script type="module" src="/main.js"></script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|