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
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
# Public API reference
|
|
2
|
+
|
|
3
|
+
**English** · [中文](public-api-ch.md)
|
|
4
|
+
|
|
5
|
+
This page lists every public interface Reactive MD offers to external developers: package entries, the command line, browser protocols and the editor package. Use it to choose an entry before reading the topic documents.
|
|
6
|
+
|
|
7
|
+
Three packages exist. Each has its own version and release workflow.
|
|
8
|
+
|
|
9
|
+
| Package | Version | Responsibility |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `reactive-md` | `0.9.1` | Compiler, runtime, authoring services, SDK, React and SSR rendering, export, build adapters |
|
|
12
|
+
| `reactive-md-editor` | `0.2.0` | CodeMirror 6 source editor, toolbar, editor-side navigation |
|
|
13
|
+
| `reactive-md-demo` | private | Website, examples and deployment. No public API |
|
|
14
|
+
|
|
15
|
+
The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. React 19 and Vite 8 are optional peers, each used by a subset of the entries.
|
|
16
|
+
|
|
17
|
+
## Quick index
|
|
18
|
+
|
|
19
|
+
| Entry | Kind | React | Node-only | One-line purpose |
|
|
20
|
+
| --- | --- | --- | --- | --- |
|
|
21
|
+
| `reactive-md` | ESM | No | No | Full core surface: one-shot and streaming compile, incremental sessions, runtime, state, Worker, shareable HTML |
|
|
22
|
+
| `reactive-md/compiler` | ESM | No | No | One-shot semantic compiler without the default preset |
|
|
23
|
+
| `reactive-md/compiler/standard` | ESM | No | No | One-shot compiler with GFM, native HTML, KaTeX and the default preset |
|
|
24
|
+
| `reactive-md/react` | ESM | Yes | No | React document renderer and component development API |
|
|
25
|
+
| `reactive-md/react/unstyled` | ESM | Yes | No | The same renderer without the stylesheet side effect |
|
|
26
|
+
| `reactive-md/react/minimal` | ESM | Yes | No | Renderer built on the 18-component minimal preset |
|
|
27
|
+
| `reactive-md/react/server` | ESM | Yes | Yes | Strict SSR adapter returning markup or diagnostics |
|
|
28
|
+
| `reactive-md/react/runtime` | ESM | Yes | No | Component-facing React hooks: timers, frames, swipe, keys, state |
|
|
29
|
+
| `reactive-md/sdk` | ESM | No | No | Component, preset and theme manifests with validation |
|
|
30
|
+
| `reactive-md/presets/default` | ESM | No | No | The 48-component default preset as plain data |
|
|
31
|
+
| `reactive-md/presets/default/packs` | ESM | No | No | Four named subsets of the default preset |
|
|
32
|
+
| `reactive-md/presets/minimal` | ESM | No | No | The 18-component minimal preset |
|
|
33
|
+
| `reactive-md/presets/minimal/react` | ESM | Yes | No | React implementations for the minimal preset |
|
|
34
|
+
| `reactive-md/plugins/*` | ESM | Yes | No | Eight optional official component packages |
|
|
35
|
+
| `reactive-md/authoring` | ESM | No | No | Analysis, completion, rename, formatting, catalog, toolbar commands |
|
|
36
|
+
| `reactive-md/export` | ESM | No | Partly | Export preflight, shareable HTML, bundle sealing, restoration rules |
|
|
37
|
+
| `reactive-md/export-assets` | ESM | No | Yes | Locate the stylesheets, notices and runtime that an export embeds |
|
|
38
|
+
| `reactive-md/build` | ESM | No | Yes | Build a standalone interactive bundle through Vite |
|
|
39
|
+
| `reactive-md/vite` | ESM | No | Yes | Vite plugin for directory discovery and virtual modules |
|
|
40
|
+
| `reactive-md/vite/client` | types | — | — | Declarations for the virtual modules |
|
|
41
|
+
| `reactive-md/standalone` | ESM | Yes | No | Programmatic mount API for the bundled standalone runtime |
|
|
42
|
+
| `reactive-md/standalone/host` | ESM | Yes | No | The same mount API bound to a fixed React configuration |
|
|
43
|
+
| `reactive-md/testing` | ESM | No | No | Manifest and behavior compliance runners |
|
|
44
|
+
| `reactive-md/testing/react` | ESM | Yes | Yes | Static and SSR compliance runners |
|
|
45
|
+
| `reactive-md/testing/browser` | ESM | No | No | Browser lifecycle compliance with an optional Playwright driver |
|
|
46
|
+
| `reactive-md/runtime` | ESM | No | No | Document identity, seeds, random, scheduler, component-state registry, network channels |
|
|
47
|
+
| `reactive-md/runtime/browser` | ESM | No | No | `localStorage` persistence, page-hide flush, HTTP/SSE, WebSocket, WebRTC adapters |
|
|
48
|
+
| `reactive-md/pdf` | ESM | No | Yes | Render prepared static HTML to PDF bytes through Playwright |
|
|
49
|
+
| `reactive-md/styles.css` | CSS | — | — | Document, component and theme styles |
|
|
50
|
+
| `reactive-md/styles/minimal.css` | CSS | — | — | Styles for the minimal preset |
|
|
51
|
+
| `reactive-md/screen.css` | CSS | — | — | Alias of `styles.css` |
|
|
52
|
+
| `reactive-md/print.css` | CSS | — | — | Print layout; load after `styles.css` |
|
|
53
|
+
| `reactive-md/notices` | file | — | — | Generated third-party notices |
|
|
54
|
+
| `reactive-md/assets/standalone.js` | IIFE | — | — | Prebuilt browser runtime exposing `ReactiveMD` |
|
|
55
|
+
| `reactive-md/package.json` | file | — | — | Package metadata |
|
|
56
|
+
|
|
57
|
+
## Compilation and the core runtime
|
|
58
|
+
|
|
59
|
+
### `reactive-md`
|
|
60
|
+
|
|
61
|
+
The full core surface. No React, no stylesheet, no DOM.
|
|
62
|
+
|
|
63
|
+
| Area | Exports |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| One-shot compile | `compileLocal`, `LocalCompileResult`, `LocalCompileOptions` |
|
|
66
|
+
| Incremental editing | `createLocalCompileSession`, `LocalCompileSession`, `LocalIncrementalStats` |
|
|
67
|
+
| Streaming source | `LocalSourcePhase`, `LocalCompileStatus`; phased session and scheduler arguments |
|
|
68
|
+
| Runtime | `createLocalRuntime`, `updateLocalRuntime`, `notifyLocalRuntime`, `LocalRuntime`, `LocalSnapshot` |
|
|
69
|
+
| Expressions and math | `compileExpression`, `LocalExpressionError`, `compileLatex`, `compilePlotFormula`, `plotFormulaKind`, `implicitGridSize`, `samplePlot`, `sampleImplicit`, `sampleParametric`, `samplePolar` |
|
|
70
|
+
| Diagnostics | `formatLocalDiagnostic`, `LOCAL_DIAGNOSTIC_CODES`, `isLocalDiagnosticCode`, `localDiagnosticTemplate`, `localDiagnosticTemplateKeys` |
|
|
71
|
+
| State files | `createLocalStateFile`, `parseLocalState`, `resolveLocalState`, `applyLocalState`, `exportLocalState`, `importLocalState`, `serializeLocalState`, `LOCAL_STATE_FORMAT` |
|
|
72
|
+
| State retention | `planLocalStateRetention`, `applyLocalStateRetention` |
|
|
73
|
+
| Source versions | `inspectLocalSourceVersion`, `checkLocalUpgrade`, `migrateLocalSource`, `LOCAL_SYNTAX_VERSION` |
|
|
74
|
+
| Authoring (re-export) | `analyzeLocalSource`, `completeLocalSource`, `renameLocalBinding`, `formatLocalSource` |
|
|
75
|
+
| Background compile | `LocalCompileScheduler`, `startLocalCompileWorker`, `LOCAL_COMPILE_DELAY_MS`, `LOCAL_COMPILE_PREPARATION_DELAY_MS`, `compileFailureDiagnostic`, `localWorkerOptionsKey`, `LocalCompileOutcome`, `LocalCompileRequest`, `LocalCompileResponse` |
|
|
76
|
+
| Result patches | `LOCAL_RESULT_PATCH_PROTOCOL`, `diffSourceEdit`, `applySourceEdit`, `encodeLocalResultPatch`, `applyLocalResultPatch` |
|
|
77
|
+
| Themes | `LOCAL_THEME_PROTOCOL`, `DEFAULT_LOCAL_THEME`, `resolveLocalTheme`, `isLocalThemeName` |
|
|
78
|
+
| HTML envelope | `createShareableHtml`, `resolveLocalStateBaseline`, `SHAREABLE_HTML_FORMAT`, `SHAREABLE_HTML_FORMAT_V2`, `serializeForScript` |
|
|
79
|
+
| Component state | `LOCAL_STATE_FORMAT`, `localSourceDigest`, plus the `./export/component-state` surface |
|
|
80
|
+
|
|
81
|
+
Use this entry when a host compiles, runs and persists documents in memory. `compileLocal()` is the one-shot full compiler; `createLocalCompileSession()` reuses unchanged Markdown blocks across edits; `createLocalRuntime()` owns parameters, subscriptions and disposal. The runtime writes no storage, cookies or network on its own.
|
|
82
|
+
|
|
83
|
+
`LocalCompileOptions.sourcePhase` marks a snapshot as `streaming` or `final`; sessions accept `compile(source, options?, phase?)` and `compileShared(source, options?, phase?)`, and `LocalCompileScheduler.schedule(source, options?, hint?, phase?)` takes the same phase, with `final` bypassing the debounce. Explicit phases add `status` (`partial`, `valid`, `recovered`, `failed`), and streaming results may add `transientDiagnostics`; transient diagnostics never appear in `diagnostics`. Worker full requests and responses echo `sourcePhase` when a phase was declared (on the request or the options object); phase-less legacy jobs omit it. `LocalCompileOutcome.sourcePhase` reports it, revisions stay monotonic, and streaming results never become patch baselines. One-shot `compileLocal` and the compiler entries remain final-only.
|
|
84
|
+
|
|
85
|
+
### `reactive-md/compiler`
|
|
86
|
+
|
|
87
|
+
A single-pass compiler with no component preset. It keeps CommonMark, ReactiveMD structure, expressions, bindings, semantic checks and budgets. It creates no session, Worker, timer or cache, and loads no React, CSS, theme implementation or preset.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { createCompiler } from 'reactive-md/compiler';
|
|
91
|
+
|
|
92
|
+
const result = createCompiler().compile('# Notes\n\nPlain Markdown.');
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Capabilities the minimal assembly does not install produce an explicit capability diagnostic instead of silently changing meaning. For example `enableCss` reports `local.capability.html`.
|
|
96
|
+
|
|
97
|
+
### `reactive-md/compiler/standard`
|
|
98
|
+
|
|
99
|
+
The same result contract, wired to the full experience: the default preset, GFM, native HTML parsing and repair, Lezer block planning, the KaTeX display precheck and plot formula semantics. Use it when a host wants one-shot compilation with the complete language but without sessions, Workers or React.
|
|
100
|
+
|
|
101
|
+
Both factories validate options at creation and freeze a snapshot. Invalid configuration throws `CompilerConfigurationError`. Results carry `status: 'valid' | 'recovered' | 'failed'`, plus `ok`, `document`, `diagnostics`, `program`, `recoveries` and check coverage.
|
|
102
|
+
|
|
103
|
+
## React rendering
|
|
104
|
+
|
|
105
|
+
### `reactive-md/react`
|
|
106
|
+
|
|
107
|
+
| Export | Purpose |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `LocalReactiveDocument` | Compiles a `source` string and owns the runtime; the usual entry for an article |
|
|
110
|
+
| `LocalDocumentView` | Renders a host-compiled `LocalDocument` with a host-owned `LocalRuntime` |
|
|
111
|
+
| `createReactConfig`, `createReactHost` | Bind component manifests to React implementations |
|
|
112
|
+
| `defineReactComponent`, `defineReactComponentPackage`, `defineReactPreset`, `defaultReactPresetPackage` | Package formats for external and official components |
|
|
113
|
+
| `reportLocalComponentError`, `safeLocalComponentEvent`, `LocalReactExtensionMissingError`, `validateLocalReactExtensions` | Component error and lifecycle helpers |
|
|
114
|
+
| Component context types | `LocalComponentContext`, `LocalComponentRuntime`, `LocalComponentServices`, `LocalComponentBindingHandle`, `LocalComponentContent` and the related value, table, option and locale types |
|
|
115
|
+
| Adapter primitives | `compileExpression`, `compileLatex`, `compilePlotFormula`, `samplePlot`, `sampleImplicit`, `sampleParametric`, `samplePolar`, `layoutDiagram`, `diagramEdgePath`, `TableSurface`, `LatexView`, limits and formatting helpers |
|
|
116
|
+
| Adapter utilities | `useComponentView`, `useWriter`, `useDisabled`, `useResetToken`, `useSourceAttributes`, `useValidationField`, `useValidationHint`, `formatNumber`, `snapToStep` and the other `component-utils` helpers |
|
|
117
|
+
|
|
118
|
+
`LocalReactiveDocument` also accepts `sourcePhase?: 'streaming' | 'final'` and `onTransientDiagnostics?: (diagnostics: Diagnostic[]) => void`. While streaming it renders in static mode and defers side effects; `final` restores the host's interaction mode. See [Streaming source compilation](../integration/local-integration-en.md#streaming-source-compilation). Neither component accepts `className`, `style` or children.
|
|
119
|
+
|
|
120
|
+
### `reactive-md/react/unstyled`
|
|
121
|
+
|
|
122
|
+
The identical React surface without importing `styles.css`. Hosts that inject the stylesheet themselves, or render inside a shadow root, use this entry.
|
|
123
|
+
|
|
124
|
+
### `reactive-md/react/minimal`
|
|
125
|
+
|
|
126
|
+
The same two components and helpers, built on the 18-component minimal preset. `createReactHost()` and `createReactConfig()` here pair with `reactive-md/presets/minimal` and `reactive-md/styles/minimal.css`.
|
|
127
|
+
|
|
128
|
+
### `reactive-md/react/server`
|
|
129
|
+
|
|
130
|
+
`renderLocalStaticDocument` runs capability preflight, validates the installed contracts and returns either markup or structured diagnostics. Its markup is the intended `staticMarkup` input for static and offline export; keeping React text boundaries lets the standalone runtime hydrate the same tree.
|
|
131
|
+
|
|
132
|
+
### `reactive-md/react/runtime`
|
|
133
|
+
|
|
134
|
+
Hooks for component implementations: `useTicker`, `useFrame`, `useSwipe` with `classifySwipe`, `useKeys` with `isEditableTarget`, and `useComponentState`. The entry imports no renderer and no compiler.
|
|
135
|
+
|
|
136
|
+
## Component SDK and presets
|
|
137
|
+
|
|
138
|
+
### `reactive-md/sdk`
|
|
139
|
+
|
|
140
|
+
| Group | Exports |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| Definition | `defineLocalComponent`, `readLocalComponentManifest`, manifest limits, protocol constants |
|
|
143
|
+
| Configuration | `createLocalConfig`, `readLocalConfig`, `localConfigKey`, `snapshotLocalConfig`, `localComponentConfigKey`, `validateLocalDocumentConfig` |
|
|
144
|
+
| Registry | `getLocalComponentRegistry`, `getLocalComponentDefinition`, `localComponentSchemas` |
|
|
145
|
+
| Presets | `defineLocalPreset`, `readLocalPresetPackage`, `localPresetDigest` |
|
|
146
|
+
| Themes | `defineLocalTheme`, `composeLocalTheme`, `collectLocalThemeCss`, `isLocalInlineCss`, `LocalStyleResource` |
|
|
147
|
+
| Assembly | `localAssemblyIdentity`, `localAssemblySeal`, `localConfigKeyMatches` |
|
|
148
|
+
| Compatibility | `LOCAL_COMPAT_PROFILES`, `findLocalCompatProfile`, `localCompatProfiles` |
|
|
149
|
+
| Props and bindings | `resolveLocalComponentProps`, `resolveLocalComponentProp`, `resolveLocalComponentBindingConstraints`, `localBindingAttributeNames`, `localComponentHostBinding` |
|
|
150
|
+
| Versions and protocols | `LOCAL_SDK_VERSION`, `LOCAL_COMPONENT_PROTOCOL`, `LOCAL_PRESET_PROTOCOL`, `LOCAL_REACT_PRESET_PROTOCOL`, `LOCAL_CONFIG_PROTOCOL`, `LOCAL_CONFIG_PROTOCOL_V2`, `LOCAL_EXTENSIONS_PROTOCOL`, `LOCAL_ASSEMBLY_PROTOCOL`, `localVersionSatisfies`, `parseLocalVersionRange` |
|
|
151
|
+
| Style contract | `LOCAL_STYLE_CONTRACT`, `LOCAL_STYLE_LAYERS`, `LOCAL_THEME_STYLE_LAYER`, `LOCAL_STYLE_LAYER_ORDER` |
|
|
152
|
+
|
|
153
|
+
Manifests are plain, serializable data. Registration validates identities, names, protocols, dependencies and budgets, then copies and freezes. `readLocalConfig` revalidates a serialized configuration and recomputes its semantic key, so a host can round-trip configuration through JSON safely.
|
|
154
|
+
|
|
155
|
+
### Built-in presets
|
|
156
|
+
|
|
157
|
+
| Entry | Contents |
|
|
158
|
+
| --- | --- |
|
|
159
|
+
| `reactive-md/presets/default` | `defaultPreset`, id `reactive-md/default`, 48 components: `input`, `textarea`, `number`, `slider`, `range-slider`, `coordinate`, `toggle`, `checkbox`, `date`, `select`, `choices`, `radio-group`, `multi-select`, `option`, `counter`, `timer`, `checklist`, `progress`, `jump`, `anchor`, `text`, `section`, `quiz`, `panel`, `card`, `grid`, `gallery`, `gallery-item`, `tabs`, `tab`, `steps`, `step`, `accordion`, `disclosure`, `if`, `alert`, `badge`, `tooltip`, `validation`, `data-table`, `column`, `table`, `chart`, `plot`, `timeline`, `diagram`, `node`, `edge` |
|
|
160
|
+
| `reactive-md/presets/default/packs` | `controlsPack` (19), `layoutPack` (21), `dataPack` (4), `visualsPack` (5) |
|
|
161
|
+
| `reactive-md/presets/minimal` | `minimalPreset`, id `reactive-md/minimal`, 18 components: `input`, `textarea`, `number`, `slider`, `toggle`, `date`, `select`, `option`, `jump`, `anchor`, `text`, `section`, `panel`, `card`, `grid`, `if`, `alert`, `badge` |
|
|
162
|
+
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`: React implementations for those 18 components |
|
|
163
|
+
|
|
164
|
+
Packs are ordinary presets, so a host selects one or more and never combines a pack with `defaultPreset`. `visualsPack` depends on `dataPack` because `plot` and `data-table` share the `column` layout component. `layoutPack` declares `column` as well, so `layoutPack` and `dataPack` cannot be installed together.
|
|
165
|
+
|
|
166
|
+
### Optional plugin packages
|
|
167
|
+
|
|
168
|
+
Each `reactive-md/plugins/<name>` entry exports a React preset package as its default export.
|
|
169
|
+
|
|
170
|
+
| Entry | Preset id | Components | Declared base |
|
|
171
|
+
| --- | --- | --- | --- |
|
|
172
|
+
| `reactive-md/plugins/forms` | `reactive-md/forms` | `range-slider`, `checkbox`, `choices`, `radio-group`, `multi-select`, `counter`, `timer`, `checklist`, `progress`, `quiz` | requires `reactive-md/minimal` |
|
|
173
|
+
| `reactive-md/plugins/network` | `reactive-md/network` | `submit-button` | none; works with every base |
|
|
174
|
+
| `reactive-md/plugins/navigation` | `reactive-md/navigation` | `tabs`, `tab`, `steps`, `step`, `accordion`, `disclosure`, `tooltip`, `validation` | none declared |
|
|
175
|
+
| `reactive-md/plugins/data` | `reactive-md/data` | `data-table`, `column`, `table`, `timeline` | none declared |
|
|
176
|
+
| `reactive-md/plugins/chart` | `reactive-md/chart` | `chart` | none declared |
|
|
177
|
+
| `reactive-md/plugins/plot` | `reactive-md/plot` | `coordinate`, `plot` | none declared |
|
|
178
|
+
| `reactive-md/plugins/diagram` | `reactive-md/diagram` | `diagram`, `node`, `edge` | none declared |
|
|
179
|
+
| `reactive-md/plugins/gallery` | `reactive-md/gallery` | `gallery`, `gallery-item` | none declared |
|
|
180
|
+
|
|
181
|
+
Every component except `submit-button` already exists in `defaultPreset`. Installing a plugin on top of the default preset therefore fails registration with a duplicate-id error. Pair these plugins with `minimalPreset` or with packs that exclude the overlapping components. `plugins/forms` requires the minimal preset explicitly and reports a missing-dependency error without it.
|
|
182
|
+
|
|
183
|
+
This is the supported way to keep a small install: start from `minimalPreset`, add packs and plugins the document actually uses, and register the matching React packages.
|
|
184
|
+
|
|
185
|
+
## Authoring tools
|
|
186
|
+
|
|
187
|
+
### `reactive-md/authoring`
|
|
188
|
+
|
|
189
|
+
DOM-free and React-free, so it runs in a Worker or a server process.
|
|
190
|
+
|
|
191
|
+
| Group | Exports |
|
|
192
|
+
| --- | --- |
|
|
193
|
+
| Source services | `analyzeLocalSource`, `completeLocalSource`, `renameLocalBinding`, `formatLocalSource` |
|
|
194
|
+
| Catalog | `createLocalComponentCatalog`, `createLocalComponentCatalogForOptions`, `filterLocalComponentCatalog`, `localComponentCatalogGroups`, `localComponentCatalogKey`, `localComponentHelp`, `localCatalogAncestors`, `createLocalAuthoringLookup` |
|
|
195
|
+
| Insertion | `insertLocalComponent`, `insertLocalComponentFromOptions`, `validateLocalComponentInsertTemplates` |
|
|
196
|
+
| Schema | `LOCAL_COMPONENTS`, `LOCAL_COMPONENT_NAMES`, `getLocalComponent`, `getPropDefault`, `localComponentNames`, `suggestComponent`, `suggestAttribute`, `closestName` and the schema types |
|
|
197
|
+
| Native catalog | `NATIVE_COMPONENTS`, `NATIVE_COMPONENTS_ZH`, `NATIVE_COMPONENT_GROUPS`, `EXTENDED_NATIVE_COMPONENTS`, `getNativeComponentCatalog`, `renderNativeSnippet` |
|
|
198
|
+
| Toolbar commands | `formatBold`, `formatItalic`, `formatStrike`, `formatInlineCode`, `formatHeading`, `formatBulletList`, `formatOrderedList`, `formatTaskList`, `formatQuote`, `indentSelection`, `outdentSelection`, `insertLink`, `insertImage`, `insertCodeBlock`, `insertTable`, `insertDivider`, `insertText`, `insertTemplate`, `readFormatState` |
|
|
199
|
+
|
|
200
|
+
Pass the same `LocalCompileOptions` used for rendering, so diagnostics, host components, limits and HTML mode stay consistent. Analysis ranges refer to the source version that produced them.
|
|
201
|
+
|
|
202
|
+
## Export and deployment
|
|
203
|
+
|
|
204
|
+
### `reactive-md/export`
|
|
205
|
+
|
|
206
|
+
| Export | Purpose |
|
|
207
|
+
| --- | --- |
|
|
208
|
+
| `createLocalExportPlan` | Preflight a target (`static`, `ssr`, `offline`) before any output exists: capabilities, resources, themes, bundle seal |
|
|
209
|
+
| `createLocalShareableHtml` | Produce single-file HTML with the host's prebuilt bundle |
|
|
210
|
+
| `defineLocalStandaloneBundle` | Bind an explicitly built script to the installed manifest set and seal it |
|
|
211
|
+
| `createLocalBundleManifest`, `createLocalRestorationRequirements`, `validateLocalRestorationRequirements`, `localThemeContractDigest`, `localExportContentDigest` | Bundle and restoration metadata |
|
|
212
|
+
| `resolveLocalComponentStateExport` | Validate a component-state sidecar against the document before embedding |
|
|
213
|
+
| `readLocalExportResources` | Validate and normalize host style resources |
|
|
214
|
+
| `prepareLocalPrintHtml`, `waitForLocalPrintImages` | Prepare static HTML for printing |
|
|
215
|
+
| `validateLocalComponentContracts`, `validateLocalExtensionRequirements` | Contract checks shared with the CLI |
|
|
216
|
+
|
|
217
|
+
Content digests detect mismatches. They are not signatures.
|
|
218
|
+
|
|
219
|
+
### `reactive-md/export-assets`
|
|
220
|
+
|
|
221
|
+
`listExportAssets()`, `resolveExportAsset(id)`, `readExportAsset(id)` over a frozen manifest with protocol `reactive-md-export-assets/v1`.
|
|
222
|
+
|
|
223
|
+
| Id | Specifier |
|
|
224
|
+
| --- | --- |
|
|
225
|
+
| `base-css` | `reactive-md/styles.css` |
|
|
226
|
+
| `print-css` | `reactive-md/print.css` |
|
|
227
|
+
| `notices` | `reactive-md/notices` |
|
|
228
|
+
| `package-json` | `reactive-md/package.json` |
|
|
229
|
+
| `runtime` | `reactive-md/assets/standalone.js` |
|
|
230
|
+
|
|
231
|
+
Read assets through this entry. Tarball layout and file names change between releases; the ids and protocol do not.
|
|
232
|
+
|
|
233
|
+
### `reactive-md/build`
|
|
234
|
+
|
|
235
|
+
Node adapter that reads only modules the host names explicitly, so third-party code stays a host dependency.
|
|
236
|
+
|
|
237
|
+
| Export | Purpose |
|
|
238
|
+
| --- | --- |
|
|
239
|
+
| `preflightLocalStandaloneBuild` | Validate the host entry, config key, React implementations, capabilities and resources without running Vite |
|
|
240
|
+
| `buildLocalStandaloneBundle` | Produce the IIFE script, seal, resources, assets, CSS and notices |
|
|
241
|
+
| `readLocalBuildHost`, `createLocalStandaloneEntrySource`, `VIRTUAL_HOST_ENTRY`, `VIRTUAL_HOST_MODULE` | Host entry loading and the generated entry module |
|
|
242
|
+
| `collectLocalBuildResources`, `readLocalBuildBudgets`, `readLocalStyleResourceInputs`, `DEFAULT_LOCAL_BUILD_BUDGETS` | Resource collection and budgets |
|
|
243
|
+
| `collectLocalBuildNotices` | Notice aggregation |
|
|
244
|
+
| `resolveLocalVite`, `LocalViteApi` | Optional Vite peer resolution |
|
|
245
|
+
| `LocalBuildError`, `LOCAL_BUILD_PROTOCOL` | Diagnostics and `reactive-md-build/v1` |
|
|
246
|
+
|
|
247
|
+
### `reactive-md/vite` and `reactive-md/vite/client`
|
|
248
|
+
|
|
249
|
+
`reactiveMd(options)` registers one Vite plugin.
|
|
250
|
+
|
|
251
|
+
| Option | Effect |
|
|
252
|
+
| --- | --- |
|
|
253
|
+
| none | Directory mode: discover `theme/*` and `plugin/*` under the Vite root |
|
|
254
|
+
| `themeDir`, `pluginDir` | Alternate discovery roots |
|
|
255
|
+
| `defaultPreset: false \| 'minimal'` | Start with no preset or the core set |
|
|
256
|
+
| `includeMinimal: true` | Also expose the `-minimal-host` and `-minimal-bundle` virtual modules |
|
|
257
|
+
| `extensions: './extensions.ts'` | Manual mode: one module exporting `host = createReactHost(...)` |
|
|
258
|
+
|
|
259
|
+
Directory and manual options are mutually exclusive. `loadLocalDirectoryHost` exposes the discovery result to hosts that want it outside the plugin lifecycle.
|
|
260
|
+
|
|
261
|
+
`reactive-md/vite/client` declares four virtual modules: `virtual:reactive-md/host`, `virtual:reactive-md/bundle`, `virtual:reactive-md-minimal-host` and `virtual:reactive-md-minimal-bundle`. The host module exports `host`, `config`, `reactConfig`, `resources`, `css`, `notices`, `discovery`, and in manual mode `extensions`. The bundle module default-exports `LocalStandaloneBuild` or `{ error, diagnostics }`.
|
|
262
|
+
|
|
263
|
+
### `reactive-md/pdf`
|
|
264
|
+
|
|
265
|
+
`renderLocalPdf(html, options)` returns PDF bytes. Options cover paper format, orientation, margins, background printing and a strict mode. The CLI loads this entry on demand, so Playwright and Chromium are only required for PDF output.
|
|
266
|
+
|
|
267
|
+
## Browser runtime
|
|
268
|
+
|
|
269
|
+
### `reactive-md/standalone`
|
|
270
|
+
|
|
271
|
+
| Export | Purpose |
|
|
272
|
+
| --- | --- |
|
|
273
|
+
| `mount`, `mountAll`, `isReactiveMDMounted`, `REACTIVE_MD_MOUNTED_ATTRIBUTE` | Programmatic mounting and mount detection |
|
|
274
|
+
| `parseMountPayload` | Validate an `application/reactive-md+json` payload |
|
|
275
|
+
| `ReactiveMDMountError` | Typed mount failure |
|
|
276
|
+
| `REACTIVE_MD_DIAGNOSTICS_EVENT`, `REACTIVE_MD_STATE_CHANGE_EVENT` | Event names emitted by the element and auto-mounts |
|
|
277
|
+
|
|
278
|
+
This entry performs no automatic mount and registers no implicit components. A host that builds its own page uses it.
|
|
279
|
+
|
|
280
|
+
### `reactive-md/standalone/host`
|
|
281
|
+
|
|
282
|
+
The same mounting functions bound to a fixed React configuration from the host bundle. No compiler surface and no auto-mount.
|
|
283
|
+
|
|
284
|
+
### Prebuilt runtime: `reactive-md/assets/standalone.js`
|
|
285
|
+
|
|
286
|
+
An IIFE that exposes the global `ReactiveMD` and mounts `application/reactive-md+json` payloads once on load. It also registers the `<reactive-md-doc>` custom element.
|
|
287
|
+
|
|
288
|
+
| Interface | Members |
|
|
289
|
+
| --- | --- |
|
|
290
|
+
| Global | `ReactiveMD.mount(element, options)`, `ReactiveMD.mountAll(root)`, `ReactiveMD.isReactiveMDMounted()` |
|
|
291
|
+
| Handle | `getState()`, `unmount()` |
|
|
292
|
+
| Element attributes | `src`, `source`, `locale`, `color-scheme`, `theme` |
|
|
293
|
+
| Element properties | `source`, `state`, `documentId`, `randomSeed`, `componentState`, `urlPolicy`, `imageResolver`, `themes` |
|
|
294
|
+
| Element events | `reactive-md-diagnostics`, `reactive-md-state-change` |
|
|
295
|
+
|
|
296
|
+
`src` fetches with cancellation; an explicit `source` avoids network access. Disconnecting the element aborts fetches, removes subscriptions and the React root, and disposes the runtime. The element uses Light DOM. `<script type="text/reactive-md">` text is not interpreted.
|
|
297
|
+
|
|
298
|
+
## Runtime services
|
|
299
|
+
|
|
300
|
+
### `reactive-md/runtime`
|
|
301
|
+
|
|
302
|
+
| Group | Exports |
|
|
303
|
+
| --- | --- |
|
|
304
|
+
| Identity | `componentStateKey`, `localSourceDigest`, `normalizeDocumentId`, `normalizeStateKey`, `resolveDocumentId`, `resolveComponentSeed`, `deriveSeed`, `fnv1a32`, `toUint32` |
|
|
305
|
+
| Randomness | `createRandom`, `deriveRandom`, `nextRandom`, `normalizeRandomState`, `randomBool`, `randomInt`, `shuffleRandom`, `LOCAL_RANDOM_ALGORITHM`, `LOCAL_RANDOM_VERSION` |
|
|
306
|
+
| Scheduling | `createLocalScheduler` with `LocalClock`, `LocalSchedulerPorts`, `LocalTickerOptions` |
|
|
307
|
+
| Component state | `createLocalComponentStateRegistry`, `parseLocalComponentStateDocument`, `LOCAL_COMPONENT_STATE_FORMAT`, `LOCAL_COMPONENT_STATE_DOCUMENT_FORMAT` and the budget constants |
|
|
308
|
+
| Runtime services | `createLocalRuntimeServices`, `createDetachedRuntimeServices` |
|
|
309
|
+
| Network contract | `ComponentNetwork`, `NetworkChannel`, `SubmitAdapter`, `SubscribeAdapter`, `ChannelValidator`, `ChannelError`, `StreamEvent`, `DEFAULT_NETWORK_MAX_BYTES` |
|
|
310
|
+
|
|
311
|
+
### `reactive-md/runtime/browser`
|
|
312
|
+
|
|
313
|
+
| Group | Exports |
|
|
314
|
+
| --- | --- |
|
|
315
|
+
| Storage | `createLocalBrowserStateStorage`, `LOCAL_COMPONENT_STATE_STORAGE_PREFIX`, `LocalWebStorageLike` |
|
|
316
|
+
| Lifecycle | `flushComponentStateOnPageHide` |
|
|
317
|
+
| HTTP and SSE | `httpSubmit`, `sseStream` |
|
|
318
|
+
| Duplex | `webSocketChannel`, `webRtcChannel`, `jsonDuplexCodec`, `DEFAULT_DUPLEX_ACK_TIMEOUT_MS`, `DEFAULT_DUPLEX_MESSAGE_BYTES` |
|
|
319
|
+
|
|
320
|
+
Storage and transport objects are resolved lazily, so importing this entry in a server build touches no `window`, `localStorage`, `fetch` or `EventSource`.
|
|
321
|
+
|
|
322
|
+
## Testing tools
|
|
323
|
+
|
|
324
|
+
| Entry | Exports | Dependency |
|
|
325
|
+
| --- | --- | --- |
|
|
326
|
+
| `reactive-md/testing` | `runLocalManifestCompliance`, `runLocalBehaviorCompliance`, `readLocalBehaviorSpec`, `createLocalComplianceReport`, `compareLocalComplianceParity`, `describeLocalComplianceCase`, protocol constants | none |
|
|
327
|
+
| `reactive-md/testing/react` | `readLocalReactSpec`, `runLocalReactCompliance`, `checkLocalComplianceMarkup`, `REACT_COMPLIANCE_CAPABILITIES` | React 19 + react-dom 19 |
|
|
328
|
+
| `reactive-md/testing/browser` | `readLocalBrowserSpec`, `runLocalBrowserCompliance`, `createPlaywrightBrowserDriver`, driver and phase types | a browser context |
|
|
329
|
+
|
|
330
|
+
The three suites produce the same `LocalComplianceReport` shape. A declared capability counts as satisfied only when a case tagged with that capability passed. `compareLocalComplianceParity` compares two suite results by case id, status and observed values, which is how an external alias of a default contract is checked against the built-in implementation.
|
|
331
|
+
|
|
332
|
+
## Stylesheets
|
|
333
|
+
|
|
334
|
+
| Entry | Purpose |
|
|
335
|
+
| --- | --- |
|
|
336
|
+
| `reactive-md/styles.css` | Component, theme and document layers in the published cascade order |
|
|
337
|
+
| `reactive-md/styles/minimal.css` | The subset for the minimal preset |
|
|
338
|
+
| `reactive-md/screen.css` | Alias of `styles.css` |
|
|
339
|
+
| `reactive-md/print.css` | Print rules; load after `styles.css` |
|
|
340
|
+
| `reactive-md/notices` | Generated `THIRD_PARTY_NOTICES.md` |
|
|
341
|
+
|
|
342
|
+
Component styles are emitted as CSS files, never injected by the JavaScript entries. Import the stylesheet once where the document renders.
|
|
343
|
+
|
|
344
|
+
## Command line
|
|
345
|
+
|
|
346
|
+
`reactive-md` is the package binary.
|
|
347
|
+
|
|
348
|
+
| Command | Purpose | Exit codes |
|
|
349
|
+
| --- | --- | --- |
|
|
350
|
+
| `build <doc> -o <out>` | Compile one document into self-contained HTML or PDF, with state files, inlined images and optional project discovery | 0, 3, 4, 5 |
|
|
351
|
+
| `lint [--json] [--warnings-as-errors] [--locale] <file... \| ->` | Compile and report diagnostics without changing files | 0 clean, 1 diagnostics, 2 usage or read error |
|
|
352
|
+
| `migrate <file \| ->` | Rewrite syntax revision metadata, with `--check`, `--json`, `--accept-semantic-changes` | 0, 1, 2 |
|
|
353
|
+
| `check <package>` | Validate an installed preset or component package without a browser run | 0, 2, 3, 4 |
|
|
354
|
+
| `init component \| preset <dir>` | Generate a runnable package scaffold | 0, 2, 4 |
|
|
355
|
+
|
|
356
|
+
Documented exit codes: 0 success, 2 usage, 3 compile/render/build failure, 4 I/O, 5 asset or security policy.
|
|
357
|
+
|
|
358
|
+
`build` accepts `--format html|pdf`, `--mode interactive|static`, `--state-file`, `--component-state-file`, `--document-id`, `--random-seed`, `--assets inline|omit`, `--asset-root`, `--locale`, `--color-scheme`, `--title`, `--strict` and the `--pdf-*` family.
|
|
359
|
+
|
|
360
|
+
## Editor package
|
|
361
|
+
|
|
362
|
+
### `reactive-md-editor`
|
|
363
|
+
|
|
364
|
+
| Export | Purpose |
|
|
365
|
+
| --- | --- |
|
|
366
|
+
| `ReactiveMarkdownEditor` (alias `ReactiveMarkdownCodeEditor`) | Controlled CodeMirror 6 source editor |
|
|
367
|
+
| `ReactiveMarkdownEditorHandle` | `focus`, `selectRange`, `getSelection`, `getSource`, `getEditorElement`, `getVisibleRanges`, `insertText`, `undo`, `redo` |
|
|
368
|
+
| `MobileDocBar` | Narrow-screen document bar |
|
|
369
|
+
| Types | `EditorAuthorAnalysis`, `EditorTransaction`, `SourceChange`, `EditorEdit`, `EditorSelection`, `EditorViewMode`, `EditorComponentMode`, `EditorTheme`, `EditorLocale`, `EditorSurface` |
|
|
370
|
+
|
|
371
|
+
The component is controlled: `value` and `onChange` are required. It renders source only and does not compile a preview. Props include `locale`, `theme`, `preview`, `viewMode`, `height`, `readOnly`, `disabled`, `documentKey`, `diagnostics`, `document`, `toolbar`, `authoring`, `onExport`, `analysis`, `onTransaction` and `createAnalysisWorker`.
|
|
372
|
+
|
|
373
|
+
### `reactive-md-editor/codemirror`
|
|
374
|
+
|
|
375
|
+
The same component under the migration specifier, for hosts moving from `reactive-md/editor/codemirror`.
|
|
376
|
+
|
|
377
|
+
### `reactive-md-editor/commands`
|
|
378
|
+
|
|
379
|
+
The DOM-free toolbar commands, re-exported from `reactive-md/authoring`, with the editor's edit and selection types. Use it when a host wants text transformations without the component tree.
|
|
380
|
+
|
|
381
|
+
### Editor stylesheets
|
|
382
|
+
|
|
383
|
+
`reactive-md-editor/styles.css` and its alias `reactive-md-editor/codemirror/styles.css` carry the component, CodeMirror and mobile styles, scoped to the editor root.
|
|
384
|
+
|
|
385
|
+
## Protocol and version constants
|
|
386
|
+
|
|
387
|
+
| Constant | Value | Scope |
|
|
388
|
+
| --- | --- | --- |
|
|
389
|
+
| Package version | `0.9.1` | Engine releases |
|
|
390
|
+
| SDK contract | `0.7.0` (`LOCAL_SDK_VERSION`) | Component, preset and configuration manifests |
|
|
391
|
+
| Syntax revision | `local-draft-3` (`LOCAL_SYNTAX_VERSION`) | Document source |
|
|
392
|
+
| State file | `reactive-md-state/v1` (`LOCAL_STATE_FORMAT`) | Exported parameters |
|
|
393
|
+
| Component state | `reactive-md-component-state/v1` | Component-state sidecar |
|
|
394
|
+
| HTML envelope | `reactive-md-html/v1`, `reactive-md-html/v2` | Single-file export |
|
|
395
|
+
| Bundle manifest | `reactive-md-bundle/v1` | Sealed standalone bundle |
|
|
396
|
+
| Restoration | `reactive-md-restore/v1` | Export-side contract requirements |
|
|
397
|
+
| Export assets | `reactive-md-export-assets/v1` | Asset manifest |
|
|
398
|
+
| Build manifest | `reactive-md-build/v1` | Standalone build output |
|
|
399
|
+
| Component protocol | `reactive-md-component/v1`, `component-protocol-3` | Component contribution |
|
|
400
|
+
| Theme protocol | `reactive-md-theme-1` | Document themes |
|
|
401
|
+
| Editor package | `0.2.0` | Editor releases, peer `reactive-md: ^0.9.0` |
|
|
402
|
+
|
|
403
|
+
Each constant is versioned independently: a package release can ship a new HTML envelope without moving the syntax revision, and a new theme protocol does not change the SDK contract.
|
|
404
|
+
|
|
405
|
+
## Where to read next
|
|
406
|
+
|
|
407
|
+
| Task | Document |
|
|
408
|
+
| --- | --- |
|
|
409
|
+
| Embed a document in an app | [Local mode integration](../integration/local-integration-en.md) |
|
|
410
|
+
| Write a component package | [Extension SDK](../integration/extension-sdk-en.md) and the [component protocol](../development/component-protocol-en.md) |
|
|
411
|
+
| Add a theme | [Theme protocol](theme-protocol-en.md) |
|
|
412
|
+
| Export or host standalone HTML | [Shareable documents and static export](../integration/shareable-export-en.md) |
|
|
413
|
+
| Wire a Vite project | [Directory discovery](../integration/directory-discovery-en.md) |
|
|
414
|
+
| Drive an editor | [React source editor](../integration/editor-en.md) and [author tools](../integration/author-tools-en.md) |
|
|
415
|
+
| Compile once without a runtime | [One-shot compilation](../integration/compiler-en.md) |
|
|
416
|
+
| Check compatibility before upgrading | [Versions and compatibility](../compatibility/compatibility-en.md) |
|
|
@@ -45,7 +45,7 @@ export function Article({ source }: { source: string }) {
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
此示例说明登记方式;仓库仅将 `default`
|
|
48
|
+
此示例说明登记方式;仓库仅将 `default` 作为内置主题,宿主定义不能替换它。其他主题都需要宿主登记并加载相应 CSS。`soft` 通过独立主题资源保存原有外观;只登记名称而不加载 CSS 时,组件使用完整的 default 基线。上文 `paper` 示例没有配套设计或 CSS,完整参考包包含变量、组件样式、亮暗两套模式与现场示例,见 [examples/sci-fi-theme](../../examples/sci-fi-theme/README-ch.md)。
|
|
49
49
|
|
|
50
50
|
| 字段 | 要求 |
|
|
51
51
|
| --- | --- |
|
|
@@ -79,33 +79,52 @@ export function Article({ source }: { source: string }) {
|
|
|
79
79
|
|
|
80
80
|
每个实例独立选择主题与模式。主题 CSS 的每条规则必须限制在该主题根节点及其后代,例如 `[data-rmd-theme="paper"][data-color-scheme="dark"]`。不得使用会影响宿主的全局 `body`、`:root` 或无作用域的元素规则。
|
|
81
81
|
|
|
82
|
-
改变 `themes` 或 `colorScheme` 不创建新运行时。`LocalReactiveDocument` 更换 `source`
|
|
82
|
+
改变 `themes` 或 `colorScheme` 不创建新运行时。`LocalReactiveDocument` 更换 `source` 时重新编译,并在现有运行时中采用新文档;文档无法采用或影响编译语义的宿主选项变化时创建新运行时。需要自行控制迁移时,宿主可以管理 `LocalDocumentView` 的文档和运行时。
|
|
83
83
|
|
|
84
84
|
## 共享样式变量
|
|
85
85
|
|
|
86
86
|
公共组件 CSS 提供结构、交互与默认样式。自定义主题继承完整的默认变量,按需覆盖;浅色和深色规则必须分别设计与验收。
|
|
87
87
|
|
|
88
|
+
所有主题共用组件实现。主题名称只影响样式;静态输出和 hydration 根据运行能力选择视图。有效但没有 CSS 的主题获得与 default 相同的完整基线。切换主题不会因为名称不同而改用另一套滑块或图表。
|
|
89
|
+
|
|
90
|
+
样式契约为 `reactive-md-styles-1`,可从 `reactive-md/sdk` 或 `reactive-md/react` 导入 `LOCAL_STYLE_CONTRACT`。层叠顺序为 `rmd.reset`、`rmd.defaults`、`rmd.components`、`rmd.themes`、`rmd.overrides`。SDK 将主题资源放入 `rmd.themes`,重复校验和主题组合保留这一边界。直接导入的主题 CSS 同样应使用 `@layer rmd.themes { ... }`。公共样式提供完整默认值,组件 CSS 消费这些值,主题覆盖需要修改的属性。
|
|
91
|
+
|
|
92
|
+
直接导入的主题样式表应先声明 `@layer rmd.reset, rmd.defaults, rmd.components, rmd.themes, rmd.overrides;`,再定义主题规则,保证主题先加载时也有正确优先级。JS 宿主可以导入 `LOCAL_STYLE_LAYER_ORDER` 输出同一声明;SDK 生成的资源已包含它。
|
|
93
|
+
|
|
94
|
+
现有语义变量继续作为公共接口。组件级变量使用 `--rmd-` 前缀,例如 `--rmd-slider-thumb-width`、`--rmd-slider-thumb-height`、`--rmd-slider-thumb-radius`、`--rmd-slider-track-height` 和 `--rmd-slider-track-radius`。宽度参与水平端点与轨道计算,高度参与垂直对齐与气泡位置计算,因此主题可以独立改变滑块宽高。原生 range 输入通过对应的 `--rmd-native-range-*` 变量控制,默认保留自身较小的 18px 滑块。
|
|
95
|
+
|
|
96
|
+
组件通过 `data-rmd-component` 与 `data-rmd-part` 提供稳定的样式部件入口;主题可针对这些入口增加特殊装饰。ARIA 属性继续表示禁用、选中和展开状态。内部 CSS Modules 类名与节点嵌套由组件维护。
|
|
97
|
+
|
|
88
98
|
| 用途 | 公共变量 |
|
|
89
99
|
| --- | --- |
|
|
90
|
-
| 背景 | `--paper`、`--surface`、`--document-bg`(默认跟随 `--surface`)、`--surface-subtle`、`--surface-hover`、`--surface-active`、`--image-zoom-backdrop` |
|
|
100
|
+
| 背景 | `--paper`、`--surface`、`--document-bg`(默认跟随 `--surface`)、`--surface-subtle`、`--surface-hover`、`--surface-active`、`--image-zoom-backdrop`、`--dialog-backdrop` |
|
|
101
|
+
| 提示气泡 | `--tooltip-bg`、`--tooltip-ink` |
|
|
91
102
|
| 文字与边框 | `--ink`、`--ink-soft`、`--ink-muted`、`--line`、`--line-strong` |
|
|
92
103
|
| 强调色 | `--accent`、`--accent-hover`、`--accent-soft`、`--accent-line`、`--accent-ink`(填充强调色上的文字)、`--accent-text`(作为文字使用的强调色) |
|
|
93
104
|
| 状态 | `--info`、`--info-soft`、`--success`、`--success-soft`、`--success-line`、`--warning`、`--warning-soft`、`--warning-line`、`--danger`、`--danger-soft`、`--danger-line`、`--neutral-soft` |
|
|
94
105
|
| 焦点 | `--focus`、`--focus-outline`、`--focus-ring` |
|
|
95
106
|
| 数据与代码 | `--chart-1` 至 `--chart-8`、`--chart-grid`、`--chart-axis`、`--code-bg`、`--code-bg-deep`、`--code-ink` |
|
|
96
|
-
| 字体 | `--font-sans`、`--font-mono`、`--text-xs` 至 `--text-xl`、`--text-2xl`、`--text-block-title`、`--text-block-subtitle` |
|
|
107
|
+
| 字体 | `--font-sans`、`--font-mono`、`--text-xs` 至 `--text-xl`、`--text-2xl`、`--text-h5`、`--text-h6`、`--text-block-title`、`--text-block-subtitle` |
|
|
97
108
|
| 行高与字重 | `--leading-tight`、`--leading-snug`、`--leading-normal`、`--leading-relaxed`、`--weight-regular`、`--weight-medium`、`--weight-semibold`、`--weight-bold` |
|
|
98
109
|
| 间距 | `--space-1` 至 `--space-7`、`--field-gap` |
|
|
99
110
|
| 圆角 | `--radius-control`、`--radius-card`、`--radius-panel`、`--radius-pill`、`--radius-field`、`--radius-field-multiline` |
|
|
100
111
|
| 控件 | `--control-height-sm`、`--control-height`、`--control-height-lg`、`--control-padding-x`、`--control-padding-y`、`--control-inset-x`、`--control-selected`、`--control-selected-ink`、`--control-track`、`--control-thumb`、`--disabled-opacity` |
|
|
101
112
|
| 表格 | `--table-cell-padding-y`、`--table-cell-padding-x` |
|
|
102
|
-
| 动效与阴影 | `--motion-fast`、`--motion-base`、`--motion-slow`、`--ease-standard`、`--shadow-sm`、`--shadow-md` |
|
|
113
|
+
| 动效与阴影 | `--motion-fast`、`--motion-base`、`--motion-slow`、`--ease-standard`、`--shadow-sm`、`--shadow-md`、`--shadow-lg` |
|
|
114
|
+
|
|
115
|
+
小圆角使用 `--radius-hairline`、`--radius-2xs`、`--radius-xs`、
|
|
116
|
+
`--radius-inset`;较大的表面与圆形使用 `--radius-xl`、`--radius-pill`、
|
|
117
|
+
`--radius-circle`。`--radius-toolbar` 控制紧凑工具栏。
|
|
118
|
+
按压、选择指示器和节点阴影可分别通过 `--rmd-button-press-shadow`、
|
|
119
|
+
`--rmd-choice-thumb-shadow`、`--rmd-diagram-node-shadow` 覆盖。
|
|
120
|
+
动态阴影的默认几何与强度由基线中的 `*-shadow-geometry`、`*-shadow-opacity`
|
|
121
|
+
提供,消费端再结合局部语义颜色;节点 tone 或后代文字颜色变化时,阴影仍会跟随。
|
|
103
122
|
|
|
104
123
|
已有 `--blue`、`--blue-deep`、`--blue-soft`、`--blue-line` 保留兼容;新主题优先使用强调色变量。组件的局部 `color` 属性覆盖对应局部颜色,其余样式继续使用主题。数据序列、状态提示等保留各自的语义颜色。
|
|
105
124
|
|
|
106
125
|
## 主题化原生按钮
|
|
107
126
|
|
|
108
|
-
`reactive-md/styles.css`
|
|
127
|
+
`reactive-md/styles.css` 包含公共原生按钮样式。组件作者在 `.md-document` 内输出原生 `<button>` 或 `type` 为 `button`、`submit`、`reset` 的 `<input>`,即可获得当前文档的 secondary 外观:
|
|
109
128
|
|
|
110
129
|
```tsx
|
|
111
130
|
<button type="button">暂停</button>
|
|
@@ -151,7 +170,7 @@ export function Article({ source }: { source: string }) {
|
|
|
151
170
|
| --- | --- |
|
|
152
171
|
| 容器 | `md-card`、`md-card-title`、`md-card-body`、`md-panel`、`md-panel-title`、`md-panel-body`、`md-group` |
|
|
153
172
|
| 状态 | `md-badge`、`md-status`,以及 `md-badge-neutral`、`md-badge-success`、`md-badge-warning`、`md-badge-danger`、`md-badge-info` 和对应的 `md-status-*` 变体 |
|
|
154
|
-
| 反馈 | `md-alert` 及 `md-alert-success`、`md-alert-warning`、`md-alert-danger`、`md-alert-info`、`md-alert-title`、`md-alert-body`;`md-empty-state`、`md-empty-state-title`、`md-empty-state-description`;`md-spinner`、`md-loading`、`md-skeleton` |
|
|
173
|
+
| 反馈 | `md-alert` 及 `md-alert-success`、`md-alert-warning`、`md-alert-danger`、`md-alert-error`、`md-alert-info`、`md-alert-title`、`md-alert-body`;`md-empty-state`、`md-empty-state-title`、`md-empty-state-description`;`md-spinner`、`md-loading`、`md-skeleton` |
|
|
155
174
|
| 导航 | `md-tabs`、`md-tablist`、`md-tab`、`md-tabpanel`、`md-pagination`、`md-page`、`md-steps`、`md-step` |
|
|
156
175
|
| 正文 | 标题、段落、链接、列表、引用、分隔线、`kbd`、行内代码和代码块的文档排版;原生表格和 `md-table` |
|
|
157
176
|
| 图表 | `md-chart`、`md-chart-axis`、`md-chart-grid`、`md-chart-legend`、`md-chart-node`、`md-chart-edge`、`md-chart-series-line`、`md-chart-series-area` |
|
|
@@ -160,7 +179,7 @@ export function Article({ source }: { source: string }) {
|
|
|
160
179
|
|
|
161
180
|
图表序列元素设置 `--series-color`,缺失时回退到 `--chart-1`。`data-series="1"` 至 `"8"` 映射现有 `--chart-1` 至 `--chart-8` 调色板。SVG 几何、可访问名称和交互由作者提供。
|
|
162
181
|
|
|
163
|
-
|
|
182
|
+
文档排版使用共享的字体、间距和行高变量。`h5` 和 `h6` 读取 `--text-h5` 和 `--text-h6`;主题未定义时,它们以正文的 1em 为基准回退到 `0.83em` 和 `0.75em`。行内代码和代码块使用 `--code-bg`、`--code-bg-deep`、`--code-ink`;`kbd` 使用控件背景和边框。原生表格与 `md-table` 共用单元格内边距和边框。专用组件保持各自外观。
|
|
164
183
|
|
|
165
184
|
所有新增皮肤都限制在 `.md-document` 内,基础和状态选择器主体统一用 `:where()` 保持零权重;伪元素追加在该主体之后,不新增 `!important`。组件的普通类选择器无论样式表加载顺序如何,都能覆盖其声明的属性。`[data-rmd-appearance="custom"]` 只让标记的元素退出皮肤,后代仍保留皮肤。隐藏元素保持隐藏。打印保留原生控件值和现有内置打印摘要。
|
|
166
185
|
|
|
@@ -45,7 +45,7 @@ export function Article({ source }: { source: string }) {
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
This demonstrates registration.
|
|
48
|
+
This demonstrates registration. Only `default` is built in, and a host definition cannot replace it. Other themes require host registration and their CSS resources. The `soft` package supplies explicit resources for the original appearance. Registering a name without CSS gives that theme the complete default baseline. The `paper` example above has no design or stylesheet; a complete reference package with tokens, component styling, both colour schemes and a live gallery is in [examples/sci-fi-theme](../../examples/sci-fi-theme/README.md).
|
|
49
49
|
|
|
50
50
|
| Field | Requirement |
|
|
51
51
|
| --- | --- |
|
|
@@ -79,33 +79,71 @@ The renderer exposes the resolved selection on its document root:
|
|
|
79
79
|
|
|
80
80
|
Each instance chooses independently. Every theme rule must be scoped to its named root or descendants, for example `[data-rmd-theme="paper"][data-color-scheme="dark"]`. Global `body`, `:root` and unscoped element rules must not affect the host.
|
|
81
81
|
|
|
82
|
-
Changing `themes` or `colorScheme` does not create a runtime. Changing `LocalReactiveDocument.source`
|
|
82
|
+
Changing `themes` or `colorScheme` does not create a runtime. Changing `LocalReactiveDocument.source` recompiles and adopts the new document in the existing runtime; an incompatible document or a host option change that affects compilation semantics creates a new runtime. Hosts that need control over migration can manage `LocalDocumentView` and its runtime themselves.
|
|
83
83
|
|
|
84
84
|
## Shared style variables
|
|
85
85
|
|
|
86
86
|
Shared component CSS supplies structure, interaction and defaults. Custom themes inherit a complete default variable set and override the values they need. Both light and dark variants must be designed and checked.
|
|
87
87
|
|
|
88
|
+
Every theme uses the same component implementations. Theme names select CSS;
|
|
89
|
+
static output and hydration select views by rendering capability. A registered
|
|
90
|
+
theme with no CSS receives the complete default appearance and interactions.
|
|
91
|
+
|
|
92
|
+
The styling contract is `reactive-md-styles-1`, exported as `LOCAL_STYLE_CONTRACT`
|
|
93
|
+
from `reactive-md/sdk` and `reactive-md/react`. The cascade order is `rmd.reset`,
|
|
94
|
+
`rmd.defaults`, `rmd.components`, `rmd.themes`, `rmd.overrides`. The SDK puts theme
|
|
95
|
+
resources in `rmd.themes` and preserves that boundary across validation and
|
|
96
|
+
composition. Directly imported theme CSS should also use `@layer rmd.themes`.
|
|
97
|
+
|
|
98
|
+
Direct stylesheets must declare `@layer rmd.reset, rmd.defaults, rmd.components,
|
|
99
|
+
rmd.themes, rmd.overrides;` before defining any RMD layer, including when a theme
|
|
100
|
+
loads before the public stylesheet. JS hosts can emit the exported
|
|
101
|
+
`LOCAL_STYLE_LAYER_ORDER`; SDK resources already include this declaration.
|
|
102
|
+
|
|
103
|
+
Existing semantic variables remain public. Component variables use the `--rmd-`
|
|
104
|
+
prefix. Slider variables include `--rmd-slider-thumb-width`,
|
|
105
|
+
`--rmd-slider-thumb-height`, `--rmd-slider-thumb-radius`,
|
|
106
|
+
`--rmd-slider-track-height` and `--rmd-slider-track-radius`. Horizontal geometry
|
|
107
|
+
uses thumb width; vertical alignment and bubble placement use thumb height.
|
|
108
|
+
Native range inputs use the corresponding `--rmd-native-range-*` variables,
|
|
109
|
+
preserving their smaller 18px thumbs by default.
|
|
110
|
+
|
|
111
|
+
Stable `data-rmd-component` and `data-rmd-part` hooks support additional theme
|
|
112
|
+
decoration. ARIA attributes retain their state semantics. CSS module hashes and
|
|
113
|
+
internal DOM nesting remain component implementation details.
|
|
114
|
+
|
|
88
115
|
| Purpose | Public variables |
|
|
89
116
|
| --- | --- |
|
|
90
|
-
| Surfaces | `--paper`, `--surface`, `--document-bg` (defaults to `--surface`), `--surface-subtle`, `--surface-hover`, `--surface-active`, `--image-zoom-backdrop` |
|
|
117
|
+
| Surfaces | `--paper`, `--surface`, `--document-bg` (defaults to `--surface`), `--surface-subtle`, `--surface-hover`, `--surface-active`, `--image-zoom-backdrop`, `--dialog-backdrop` |
|
|
118
|
+
| Tooltips | `--tooltip-bg`, `--tooltip-ink` |
|
|
91
119
|
| Text and borders | `--ink`, `--ink-soft`, `--ink-muted`, `--line`, `--line-strong` |
|
|
92
120
|
| Accent | `--accent`, `--accent-hover`, `--accent-soft`, `--accent-line`, `--accent-ink` (text on accent fills), `--accent-text` (accent used as ink) |
|
|
93
121
|
| Status | `--info`, `--info-soft`, `--success`, `--success-soft`, `--success-line`, `--warning`, `--warning-soft`, `--warning-line`, `--danger`, `--danger-soft`, `--danger-line`, `--neutral-soft` |
|
|
94
122
|
| Focus | `--focus`, `--focus-outline`, `--focus-ring` |
|
|
95
123
|
| Data and code | `--chart-1` through `--chart-8`, `--chart-grid`, `--chart-axis`, `--code-bg`, `--code-bg-deep`, `--code-ink` |
|
|
96
|
-
| Fonts | `--font-sans`, `--font-mono`, `--text-xs` through `--text-xl`, `--text-2xl`, `--text-block-title`, `--text-block-subtitle` |
|
|
124
|
+
| Fonts | `--font-sans`, `--font-mono`, `--text-xs` through `--text-xl`, `--text-2xl`, `--text-h5`, `--text-h6`, `--text-block-title`, `--text-block-subtitle` |
|
|
97
125
|
| Line height and weight | `--leading-tight`, `--leading-snug`, `--leading-normal`, `--leading-relaxed`, `--weight-regular`, `--weight-medium`, `--weight-semibold`, `--weight-bold` |
|
|
98
126
|
| Spacing | `--space-1` through `--space-7`, `--field-gap` |
|
|
99
127
|
| Radius | `--radius-control`, `--radius-card`, `--radius-panel`, `--radius-pill`, `--radius-field`, `--radius-field-multiline` |
|
|
100
128
|
| Controls | `--control-height-sm`, `--control-height`, `--control-height-lg`, `--control-padding-x`, `--control-padding-y`, `--control-inset-x`, `--control-selected`, `--control-selected-ink`, `--control-track`, `--control-thumb`, `--disabled-opacity` |
|
|
101
129
|
| Tables | `--table-cell-padding-y`, `--table-cell-padding-x` |
|
|
102
|
-
| Motion and elevation | `--motion-fast`, `--motion-base`, `--motion-slow`, `--ease-standard`, `--shadow-sm`, `--shadow-md` |
|
|
130
|
+
| Motion and elevation | `--motion-fast`, `--motion-base`, `--motion-slow`, `--ease-standard`, `--shadow-sm`, `--shadow-md`, `--shadow-lg` |
|
|
131
|
+
|
|
132
|
+
Small corners use `--radius-hairline`, `--radius-2xs`, `--radius-xs` and
|
|
133
|
+
`--radius-inset`; larger surfaces and circles use `--radius-xl`, `--radius-pill`
|
|
134
|
+
and `--radius-circle`. `--radius-toolbar` controls compact toolbars.
|
|
135
|
+
Override pressed button, choice indicator and node shadows with
|
|
136
|
+
`--rmd-button-press-shadow`, `--rmd-choice-thumb-shadow` and
|
|
137
|
+
`--rmd-diagram-node-shadow`, respectively. Dynamic shadows take their default
|
|
138
|
+
geometry and opacity from baseline `*-shadow-geometry` and `*-shadow-opacity`
|
|
139
|
+
variables, then combine them with local semantic colors at the consuming element.
|
|
140
|
+
This keeps shadows aligned with node tones and descendant text colors.
|
|
103
141
|
|
|
104
142
|
Existing `--blue`, `--blue-deep`, `--blue-soft` and `--blue-line` remain compatible. New themes should use the accent variables. Explicit component `color` attributes override their corresponding local color; other properties continue to use the theme. Series and status colors retain their semantic roles.
|
|
105
143
|
|
|
106
144
|
## Themed native buttons
|
|
107
145
|
|
|
108
|
-
`reactive-md/styles.css` includes the shared
|
|
146
|
+
`reactive-md/styles.css` includes the shared native button skin. A component that renders a native `<button>` or an `input` with type `button`, `submit` or `reset` inside `.md-document` receives the current document's secondary appearance:
|
|
109
147
|
|
|
110
148
|
```tsx
|
|
111
149
|
<button type="button">Pause</button>
|
|
@@ -151,7 +189,7 @@ Shared classes cover the remaining public UI. They supply appearance; the author
|
|
|
151
189
|
| --- | --- |
|
|
152
190
|
| Surfaces | `md-card`, `md-card-title`, `md-card-body`, `md-panel`, `md-panel-title`, `md-panel-body`, `md-group` |
|
|
153
191
|
| Status | `md-badge` and `md-status` with `md-badge-neutral`, `md-badge-success`, `md-badge-warning`, `md-badge-danger`, `md-badge-info` and the matching `md-status-*` variants |
|
|
154
|
-
| Feedback | `md-alert` with `md-alert-success`, `md-alert-warning`, `md-alert-danger`, `md-alert-info`, `md-alert-title`, `md-alert-body`; `md-empty-state`, `md-empty-state-title`, `md-empty-state-description`; `md-spinner`, `md-loading`, `md-skeleton` |
|
|
192
|
+
| Feedback | `md-alert` with `md-alert-success`, `md-alert-warning`, `md-alert-danger`, `md-alert-error`, `md-alert-info`, `md-alert-title`, `md-alert-body`; `md-empty-state`, `md-empty-state-title`, `md-empty-state-description`; `md-spinner`, `md-loading`, `md-skeleton` |
|
|
155
193
|
| Navigation | `md-tabs`, `md-tablist`, `md-tab`, `md-tabpanel`, `md-pagination`, `md-page`, `md-steps`, `md-step` |
|
|
156
194
|
| Content | Document typography for headings, paragraphs, links, lists, quotes, rules, `kbd`, inline code and code blocks; native tables and `md-table` |
|
|
157
195
|
| Charts | `md-chart`, `md-chart-axis`, `md-chart-grid`, `md-chart-legend`, `md-chart-node`, `md-chart-edge`, `md-chart-series-line`, `md-chart-series-area` |
|
|
@@ -160,7 +198,7 @@ Tabs and steps read `aria-selected`, `aria-current`, `aria-expanded` and disable
|
|
|
160
198
|
|
|
161
199
|
A chart series element sets `--series-color`, falling back to `--chart-1`. `data-series="1"` through `"8"` map the existing `--chart-1` to `--chart-8` palette. The author supplies SVG geometry, accessible names and interaction.
|
|
162
200
|
|
|
163
|
-
Document typography uses the shared type, spacing and line-height variables. Inline code and code blocks use `--code-bg`, `--code-bg-deep` and `--code-ink`; `kbd` uses the control surface and border. Native tables and `md-table` share cell padding and borders. Specialized widgets keep their own appearance.
|
|
201
|
+
Document typography uses the shared type, spacing and line-height variables. `h5` and `h6` read `--text-h5` and `--text-h6`, falling back to `0.83em` and `0.75em` against the 1em body when a theme leaves them undefined. Inline code and code blocks use `--code-bg`, `--code-bg-deep` and `--code-ink`; `kbd` uses the control surface and border. Native tables and `md-table` share cell padding and borders. Specialized widgets keep their own appearance.
|
|
164
202
|
|
|
165
203
|
Every new skin is scoped to `.md-document`. Base and state selector bodies use `:where()` for zero specificity; pseudo-elements follow that body. The new skins add no `!important`. An ordinary component class overrides any property it declares in either stylesheet order. `[data-rmd-appearance="custom"]` opts out only the element it marks; descendants keep their skin. Hidden elements stay hidden. Print keeps native control values and the existing built-in print summaries.
|
|
166
204
|
|