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
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { f as e } from "./limits-CFERRrlC.js";
|
|
2
|
+
import { v as t } from "./document-theme-DBAfnk7y.js";
|
|
3
|
+
import { t as n } from "./types-daDo2c_w.js";
|
|
4
|
+
import { A as r, O as i, P as a } from "./preset-core-BW3NWZJ9.js";
|
|
5
|
+
import { h as o, l as s, m as c } from "./version-B0G1699c.js";
|
|
6
|
+
import { f as l, l as u, u as d } from "./config-validation-Cpol91_M.js";
|
|
7
|
+
import { a as f, n as p } from "./dist-Cueh1Psp.js";
|
|
8
|
+
import { i as m, s as h } from "./default-config-DIrRpuQz.js";
|
|
9
|
+
import { r as g } from "./default-options-DU5dxuU6.js";
|
|
10
|
+
import { u as _ } from "./component-state-CwKX_SN5.js";
|
|
11
|
+
import { n as v } from "./runtime-CuJndKqK.js";
|
|
12
|
+
import { a as ee, i as y } from "./identity-BUx0Q_-d.js";
|
|
13
|
+
import { r as te } from "./requirements-DhIkxAbl.js";
|
|
14
|
+
import { t as b } from "./resources-B_nbROgj.js";
|
|
10
15
|
// src/local/runtime/state.ts
|
|
11
|
-
var
|
|
16
|
+
var x = "reactive-md-state/v1", S = 1048576, C = /^fnv1a32:[0-9a-f]{8}$/, w = /* @__PURE__ */ new Set([
|
|
12
17
|
"format",
|
|
13
18
|
"syntax",
|
|
14
19
|
"sourceDigest",
|
|
15
20
|
"parameters",
|
|
16
21
|
"generator"
|
|
17
|
-
]),
|
|
18
|
-
function
|
|
22
|
+
]), ne = /* @__PURE__ */ new Set(["name", "version"]), re = new TextEncoder();
|
|
23
|
+
function T(n, r) {
|
|
19
24
|
return {
|
|
20
|
-
code:
|
|
21
|
-
message:
|
|
25
|
+
code: n,
|
|
26
|
+
message: r.length > 2e3 ? `${t(r, e - 1)}…` : r,
|
|
22
27
|
severity: "error",
|
|
23
28
|
range: {
|
|
24
29
|
start: 0,
|
|
@@ -28,13 +33,13 @@ function w(e, t) {
|
|
|
28
33
|
column: 1
|
|
29
34
|
};
|
|
30
35
|
}
|
|
31
|
-
function
|
|
32
|
-
e.length < 100 && e.push(
|
|
36
|
+
function E(e, t, n) {
|
|
37
|
+
e.length < 100 && e.push(T(t, n));
|
|
33
38
|
}
|
|
34
|
-
function
|
|
39
|
+
function D(e) {
|
|
35
40
|
return e instanceof Error ? e.message : String(e);
|
|
36
41
|
}
|
|
37
|
-
function
|
|
42
|
+
function O(e) {
|
|
38
43
|
for (let t = 0; t < e.length; t += 1) {
|
|
39
44
|
let n = e.charCodeAt(t);
|
|
40
45
|
if (n >= 55296 && n <= 56319) {
|
|
@@ -49,8 +54,8 @@ function D(e) {
|
|
|
49
54
|
}
|
|
50
55
|
return !0;
|
|
51
56
|
}
|
|
52
|
-
function
|
|
53
|
-
if (typeof e == "string") return
|
|
57
|
+
function k(e) {
|
|
58
|
+
if (typeof e == "string") return O(e) ? {
|
|
54
59
|
ok: !0,
|
|
55
60
|
value: e
|
|
56
61
|
} : {
|
|
@@ -73,7 +78,7 @@ function O(e) {
|
|
|
73
78
|
for (let r = 0; r < e.length; r += 1) {
|
|
74
79
|
let i = e[r];
|
|
75
80
|
if (n === "string" && typeof i == "string") {
|
|
76
|
-
if (!
|
|
81
|
+
if (!O(i)) return {
|
|
77
82
|
ok: !1,
|
|
78
83
|
message: "contains malformed Unicode."
|
|
79
84
|
};
|
|
@@ -94,30 +99,30 @@ function O(e) {
|
|
|
94
99
|
message: "must be a string, finite number, boolean, null or homogeneous primitive array."
|
|
95
100
|
};
|
|
96
101
|
}
|
|
97
|
-
function
|
|
102
|
+
function A(e) {
|
|
98
103
|
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
99
104
|
let t = Object.getPrototypeOf(e);
|
|
100
105
|
return t === Object.prototype || t === null;
|
|
101
106
|
}
|
|
102
|
-
function
|
|
107
|
+
function j(e) {
|
|
103
108
|
return Object.freeze(e.parameters), e.generator && Object.freeze(e.generator), Object.freeze(e);
|
|
104
109
|
}
|
|
105
|
-
function
|
|
110
|
+
function M(e) {
|
|
106
111
|
if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("generator must be an object with string name and version.");
|
|
107
112
|
if (typeof e.name != "string" || typeof e.version != "string") throw TypeError("generator must have string name and version.");
|
|
108
|
-
if (!
|
|
113
|
+
if (!O(e.name) || !O(e.version)) throw TypeError("generator name and version must be well-formed Unicode strings.");
|
|
109
114
|
return Object.freeze({
|
|
110
115
|
name: e.name,
|
|
111
116
|
version: e.version
|
|
112
117
|
});
|
|
113
118
|
}
|
|
114
|
-
function
|
|
115
|
-
return typeof e == "string" ? `"${e.length > 48 ? `${
|
|
119
|
+
function N(e) {
|
|
120
|
+
return typeof e == "string" ? `"${e.length > 48 ? `${t(e, 48)}…` : e}"` : e === null ? "null" : Array.isArray(e) ? "an array" : typeof e;
|
|
116
121
|
}
|
|
117
|
-
function
|
|
118
|
-
return e.length > t ? e.length :
|
|
122
|
+
function P(e, t) {
|
|
123
|
+
return e.length > t ? e.length : re.encode(e).byteLength;
|
|
119
124
|
}
|
|
120
|
-
function
|
|
125
|
+
function ie(e, t) {
|
|
121
126
|
let n;
|
|
122
127
|
try {
|
|
123
128
|
let t = JSON.stringify(e);
|
|
@@ -126,146 +131,146 @@ function ae(e, t) {
|
|
|
126
131
|
} catch {
|
|
127
132
|
return null;
|
|
128
133
|
}
|
|
129
|
-
return
|
|
134
|
+
return P(n, t);
|
|
130
135
|
}
|
|
131
|
-
function
|
|
132
|
-
if (e === void 0) return
|
|
136
|
+
function ae(e) {
|
|
137
|
+
if (e === void 0) return S;
|
|
133
138
|
if (typeof e != "object" || !e) throw TypeError("parseLocalState options must be an object.");
|
|
134
139
|
let { maxLength: t } = e;
|
|
135
|
-
if (t === void 0) return
|
|
140
|
+
if (t === void 0) return S;
|
|
136
141
|
if (typeof t != "number" || !Number.isSafeInteger(t) || t <= 0) throw RangeError("maxLength must be a finite positive integer.");
|
|
137
142
|
return t;
|
|
138
143
|
}
|
|
139
|
-
function
|
|
144
|
+
function F(e, t, r) {
|
|
140
145
|
if (!e || e.syntax !== "local" || typeof e.source != "string") throw TypeError("createLocalStateFile requires a compiled local document.");
|
|
141
146
|
if (!t || typeof t != "object" || Array.isArray(t)) throw TypeError("createLocalStateFile requires a state object.");
|
|
142
|
-
let
|
|
147
|
+
let i = Object.keys(e.bindings).filter((e) => !e.startsWith("@")).sort(), a = new Set(i), o = /* @__PURE__ */ new Map();
|
|
143
148
|
for (let n of Object.keys(t)) {
|
|
144
149
|
if (Object.hasOwn(e.computations ?? {}, n)) continue;
|
|
145
150
|
if (n.startsWith("@")) {
|
|
146
151
|
if (!Object.hasOwn(e.bindings, n)) throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);
|
|
147
152
|
continue;
|
|
148
153
|
}
|
|
149
|
-
if (!
|
|
150
|
-
let r =
|
|
154
|
+
if (!a.has(n)) throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);
|
|
155
|
+
let r = k(t[n]);
|
|
151
156
|
if (!r.ok) throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);
|
|
152
|
-
|
|
157
|
+
o.set(n, r.value);
|
|
153
158
|
}
|
|
154
|
-
let
|
|
155
|
-
for (let e of
|
|
156
|
-
if (!
|
|
157
|
-
|
|
159
|
+
let s = {};
|
|
160
|
+
for (let e of i) {
|
|
161
|
+
if (!o.has(e)) throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);
|
|
162
|
+
s[e] = o.get(e);
|
|
158
163
|
}
|
|
159
|
-
let
|
|
160
|
-
format:
|
|
161
|
-
syntax:
|
|
162
|
-
sourceDigest:
|
|
163
|
-
parameters:
|
|
164
|
+
let c = {
|
|
165
|
+
format: x,
|
|
166
|
+
syntax: n,
|
|
167
|
+
sourceDigest: y(e.source),
|
|
168
|
+
parameters: s
|
|
164
169
|
};
|
|
165
|
-
return
|
|
170
|
+
return r !== void 0 && (c.generator = M(r)), j(c);
|
|
166
171
|
}
|
|
167
|
-
function
|
|
168
|
-
let
|
|
172
|
+
function oe(e, t) {
|
|
173
|
+
let r = [], i = (e, t) => E(r, e, t), a = e;
|
|
169
174
|
if (typeof e == "string") {
|
|
170
|
-
if (
|
|
175
|
+
if (P(e, t) > t) return {
|
|
171
176
|
ok: !1,
|
|
172
|
-
diagnostics: [
|
|
177
|
+
diagnostics: [T("local.state.size", `The state payload exceeds the ${t}-byte limit.`)]
|
|
173
178
|
};
|
|
174
|
-
if (!
|
|
179
|
+
if (!O(e)) return {
|
|
175
180
|
ok: !1,
|
|
176
|
-
diagnostics: [
|
|
181
|
+
diagnostics: [T("local.state.utf", "The state payload contains malformed Unicode.")]
|
|
177
182
|
};
|
|
178
183
|
try {
|
|
179
|
-
|
|
184
|
+
a = JSON.parse(e);
|
|
180
185
|
} catch (e) {
|
|
181
186
|
return {
|
|
182
187
|
ok: !1,
|
|
183
|
-
diagnostics: [
|
|
188
|
+
diagnostics: [T("local.state.json", `The state payload is not valid JSON: ${D(e)}`)]
|
|
184
189
|
};
|
|
185
190
|
}
|
|
186
191
|
} else {
|
|
187
|
-
let n =
|
|
192
|
+
let n = ie(e, t);
|
|
188
193
|
if (n === null) return {
|
|
189
194
|
ok: !1,
|
|
190
|
-
diagnostics: [
|
|
195
|
+
diagnostics: [T("local.state.shape", "The state payload must be a JSON object.")]
|
|
191
196
|
};
|
|
192
197
|
if (n > t) return {
|
|
193
198
|
ok: !1,
|
|
194
|
-
diagnostics: [
|
|
199
|
+
diagnostics: [T("local.state.size", `The state payload exceeds the ${t}-byte limit.`)]
|
|
195
200
|
};
|
|
196
201
|
}
|
|
197
|
-
if (!
|
|
202
|
+
if (!A(a)) return {
|
|
198
203
|
ok: !1,
|
|
199
|
-
diagnostics: [
|
|
204
|
+
diagnostics: [T("local.state.shape", "The state payload must be a JSON object.")]
|
|
200
205
|
};
|
|
201
|
-
Object.getOwnPropertySymbols(
|
|
202
|
-
for (let e of Object.keys(
|
|
203
|
-
let
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
let
|
|
208
|
-
typeof
|
|
209
|
-
let
|
|
210
|
-
if (!
|
|
211
|
-
else for (let e of Object.keys(
|
|
206
|
+
Object.getOwnPropertySymbols(a).length > 0 && i("local.state.shape", "The state payload cannot use symbol keys.");
|
|
207
|
+
for (let e of Object.keys(a)) w.has(e) || i("local.state.key", `Unknown top-level state key "${e}".`);
|
|
208
|
+
let o = a.format;
|
|
209
|
+
o !== "reactive-md-state/v1" && i("local.state.format", `Unsupported state format ${N(o)}; expected "${x}".`);
|
|
210
|
+
let s = a.syntax;
|
|
211
|
+
s !== "local-draft-3" && i("local.state.syntax", `Unsupported state syntax ${N(s)}; expected "${n}".`);
|
|
212
|
+
let c = a.sourceDigest;
|
|
213
|
+
typeof c == "string" && C.test(c) || i("local.state.digest", "sourceDigest must match \"fnv1a32:\" followed by 8 lowercase hexadecimal digits.");
|
|
214
|
+
let l = {}, u = a.parameters;
|
|
215
|
+
if (!A(u)) i("local.state.parameters", "parameters must be a JSON object of public binding values.");
|
|
216
|
+
else for (let e of Object.keys(u).sort()) {
|
|
212
217
|
if (e === "__proto__") {
|
|
213
|
-
|
|
218
|
+
i("local.state.parameter.prototype", "Parameter names cannot be \"__proto__\".");
|
|
214
219
|
continue;
|
|
215
220
|
}
|
|
216
221
|
if (e.startsWith("@")) {
|
|
217
|
-
|
|
222
|
+
i("local.state.parameter.internal", `Internal parameter "${e}" cannot be persisted.`);
|
|
218
223
|
continue;
|
|
219
224
|
}
|
|
220
|
-
let t =
|
|
221
|
-
t.ok ?
|
|
225
|
+
let t = k(u[e]);
|
|
226
|
+
t.ok ? l[e] = t.value : i("local.state.parameter.value", `Parameter "${e}" ${t.message}`);
|
|
222
227
|
}
|
|
223
|
-
let
|
|
224
|
-
if (Object.hasOwn(
|
|
225
|
-
let e =
|
|
226
|
-
if (!
|
|
228
|
+
let d;
|
|
229
|
+
if (Object.hasOwn(a, "generator")) {
|
|
230
|
+
let e = a.generator;
|
|
231
|
+
if (!A(e)) i("local.state.generator", "generator must be an object with string name and version.");
|
|
227
232
|
else {
|
|
228
|
-
for (let t of Object.keys(e))
|
|
229
|
-
typeof e.name != "string" || typeof e.version != "string" ?
|
|
233
|
+
for (let t of Object.keys(e)) ne.has(t) || i("local.state.generator", `generator has unknown key "${t}".`);
|
|
234
|
+
typeof e.name != "string" || typeof e.version != "string" ? i("local.state.generator", "generator must have string name and version.") : !O(e.name) || !O(e.version) ? i("local.state.utf", "generator contains malformed Unicode.") : d = Object.freeze({
|
|
230
235
|
name: e.name,
|
|
231
236
|
version: e.version
|
|
232
237
|
});
|
|
233
238
|
}
|
|
234
239
|
}
|
|
235
|
-
if (
|
|
240
|
+
if (r.length) return {
|
|
236
241
|
ok: !1,
|
|
237
|
-
diagnostics:
|
|
242
|
+
diagnostics: r
|
|
238
243
|
};
|
|
239
244
|
let f = {
|
|
240
|
-
format:
|
|
241
|
-
syntax:
|
|
242
|
-
sourceDigest:
|
|
243
|
-
parameters:
|
|
245
|
+
format: x,
|
|
246
|
+
syntax: n,
|
|
247
|
+
sourceDigest: c,
|
|
248
|
+
parameters: l
|
|
244
249
|
};
|
|
245
|
-
return
|
|
250
|
+
return d && (f.generator = d), {
|
|
246
251
|
ok: !0,
|
|
247
|
-
file:
|
|
252
|
+
file: j(f)
|
|
248
253
|
};
|
|
249
254
|
}
|
|
250
|
-
function
|
|
251
|
-
let n =
|
|
255
|
+
function I(e, t) {
|
|
256
|
+
let n = ae(t);
|
|
252
257
|
try {
|
|
253
|
-
return
|
|
258
|
+
return oe(e, n);
|
|
254
259
|
} catch (e) {
|
|
255
260
|
return {
|
|
256
261
|
ok: !1,
|
|
257
|
-
diagnostics: [
|
|
262
|
+
diagnostics: [T("local.state.invalid", `Cannot read the local state: ${D(e)}`)]
|
|
258
263
|
};
|
|
259
264
|
}
|
|
260
265
|
}
|
|
261
|
-
function
|
|
266
|
+
function se(e) {
|
|
262
267
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
263
268
|
for (let r of e) t.set(r.id, r), r.children && n(r.children);
|
|
264
269
|
};
|
|
265
270
|
return n(e.nodes), t;
|
|
266
271
|
}
|
|
267
|
-
function
|
|
268
|
-
let t =
|
|
272
|
+
function ce(e) {
|
|
273
|
+
let t = se(e), n = /* @__PURE__ */ new Map(), r = [];
|
|
269
274
|
for (let [i, a] of Object.entries(e.bindingSlots ?? {})) {
|
|
270
275
|
let e = t.get(i);
|
|
271
276
|
if (!e) continue;
|
|
@@ -309,7 +314,7 @@ function I(e) {
|
|
|
309
314
|
}
|
|
310
315
|
function L(e, t, n) {
|
|
311
316
|
let r = [], i = Object.create(null);
|
|
312
|
-
for (let a of t.plans) a.slot === void 0 && Object.hasOwn(n, a.key) && (a.node ? Object.is(e.get(a.node), n[a.key]) || (i[a.key] = n[a.key]) : r.push(
|
|
317
|
+
for (let a of t.plans) a.slot === void 0 && Object.hasOwn(n, a.key) && (a.node ? Object.is(e.get(a.node), n[a.key]) || (i[a.key] = n[a.key]) : r.push(T("local.state.document", `The document has no component for parameter "${a.key}".`)));
|
|
313
318
|
if (r.length) return r;
|
|
314
319
|
r.push(...e.setParameters(i));
|
|
315
320
|
for (let i of t.groups) {
|
|
@@ -327,58 +332,58 @@ function le(e, t) {
|
|
|
327
332
|
}
|
|
328
333
|
return Object.freeze(r);
|
|
329
334
|
}
|
|
330
|
-
function R(e, t,
|
|
331
|
-
let
|
|
332
|
-
if (!
|
|
335
|
+
function R(e, t, r, i) {
|
|
336
|
+
let a = I(t, i);
|
|
337
|
+
if (!a.ok) return a;
|
|
333
338
|
if (!e || e.syntax !== "local" || typeof e.source != "string" || !Array.isArray(e.nodes) || !e.bindings) return {
|
|
334
339
|
ok: !1,
|
|
335
|
-
diagnostics: [
|
|
340
|
+
diagnostics: [T("local.state.document", "resolveLocalState requires a compiled local document.")]
|
|
336
341
|
};
|
|
337
|
-
if (
|
|
342
|
+
if (a.file.syntax !== "local-draft-3") return {
|
|
338
343
|
ok: !1,
|
|
339
|
-
diagnostics: [
|
|
344
|
+
diagnostics: [T("local.state.syntax", `This state file uses syntax "${a.file.syntax}", but this build accepts "${n}".`)]
|
|
340
345
|
};
|
|
341
|
-
if (
|
|
346
|
+
if (a.file.sourceDigest !== y(e.source)) return {
|
|
342
347
|
ok: !1,
|
|
343
|
-
diagnostics: [
|
|
348
|
+
diagnostics: [T("local.state.source", "This state file was created for a different document (source digest mismatch).")]
|
|
344
349
|
};
|
|
345
|
-
let
|
|
346
|
-
for (let e of Object.keys(
|
|
347
|
-
for (let e of
|
|
348
|
-
if (
|
|
350
|
+
let o = ce(e), s = new Set(o.plans.map((e) => e.key)), c = [];
|
|
351
|
+
for (let e of Object.keys(a.file.parameters)) s.has(e) || E(c, "local.state.parameter.unknown", `The state contains unknown parameter "${e}" for this document.`);
|
|
352
|
+
for (let e of s) Object.hasOwn(a.file.parameters, e) || E(c, "local.state.parameter.missing", `The state is missing parameter "${e}".`);
|
|
353
|
+
if (c.length) return {
|
|
349
354
|
ok: !1,
|
|
350
|
-
diagnostics:
|
|
355
|
+
diagnostics: c
|
|
351
356
|
};
|
|
352
|
-
let
|
|
357
|
+
let l;
|
|
353
358
|
try {
|
|
354
|
-
|
|
359
|
+
l = v(e);
|
|
355
360
|
} catch (e) {
|
|
356
361
|
return {
|
|
357
362
|
ok: !1,
|
|
358
|
-
diagnostics: [
|
|
363
|
+
diagnostics: [T("local.state.document", `Cannot validate this document: ${D(e)}`)]
|
|
359
364
|
};
|
|
360
365
|
}
|
|
361
366
|
try {
|
|
362
|
-
if (
|
|
363
|
-
let e = L(
|
|
367
|
+
if (r) {
|
|
368
|
+
let e = L(l, o, r);
|
|
364
369
|
if (e.length) return {
|
|
365
370
|
ok: !1,
|
|
366
371
|
diagnostics: e
|
|
367
372
|
};
|
|
368
373
|
}
|
|
369
|
-
let e = L(
|
|
374
|
+
let e = L(l, o, a.file.parameters);
|
|
370
375
|
if (e.length) return {
|
|
371
376
|
ok: !1,
|
|
372
377
|
diagnostics: e
|
|
373
378
|
};
|
|
374
|
-
let t = [...
|
|
379
|
+
let t = [...s].sort();
|
|
375
380
|
return {
|
|
376
381
|
ok: !0,
|
|
377
|
-
file:
|
|
378
|
-
state: le(
|
|
382
|
+
file: a.file,
|
|
383
|
+
state: le(l, t)
|
|
379
384
|
};
|
|
380
385
|
} finally {
|
|
381
|
-
|
|
386
|
+
l.dispose();
|
|
382
387
|
}
|
|
383
388
|
}
|
|
384
389
|
function z(e, t, n) {
|
|
@@ -387,7 +392,7 @@ function z(e, t, n) {
|
|
|
387
392
|
} catch (e) {
|
|
388
393
|
return {
|
|
389
394
|
ok: !1,
|
|
390
|
-
diagnostics: [
|
|
395
|
+
diagnostics: [T("local.state.invalid", `Cannot resolve the local state: ${D(e)}`)]
|
|
391
396
|
};
|
|
392
397
|
}
|
|
393
398
|
}
|
|
@@ -396,21 +401,21 @@ function B(e, t, n) {
|
|
|
396
401
|
try {
|
|
397
402
|
r = R(e.document, t, e.snapshot().state, n);
|
|
398
403
|
} catch (e) {
|
|
399
|
-
return [
|
|
404
|
+
return [T("local.state.invalid", `Cannot apply the local state: ${D(e)}`)];
|
|
400
405
|
}
|
|
401
406
|
if (!r.ok) return r.diagnostics;
|
|
402
|
-
let i =
|
|
407
|
+
let i = ce(e.document);
|
|
403
408
|
try {
|
|
404
409
|
return L(e, i, r.state);
|
|
405
410
|
} catch (e) {
|
|
406
|
-
return [
|
|
411
|
+
return [T("local.state.invalid", `Cannot apply the local state: ${D(e)}`)];
|
|
407
412
|
}
|
|
408
413
|
}
|
|
409
414
|
function ue(e, t) {
|
|
410
|
-
return
|
|
415
|
+
return F(e.document, e.getParameters(), t);
|
|
411
416
|
}
|
|
412
417
|
function de(e, t, n) {
|
|
413
|
-
let r =
|
|
418
|
+
let r = I(t, n);
|
|
414
419
|
return r.ok ? B(e, r.file, n) : r.diagnostics;
|
|
415
420
|
}
|
|
416
421
|
function fe(e) {
|
|
@@ -419,7 +424,7 @@ function fe(e) {
|
|
|
419
424
|
let t = Object.create(null);
|
|
420
425
|
for (let n of Object.keys(e.parameters).sort()) {
|
|
421
426
|
if (n === "__proto__" || n.startsWith("@")) throw TypeError(`Cannot serialize parameter "${n}".`);
|
|
422
|
-
let r =
|
|
427
|
+
let r = k(e.parameters[n]);
|
|
423
428
|
if (!r.ok) throw TypeError(`Cannot serialize parameter "${n}": the value ${r.message}`);
|
|
424
429
|
t[n] = r.value;
|
|
425
430
|
}
|
|
@@ -430,7 +435,7 @@ function fe(e) {
|
|
|
430
435
|
parameters: t
|
|
431
436
|
};
|
|
432
437
|
if (e.generator !== void 0) {
|
|
433
|
-
let t =
|
|
438
|
+
let t = M(e.generator);
|
|
434
439
|
n.generator = {
|
|
435
440
|
name: t.name,
|
|
436
441
|
version: t.version
|
|
@@ -453,14 +458,15 @@ function V(e) {
|
|
|
453
458
|
...e.limits === void 0 ? {} : { limits: {
|
|
454
459
|
...e.limits.maxSyntaxNodes === void 0 ? {} : { maxSyntaxNodes: t.maxSyntaxNodes },
|
|
455
460
|
...e.limits.maxParseWork === void 0 ? {} : { maxParseWork: t.maxParseWork },
|
|
456
|
-
...e.limits.maxMarkdownDepth === void 0 ? {} : { maxMarkdownDepth: t.maxMarkdownDepth }
|
|
461
|
+
...e.limits.maxMarkdownDepth === void 0 ? {} : { maxMarkdownDepth: t.maxMarkdownDepth },
|
|
462
|
+
...e.limits.maxRawBodyChars === void 0 ? {} : { maxRawBodyChars: t.maxRawBodyChars }
|
|
457
463
|
} }
|
|
458
464
|
};
|
|
459
465
|
}
|
|
460
466
|
// src/export/restoration.ts
|
|
461
|
-
var pe =
|
|
467
|
+
var pe = a;
|
|
462
468
|
function H(e) {
|
|
463
|
-
return
|
|
469
|
+
return a(JSON.stringify([
|
|
464
470
|
e.id,
|
|
465
471
|
e.name,
|
|
466
472
|
e.version,
|
|
@@ -469,16 +475,16 @@ function H(e) {
|
|
|
469
475
|
e.css.map(({ id: e, css: t }) => [e, t])
|
|
470
476
|
]));
|
|
471
477
|
}
|
|
472
|
-
function me(e,
|
|
473
|
-
let
|
|
478
|
+
function me(e, t) {
|
|
479
|
+
let n = h(t), r = u(n);
|
|
474
480
|
return Object.freeze({
|
|
475
481
|
protocol: "reactive-md-bundle/v1",
|
|
476
|
-
sdkVersion:
|
|
477
|
-
configKey:
|
|
478
|
-
scriptDigest:
|
|
479
|
-
assembly:
|
|
480
|
-
seal:
|
|
481
|
-
themes: Object.freeze(
|
|
482
|
+
sdkVersion: s,
|
|
483
|
+
configKey: n.key,
|
|
484
|
+
scriptDigest: a(e),
|
|
485
|
+
assembly: r,
|
|
486
|
+
seal: d(n),
|
|
487
|
+
themes: Object.freeze(n.themes.map((e) => Object.freeze({
|
|
482
488
|
id: e.id,
|
|
483
489
|
name: e.name,
|
|
484
490
|
version: e.version,
|
|
@@ -486,19 +492,19 @@ function me(e, n) {
|
|
|
486
492
|
})))
|
|
487
493
|
});
|
|
488
494
|
}
|
|
489
|
-
function U(e,
|
|
490
|
-
let
|
|
491
|
-
for (;
|
|
492
|
-
let e =
|
|
493
|
-
(e.type === "component" || e.type === "hostComponent") && e.name && c.add(e.name), e.children &&
|
|
495
|
+
function U(e, t, n, r = []) {
|
|
496
|
+
let o = h(t), c = /* @__PURE__ */ new Set(), l = [...e.nodes];
|
|
497
|
+
for (; l.length;) {
|
|
498
|
+
let e = l.pop();
|
|
499
|
+
(e.type === "component" || e.type === "hostComponent") && e.name && c.add(e.name), e.children && l.push(...e.children);
|
|
494
500
|
}
|
|
495
|
-
let d =
|
|
501
|
+
let d = o.registry.filter((e) => c.has(e.name)).map((e) => Object.freeze({
|
|
496
502
|
id: e.id,
|
|
497
503
|
name: e.name,
|
|
498
504
|
version: e.version,
|
|
499
505
|
range: e.version,
|
|
500
|
-
digest:
|
|
501
|
-
})).sort((e, t) => e.id.localeCompare(t.id)), f =
|
|
506
|
+
digest: i(e)
|
|
507
|
+
})).sort((e, t) => e.id.localeCompare(t.id)), f = o.themes.filter((t) => t.name === e.theme).map((e) => Object.freeze({
|
|
502
508
|
id: e.id,
|
|
503
509
|
name: e.name,
|
|
504
510
|
version: e.version,
|
|
@@ -506,16 +512,16 @@ function U(e, n, i, o = []) {
|
|
|
506
512
|
}));
|
|
507
513
|
return Object.freeze({
|
|
508
514
|
protocol: "reactive-md-restore/v1",
|
|
509
|
-
sdk: `^${
|
|
510
|
-
configKey:
|
|
511
|
-
sourceDigest:
|
|
512
|
-
target:
|
|
515
|
+
sdk: `^${s}`,
|
|
516
|
+
configKey: o.key,
|
|
517
|
+
sourceDigest: a(e.source),
|
|
518
|
+
target: n,
|
|
513
519
|
components: Object.freeze(d),
|
|
514
520
|
themes: Object.freeze(f),
|
|
515
|
-
assembly:
|
|
516
|
-
resources: Object.freeze(
|
|
521
|
+
assembly: u(o),
|
|
522
|
+
resources: Object.freeze(r.map((e) => Object.freeze({
|
|
517
523
|
id: e.id,
|
|
518
|
-
digest:
|
|
524
|
+
digest: a(e.css)
|
|
519
525
|
})))
|
|
520
526
|
});
|
|
521
527
|
}
|
|
@@ -525,9 +531,9 @@ function W(e) {
|
|
|
525
531
|
function G(e) {
|
|
526
532
|
return typeof e == "string" && e.length > 0 && e.length <= 256;
|
|
527
533
|
}
|
|
528
|
-
function K(
|
|
529
|
-
if (
|
|
530
|
-
let
|
|
534
|
+
function K(e, t) {
|
|
535
|
+
if (e === void 0) return [];
|
|
536
|
+
let n = [], u = (e, t) => n.push({
|
|
531
537
|
code: `local.extension.restore-${e}`,
|
|
532
538
|
message: t,
|
|
533
539
|
severity: "error",
|
|
@@ -539,11 +545,11 @@ function K(o, s) {
|
|
|
539
545
|
column: 1
|
|
540
546
|
});
|
|
541
547
|
try {
|
|
542
|
-
if (!W(
|
|
548
|
+
if (!W(e) || r(e) > 262144 || e.protocol !== "reactive-md-restore/v1" || !G(e.sdk) || !G(e.configKey) || !G(e.sourceDigest) || ![
|
|
543
549
|
"static",
|
|
544
550
|
"ssr",
|
|
545
551
|
"offline"
|
|
546
|
-
].includes(
|
|
552
|
+
].includes(e.target) || !Array.isArray(e.components) || e.components.length > 192 || !Array.isArray(e.themes) || e.themes.length > 16 || !Array.isArray(e.resources) || e.resources.length > 128) return u("metadata", "Invalid or oversized restoration requirements."), n;
|
|
547
553
|
let d = /* @__PURE__ */ new Set([
|
|
548
554
|
"protocol",
|
|
549
555
|
"sdk",
|
|
@@ -555,80 +561,80 @@ function K(o, s) {
|
|
|
555
561
|
"resources",
|
|
556
562
|
"assembly"
|
|
557
563
|
]);
|
|
558
|
-
Object.keys(
|
|
559
|
-
let f =
|
|
560
|
-
|
|
564
|
+
Object.keys(e).some((e) => !d.has(e)) && u("metadata", "Unknown restoration requirement field.");
|
|
565
|
+
let f = t.config === void 0 ? m() : h(t.config);
|
|
566
|
+
o(e.sdk) && c("0.7.0", e.sdk) || u("sdk", `SDK ${s} does not satisfy ${e.sdk}.`), l(f, e.configKey) || u("config", "The installed configuration differs from the exported configuration."), e.assembly !== void 0 && (W(e.assembly) && e.assembly.protocol === "reactive-md-assembly-seal/v1" && G(e.assembly.configKey) && l(f, e.assembly.configKey) || u("assembly", "The exported assembly identity is invalid or belongs to another configuration.")), a(t.source) !== e.sourceDigest && u("source", "The source differs from the exported source. Recompile before restoring state.");
|
|
561
567
|
let p = /* @__PURE__ */ new Set();
|
|
562
|
-
for (let
|
|
563
|
-
if (!W(
|
|
568
|
+
for (let t of e.components) {
|
|
569
|
+
if (!W(t) || ![
|
|
564
570
|
"id",
|
|
565
571
|
"name",
|
|
566
572
|
"version",
|
|
567
573
|
"range",
|
|
568
574
|
"digest"
|
|
569
|
-
].every((
|
|
575
|
+
].every((e) => G(t[e])) || !o(t.range) || p.has(t.id)) {
|
|
570
576
|
u("metadata", "Invalid or duplicate component restoration requirement.");
|
|
571
577
|
continue;
|
|
572
578
|
}
|
|
573
|
-
p.add(
|
|
574
|
-
let
|
|
575
|
-
if (!
|
|
576
|
-
u("component-missing", `Required component ${
|
|
579
|
+
p.add(t.id);
|
|
580
|
+
let n = f.registry.find((e) => e.id === t.id);
|
|
581
|
+
if (!n) {
|
|
582
|
+
u("component-missing", `Required component ${t.id}@${t.version} is not installed.`);
|
|
577
583
|
continue;
|
|
578
584
|
}
|
|
579
|
-
n
|
|
580
|
-
let r =
|
|
585
|
+
c(n.version, t.range) || u("version", `Component ${t.id}@${n.version} does not satisfy ${t.range}.`), (n.version !== t.version || n.name !== t.name || i(n) !== t.digest) && u("contract", `Component ${t.id}@${t.version} differs from the installed contract. Recompile and validate state before upgrading.`);
|
|
586
|
+
let r = e.target === "offline" ? [
|
|
581
587
|
"interactive",
|
|
582
588
|
"static",
|
|
583
589
|
"offline"
|
|
584
|
-
] : [
|
|
585
|
-
for (let
|
|
590
|
+
] : [e.target];
|
|
591
|
+
for (let e of r) n.capabilities[e] || u("capability", `Component ${t.id} cannot render ${e}.`);
|
|
586
592
|
}
|
|
587
|
-
if (
|
|
588
|
-
let
|
|
589
|
-
for (let
|
|
593
|
+
if (t.document) {
|
|
594
|
+
let n = U(t.document, f, e.target);
|
|
595
|
+
for (let e of n.components) p.has(e.id) || u("component-missing", `Used component ${e.id} is missing from restoration requirements.`);
|
|
590
596
|
}
|
|
591
597
|
p.clear();
|
|
592
|
-
for (let
|
|
593
|
-
if (!W(
|
|
598
|
+
for (let t of e.themes) {
|
|
599
|
+
if (!W(t) || ![
|
|
594
600
|
"id",
|
|
595
601
|
"name",
|
|
596
602
|
"version",
|
|
597
603
|
"digest"
|
|
598
|
-
].every((
|
|
604
|
+
].every((e) => G(t[e])) || p.has(t.id)) {
|
|
599
605
|
u("metadata", "Invalid or duplicate theme restoration requirement.");
|
|
600
606
|
continue;
|
|
601
607
|
}
|
|
602
|
-
p.add(
|
|
603
|
-
let
|
|
604
|
-
|
|
608
|
+
p.add(t.id);
|
|
609
|
+
let e = f.themes.find((e) => e.id === t.id);
|
|
610
|
+
e && e.name === t.name && e.version === t.version && H(e) === t.digest || u("theme", `Required theme ${t.id}@${t.version} does not match the installed theme.`);
|
|
605
611
|
}
|
|
606
|
-
if (
|
|
607
|
-
let e = f.themes.find((e) => e.name ===
|
|
612
|
+
if (t.document) {
|
|
613
|
+
let e = f.themes.find((e) => e.name === t.document.theme);
|
|
608
614
|
e && !p.has(e.id) && u("theme", `Selected theme ${e.id} is missing from restoration requirements.`);
|
|
609
615
|
}
|
|
610
|
-
let g =
|
|
611
|
-
|
|
616
|
+
let g = b(t.resources ?? []);
|
|
617
|
+
n.push(...g.diagnostics);
|
|
612
618
|
let _ = new Map(g.resources.map((e) => [e.id, e.css]));
|
|
613
619
|
p.clear();
|
|
614
|
-
for (let
|
|
615
|
-
if (!W(
|
|
620
|
+
for (let t of e.resources) {
|
|
621
|
+
if (!W(t) || !G(t.id) || !G(t.digest) || p.has(t.id)) {
|
|
616
622
|
u("metadata", "Invalid or duplicate style restoration requirement.");
|
|
617
623
|
continue;
|
|
618
624
|
}
|
|
619
|
-
p.add(
|
|
620
|
-
let
|
|
621
|
-
|
|
625
|
+
p.add(t.id);
|
|
626
|
+
let e = _.get(t.id);
|
|
627
|
+
e === void 0 ? u("resource-missing", `Required style resource ${t.id} is missing before state restoration.`) : a(e) !== t.digest && u("resource-digest", `Style resource ${t.id} differs from the exported content.`);
|
|
622
628
|
}
|
|
623
|
-
if (
|
|
624
|
-
let
|
|
625
|
-
|
|
626
|
-
for (let e of
|
|
629
|
+
if (t.document) {
|
|
630
|
+
let n = U(t.document, f, e.target), r = new Set(n.components.map((e) => e.id)), i = f.registry.filter((e) => r.has(e.id)).flatMap((e) => e.styles ?? []);
|
|
631
|
+
i.push(...f.themes.filter((e) => e.name === t.document.theme).flatMap((e) => e.css.map((e) => e.id)));
|
|
632
|
+
for (let e of i) p.has(e) && _.has(e) || u("resource-missing", `Used style resource ${e} is required before state restoration.`);
|
|
627
633
|
}
|
|
628
634
|
} catch (e) {
|
|
629
635
|
u("metadata", e instanceof Error ? e.message : String(e));
|
|
630
636
|
}
|
|
631
|
-
return
|
|
637
|
+
return n;
|
|
632
638
|
}
|
|
633
639
|
// src/shareable.ts
|
|
634
640
|
var q = "reactive-md-html/v1", J = "reactive-md-html/v2", he = /^[A-Za-z][A-Za-z0-9_-]*$/, ge = /^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$/, _e = /^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/, ve = /[\u0000-\u001f\u007f-\u009f]/, Y = 64, ye = 41943040, be = 4096;
|
|
@@ -728,9 +734,9 @@ function ke(e) {
|
|
|
728
734
|
let n = e.mode === "static" ? "static" : "interactive";
|
|
729
735
|
if (!e.staticMarkup.trim()) throw TypeError("createShareableHtml requires rendered document markup.");
|
|
730
736
|
if (!e.css.trim()) throw TypeError("createShareableHtml requires the document stylesheet.");
|
|
731
|
-
if (e.state.sourceDigest !==
|
|
737
|
+
if (e.state.sourceDigest !== y(e.source)) throw Error("The state file does not belong to the exported source.");
|
|
732
738
|
if (n === "interactive" && !e.runtimeScript?.trim()) throw TypeError("Interactive HTML requires the standalone runtime script.");
|
|
733
|
-
let r = Ce(e.compileOptions), i =
|
|
739
|
+
let r = Ce(e.compileOptions), i = te(e.extensions, r?.config);
|
|
734
740
|
if (i.push(...K(e.restoration, {
|
|
735
741
|
config: r?.config,
|
|
736
742
|
source: e.source,
|
|
@@ -739,7 +745,7 @@ function ke(e) {
|
|
|
739
745
|
let a = g(r);
|
|
740
746
|
if (!a.ok) throw TypeError(`createShareableHtml received invalid compileOptions: ${a.message}`);
|
|
741
747
|
Te(e.staticMarkup, a.html);
|
|
742
|
-
let o = e.documentId === void 0 ? void 0 :
|
|
748
|
+
let o = e.documentId === void 0 ? void 0 : ee(e.documentId);
|
|
743
749
|
if (e.documentId !== void 0 && o === void 0) throw TypeError("createShareableHtml received an invalid documentId.");
|
|
744
750
|
let s;
|
|
745
751
|
if (e.randomSeed !== void 0) {
|
|
@@ -748,7 +754,7 @@ function ke(e) {
|
|
|
748
754
|
}
|
|
749
755
|
let c;
|
|
750
756
|
if (e.componentState !== void 0) {
|
|
751
|
-
let t =
|
|
757
|
+
let t = _(e.componentState);
|
|
752
758
|
if (!t.ok || t.diagnostics.length > 0) {
|
|
753
759
|
let e = t.diagnostics.map((e) => e.message).join(" ");
|
|
754
760
|
throw TypeError(`createShareableHtml received an invalid component state${e ? `: ${e}` : "."}`);
|
|
@@ -758,7 +764,7 @@ function ke(e) {
|
|
|
758
764
|
let l = e.locale === "zh" ? "zh" : "en", u = l === "zh" ? "zh-CN" : "en", d = e.colorScheme === "light" || e.colorScheme === "dark" ? e.colorScheme : "auto", f = e.assets === "omit" ? "omit" : "inline", p = e.generator ?? {
|
|
759
765
|
name: "reactive-md",
|
|
760
766
|
version: "unknown"
|
|
761
|
-
}, m = Ee(e.images), h = Number.isSafeInteger(e.imageCount) && (e.imageCount ?? 0) > 0 ? String(e.imageCount) : String(Object.keys(m ?? {}).length), v = n === "interactive",
|
|
767
|
+
}, m = Ee(e.images), h = Number.isSafeInteger(e.imageCount) && (e.imageCount ?? 0) > 0 ? String(e.imageCount) : String(Object.keys(m ?? {}).length), v = n === "interactive", b = {
|
|
762
768
|
version: e.restoration ? 2 : 1,
|
|
763
769
|
sourceSemantics: "mixed-rmd-v1",
|
|
764
770
|
target: t,
|
|
@@ -780,15 +786,15 @@ function ke(e) {
|
|
|
780
786
|
...o === void 0 ? {} : { documentId: o },
|
|
781
787
|
...s === void 0 ? {} : { randomSeed: s },
|
|
782
788
|
...c === void 0 ? {} : { componentState: c }
|
|
783
|
-
},
|
|
784
|
-
<script>${Se(e.runtimeScript)}<\/script>` : "",
|
|
789
|
+
}, x = we(v, a.html), S = v ? `<script type="application/reactive-md+json" data-reactive-md-auto>${Q(b)}<\/script>
|
|
790
|
+
<script>${Se(e.runtimeScript)}<\/script>` : "", C = e.notices?.trim() ? `<template id="reactive-md-notices"><pre>${X(e.notices)}</pre></template>` : "", w = !v && e.extensions ? `<template id="reactive-md-extensions">${X(JSON.stringify(e.extensions))}</template>` : "";
|
|
785
791
|
return `<!doctype html>
|
|
786
792
|
<html lang="${X(ge.test(u) ? u : "en", !0)}">
|
|
787
793
|
<head>
|
|
788
794
|
<meta charset="utf-8">
|
|
789
795
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
790
796
|
<meta name="referrer" content="no-referrer">
|
|
791
|
-
<meta http-equiv="Content-Security-Policy" content="${Z(
|
|
797
|
+
<meta http-equiv="Content-Security-Policy" content="${Z(x)}">
|
|
792
798
|
<meta name="generator" content="${Z(`${p.name} ${p.version}`)}">
|
|
793
799
|
<meta name="reactive-md-html-format" content="${e.restoration ? J : q}">
|
|
794
800
|
<meta name="reactive-md-syntax" content="${Z(e.state.syntax)}">
|
|
@@ -801,11 +807,11 @@ function ke(e) {
|
|
|
801
807
|
</head>
|
|
802
808
|
<body class="reactive-md-export">
|
|
803
809
|
<div id="${t}" class="reactive-md-export-root">${e.staticMarkup}</div>
|
|
804
|
-
${x}
|
|
805
|
-
${C}
|
|
806
810
|
${S}
|
|
811
|
+
${w}
|
|
812
|
+
${C}
|
|
807
813
|
</body>
|
|
808
814
|
</html>
|
|
809
815
|
`;
|
|
810
816
|
}
|
|
811
|
-
export {
|
|
817
|
+
export { I as _, Q as a, pe as c, V as d, x as f, de as g, ue as h, De as i, H as l, F as m, J as n, me as o, B as p, ke as r, U as s, q as t, K as u, z as v, fe as y };
|