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
|
@@ -8,8 +8,8 @@ Three packages exist. Each has its own version and release workflow.
|
|
|
8
8
|
|
|
9
9
|
| Package | Version | Responsibility |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| `reactive-md` | `0.9.
|
|
12
|
-
| `reactive-md-editor` | `0.2.
|
|
11
|
+
| `reactive-md` | `0.9.3` | Compiler, runtime, authoring services, SDK, React and SSR rendering, export, build adapters |
|
|
12
|
+
| `reactive-md-editor` | `0.2.1` | CodeMirror 6 source editor, toolbar, editor-side navigation |
|
|
13
13
|
| `reactive-md-demo` | private | Website, examples and deployment. No public API |
|
|
14
14
|
|
|
15
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.
|
|
@@ -21,14 +21,22 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
21
21
|
| `reactive-md` | ESM | No | No | Full core surface: one-shot and streaming compile, incremental sessions, runtime, state, Worker, shareable HTML |
|
|
22
22
|
| `reactive-md/compiler` | ESM | No | No | One-shot semantic compiler without the default preset |
|
|
23
23
|
| `reactive-md/compiler/standard` | ESM | No | No | One-shot compiler with GFM, native HTML, KaTeX and the default preset |
|
|
24
|
+
| `reactive-md/compiler/session` | ESM | No | No | Stateful per-document compile session with block reuse and disposal |
|
|
25
|
+
| `reactive-md/scan` | ESM | No | No | Read-only source analysis returning tokens, bindings and UTF-16 ranges |
|
|
26
|
+
| `reactive-md/worker-pool` | ESM | No | No | Compile multiple documents with a bounded Worker queue |
|
|
24
27
|
| `reactive-md/react` | ESM | Yes | No | React document renderer and component development API |
|
|
25
28
|
| `reactive-md/react/unstyled` | ESM | Yes | No | The same renderer without the stylesheet side effect |
|
|
26
29
|
| `reactive-md/react/minimal` | ESM | Yes | No | Renderer built on the 18-component minimal preset |
|
|
30
|
+
| `reactive-md/react/packed` | ESM | Yes | No | Compose and render explicitly selected React presets |
|
|
31
|
+
| `reactive-md/react/static` | ESM | Yes | No | Render a compiler-proven static document without a runtime or compile session |
|
|
32
|
+
| `reactive-md/react/static/server` | ESM | Yes | Yes | Render the same static view to hydratable server markup |
|
|
27
33
|
| `reactive-md/react/server` | ESM | Yes | Yes | Strict SSR adapter returning markup or diagnostics |
|
|
28
34
|
| `reactive-md/react/runtime` | ESM | Yes | No | Component-facing React hooks: timers, frames, swipe, keys, state |
|
|
29
35
|
| `reactive-md/sdk` | ESM | No | No | Component, preset and theme manifests with validation |
|
|
36
|
+
| `reactive-md/contracts` | ESM | No | No | Pure cross-stage types and helpers: limits, component kernel, schema, colors and HTML names |
|
|
30
37
|
| `reactive-md/presets/default` | ESM | No | No | The 48-component default preset as plain data |
|
|
31
38
|
| `reactive-md/presets/default/packs` | ESM | No | No | Four named subsets of the default preset |
|
|
39
|
+
| `reactive-md/presets/default/packs/react/<pack>` | ESM | Yes | No | React implementation and CSS resources for `controls`, `layout`, `data` or `visuals` |
|
|
32
40
|
| `reactive-md/presets/minimal` | ESM | No | No | The 18-component minimal preset |
|
|
33
41
|
| `reactive-md/presets/minimal/react` | ESM | Yes | No | React implementations for the minimal preset |
|
|
34
42
|
| `reactive-md/plugins/*` | ESM | Yes | No | Eight optional official component packages |
|
|
@@ -45,6 +53,7 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
45
53
|
| `reactive-md/testing/browser` | ESM | No | No | Browser lifecycle compliance with an optional Playwright driver |
|
|
46
54
|
| `reactive-md/runtime` | ESM | No | No | Document identity, seeds, random, scheduler, component-state registry, network channels |
|
|
47
55
|
| `reactive-md/runtime/browser` | ESM | No | No | `localStorage` persistence, page-hide flush, HTTP/SSE, WebSocket, WebRTC adapters |
|
|
56
|
+
| `reactive-md/observability` | ESM | No | No | Observe compilation, Workers and rendering, and produce diagnostic and performance reports |
|
|
48
57
|
| `reactive-md/pdf` | ESM | No | Yes | Render prepared static HTML to PDF bytes through Playwright |
|
|
49
58
|
| `reactive-md/styles.css` | CSS | — | — | Document, component and theme styles |
|
|
50
59
|
| `reactive-md/styles/minimal.css` | CSS | — | — | Styles for the minimal preset |
|
|
@@ -56,6 +65,34 @@ The engine ships ESM only and targets Node.js 22.12 or newer in Node builds. Rea
|
|
|
56
65
|
|
|
57
66
|
## Compilation and the core runtime
|
|
58
67
|
|
|
68
|
+
### Embedding and multiple documents
|
|
69
|
+
|
|
70
|
+
`LocalCompileOptions.embedding` defaults to `{ expressions: 'evaluate', onUnsupported: 'error', allowImages: true, allowInteractive: true, allowExternalSlots: false }`. `expressions: 'literal'` preserves interpolation delimiters in text and compatible string attributes. Use the compile `config` to select the component registry. HTML permissions come from the existing capability flags.
|
|
71
|
+
|
|
72
|
+
With `onUnsupported: 'fallback'`, unsupported nodes and node-level errors in attributes, component structure, plots, tables, and navigation fall back to escaped source. `node.fallback` records the diagnostic code and UTF-16 range. The compiler rechecks dependencies and builds runtime metadata from the surviving nodes. Headings keep their anchors, and the first valid explicit anchor keeps its ID when another repeats it. Resource budget errors, including extended HTML limits, fail compilation.
|
|
73
|
+
|
|
74
|
+
Successful compilations report `document.requiresRuntime` and `document.usedComponents` (also on the single-pass compiler's `program`). Use `usedComponents` to preload implementations and select CSS before rendering. It lists distinct component names in first-use order from the published tree, including built-in, SDK and declared legacy host components. It includes components in conditional branches and omits declarations removed by the compiler, source fallbacks, and external slot names. Older documents may omit the field.
|
|
75
|
+
|
|
76
|
+
Pass a document with `requiresRuntime: false` to `LocalStaticDocumentView` from `reactive-md/react/static` or `renderLocalStaticMarkup` from `reactive-md/react/static/server`. The server function returns markup and diagnostics on success, and structured diagnostics on failure. The literal profile supports `<if when="true">` and `<if when="false">`. Components whose manifest declares static rendering can use the matching `reactConfig` when their attributes are literal. Components without an implementation show a placeholder.
|
|
77
|
+
|
|
78
|
+
Legacy `hostComponents` with literal attributes and no runtime dependencies also work in both static entry points. Pass the existing `hostData` and `hostRenderer(node, data, ctx)` directly. The callback receives the original node, including its ID and source range, and a read-only `ctx.runtime` projection. `ctx.mode` is `'static'` and `ctx.setValue()` returns `false`. Synchronous data is looked up as `kind:ref`. Only `undefined` means missing.
|
|
79
|
+
|
|
80
|
+
For missing keyed data, pass a stable `resolveHostData({ kind, ref, signal })` callback. The server and first client render show the same loading placeholder, and resolution starts after hydration. Changing the lookup or removing the node aborts its pending request. A missing value, resolver failure, or synchronous renderer exception affects only that node. In the browser, a node boundary also handles errors thrown by the React subtree returned by the renderer. During SSR, errors thrown by that subtree fail the server render. Use the same synchronous data, renderer and resolver presence for SSR and hydration.
|
|
81
|
+
|
|
82
|
+
Enable `allowExternalSlots` for `<external slot="references" />`. The host can supply content synchronously through `renderExternalSlot({ name, locale, range })`. `resolveExternalSlot({ name, signal })` can return a React component or a promise, and is invoked after mounting in the browser. Server rendering with a resolver emits a stable loading placeholder. Slots with no host renderer show an unavailable placeholder. Choose permitted slot names in the host before loading any implementation. If one slot renderer throws, the slot reports the failure through `onDiagnostics` and shows the unavailable placeholder while normal siblings keep rendering. Keep the slot renderer or resolver stable across renders; the loader caches by resolver identity, and an inline function restarts the request. Server rendering and client hydration must use the same slot strategy so the first client render matches the server markup. See the [static embed example](../../examples/integration/README.md#static-embed).
|
|
83
|
+
|
|
84
|
+
`createLocalRuntimePool()` from `reactive-md` provides leases scoped to compatible document and runtime options. Release each lease when the consumer unmounts, or use `LocalPooledDocumentView` to tie lease ownership to the React lifecycle.
|
|
85
|
+
|
|
86
|
+
`stableComponentKeys` preserves React slots across append-only updates when the rendered parent, sibling index, node type and component name stay the same. React retains the instance when the rendered component type also stays the same. Inserts, deletes and reordering can remount a component or leave its state at the old slot when the replacement has the same type and name. Moving a node to another rendered parent mounts a new instance there. Slots that disappear unmount.
|
|
87
|
+
|
|
88
|
+
### `reactive-md/worker-pool`
|
|
89
|
+
|
|
90
|
+
`createLocalCompilePool()` accepts `{ documentId, revision, source, options, sourcePhase, priority }`. Revisions increase per document. A source beyond the document length limit is rejected as `source-too-large` before it enters the queue. The default `latest` policy rejects replaced tasks with `LocalCompilePoolTaskError.kind === 'superseded'`. A newer final supersedes an older pending final for the same document; a newer streaming snapshot only supersedes older streaming snapshots and queues behind a final. Use `all` for ordered delivery and handle `backpressure` when its queue fills. Call `release(documentId)` when a document is permanently closed; it cancels that document's pending tasks and forgets its revision chain and baselines so the ID can be reused. A Worker that negotiates `patch-v1` can reuse a compatible final baseline for the same document. The pool retries with full source if the Worker no longer holds the baseline. Pass a `LocalObserver` to read pool events, then forward an outcome's trace ID, document ID and revision as `trace` on the React view to correlate loading and mount events.
|
|
91
|
+
|
|
92
|
+
Base priority is clamped to `[-10, 10]` and defaults to `0`. Each 100 ms of queue time adds one point. `setPriority` updates the document's queued requests and leaves in-flight work running.
|
|
93
|
+
|
|
94
|
+
Call `pool.hold()` while scrolling to pause dispatch of document compiles, including full retries and local fallback. Already dispatched work may finish, and pool warmup and idle recycling continue. The pool still accepts, supersedes and cancels queued requests under the normal policy and capacity. `pool.resume()` resumes dispatch with the existing priorities and queue age. Both calls are idempotent.
|
|
95
|
+
|
|
59
96
|
### `reactive-md`
|
|
60
97
|
|
|
61
98
|
The full core surface. No React, no stylesheet, no DOM.
|
|
@@ -63,6 +100,7 @@ The full core surface. No React, no stylesheet, no DOM.
|
|
|
63
100
|
| Area | Exports |
|
|
64
101
|
| --- | --- |
|
|
65
102
|
| One-shot compile | `compileLocal`, `LocalCompileResult`, `LocalCompileOptions` |
|
|
103
|
+
| Compilation cache identity | `localCompileCacheKey`, `LocalCompileCacheKeyOptions`, `localCompileOptionsKey` |
|
|
66
104
|
| Incremental editing | `createLocalCompileSession`, `LocalCompileSession`, `LocalIncrementalStats` |
|
|
67
105
|
| Streaming source | `LocalSourcePhase`, `LocalCompileStatus`; phased session and scheduler arguments |
|
|
68
106
|
| Runtime | `createLocalRuntime`, `updateLocalRuntime`, `notifyLocalRuntime`, `LocalRuntime`, `LocalSnapshot` |
|
|
@@ -100,6 +138,43 @@ The same result contract, wired to the full experience: the default preset, GFM,
|
|
|
100
138
|
|
|
101
139
|
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
140
|
|
|
141
|
+
### `reactive-md/compiler/session`
|
|
142
|
+
|
|
143
|
+
| Export | Purpose |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| `createLocalCompileSession` | Create one incremental session per document |
|
|
146
|
+
| `LocalCompileSession` | `compile`, `compileShared`, `stats`, `prepare`, `clear` and `dispose` |
|
|
147
|
+
| `LocalIncrementalStats` | Mode, block and timing counters for the last compile |
|
|
148
|
+
| `localCompileCacheKey` | Cache identity for a source snapshot, compile options, configuration, phase and policy version |
|
|
149
|
+
| `localCompileOptionsKey` | Identity for compile options alone |
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import { createLocalCompileSession } from 'reactive-md/compiler/session';
|
|
153
|
+
|
|
154
|
+
const session = createLocalCompileSession();
|
|
155
|
+
const result = session.compile('<number bind="count" label="Count" initial="1">\n\nTotal: {{ count }}', undefined, 'final');
|
|
156
|
+
console.log(result.status, session.stats.mode);
|
|
157
|
+
session.dispose();
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The entry may load the parser and the standard compile assembly. It loads no React, CSS, DOM, Worker scheduling, or authoring service, catalog or command modules; the standard assembly may carry preset authoring data such as localized titles, keywords and insertion text. Cache identity remains source + option key + component configuration key. Compiled document objects are not promised as a cross-version serialization format.
|
|
161
|
+
|
|
162
|
+
### `reactive-md/scan`
|
|
163
|
+
|
|
164
|
+
| Export | Purpose |
|
|
165
|
+
| --- | --- |
|
|
166
|
+
| `analyzeLocalSource` | Read-only analysis of tags, attributes, interpolations, bindings and diagnostics |
|
|
167
|
+
| `AuthorToken`, `AuthorBinding`, `AuthorAnalysis` | Result types; every `range` is a UTF-16 source offset |
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import { analyzeLocalSource } from 'reactive-md/scan';
|
|
171
|
+
|
|
172
|
+
const analysis = analyzeLocalSource('<number bind="count" label="Count">');
|
|
173
|
+
for (const token of analysis.tokens) console.log(token.kind, token.range);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The entry returns data only: completion, rename, formatting, insertion templates, catalog and toolbar commands stay in `reactive-md/authoring`. Its graph may include the pure parser, source ranges, compile options, diagnostics and preset authoring data; it excludes the catalog and command services, React, CSS and the incremental session.
|
|
177
|
+
|
|
103
178
|
## React rendering
|
|
104
179
|
|
|
105
180
|
### `reactive-md/react`
|
|
@@ -135,6 +210,25 @@ Hooks for component implementations: `useTicker`, `useFrame`, `useSwipe` with `c
|
|
|
135
210
|
|
|
136
211
|
## Component SDK and presets
|
|
137
212
|
|
|
213
|
+
For a smaller host, pass React pack packages to `createReactHost({ presets })` from `reactive-md/react/packed`. Compile with `host.compileOptions`, render with `host.reactConfig` and load `host.css` alongside the document base styles. `deriveLocalReactPreset(pack, { include })` or `{ exclude }` selects semantic manifests and React implementations together, retaining the styles those manifests reference. `deriveLocalPreset` selects the semantic manifests for compiler-only use. Both preserve declared preset dependencies. Use the individual pack imports to control the bundle graph.
|
|
214
|
+
|
|
215
|
+
To omit unselected implementations within a pack, import the components individually:
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
import { createReactHost } from 'reactive-md/react/packed';
|
|
219
|
+
import card from 'reactive-md/presets/default/packs/react/component/card';
|
|
220
|
+
import badge from 'reactive-md/presets/default/packs/react/component/badge';
|
|
221
|
+
import 'reactive-md/presets/default/packs/css/resources/layout.css';
|
|
222
|
+
|
|
223
|
+
const host = createReactHost({ presets: [card, badge] });
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Each entry provides one manifest and its React implementation. Include any structural components used by the document, such as `column` for a `data-table` with explicit columns. Components outside the selected schema follow the compiler's unknown component or embedding fallback rules. Filtering an imported aggregate pack selects the registry; direct imports let the bundler omit sibling views.
|
|
227
|
+
|
|
228
|
+
Use `reactive-md/presets/default/packs/css/<pack>.css` for a whole pack, or load only the resource files needed by your subset. `packStyleManifest` from `reactive-md/presets/default/packs/styles` maps component names to style IDs, packs to CSS files and resource IDs, and resource IDs to CSS files and selectors. Use the `file` values as package specifiers. A resource may serve several components or packs; load a shared resource once. Load these files alongside the document base styles, or use `host.css` for the selected resources instead.
|
|
229
|
+
|
|
230
|
+
`createDeferredReactConfig(config, { components, resolver, resolveSync })` pairs an existing compiler config with React implementations. Pre-registered implementations take precedence. Optional `resolveSync({ name, definition })` can serve an already loaded implementation during SSR and in the browser; use the same lookup on both sides. The async `resolver({ name, definition, signal })` starts after mount, shares one request per definition, and receives an abort signal when its last subscriber leaves. SSR emits a stable loading placeholder for unresolved implementations. In `LocalStaticDocumentView`, custom components also need a matching contract that declares static, noninteractive rendering, and the compiled document must be runtime free.
|
|
231
|
+
|
|
138
232
|
### `reactive-md/sdk`
|
|
139
233
|
|
|
140
234
|
| Group | Exports |
|
|
@@ -152,16 +246,26 @@ Hooks for component implementations: `useTicker`, `useFrame`, `useSwipe` with `c
|
|
|
152
246
|
|
|
153
247
|
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
248
|
|
|
249
|
+
### `reactive-md/contracts`
|
|
250
|
+
|
|
251
|
+
The pure cross-stage types and helpers shared by the SDK, the language core and component packages. The entry imports no other engine layer.
|
|
252
|
+
|
|
253
|
+
| Group | Exports |
|
|
254
|
+
| --- | --- |
|
|
255
|
+
| Limits | `MAX_LOCAL_DOCUMENT_LENGTH`, `DEFAULT_MAX_LOCAL_RAW_BODY_CHARS`, `MAX_LOCAL_RAW_BODY_CHARS`, `MAX_LOCAL_HOST_COMPONENTS`, plot and data-table limits, `isLocalEmail` |
|
|
256
|
+
| Component kernel | `KernelComponentSchema`, `NormalizedComponent`, `normalizeComponent`, `kernelStructure`, `kernelRules`, `kernelAttributeIssues`, `kernelNumericConstraints` and the related binding and value types |
|
|
257
|
+
| Schema, values and names | `SourceRange`, `LocalValue`, `LocalValueKind`, `LocalHostBindingSchema`, `LOCAL_KERNEL_DECLARATIONS`, `localize`, `defaultLocalize`, `isLocalColor`, `LOCAL_HTML_NAMES`, `localHtmlAlign` |
|
|
258
|
+
|
|
155
259
|
### Built-in presets
|
|
156
260
|
|
|
157
261
|
| Entry | Contents |
|
|
158
262
|
| --- | --- |
|
|
159
263
|
| `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` (
|
|
264
|
+
| `reactive-md/presets/default/packs` | `controlsPack` (19), `layoutPack` (20), `dataPack` (4), `visualsPack` (5) |
|
|
161
265
|
| `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
266
|
| `reactive-md/presets/minimal/react` | `minimalReactPresetPackage`: React implementations for those 18 components |
|
|
163
267
|
|
|
164
|
-
Packs are ordinary presets
|
|
268
|
+
Packs are ordinary presets. Select one or more packs for a packed React host. `visualsPack` declares a dependency on `dataPack`; pass both when using the visuals pack. `column` belongs to `dataPack` because it is a data-table child, so `layoutPack` and `dataPack` can be combined in packed and common React hosts. Hosts still reject duplicate entries with conflicting contracts or implementations.
|
|
165
269
|
|
|
166
270
|
### Optional plugin packages
|
|
167
271
|
|
|
@@ -197,7 +301,7 @@ DOM-free and React-free, so it runs in a Worker or a server process.
|
|
|
197
301
|
| Native catalog | `NATIVE_COMPONENTS`, `NATIVE_COMPONENTS_ZH`, `NATIVE_COMPONENT_GROUPS`, `EXTENDED_NATIVE_COMPONENTS`, `getNativeComponentCatalog`, `renderNativeSnippet` |
|
|
198
302
|
| Toolbar commands | `formatBold`, `formatItalic`, `formatStrike`, `formatInlineCode`, `formatHeading`, `formatBulletList`, `formatOrderedList`, `formatTaskList`, `formatQuote`, `indentSelection`, `outdentSelection`, `insertLink`, `insertImage`, `insertCodeBlock`, `insertTable`, `insertDivider`, `insertText`, `insertTemplate`, `readFormatState` |
|
|
199
303
|
|
|
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.
|
|
304
|
+
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. A host that only needs read-only analysis can import `analyzeLocalSource` from `reactive-md/scan` and skip the catalog, templates and commands above.
|
|
201
305
|
|
|
202
306
|
## Export and deployment
|
|
203
307
|
|
|
@@ -386,7 +490,7 @@ The DOM-free toolbar commands, re-exported from `reactive-md/authoring`, with th
|
|
|
386
490
|
|
|
387
491
|
| Constant | Value | Scope |
|
|
388
492
|
| --- | --- | --- |
|
|
389
|
-
| Package version | `0.9.
|
|
493
|
+
| Package version | `0.9.3` | Engine releases |
|
|
390
494
|
| SDK contract | `0.7.0` (`LOCAL_SDK_VERSION`) | Component, preset and configuration manifests |
|
|
391
495
|
| Syntax revision | `local-draft-3` (`LOCAL_SYNTAX_VERSION`) | Document source |
|
|
392
496
|
| State file | `reactive-md-state/v1` (`LOCAL_STATE_FORMAT`) | Exported parameters |
|
|
@@ -396,12 +500,44 @@ The DOM-free toolbar commands, re-exported from `reactive-md/authoring`, with th
|
|
|
396
500
|
| Restoration | `reactive-md-restore/v1` | Export-side contract requirements |
|
|
397
501
|
| Export assets | `reactive-md-export-assets/v1` | Asset manifest |
|
|
398
502
|
| Build manifest | `reactive-md-build/v1` | Standalone build output |
|
|
503
|
+
| Diagnostic report | `reactive-md-diagnostic/v1` | Diagnostic report format version |
|
|
399
504
|
| Component protocol | `reactive-md-component/v1`, `component-protocol-3` | Component contribution |
|
|
400
505
|
| Theme protocol | `reactive-md-theme-1` | Document themes |
|
|
401
|
-
| Editor package | `0.2.
|
|
506
|
+
| Editor package | `0.2.1` | Editor releases, peer `reactive-md: ^0.9.2` |
|
|
402
507
|
|
|
403
508
|
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
509
|
|
|
510
|
+
## Observability
|
|
511
|
+
|
|
512
|
+
Import `LocalObserver`, `LocalTraceEvent`, `createDiagnosticReport`, `createLocalPerformanceReport` and `formatLocalDiagnostic` from `reactive-md/observability`. Supply an observer through `compileLocal(source, { observer })` or `new LocalCompileScheduler({ observer, createWorker, onResult })`. Observer callbacks receive independent copies, and callback exceptions are isolated from compilation.
|
|
513
|
+
|
|
514
|
+
`createLocalPerformanceReport(events)` summarizes up to the last 512 events by trace, document revision, Worker pool and slot, and component name. It separates successful durations from failure, cancellation and budget rejection counts. Each `requestId` contributes one terminal outcome, so a timeout followed by a successful fallback counts once as a success. `pools` shows readiness, and `workers` shows spawn, warmup, queue, busy and completed idle intervals. Phase timings are present when the compiler or Worker measured them.
|
|
515
|
+
|
|
516
|
+
`component-load-start` and `component-load-end` measure actual async resolver calls. `component-load-wait-end` records how each subscribed revision finished waiting for the same `loadId`, including when one revision leaves while other subscribers remain. Pass the compile trace ID, document ID and revision in the view's `trace` prop to join these events with rendering. `documentRender` and `componentRender` separate mount latency, mounted lifetime, and the interval from React's layout cleanup to passive cleanup (`unmountMs`). `render-unmount.durationMs` remains an alias for mounted lifetime. Retained components emit `render-retained` on a streaming-to-final update, and development effect replays have their own counters.
|
|
517
|
+
|
|
518
|
+
```ts
|
|
519
|
+
import { compileLocal } from 'reactive-md';
|
|
520
|
+
import { createDiagnosticReport, type LocalObserver, type LocalTraceEvent } from 'reactive-md/observability';
|
|
521
|
+
|
|
522
|
+
const events: LocalTraceEvent[] = [];
|
|
523
|
+
const observer: LocalObserver = {
|
|
524
|
+
onDiagnostic(diagnostic) { console.warn(diagnostic.code, diagnostic.phase); },
|
|
525
|
+
onTrace(event) {
|
|
526
|
+
events.push(event);
|
|
527
|
+
if (events.length > 50) events.shift();
|
|
528
|
+
},
|
|
529
|
+
};
|
|
530
|
+
const source = '# Example';
|
|
531
|
+
const result = compileLocal(source, { observer });
|
|
532
|
+
const report = createDiagnosticReport(source, { diagnostics: result.diagnostics, events });
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
Diagnostics expose optional `phase`, `messageKey`, `recoverable` and scalar `details`. Existing codes retain their meanings. English and Chinese templates for Worker, export and resource diagnostics are exported as `LOCAL_OBSERVABILITY_MESSAGES`. `LocalTraceEvent` covers compile, Worker and export stages; the `export-cancel` type records an export that stops, and diagnostic reports accept its `cancelled` and `printed` statuses. Worker requests carry `traceId`, `sourceRevision`, and `requestId`, which equals the transport `id`. Recovery requests preserve the source revision and trace. The scheduler defaults to a 30,000 ms timeout, configurable through `timeoutMs`, and falls back to main-thread compilation on transport failure.
|
|
536
|
+
|
|
537
|
+
A `createWorker` factory that throws is reported once, on the first task that runs on the fallback thread, as a `worker-error` trace with code `local.worker.startup` and status `failed`. The event reuses that task's `traceId` and `sourceRevision` and carries the bounded reason in the optional `detail` field. Later tasks do not repeat it. `detail` is observer-only free text.
|
|
538
|
+
|
|
539
|
+
Reports use schema `reactive-md-diagnostic/v1` and include package/protocol versions, runtime environment, source byte count and digest, registered diagnostic codes, ranges, selected budget details and the latest 50 events. Browser reports include user agent and platform. Node reports include Node version and platform. Hosts may supply editor, React and Vite versions through `options.package`. Report serialization is bounded to 64 KiB by removing oldest events and then trailing diagnostics. Free-text messages, source, diagnostic parameters, resource owner paths and the trace `detail` field are omitted. The host controls copying, storage and transmission.
|
|
540
|
+
|
|
405
541
|
## Where to read next
|
|
406
542
|
|
|
407
543
|
| Task | Document |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ReactiveMD 0.9.2
|
|
2
|
+
|
|
3
|
+
[English](release-0.9.2-en.md) · **中文**
|
|
4
|
+
|
|
5
|
+
从 npm 安装 `reactive-md@0.9.2`:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
0.9.2 补丁版本发布说明(2026-11-23)。
|
|
12
|
+
|
|
13
|
+
## 主要更新
|
|
14
|
+
|
|
15
|
+
### 最新的回退编译结果优先
|
|
16
|
+
|
|
17
|
+
观察者在回退编译的开始、结束或诊断回调中调度新的源码后,旧结果、剩余诊断和终态 trace 不再交付。每个调度代次携带当前性令牌,调度器在每次观察回调后重新校验。
|
|
18
|
+
|
|
19
|
+
### 格式化诊断保留 Worker 失败原因
|
|
20
|
+
|
|
21
|
+
`formatLocalDiagnostic` 通过有界的 `detail` 参数在中英文诊断中保留 Worker 编译异常的原因。诊断报告仍不包含自由文本。
|
|
22
|
+
|
|
23
|
+
### 可恢复性与调用方一致
|
|
24
|
+
|
|
25
|
+
构建 preflight 与导出计划的资源及预算诊断标记为 `recoverable: false`,与在诊断处停止的调用方一致。
|
|
26
|
+
|
|
27
|
+
### 导出取消事件
|
|
28
|
+
|
|
29
|
+
`LocalTraceEvent` 新增 `export-cancel` 类型,诊断报告接受 `cancelled` 与 `printed` 状态。
|
|
30
|
+
|
|
31
|
+
## 兼容性
|
|
32
|
+
|
|
33
|
+
本次补丁发布不改变语法、SDK、主题、组件或状态协议版本。`local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 和 `0.7.0` SDK 契约继续有效。升级引擎包无需迁移已有文档源码和状态文件。已发布的 `reactive-md-editor@0.2.0` 仍兼容 `0.9.x` 引擎系列。升级到 `reactive-md-editor@0.2.1` 时,引擎需满足 `^0.9.2`。仍固定在引擎 0.9.0 或 0.9.1 的宿主需要同时升级引擎。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ReactiveMD 0.9.2
|
|
2
|
+
|
|
3
|
+
**English** · [中文](release-0.9.2-ch.md)
|
|
4
|
+
|
|
5
|
+
Install `reactive-md@0.9.2` from npm:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Release notes for the 0.9.2 patch release (2026-11-23).
|
|
12
|
+
|
|
13
|
+
## Highlights
|
|
14
|
+
|
|
15
|
+
### The newest fallback compile wins
|
|
16
|
+
|
|
17
|
+
An observer that schedules another source while a fallback compile starts, ends, or reports a diagnostic no longer receives the older result, its remaining diagnostics, or its terminal trace afterwards. Each scheduled source carries a currentness token that the scheduler checks after every observer callback.
|
|
18
|
+
|
|
19
|
+
### Worker failure reasons in formatted diagnostics
|
|
20
|
+
|
|
21
|
+
`formatLocalDiagnostic` keeps the underlying Worker compile exception in English and Chinese through a bounded `detail` parameter. Diagnostic reports continue to omit free text.
|
|
22
|
+
|
|
23
|
+
### Recoverability matches the callers
|
|
24
|
+
|
|
25
|
+
Build preflight and export plan resource and budget diagnostics are `recoverable: false`, matching the callers that stop on them.
|
|
26
|
+
|
|
27
|
+
### Export cancellation events
|
|
28
|
+
|
|
29
|
+
`LocalTraceEvent` adds the `export-cancel` type, and diagnostic reports accept the `cancelled` and `printed` statuses.
|
|
30
|
+
|
|
31
|
+
## Compatibility
|
|
32
|
+
|
|
33
|
+
No syntax, SDK, theme, component or state protocol revision changes. `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the SDK contract `0.7.0` remain current. Existing document source and state files need no migration. The published `reactive-md-editor@0.2.0` remains compatible with the `0.9.x` engine series. When upgrading to `reactive-md-editor@0.2.1`, the engine must satisfy `^0.9.2`. Hosts still pinned to engine 0.9.0 or 0.9.1 must upgrade the engine as well.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ReactiveMD 0.9.3
|
|
2
|
+
|
|
3
|
+
[English](release-0.9.3-en.md) · **中文**
|
|
4
|
+
|
|
5
|
+
从 npm 安装 `reactive-md@0.9.3`:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
0.9.3 功能版本发布说明(2026-11-27)。
|
|
12
|
+
|
|
13
|
+
## 主要更新
|
|
14
|
+
|
|
15
|
+
### 嵌入与降级编译
|
|
16
|
+
|
|
17
|
+
`LocalCompileOptions.embedding` 用于选择受限的编译档位。`expressions: 'literal'` 在正文和兼容的字符串属性中保留插值定界符。启用 `onUnsupported: 'fallback'` 后,受限节点以及属性、结构、绘图、表格、导航等节点级错误会变为转义原文,`node.fallback` 记录诊断码与范围,依赖和运行时元数据按存留节点重建。资源预算超限仍使编译失败,成功结果会报告 `document.requiresRuntime`。
|
|
18
|
+
|
|
19
|
+
### 无运行时静态渲染
|
|
20
|
+
|
|
21
|
+
无需运行时的文档可交给 `reactive-md/react/static` 的 `LocalStaticDocumentView`,或 `reactive-md/react/static/server` 的 `renderLocalStaticMarkup`。宿主槽位可以同步渲染,也可以在挂载后解析;已安装预设声明了静态渲染的组件由对应 pack 实现直接输出。属性为字面值的旧式 `hostComponents` 可通过 `hostData`/`hostRenderer` 渲染;缺失的键控数据由 `resolveHostData` 在水合后解析,服务端与客户端首帧共享加载占位。仍需要运行时的文档可通过 `createLocalRuntimePool` 与 `LocalPooledDocumentView` 复用租约。
|
|
22
|
+
|
|
23
|
+
### 精简的会话与扫描入口
|
|
24
|
+
|
|
25
|
+
`reactive-md/compiler/session` 导出 `createLocalCompileSession`,为每份文档维护一个增量会话,并导出 `localCompileCacheKey`,按编译器入口、有效阶段、已验证选项、组件配置和宿主策略版本缓存源码快照。`reactive-md/scan` 导出 `analyzeLocalSource`,以只读方式返回标记、绑定和 UTF-16 范围。两个依赖图都不加载 React、CSS、DOM 或 Worker 调度。
|
|
26
|
+
|
|
27
|
+
### 组件清单
|
|
28
|
+
|
|
29
|
+
`document.usedComponents` 按首次出现顺序列出内置、SDK 和已声明的旧式宿主组件名称;单次编译入口还会以 `program.usedComponents` 提供该字段。宿主可在渲染前预加载实现并选择 CSS。条件分支中的组件仍会列出;声明、原文降级节点和外部槽位名不会出现。
|
|
30
|
+
|
|
31
|
+
### 多文档 Worker 池
|
|
32
|
+
|
|
33
|
+
`reactive-md/worker-pool` 的 `createLocalCompilePool` 在有界队列中编译多份文档的 revision,支持 `latest` 与 `all` 交付、优先级老化、`backpressure`、`release(documentId)`、预热和空闲回收,并在超长源码入队前拒绝它。`hold()` 暂停文档派发、全量重试和本地回退,已在执行的任务、预热和空闲回收仍可完成;`resume()` 按现有优先级和排队时长恢复派发。
|
|
34
|
+
|
|
35
|
+
### 性能报告
|
|
36
|
+
|
|
37
|
+
`createLocalPerformanceReport` 以 schema `reactive-md-performance/v1` 汇总编译、Worker 与渲染事件,报告池就绪、Worker 启动与预热、组件装载等待,以及文档与组件的挂载、存活和卸载耗时。
|
|
38
|
+
|
|
39
|
+
### 按需组件装载
|
|
40
|
+
|
|
41
|
+
`reactive-md/react/packed` 用于组合所选的 React pack。`reactive-md/presets/default/packs/react/component/*` 的逐组件入口把未选视图排除在 bundle 之外,`packStyleManifest` 给出所选组件与 CSS 资源的映射。`createDeferredReactConfig` 按定义共享异步请求,最后一个订阅者离开时中止,并接受同步 resolver 以服务 SSR 与水合。
|
|
42
|
+
|
|
43
|
+
## 兼容性
|
|
44
|
+
|
|
45
|
+
本次发布不改变语法、SDK、主题、组件或状态协议版本。`local-draft-3`、`component-protocol-3`、`reactive-md-theme-1`、`reactive-md-state/v1` 和 `0.7.0` SDK 契约继续有效。已有文档源码和状态文件无需迁移。编辑器仍配对 `reactive-md-editor@0.2.1`,其 `^0.9.2` peer 接受本版本。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ReactiveMD 0.9.3
|
|
2
|
+
|
|
3
|
+
**English** · [中文](release-0.9.3-ch.md)
|
|
4
|
+
|
|
5
|
+
Install `reactive-md@0.9.3` from npm:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install reactive-md@0.9.3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Release notes for the 0.9.3 feature release (2026-11-27).
|
|
12
|
+
|
|
13
|
+
## Highlights
|
|
14
|
+
|
|
15
|
+
### Embedding and fallback compilation
|
|
16
|
+
|
|
17
|
+
`LocalCompileOptions.embedding` selects a restricted compiler profile. `expressions: 'literal'` preserves interpolation delimiters in text and compatible string attributes. With `onUnsupported: 'fallback'`, unsupported nodes and node-level attribute, structure, plot, table and navigation errors become escaped source, `node.fallback` records the code and range, and dependencies and runtime metadata are rebuilt from the surviving nodes. Resource budget failures still fail compilation, and successful results report `document.requiresRuntime`.
|
|
18
|
+
|
|
19
|
+
### Runtime-free static rendering
|
|
20
|
+
|
|
21
|
+
A document compiled without runtime requirements renders through `LocalStaticDocumentView` from `reactive-md/react/static` or `renderLocalStaticMarkup` from `reactive-md/react/static/server`. Host slots can render synchronously or resolve after mount, and static components declared by the installed presets render through their pack implementations. Legacy `hostComponents` with literal attributes render through `hostData`/`hostRenderer`; `resolveHostData` supplies missing keyed data after hydration while the server and first client render share a loading placeholder. `createLocalRuntimePool` and `LocalPooledDocumentView` reuse runtime leases for documents that still need a runtime.
|
|
22
|
+
|
|
23
|
+
### Narrow session and scan entries
|
|
24
|
+
|
|
25
|
+
`reactive-md/compiler/session` exports `createLocalCompileSession` for one incremental session per document and `localCompileCacheKey` for caching a source snapshot by entry, effective phase, validated options, component configuration and host policy version. `reactive-md/scan` exports `analyzeLocalSource` for read-only tokens, bindings and UTF-16 ranges. Neither graph loads React, CSS, DOM or Worker scheduling.
|
|
26
|
+
|
|
27
|
+
### Component inventory
|
|
28
|
+
|
|
29
|
+
`document.usedComponents` lists the distinct built-in, SDK and declared legacy host component names in first-use order, and the single-pass compiler also exposes it as `program.usedComponents`. Preload implementations and select CSS before rendering. Conditional branches stay represented; declarations, source fallbacks and external slot names are omitted.
|
|
30
|
+
|
|
31
|
+
### Multi-document Worker pool
|
|
32
|
+
|
|
33
|
+
`createLocalCompilePool` from `reactive-md/worker-pool` compiles revisions across documents in a bounded queue. It supports `latest` or `all` delivery, priority aging, backpressure, `release(documentId)`, warmup and idle recycling, and rejects oversized sources before they enter the queue. `hold()` pauses document dispatch, full retries and local fallback while allowing in-flight work, warmup and idle recycling to finish; `resume()` continues with the existing priorities and queue age.
|
|
34
|
+
|
|
35
|
+
### Performance reports
|
|
36
|
+
|
|
37
|
+
`createLocalPerformanceReport` summarizes compile, Worker and rendering events under schema `reactive-md-performance/v1`. It reports pool readiness, Worker spawn and warmup, component-load waits, and document and component mount, lifetime and unmount timings.
|
|
38
|
+
|
|
39
|
+
### On-demand component loading
|
|
40
|
+
|
|
41
|
+
`reactive-md/react/packed` composes selected React packs. Per-component entries under `reactive-md/presets/default/packs/react/component/*` keep unselected views out of the bundle, and `packStyleManifest` maps the selected components to their CSS resources. `createDeferredReactConfig` shares one async request per definition, aborts when its last subscriber leaves, and accepts a synchronous resolver for SSR and hydration.
|
|
42
|
+
|
|
43
|
+
## Compatibility
|
|
44
|
+
|
|
45
|
+
No syntax, SDK, theme, component or state protocol revision changes. `local-draft-3`, `component-protocol-3`, `reactive-md-theme-1`, `reactive-md-state/v1` and the SDK contract `0.7.0` remain current. Existing document source and state files need no migration. The editor pair remains `reactive-md-editor@0.2.1`, whose `^0.9.2` peer accepts this release.
|
|
@@ -4,11 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
这些目录使用包的公开入口,可以复制到仓库之外。以下命令均从当前目录开始执行。
|
|
6
6
|
|
|
7
|
-
以下多数示例面向 `reactive-md@0.6.0
|
|
7
|
+
以下多数示例面向 `reactive-md@0.6.0`。将所需的示例目录复制到仓库之外,再从 npm 安装示例固定的版本。React 和 Vite 按各示例的依赖安装。
|
|
8
8
|
|
|
9
9
|
[扩展 SDK 使用方](extension-sdk/README-ch.md)面向`reactive-md@0.8.0`,通过公开导出验证静态分享和离线交互分享。准备发布时使用本地构建的 tarball,SDK 契约仍为 `0.7.0`。其余较早的示例保留其 0.6.0 固定版本。
|
|
10
10
|
|
|
11
|
-
[流式源码](streaming)
|
|
11
|
+
用当前检出运行[流式源码](streaming)示例时,按下文打包并安装 `reactive-md-0.9.3.tgz`。示例独立使用时以 `package.json` 中固定的 `0.9.1` 为基线。
|
|
12
|
+
|
|
13
|
+
## 静态嵌入
|
|
14
|
+
|
|
15
|
+
[静态嵌入示例](static-embed)从布局 pack 中选用 card 与静态 `<if>` 分支,card 由 pack 实现直接渲染且不创建文档 runtime;`{{ visitor.name }}` 保留为文本,未知组件降级为原文。两个同名宿主槽位共用一次动态导入。性能报告在同一 revision 下汇总编译、装载和渲染事件。
|
|
16
|
+
|
|
17
|
+
在引擎仓库根目录构建包并运行服务端示例。
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run build:lib
|
|
21
|
+
node examples/integration/static-embed/render.mjs
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
要查看浏览器示例,在同一目录运行 `npx vite examples/integration/static-embed`,然后打开终端显示的地址。`node examples/integration/static-embed/render.mjs --defer` 输出浏览器水合入口所需的加载占位;服务端与客户端必须使用相同的宿主槽位策略。
|
|
25
|
+
|
|
26
|
+
组件实现也可以按需装载,而不进入初始 bundle。`reactive-md/react/packed` 的 `createDeferredReactConfig` 按组件定义共享一次 resolver 请求,最后一个订阅者离开时中止,并接受 `resolveSync` 以服务 SSR 与水合。异步 resolver 在挂载后启动,服务端输出在实现可用前保留稳定的加载占位。
|
|
12
27
|
|
|
13
28
|
## Node 核心
|
|
14
29
|
|
|
@@ -50,19 +65,36 @@ UI 和调度连接位于 [worker/main.js](worker/main.js);Worker 入口是 [wo
|
|
|
50
65
|
|
|
51
66
|
[streaming](streaming) 是流式源码编译的确定性浏览器示例。它按定时器追加固定文本片段,用 `sourcePhase: 'streaming'` 提交每个完整快照,最后用 `sourcePhase: 'final'` 提交完成后的源码。页面展示暂态状态、暂态诊断、最终诊断和编译快照摘要。取消或重新开始会使当前轮次失效;旧轮次的结果只计入丢弃数量,不会重绘页面。示例不调用模型服务、不发起网络请求,也不持有凭据。
|
|
52
67
|
|
|
53
|
-
|
|
68
|
+
在仓库根目录从当前树打包 tarball,然后在示例中安装:
|
|
54
69
|
|
|
55
70
|
```sh
|
|
56
71
|
# 在仓库根目录
|
|
57
72
|
npm pack
|
|
58
73
|
|
|
59
74
|
cd examples/integration/streaming
|
|
60
|
-
npm install ../../../reactive-md-0.9.
|
|
75
|
+
npm install ../../../reactive-md-0.9.3.tgz
|
|
61
76
|
npm run dev
|
|
62
77
|
```
|
|
63
78
|
|
|
64
79
|
如果目录已复制到仓库之外,请改用 tarball 的绝对路径安装。示例只使用 `reactive-md` 的公开入口;调度逻辑位于 [streaming/main.js](streaming/main.js),Worker 入口是 [streaming/worker.js](streaming/worker.js)。
|
|
65
80
|
|
|
81
|
+
## 聊天会话与扫描
|
|
82
|
+
|
|
83
|
+
[chat-session](chat-session) 是不依赖 DOM 的 Node 示例,只引入 `reactive-md/compiler/session` 与 `reactive-md/scan`。它为每份聊天文档保留一个增量编译会话,展示未改动源码的缓存复用、一次增量编辑以及会话销毁。宿主标记直接取自扫描结果的 UTF-16 范围。示例不引入 React、`reactive-md/authoring`、模板或目录代码。
|
|
84
|
+
|
|
85
|
+
在仓库根目录从当前树打包 tarball,然后在示例中安装:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
# 在仓库根目录
|
|
89
|
+
npm pack
|
|
90
|
+
|
|
91
|
+
cd examples/integration/chat-session
|
|
92
|
+
npm install ../../../reactive-md-0.9.3.tgz
|
|
93
|
+
npm start
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
整个示例就是 [chat-session/index.mjs](chat-session/index.mjs),同一文件可以直接放入 Worker 运行。
|
|
97
|
+
|
|
66
98
|
## 综合宿主示例
|
|
67
99
|
|
|
68
100
|
[react-comprehensive](react-comprehensive) 在一个页面中组合了面向宿主的各项新增能力:宿主提供的汇率和库存、动态 `max="{{ inventory }}"`、与内置控件共享绑定的 `host-rating` 组块、通过 `initialParameters` 和 `onParametersChange` 保存与恢复公开参数,以及通过 `onSourceNavigate` 从预览导航到源码。
|
|
@@ -4,11 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
These directories use the package's public entry points and can be copied outside the repository. The commands below start from the current directory.
|
|
6
6
|
|
|
7
|
-
Most examples below target `reactive-md@0.6.0
|
|
7
|
+
Most examples below target `reactive-md@0.6.0`. Copy the desired example directory outside the repository, then install its pinned version from npm. React and Vite are installed from the example's own dependencies where needed.
|
|
8
8
|
|
|
9
9
|
The [extension SDK consumer](extension-sdk/README.md) targets `reactive-md@0.8.0` and verifies static and offline interactive sharing through public exports. Release preparation uses a locally built tarball; the SDK contract remains at `0.7.0`. The other older examples retain their 0.6.0 pins.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
To run the [streaming source](streaming) example against the current checkout, install the `reactive-md-0.9.3.tgz` built below. The example's standalone manifest pins `0.9.1` as its baseline.
|
|
12
|
+
|
|
13
|
+
## Static embed
|
|
14
|
+
|
|
15
|
+
The [static embed](static-embed) imports `card` and `if` through their individual layout pack entries and loads their shared layout stylesheet. It renders without a document runtime, keeps `{{ visitor.name }}` as text and shows a fallback for an unknown component. Two identical host slots share one dynamic import. The performance report groups compilation, loading and rendering under one revision.
|
|
16
|
+
|
|
17
|
+
From the engine repository root, build the package and render the server example:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run build:lib
|
|
21
|
+
node examples/integration/static-embed/render.mjs
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For the browser example, start `npx vite examples/integration/static-embed` from the same directory and open the printed URL. `node examples/integration/static-embed/render.mjs --defer` emits the loading placeholder that the browser hydration entry expects; use the same external-slot strategy on both sides.
|
|
25
|
+
|
|
26
|
+
Component implementations can also load on demand instead of entering the initial bundle. `createDeferredReactConfig` from `reactive-md/react/packed` shares one resolver request per component definition, aborts when its last subscriber leaves, and accepts `resolveSync` for SSR and hydration. The async resolver starts after mount, so server output keeps a stable loading placeholder until the implementation is available.
|
|
12
27
|
|
|
13
28
|
## Node core
|
|
14
29
|
|
|
@@ -50,19 +65,36 @@ The UI and scheduler wiring live in [worker/main.js](worker/main.js); the Worker
|
|
|
50
65
|
|
|
51
66
|
[streaming](streaming) is a deterministic browser example for streaming-source compilation. It appends fixed text chunks on a timer, submits each complete snapshot with `sourcePhase: 'streaming'`, then submits the completed source with `sourcePhase: 'final'`. The page shows the provisional status, transient diagnostics, final diagnostics and a compiled snapshot summary. Cancel or restart invalidates the current run; results from an older run are counted and discarded instead of repainting the page. It uses no model service, network request or credential.
|
|
52
67
|
|
|
53
|
-
Build a tarball in the repository root, then install it in the example:
|
|
68
|
+
Build a tarball from the current tree in the repository root, then install it in the example:
|
|
54
69
|
|
|
55
70
|
```sh
|
|
56
71
|
# in the repository root
|
|
57
72
|
npm pack
|
|
58
73
|
|
|
59
74
|
cd examples/integration/streaming
|
|
60
|
-
npm install ../../../reactive-md-0.9.
|
|
75
|
+
npm install ../../../reactive-md-0.9.3.tgz
|
|
61
76
|
npm run dev
|
|
62
77
|
```
|
|
63
78
|
|
|
64
79
|
If the directory was copied outside the repository, pass the tarball's absolute path to `npm install` instead. The example uses only `reactive-md` public entries; scheduling lives in [streaming/main.js](streaming/main.js) and the Worker entry is [streaming/worker.js](streaming/worker.js).
|
|
65
80
|
|
|
81
|
+
## Chat session and scan
|
|
82
|
+
|
|
83
|
+
[chat-session](chat-session) is a DOM-free Node example that imports only `reactive-md/compiler/session` and `reactive-md/scan`. It keeps one incremental compile session per chat document, shows a cached recompile for unchanged source, an incremental edit, and disposes the session. Host markers come from the scan result's UTF-16 ranges. It imports no React, `reactive-md/authoring`, template or catalog code.
|
|
84
|
+
|
|
85
|
+
Build a tarball from the current tree in the repository root, then install it in the example:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
# in the repository root
|
|
89
|
+
npm pack
|
|
90
|
+
|
|
91
|
+
cd examples/integration/chat-session
|
|
92
|
+
npm install ../../../reactive-md-0.9.3.tgz
|
|
93
|
+
npm start
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The whole example is [chat-session/index.mjs](chat-session/index.mjs); the same file can run inside a Worker.
|
|
97
|
+
|
|
66
98
|
## Comprehensive host example
|
|
67
99
|
|
|
68
100
|
[react-comprehensive](react-comprehensive) combines the host-facing additions in one page: a host-provided exchange rate and inventory, dynamic `max="{{ inventory }}"`, a `host-rating` component that shares its binding with built-in controls, saved and restored public parameters through `initialParameters` and `onParametersChange`, and preview-to-source navigation through `onSourceNavigate`.
|