reactive-md 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +66 -0
- package/CHANGELOG.md +66 -0
- package/CONTRIBUTING-ch.md +6 -62
- package/CONTRIBUTING.md +5 -63
- package/README-ch.md +232 -67
- package/README-en.md +209 -71
- package/README.md +209 -71
- package/SECURITY-ch.md +3 -1
- package/SECURITY.md +3 -1
- package/THIRD_PARTY_NOTICES.md +1909 -87
- package/cli/args.mjs +33 -1
- package/cli/build.mjs +62 -1
- package/cli/check.mjs +444 -0
- package/cli/help.mjs +181 -3
- package/cli/init.mjs +1577 -0
- package/cli/main.mjs +11 -1
- package/cli/package-loader.mjs +41 -0
- package/dist-library/LocalDocumentView-6trX7xJc.js +97920 -0
- package/dist-library/{authoring-BEVyth5X.js → authoring-BsfSwQRm.js} +237 -209
- package/dist-library/compiler--ea2CKQF.js +61 -0
- package/dist-library/compiler-core-kPiH-gOV.js +11805 -0
- package/dist-library/component-state-Cq2K5gkS.js +490 -0
- package/dist-library/component-state-D_cw_EHe.js +54 -0
- package/dist-library/config-validation-DXTynAw7.js +3005 -0
- package/dist-library/default-components-Z_YMio5P.js +2346 -0
- package/dist-library/identity-MYJXKSkB.js +1443 -0
- package/dist-library/math-display-BJz4gbFc.js +24000 -0
- package/dist-library/math-sample-BGEW49zY.js +1124 -0
- package/dist-library/options-CX5m5n-J.js +115 -0
- package/dist-library/parser-standard-DlCk7sLo.js +10122 -0
- package/dist-library/props-DGlBk0e5.js +183 -0
- package/dist-library/react-ByOHunUW.js +122 -0
- package/dist-library/reactive-md-authoring.js +712 -1077
- package/dist-library/reactive-md-build.js +7966 -0
- package/dist-library/reactive-md-compiler-standard.js +33 -0
- package/dist-library/reactive-md-compiler.js +22 -0
- package/dist-library/reactive-md-default-packs.js +71 -0
- package/dist-library/reactive-md-default-preset.js +10 -0
- package/dist-library/reactive-md-export.js +111 -0
- package/dist-library/reactive-md-print.css +18 -3
- package/dist-library/reactive-md-react-runtime.js +251 -0
- package/dist-library/reactive-md-react-server.js +55 -0
- package/dist-library/reactive-md-react-unstyled.js +9 -1
- package/dist-library/reactive-md-react.js +9 -1
- package/dist-library/reactive-md-runtime-browser.js +51 -0
- package/dist-library/reactive-md-runtime.js +3 -0
- package/dist-library/reactive-md-sdk.js +6 -0
- package/dist-library/reactive-md-standalone-host.js +442 -0
- package/dist-library/reactive-md-testing-browser.js +523 -0
- package/dist-library/reactive-md-testing-react.js +221 -0
- package/dist-library/reactive-md-testing.js +638 -0
- package/dist-library/reactive-md-vite.js +959 -0
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +1080 -795
- package/dist-library/registry-B9Jc3FVe.js +1174 -0
- package/dist-library/resources-BGt8mpDA.js +204 -0
- package/dist-library/runtime-C-sbfpOX.js +1157 -0
- package/dist-library/runtime-Dkq7ldyg.js +172 -0
- package/dist-library/schema-ZFufO8V0.js +39 -0
- package/dist-library/shareable-DDVL4Fi9.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +168 -0
- package/dist-library/types/authoring/conformance.d.ts +24 -0
- package/dist-library/types/{editor → authoring}/editor-i18n.d.ts +3 -24
- package/dist-library/types/authoring/extensions.d.ts +13 -0
- package/dist-library/types/authoring/index.d.ts +14 -11
- package/dist-library/types/authoring/insert.d.ts +16 -0
- package/dist-library/types/{editor → authoring}/native-components.d.ts +19 -2
- package/dist-library/types/authoring/templates.d.ts +65 -0
- package/dist-library/types/build/diagnostics.d.ts +8 -0
- package/dist-library/types/build/digest.d.ts +5 -0
- package/dist-library/types/build/entry.d.ts +9 -0
- package/dist-library/types/build/host.d.ts +36 -0
- package/dist-library/types/build/index.d.ts +99 -0
- package/dist-library/types/build/notices.d.ts +29 -0
- package/dist-library/types/build/resources.d.ts +60 -0
- package/dist-library/types/build/vite.d.ts +15 -0
- package/dist-library/types/compiler/index.d.ts +22 -0
- package/dist-library/types/compiler/result.d.ts +30 -0
- package/dist-library/types/compiler/standard.d.ts +16 -0
- package/dist-library/types/compiler/types.d.ts +69 -0
- package/dist-library/types/components/chart-motion.d.ts +12 -0
- package/dist-library/types/components/controls.d.ts +21 -0
- package/dist-library/types/{local → components}/data-table.d.ts +10 -24
- package/dist-library/types/components/default-chart-types.d.ts +22 -0
- package/dist-library/types/components/default-chart.d.ts +2 -0
- package/dist-library/types/components/default-preset.d.ts +10 -0
- package/dist-library/types/components/diagram-inspector.d.ts +24 -0
- package/dist-library/types/components/gallery.d.ts +6 -0
- package/dist-library/types/components/layout.d.ts +23 -0
- package/dist-library/types/components/mafs-plot-grid.d.ts +57 -0
- package/dist-library/types/components/mafs-visuals.d.ts +40 -0
- package/dist-library/types/components/numeric-sliders.d.ts +3 -0
- package/dist-library/types/components/uiarc/calendar/calendar.d.ts +26 -0
- package/dist-library/types/components/uiarc/date-picker/date-picker.d.ts +29 -0
- package/dist-library/types/components/uiarc/lib/motion-tokens.d.ts +2 -0
- package/dist-library/types/components/uiarc/lib/use-today.d.ts +2 -0
- package/dist-library/types/components/uiarc/motion-tokens.d.ts +60 -0
- package/dist-library/types/components/uiarc/rmd-motion.d.ts +12 -0
- package/dist-library/types/components/uiarc/select/select.d.ts +21 -0
- package/dist-library/types/components/uiarc/slider/slider.d.ts +53 -0
- package/dist-library/types/components/use-hydrated.d.ts +6 -0
- package/dist-library/types/components/visuals.d.ts +13 -0
- package/dist-library/types/export/component-state.d.ts +39 -0
- package/dist-library/types/export/index.d.ts +47 -0
- package/dist-library/types/export/requirements.d.ts +23 -0
- package/dist-library/types/export/resources.d.ts +8 -0
- package/dist-library/types/export/restoration.d.ts +52 -0
- package/dist-library/types/index.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +16 -0
- package/dist-library/types/local/compilation/compiler-services.d.ts +64 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +46 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +9 -0
- package/dist-library/types/local/compilation/compiler.d.ts +34 -0
- package/dist-library/types/local/compilation/component-kernel.d.ts +487 -0
- package/dist-library/types/local/{dependencies.d.ts → compilation/dependencies.d.ts} +4 -3
- package/dist-library/types/local/{diagnostics.d.ts → configuration/diagnostic-messages.d.ts} +193 -65
- package/dist-library/types/local/configuration/diagnostics.d.ts +58 -0
- package/dist-library/types/local/{limits.d.ts → configuration/limits.d.ts} +15 -2
- package/dist-library/types/local/configuration/options-core.d.ts +120 -0
- package/dist-library/types/local/configuration/options.d.ts +17 -0
- package/dist-library/types/local/configuration/portable-options.d.ts +3 -0
- package/dist-library/types/local/configuration/schema-core.d.ts +32 -0
- package/dist-library/types/local/configuration/schema.d.ts +12 -0
- package/dist-library/types/local/contracts/types.d.ts +519 -0
- package/dist-library/types/local/{version.d.ts → contracts/version.d.ts} +1 -1
- package/dist-library/types/local/{computations.d.ts → evaluation/computations.d.ts} +6 -3
- package/dist-library/types/local/{expression.d.ts → evaluation/expression.d.ts} +2 -2
- package/dist-library/types/local/{math-display.d.ts → evaluation/math-display.d.ts} +2 -16
- package/dist-library/types/local/evaluation/math-sample.d.ts +23 -0
- package/dist-library/types/local/evaluation/math.d.ts +73 -0
- package/dist-library/types/local/{validation.d.ts → evaluation/validation.d.ts} +1 -1
- package/dist-library/types/local/html/html-details.d.ts +16 -0
- package/dist-library/types/local/html/html-entities.d.ts +7 -0
- package/dist-library/types/local/html/html-policy.d.ts +43 -0
- package/dist-library/types/local/html/html-recovery.d.ts +16 -0
- package/dist-library/types/local/html/html-table-names.d.ts +9 -0
- package/dist-library/types/local/{html-table.d.ts → html/html-table.d.ts} +2 -6
- package/dist-library/types/local/{html.d.ts → html/html.d.ts} +1 -1
- package/dist-library/types/local/index.d.ts +31 -24
- package/dist-library/types/local/markdown/fast-markdown.d.ts +137 -0
- package/dist-library/types/local/{footnotes.d.ts → markdown/footnotes.d.ts} +1 -1
- package/dist-library/types/local/{heading-anchors.d.ts → markdown/heading-anchors.d.ts} +12 -2
- package/dist-library/types/local/markdown/markdown-blocks.d.ts +55 -0
- package/dist-library/types/local/markdown/markdown-structure.d.ts +3 -0
- package/dist-library/types/local/markdown/plain-paragraphs.d.ts +10 -0
- package/dist-library/types/local/parsing/lexical.d.ts +21 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +67 -0
- package/dist-library/types/local/parsing/parser-capabilities.d.ts +42 -0
- package/dist-library/types/local/parsing/parser-core.d.ts +65 -0
- package/dist-library/types/local/parsing/parser-standard.d.ts +7 -0
- package/dist-library/types/local/parsing/parser.d.ts +16 -0
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +48 -0
- package/dist-library/types/local/{LocalDocumentView.d.ts → rendering/LocalDocumentView.d.ts} +67 -24
- package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +36 -0
- package/dist-library/types/local/rendering/render-types.d.ts +57 -0
- package/dist-library/types/local/rendering/view-revision.d.ts +75 -0
- package/dist-library/types/local/{retention.d.ts → runtime/retention.d.ts} +1 -1
- package/dist-library/types/local/runtime/runtime.d.ts +34 -0
- package/dist-library/types/local/{state.d.ts → runtime/state.d.ts} +4 -4
- package/dist-library/types/local/session/compiler-cache.d.ts +44 -0
- package/dist-library/types/local/session/incremental.d.ts +48 -0
- package/dist-library/types/local/session/parse-session.d.ts +62 -0
- package/dist-library/types/local/session/row-reuse.d.ts +46 -0
- package/dist-library/types/local/{authoring.d.ts → source/authoring.d.ts} +11 -3
- package/dist-library/types/local/source/node-walk.d.ts +3 -0
- package/dist-library/types/local/source/source-context.d.ts +63 -0
- package/dist-library/types/local/{source-migration.d.ts → source/source-migration.d.ts} +2 -2
- package/dist-library/types/local/{i18n.d.ts → theme/i18n.d.ts} +2 -2
- package/dist-library/types/local/theme/theme-name.d.ts +3 -0
- package/dist-library/types/local/{theme.d.ts → theme/theme.d.ts} +3 -3
- package/dist-library/types/local/transport/compile-patch.d.ts +127 -0
- package/dist-library/types/local/{compiled-data.d.ts → transport/compiled-data.d.ts} +1 -1
- package/dist-library/types/local/transport/flat-compiled-data.d.ts +17 -0
- package/dist-library/types/local/transport/shared-data.d.ts +10 -0
- package/dist-library/types/local/transport/worker.d.ts +265 -0
- package/dist-library/types/local/widgets/visuals.d.ts +25 -0
- package/dist-library/types/presets/default-authoring.d.ts +50 -0
- package/dist-library/types/presets/default-components.d.ts +4 -0
- package/dist-library/types/presets/default-semantics.d.ts +8 -0
- package/dist-library/types/presets/default.d.ts +11 -0
- package/dist-library/types/presets/identity.d.ts +7 -0
- package/dist-library/types/presets/packs.d.ts +4 -0
- package/dist-library/types/react/component-api.d.ts +260 -0
- package/dist-library/types/react/component-primitives.d.ts +21 -0
- package/dist-library/types/react/component-utils.d.ts +125 -0
- package/dist-library/types/react/default-theme.d.ts +6 -0
- package/dist-library/types/react/field-validation.d.ts +11 -0
- package/dist-library/types/react/index.d.ts +17 -5
- package/dist-library/types/react/overflow-text-tooltip.d.ts +6 -0
- package/dist-library/types/react/package.d.ts +69 -0
- package/dist-library/types/react/runtime/common.d.ts +4 -0
- package/dist-library/types/react/runtime/index.d.ts +8 -0
- package/dist-library/types/react/runtime/useComponentState.d.ts +30 -0
- package/dist-library/types/react/runtime/useKeys.d.ts +16 -0
- package/dist-library/types/react/runtime/useSwipe.d.ts +27 -0
- package/dist-library/types/react/runtime/useTicker.d.ts +17 -0
- package/dist-library/types/react/sdk.d.ts +110 -0
- package/dist-library/types/react/server.d.ts +15 -0
- package/dist-library/types/react/tooltip-layer.d.ts +10 -0
- package/dist-library/types/react/use-draft-field.d.ts +17 -0
- package/dist-library/types/runtime-services/browser/index.d.ts +63 -0
- package/dist-library/types/runtime-services/component-state.d.ts +152 -0
- package/dist-library/types/runtime-services/identity.d.ts +41 -0
- package/dist-library/types/runtime-services/index.d.ts +10 -0
- package/dist-library/types/runtime-services/random.d.ts +42 -0
- package/dist-library/types/runtime-services/runtime.d.ts +51 -0
- package/dist-library/types/runtime-services/scheduler.d.ts +44 -0
- package/dist-library/types/sdk/assembly.d.ts +73 -0
- package/dist-library/types/sdk/compat-profile.d.ts +57 -0
- package/dist-library/types/sdk/compiler-config.d.ts +33 -0
- package/dist-library/types/sdk/config-validation.d.ts +33 -0
- package/dist-library/types/sdk/config.d.ts +35 -0
- package/dist-library/types/sdk/hash.d.ts +9 -0
- package/dist-library/types/sdk/index.d.ts +10 -0
- package/dist-library/types/sdk/manifest.d.ts +49 -0
- package/dist-library/types/sdk/pattern.d.ts +11 -0
- package/dist-library/types/sdk/preset-core.d.ts +11 -0
- package/dist-library/types/sdk/preset.d.ts +9 -0
- package/dist-library/types/sdk/props.d.ts +33 -0
- package/dist-library/types/sdk/registry-core.d.ts +16 -0
- package/dist-library/types/sdk/registry.d.ts +18 -0
- package/dist-library/types/sdk/theme.d.ts +73 -0
- package/dist-library/types/sdk/types.d.ts +221 -0
- package/dist-library/types/sdk/version.d.ts +49 -0
- package/dist-library/types/shareable.d.ts +29 -3
- package/dist-library/types/standalone/diagnostics.d.ts +16 -0
- package/dist-library/types/standalone/events.d.ts +4 -0
- package/dist-library/types/standalone/library.d.ts +6 -0
- package/dist-library/types/standalone/payload.d.ts +15 -0
- package/dist-library/types/standalone/prepare.d.ts +21 -0
- package/dist-library/types/standalone/session.d.ts +68 -0
- package/dist-library/types/standalone/version.d.ts +7 -0
- package/dist-library/types/testing/behavior.d.ts +19 -0
- package/dist-library/types/testing/browser.d.ts +126 -0
- package/dist-library/types/testing/cases.d.ts +16 -0
- package/dist-library/types/testing/index.d.ts +13 -0
- package/dist-library/types/testing/manifest.d.ts +10 -0
- package/dist-library/types/testing/react.d.ts +45 -0
- package/dist-library/types/testing/report.d.ts +20 -0
- package/dist-library/types/testing/types.d.ts +125 -0
- package/dist-library/types/testing/values.d.ts +22 -0
- package/dist-library/types/vite/client.d.ts +36 -0
- package/dist-library/types/vite/discovery.d.ts +51 -0
- package/dist-library/types/vite/index.d.ts +31 -0
- package/dist-library/types/vite/registration.d.ts +109 -0
- package/dist-library/types-BFCrMrg0.js +52 -0
- package/dist-library/validation-W-bmny-x.js +2253 -0
- package/dist-library/values-CIt8AjiU.js +134 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +591 -95
- package/docs/README-ch.md +90 -0
- package/docs/README.md +87 -81
- package/docs/compatibility/compatibility-ch.md +22 -14
- package/docs/compatibility/compatibility-en.md +22 -14
- package/docs/compatibility/source-versioning-ch.md +15 -12
- package/docs/compatibility/source-versioning-en.md +16 -13
- package/docs/development/component-development-ch.md +51 -195
- package/docs/development/component-development-en.md +51 -195
- package/docs/development/component-development-reference-ch.md +253 -0
- package/docs/development/component-development-reference-en.md +238 -0
- package/docs/development/component-protocol-ch.md +51 -50
- package/docs/development/component-protocol-en.md +52 -49
- package/docs/development/local-module-layout-ch.md +59 -0
- package/docs/development/local-module-layout-en.md +59 -0
- package/docs/development/performance-overview-ch.md +402 -0
- package/docs/development/performance-overview-en.md +402 -0
- package/docs/development/releasing-ch.md +8 -104
- package/docs/development/releasing-en.md +8 -104
- package/docs/guides/local-guide-ch.md +28 -9
- package/docs/guides/local-guide-en.md +31 -12
- package/docs/integration/author-tools-ch.md +4 -2
- package/docs/integration/author-tools-en.md +4 -2
- package/docs/integration/codemirror-ch.md +52 -0
- package/docs/integration/codemirror-en.md +29 -0
- package/docs/integration/compiler-ch.md +47 -0
- package/docs/integration/compiler-en.md +34 -0
- package/docs/integration/directory-discovery-ch.md +53 -0
- package/docs/integration/directory-discovery-en.md +31 -0
- package/docs/integration/editor-ch.md +48 -21
- package/docs/integration/editor-en.md +48 -21
- package/docs/integration/extension-sdk-ch.md +392 -0
- package/docs/integration/extension-sdk-en.md +377 -0
- package/docs/integration/local-integration-ch.md +63 -9
- package/docs/integration/local-integration-en.md +89 -13
- package/docs/integration/repository-split-ch.md +40 -0
- package/docs/integration/repository-split-en.md +23 -0
- package/docs/integration/shareable-export-ch.md +46 -2
- package/docs/integration/shareable-export-en.md +46 -2
- package/docs/reference/computations-formatting-ch.md +4 -2
- package/docs/reference/computations-formatting-en.md +4 -2
- package/docs/reference/constraints-collections-ch.md +21 -1
- package/docs/reference/constraints-collections-en.md +21 -1
- package/docs/reference/diagnostics-counting-ch.md +1 -1
- package/docs/reference/diagnostics-counting-en.md +1 -1
- package/docs/reference/html-compatibility-ch.md +4 -0
- package/docs/reference/html-compatibility-en.md +4 -0
- package/docs/reference/local-components-v2-ch.md +2 -0
- package/docs/reference/local-components-v2-en.md +2 -0
- package/docs/reference/local-interaction-syntax-ch.md +51 -15
- package/docs/reference/local-interaction-syntax-en.md +58 -14
- package/docs/reference/theme-protocol-ch.md +79 -7
- package/docs/reference/theme-protocol-en.md +79 -7
- package/docs/reference/tolerance-ch.md +64 -0
- package/docs/reference/tolerance-en.md +57 -0
- package/docs/releases/release-0.4.0-ch.md +2 -0
- package/docs/releases/release-0.4.0-en.md +2 -0
- package/docs/releases/release-0.4.1-ch.md +2 -0
- package/docs/releases/release-0.4.1-en.md +2 -0
- package/docs/releases/release-0.5.0-ch.md +2 -0
- package/docs/releases/release-0.5.0-en.md +2 -0
- package/docs/releases/release-0.5.1-ch.md +2 -0
- package/docs/releases/release-0.5.1-en.md +2 -0
- package/docs/releases/release-0.5.2-ch.md +2 -0
- package/docs/releases/release-0.5.2-en.md +2 -0
- package/docs/releases/release-0.5.3-ch.md +2 -0
- package/docs/releases/release-0.5.3-en.md +2 -0
- package/docs/releases/release-0.6.0-ch.md +2 -0
- package/docs/releases/release-0.6.0-en.md +2 -0
- package/docs/releases/release-0.6.1-ch.md +2 -0
- package/docs/releases/release-0.6.1-en.md +2 -0
- package/docs/releases/release-0.7.0-ch.md +86 -0
- package/docs/releases/release-0.7.0-en.md +86 -0
- package/docs/releases/release-0.8.0-ch.md +126 -0
- package/docs/releases/release-0.8.0-en.md +126 -0
- package/examples/component-package/LICENSE +21 -0
- package/examples/component-package/NOTICES.md +12 -0
- package/examples/component-package/README-ch.md +101 -0
- package/examples/component-package/README.md +133 -0
- package/examples/component-package/package.json +35 -0
- package/examples/component-package/sample/document.reactive.md +14 -0
- package/examples/component-package/scripts/build-export.mjs +44 -0
- package/examples/component-package/scripts/build.mjs +130 -0
- package/examples/component-package/scripts/verify.mjs +257 -0
- package/examples/component-package/src/assets/notice.svg +4 -0
- package/examples/component-package/src/component.css +40 -0
- package/examples/component-package/src/components.tsx +105 -0
- package/examples/component-package/src/harness.tsx +34 -0
- package/examples/component-package/src/manifests.ts +71 -0
- package/examples/component-package/src/node-entry.ts +18 -0
- package/examples/component-package/src/sample.ts +4 -0
- package/examples/component-package/src/theme.css +44 -0
- package/examples/component-package/src/theme.ts +22 -0
- package/examples/component-package/tsconfig.json +15 -0
- package/examples/conformance/README-ch.md +55 -0
- package/examples/conformance/README.md +2 -0
- package/examples/conformance/local-draft-3.json +296 -0
- package/examples/game-2048-package/LICENSE +21 -0
- package/examples/game-2048-package/NOTICES.md +11 -0
- package/examples/game-2048-package/README-ch.md +97 -0
- package/examples/game-2048-package/README.md +102 -0
- package/examples/game-2048-package/package.json +35 -0
- package/examples/game-2048-package/sample/document.reactive.md +17 -0
- package/examples/game-2048-package/scripts/build-export.mjs +44 -0
- package/examples/game-2048-package/scripts/build.mjs +130 -0
- package/examples/game-2048-package/scripts/verify.mjs +180 -0
- package/examples/game-2048-package/src/component.css +161 -0
- package/examples/game-2048-package/src/components.tsx +326 -0
- package/examples/game-2048-package/src/game-engine.ts +228 -0
- package/examples/game-2048-package/src/harness.tsx +34 -0
- package/examples/game-2048-package/src/manifest.ts +85 -0
- package/examples/game-2048-package/src/node-entry.ts +30 -0
- package/examples/game-2048-package/src/sample.ts +4 -0
- package/examples/game-2048-package/tsconfig.json +15 -0
- package/examples/integration/README-ch.md +63 -0
- package/examples/integration/README.md +17 -1
- package/examples/integration/extension-sdk/README-ch.md +24 -0
- package/examples/integration/extension-sdk/README.md +24 -0
- package/examples/integration/extension-sdk/advanced-standalone.ts +6 -0
- package/examples/integration/extension-sdk/advanced.tsx +101 -0
- package/examples/integration/extension-sdk/env.d.ts +2 -0
- package/examples/integration/extension-sdk/extensions.tsx +97 -0
- package/examples/integration/extension-sdk/index.html +3 -0
- package/examples/integration/extension-sdk/main.tsx +10 -0
- package/examples/integration/extension-sdk/package.json +6 -0
- package/examples/integration/extension-sdk/standalone.ts +7 -0
- package/examples/integration/extension-sdk/tsconfig.json +8 -0
- package/examples/integration/react-comprehensive/index.html +12 -0
- package/examples/integration/react-comprehensive/main.jsx +123 -0
- package/examples/integration/react-comprehensive/package.json +18 -0
- package/examples/local/README-ch.md +76 -0
- package/examples/local/README.md +4 -2
- package/examples/local/scenarios/blog-zh.reactive.md +71 -0
- package/examples/local/scenarios/blog.reactive.md +71 -0
- package/examples/local/scenarios/classroom-zh.reactive.md +97 -0
- package/examples/local/scenarios/classroom.reactive.md +97 -0
- package/examples/local/scenarios/proposal-zh.reactive.md +79 -0
- package/examples/local/scenarios/proposal.reactive.md +79 -0
- package/examples/local/scenarios/survey-zh.reactive.md +74 -0
- package/examples/local/scenarios/survey.reactive.md +74 -0
- package/examples/local/showcase/README-ch.md +22 -0
- package/examples/local/showcase/README.md +9 -3
- package/examples/local/showcase/features.reactive.md +637 -0
- package/examples/local/showcase/zh/features.reactive.md +637 -0
- package/examples/sci-fi-theme/README-ch.md +131 -0
- package/examples/sci-fi-theme/README.md +146 -0
- package/examples/sci-fi-theme/demo/demo.css +532 -0
- package/examples/sci-fi-theme/demo/document.reactive.md +185 -0
- package/examples/sci-fi-theme/demo/index.html +13 -0
- package/examples/sci-fi-theme/demo/main.tsx +180 -0
- package/examples/sci-fi-theme/docs/design-system-ch.md +245 -0
- package/examples/sci-fi-theme/docs/design-system.md +474 -0
- package/examples/sci-fi-theme/package.json +27 -0
- package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -0
- package/examples/sci-fi-theme/src/components.css +1460 -0
- package/examples/sci-fi-theme/src/index.ts +6 -0
- package/examples/sci-fi-theme/src/sci-fi.css +5 -0
- package/examples/sci-fi-theme/src/theme.ts +37 -0
- package/examples/sci-fi-theme/src/tokens.css +408 -0
- package/examples/sci-fi-theme/tsconfig.json +20 -0
- package/examples/sci-fi-theme/vite.config.ts +24 -0
- package/examples/tetris-package/LICENSE +21 -0
- package/examples/tetris-package/NOTICES.md +11 -0
- package/examples/tetris-package/README-ch.md +91 -0
- package/examples/tetris-package/README.md +95 -0
- package/examples/tetris-package/package.json +35 -0
- package/examples/tetris-package/sample/document.reactive.md +16 -0
- package/examples/tetris-package/scripts/build-export.mjs +44 -0
- package/examples/tetris-package/scripts/build.mjs +130 -0
- package/examples/tetris-package/scripts/verify.mjs +173 -0
- package/examples/tetris-package/src/component.css +145 -0
- package/examples/tetris-package/src/components.tsx +334 -0
- package/examples/tetris-package/src/harness.tsx +34 -0
- package/examples/tetris-package/src/manifests.ts +93 -0
- package/examples/tetris-package/src/node-entry.ts +16 -0
- package/examples/tetris-package/src/sample.ts +4 -0
- package/examples/tetris-package/src/tetris-engine.ts +325 -0
- package/examples/tetris-package/tsconfig.json +15 -0
- package/package.json +98 -44
- package/dist-library/compiler-Cm3ppMxG.js +0 -46044
- package/dist-library/react-Bh7_oxZp.js +0 -59655
- package/dist-library/reactive-md-editor.css +0 -2
- package/dist-library/reactive-md-editor.js +0 -3853
- package/dist-library/runtime-DlFYQ4s_.js +0 -498
- package/dist-library/types/editor/ReactiveMarkdownEditor.d.ts +0 -7
- package/dist-library/types/editor/editor-toolbar.d.ts +0 -24
- package/dist-library/types/editor/editor-view-bar.d.ts +0 -11
- package/dist-library/types/editor/extended-native-components.d.ts +0 -58
- package/dist-library/types/editor/index.d.ts +0 -9
- package/dist-library/types/editor/locale.d.ts +0 -13
- package/dist-library/types/editor/source-authoring.d.ts +0 -59
- package/dist-library/types/editor/types.d.ts +0 -48
- package/dist-library/types/editor/use-gutter-metrics.d.ts +0 -5
- package/dist-library/types/editor/use-source-history.d.ts +0 -16
- package/dist-library/types/local/compiler.d.ts +0 -4
- package/dist-library/types/local/math.d.ts +0 -48
- package/dist-library/types/local/options.d.ts +0 -36
- package/dist-library/types/local/parser.d.ts +0 -13
- package/dist-library/types/local/render-types.d.ts +0 -27
- package/dist-library/types/local/runtime.d.ts +0 -2
- package/dist-library/types/local/schema.d.ts +0 -77
- package/dist-library/types/local/types.d.ts +0 -263
- package/dist-library/types/local/visuals.d.ts +0 -12
- package/dist-library/types/local/worker.d.ts +0 -98
- package/docs/development/performance-ch.md +0 -76
- package/docs/development/performance-en.md +0 -76
- /package/dist-library/types/{editor → authoring}/command-types.d.ts +0 -0
- /package/dist-library/types/{editor → authoring}/editor-commands.d.ts +0 -0
- /package/dist-library/types/local/{locale.d.ts → contracts/locale.d.ts} +0 -0
- /package/dist-library/types/local/{collection-functions.d.ts → evaluation/collection-functions.d.ts} +0 -0
- /package/dist-library/types/local/{data-functions.d.ts → evaluation/data-functions.d.ts} +0 -0
- /package/dist-library/types/local/{dates.d.ts → evaluation/dates.d.ts} +0 -0
- /package/dist-library/types/local/{formatting.d.ts → evaluation/formatting.d.ts} +0 -0
- /package/dist-library/types/local/{html-names.d.ts → html/html-names.d.ts} +0 -0
- /package/dist-library/types/local/{text-length.d.ts → source/text-length.d.ts} +0 -0
- /package/dist-library/types/local/{colors.d.ts → theme/colors.d.ts} +0 -0
- /package/dist-library/types/local/{code-block.d.ts → widgets/code-block.d.ts} +0 -0
- /package/dist-library/types/local/{code-languages.d.ts → widgets/code-languages.d.ts} +0 -0
- /package/dist-library/types/local/{diagram-layout.d.ts → widgets/diagram-layout.d.ts} +0 -0
- /package/dist-library/types/local/{image-view.d.ts → widgets/image-view.d.ts} +0 -0
- /package/dist-library/types/local/{math-view.d.ts → widgets/math-view.d.ts} +0 -0
- /package/dist-library/types/local/{table-surface.d.ts → widgets/table-surface.d.ts} +0 -0
package/CHANGELOG-ch.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# 变更记录
|
|
2
2
|
|
|
3
|
+
**中文** · [English](CHANGELOG.md)
|
|
4
|
+
|
|
5
|
+
## 0.8.0(2026-11-12,latest 渠道)
|
|
6
|
+
|
|
7
|
+
编辑器拆为 `reactive-md-editor`,Demo 独立维护;旧 `reactive-md/editor` 导入迁移至 `reactive-md-editor`,这是 0.8 的包 API 破坏性变更。新增单次编译入口、严格模式与局部恢复、HTML details 映射;包、语法和数据协议分别管理版本。
|
|
8
|
+
|
|
9
|
+
### 新增
|
|
10
|
+
|
|
11
|
+
- 新增 `reactive-md/compiler` 与 `reactive-md/compiler/standard`。最小入口默认不注册组件;标准入口安装默认预设与 KaTeX 展示检查。两者只返回普通数据,执行源码、表达式、结构和预算限制,结果使用 `status: 'valid' | 'recovered' | 'failed'`,并保留原有 `ok`、`document` 读取方式。
|
|
12
|
+
- 编译工厂、`compileLocal`、编辑会话和 Worker 新增 `strict` 与局部恢复。严格模式仍是默认值。设置 `strict: false` 后,损坏区域保留为原始文本,每个最终恢复产生一条稳定 warning,编译在下一个可靠边界继续。两种模式都把无空行的 `<details>` / `<summary>` 片段映射为单个 disclosure。
|
|
13
|
+
- 当 `reactiveMd()` 未传入 `extensions` 模块时,Vite 适配器扫描 Vite 根目录下的 `theme/<folder>/theme.css`(可选 `theme.json`)和 `plugin/<folder>/index.*`(可选 `component.css`)。发现的本地 CSS 与资源通过有界构建资源收集器解析并内联。
|
|
14
|
+
- 默认图表为每个柱子提供独立的悬浮与聚焦目标,在环形图图例中显示每个可见扇区的占比,并允许图例开关系列或扇区。柱、线、点和弧的几何变化带有动画,并遵循减少动态效果偏好。
|
|
15
|
+
- 默认主题 UI 修订:函数图按各轴范围适配并保持屏幕网格正方形;tooltip 浮层避开嵌套容器裁剪;修复主按钮文字对比度,统一 Jump 按钮样式,并为可交互选项增加短促的选中反馈。
|
|
16
|
+
- 默认预设新增 `<gallery>` 与 `<gallery-item>`,支持图片、卡片和 Markdown 混排、原生强制停靠、滚轮/键盘/拖动浏览、h3 切片标题及完整静态输出,布局包与编辑器插入目录同步支持。
|
|
17
|
+
- 默认主题图解改为悬浮或聚焦节点时显示说明浮层,增加缩放与适应宽度、关联路径高亮、整框状态配色和长标题适配;静态输出保留全部节点说明。
|
|
18
|
+
- 新增 `reactive-md/runtime`:文档与组件身份、可序列化种子随机、注入式时钟/调度器、组件状态协议与预算。
|
|
19
|
+
- 新增 `reactive-md/react/runtime`:`useTicker`、`useFrame`、`useSwipe`、`useKeys`、`useComponentState`。
|
|
20
|
+
- 新增 `reactive-md/runtime/browser`:基于 Web Storage 的持久化后端;组件状态注册表接受任意 `LocalComponentStateStorage`,并在保存或清除后写入。传入 `componentStateWriteDelayMs` 可合并高频保存;`state.flush()` 立即写入待处理的 sidecar,`flushComponentStateOnPageHide` 在 `pagehide` 和 `visibilitychange` 时补写。运行时销毁时也会补写;后端写入失败时最新状态保持待写,下一次保存、flush 或销毁会重试。
|
|
21
|
+
- `reactive-md build` 新增 `--component-state-file`、`--document-id` 与 `--random-seed`。交互式导出把经过校验的组件状态 sidecar 写入自动挂载载荷;静态导出拒绝该选项。
|
|
22
|
+
- `LocalRuntimeOptions` 支持 `documentId`、`randomSeed`、`componentState` 与注入的 `services`;`LocalReactiveDocument` 对应新增同名属性和 `onComponentStateChange`。
|
|
23
|
+
- 组件上下文新增 `services.random`、`services.clock`、`services.scheduler` 和 `services.state`。随机状态保持可保存、可重放;调度器处理页面可见性。
|
|
24
|
+
- Tetris 示例改用 `useTicker`,2048 示例改用 `useSwipe`。
|
|
25
|
+
- 新增 `examples/sci-fi-theme`:硬科幻主题包,包含三层 tokens、亮暗模式、面板/表格/表单/导航/图表容器组件样式、现场示例、设计规范与截图验证。
|
|
26
|
+
- 默认主题的交互式 `<coordinate>` 与 `<plot>` 改用 Mafs:坐标点拖拽与吸附、平移缩放、点击曲线聚焦并淡化其余曲线、聚焦曲线上的鼠标跟随点。服务端渲染、静态导出与打印仍保留原有 SVG 输出。
|
|
27
|
+
|
|
28
|
+
### 移除
|
|
29
|
+
|
|
30
|
+
- 移除 `reactive-md/editor`、`reactive-md/editor/codemirror` 及其样式表导出。安装 `reactive-md-editor@0.1.0`,改用 `reactive-md-editor`、`reactive-md-editor/codemirror` 和对应样式表。已发布的 0.7 包仍保留旧入口。
|
|
31
|
+
|
|
32
|
+
### 兼容性
|
|
33
|
+
|
|
34
|
+
- 引擎与编辑器分别发布:先发布 `reactive-md@0.8.0`,再发布 `reactive-md-editor@0.1.0`。
|
|
35
|
+
- `0.8.0` 保持语法 `local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 以及 `0.7.0` SDK 契约。文档源码和状态文件无需因本次包升级而迁移。
|
|
36
|
+
- 新服务为增量字段,旧组件可忽略。组件状态使用独立的 `reactive-md-component-state/v1` sidecar,不改变 `reactive-md-state/v1`。
|
|
37
|
+
- 跨编辑恢复需要显式 `state-key`;没有该属性时只保证同一源码和同一会话内可恢复。
|
|
38
|
+
|
|
39
|
+
## 0.7.0(2026-10-31,latest 与 next 渠道)
|
|
40
|
+
|
|
41
|
+
参见 [0.7.0 发布说明](docs/releases/release-0.7.0-ch.md)。语法修订升级为 `local-draft-3`,组块协议升级为 `component-protocol-3`;主题协议 `reactive-md-theme-1` 保持不变。
|
|
42
|
+
|
|
43
|
+
### 新增
|
|
44
|
+
|
|
45
|
+
- 新增 `<external>` 只读声明。宿主通过 `LocalReactiveDocument` 的 `externalValues` 或 `runtime.setExternalValues()` 提供值;缺失值只让依赖它的表达式失败,不会被转换为 `0`、`false` 或空字符串。
|
|
46
|
+
- `number`、`slider`、`date`、`input` 和 `textarea` 支持动态 `min`、`max` 与 `required`。约束在写入和显示时检查;已存值失效时报告错误,不会静默截断。
|
|
47
|
+
- 正式发布扩展 SDK 入口:`reactive-md/sdk`、`/vite`、`/build`、`/testing`、`/testing/react`、`/testing/browser`、`/authoring`、`/export`、`/standalone` 与 `/react/server`。
|
|
48
|
+
- 新增 `defineLocalComponent`、`defineReactComponentPackage`、`createLocalConfig`、`createReactConfig`、`createReactHost`、`defineLocalTheme`、`composeLocalTheme` 以及 `reactiveMd({ extensions })` Vite 适配器。
|
|
49
|
+
- 新增从 manifest 派生的作者目录、组件与主题包、离线构建与恢复、合规工具和配置不匹配诊断。
|
|
50
|
+
- 新增 `<tetris>` 与 `<game-2048>` 组件包示例,并以随仓库提交的 npm tarball 安装到 Demo。
|
|
51
|
+
|
|
52
|
+
### 调整
|
|
53
|
+
|
|
54
|
+
- `reactive-md/editor` 统一使用 CM6,`/editor/codemirror` 保留为共用运行时和样式的别名。删除 `textareaRef`、`getTextarea`,通过编辑器 ref 访问源码、选区和 DOM;文档中的 textarea 表单组件继续受支持。新增预览到源码的定位。
|
|
55
|
+
- 46 个默认组件迁移到公开扩展契约;外部组件与默认组件共用同一校验器、编译器和渲染器。
|
|
56
|
+
- `component-protocol-3` 新增宿主 inline/container 形态与标量绑定。旧版 `hostComponents`、`hostRenderer` 和 `hostData` 仍可用于迁移。
|
|
57
|
+
- 连续编辑时复用扁平列表、表格的行解析计划及未修改行的节点身份,支持整篇只有一个巨大列表或表格;正确更新移位后的 UTF-16 范围,并分别统计计划和节点复用。
|
|
58
|
+
- Worker 在结果补丁成本过高时直接返回同一修订的完整成功结果,继续后续补丁链;为行内缓存复制短字符串,避免保留旧版全文。
|
|
59
|
+
- 将优化历史、当前复测和复现命令归并到[性能总览](docs/development/performance-overview-ch.md)。
|
|
60
|
+
|
|
61
|
+
### 兼容性
|
|
62
|
+
|
|
63
|
+
- 显式声明 `local-draft-1` 或 `local-draft-2` 的文档会被拒绝。使用 `reactive-md migrate` 迁移,或继续用旧包版本渲染。
|
|
64
|
+
- 从 `local-draft-2` 迁移时,新激活的 `<external>` 标签会被阻止;先把字面示例移入代码块。
|
|
65
|
+
- `LOCAL_SDK_VERSION` 改变配置键。携带旧 `componentConfigKey` 的文档会报告 `local.extension.config-mismatch`,需要重新编译。
|
|
66
|
+
- 编辑器 textarea ref 字段已移除,请改用 `getSource()`、`getSelection()`、`selectRange()` 和 `getEditorElement()`。
|
|
67
|
+
- 迁移会改变源码摘要;迁移后应重新导出 `reactive-md-state/v1` 文件。
|
|
68
|
+
|
|
3
69
|
## 0.6.1(2026-10-27,latest 与 next 渠道)
|
|
4
70
|
|
|
5
71
|
- 公式展示改用 KaTeX,输出可视 HTML、用于辅助技术的 MathML 和原始 LaTeX 注释,保留 mhchem 化学式支持。
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
**English** · [中文](CHANGELOG-ch.md)
|
|
4
|
+
|
|
5
|
+
## 0.8.0 (2026-11-12, latest channel)
|
|
6
|
+
|
|
7
|
+
The release splits the editor into `reactive-md-editor` and the Demo into independent repositories. Replace `reactive-md/editor` imports with `reactive-md-editor`. Add one-shot compiler entries, strict/local recovery and HTML details mapping. Package, syntax and data protocols retain independent versioning.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add `reactive-md/compiler` and `reactive-md/compiler/standard`. The minimal entry registers no components; the standard entry installs the default preset and the KaTeX display checks. Both return plain data, enforce source, expression, structure and budget limits, and use `status: 'valid' | 'recovered' | 'failed'` results while keeping the existing `ok` and `document` read path.
|
|
12
|
+
- Add `strict` and local recovery to compiler factories, `compileLocal`, editing sessions and Workers. Strict mode remains the default. With `strict: false`, a damaged region stays as literal source, each finalized recovery produces one stable warning, and compilation resumes at the next reliable boundary. Both modes map a blank-line-free `<details>` / `<summary>` fragment to one disclosure.
|
|
13
|
+
- The Vite adapter discovers `theme/<folder>/theme.css` (optional `theme.json`) and `plugin/<folder>/index.*` (optional `component.css`) under the Vite root when `reactiveMd()` has no `extensions` module. Discovered local CSS and assets are resolved and inlined through the bounded build-resource collector.
|
|
14
|
+
- Default charts give each bar its own hover and focus target, show each visible donut slice's share in the legend, and let legend items toggle series or slices. Bars, lines, points and arcs animate geometry changes, with reduced-motion preferences respected.
|
|
15
|
+
- Refine default-theme UI: fit function plots to their axis ranges with square screen-space grids, let tooltip layers escape nested clipping, restore primary-button text contrast, align Jump buttons with standard buttons and add brief selection feedback to interactive options.
|
|
16
|
+
- Add `<gallery>` and `<gallery-item>` to the default preset, layout pack and insertion catalog: mixed images/cards/Markdown, native mandatory snapping, wheel/keyboard/thumb navigation, h3 captions and complete static output.
|
|
17
|
+
- Default-theme diagrams show node notes in hover/focus popovers, with zoom/fit controls, related-path highlighting, full-frame status colors and long-label handling. Static output retains all node descriptions.
|
|
18
|
+
- `reactive-md/runtime`: document and component identity, serializable seeded randomness, injected clock/scheduler, and the component-state protocol with budgets.
|
|
19
|
+
- `reactive-md/react/runtime`: `useTicker`, `useFrame`, `useSwipe`, `useKeys` and `useComponentState`.
|
|
20
|
+
- `reactive-md/runtime/browser`: a Web Storage persistence backend; the component-state registry accepts any `LocalComponentStateStorage` and persists after save or clear. Pass `componentStateWriteDelayMs` to coalesce high-frequency saves; `state.flush()` writes pending state, and `flushComponentStateOnPageHide` flushes on `pagehide` and `visibilitychange`. Runtime disposal also flushes pending state; a failed backend keeps the latest state pending so the next save, flush or disposal retries it.
|
|
21
|
+
- `reactive-md build` gains `--component-state-file`, `--document-id` and `--random-seed`. Interactive exports embed the validated component-state sidecar in the auto-mount payload; static output rejects it.
|
|
22
|
+
- `LocalRuntimeOptions` accepts `documentId`, `randomSeed`, `componentState` and injected `services`; `LocalReactiveDocument` exposes matching props plus `onComponentStateChange`.
|
|
23
|
+
- Component contexts gain `services.random`, `services.clock`, `services.scheduler` and `services.state`. Random state stays saveable and replayable; the scheduler handles page visibility.
|
|
24
|
+
- The Tetris example uses `useTicker`; the 2048 example uses `useSwipe`.
|
|
25
|
+
- Add `examples/sci-fi-theme`: a hard-sci-fi theme package with three-layer tokens, light/dark modes, component styling for panels, tables, forms, navigation and chart containers, a live gallery, design specification and screenshot verification.
|
|
26
|
+
- The default theme renders interactive `<coordinate>` and `<plot>` with Mafs: draggable snapped points, pan and zoom, click-to-focus curves with dimmed backgrounds, and a pointer-tracked point on the focused curve. Server rendering, static export and print keep the existing SVG output.
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
|
|
30
|
+
- Remove `reactive-md/editor`, `reactive-md/editor/codemirror` and their stylesheet exports. Install `reactive-md-editor@0.1.0` and use `reactive-md-editor`, `reactive-md-editor/codemirror` and the matching stylesheets. Published 0.7 packages keep the old entries.
|
|
31
|
+
|
|
32
|
+
### Compatibility
|
|
33
|
+
|
|
34
|
+
- The engine and editor publish separately. Publish `reactive-md@0.8.0` first, then `reactive-md-editor@0.1.0`.
|
|
35
|
+
- `0.8.0` keeps syntax `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the `0.7.0` SDK contract. Document sources and state files need no migration for this package update.
|
|
36
|
+
- The new services are additive; existing components can ignore them. Component state uses a separate `reactive-md-component-state/v1` sidecar and does not change `reactive-md-state/v1`.
|
|
37
|
+
- Cross-edit restore requires an explicit `state-key`; without it, restore is limited to the same source and session.
|
|
38
|
+
|
|
39
|
+
## 0.7.0 (2026-10-31, latest and next channels)
|
|
40
|
+
|
|
41
|
+
See the [0.7.0 release notes](docs/releases/release-0.7.0-en.md). Syntax revision `local-draft-3` and component protocol `component-protocol-3` replace their previous revisions; theme protocol `reactive-md-theme-1` is unchanged.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Add `<external>` read-only declarations. Hosts supply `externalValues` through `LocalReactiveDocument` or `runtime.setExternalValues()`; missing values fail only dependent expressions and are never converted to `0`, `false` or an empty string.
|
|
46
|
+
- Add dynamic `min`, `max` and `required` constraints on number, slider, date, input and textarea controls. Constraints are checked on write and display; invalid stored values are reported, not clamped.
|
|
47
|
+
- Publish the extension SDK entries: `reactive-md/sdk`, `/vite`, `/build`, `/testing`, `/testing/react`, `/testing/browser`, `/authoring`, `/export`, `/standalone` and `/react/server`.
|
|
48
|
+
- Add `defineLocalComponent`, `defineReactComponentPackage`, `createLocalConfig`, `createReactConfig`, `createReactHost`, `defineLocalTheme`, `composeLocalTheme` and the `reactiveMd({ extensions })` Vite adapter.
|
|
49
|
+
- Add manifest-derived authoring catalogs, component/theme packages, offline build and restoration, compliance tools and configuration-mismatch diagnostics.
|
|
50
|
+
- Add component package examples for `<tetris>` and `<game-2048>`, installed as committed npm tarballs in the Demo.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- Use CM6 as the only source editor at `reactive-md/editor`; retain `/editor/codemirror` as an alias sharing the same runtime and styles. Remove `textareaRef` and `getTextarea`; use the editor ref for source, selection and DOM access. Document textarea controls remain supported. Add preview-to-source navigation.
|
|
55
|
+
- Migrate the 46 default components to the public extension contract; external and default components share the same validator, compiler and renderer.
|
|
56
|
+
- `component-protocol-3` adds host inline/container forms and scalar bindings. Legacy `hostComponents`, `hostRenderer` and `hostData` remain available for migration.
|
|
57
|
+
- Reuse flat list/table row plans and unchanged node identities across edits, including documents containing a single large list or table. Keep shifted UTF-16 ranges accurate and count plan reuse separately from node reuse.
|
|
58
|
+
- Return a complete successful Worker result when a result patch costs too much, retaining the negotiated revision chain. Copy short inline-cache strings so they cannot retain old full document strings.
|
|
59
|
+
- Consolidate performance history, current measurements and reproduction commands into the [performance overview](docs/development/performance-overview-en.md).
|
|
60
|
+
|
|
61
|
+
### Compatibility
|
|
62
|
+
|
|
63
|
+
- Explicit `local-draft-1` and `local-draft-2` declarations are rejected. Migrate with `reactive-md migrate`, or keep rendering with the old package version.
|
|
64
|
+
- Migration from `local-draft-2` blocks newly active `<external>` tags; move literal examples into code first.
|
|
65
|
+
- `LOCAL_SDK_VERSION` changes the configuration key. Documents carrying an old `componentConfigKey` report `local.extension.config-mismatch` and must be recompiled.
|
|
66
|
+
- The editor textarea ref fields are removed. Use `getSource()`, `getSelection()`, `selectRange()` and `getEditorElement()`.
|
|
67
|
+
- Migration changes the source digest; export a fresh `reactive-md-state/v1` file afterwards.
|
|
68
|
+
|
|
3
69
|
## 0.6.1 (2026-10-27, latest and next channels)
|
|
4
70
|
|
|
5
71
|
- Typeset formulas with KaTeX HTML and accessible MathML, retaining the original LaTeX annotation and mhchem chemistry.
|
package/CONTRIBUTING-ch.md
CHANGED
|
@@ -1,67 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 参与开发
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**中文** · [English](CONTRIBUTING.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本仓库维护语言引擎、运行时、SDK 与渲染适配器;[编辑器](https://github.com/yao1145/ReactiveMD-Editor)和 [Demo](https://github.com/yao1145/ReactiveMD-Demo) 分别维护。先阅读[迁移说明](docs/integration/repository-split-ch.md)与[语法规范](docs/reference/local-interaction-syntax-ch.md)。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
使用 Node >=22.12,CI 使用 Node24。在本仓库运行 npm ci、npm run check,完成类型、构建、保留的回归和实际 tarball 消费验证。局部修改先运行直接相关检查;编译入口依赖变化时补充 npm run test:compiler-entry。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- 仓库使用 npm workspaces;在根目录执行 `npm ci`。
|
|
11
|
-
- 不提交 `node_modules/`、`dist-library/`、`demo/dist/`、`demo/artifacts/` 或 `.tasks/`。
|
|
9
|
+
引擎公共 API 独立于编辑器 UI,纯目录、插入命令和分析服务放在 reactive-md/authoring。行为变化补针对性回归,保留安全与资源预算,更新公开文档。包版本、语法版本、状态协议与主题版本分别管理。
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
npm ci
|
|
17
|
-
npm run verify:release
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
| 命令 | 覆盖内容 |
|
|
21
|
-
| --- | --- |
|
|
22
|
-
| `npm run build` | 类型检查与语言包构建 |
|
|
23
|
-
| `npm test` | 编译器、表达式、LaTeX、运行时和渲染器测试 |
|
|
24
|
-
| `npm run test:components` | 组块协议的代表性用例和已有语言验收数据;新增组块还需自己的针对性测试 |
|
|
25
|
-
| `npm run test:package` | 公开入口、示例可编译和样式边界;需先构建 |
|
|
26
|
-
| `npm run test:packed` | 真实 tarball 的独立离线安装、核心和 React 严格类型检查、CSS 导出与静态 SSR |
|
|
27
|
-
| `npm run notices` | 从已安装依赖生成第三方许可证清单 |
|
|
28
|
-
| `npm run benchmark` | Node 编译、运行时和绘图性能;报告写入 `artifacts/benchmark.json` |
|
|
29
|
-
| `npm run test:docs` | 文档相对链接和标题锚点 |
|
|
30
|
-
| `npm run build:demo`、`npm run test:demo` | Demo 构建与示例索引 |
|
|
31
|
-
| `npm run test:browser:core` | Firefox 与 WebKit 在 1280px、375px 下的核心流程;使用已构建 Demo,并自行管理预览服务 |
|
|
32
|
-
| `npm run verify:release` | 完整发布门禁:核心与 Demo 测试、类型、第三方声明、包与文档检查、仓库外真实 tarball 消费,以及计算、集合、作者工具、状态恢复、HTML 导出和渲染等价的浏览器检查。自行管理预览服务生命周期 |
|
|
33
|
-
|
|
34
|
-
CI 通过 `npm run verify:release:node` 和 `npm run verify:release:browser` 分片运行同一门禁。汇总与逐步日志写入 `artifacts/release-verification.json` 和 `artifacts/release-verification/`;经过验证的原始 tarball 及 SHA256 记录保留在 `artifacts/release-package/`。本机需已安装浏览器,门禁不会自动安装。
|
|
35
|
-
|
|
36
|
-
浏览器检查需要先启动 Demo,并准备本机浏览器。完整门禁会自行管理这些依赖;单独运行浏览器脚本时,默认地址是 `http://127.0.0.1:5173`,可用 `DEMO_URL` 指向其他地址。报告写入 `demo/artifacts/`。本地默认使用 Edge,CI 在 Linux 上使用 Playwright 的 Chromium(`PLAYWRIGHT_CHANNEL=chromium`)。
|
|
37
|
-
|
|
38
|
-
浏览器发布门禁保留 Chromium 完整验证,并增加 Playwright Firefox、WebKit 的核心流程。通过 `npm exec --workspace=@reactive-md/demo -- playwright install firefox webkit` 安装匹配的运行时;CI 使用 `--with-deps` 安装三个引擎。先运行 `npm run build:demo`,再运行 `npm run test:browser:core`;也可用 `node scripts/verify-browser-core.mjs --browser=webkit` 选择单个引擎,或用 `DEMO_URL` 复用已有服务。报告、截图与下载的 HTML 按引擎写入 `artifacts/browser-core/`。缺少浏览器或检查失败时,命令会失败。
|
|
39
|
-
|
|
40
|
-
核心流程覆盖示例、控件与计算、条件、日期、表格、图表、图解、编辑与诊断、个人文档保存与副本、语言切换、指南代码块主题、键盘菜单,以及 Markdown 和交互 HTML 下载。导出的 HTML 从磁盘重新打开,在阻止外部请求的条件下验证交互。WebKit 引擎检查不等同于 Apple 设备上的 Safari 实机测试。
|
|
41
|
-
|
|
42
|
-
```sh
|
|
43
|
-
npm run dev
|
|
44
|
-
# 另一个终端
|
|
45
|
-
npm run test:browser
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
修改语言包后重新运行 `npm run build:lib`,或使用 `npm run dev:lib` 监听重建。
|
|
49
|
-
|
|
50
|
-
性能测量条件与当前基线见[性能说明](docs/development/performance-ch.md),跨实现可复用的输入与预期结果见[语言验收数据](examples/conformance/README.md)。
|
|
51
|
-
|
|
52
|
-
## 改动要求
|
|
53
|
-
|
|
54
|
-
- 保持改动聚焦。行为变化附带测试;用户可见变化更新文档和相关示例。
|
|
55
|
-
- 语法或公开 API 的破坏性变化先更新[版本与兼容性](docs/compatibility/compatibility-ch.md)和[变更记录](CHANGELOG-ch.md),说明旧写法、新写法和迁移方式。不要在没有语法修订的情况下悄悄改变作者语法。
|
|
56
|
-
- 新组件或新属性必须同时实现编译校验、运行时约束、渲染、可访问名称和资源边界。不要只加展示样式。
|
|
57
|
-
- 组块提案须给出属性与子内容声明、状态与生命周期规则、诊断、资源预算、兼容分类和对应验收结果;参考 `slider`、`tabs`、`plot` 的[协议验收数据](examples/conformance/README.md)。协议修订不自动改变包版本、语法修订或公开 API。
|
|
58
|
-
- 资源上限集中在 `src/local/limits.ts`;新增无界输入、循环、递归或绘图计算时,先定义预算。
|
|
59
|
-
- 不引入网络请求、任意 HTML、事件处理器、作者 CSS 或持久化状态。这些不在当前范围内。
|
|
60
|
-
- 更新中文文档时保持与现有术语一致;英文 README 保持简洁,不重复工程细节。
|
|
61
|
-
- 不要提交凭据、`.npmrc` token 或个人路径。不要手工修改 `dist-library/`;它由构建生成。
|
|
62
|
-
|
|
63
|
-
## 提交与 PR
|
|
64
|
-
|
|
65
|
-
- PR 说明写清目的、受影响范围和验证命令及结果。没有运行的检查要明确写出,不要写成已通过。
|
|
66
|
-
- 涉及安全的问题不要开公开 issue,按[安全策略](SECURITY-ch.md)处理。
|
|
67
|
-
- 发布是维护者的手工流程,见[发布清单](docs/development/releasing-ch.md)。贡献者不需要接触 npm 凭据。
|
|
11
|
+
不提交 dist、依赖或凭据,保留无关改动。PR 描述实际行为和已运行检查。引擎发包仅在授权后使用手动 OIDC 工作流,见[发布流程](docs/development/releasing-ch.md);站点部署由 Demo 仓库负责。
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,69 +1,11 @@
|
|
|
1
1
|
# Contributing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English** · [中文](CONTRIBUTING-ch.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This repository owns the ReactiveMD language engine, runtime, SDK and rendering adapters. The [editor](https://github.com/yao1145/ReactiveMD-Editor) and [Demo](https://github.com/yao1145/ReactiveMD-Demo) are separate projects. Read the [migration guide](docs/integration/repository-split-en.md) and [syntax specification](docs/reference/local-interaction-syntax-en.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use Node >=22.12 (CI uses Node24). Run npm ci, then npm run check. This checks types, builds the library, runs the retained regressions and verifies the actual package in a fresh consumer. Local changes need the directly affected checks; changes to compiler entry dependencies also need npm run test:compiler-entry.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- The repository uses npm workspaces; run `npm ci` from the root.
|
|
11
|
-
- Do not commit `node_modules/`, `dist-library/`, `demo/dist/`, `demo/artifacts/` or `.tasks/`.
|
|
9
|
+
Keep public engine APIs independent of editor UI. Pure catalog, insertion and analysis services belong in reactive-md/authoring. Add focused regressions for behavior changes, preserve security/resource budgets and update public documentation. Keep package, syntax, state and theme versions separate.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
npm ci
|
|
17
|
-
npm run verify:release
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
| Command | What it covers |
|
|
21
|
-
| --- | --- |
|
|
22
|
-
| `npm run build` | Type checking and the language package build |
|
|
23
|
-
| `npm test` | Compiler, expression, LaTeX, runtime and renderer tests |
|
|
24
|
-
| `npm run lint -- <file>` | Author diagnostics for one or more documents; requires a prior build |
|
|
25
|
-
| `npm run test:diagnostics --workspace=@reactive-md/demo` | Browser checks for diagnostic localization, source jumps and Unicode text constraints; requires a running demo |
|
|
26
|
-
| `npm run test:components` | Representative cases for the component protocol and existing language acceptance data; new components still need their own targeted tests |
|
|
27
|
-
| `npm run test:package` | Public entries, example compilation and style boundaries; requires a prior build |
|
|
28
|
-
| `npm run test:packed` | Standalone offline install of the real tarball, strict type checking for core and React, CSS exports and static SSR |
|
|
29
|
-
| `npm run notices` | Generate the third-party license inventory from installed dependencies |
|
|
30
|
-
| `npm run benchmark` | Node compile, runtime and plotting performance; the report is written to `artifacts/benchmark.json` |
|
|
31
|
-
| `npm run test:docs` | Documentation relative links and heading anchors |
|
|
32
|
-
| `npm run build:demo`, `npm run test:demo` | Demo build and example index |
|
|
33
|
-
| `npm run test:browser:core` | Firefox and WebKit core workflows at 1280px and 375px; uses the built demo and manages its preview server |
|
|
34
|
-
| `npm run verify:release` | Complete release gate: core and demo tests, types, notices, package and documentation checks, packed consumption outside the repository, and browser checks for calculations, collections, authoring, state restoration, HTML export and rendering equivalence. It manages the preview server lifecycle |
|
|
35
|
-
|
|
36
|
-
CI uses `npm run verify:release:node` and `npm run verify:release:browser` to split the same gate. Reports and step logs go to `artifacts/release-verification.json` and `artifacts/release-verification/`; the exact verified tarball and its SHA256 record go to `artifacts/release-package/`. A local browser must already be installed; the gate does not install one.
|
|
37
|
-
|
|
38
|
-
Browser checks require the demo to be running and a local browser available. The complete gate manages those dependencies itself; when running individual browser scripts, the default address is `http://127.0.0.1:5173` and `DEMO_URL` can point at another address. Reports are written to `demo/artifacts/`. Local runs use Edge by default; CI uses Playwright Chromium on Linux (`PLAYWRIGHT_CHANNEL=chromium`).
|
|
39
|
-
|
|
40
|
-
The browser release gate keeps the full Chromium suite and adds core workflows in Playwright Firefox and WebKit. Install the matching runtimes with `npm exec --workspace=@reactive-md/demo -- playwright install firefox webkit` (CI installs all three engines with `--with-deps`). After `npm run build:demo`, run `npm run test:browser:core`, or select one engine with `node scripts/verify-browser-core.mjs --browser=webkit`. `DEMO_URL` can reuse an existing server. Reports, screenshots and downloaded HTML go to `artifacts/browser-core/`, grouped by engine. A missing browser or failed check makes the command fail.
|
|
41
|
-
|
|
42
|
-
The core gate covers examples, controls and calculations, conditions, dates, tables, charts, diagrams, editing and diagnostics, personal document persistence and copies, language switching, guide code themes, keyboard menus, and Markdown/interactive HTML downloads. Exported HTML is reopened from disk and exercised with external requests blocked. WebKit engine checks do not substitute for testing Safari on an Apple device.
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
npm run dev
|
|
46
|
-
# another terminal
|
|
47
|
-
npm run test:browser
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
After changing the language package, rerun `npm run build:lib`, or use `npm run dev:lib` to watch and rebuild.
|
|
51
|
-
|
|
52
|
-
Performance measurement conditions and current baselines are in [Performance measurements](docs/development/performance-en.md); reusable inputs and expected results across implementations are in the [language conformance data](examples/conformance/README.md).
|
|
53
|
-
|
|
54
|
-
## Change requirements
|
|
55
|
-
|
|
56
|
-
- Keep changes focused. Add tests for behavior changes; update documentation and relevant examples for user-visible changes.
|
|
57
|
-
- For breaking changes to syntax or the public API, first update [Versions and compatibility](docs/compatibility/compatibility-en.md) and the [changelog](CHANGELOG.md), describing the old form, the new form and the migration path. Do not silently change author syntax without a syntax revision.
|
|
58
|
-
- New components or attributes must implement compile validation, runtime constraints, rendering, accessible names and resource boundaries together. Do not add display styling only.
|
|
59
|
-
- A component proposal must state attribute and child-content declarations, state and lifecycle rules, diagnostics, resource budgets, compatibility classification and corresponding acceptance results; see the [protocol acceptance data](examples/conformance/README.md) for `slider`, `tabs` and `plot`. A protocol revision does not automatically change the package version, syntax revision or public API.
|
|
60
|
-
- Resource limits are centralized in `src/local/limits.ts`; when adding unbounded input, loops, recursion or plotting computation, define a budget first.
|
|
61
|
-
- Do not introduce network requests, arbitrary HTML, event handlers, author CSS or persisted state. These are out of the current scope.
|
|
62
|
-
- Keep terminology consistent with the existing documentation; keep the English README concise and do not repeat engineering details.
|
|
63
|
-
- Do not commit credentials, `.npmrc` tokens or personal paths. Do not edit `dist-library/` by hand; it is generated by the build.
|
|
64
|
-
|
|
65
|
-
## Commits and pull requests
|
|
66
|
-
|
|
67
|
-
- Describe the purpose, affected scope, verification commands and results in the PR. State any checks you did not run explicitly instead of presenting them as passed.
|
|
68
|
-
- Do not open a public issue for security matters; follow the [security policy](SECURITY.md).
|
|
69
|
-
- Releases are a manual maintainer process; see the [release checklist](docs/development/releasing-en.md). Contributors do not need npm credentials.
|
|
11
|
+
Do not commit generated dist directories, dependencies or credentials. Preserve unrelated edits. Describe behavior and actual validation in PRs. Release the engine through its manual OIDC workflow only when authorized; see the [release guide](docs/development/releasing-en.md). Demo deployment belongs to the Demo repository.
|