reactive-md 0.9.1 → 0.9.3
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 +44 -0
- package/CHANGELOG.md +44 -0
- package/README-ch.md +7 -7
- package/README-en.md +6 -6
- package/README.md +7 -7
- package/cli/init.mjs +1 -1
- package/dist-library/LocalDocumentView-D6zQkTkt.js +112 -0
- package/dist-library/{LocalDocumentViewCore-GiWV3bey.js → LocalDocumentViewCore-CmJhemcA.js} +387 -9471
- package/dist-library/LocalReactiveDocumentCore-lAKOGAZ7.js +283 -0
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +143 -0
- package/dist-library/{authoring-Dsune4Hy.js → authoring-B14SsOXZ.js} +68 -67
- package/dist-library/chart-B1TUtzm-.js +3 -0
- package/dist-library/color-values-r8Wf7ALn.js +6 -0
- package/dist-library/{compile-wUv8KEge.js → compile-D50B5_Ww.js} +32 -32
- package/dist-library/compile-cache-key-6GgpETz_.js +28 -0
- package/dist-library/compiler-DLkKUK4t.js +98 -0
- package/dist-library/{compiler-core-As_m-MNm.js → compiler-core-Niqhp9wV.js} +2963 -3283
- package/dist-library/{registry-core-Bbad9Bm2.js → component-kernel-IG4wOO0i.js} +72 -195
- package/dist-library/component-state-CwKX_SN5.js +763 -0
- package/dist-library/{component-state-C52ZFJGl.js → component-state-Ht-hOK0W.js} +15 -14
- package/dist-library/component-utils-eSj5IdG4.js +338 -0
- package/dist-library/computations-CffoW7Ff.js +340 -0
- package/dist-library/config-validation-Cpol91_M.js +456 -0
- package/dist-library/controls-B-CLSK8Q.js +5927 -0
- package/dist-library/controls-DWlx-AQl.js +3 -0
- package/dist-library/{coordinate-CWS9p5q_.js → coordinate-PyLPMIQK.js} +85 -85
- package/dist-library/data-BtFlkJzp.js +3 -0
- package/dist-library/{data-table-Bgccxd7h.js → data-table-Kv_ZA2Z2.js} +14 -13
- package/dist-library/data-visuals-_Z7QqYTk.js +384 -0
- package/dist-library/{default-components-BwQf0oP-.js → default-components-jugH7Ubr.js} +333 -331
- package/dist-library/{config-BadfhjdP.js → default-config-DIrRpuQz.js} +96 -79
- package/dist-library/default-options-DU5dxuU6.js +125 -0
- package/dist-library/{registry-B9NGct4d.js → default-registry-BlloaZi7.js} +4 -4
- package/dist-library/default-schema-Ch-Vznpm.js +33 -0
- package/dist-library/diagram-BLepzI8l.js +3 -0
- package/dist-library/{display-B-VhqVND.js → display-y4v9v0Qd.js} +1 -1
- package/dist-library/dist-Cueh1Psp.js +4761 -0
- package/dist-library/{config-validation-F47AcE6o.js → document-theme-DBAfnk7y.js} +248 -731
- package/dist-library/{export-BqVmTXm8.js → export-heVBqgxA.js} +46 -44
- package/dist-library/gallery-BC6FYTqw.js +3 -0
- package/dist-library/{gallery-CY6mTx8i.js → gallery-Q6VPS2ep.js} +1 -1
- package/dist-library/{html-CNT4KD-2.js → html-CCnvzan1.js} +56 -54
- package/dist-library/identity-BUx0Q_-d.js +40 -0
- package/dist-library/{incremental-Dv0FSp_U.js → incremental-Bzvh8_lB.js} +529 -380
- package/dist-library/{layout-C0YlEPGr.js → layout-BfUzzO2b.js} +147 -156
- package/dist-library/layout-BnfDeUNy.js +3 -0
- package/dist-library/limits-CFERRrlC.js +10 -0
- package/dist-library/localization-COdJ6lw2.js +6 -0
- package/dist-library/mafs-CnzDC5CR.js +3 -0
- package/dist-library/math-view-B0jthpRw.js +20 -0
- package/dist-library/motion-tokens-Czk0RDmS.js +283 -0
- package/dist-library/mount-preset-C_i37FvY.js +24 -0
- package/dist-library/numeric-sliders-CkWS0-ja.js +542 -0
- package/dist-library/observability-CYLuvFfL.js +502 -0
- package/dist-library/observability-core-Bcu7vpnl.js +24 -0
- package/dist-library/{package-core-WFK1RhAZ.js → package-core-9UK5ZdqB.js} +57 -46
- package/dist-library/parser-9yNJxGip.js +8 -0
- package/dist-library/parser-standard-BPIy4HOu.js +4872 -0
- package/dist-library/plugin-packs-CZb46nuv.js +19 -0
- package/dist-library/preset-core-BW3NWZJ9.js +1300 -0
- package/dist-library/props-pJRrfDc6.js +179 -0
- package/dist-library/react-BSo0o998.js +32 -0
- package/dist-library/reactive-md-authoring.js +274 -263
- package/dist-library/reactive-md-build.js +55 -20
- package/dist-library/reactive-md-compiler-session.js +4 -0
- package/dist-library/reactive-md-compiler-standard.js +6 -6
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +6 -0
- package/dist-library/reactive-md-default-packs.js +31 -14
- package/dist-library/reactive-md-default-preset.js +7 -6
- package/dist-library/reactive-md-export.js +6 -5
- package/dist-library/reactive-md-minimal-preset.js +2 -2
- package/dist-library/reactive-md-minimal-react-preset.js +22 -20
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +126 -0
- package/dist-library/reactive-md-pack-style-manifest.js +797 -0
- package/dist-library/reactive-md-plugin-chart.js +6 -5
- package/dist-library/reactive-md-plugin-data.js +8 -8
- package/dist-library/reactive-md-plugin-diagram.js +7 -6
- package/dist-library/reactive-md-plugin-forms.js +14 -13
- package/dist-library/reactive-md-plugin-gallery.js +6 -5
- package/dist-library/reactive-md-plugin-navigation.js +9 -9
- package/dist-library/reactive-md-plugin-network.js +13 -12
- package/dist-library/reactive-md-plugin-plot.js +7 -6
- package/dist-library/reactive-md-react-component-accordion.js +10 -0
- package/dist-library/reactive-md-react-component-alert.js +10 -0
- package/dist-library/reactive-md-react-component-anchor.js +10 -0
- package/dist-library/reactive-md-react-component-badge.js +10 -0
- package/dist-library/reactive-md-react-component-card.js +10 -0
- package/dist-library/reactive-md-react-component-chart.js +22 -0
- package/dist-library/reactive-md-react-component-checkbox.js +10 -0
- package/dist-library/reactive-md-react-component-checklist.js +10 -0
- package/dist-library/reactive-md-react-component-choices.js +10 -0
- package/dist-library/reactive-md-react-component-column.js +6 -0
- package/dist-library/reactive-md-react-component-coordinate.js +21 -0
- package/dist-library/reactive-md-react-component-counter.js +10 -0
- package/dist-library/reactive-md-react-component-data-table.js +14 -0
- package/dist-library/reactive-md-react-component-date.js +10 -0
- package/dist-library/reactive-md-react-component-diagram.js +22 -0
- package/dist-library/reactive-md-react-component-disclosure.js +10 -0
- package/dist-library/reactive-md-react-component-edge.js +22 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +10 -0
- package/dist-library/reactive-md-react-component-gallery.js +10 -0
- package/dist-library/reactive-md-react-component-grid.js +10 -0
- package/dist-library/reactive-md-react-component-if.js +10 -0
- package/dist-library/reactive-md-react-component-input.js +10 -0
- package/dist-library/reactive-md-react-component-jump.js +10 -0
- package/dist-library/reactive-md-react-component-multi-select.js +10 -0
- package/dist-library/reactive-md-react-component-node.js +22 -0
- package/dist-library/reactive-md-react-component-number.js +10 -0
- package/dist-library/reactive-md-react-component-option.js +10 -0
- package/dist-library/reactive-md-react-component-panel.js +10 -0
- package/dist-library/reactive-md-react-component-plot.js +26 -0
- package/dist-library/reactive-md-react-component-progress.js +10 -0
- package/dist-library/reactive-md-react-component-quiz.js +10 -0
- package/dist-library/reactive-md-react-component-radio-group.js +10 -0
- package/dist-library/reactive-md-react-component-range-slider.js +10 -0
- package/dist-library/reactive-md-react-component-section.js +10 -0
- package/dist-library/reactive-md-react-component-select.js +10 -0
- package/dist-library/reactive-md-react-component-slider.js +10 -0
- package/dist-library/reactive-md-react-component-step.js +10 -0
- package/dist-library/reactive-md-react-component-steps.js +10 -0
- package/dist-library/reactive-md-react-component-tab.js +10 -0
- package/dist-library/reactive-md-react-component-table.js +14 -0
- package/dist-library/reactive-md-react-component-tabs.js +10 -0
- package/dist-library/reactive-md-react-component-text.js +10 -0
- package/dist-library/reactive-md-react-component-textarea.js +10 -0
- package/dist-library/reactive-md-react-component-timeline.js +14 -0
- package/dist-library/reactive-md-react-component-timer.js +10 -0
- package/dist-library/reactive-md-react-component-toggle.js +10 -0
- package/dist-library/reactive-md-react-component-tooltip.js +10 -0
- package/dist-library/reactive-md-react-component-validation.js +10 -0
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +44 -0
- package/dist-library/reactive-md-react-pack-data.js +21 -0
- package/dist-library/reactive-md-react-pack-layout.js +36 -0
- package/dist-library/reactive-md-react-pack-visuals.js +43 -0
- package/dist-library/reactive-md-react-packed.js +50 -0
- package/dist-library/reactive-md-react-server.js +26 -25
- package/dist-library/reactive-md-react-static-server.js +24 -0
- package/dist-library/reactive-md-react-static.js +1 -0
- package/dist-library/reactive-md-react-unstyled.js +15 -12
- package/dist-library/reactive-md-react.js +15 -12
- package/dist-library/reactive-md-runtime-browser.js +2 -1
- package/dist-library/reactive-md-runtime.js +4 -3
- package/dist-library/reactive-md-scan.js +1 -0
- package/dist-library/reactive-md-sdk.js +9 -8
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +32 -32
- package/dist-library/reactive-md-testing.js +12 -12
- package/dist-library/reactive-md-worker-pool.js +401 -0
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +84 -1361
- package/dist-library/registry-core-CziAIP5P.js +125 -0
- package/dist-library/render-nodes-DKjg_TR1.js +9369 -0
- package/dist-library/{resources-D2GDQS0p.js → requirements-DhIkxAbl.js} +37 -84
- package/dist-library/resources-B_nbROgj.js +74 -0
- package/dist-library/rmd-pack-controls.css +1032 -0
- package/dist-library/rmd-pack-data.css +724 -0
- package/dist-library/rmd-pack-layout.css +1825 -0
- package/dist-library/rmd-pack-resource-chart.css +300 -0
- package/dist-library/rmd-pack-resource-controls.css +781 -0
- package/dist-library/rmd-pack-resource-data-visuals.css +501 -0
- package/dist-library/rmd-pack-resource-diagram.css +106 -0
- package/dist-library/rmd-pack-resource-gallery.css +346 -0
- package/dist-library/rmd-pack-resource-graphics.css +516 -0
- package/dist-library/rmd-pack-resource-layout.css +1480 -0
- package/dist-library/rmd-pack-resource-mafs-core.css +124 -0
- package/dist-library/rmd-pack-resource-mafs.css +129 -0
- package/dist-library/rmd-pack-resource-visual-base.css +224 -0
- package/dist-library/rmd-pack-visuals.css +1394 -0
- package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
- package/dist-library/{runtime-kcA7bG7G.js → runtime-CuJndKqK.js} +320 -313
- package/dist-library/runtime-requirement-C4-vNcf5.js +769 -0
- package/dist-library/schema-core-4sd1Vu7V.js +132 -0
- package/dist-library/{sdk-core-BoJT1SIt.js → sdk-core-BLsW9cCy.js} +494 -520
- package/dist-library/{session-core-nmJHuR9c.js → session-core-DLBRPV7f.js} +33 -31
- package/dist-library/{shareable-DpbE-59H.js → shareable-C6mUerpQ.js} +215 -209
- package/dist-library/shared-bTzN-F4g.js +3 -0
- package/dist-library/structural-views-30-YD_TJ.js +11 -0
- package/dist-library/table-surface-CfZn_tk-.js +13 -0
- package/dist-library/types/assemblies/compile-cache-key.d.ts +11 -0
- package/dist-library/types/assemblies/default-config.d.ts +35 -0
- package/dist-library/types/{local/configuration/options.d.ts → assemblies/default-options.d.ts} +4 -4
- package/dist-library/types/assemblies/default-registry.d.ts +18 -0
- package/dist-library/types/{local/configuration/schema.d.ts → assemblies/default-schema.d.ts} +4 -4
- package/dist-library/types/authoring/catalog.d.ts +11 -1
- package/dist-library/types/authoring/extensions.d.ts +1 -1
- package/dist-library/types/authoring/index.d.ts +3 -3
- package/dist-library/types/authoring/templates.d.ts +1 -1
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/compiler/index.d.ts +1 -0
- package/dist-library/types/compiler/session.d.ts +19 -0
- package/dist-library/types/compiler/standard.d.ts +1 -0
- package/dist-library/types/components/entries/accordion.d.ts +3 -0
- package/dist-library/types/components/entries/alert.d.ts +3 -0
- package/dist-library/types/components/entries/anchor.d.ts +3 -0
- package/dist-library/types/components/entries/badge.d.ts +3 -0
- package/dist-library/types/components/entries/card.d.ts +3 -0
- package/dist-library/types/components/entries/chart.d.ts +3 -0
- package/dist-library/types/components/entries/checkbox.d.ts +3 -0
- package/dist-library/types/components/entries/checklist.d.ts +3 -0
- package/dist-library/types/components/entries/choices.d.ts +3 -0
- package/dist-library/types/components/entries/column.d.ts +3 -0
- package/dist-library/types/components/entries/coordinate.d.ts +3 -0
- package/dist-library/types/components/entries/counter.d.ts +3 -0
- package/dist-library/types/components/entries/data-table.d.ts +3 -0
- package/dist-library/types/components/entries/date.d.ts +3 -0
- package/dist-library/types/components/entries/diagram.d.ts +3 -0
- package/dist-library/types/components/entries/disclosure.d.ts +3 -0
- package/dist-library/types/components/entries/edge.d.ts +3 -0
- package/dist-library/types/components/entries/gallery-item.d.ts +3 -0
- package/dist-library/types/components/entries/gallery.d.ts +3 -0
- package/dist-library/types/components/entries/grid.d.ts +3 -0
- package/dist-library/types/components/entries/if.d.ts +3 -0
- package/dist-library/types/components/entries/input.d.ts +3 -0
- package/dist-library/types/components/entries/jump.d.ts +3 -0
- package/dist-library/types/components/entries/multi-select.d.ts +3 -0
- package/dist-library/types/components/entries/node.d.ts +3 -0
- package/dist-library/types/components/entries/number.d.ts +3 -0
- package/dist-library/types/components/entries/option.d.ts +3 -0
- package/dist-library/types/components/entries/panel.d.ts +3 -0
- package/dist-library/types/components/entries/plot.d.ts +3 -0
- package/dist-library/types/components/entries/progress.d.ts +3 -0
- package/dist-library/types/components/entries/quiz.d.ts +3 -0
- package/dist-library/types/components/entries/radio-group.d.ts +3 -0
- package/dist-library/types/components/entries/range-slider.d.ts +3 -0
- package/dist-library/types/components/entries/section.d.ts +3 -0
- package/dist-library/types/components/entries/select.d.ts +3 -0
- package/dist-library/types/components/entries/slider.d.ts +3 -0
- package/dist-library/types/components/entries/step.d.ts +3 -0
- package/dist-library/types/components/entries/steps.d.ts +3 -0
- package/dist-library/types/components/entries/tab.d.ts +3 -0
- package/dist-library/types/components/entries/table.d.ts +3 -0
- package/dist-library/types/components/entries/tabs.d.ts +3 -0
- package/dist-library/types/components/entries/text.d.ts +3 -0
- package/dist-library/types/components/entries/textarea.d.ts +3 -0
- package/dist-library/types/components/entries/timeline.d.ts +3 -0
- package/dist-library/types/components/entries/timer.d.ts +3 -0
- package/dist-library/types/components/entries/toggle.d.ts +3 -0
- package/dist-library/types/components/entries/tooltip.d.ts +3 -0
- package/dist-library/types/components/entries/validation.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +1 -3
- package/dist-library/types/components/layout/structural-views.d.ts +3 -0
- package/dist-library/types/components/mount-preset.d.ts +2 -0
- package/dist-library/types/components/packs/controls.d.ts +2 -0
- package/dist-library/types/components/packs/data.d.ts +2 -0
- package/dist-library/types/components/packs/layout.d.ts +2 -0
- package/dist-library/types/components/packs/visuals.d.ts +2 -0
- package/dist-library/types/components/shared/data-visuals.d.ts +3 -0
- package/dist-library/types/components/shared/table-surface.d.ts +10 -0
- package/dist-library/types/components/shared/visual-helpers.d.ts +24 -0
- package/dist-library/types/components/shared/visuals.d.ts +0 -2
- package/dist-library/types/components/table/data-table-model.d.ts +48 -0
- package/dist-library/types/components/table/data-table.d.ts +1 -48
- package/dist-library/types/{local/configuration → contracts}/component-kernel.d.ts +4 -2
- package/dist-library/types/contracts/index.d.ts +8 -0
- package/dist-library/types/{local/configuration → contracts}/limits.d.ts +9 -1
- package/dist-library/types/contracts/localization.d.ts +6 -0
- package/dist-library/types/contracts/runtime-types.d.ts +19 -0
- package/dist-library/types/local/compilation/cache-version.d.ts +1 -0
- package/dist-library/types/local/compilation/compile-status.d.ts +2 -0
- package/dist-library/types/local/compilation/compiler-bindings.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-core.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-embedding.d.ts +20 -0
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +5 -4
- package/dist-library/types/local/compilation/compiler-structure.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler-tables.d.ts +3 -2
- package/dist-library/types/local/compilation/compiler-validation.d.ts +5 -9
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -1
- package/dist-library/types/local/compilation/compiler.d.ts +1 -1
- package/dist-library/types/local/compilation/component-usage.d.ts +2 -0
- package/dist-library/types/local/compilation/runtime-requirement.d.ts +3 -0
- package/dist-library/types/local/compilation/session/incremental.d.ts +5 -1
- package/dist-library/types/local/compilation/streaming.d.ts +1 -1
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +55 -0
- package/dist-library/types/local/configuration/embedding.d.ts +4 -0
- package/dist-library/types/local/configuration/kernel-value-rules.d.ts +1 -1
- package/dist-library/types/local/configuration/options-core.d.ts +8 -2
- package/dist-library/types/local/index.d.ts +12 -1
- package/dist-library/types/local/observability-codes.d.ts +2 -0
- package/dist-library/types/local/observability-core.d.ts +44 -0
- package/dist-library/types/local/observability-messages.d.ts +6 -0
- package/dist-library/types/local/observability.d.ts +45 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +18 -2
- package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
- package/dist-library/types/local/parsing/parser-region.d.ts +13 -2
- package/dist-library/types/local/parsing/parser-tags.d.ts +6 -1
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +8 -0
- package/dist-library/types/local/performance-report.d.ts +70 -0
- package/dist-library/types/local/runtime/runtime-pool.d.ts +14 -0
- package/dist-library/types/local/transport/worker-handler.d.ts +3 -0
- package/dist-library/types/local/transport/worker-job.d.ts +12 -2
- package/dist-library/types/local/transport/worker-pool.d.ts +68 -0
- package/dist-library/types/local/transport/worker.d.ts +66 -1
- package/dist-library/types/local/types.d.ts +45 -25
- package/dist-library/types/observability.d.ts +8 -0
- package/dist-library/types/presets/default-semantics.d.ts +1 -1
- package/dist-library/types/presets/identity.d.ts +1 -8
- package/dist-library/types/presets/pack-style-entry.d.ts +3 -0
- package/dist-library/types/presets/pack-style-manifest.d.ts +11 -0
- package/dist-library/types/react/component-api.d.ts +3 -2
- package/dist-library/types/react/component-loader.d.ts +61 -0
- package/dist-library/types/react/component-primitives.d.ts +5 -5
- package/dist-library/types/react/index.d.ts +9 -5
- package/dist-library/types/react/localization.d.ts +5 -6
- package/dist-library/types/react/minimal.d.ts +2 -2
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/packed.d.ts +17 -0
- package/dist-library/types/react/render-lifecycle.d.ts +9 -0
- package/dist-library/types/{local → react}/rendering/document/ExtendedHtmlFragment.d.ts +1 -1
- package/dist-library/types/{local → react}/rendering/document/LocalDocumentViewCore.d.ts +11 -4
- package/dist-library/types/react/rendering/document/LocalPooledDocumentView.d.ts +8 -0
- package/dist-library/types/react/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
- package/dist-library/types/react/rendering/document/LocalStaticDocumentView.d.ts +18 -0
- package/dist-library/types/react/rendering/document/StaticExternalSlot.d.ts +25 -0
- package/dist-library/types/react/rendering/document/StaticHostData.d.ts +14 -0
- package/dist-library/types/{local → react}/rendering/document/render-nodes.d.ts +8 -8
- package/dist-library/types/react/rendering/document/static-runtime.d.ts +11 -0
- package/dist-library/types/{local → react}/rendering/document/use-author-script.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/document/validation-state.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/document/view-render-context.d.ts +40 -8
- package/dist-library/types/{local → react}/rendering/document/view-revision.d.ts +2 -2
- package/dist-library/types/{local → react}/rendering/render-types.d.ts +5 -5
- package/dist-library/types/react/rendering/table/data-table.d.ts +5 -0
- package/dist-library/types/{local → react}/rendering/table/table-numeric-columns.d.ts +3 -3
- package/dist-library/types/react/sdk-core.d.ts +12 -3
- package/dist-library/types/react/sdk.d.ts +2 -1
- package/dist-library/types/react/server.d.ts +3 -10
- package/dist-library/types/react/static-server.d.ts +12 -0
- package/dist-library/types/scan/index.d.ts +15 -0
- package/dist-library/types/sdk/config.d.ts +2 -35
- package/dist-library/types/sdk/default-identity.d.ts +3 -0
- package/dist-library/types/sdk/index.d.ts +1 -1
- package/dist-library/types/sdk/preset.d.ts +9 -0
- package/dist-library/types/sdk/props.d.ts +8 -3
- package/dist-library/types/sdk/registry-core.d.ts +2 -2
- package/dist-library/types/sdk/registry.d.ts +2 -18
- package/dist-library/types/sdk/types.d.ts +2 -2
- package/dist-library/types/sdk/version.d.ts +2 -0
- package/dist-library/types/standalone/session-core.d.ts +1 -1
- package/dist-library/{types-BeNtPqdY.js → types-Bza88SGK.js} +1 -1
- package/dist-library/types-daDo2c_w.js +3 -0
- package/dist-library/use-hydrated-W-laKPhY.js +22975 -0
- package/dist-library/validation-XXlb-spV.js +860 -0
- package/dist-library/version-B0G1699c.js +138 -0
- package/dist-library/visual-frame-y5RFhJ0_.js +19 -0
- package/dist-library/visual-helpers-CRmaqCHX.js +75 -0
- package/dist-library/visuals-CdHezgh5.js +3 -0
- package/dist-library/visuals-CoVSjVD8.js +49159 -0
- package/dist-library/worker-D6WMV8xJ.js +1632 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +119 -118
- package/docs/README-ch.md +8 -1
- package/docs/README.md +8 -1
- package/docs/compatibility/api-stability-ch.md +25 -0
- package/docs/compatibility/api-stability-en.md +25 -0
- package/docs/compatibility/compatibility-ch.md +32 -15
- package/docs/compatibility/compatibility-en.md +32 -15
- package/docs/compatibility/compatibility-manifest.schema.json +161 -0
- package/docs/compatibility/deprecation-ch.md +21 -0
- package/docs/compatibility/deprecation-en.md +21 -0
- package/docs/compatibility/source-versioning-ch.md +1 -1
- package/docs/compatibility/source-versioning-en.md +1 -1
- package/docs/compatibility/support-matrix-ch.md +108 -0
- package/docs/compatibility/support-matrix-en.md +108 -0
- 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 +16 -0
- package/docs/development/component-development-reference-en.md +16 -0
- package/docs/development/component-protocol-ch.md +31 -11
- package/docs/development/component-protocol-en.md +31 -11
- package/docs/integration/author-tools-ch.md +3 -1
- package/docs/integration/author-tools-en.md +3 -1
- package/docs/integration/compiler-ch.md +42 -1
- package/docs/integration/compiler-en.md +42 -1
- package/docs/integration/editor-ch.md +2 -2
- package/docs/integration/editor-en.md +2 -2
- package/docs/integration/extension-sdk-ch.md +6 -2
- package/docs/integration/extension-sdk-en.md +6 -2
- package/docs/integration/local-integration-ch.md +4 -2
- package/docs/integration/local-integration-en.md +4 -2
- package/docs/reference/public-api-ch.md +143 -7
- package/docs/reference/public-api-en.md +143 -7
- package/docs/releases/release-0.9.2-ch.md +33 -0
- package/docs/releases/release-0.9.2-en.md +33 -0
- package/docs/releases/release-0.9.3-ch.md +45 -0
- package/docs/releases/release-0.9.3-en.md +45 -0
- package/examples/integration/README-ch.md +36 -4
- package/examples/integration/README.md +36 -4
- package/examples/integration/chat-session/index.mjs +91 -0
- package/examples/integration/chat-session/package.json +10 -0
- package/examples/integration/static-embed/embed.mjs +44 -0
- package/examples/integration/static-embed/index.html +12 -0
- package/examples/integration/static-embed/main.mjs +24 -0
- package/examples/integration/static-embed/references.mjs +5 -0
- package/examples/integration/static-embed/render.mjs +10 -0
- package/package.json +67 -2
- package/dist-library/LocalDocumentView-sthUP0ct.js +0 -109
- package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +0 -275
- package/dist-library/compiler-eOfcinZs.js +0 -62
- package/dist-library/component-state-BoLCGee4.js +0 -801
- package/dist-library/controls-CcT6n7k_.js +0 -6740
- package/dist-library/mount-preset-KxvtKgJb.js +0 -13
- package/dist-library/options-1aDLK7JY.js +0 -121
- package/dist-library/parser-standard-Yuf3A_VI.js +0 -9630
- package/dist-library/plugin-packs-B1XPWcFs.js +0 -18
- package/dist-library/preset-core-CKc5YXSM.js +0 -1443
- package/dist-library/props-sJ8vk0cr.js +0 -183
- package/dist-library/react-D5iGiUdL.js +0 -7
- package/dist-library/schema-BufhKUSM.js +0 -40
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +0 -6
- package/dist-library/types/local/rendering/table/data-table.d.ts +0 -13
- package/dist-library/validation-BEBA_HvS.js +0 -1121
- package/dist-library/visual-frame-CyV1FXzs.js +0 -48
- package/dist-library/visuals-BZbZYA7w.js +0 -72572
- /package/dist-library/types/{local/configuration → contracts}/color-values.d.ts +0 -0
- /package/dist-library/types/{local/html → contracts}/html-names.d.ts +0 -0
- /package/dist-library/types/{local/configuration → contracts}/schema-core.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/code/code-block.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/code/code-languages.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/document/LocalDocumentView.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/document/use-color-scheme.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/image/image-view.d.ts +0 -0
- /package/dist-library/types/{local → react}/rendering/math-view.d.ts +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# 支持矩阵
|
|
2
|
+
|
|
3
|
+
**中文** · [English](support-matrix-en.md)
|
|
4
|
+
|
|
5
|
+
本页定义 `reactive-md@0.9.3`、`reactive-md-editor@0.2.1` 和对应 Demo 候选的公开支持范围。配对版本见[版本与兼容性](compatibility-ch.md)。
|
|
6
|
+
|
|
7
|
+
## 支持等级
|
|
8
|
+
|
|
9
|
+
| 等级 | 定义 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Verified | 本页列出的版本或环境已有当前候选的通过记录。 |
|
|
12
|
+
| Declared | 声明范围与验收入口已确定,具体通过结果见发布证据。 |
|
|
13
|
+
| Unverified | 当前未验证。 |
|
|
14
|
+
| Not supported | 超出当前支持范围。 |
|
|
15
|
+
|
|
16
|
+
包声明的 Node 安装下限为 22.12.0。本发布线验证 Node 22.x 和 24.x 中列出的版本。React 和 Vite 的 peer 范围是安装约束,实测点列在下表。每次完整验收记录三仓来源、兼容清单摘要和单项结果,见 `artifacts/support/latest.json`。
|
|
17
|
+
|
|
18
|
+
## 支持矩阵
|
|
19
|
+
|
|
20
|
+
| 领域 | 范围 | 等级 | 检查 | 验证 |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
| `Node.js` | 22.x(最低 22.12.0) | Verified | `node-runtime` | 在 22.17.0 完成引擎全量检查。 |
|
|
23
|
+
| `Node.js` | 24.x | Verified | `node-runtime` | 用 24.22.2 运行发布验收。 |
|
|
24
|
+
| React / react-dom | peer `^19.0.0` | Verified | `react-range` | 实测 `19.3.1`。编辑器要求 React 19。 |
|
|
25
|
+
| Vite | `reactive-md/vite` 的可选 peer `^8.0.0` | Verified | `vite-range` | 实测 `8.3.5`。 |
|
|
26
|
+
| Playwright Chromium | Playwright 内置版本 | Verified | `playwright-chromium-core` | 实测 `156.0.8078.4`。可单独运行。 |
|
|
27
|
+
| Google Chrome | Windows 上的 Chrome 渠道 | Verified | `chrome-core` | 引擎 fixture 实测 `157.0.8103.80`。 |
|
|
28
|
+
| Microsoft Edge | Windows 上的 Edge 渠道 | Verified | `edge-core` | 引擎 fixture 实测 `135.0.3179.66`。 |
|
|
29
|
+
| Playwright Firefox | Playwright 内置版本 | Unverified | `firefox-core` | 可单独运行。 |
|
|
30
|
+
| Playwright WebKit | Playwright 内置版本 | Unverified | `webkit-core` | 可单独运行。Safari 实机另测。 |
|
|
31
|
+
| Safari | Apple 设备 | Unverified | none | 待实机验证。 |
|
|
32
|
+
| 桌面布局 | 桌面浏览器 | Declared | `demo-smoke` | Demo 冒烟在 Edge 下检查 1440 px。 |
|
|
33
|
+
| 窄屏布局 | 窄视口 | Declared | `demo-smoke` | Demo 冒烟在 Edge 下检查 390 px。 |
|
|
34
|
+
| SSR 静态渲染 | `react-dom/server` | Verified | `ssr-static` | 打包消费者验证服务端标记。 |
|
|
35
|
+
| 单文件 HTML 导出 | `reactive-md-html/v1` | Declared | `demo-smoke` | Demo 冒烟生成文件并在 Edge 离线打开。 |
|
|
36
|
+
| 交互式单文件 HTML 启动 | `reactive-md-html/v1` 内联运行时 | Declared | `demo-smoke` | Demo 冒烟离线操作滑块并验证内容更新。 |
|
|
37
|
+
| 通用 SSR 水合 | 宿主管理的 hydration | Not supported | none | 已支持的交互路径见单文件 HTML 启动。 |
|
|
38
|
+
| 引擎 Worker | `LocalCompileScheduler` 与 `LocalCompileWorker` | Verified | `worker-unit` | 通过 Worker 单元测试。 |
|
|
39
|
+
| 编辑器分析 Worker | CodeMirror 分析 Worker | Declared | `editor-pack` | 打包检查覆盖 Worker 资源及其导入。 |
|
|
40
|
+
| PDF | `reactive-md/pdf` | Verified | `pdf-static` | 实测内置 Chromium 与 `pdftotext`。 |
|
|
41
|
+
| 编辑器包 | `reactive-md-editor` 0.2.1 | Declared | `editor-pack` | peer 为 `^0.9.2`。打包验证 SSR、Worker 和 NodeNext 声明。 |
|
|
42
|
+
| 兼容性清单 | 三仓候选集合 | Declared | `compatibility-manifest` | 验收检查版本、建议安装组合、候选包及锁文件完整性。 |
|
|
43
|
+
|
|
44
|
+
## 验证检查
|
|
45
|
+
|
|
46
|
+
| 检查 | 配置 | 负责方 | 命令 |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `node-runtime` | fast | engine | `built-in` |
|
|
49
|
+
| `react-range` | fast | engine | `built-in` |
|
|
50
|
+
| `vite-range` | fast | engine | `built-in` |
|
|
51
|
+
| `docs-matrix` | fast | engine | `built-in` |
|
|
52
|
+
| `documented-versions` | fast | engine | `node scripts/check-versions.mjs` |
|
|
53
|
+
| `worker-unit` | fast | engine | `npm run test -- tests/local-compile-worker.test.ts` |
|
|
54
|
+
| `compatibility-manifest` | release | engine | `node scripts/verify-compatibility-manifest.mjs --require-workspace` |
|
|
55
|
+
| `chrome-core` | release | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=chrome node scripts/verify-required-form-browser.mjs` |
|
|
56
|
+
| `edge-core` | release | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=msedge node scripts/verify-required-form-browser.mjs` |
|
|
57
|
+
| `ssr-static` | release | engine | `npm run test:boundary` after `npm run build` |
|
|
58
|
+
| `pdf-static` | release | engine | `node scripts/verify-pdf.mjs` |
|
|
59
|
+
| `demo-smoke` | release | demo | `cd ../ReactiveMD-Demo && PLAYWRIGHT_CHANNEL=msedge npm run test:browser:smoke` |
|
|
60
|
+
| `editor-pack` | release | editor | `cd ../ReactiveMD-Editor && npm run check` |
|
|
61
|
+
| `playwright-chromium-core` | optional | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=chromium node scripts/verify-required-form-browser.mjs` |
|
|
62
|
+
| `firefox-core` | optional | engine | `PLAYWRIGHT_ENGINE=firefox node scripts/verify-required-form-browser.mjs` |
|
|
63
|
+
| `webkit-core` | optional | engine | `PLAYWRIGHT_ENGINE=webkit node scripts/verify-required-form-browser.mjs` |
|
|
64
|
+
|
|
65
|
+
## 运行检查
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npm run support:verify
|
|
69
|
+
npm run support:verify -- --profile release
|
|
70
|
+
npm run support:verify -- --profile optional
|
|
71
|
+
npm run compatibility:verify
|
|
72
|
+
npm run support:verify -- --only chrome-core
|
|
73
|
+
npm run support:verify -- --only edge-core
|
|
74
|
+
npm run support:verify -- --only playwright-chromium-core
|
|
75
|
+
npm run support:verify -- --only firefox-core
|
|
76
|
+
npm run support:verify -- --only webkit-core
|
|
77
|
+
npm run support:verify -- --only pdf-static
|
|
78
|
+
npm run support:verify -- --include-external --only demo-smoke
|
|
79
|
+
npm run support:verify -- --only node-runtime --out artifacts/support/node24.json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
默认运行 `fast` 配置:内置检查、文档版本检查和 Worker 单元测试,不需要浏览器、构建产物或同级仓库。`--profile release` 运行全部 fast 检查,再追加 release 检查:兼容性清单、Chrome 与 Edge 引擎 fixture、SSR、PDF,以及 Demo 和编辑器仓库负责的外部检查。`--profile optional` 只运行未声明或需要额外下载的环境:Playwright 内置 Chromium、Firefox 与 WebKit。`--profile all` 运行全部检查。
|
|
83
|
+
|
|
84
|
+
`--only <id>` 只运行指定检查。被 `--only` 点名的检查视为显式请求:缺少外部仓库、缺少 `pdftotext` 或缺少构建产物都会记为失败,不会静默跳过。profile 运行则允许跳过无法运行的可选环境,原因写入证据。`--include-external` 在各自仓库中运行 Demo 和编辑器负责的检查;未传入时这些检查在 profile 运行中跳过,被 `--only` 点名时失败。`--out <path>` 写入指定路径,不更新 `artifacts/support/latest.json`,也不写带时间戳的归档。`--list` 列出全部检查 ID、配置、负责方和命令,不执行检查。Node 24 检查用 Node 24 的 `node` 直接运行同一脚本。
|
|
85
|
+
|
|
86
|
+
`npm run compatibility:verify` 直接检查兼容性清单,需要编辑器与 Demo 仓库存在。
|
|
87
|
+
|
|
88
|
+
## 证据
|
|
89
|
+
|
|
90
|
+
每次运行在 `artifacts/support/` 写入带时间戳的记录,并更新 `artifacts/support/latest.json`;该目录已被 Git 忽略。记录使用 `reactive-md-support-evidence/v2` schema,包含:
|
|
91
|
+
|
|
92
|
+
- 引擎、编辑器和 Demo 的包名、版本、来源 commit 与未提交标记,兼容性清单的路径、schema 与 SHA256,运行时间、配置、包名与版本。
|
|
93
|
+
- `environment`:`node`(完整版本)、`nodeLine`(主版本)、`nodeLineDeclared`(是否为声明的 22.x 或 24.x)、`platform`、`arch`、`playwrightChannel`。
|
|
94
|
+
- 每项检查的 `id`、`label`、`owner`、`profile`、`status`(`pass`、`fail` 或 `skip`)、`durationMs`、`command`、`env`、`cwd` 与跳过或失败原因。
|
|
95
|
+
- `node-runtime` 的 `details`:`required`、`actual`、`line`、`declaredLine`、平台与架构。
|
|
96
|
+
- 浏览器检查的 `details.browser`:`report`(fixture 报告路径)、`requestedChannel`、`browserName`、`browserVersion`、`status`。浏览器 fixture 在 launch 后从驱动读取实际版本,因此证据包含真实浏览器版本和渠道,而不只是请求的渠道。
|
|
97
|
+
|
|
98
|
+
只有当前候选存在通过记录时,对应行才保持 Verified。发布记录引用发布运行生成的证据摘要。
|
|
99
|
+
|
|
100
|
+
## 维护
|
|
101
|
+
|
|
102
|
+
- 支持的运行时、peer 范围或环境变化时更新本矩阵,并在同一次修改中同步中英文版本。
|
|
103
|
+
- 包版本、协议修订、Demo 候选包或推荐安装范围变化时,更新 `compatibility-manifest.json`。
|
|
104
|
+
- `npm run check:versions` 检查兼容性页面的包版本和矩阵发布线与 `package.json` 一致。
|
|
105
|
+
- 发布前运行 `npm run support:verify -- --profile release`;需要覆盖未声明浏览器时另跑 `--profile optional`。
|
|
106
|
+
- 只有当前候选的通过记录才能把行标为 Verified;部分运行、失败或跳过的运行不改变等级。历史记录留在“最近记录”列,不随候选更新覆盖。
|
|
107
|
+
- 外部检查在各自所属仓库运行。
|
|
108
|
+
- 保持检查 ID 稳定。`docs-matrix` 检查两份文档是否都包含全部 ID。
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Support matrix
|
|
2
|
+
|
|
3
|
+
**English** · [中文](support-matrix-ch.md)
|
|
4
|
+
|
|
5
|
+
This matrix defines public support for `reactive-md@0.9.3`, `reactive-md-editor@0.2.1` and the paired Demo candidate. See [Versions and compatibility](compatibility-en.md) for the package pair.
|
|
6
|
+
|
|
7
|
+
## Support levels
|
|
8
|
+
|
|
9
|
+
| Level | Definition |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Verified | A passing candidate check covers the listed version or environment. |
|
|
12
|
+
| Declared | The range and acceptance check are defined. The release evidence records the result for the candidate. |
|
|
13
|
+
| Unverified | The environment awaits verification. |
|
|
14
|
+
| Not supported | Outside the current support scope. |
|
|
15
|
+
|
|
16
|
+
The package requires Node 22.12.0 or newer. This release line verifies the listed Node 22.x and 24.x versions. React and Vite peer ranges are installation constraints. The table gives the tested versions. A complete run records the three source revisions, the compatibility manifest digest and per-check results in `artifacts/support/latest.json`.
|
|
17
|
+
|
|
18
|
+
## Support matrix
|
|
19
|
+
|
|
20
|
+
| Area | Scope | Level | Check | Verification |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
| `Node.js` | 22.x (minimum 22.12.0) | Verified | `node-runtime` | The full engine check passed on 22.17.0. |
|
|
23
|
+
| `Node.js` | 24.x | Verified | `node-runtime` | Release validation uses 24.22.2. |
|
|
24
|
+
| React / react-dom | Peer `^19.0.0` | Verified | `react-range` | Tested with `19.3.1`. The editor requires React 19. |
|
|
25
|
+
| Vite | Optional peer `^8.0.0` for `reactive-md/vite` | Verified | `vite-range` | Tested with `8.3.5`. |
|
|
26
|
+
| Playwright Chromium | Bundled browser | Verified | `playwright-chromium-core` | Tested with `156.0.8078.4`. Run the check separately. |
|
|
27
|
+
| Google Chrome | Chrome channel on Windows | Verified | `chrome-core` | Engine fixture tested with `157.0.8103.80`. |
|
|
28
|
+
| Microsoft Edge | Edge channel on Windows | Verified | `edge-core` | Engine fixture tested with `135.0.3179.66`. |
|
|
29
|
+
| Playwright Firefox | Bundled browser | Unverified | `firefox-core` | The optional check can run separately. |
|
|
30
|
+
| Playwright WebKit | Bundled browser | Unverified | `webkit-core` | The optional check can run separately. Safari requires its own device check. |
|
|
31
|
+
| Safari | Apple devices | Unverified | none | Device verification is pending. |
|
|
32
|
+
| Desktop layout | Desktop browser | Declared | `demo-smoke` | The Demo smoke check covers 1440 px in Edge. |
|
|
33
|
+
| Narrow layout | Narrow viewport | Declared | `demo-smoke` | The Demo smoke check covers 390 px in Edge. |
|
|
34
|
+
| Static SSR | `react-dom/server` | Verified | `ssr-static` | The packed consumer verifies server-rendered markup. |
|
|
35
|
+
| Single-file HTML export | `reactive-md-html/v1` | Declared | `demo-smoke` | The Demo smoke check builds the file and opens it offline in Edge. |
|
|
36
|
+
| Interactive single-file HTML | Inline `reactive-md-html/v1` runtime | Declared | `demo-smoke` | The Demo smoke check operates the slider offline and checks the resulting content. |
|
|
37
|
+
| General SSR hydration | Host-managed hydration | Not supported | none | See interactive single-file HTML for the supported boot path. |
|
|
38
|
+
| Engine Worker | `LocalCompileScheduler` and `LocalCompileWorker` | Verified | `worker-unit` | The Worker unit suite passed. |
|
|
39
|
+
| Editor analysis Worker | CodeMirror analysis Worker | Declared | `editor-pack` | The packed consumer checks the Worker asset and its imports. |
|
|
40
|
+
| PDF | `reactive-md/pdf` | Verified | `pdf-static` | Tested with bundled Chromium and `pdftotext`. |
|
|
41
|
+
| Editor package | `reactive-md-editor` 0.2.1 | Declared | `editor-pack` | Peer range `^0.9.2`. Packed-consumer checks cover SSR, the Worker and NodeNext declarations. |
|
|
42
|
+
| Compatibility manifest | Cross-repository release candidates | Declared | `compatibility-manifest` | Checks the versions, recommended install set, tarballs and lockfile integrity. |
|
|
43
|
+
|
|
44
|
+
## Verification checks
|
|
45
|
+
|
|
46
|
+
| Check | Profile | Owner | Command |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `node-runtime` | fast | engine | `built-in` |
|
|
49
|
+
| `react-range` | fast | engine | `built-in` |
|
|
50
|
+
| `vite-range` | fast | engine | `built-in` |
|
|
51
|
+
| `docs-matrix` | fast | engine | `built-in` |
|
|
52
|
+
| `documented-versions` | fast | engine | `node scripts/check-versions.mjs` |
|
|
53
|
+
| `worker-unit` | fast | engine | `npm run test -- tests/local-compile-worker.test.ts` |
|
|
54
|
+
| `compatibility-manifest` | release | engine | `node scripts/verify-compatibility-manifest.mjs --require-workspace` |
|
|
55
|
+
| `chrome-core` | release | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=chrome node scripts/verify-required-form-browser.mjs` |
|
|
56
|
+
| `edge-core` | release | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=msedge node scripts/verify-required-form-browser.mjs` |
|
|
57
|
+
| `ssr-static` | release | engine | `npm run test:boundary` after `npm run build` |
|
|
58
|
+
| `pdf-static` | release | engine | `node scripts/verify-pdf.mjs` |
|
|
59
|
+
| `demo-smoke` | release | demo | `cd ../ReactiveMD-Demo && PLAYWRIGHT_CHANNEL=msedge npm run test:browser:smoke` |
|
|
60
|
+
| `editor-pack` | release | editor | `cd ../ReactiveMD-Editor && npm run check` |
|
|
61
|
+
| `playwright-chromium-core` | optional | engine | `PLAYWRIGHT_ENGINE=chromium PLAYWRIGHT_CHANNEL=chromium node scripts/verify-required-form-browser.mjs` |
|
|
62
|
+
| `firefox-core` | optional | engine | `PLAYWRIGHT_ENGINE=firefox node scripts/verify-required-form-browser.mjs` |
|
|
63
|
+
| `webkit-core` | optional | engine | `PLAYWRIGHT_ENGINE=webkit node scripts/verify-required-form-browser.mjs` |
|
|
64
|
+
|
|
65
|
+
## Running checks
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npm run support:verify
|
|
69
|
+
npm run support:verify -- --profile release
|
|
70
|
+
npm run support:verify -- --profile optional
|
|
71
|
+
npm run compatibility:verify
|
|
72
|
+
npm run support:verify -- --only chrome-core
|
|
73
|
+
npm run support:verify -- --only edge-core
|
|
74
|
+
npm run support:verify -- --only playwright-chromium-core
|
|
75
|
+
npm run support:verify -- --only firefox-core
|
|
76
|
+
npm run support:verify -- --only webkit-core
|
|
77
|
+
npm run support:verify -- --only pdf-static
|
|
78
|
+
npm run support:verify -- --include-external --only demo-smoke
|
|
79
|
+
npm run support:verify -- --only node-runtime --out artifacts/support/node24.json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The default run uses the `fast` profile: the built-in checks, the documented-version check and the Worker unit suite, with no browser, build output or sibling checkout. `--profile release` runs every fast check and then the release checks: the compatibility manifest, the Chrome and Edge engine fixtures, SSR, PDF, and the external checks owned by the Demo and editor repositories. `--profile optional` runs only the undeclared or extra-download environments: bundled Playwright Chromium, Firefox and WebKit. `--profile all` runs every check.
|
|
83
|
+
|
|
84
|
+
`--only <id>` limits a run to the named checks. A check named by `--only` is an explicit request: a missing sibling checkout, a missing `pdftotext` or missing build output is a failure, not a silent skip. A profile run may skip an optional environment it cannot exercise, and the skip reason is written to the evidence. `--include-external` runs the checks owned by the Demo and editor repositories in their own checkouts; without it those checks skip in profile runs and fail when named by `--only`. `--out <path>` writes the evidence to that path without touching `artifacts/support/latest.json` or the timestamped archive. `--list` prints every check ID with its profile, owner and command and runs nothing. For the Node 24 run, invoke the same script with the Node 24 `node` binary.
|
|
85
|
+
|
|
86
|
+
`npm run compatibility:verify` checks the manifest directly and requires the editor and Demo checkouts.
|
|
87
|
+
|
|
88
|
+
## Evidence
|
|
89
|
+
|
|
90
|
+
Each run writes a timestamped record under `artifacts/support/` and updates `artifacts/support/latest.json`; the directory is gitignored. Records use the `reactive-md-support-evidence/v2` schema and contain:
|
|
91
|
+
|
|
92
|
+
- The package name, version, source commit and dirty flag for the engine, editor and Demo; the compatibility manifest path, schema and SHA256; the run time, profile, package name and version.
|
|
93
|
+
- `environment`: `node` (exact version), `nodeLine` (major), `nodeLineDeclared` (whether the run is on the declared 22.x or 24.x line), `platform`, `arch` and `playwrightChannel`.
|
|
94
|
+
- For each check, `id`, `label`, `owner`, `profile`, `status` (`pass`, `fail` or `skip`), `durationMs`, `command`, `env`, `cwd`, and the skip or failure reason.
|
|
95
|
+
- `node-runtime` `details`: `required`, `actual`, `line`, `declaredLine`, platform and architecture.
|
|
96
|
+
- Browser checks add `details.browser`: `report` (the fixture report path), `requestedChannel`, `browserName`, `browserVersion` and `status`. The fixture reads the actual version from the driver after launch, so the evidence names a real browser version and channel rather than only the requested channel.
|
|
97
|
+
|
|
98
|
+
A row stays Verified only while a passing record exists for the current candidate. Release records reference the evidence summary from the release run.
|
|
99
|
+
|
|
100
|
+
## Maintenance
|
|
101
|
+
|
|
102
|
+
- Update the matrix when supported engines, peer ranges or environments change, and update both language versions in the same change.
|
|
103
|
+
- Update `compatibility-manifest.json` when a package version, protocol revision, Demo candidate or recommended install range changes.
|
|
104
|
+
- `npm run check:versions` checks that the compatibility page package version and the matrix release line match `package.json`.
|
|
105
|
+
- Run `npm run support:verify -- --profile release` before a release; run `--profile optional` separately to cover undeclared browsers.
|
|
106
|
+
- Mark a row Verified only from a passing record for the current candidate; a partial, failed or skipped run leaves the level unchanged. Historical results stay in the "Latest record" column and are not overwritten by a new candidate.
|
|
107
|
+
- Run external checks in their owning repository.
|
|
108
|
+
- Keep check IDs stable. The `docs-matrix` check verifies that both language versions contain every ID.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](component-development-en.md) · [完整开发契约](component-development-reference-ch.md)
|
|
4
4
|
|
|
5
|
-
先用一个可以展开 Markdown 的提示容器跑通预览。扩展 SDK 自 `reactive-md@0.8.0` 起提供,SDK 契约在 `0.9.
|
|
5
|
+
先用一个可以展开 Markdown 的提示容器跑通预览。扩展 SDK 自 `reactive-md@0.8.0` 起提供,SDK 契约在 `0.9.3` 中仍为 0.7.0,直接安装当前公开包即可。
|
|
6
6
|
|
|
7
7
|
## 创建并启动
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx reactive-md init component ../my-note --name my-note --id acme/my-note --form container --props '{"label":{"kind":"string","default":"Note"}}' --yes
|
|
11
11
|
cd ../my-note
|
|
12
|
-
npm install reactive-md@0.9.
|
|
12
|
+
npm install reactive-md@0.9.3 react@^19 react-dom@^19
|
|
13
13
|
npm run dev
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](component-development-ch.md) · [Full development contract](component-development-reference-en.md)
|
|
4
4
|
|
|
5
|
-
Start with a note container that can expand Markdown. The extension SDK has shipped since `reactive-md@0.8.0`, and its `0.7.0` contract is unchanged in `0.9.
|
|
5
|
+
Start with a note container that can expand Markdown. The extension SDK has shipped since `reactive-md@0.8.0`, and its `0.7.0` contract is unchanged in `0.9.3`; install the current published package.
|
|
6
6
|
|
|
7
7
|
## Create and run
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx reactive-md init component ../my-note --name my-note --id acme/my-note --form container --props '{"label":{"kind":"string","default":"Note"}}' --yes
|
|
11
11
|
cd ../my-note
|
|
12
|
-
npm install reactive-md@0.9.
|
|
12
|
+
npm install reactive-md@0.9.3 react@^19 react-dom@^19
|
|
13
13
|
npm run dev
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -117,6 +117,22 @@ export const rating = defineLocalComponent({
|
|
|
117
117
|
|
|
118
118
|
形态支持 `leaf`、`inline`、`container`。容器在 manifest 中声明内容规则,由 `ctx.children.render()` 渲染 Markdown;有选项、表格或结构子项时使用对应公开内容投影。模板的 `note` 演示了容器实现。新增核心规则另见第 10 节。
|
|
119
119
|
|
|
120
|
+
正文是 DSL 源码而非 Markdown 时,容器声明 raw 正文:
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const script = defineLocalComponent({
|
|
124
|
+
id: 'example/script', name: 'script-box', version: '1.0.0',
|
|
125
|
+
protocol: 'reactive-md-component/v1', form: 'container',
|
|
126
|
+
props: {},
|
|
127
|
+
structure: { rule: 'raw-body' },
|
|
128
|
+
capabilities: { interactive: true, static: true, ssr: true, offline: true },
|
|
129
|
+
});
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`raw-body` 只适用于容器。编译器只生成一个 `rawBody` 子节点,`value` 是去除共同缩进后的正文源码,range 指向原始正文;正文内的内容不会变成 Markdown、插值、实体或组块标签。正文只在一行的第一个非空白内容恰好为 `</name>` 时结束,因此结束标签要单独成行。strict 未闭合诊断与 streaming 行为见 [CP-MODEL-05](component-protocol-ch.md#cp-model-05-raw-正文容器要求)。`limits.maxRawBodyChars` 限制单个正文(默认 100,000 个 UTF-16 代码单元,最多 1,000,000,在去缩进前计数且不含两个标签)。
|
|
133
|
+
|
|
134
|
+
渲染时把 `node.value` 当作文本:`ctx.children.render()` 输出一个转义后的文本节点;宿主若自行把字符串写入 HTML,由宿主负责转义。catalog 报告 `bodyKind: 'raw'`;未提供 `authoring.insertText` 时合成 `<script-box>\n\n</script-box>`(正文必填时使用一行字面 `…` 占位)。analyzer 把正文视为不透明区间,编辑器不在其中生成标签、属性、绑定、注释或补全 token。
|
|
135
|
+
|
|
120
136
|
## 4. 实现 React 和静态输出
|
|
121
137
|
|
|
122
138
|
`src/components.tsx` 可以提供以下独立实现:
|
|
@@ -102,6 +102,22 @@ Validated number props are numbers for both `max="5"` and `max="{{ 5 }}"`. Imple
|
|
|
102
102
|
|
|
103
103
|
Forms are `leaf`, `inline` and `container`. Containers declare content rules and render Markdown through `ctx.children.render()`. Use public content projections for options, tables and structural children. The template's `note` demonstrates a container. Section 10 covers new kernel primitives.
|
|
104
104
|
|
|
105
|
+
Provide a raw body when the content is DSL source rather than Markdown:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const script = defineLocalComponent({
|
|
109
|
+
id: 'example/script', name: 'script-box', version: '1.0.0',
|
|
110
|
+
protocol: 'reactive-md-component/v1', form: 'container',
|
|
111
|
+
props: {},
|
|
112
|
+
structure: { rule: 'raw-body' },
|
|
113
|
+
capabilities: { interactive: true, static: true, ssr: true, offline: true },
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`raw-body` is container-only. The compiler emits exactly one `rawBody` child whose `value` is the dedented body source and whose range points at the original body text; nothing inside becomes Markdown, an interpolation, an entity or a component tag. The body closes only on a line whose first non-whitespace content is exactly `</name>`, so put the close tag on its own line. The strict unclosed diagnostic and streaming behavior follow [CP-MODEL-05](component-protocol-en.md#cp-model-05-raw-body-containers-required). `limits.maxRawBodyChars` bounds one body (default 100,000 UTF-16 code units, at most 1,000,000, counted before dedenting and excluding both tags).
|
|
118
|
+
|
|
119
|
+
Render `node.value` as text. `ctx.children.render()` emits one escaped text node; a host that writes the string into its own HTML owns that escaping. The catalog reports `bodyKind: 'raw'`, and without `authoring.insertText` it synthesizes `<script-box>\n\n</script-box>` (a required body uses a literal `…` line). Analysis treats the body as opaque, so the editor produces no tag, attribute, binding, comment or completion tokens inside it.
|
|
120
|
+
|
|
105
121
|
## 4. React and static output
|
|
106
122
|
|
|
107
123
|
A standalone `src/components.tsx` implementation can be:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](component-protocol-en.md)
|
|
4
4
|
|
|
5
|
-
协议修订 `component-protocol-3` · 适用语法 `local-draft-3` · 当前包版本 `0.9.
|
|
5
|
+
协议修订 `component-protocol-3` · 适用语法 `local-draft-3` · 当前包版本 `0.9.3`
|
|
6
6
|
|
|
7
7
|
Reactive MD 的组块就是语言中的组件。本协议规定组块在贡献、实现和验收中的共同契约,连接作者语法、编译器、运行时、React 参考适配器和机器验收数据。作者写文档时以[本地交互语法规范](../reference/local-interaction-syntax-ch.md)为准;宿主接入以[本地模式集成](../integration/local-integration-ch.md)为准;本文供贡献者、评审和测试使用。
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ Reactive MD 分别维护以下版本轴:
|
|
|
39
39
|
- 版本、诊断契约与平台范围:[版本与兼容性](../compatibility/compatibility-ch.md)。
|
|
40
40
|
- 实现代码:`src/local/` 下的解析器、声明表、编译器、运行时和渲染器。
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
本协议不复制完整属性表。默认组件数据由 `src/presets/default-semantics.ts` 定义,`src/assemblies/default-schema.ts` 负责构造供 local 解析和 authoring 使用的兼容 schema。
|
|
43
43
|
|
|
44
44
|
### CP-SCOPE-03 规范用词(要求)
|
|
45
45
|
|
|
@@ -114,12 +114,27 @@ Reactive MD 分别维护以下版本轴:
|
|
|
114
114
|
| 兼容分类 | 能力新增、破坏性变更或实现/编辑性变更 |
|
|
115
115
|
| 验收证据 | 自动测试、机器验收数据和人工浏览器检查 |
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
默认组件数据位于 `src/presets/default-semantics.ts`,其 local schema 投影位于 `src/assemblies/default-schema.ts`。kernel 声明与规范化逻辑位于 `src/contracts/component-kernel.ts`。标签词法集合在 `src/local/parsing/parser.ts`,语义校验在 `src/local/compilation/compiler.ts`,写入约束在 `src/local/runtime/runtime.ts`,React 渲染在 `src/react/rendering/document/LocalDocumentView.tsx` 和 `src/react/rendering/visuals.tsx`。
|
|
118
118
|
|
|
119
119
|
### CP-MODEL-04 名称集合(现有)
|
|
120
120
|
|
|
121
121
|
`local-draft-3` 的 49 个名称是当前语法的完整集合。新增名称、删除名称或改变名称含义都属于作者可见变化,按第 10 节处理。实现可以在内部使用未公开的节点类型,但作者只能使用这里和语法规范列出的名称。
|
|
122
122
|
|
|
123
|
+
### CP-MODEL-05 raw 正文容器(要求)
|
|
124
|
+
|
|
125
|
+
容器组块可以在 SDK manifest 中声明 `structure: { rule: 'raw-body', label: ..., min?: ... }`,或在旧版 `hostComponents` schema 中声明 `body: 'raw'`。正文作为单个惰性 `rawBody` 子节点交付,不参与解析:
|
|
126
|
+
|
|
127
|
+
- 只有 `form: 'container'` 接受该声明。leaf 或 inline 的 manifest 或宿主 schema 在读取时被拒绝。
|
|
128
|
+
- 正文内的 Markdown、组块标签、`{{ }}` 插值、HTML 实体、反斜杠转义和公式都保持原文。`<name>` 行是文本,同名嵌套不建立结构。
|
|
129
|
+
- 正文只在一行结束:该行第一个非空白内容必须恰好是 `</name>`,其后只能是空格、制表符或行结束符。允许前置缩进,名称区分大小写,该行之前的标签形文本仍是正文。关闭标签前的引用 `>` 或其他前缀标记不属于空白,因此关闭行带这类前缀时 raw 容器不会闭合;raw 容器应放在无前缀的行上。
|
|
130
|
+
- 交付的 `value` 是去除容器共同缩进后的正文源码,保留行结束符和剩余空白。`rawBody.range` 指向原始正文区间,不含开启和结束标签;组块区间仍覆盖整个元素。
|
|
131
|
+
- 编译始终生成恰好一个 `rawBody` 子节点,空正文也生成 `value: ''` 的节点。`structure.min > 0` 要求非空正文,并用 `local.structure.children` / `local.structure.children.minimum` 诊断;Markdown 子项规则不作用于正文。
|
|
132
|
+
- 正文源码计入 `limits.maxRawBodyChars`(默认 100,000 个 UTF-16 代码单元,最多 1,000,000,在去缩进前计数且不含两个标签),扫描计入 `maxParseWork`。超限编译以 `local.budget` / `local.budget.raw` 和 `{ name, limit }` 失败,不产生部分节点。
|
|
133
|
+
- final 编译时,严格模式对未闭合正文报告 `local.tag.unclosed`,`strict: false` 沿用未闭合容器的原文恢复。两种模式的流式快照都把未完成的正文按原文显示至快照末尾。宽松 final 模式对恢复区间内的正文仍执行长度限制。
|
|
134
|
+
- React 渲染器把该值作为纯文本输出,交互、SSR 与离线/静态导出一致;不进入 `dangerouslySetInnerHTML`、Markdown 渲染器或 HTML 渲染器。宿主若自行把字符串插入 HTML,由宿主负责转义。
|
|
135
|
+
- `analyzeLocalSource` 把正文视为不透明区间:不产生标签、属性、插值、绑定、注释或补全 token。catalog 报告 `bodyKind: 'raw'`;manifest 未提供 `authoring.insertText` 时合成 `<name>\n\n</name>`(正文必填时使用一行字面 `…` 占位)。
|
|
136
|
+
- 版本身份不变:manifest 协议仍为 `reactive-md-component/v1`,协议修订仍为 `component-protocol-3`。旧读取端会拒绝未知结构规则,且没有默认组块声明 `raw-body`。
|
|
137
|
+
|
|
123
138
|
## 3. 名称、语法和属性
|
|
124
139
|
|
|
125
140
|
### CP-SYNTAX-01 名称拼写(现有)
|
|
@@ -178,6 +193,7 @@ $$ y = x^2 $$
|
|
|
178
193
|
| 公式 | 一个或多个 `$$...$$` 公式块 | `plot` |
|
|
179
194
|
| 内容 | 任务列表或静态说明 | `checklist`、`node` |
|
|
180
195
|
| 普通内容 | Markdown 和组块,按组块附加规则 | `panel`、`card`、`tab`、`step`、`if`、`alert`、`section` |
|
|
196
|
+
| raw 正文 | 单个惰性原文正文;不解析 Markdown、插值或子组块 | 声明 `raw-body` 的 SDK 或宿主容器;48 个作者标签均不使用 |
|
|
181
197
|
|
|
182
198
|
`checklist` 的正文必须正好是一层 Markdown 任务列表;`node` 的说明可以包含文本插值,但不得包含交互组块。`choice` 类型的 `quiz` 接受 `option` 子项,`number` 类型的正文为空。结构子项出现在错误父级、容器缺少必需子项或子项类型不符时,编译失败。
|
|
183
199
|
|
|
@@ -436,6 +452,7 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
436
452
|
| 限制 | 值 |
|
|
437
453
|
| --- | --- |
|
|
438
454
|
| 单份文档源码 | 1,000,000 字符 |
|
|
455
|
+
| 每个 `raw-body` 组块的正文源码 | 默认 100,000 个 UTF-16 代码单元;宿主可将 `limits.maxRawBodyChars` 提升至 1,000,000 |
|
|
439
456
|
| 解析期间累计创建的语法节点 | 默认 10,000,可由宿主按次配置 |
|
|
440
457
|
| 单个字符串值、属性或模板 | 100,000 字符 |
|
|
441
458
|
| 单个数组 | 10,000 项 |
|
|
@@ -485,11 +502,11 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
485
502
|
新增组块必须检查以下接入点,按其行为修改对应实现;复用现有通用校验时,应在提案中说明:
|
|
486
503
|
|
|
487
504
|
1. 公开 manifest 的 `form`;解析器从实例配置读取形态。
|
|
488
|
-
2. 组件定义与实例注册;默认组件定义位于 `src/presets/default-
|
|
505
|
+
2. 组件定义与实例注册;默认组件定义位于 `src/presets/default-semantics.ts`,`src/assemblies/default-schema.ts` 是其 local 兼容投影。
|
|
489
506
|
3. manifest 的属性、结构、绑定、初值与规则;编译器统一执行声明。
|
|
490
507
|
4. 通用内核原语的写入约束(若现有公开规则无法表达新的值或状态)。
|
|
491
508
|
5. 通过公开 React SDK 注册的实现;默认实现位于 `src/components/`。
|
|
492
|
-
6. `src/
|
|
509
|
+
6. `src/contracts/limits.ts` 的预算(若引入新的计算或集合)。
|
|
493
510
|
7. 样式、测试、示例、语法文档、集成文档和验收数据。
|
|
494
511
|
|
|
495
512
|
使用现有公开规则的组件只需定义、实现和注册。新增内核原语时,同时补充其公开契约与验收用例。
|
|
@@ -622,13 +639,13 @@ range-slider 和 coordinate 的每个数值槽位也独占拥有绑定;范围
|
|
|
622
639
|
| 契约面 | 主要位置 | 说明 |
|
|
623
640
|
| --- | --- | --- |
|
|
624
641
|
| 标签词法与形态 | `src/local/parsing/parser.ts` | `VOID`、`PAIRED`、`INLINE`,未知标签降级,脚注屏蔽 |
|
|
625
|
-
| 组块声明 | `src/
|
|
642
|
+
| 组块声明 | `src/presets/default-semantics.ts`、`src/assemblies/default-schema.ts` | 默认组件 manifest 及其 local 兼容投影 |
|
|
626
643
|
| 编译校验 | `src/local/compilation/compiler.ts` | 结构、属性、初值、共享约束、表达式、表格和绘图预算 |
|
|
627
644
|
| 运行时 | `src/local/runtime/runtime.ts` | `get`、`set`、`evaluate`、`text`、`reset`、`resetToken`、`dispose` |
|
|
628
|
-
| React 参考适配器 | `src/
|
|
629
|
-
| 可视化适配器 | `src/
|
|
630
|
-
| 样式 | `src/styles/index.css`、`src/themes/default/`、`src/components/` 中的 CSS、`src/
|
|
631
|
-
| 预算 | `src/
|
|
645
|
+
| React 参考适配器 | `src/react/rendering/document/LocalDocumentView.tsx` | 文档容器、控件、布局、可访问名称、重置和生命周期 |
|
|
646
|
+
| 可视化适配器 | `src/react/rendering/visuals.tsx`、`src/local/evaluation/math/latex.ts`、`src/react/rendering/math-view.tsx` | 表格、图表、绘图、时间轴、图解和数学渲染 |
|
|
647
|
+
| 样式 | `src/styles/index.css`、`src/themes/default/`、`src/components/` 中的 CSS、`src/react/rendering/document/local.css` | 公共入口、完整默认值和组件样式 |
|
|
648
|
+
| 预算 | `src/contracts/limits.ts` | 共享资源上限 |
|
|
632
649
|
| 版本 | `src/local/types.ts`、`package.json` | 语法修订和包版本 |
|
|
633
650
|
| 验收 | `tests/`、`examples/conformance/` | 语言测试和机器验收数据 |
|
|
634
651
|
| 文档 | `docs/`、`README.md`、`CONTRIBUTING-ch.md`、`SECURITY-ch.md` | 语法、集成、兼容、安全和贡献规则 |
|
|
@@ -713,8 +730,9 @@ manifest 与绑定测试使用 `reactive-md/testing`,渲染与生命周期证
|
|
|
713
730
|
| 字段 | 内容 |
|
|
714
731
|
| --- | --- |
|
|
715
732
|
| `name` | 小写 kebab-case,在集合内唯一,不能是 49 个作者标签名、P0 HTML 标签名或主题声明名 `theme` |
|
|
716
|
-
| `form` | `'leaf'`、`'inline'` 或 `'container'`;inline 与 container 的正文按普通 Markdown
|
|
733
|
+
| `form` | `'leaf'`、`'inline'` 或 `'container'`;inline 与 container 的正文按普通 Markdown 编译,可包含组件;`body` 可选择 raw 交付 |
|
|
717
734
|
| `props` | 宿主属性表;属性名使用小写 kebab-case |
|
|
735
|
+
| `body` | 可选的容器正文交付方式:`'markdown'`(默认)或 `'raw'`。`'raw'` 按 CP-MODEL-05 降为内部 `raw-body` 结构规则;其他形态会被拒绝 |
|
|
718
736
|
|
|
719
737
|
每次编译最多接受 32 个宿主组块 Schema。每个属性声明 `kind`(`string`、`number`、`boolean` 或 `enum`)、`required`、`static`、`enum` 和 `pattern`。`enum` 用于 `enum` 属性,`pattern` 用于 `string` 属性。P0 HTML 标签名保留给解析器优先处理的 HTML,不得复用。`pattern` 限制在线性时间安全子集内:拒绝反向引用、环视、命名组、嵌套量词和被量词修饰的分支。非法 Schema 以 `local.options.invalid` 诊断拒绝;编译失败,该集合不会部分生效。
|
|
720
738
|
|
|
@@ -744,5 +762,7 @@ React 视图把 `hostComponent` 节点分发给 `hostRenderer(node, data, ctx)`
|
|
|
744
762
|
| `component-protocol-2` | 2026-10-25 | 新增宿主组件扩展轴;作者语法仍为 `local-draft-2`。 |
|
|
745
763
|
| `component-protocol-1` | 2026-10-23 | 初版;最初适用于 `local-draft-1` 和包版本 `0.3.0`,定义组块贡献、验收和扩展边界。现在适用于 `local-draft-2` 和 `0.4.0` 预览版,MUST 条款和机器格式不变。 |
|
|
746
764
|
|
|
765
|
+
`raw-body` 容器(CP-MODEL-05)在 `component-protocol-3` 之后加入,未提升协议修订:该声明属于增量 SDK 与宿主数据,旧读取端会拒绝未知结构规则而不是误读,没有默认组块使用它,manifest 协议仍为 `reactive-md-component/v1`(`src/sdk/version.ts`)。
|
|
766
|
+
|
|
747
767
|
|
|
748
768
|
组块与状态规则见[本地交互语法规范](../reference/local-interaction-syntax-ch.md),升级清单见[0.4.0 发布与迁移](../releases/release-0.4.0-ch.md)。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](component-protocol-ch.md)
|
|
4
4
|
|
|
5
|
-
Protocol revision `component-protocol-3` · applicable syntax `local-draft-3` · current package version `0.9.
|
|
5
|
+
Protocol revision `component-protocol-3` · applicable syntax `local-draft-3` · current package version `0.9.3`
|
|
6
6
|
|
|
7
7
|
Components are the building blocks of the Reactive MD language. This protocol defines the shared contract for contribution, implementation and acceptance, connecting author syntax, the compiler, the runtime, the React reference adapter and machine conformance data. Authors writing documents follow the [local interaction syntax specification](../reference/local-interaction-syntax-en.md); hosts integrating follow [local mode integration](../integration/local-integration-en.md); this document is for contributors, reviewers and tests.
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ When this protocol restates existing behavior, the following files are authorita
|
|
|
39
39
|
- Versions, diagnostics contract and platform scope: [Versions and compatibility](../compatibility/compatibility-en.md).
|
|
40
40
|
- Implementation code: the parser, declaration table, compiler, runtime and renderer under `src/local/`.
|
|
41
41
|
|
|
42
|
-
This protocol does not copy the full attribute tables.
|
|
42
|
+
This protocol does not copy the full attribute tables. Default manifests in `src/presets/default-semantics.ts` define the component data, while `src/assemblies/default-schema.ts` builds the compatibility schema used by local parsing and authoring.
|
|
43
43
|
|
|
44
44
|
### CP-SCOPE-03 Normative terms (required)
|
|
45
45
|
|
|
@@ -114,12 +114,27 @@ A component proposal declaration contains at least the following information; it
|
|
|
114
114
|
| Compatibility classification | Capability addition, breaking change or implementation/editorial change |
|
|
115
115
|
| Acceptance evidence | Automated tests, machine conformance data and manual browser checks |
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Default component data lives in `src/presets/default-semantics.ts`, with its local schema projection in `src/assemblies/default-schema.ts`. Kernel declarations and normalization live in `src/contracts/component-kernel.ts`. Tag lexical sets are in `src/local/parsing/parser.ts`, semantic validation in `src/local/compilation/compiler.ts`, write constraints in `src/local/runtime/runtime.ts`, and React rendering in `src/react/rendering/document/LocalDocumentView.tsx` and `src/react/rendering/visuals.tsx`.
|
|
118
118
|
|
|
119
119
|
### CP-MODEL-04 Name set (existing)
|
|
120
120
|
|
|
121
121
|
The 49 names of `local-draft-3` are the complete set for the current syntax. Adding, removing or changing the meaning of a name is an author-visible change and is handled under section 10. Implementations may use undocumented node types internally, but authors can only use the names listed here and in the syntax specification.
|
|
122
122
|
|
|
123
|
+
### CP-MODEL-05 Raw-body containers (required)
|
|
124
|
+
|
|
125
|
+
A container component may declare `structure: { rule: 'raw-body', label: ..., min?: ... }` in an SDK manifest, or `body: 'raw'` in a legacy `hostComponents` schema. Its body is delivered as one lazy `rawBody` child and is never parsed:
|
|
126
|
+
|
|
127
|
+
- Only `form: 'container'` accepts the declaration. A leaf or inline manifest or host schema is rejected when it is read.
|
|
128
|
+
- Inside the body, Markdown, component tags, `{{ }}` interpolation, HTML entities, backslash escapes and formulas stay literal. A `<name>` line is text; same-name nesting creates no structure.
|
|
129
|
+
- The body ends only on a line whose first non-whitespace content is exactly `</name>` and whose remaining characters are spaces, tabs or the line ending. Leading indentation is allowed, matching is case-sensitive, and tag-shaped text before that line stays body text. A blockquote `>` or other prefix marker before the closing tag is not whitespace, so a raw container whose close line sits under such a prefix does not close; keep raw containers on unprefixed lines.
|
|
130
|
+
- The delivered `value` is the body source with the container's common indentation removed; line endings and remaining whitespace are kept. `rawBody.range` points at the original body source without the opener or close tag, and the component range still spans the whole element.
|
|
131
|
+
- Compilation emits exactly one `rawBody` child, including for an empty body (`value: ''`). `structure.min > 0` requires a non-blank body and reports `local.structure.children` with `local.structure.children.minimum`; Markdown child rules do not run against the body.
|
|
132
|
+
- Body source counts toward `limits.maxRawBodyChars` (default 100,000 UTF-16 code units, at most 1,000,000, counted before dedenting and excluding both tags), and scanning counts toward `maxParseWork`. An over-limit compile fails with `local.budget` / `local.budget.raw` and `{ name, limit }`, without a partial node.
|
|
133
|
+
- Final compilation reports `local.tag.unclosed` for an unclosed body in strict mode and uses unclosed-container recovery with `strict: false`. Streaming shows the unfinished body as raw text through the end of the snapshot in either mode. The length limit also applies when loose final compilation recovers the unfinished body as source text.
|
|
134
|
+
- The React renderer emits the value as plain text, identically in interactive, SSR and offline/static output. It never enters `dangerouslySetInnerHTML`, a Markdown renderer or an HTML renderer. A host that inserts the string into its own HTML owns that escaping.
|
|
135
|
+
- `analyzeLocalSource` treats the body as opaque: no tag, attribute, interpolation, binding, comment or completion token comes from it. The catalog reports `bodyKind: 'raw'` and synthesizes `<name>\n\n</name>` (a required body uses a literal `…` line) unless the manifest supplies `authoring.insertText`.
|
|
136
|
+
- Identity is unchanged: the manifest protocol stays `reactive-md-component/v1` and the protocol revision stays `component-protocol-3`. Older readers reject an unknown structure rule, and no default component declares `raw-body`.
|
|
137
|
+
|
|
123
138
|
## 3. Names, syntax and attributes
|
|
124
139
|
|
|
125
140
|
### CP-SYNTAX-01 Name spelling (existing)
|
|
@@ -178,6 +193,7 @@ Whether `label` is required, optional or not applicable is determined by the com
|
|
|
178
193
|
| Formulas | One or more `$$...$$` formula blocks | `plot` |
|
|
179
194
|
| Content | A task list or static notes | `checklist`, `node` |
|
|
180
195
|
| General content | Markdown and components, with component-specific rules | `panel`, `card`, `tab`, `step`, `if`, `alert`, `section` |
|
|
196
|
+
| Raw body | One lazy raw text body; no Markdown, interpolation or child components | SDK or host containers declaring `raw-body`; none of the 48 author tags |
|
|
181
197
|
|
|
182
198
|
The `checklist` body must be exactly one level of Markdown task list; `node` notes may contain text interpolation but must not contain interactive components. A `choice` quiz accepts `option` children and a `number` quiz has an empty body. Compilation fails when a structural child appears under the wrong parent, a container lacks a required child, or a child type does not match.
|
|
183
199
|
|
|
@@ -437,6 +453,7 @@ All images are rejected by default, including relative paths; they load only whe
|
|
|
437
453
|
| Limit | Value |
|
|
438
454
|
| --- | --- |
|
|
439
455
|
| Source per document | 1,000,000 characters |
|
|
456
|
+
| Raw body source per `raw-body` component | 100,000 UTF-16 code units by default; host may raise `limits.maxRawBodyChars` to 1,000,000 |
|
|
440
457
|
| Syntax nodes created cumulatively during parsing | 10,000 by default, configurable per call by the host |
|
|
441
458
|
| A single string value, attribute or template | 100,000 characters |
|
|
442
459
|
| A single array | 10,000 items |
|
|
@@ -486,11 +503,11 @@ SSR HTML, class names and DOM structure in machine acceptance are evidence for t
|
|
|
486
503
|
New components must check the following integration points and change the corresponding implementation according to their behavior; when reusing existing generic validation, explain it in the proposal:
|
|
487
504
|
|
|
488
505
|
1. The public manifest's `form`; the parser reads shapes from instance configuration.
|
|
489
|
-
2. Component definitions and registration. Default manifests live in `src/presets/default-
|
|
506
|
+
2. Component definitions and registration. Default manifests live in `src/presets/default-semantics.ts`; `src/assemblies/default-schema.ts` provides the local compatibility projection.
|
|
490
507
|
3. Manifest props, structures, bindings, initial values and rules, executed by the shared compiler.
|
|
491
508
|
4. Generic kernel write constraints when existing public rules cannot express a new value or state.
|
|
492
509
|
5. Implementations registered through the public React SDK. Default views live in `src/components/`.
|
|
493
|
-
6. Budgets in `src/
|
|
510
|
+
6. Budgets in `src/contracts/limits.ts` (if new computation or collections are introduced).
|
|
494
511
|
7. Styles, tests, examples, syntax documentation, integration documentation and conformance data.
|
|
495
512
|
|
|
496
513
|
Components that reuse public rules need a definition, implementation and registration. New kernel primitives also require a public contract and acceptance cases.
|
|
@@ -623,13 +640,13 @@ Only SHOULD clauses can be exempted; exemptions must record the rationale, alter
|
|
|
623
640
|
| Contract surface | Main location | Notes |
|
|
624
641
|
| --- | --- | --- |
|
|
625
642
|
| Tag lexing and shapes | `src/local/parsing/parser.ts` | `VOID`, `PAIRED`, `INLINE`, unknown-tag fallback, footnote shielding |
|
|
626
|
-
| Component declarations | `src/
|
|
643
|
+
| Component declarations | `src/presets/default-semantics.ts`, `src/assemblies/default-schema.ts` | Default manifests and their local compatibility projection |
|
|
627
644
|
| Compile validation | `src/local/compilation/compiler.ts` | Structure, attributes, initial values, shared constraints, expressions, table and plot budgets |
|
|
628
645
|
| Runtime | `src/local/runtime/runtime.ts` | `get`, `set`, `evaluate`, `text`, `reset`, `resetToken`, `dispose` |
|
|
629
|
-
| React reference adapter | `src/
|
|
630
|
-
| Visualization adapter | `src/
|
|
631
|
-
| Styles | `src/styles/index.css`, `src/themes/default/`, component CSS under `src/components/`, `src/
|
|
632
|
-
| Budgets | `src/
|
|
646
|
+
| React reference adapter | `src/react/rendering/document/LocalDocumentView.tsx` | Document container, controls, layout, accessible names, reset and lifecycle |
|
|
647
|
+
| Visualization adapter | `src/react/rendering/visuals.tsx`, `src/local/evaluation/math/latex.ts`, `src/react/rendering/math-view.tsx` | Tables, charts, plots, timelines, diagrams and math rendering |
|
|
648
|
+
| Styles | `src/styles/index.css`, `src/themes/default/`, component CSS under `src/components/`, `src/react/rendering/document/local.css` | Public entry, complete defaults and component styles |
|
|
649
|
+
| Budgets | `src/contracts/limits.ts` | Shared resource limits |
|
|
633
650
|
| Versions | `src/local/types.ts`, `package.json` | Syntax revision and package version |
|
|
634
651
|
| Acceptance | `tests/`, `examples/conformance/` | Language tests and machine conformance data |
|
|
635
652
|
| Documentation | `docs/`, `README.md`, `CONTRIBUTING.md`, `SECURITY.md` | Syntax, integration, compatibility, security and contribution rules |
|
|
@@ -714,8 +731,9 @@ The tables below are for review. See the [component development guide](component
|
|
|
714
731
|
| Field | Content |
|
|
715
732
|
| --- | --- |
|
|
716
733
|
| `name` | Lowercase kebab-case, unique within the set, not one of the 48 author tag names, a P0 HTML tag name or the theme declaration name |
|
|
717
|
-
| `form` | `'leaf'`, `'inline'` or `'container'`; inline and container bodies are compiled as normal Markdown and may contain components |
|
|
734
|
+
| `form` | `'leaf'`, `'inline'` or `'container'`; inline and container bodies are compiled as normal Markdown and may contain components, unless `body` selects raw delivery |
|
|
718
735
|
| `props` | A table of host properties; property names use lowercase kebab-case |
|
|
736
|
+
| `body` | Optional container body delivery: `'markdown'` (the default) or `'raw'`. `'raw'` lowers to the internal `raw-body` structure rule under CP-MODEL-05; other forms are rejected |
|
|
719
737
|
| `binding` | Optional scalar binding (`string`, `number`, `boolean`) with static `min`, `max`, `step`, `options`, `initialRule` and `exclusive`; the component then accepts `bind`, `initial` and dynamic `disabled` implicitly |
|
|
720
738
|
|
|
721
739
|
One compilation accepts at most 32 host component schemas. Each property declares `kind` (`string`, `number`, `boolean` or `enum`), `required`, `static`, `enum` and `pattern`. A host binding shares the built-in families; when its name matches a built-in control, family and static constraints must agree. `enum` applies to `enum` properties, and `pattern` applies to `string` properties. P0 HTML tag names are reserved because the parser handles them before component tags. `pattern` is restricted to a linear-time-safe subset: backreferences, lookarounds, named groups, nested quantifiers and quantified alternation are rejected. Invalid schemas are rejected with a `local.options.invalid` diagnostic; compilation fails and no host component from that set is partially registered.
|
|
@@ -746,5 +764,7 @@ Portable machine cases remain `examples/conformance/component-protocol-1.json`,
|
|
|
746
764
|
| `component-protocol-2` | 2026-10-25 | Added the host component extension axis; author syntax remains `local-draft-2`. |
|
|
747
765
|
| `component-protocol-1` | 2026-10-23 | Initial version; originally applied to `local-draft-1` and package version `0.3.0`, defining component contribution, acceptance and extension boundaries. It now applies to `local-draft-2` and the `0.4.0` preview release without changing its MUST clauses or machine format. |
|
|
748
766
|
|
|
767
|
+
`raw-body` containers (CP-MODEL-05) were added after `component-protocol-3` without raising the revision. The declaration is additive SDK and host data, an unknown structure rule is rejected rather than misread, no default component uses it, and the manifest protocol remains `reactive-md-component/v1` (`src/sdk/version.ts`).
|
|
768
|
+
|
|
749
769
|
|
|
750
770
|
See the [syntax specification](../reference/local-interaction-syntax-en.md) for tags, colors, slot state and selection rules, and [Versions and compatibility](../compatibility/compatibility-en.md) for version mapping and migration guidance.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文** · [English](author-tools-en.md)
|
|
4
4
|
|
|
5
|
-
安装 `reactive-md@0.9.
|
|
5
|
+
安装 `reactive-md@0.9.3` 即可使用 CLI 和不依赖 React 的 `reactive-md/authoring` 入口。从本仓库开发时,先构建语言包:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npm ci
|
|
@@ -51,6 +51,8 @@ const formatted = formatLocalSource(renamed.source, compileOptions);
|
|
|
51
51
|
|
|
52
52
|
已有成功编译结果时,可调用 `analyzeLocalSource(source, compileOptions, { document, diagnostics: false })` 复用节点,并省略诊断编译。`document` 必须来自同一源码与编译配置;源码不同会重新解析。省略第三个参数时仍生成完整诊断。内置编辑器使用独立的增量会话复用作者分析节点,诊断由宿主编译结果提供。
|
|
53
53
|
|
|
54
|
+
raw 正文容器(`structure.rule: 'raw-body'`,或声明 `body: 'raw'` 的宿主 schema)对分析不透明:正文区间内不产生标签、属性、插值、绑定、注释或补全 token,重命名与格式化也不会改动正文。由 manifest 生成的 catalog 条目和 `createLocalAuthoringLookup` 的标签数据提供 `bodyKind: 'markdown' | 'raw'`;旧版宿主 schema 只出现在标签 authoring 中,不生成 catalog 条目。未提供 `authoring.insertText` 时,raw 条目得到可编译的 `<name>\n\n</name>` 模板;正文必填时使用一行字面 `…` 占位。编辑器负责自己的 raw 文本编辑模式,引擎保证不透明区间和元数据。
|
|
55
|
+
|
|
54
56
|
重命名修改生效的绑定声明、表达式引用和绘图参数,保留普通文字与展示公式。绘图参数在重命名后写为 `\mathrm{newName}`。非法名称和名称冲突会抛出错误。格式化整理已识别组件标签内的空白,保留 Markdown 排版、引号内容、公式、代码与降级区域的源码。编辑器应持续保存原始文档。
|
|
55
57
|
|
|
56
58
|
## Playground
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](author-tools-ch.md)
|
|
4
4
|
|
|
5
|
-
Install `reactive-md@0.9.
|
|
5
|
+
Install `reactive-md@0.9.3` to use the CLI and the React-free `reactive-md/authoring` entry. To work from this repository, build the package first:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npm ci
|
|
@@ -51,6 +51,8 @@ Analysis returns ordered highlight tokens, bindings with declaration/reference r
|
|
|
51
51
|
|
|
52
52
|
With a successful compile result, call `analyzeLocalSource(source, compileOptions, { document, diagnostics: false })` to reuse its nodes and skip diagnostic compilation. The document must come from the same source and compile options; a different source is parsed again. Omitting the third argument still produces full diagnostics. The built-in editor uses its own incremental session for analysis nodes, while visible diagnostics come from the host compiler.
|
|
53
53
|
|
|
54
|
+
Raw-body containers (`structure.rule: 'raw-body'`, or a host schema with `body: 'raw'`) are opaque to analysis: a body range produces no tag, attribute, interpolation, binding, comment or completion token, and rename or formatting leaves it untouched. Manifest-derived catalog entries and `createLocalAuthoringLookup` tag data report `bodyKind: 'markdown' | 'raw'`; a legacy host schema appears in tag authoring but does not create a catalog entry. Without `authoring.insertText`, a raw entry receives the compilable `<name>\n\n</name>` template; a required body uses a literal `…` placeholder line. The editor owns the raw text editing mode; the engine guarantees the opaque range and metadata.
|
|
55
|
+
|
|
54
56
|
Rename updates active binding declarations, expression references and computed plot parameters, preserving literal text and display formulas. Plot parameters use `\mathrm{newName}` after a rename. Invalid names and collisions throw an error. Formatting normalizes spacing inside recognized component tags; Markdown layout, quoted content, formulas, code and fallback regions retain their source. Keep the original source as the editable document.
|
|
55
57
|
|
|
56
58
|
## Playground
|