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,121 +1,124 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a, c as o, r as s, s as c, t as l } from "./compile-
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { E as e } from "./limits-CFERRrlC.js";
|
|
2
|
+
import { _ as t, l as n, o as r, y as i } from "./document-theme-DBAfnk7y.js";
|
|
3
|
+
import { a, c as o, r as s, s as c, t as l } from "./compile-D50B5_Ww.js";
|
|
4
|
+
import { a as u, n as d, s as f, t as p } from "./computations-CffoW7Ff.js";
|
|
5
|
+
import { a as ee, c as m, i as h, n as g, o as _, r as v, t as y } from "./validation-XXlb-spV.js";
|
|
6
|
+
import { n as b, t as x } from "./types-daDo2c_w.js";
|
|
7
|
+
import { t as S } from "./component-kernel-IG4wOO0i.js";
|
|
8
|
+
import { t as C } from "./default-registry-BlloaZi7.js";
|
|
9
|
+
import { x as te } from "./component-state-CwKX_SN5.js";
|
|
10
|
+
import { i as ne, t as w } from "./identity-BUx0Q_-d.js";
|
|
11
|
+
import { n as T } from "./runtime-BDnnimPA.js";
|
|
9
12
|
// src/local/runtime/runtime-values.ts
|
|
10
|
-
function
|
|
13
|
+
function E(e, t) {
|
|
11
14
|
return e.attrs?.[t];
|
|
12
15
|
}
|
|
13
|
-
function
|
|
14
|
-
let n =
|
|
16
|
+
function D(e, t) {
|
|
17
|
+
let n = E(e, t);
|
|
15
18
|
if (n === "true") return !0;
|
|
16
19
|
if (n === "false") return !1;
|
|
17
20
|
}
|
|
18
|
-
function
|
|
19
|
-
let n =
|
|
21
|
+
function O(e, t) {
|
|
22
|
+
let n = E(e, t);
|
|
20
23
|
if (n === void 0) return;
|
|
21
24
|
let r = Number(n);
|
|
22
25
|
return Number.isFinite(r) ? r : void 0;
|
|
23
26
|
}
|
|
24
|
-
function
|
|
27
|
+
function k(e) {
|
|
25
28
|
return t(e);
|
|
26
29
|
}
|
|
27
|
-
function
|
|
30
|
+
function A(e, t) {
|
|
28
31
|
return {
|
|
29
32
|
ok: !1,
|
|
30
|
-
detail:
|
|
33
|
+
detail: n(e, t)
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
|
-
function
|
|
34
|
-
if (t !== void 0) return
|
|
36
|
+
function j(e, t) {
|
|
37
|
+
if (t !== void 0) return E(e, t);
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
if (t !== void 0) return
|
|
39
|
+
function M(e, t) {
|
|
40
|
+
if (t !== void 0) return O(e, t);
|
|
38
41
|
}
|
|
39
|
-
function
|
|
42
|
+
function N(t, n, r, i = {}) {
|
|
40
43
|
for (let a of r) if (a.kind === "date") {
|
|
41
|
-
if (!
|
|
42
|
-
let e = i.required ?? (a.required !== void 0 &&
|
|
43
|
-
if (n === "" && e) return
|
|
44
|
-
let r = i.min ??
|
|
45
|
-
if (n !== "" && r && n < r) return
|
|
46
|
-
if (n !== "" && o && n > o) return
|
|
44
|
+
if (!S(n)) return A("local.runtime.value.date-invalid");
|
|
45
|
+
let e = i.required ?? (a.required !== void 0 && D(t, a.required) === !0);
|
|
46
|
+
if (n === "" && e) return A("local.runtime.value.date-required");
|
|
47
|
+
let r = i.min ?? j(t, a.min), o = i.max ?? j(t, a.max);
|
|
48
|
+
if (n !== "" && r && n < r) return A("local.runtime.value.date-earlier", { min: r });
|
|
49
|
+
if (n !== "" && o && n > o) return A("local.runtime.value.date-later", { max: o });
|
|
47
50
|
} else if (a.kind === "required") {
|
|
48
|
-
let e = i.required ??
|
|
49
|
-
if (n === "" && e) return
|
|
51
|
+
let e = i.required ?? D(t, a.required) === !0;
|
|
52
|
+
if (n === "" && e) return A("local.runtime.value.field-required");
|
|
50
53
|
} else if (a.kind === "length") {
|
|
51
|
-
let e =
|
|
52
|
-
if (r !== void 0 && r > 0 && n !== "" && e < r) return
|
|
53
|
-
if (i !== void 0 && e > i) return
|
|
54
|
-
} else if (a.kind === "email" && (
|
|
55
|
-
if (n.length > 254) return
|
|
56
|
-
if (!e(n)) return
|
|
54
|
+
let e = k(n), r = M(t, a.min), i = M(t, a.max);
|
|
55
|
+
if (r !== void 0 && r > 0 && n !== "" && e < r) return A("local.runtime.value.min-length", { min: r });
|
|
56
|
+
if (i !== void 0 && e > i) return A("local.runtime.value.max-length", { max: i });
|
|
57
|
+
} else if (a.kind === "email" && (j(t, a.type) ?? "text") === a.value && n !== "") {
|
|
58
|
+
if (n.length > 254) return A("local.runtime.value.email-length", { limit: 254 });
|
|
59
|
+
if (!e(n)) return A("local.runtime.value.email-invalid");
|
|
57
60
|
}
|
|
58
61
|
return {
|
|
59
62
|
ok: !0,
|
|
60
63
|
value: n
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
|
-
var
|
|
64
|
-
function
|
|
65
|
-
if (!e.name) return
|
|
66
|
-
let t =
|
|
67
|
-
if (t !== void 0) return t ??
|
|
68
|
-
let n =
|
|
69
|
-
return
|
|
66
|
+
var P = /* @__PURE__ */ new Map();
|
|
67
|
+
function F(e) {
|
|
68
|
+
if (!e.name) return I;
|
|
69
|
+
let t = P.get(e.name);
|
|
70
|
+
if (t !== void 0) return t ?? I;
|
|
71
|
+
let n = C(e.name), r = n ? f(n) : I;
|
|
72
|
+
return P.set(e.name, n ? r : null), r;
|
|
70
73
|
}
|
|
71
|
-
var
|
|
72
|
-
function
|
|
74
|
+
var I = Object.freeze([]);
|
|
75
|
+
function L(e, t, n, i, a, s = !1) {
|
|
73
76
|
switch (e.type) {
|
|
74
77
|
case "number": {
|
|
75
|
-
if (typeof n != "number" || !Number.isFinite(n)) return
|
|
76
|
-
let
|
|
77
|
-
for (let
|
|
78
|
-
let t = r
|
|
79
|
-
if (t.present && !t.ok) return
|
|
78
|
+
if (typeof n != "number" || !Number.isFinite(n)) return A("local.runtime.value.finite-number", { name: e.name });
|
|
79
|
+
let r = e.step ?? 1, a = e.min ?? 0;
|
|
80
|
+
for (let r of t) {
|
|
81
|
+
let t = i(r, "min");
|
|
82
|
+
if (t.present && !t.ok) return A("local.runtime.value.constraint", {
|
|
80
83
|
name: e.name,
|
|
81
84
|
attribute: "min"
|
|
82
85
|
});
|
|
83
86
|
if (t.present && t.ok) {
|
|
84
|
-
if (typeof t.value != "number" || !Number.isFinite(t.value)) return
|
|
87
|
+
if (typeof t.value != "number" || !Number.isFinite(t.value)) return A("local.runtime.value.constraint", {
|
|
85
88
|
name: e.name,
|
|
86
89
|
attribute: "min"
|
|
87
90
|
});
|
|
88
|
-
if (a = t.value, n < t.value) return
|
|
91
|
+
if (a = t.value, n < t.value) return A("local.runtime.value.min", {
|
|
89
92
|
name: e.name,
|
|
90
93
|
min: t.value
|
|
91
94
|
});
|
|
92
95
|
}
|
|
93
|
-
let o = r
|
|
94
|
-
if (o.present && !o.ok) return
|
|
96
|
+
let o = i(r, "max");
|
|
97
|
+
if (o.present && !o.ok) return A("local.runtime.value.constraint", {
|
|
95
98
|
name: e.name,
|
|
96
99
|
attribute: "max"
|
|
97
100
|
});
|
|
98
101
|
if (o.present && o.ok) {
|
|
99
|
-
if (typeof o.value != "number" || !Number.isFinite(o.value)) return
|
|
102
|
+
if (typeof o.value != "number" || !Number.isFinite(o.value)) return A("local.runtime.value.constraint", {
|
|
100
103
|
name: e.name,
|
|
101
104
|
attribute: "max"
|
|
102
105
|
});
|
|
103
|
-
if (n > o.value) return
|
|
106
|
+
if (n > o.value) return A("local.runtime.value.max", {
|
|
104
107
|
name: e.name,
|
|
105
108
|
max: o.value
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
|
-
if (t.present && t.ok && o.present && o.ok && typeof t.value == "number" && typeof o.value == "number" && t.value > o.value) return
|
|
111
|
+
if (t.present && t.ok && o.present && o.ok && typeof t.value == "number" && typeof o.value == "number" && t.value > o.value) return A("local.runtime.value.constraint-range", { name: e.name });
|
|
109
112
|
}
|
|
110
|
-
return e.min !== void 0 && n < e.min ?
|
|
113
|
+
return e.min !== void 0 && n < e.min ? A("local.runtime.value.min", {
|
|
111
114
|
name: e.name,
|
|
112
115
|
min: e.min
|
|
113
|
-
}) : e.max !== void 0 && n > e.max ?
|
|
116
|
+
}) : e.max !== void 0 && n > e.max ? A("local.runtime.value.max", {
|
|
114
117
|
name: e.name,
|
|
115
118
|
max: e.max
|
|
116
|
-
}) :
|
|
119
|
+
}) : r > 0 && !V(n, a, r) ? A("local.runtime.value.step", {
|
|
117
120
|
name: e.name,
|
|
118
|
-
step:
|
|
121
|
+
step: r,
|
|
119
122
|
base: a
|
|
120
123
|
}) : {
|
|
121
124
|
ok: !0,
|
|
@@ -125,40 +128,40 @@ function R(e, t, n, r, a, s = !1) {
|
|
|
125
128
|
case "boolean": return typeof n == "boolean" ? {
|
|
126
129
|
ok: !0,
|
|
127
130
|
value: n
|
|
128
|
-
} :
|
|
131
|
+
} : A("local.runtime.value.boolean", { name: e.name });
|
|
129
132
|
case "string": {
|
|
130
|
-
if (typeof n != "string") return
|
|
133
|
+
if (typeof n != "string") return A("local.runtime.value.string", { name: e.name });
|
|
131
134
|
let c = o(n);
|
|
132
|
-
if (c) return
|
|
135
|
+
if (c) return A("local.runtime.value.budget", {
|
|
133
136
|
name: e.name,
|
|
134
|
-
detail:
|
|
137
|
+
detail: r(c),
|
|
135
138
|
detailKey: c.key,
|
|
136
139
|
...c.params
|
|
137
140
|
});
|
|
138
|
-
for (let
|
|
139
|
-
let t = a?.get(
|
|
141
|
+
for (let r of t) {
|
|
142
|
+
let t = a?.get(r.id) ?? (s ? F(r) : I);
|
|
140
143
|
if (!t.length) continue;
|
|
141
144
|
let o = {};
|
|
142
145
|
for (let n of t) {
|
|
143
146
|
if (n.kind === "date") {
|
|
144
147
|
for (let t of ["min", "max"]) {
|
|
145
148
|
if (n[t] === void 0) continue;
|
|
146
|
-
let a = r
|
|
149
|
+
let a = i(r, t);
|
|
147
150
|
if (a.present) {
|
|
148
|
-
if (!a.ok || typeof a.value != "string" || !
|
|
151
|
+
if (!a.ok || typeof a.value != "string" || !S(a.value)) return A("local.runtime.value.constraint-date", {
|
|
149
152
|
name: e.name,
|
|
150
153
|
attribute: t
|
|
151
154
|
});
|
|
152
155
|
o[t] = a.value;
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
|
-
let t = o.min ??
|
|
156
|
-
if (t && a &&
|
|
158
|
+
let t = o.min ?? j(r, n.min), a = o.max ?? j(r, n.max);
|
|
159
|
+
if (t && a && S(t) && S(a) && t > a) return A("local.runtime.value.constraint-range", { name: e.name });
|
|
157
160
|
}
|
|
158
161
|
if ((n.kind === "date" || n.kind === "required" ? n.required : void 0) !== void 0) {
|
|
159
|
-
let t = r
|
|
162
|
+
let t = i(r, "required");
|
|
160
163
|
if (t.present) {
|
|
161
|
-
if (!t.ok || typeof t.value != "boolean") return
|
|
164
|
+
if (!t.ok || typeof t.value != "boolean") return A("local.runtime.value.constraint", {
|
|
162
165
|
name: e.name,
|
|
163
166
|
attribute: "required"
|
|
164
167
|
});
|
|
@@ -166,10 +169,10 @@ function R(e, t, n, r, a, s = !1) {
|
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
|
-
let c =
|
|
172
|
+
let c = N(r, n, t, o);
|
|
170
173
|
if (!c.ok) return c;
|
|
171
174
|
}
|
|
172
|
-
return e.options?.length && !e.options.includes(n) ?
|
|
175
|
+
return e.options?.length && !e.options.includes(n) ? A("local.runtime.value.option", {
|
|
173
176
|
value: n,
|
|
174
177
|
options: e.options.join(", ")
|
|
175
178
|
}) : {
|
|
@@ -178,29 +181,29 @@ function R(e, t, n, r, a, s = !1) {
|
|
|
178
181
|
};
|
|
179
182
|
}
|
|
180
183
|
case "array": {
|
|
181
|
-
if (!Array.isArray(n)) return
|
|
184
|
+
if (!Array.isArray(n)) return A("local.runtime.value.array", { name: e.name });
|
|
182
185
|
let t = o(n);
|
|
183
|
-
if (t) return
|
|
186
|
+
if (t) return A("local.runtime.value.budget", {
|
|
184
187
|
name: e.name,
|
|
185
|
-
detail:
|
|
188
|
+
detail: r(t),
|
|
186
189
|
detailKey: t.key,
|
|
187
190
|
...t.params
|
|
188
191
|
});
|
|
189
|
-
for (let t of n) if (typeof t != "string") return
|
|
190
|
-
if (e.family === "collection") return e.maxItems !== void 0 && n.length > e.maxItems ?
|
|
192
|
+
for (let t of n) if (typeof t != "string") return A("local.runtime.value.array-members", { name: e.name });
|
|
193
|
+
if (e.family === "collection") return e.maxItems !== void 0 && n.length > e.maxItems ? A("local.runtime.value.max-items", {
|
|
191
194
|
name: e.name,
|
|
192
195
|
max: e.maxItems
|
|
193
196
|
}) : {
|
|
194
197
|
ok: !0,
|
|
195
198
|
value: n.slice()
|
|
196
199
|
};
|
|
197
|
-
let
|
|
200
|
+
let i = /* @__PURE__ */ new Set();
|
|
198
201
|
for (let t of n) {
|
|
199
|
-
if (e.options && !e.options.includes(t)) return
|
|
200
|
-
|
|
202
|
+
if (e.options && !e.options.includes(t)) return A("local.runtime.value.checklist-option", { value: t });
|
|
203
|
+
i.add(t);
|
|
201
204
|
}
|
|
202
|
-
let a = e.options ? e.options.filter((e) =>
|
|
203
|
-
return e.maxItems !== void 0 && a.length > e.maxItems ?
|
|
205
|
+
let a = e.options ? e.options.filter((e) => i.has(e)) : [...i];
|
|
206
|
+
return e.maxItems !== void 0 && a.length > e.maxItems ? A("local.runtime.value.max-items", {
|
|
204
207
|
name: e.name,
|
|
205
208
|
max: e.maxItems
|
|
206
209
|
}) : {
|
|
@@ -209,16 +212,16 @@ function R(e, t, n, r, a, s = !1) {
|
|
|
209
212
|
};
|
|
210
213
|
}
|
|
211
214
|
case "number-array": {
|
|
212
|
-
if (!Array.isArray(n)) return
|
|
215
|
+
if (!Array.isArray(n)) return A("local.runtime.value.number-array", { name: e.name });
|
|
213
216
|
let t = o(n);
|
|
214
|
-
if (t) return
|
|
217
|
+
if (t) return A("local.runtime.value.budget", {
|
|
215
218
|
name: e.name,
|
|
216
|
-
detail:
|
|
219
|
+
detail: r(t),
|
|
217
220
|
detailKey: t.key,
|
|
218
221
|
...t.params
|
|
219
222
|
});
|
|
220
|
-
for (let t of n) if (typeof t != "number" || !Number.isFinite(t)) return
|
|
221
|
-
return e.maxItems !== void 0 && n.length > e.maxItems ?
|
|
223
|
+
for (let t of n) if (typeof t != "number" || !Number.isFinite(t)) return A("local.runtime.value.number-array-members", { name: e.name });
|
|
224
|
+
return e.maxItems !== void 0 && n.length > e.maxItems ? A("local.runtime.value.max-items", {
|
|
222
225
|
name: e.name,
|
|
223
226
|
max: e.maxItems
|
|
224
227
|
}) : {
|
|
@@ -229,11 +232,11 @@ function R(e, t, n, r, a, s = !1) {
|
|
|
229
232
|
case "null": return n === null ? {
|
|
230
233
|
ok: !0,
|
|
231
234
|
value: n
|
|
232
|
-
} :
|
|
235
|
+
} : A("local.runtime.value.null", { name: e.name });
|
|
233
236
|
}
|
|
234
|
-
return
|
|
237
|
+
return A("local.runtime.value.unsupported-type", { name: e.name });
|
|
235
238
|
}
|
|
236
|
-
function
|
|
239
|
+
function R(e) {
|
|
237
240
|
return e instanceof a ? e : new a("expression-eval", e instanceof Error ? e.message : String(e), 0);
|
|
238
241
|
}
|
|
239
242
|
function re(e, t) {
|
|
@@ -336,11 +339,11 @@ function V(e, t, n) {
|
|
|
336
339
|
let r = (e - t) / n;
|
|
337
340
|
return Math.abs(r - Math.round(r)) <= z * Math.max(1, Math.abs(r));
|
|
338
341
|
}
|
|
339
|
-
function H(e, t, n,
|
|
342
|
+
function H(e, t, n, i) {
|
|
340
343
|
let a = Math.max(0, Math.min(e.source.length, t.range.start)), o = e.source.slice(0, a).split("\n");
|
|
341
344
|
return {
|
|
342
345
|
code: n,
|
|
343
|
-
message: i
|
|
346
|
+
message: r(i),
|
|
344
347
|
severity: "error",
|
|
345
348
|
range: {
|
|
346
349
|
start: a,
|
|
@@ -348,8 +351,10 @@ function H(e, t, n, r) {
|
|
|
348
351
|
},
|
|
349
352
|
line: o.length,
|
|
350
353
|
column: (o.at(-1) ?? "").length + 1,
|
|
351
|
-
messageKey:
|
|
352
|
-
|
|
354
|
+
messageKey: i.key,
|
|
355
|
+
phase: "runtime",
|
|
356
|
+
recoverable: !0,
|
|
357
|
+
...i.params ? { params: i.params } : {}
|
|
353
358
|
};
|
|
354
359
|
}
|
|
355
360
|
function U(e, t, n) {
|
|
@@ -363,6 +368,8 @@ function U(e, t, n) {
|
|
|
363
368
|
},
|
|
364
369
|
line: 1,
|
|
365
370
|
column: 1,
|
|
371
|
+
phase: "runtime",
|
|
372
|
+
recoverable: !0,
|
|
366
373
|
...n ? {
|
|
367
374
|
messageKey: n.key,
|
|
368
375
|
...n.params ? { params: n.params } : {}
|
|
@@ -410,91 +417,91 @@ function ie(e, t) {
|
|
|
410
417
|
} catch (e) {
|
|
411
418
|
return {
|
|
412
419
|
expression: null,
|
|
413
|
-
error:
|
|
420
|
+
error: R(e)
|
|
414
421
|
};
|
|
415
422
|
}
|
|
416
423
|
}
|
|
417
424
|
function ae(e, t) {
|
|
418
|
-
let
|
|
419
|
-
for (let t of
|
|
425
|
+
let n = /* @__PURE__ */ new Map();
|
|
426
|
+
for (let t of i(e.nodes)) n.set(t.id, t);
|
|
420
427
|
let s = {}, l = /* @__PURE__ */ new Map();
|
|
421
|
-
for (let [t,
|
|
422
|
-
let e = o(
|
|
423
|
-
if (e) throw new a("expression-budget", `Parameter "${t}": ${
|
|
424
|
-
s[t] = B(
|
|
428
|
+
for (let [t, i] of Object.entries(e.bindings)) {
|
|
429
|
+
let e = o(i.initial);
|
|
430
|
+
if (e) throw new a("expression-budget", `Parameter "${t}": ${r(e)}`, 0);
|
|
431
|
+
s[t] = B(i.initial);
|
|
425
432
|
let c = [];
|
|
426
|
-
for (let e of
|
|
427
|
-
let t =
|
|
433
|
+
for (let e of i.nodeIds) {
|
|
434
|
+
let t = n.get(e);
|
|
428
435
|
t && c.push(t);
|
|
429
436
|
}
|
|
430
437
|
l.set(t, c);
|
|
431
438
|
}
|
|
432
|
-
let
|
|
433
|
-
for (let [t, n] of Object.entries(e.bindingSlots ?? {}))
|
|
434
|
-
let
|
|
435
|
-
if (
|
|
436
|
-
let t =
|
|
439
|
+
let f = /* @__PURE__ */ new Map();
|
|
440
|
+
for (let [t, n] of Object.entries(e.bindingSlots ?? {})) f.set(t, { ...n });
|
|
441
|
+
let p = u(e), m = new Map(Object.entries(p?.valueRules ?? {})), h = p === void 0, g = /* @__PURE__ */ new Map();
|
|
442
|
+
if (p) for (let e of p.slotRelations) {
|
|
443
|
+
let t = f.get(e.nodeId), n = t?.[e.lower], r = t?.[e.upper];
|
|
437
444
|
if (!n || !r) continue;
|
|
438
|
-
let i =
|
|
445
|
+
let i = g.get(e.nodeId) ?? [];
|
|
439
446
|
i.push({
|
|
440
447
|
lower: n,
|
|
441
448
|
upper: r
|
|
442
|
-
}),
|
|
449
|
+
}), g.set(e.nodeId, i);
|
|
443
450
|
}
|
|
444
|
-
else for (let [e, t] of
|
|
451
|
+
else for (let [e, t] of f) t.start && t.end && g.set(e, [{
|
|
445
452
|
lower: t.start,
|
|
446
453
|
upper: t.end
|
|
447
454
|
}]);
|
|
448
|
-
let
|
|
455
|
+
let v = /* @__PURE__ */ new Map();
|
|
449
456
|
for (let [t, n] of Object.entries(e.bindings)) for (let e of n.nodeIds) {
|
|
450
|
-
if (
|
|
451
|
-
let n =
|
|
452
|
-
(n === void 0 || n.startsWith("@") && !t.startsWith("@")) &&
|
|
457
|
+
if (f.has(e)) continue;
|
|
458
|
+
let n = v.get(e);
|
|
459
|
+
(n === void 0 || n.startsWith("@") && !t.startsWith("@")) && v.set(e, t);
|
|
453
460
|
}
|
|
454
|
-
let
|
|
455
|
-
for (let [e, t] of
|
|
461
|
+
let y = Object.freeze(Object.keys(e.bindings).filter((e) => !e.startsWith("@")).sort()), b = /* @__PURE__ */ new Map();
|
|
462
|
+
for (let [e, t] of f) for (let n of Object.values(t)) {
|
|
456
463
|
if (n.startsWith("@")) continue;
|
|
457
464
|
let t = b.get(n) ?? /* @__PURE__ */ new Set();
|
|
458
465
|
t.add(e), b.set(n, t);
|
|
459
466
|
}
|
|
460
|
-
let x = e.computations ?? {},
|
|
467
|
+
let x = e.computations ?? {}, S = Object.keys(x), C = /* @__PURE__ */ new Map();
|
|
461
468
|
for (let [e, n] of Object.entries(x)) {
|
|
462
469
|
let r = ie(n.source, t);
|
|
463
|
-
r.expression &&
|
|
470
|
+
r.expression && C.set(e, r.expression);
|
|
464
471
|
}
|
|
465
|
-
let { order:
|
|
466
|
-
for (let e of
|
|
472
|
+
let { order: te, cyclic: ne } = d(x), w = {}, T = /* @__PURE__ */ new Map();
|
|
473
|
+
for (let e of te) {
|
|
467
474
|
let t = x[e];
|
|
468
475
|
if (!t || t.kind !== "const") continue;
|
|
469
476
|
if (Object.hasOwn(t, "value")) {
|
|
470
477
|
let n = t.value, r = c(n);
|
|
471
478
|
if (r) {
|
|
472
|
-
|
|
479
|
+
T.set(e, new a("expression-budget", `Constant "${e}": ${r}`, 0));
|
|
473
480
|
continue;
|
|
474
481
|
}
|
|
475
|
-
|
|
482
|
+
w[e] = B(n);
|
|
476
483
|
continue;
|
|
477
484
|
}
|
|
478
|
-
let n =
|
|
479
|
-
if (!n)
|
|
485
|
+
let n = C.get(e);
|
|
486
|
+
if (!n) T.set(e, new a("expression-eval", `Constant "${e}" cannot be evaluated.`, 0));
|
|
480
487
|
else try {
|
|
481
|
-
let t = n.evaluate({ ...
|
|
488
|
+
let t = n.evaluate({ ...w }), r = c(t);
|
|
482
489
|
if (r) {
|
|
483
|
-
|
|
490
|
+
T.set(e, new a("expression-budget", `Constant "${e}": ${r}`, 0));
|
|
484
491
|
continue;
|
|
485
492
|
}
|
|
486
|
-
|
|
493
|
+
w[e] = B(t);
|
|
487
494
|
} catch (t) {
|
|
488
|
-
|
|
495
|
+
T.set(e, R(t));
|
|
489
496
|
}
|
|
490
497
|
}
|
|
491
|
-
let
|
|
492
|
-
for (let e of
|
|
493
|
-
let
|
|
498
|
+
let E = /* @__PURE__ */ new Map();
|
|
499
|
+
for (let e of ne) E.set(e, new a("expression-cycle", `Computation "${e}" is part of a dependency cycle.`, 0));
|
|
500
|
+
let D = [];
|
|
494
501
|
if (Array.isArray(e.validations)) for (let n of e.validations) {
|
|
495
|
-
if (!
|
|
502
|
+
if (!ee(n)) continue;
|
|
496
503
|
let e = ie(n.expression, t);
|
|
497
|
-
|
|
504
|
+
D.push({
|
|
498
505
|
rule: n,
|
|
499
506
|
expression: e.expression,
|
|
500
507
|
error: e.error
|
|
@@ -502,37 +509,37 @@ function ae(e, t) {
|
|
|
502
509
|
}
|
|
503
510
|
return {
|
|
504
511
|
document: e,
|
|
505
|
-
nodeIndex:
|
|
512
|
+
nodeIndex: n,
|
|
506
513
|
controls: l,
|
|
507
|
-
slotKeys:
|
|
508
|
-
publicNames:
|
|
514
|
+
slotKeys: f,
|
|
515
|
+
publicNames: y,
|
|
509
516
|
publicSlotOwners: b,
|
|
510
517
|
initial: s,
|
|
511
|
-
valueRules:
|
|
512
|
-
legacyValueRules:
|
|
513
|
-
slotRelations:
|
|
514
|
-
bindingByNode:
|
|
518
|
+
valueRules: m,
|
|
519
|
+
legacyValueRules: h,
|
|
520
|
+
slotRelations: g,
|
|
521
|
+
bindingByNode: v,
|
|
515
522
|
computationMetadata: x,
|
|
516
|
-
computationNames:
|
|
517
|
-
computationOrder:
|
|
518
|
-
cyclicComputations:
|
|
519
|
-
computationExpressions:
|
|
520
|
-
constValues:
|
|
521
|
-
constErrors:
|
|
522
|
-
cycleErrors:
|
|
523
|
-
validationRules:
|
|
524
|
-
validationLineStarts:
|
|
523
|
+
computationNames: S,
|
|
524
|
+
computationOrder: te,
|
|
525
|
+
cyclicComputations: ne,
|
|
526
|
+
computationExpressions: C,
|
|
527
|
+
constValues: w,
|
|
528
|
+
constErrors: T,
|
|
529
|
+
cycleErrors: E,
|
|
530
|
+
validationRules: D,
|
|
531
|
+
validationLineStarts: _(typeof e.source == "string" ? e.source : "")
|
|
525
532
|
};
|
|
526
533
|
}
|
|
527
534
|
function oe(e) {
|
|
528
|
-
return !e || e.syntax !== "local" ? "createLocalRuntime requires a local interaction document." : e.syntaxVersion !== void 0 && e.syntaxVersion !== "local-draft-3" || e.versionDeclaration && e.versionDeclaration.version !== "local-draft-3" ? `createLocalRuntime requires ${
|
|
535
|
+
return !e || e.syntax !== "local" ? "createLocalRuntime requires a local interaction document." : e.syntaxVersion !== void 0 && e.syntaxVersion !== "local-draft-3" || e.versionDeclaration && e.versionDeclaration.version !== "local-draft-3" ? `createLocalRuntime requires ${x}; migrate the source before constructing a runtime.` : null;
|
|
529
536
|
}
|
|
530
537
|
function G(e, t) {
|
|
531
538
|
return (e.controls.get(t.name) ?? [])[0] ?? (t.owner ? e.nodeIndex.get(t.owner) : void 0) ?? (t.nodeIds[0] ? e.nodeIndex.get(t.nodeIds[0]) : void 0);
|
|
532
539
|
}
|
|
533
540
|
function se(e, t, n) {
|
|
534
|
-
let
|
|
535
|
-
return
|
|
541
|
+
let i = G(e, t);
|
|
542
|
+
return i ? H(e.document, i, "local.runtime.value", n) : U("local.runtime.value", r(n));
|
|
536
543
|
}
|
|
537
544
|
function K(e, t, n) {
|
|
538
545
|
let r = e.slotRelations.get(t);
|
|
@@ -542,13 +549,13 @@ function K(e, t, n) {
|
|
|
542
549
|
}) : !1;
|
|
543
550
|
}
|
|
544
551
|
function ce(e, t) {
|
|
545
|
-
let
|
|
546
|
-
return
|
|
552
|
+
let i = e.nodeIndex.get(t);
|
|
553
|
+
return i ? H(e.document, i, "local.runtime.value", n("local.runtime.value.range-order")) : U("local.runtime.value", r(n("local.runtime.value.range-order")));
|
|
547
554
|
}
|
|
548
555
|
// src/local/runtime/retention.ts
|
|
549
556
|
function q(e) {
|
|
550
557
|
let t = /* @__PURE__ */ new Map();
|
|
551
|
-
for (let
|
|
558
|
+
for (let n of i(e.nodes)) t.set(n.id, n);
|
|
552
559
|
return t;
|
|
553
560
|
}
|
|
554
561
|
function le(e, t, n) {
|
|
@@ -556,14 +563,14 @@ function le(e, t, n) {
|
|
|
556
563
|
return r !== void 0 && Object.values(r).includes(n);
|
|
557
564
|
}
|
|
558
565
|
function J(e, t, n) {
|
|
559
|
-
let r = t.name ?
|
|
566
|
+
let r = t.name ? C(t.name) : void 0;
|
|
560
567
|
if (r?.bindings) {
|
|
561
568
|
let i = e.bindingSlots?.[t.id];
|
|
562
569
|
for (let [e, a] of Object.entries(r.bindings)) if (t.attrs?.[a.bind] === n || e !== "value" && i?.[e] === n) return a.retain === !1 ? void 0 : a.initial;
|
|
563
570
|
} else if (t.attrs?.bind === n || le(e, t, n)) return "initial";
|
|
564
571
|
}
|
|
565
572
|
function Y(e) {
|
|
566
|
-
let t = q(e), n =
|
|
573
|
+
let t = q(e), n = u(e), r = new Set(n?.retentionExclusions ?? []), i = /* @__PURE__ */ new Map();
|
|
567
574
|
for (let [a, o] of Object.entries(e.bindings)) {
|
|
568
575
|
let s = o.nodeIds.flatMap((e) => {
|
|
569
576
|
let n = t.get(e);
|
|
@@ -663,7 +670,7 @@ function de(e, t, n, r, i) {
|
|
|
663
670
|
for (let e of a.dropped) s.set(e.name, Object.freeze({ ...e }));
|
|
664
671
|
let c = [], l = {}, u = [], d = /* @__PURE__ */ new Set(), f, p = (n) => {
|
|
665
672
|
let o = e.document.bindings[n], s = e.controls.get(n) ?? [];
|
|
666
|
-
return !o || !s.some((t) => e.document.dynamicConstraints?.[t.id]) || (f ??= i({}, e, t),
|
|
673
|
+
return !o || !s.some((t) => e.document.dynamicConstraints?.[t.id]) || (f ??= i({}, e, t), L(o, s, a.values[n], f, e.valueRules, e.legacyValueRules).ok) ? !1 : W(e, n) === W(r, n);
|
|
667
674
|
};
|
|
668
675
|
for (let e of a.retained) {
|
|
669
676
|
let t = n.bindings[e];
|
|
@@ -672,26 +679,26 @@ function de(e, t, n, r, i) {
|
|
|
672
679
|
d.add(e), l[e] = B(a.values[e]), u.push(e);
|
|
673
680
|
continue;
|
|
674
681
|
}
|
|
675
|
-
let f =
|
|
682
|
+
let f = L(t, r.controls.get(e) ?? [], a.values[e], i(a.values, r, o), r.valueRules, r.legacyValueRules);
|
|
676
683
|
f.ok ? (l[e] = B(f.value), u.push(e)) : (c.push(se(r, t, f.detail)), s.set(e, Object.freeze({
|
|
677
684
|
name: e,
|
|
678
685
|
reason: "invalid"
|
|
679
686
|
})));
|
|
680
687
|
}
|
|
681
|
-
let
|
|
688
|
+
let ee = {
|
|
682
689
|
...o,
|
|
683
690
|
...l
|
|
684
|
-
},
|
|
685
|
-
for (let e of u) for (let t of r.publicSlotOwners.get(e) ?? [])
|
|
686
|
-
let
|
|
687
|
-
for (let e of [...
|
|
688
|
-
|
|
691
|
+
}, m = /* @__PURE__ */ new Set();
|
|
692
|
+
for (let e of u) for (let t of r.publicSlotOwners.get(e) ?? []) m.add(t);
|
|
693
|
+
let h = !1;
|
|
694
|
+
for (let e of [...m].sort()) if (K(r, e, ee)) {
|
|
695
|
+
h = !0;
|
|
689
696
|
break;
|
|
690
697
|
}
|
|
691
|
-
let
|
|
692
|
-
if (!
|
|
698
|
+
let g;
|
|
699
|
+
if (!h) Object.assign(o, l), g = u;
|
|
693
700
|
else {
|
|
694
|
-
|
|
701
|
+
g = [];
|
|
695
702
|
for (let e of u) {
|
|
696
703
|
let t = o[e];
|
|
697
704
|
o[e] = l[e];
|
|
@@ -700,7 +707,7 @@ function de(e, t, n, r, i) {
|
|
|
700
707
|
n ? (o[e] = t, s.set(e, Object.freeze({
|
|
701
708
|
name: e,
|
|
702
709
|
reason: "invalid"
|
|
703
|
-
}))) :
|
|
710
|
+
}))) : g.push(e);
|
|
704
711
|
}
|
|
705
712
|
}
|
|
706
713
|
for (let [e, t] of r.slotRelations) if (K(r, e, o)) {
|
|
@@ -708,8 +715,8 @@ function de(e, t, n, r, i) {
|
|
|
708
715
|
let e = n.bindings[t];
|
|
709
716
|
if (!e) continue;
|
|
710
717
|
o[t] = B(e.initial);
|
|
711
|
-
let r =
|
|
712
|
-
r >= 0 &&
|
|
718
|
+
let r = g.indexOf(t);
|
|
719
|
+
r >= 0 && g.splice(r, 1), s.set(t, Object.freeze({
|
|
713
720
|
name: t,
|
|
714
721
|
reason: "invalid"
|
|
715
722
|
}));
|
|
@@ -721,25 +728,25 @@ function de(e, t, n, r, i) {
|
|
|
721
728
|
diagnostics: []
|
|
722
729
|
};
|
|
723
730
|
}
|
|
724
|
-
let
|
|
725
|
-
for (;
|
|
731
|
+
let _ = !0;
|
|
732
|
+
for (; _;) {
|
|
726
733
|
let e = i({}, r, o), t = [];
|
|
727
|
-
for (let i of
|
|
734
|
+
for (let i of g) {
|
|
728
735
|
if (d.has(i)) continue;
|
|
729
|
-
let a = n.bindings[i], s =
|
|
736
|
+
let a = n.bindings[i], s = L(a, r.controls.get(i) ?? [], o[i], e, r.valueRules, r.legacyValueRules);
|
|
730
737
|
s.ok || (c.push(se(r, a, s.detail)), t.push(i));
|
|
731
738
|
}
|
|
732
|
-
for (let e of t) o[e] = B(n.bindings[e].initial),
|
|
739
|
+
for (let e of t) o[e] = B(n.bindings[e].initial), g.splice(g.indexOf(e), 1), s.set(e, Object.freeze({
|
|
733
740
|
name: e,
|
|
734
741
|
reason: "invalid"
|
|
735
742
|
}));
|
|
736
|
-
|
|
743
|
+
_ = t.length > 0;
|
|
737
744
|
}
|
|
738
|
-
let
|
|
739
|
-
return
|
|
745
|
+
let v = [...s.values()].sort((e, t) => e.name < t.name ? -1 : +(e.name > t.name));
|
|
746
|
+
return g.sort(), {
|
|
740
747
|
values: o,
|
|
741
|
-
retained:
|
|
742
|
-
dropped:
|
|
748
|
+
retained: g,
|
|
749
|
+
dropped: v,
|
|
743
750
|
diagnostics: c
|
|
744
751
|
};
|
|
745
752
|
}
|
|
@@ -782,33 +789,33 @@ function ve(e, t, n) {
|
|
|
782
789
|
function ye(e, t) {
|
|
783
790
|
let c = oe(e);
|
|
784
791
|
if (c) throw Error(c);
|
|
785
|
-
let
|
|
792
|
+
let u = t?.services === void 0, d = te(t?.network), f = /* @__PURE__ */ new Map(), ee = ne(e.source), _ = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map(), S = ae(e, x), C = () => S, E = () => {
|
|
786
793
|
let e = /* @__PURE__ */ new Set();
|
|
787
|
-
for (let
|
|
794
|
+
for (let n of i(S.document.nodes)) n.name !== void 0 && e.add(w({
|
|
788
795
|
documentId: t?.documentId,
|
|
789
|
-
sourceDigest:
|
|
790
|
-
nodeId:
|
|
791
|
-
stateKey:
|
|
796
|
+
sourceDigest: ee,
|
|
797
|
+
nodeId: n.id,
|
|
798
|
+
stateKey: n.attrs?.["state-key"]
|
|
792
799
|
}));
|
|
793
800
|
return e;
|
|
794
|
-
},
|
|
801
|
+
}, D = t?.services ?? T({
|
|
795
802
|
documentId: t?.documentId,
|
|
796
|
-
sourceDigest:
|
|
803
|
+
sourceDigest: ee,
|
|
797
804
|
randomSeed: t?.randomSeed,
|
|
798
805
|
componentState: t?.componentState,
|
|
799
806
|
...t?.componentStateStorage === void 0 ? {} : { componentStateStorage: t.componentStateStorage },
|
|
800
807
|
...t?.componentStateWriteDelayMs === void 0 ? {} : { componentStateWriteDelayMs: t.componentStateWriteDelayMs },
|
|
801
808
|
...t?.configKey === void 0 ? {} : { configKey: t.configKey },
|
|
802
809
|
...t?.legacyConfigKeys === void 0 ? {} : { legacyConfigKeys: t.legacyConfigKeys },
|
|
803
|
-
...
|
|
804
|
-
}),
|
|
810
|
+
...u ? { knownStateKeys: E } : {}
|
|
811
|
+
}), O = {}, k = /* @__PURE__ */ new Map();
|
|
805
812
|
for (let [n, r] of Object.entries(e.externals ?? {})) {
|
|
806
813
|
let e = t?.externalValues?.[n];
|
|
807
814
|
if (e === void 0) continue;
|
|
808
815
|
let i = re(r.type, e);
|
|
809
|
-
i.ok && (
|
|
816
|
+
i.ok && (O[n] = i.value);
|
|
810
817
|
}
|
|
811
|
-
let
|
|
818
|
+
let A = (e, t) => {
|
|
812
819
|
let n = {};
|
|
813
820
|
for (let [r, i] of Object.entries(e.document.externals ?? {})) {
|
|
814
821
|
if (!Object.hasOwn(t, r)) continue;
|
|
@@ -816,14 +823,14 @@ function ye(e, t) {
|
|
|
816
823
|
e.ok && (n[r] = e.value);
|
|
817
824
|
}
|
|
818
825
|
return n;
|
|
819
|
-
},
|
|
820
|
-
let t =
|
|
821
|
-
for (let n of
|
|
826
|
+
}, j = (e) => {
|
|
827
|
+
let t = A(e, O);
|
|
828
|
+
for (let n of k.keys()) Object.assign(t, A(e, n));
|
|
822
829
|
return t;
|
|
823
|
-
},
|
|
830
|
+
}, M = (e, t, n, r = C()) => {
|
|
824
831
|
let i = r.document.dynamicConstraints?.[e.id]?.[t];
|
|
825
832
|
if (!i) return { present: !1 };
|
|
826
|
-
let a = ie(i.source,
|
|
833
|
+
let a = ie(i.source, x);
|
|
827
834
|
if (!a.expression) return {
|
|
828
835
|
present: !0,
|
|
829
836
|
ok: !1
|
|
@@ -844,21 +851,21 @@ function ye(e, t) {
|
|
|
844
851
|
ok: !1
|
|
845
852
|
};
|
|
846
853
|
}
|
|
847
|
-
},
|
|
854
|
+
}, N = S.initial, P = 0, F = {}, I = {}, R = {
|
|
848
855
|
revision: 0,
|
|
849
856
|
state: me({})
|
|
850
857
|
}, z = !1, V = null, W = /* @__PURE__ */ new Set(), G = /* @__PURE__ */ new Map(), q = () => {
|
|
851
858
|
if (z) throw Error("The local interaction runtime has been disposed.");
|
|
852
859
|
};
|
|
853
860
|
function le(e, t) {
|
|
854
|
-
if (!t.startsWith("@") && Object.hasOwn(e.document.bindings, t)) return Object.hasOwn(
|
|
861
|
+
if (!t.startsWith("@") && Object.hasOwn(e.document.bindings, t)) return Object.hasOwn(N, t) ? N[t] : void 0;
|
|
855
862
|
}
|
|
856
863
|
let J = (e, t) => {
|
|
857
|
-
let n =
|
|
864
|
+
let n = j(e), r = /* @__PURE__ */ new Map();
|
|
858
865
|
for (let t of Object.keys(e.document.externals ?? {})) Object.hasOwn(n, t) || r.set(t, new a("external-missing", "External data \"" + t + "\" is not available.", 0));
|
|
859
866
|
let i = {}, o = /* @__PURE__ */ new Map();
|
|
860
867
|
if (e.computationNames.length > 0) {
|
|
861
|
-
let a =
|
|
868
|
+
let a = p(e.computationMetadata, e.computationOrder, e.computationExpressions, {
|
|
862
869
|
...t,
|
|
863
870
|
...n
|
|
864
871
|
}, e.constValues, r);
|
|
@@ -886,63 +893,63 @@ function ye(e, t) {
|
|
|
886
893
|
snapshotState: c
|
|
887
894
|
};
|
|
888
895
|
}, Y = () => {
|
|
889
|
-
let e = J(
|
|
890
|
-
|
|
891
|
-
}, X = (e, t =
|
|
896
|
+
let e = J(C(), N);
|
|
897
|
+
F = e.environment, I = e.snapshotState;
|
|
898
|
+
}, X = (e, t = C(), n = N) => {
|
|
892
899
|
let r;
|
|
893
900
|
return (i, a) => t.document.dynamicConstraints?.[i.id]?.[a] ? (r ??= J(t, {
|
|
894
901
|
...n,
|
|
895
902
|
...e
|
|
896
|
-
}).environment,
|
|
903
|
+
}).environment, M(i, a, r, t)) : { present: !1 };
|
|
897
904
|
}, Z = () => {
|
|
898
|
-
|
|
899
|
-
revision:
|
|
900
|
-
state: me(
|
|
905
|
+
R = {
|
|
906
|
+
revision: P,
|
|
907
|
+
state: me(I)
|
|
901
908
|
};
|
|
902
909
|
}, ue = () => {
|
|
903
910
|
for (let e of W) e();
|
|
904
911
|
}, Q = (e) => {
|
|
905
|
-
|
|
912
|
+
N = e, P += 1, Y(), Z(), ue();
|
|
906
913
|
}, ge = () => {
|
|
907
|
-
|
|
908
|
-
}, _e = (e, t =
|
|
914
|
+
P += 1, Y(), Z(), ue();
|
|
915
|
+
}, _e = (e, t = O) => {
|
|
909
916
|
if (q(), typeof e != "object" || !e || Array.isArray(e)) throw TypeError("setExternalValues requires an object of external values.");
|
|
910
|
-
let
|
|
917
|
+
let i = [], a = {}, o = Object.keys(e).sort();
|
|
911
918
|
for (let t of o) {
|
|
912
919
|
if (t === "__proto__") {
|
|
913
|
-
|
|
920
|
+
i.push(U("local.runtime.external", "External names cannot be \"__proto__\"."));
|
|
914
921
|
continue;
|
|
915
922
|
}
|
|
916
|
-
let o =
|
|
923
|
+
let o = C().document.externals ?? {}, s = Object.hasOwn(o, t) ? o[t] : void 0;
|
|
917
924
|
if (!s) {
|
|
918
|
-
let e =
|
|
919
|
-
|
|
925
|
+
let e = n("local.runtime.external", { name: t });
|
|
926
|
+
i.push(U("local.runtime.external", r(e), e));
|
|
920
927
|
continue;
|
|
921
928
|
}
|
|
922
929
|
let c = re(s.type, e[t]);
|
|
923
930
|
if (c.ok) a[t] = c.value;
|
|
924
931
|
else {
|
|
925
|
-
let e =
|
|
932
|
+
let e = n(c.key, {
|
|
926
933
|
name: t,
|
|
927
934
|
...c.params ?? {}
|
|
928
935
|
});
|
|
929
|
-
|
|
936
|
+
i.push(U("local.runtime.external", r(e), e));
|
|
930
937
|
}
|
|
931
938
|
}
|
|
932
|
-
return
|
|
939
|
+
return i.length ? i : (o.some((e) => !pe(t[e], a[e])) && (Object.assign(t, a), ge()), []);
|
|
933
940
|
}, ve = (e, t) => {
|
|
934
941
|
if (z) return () => {};
|
|
935
942
|
let n = {}, r = e.bindExternalValues((e) => {
|
|
936
|
-
if (z || !
|
|
943
|
+
if (z || !k.has(n)) return;
|
|
937
944
|
let r = _e(e, n);
|
|
938
945
|
r.length && t?.(r);
|
|
939
946
|
});
|
|
940
|
-
return r ? (
|
|
941
|
-
|
|
947
|
+
return r ? (k.set(n, r), () => {
|
|
948
|
+
k.delete(n) && (r(), !z && Object.keys(n).length && ge());
|
|
942
949
|
}) : () => {};
|
|
943
950
|
}, ye = (e) => {
|
|
944
951
|
q();
|
|
945
|
-
let t =
|
|
952
|
+
let t = C(), n = [], r = {}, i = Object.keys(e).sort(), a = X(e);
|
|
946
953
|
for (let o of i) {
|
|
947
954
|
if (o === "__proto__") {
|
|
948
955
|
n.push(U("local.runtime.parameter", "Parameter names cannot be \"__proto__\"."));
|
|
@@ -956,59 +963,59 @@ function ye(e, t) {
|
|
|
956
963
|
n.push(U("local.runtime.parameter", `Unknown parameter "${o}".`));
|
|
957
964
|
continue;
|
|
958
965
|
}
|
|
959
|
-
let i = t.document.bindings[o], s =
|
|
966
|
+
let i = t.document.bindings[o], s = L(i, t.controls.get(o) ?? [], e[o], a, t.valueRules, t.legacyValueRules);
|
|
960
967
|
s.ok ? r[o] = B(s.value) : n.push(se(t, i, s.detail));
|
|
961
968
|
}
|
|
962
969
|
if (n.length) return n;
|
|
963
|
-
if (!i.some((e) => !pe(
|
|
970
|
+
if (!i.some((e) => !pe(N[e], r[e]))) return [];
|
|
964
971
|
let o = {
|
|
965
|
-
...
|
|
972
|
+
...N,
|
|
966
973
|
...r
|
|
967
974
|
}, s = /* @__PURE__ */ new Set();
|
|
968
975
|
for (let e of i) for (let n of t.publicSlotOwners.get(e) ?? []) s.add(n);
|
|
969
976
|
for (let e of [...s].sort()) K(t, e, o) && n.push(ce(t, e));
|
|
970
977
|
return n.length ? n : (Q(o), []);
|
|
971
978
|
}, be = (e) => {
|
|
972
|
-
let t =
|
|
979
|
+
let t = _.get(e);
|
|
973
980
|
if (!t) {
|
|
974
|
-
if (t = l(e),
|
|
975
|
-
let e =
|
|
976
|
-
e !== void 0 &&
|
|
981
|
+
if (t = l(e), _.size >= 200) {
|
|
982
|
+
let e = _.keys().next().value;
|
|
983
|
+
e !== void 0 && _.delete(e);
|
|
977
984
|
}
|
|
978
|
-
|
|
985
|
+
_.set(e, t);
|
|
979
986
|
}
|
|
980
987
|
return t;
|
|
981
988
|
}, xe = () => {
|
|
982
|
-
let e =
|
|
989
|
+
let e = C(), t = [], n = typeof e.document.source == "string" ? e.document.source : "";
|
|
983
990
|
for (let r of e.validationRules) {
|
|
984
991
|
if (r.error) {
|
|
985
|
-
t.push(
|
|
992
|
+
t.push(m(n, e.validationLineStarts, r.rule.range, y, h(`Validation expression is invalid: ${r.error.message}`)));
|
|
986
993
|
continue;
|
|
987
994
|
}
|
|
988
995
|
if (!r.expression) continue;
|
|
989
996
|
let i;
|
|
990
997
|
try {
|
|
991
|
-
i = r.expression.evaluate(
|
|
998
|
+
i = r.expression.evaluate(F);
|
|
992
999
|
} catch (i) {
|
|
993
|
-
t.push(
|
|
1000
|
+
t.push(m(n, e.validationLineStarts, r.rule.range, y, h(`Validation expression failed: ${i instanceof Error ? i.message : String(i)}`)));
|
|
994
1001
|
continue;
|
|
995
1002
|
}
|
|
996
|
-
typeof i == "boolean" ? i || t.push(
|
|
1003
|
+
typeof i == "boolean" ? i || t.push(m(n, e.validationLineStarts, r.rule.range, g, Se(r.rule.message))) : t.push(m(n, e.validationLineStarts, r.rule.range, y, "Validation expression must evaluate to a boolean."));
|
|
997
1004
|
}
|
|
998
1005
|
return t;
|
|
999
1006
|
}, Se = (e) => {
|
|
1000
1007
|
let t;
|
|
1001
1008
|
try {
|
|
1002
|
-
t = s(e,
|
|
1009
|
+
t = s(e, F);
|
|
1003
1010
|
} catch {
|
|
1004
|
-
t =
|
|
1011
|
+
t = v;
|
|
1005
1012
|
}
|
|
1006
1013
|
return h(t);
|
|
1007
1014
|
}, Ce = (e, t) => {
|
|
1008
|
-
if (q(), e ===
|
|
1015
|
+
if (q(), e === S.document) return $({
|
|
1009
1016
|
ok: !0,
|
|
1010
1017
|
changed: !1,
|
|
1011
|
-
revision:
|
|
1018
|
+
revision: P,
|
|
1012
1019
|
retained: [],
|
|
1013
1020
|
dropped: [],
|
|
1014
1021
|
diagnostics: []
|
|
@@ -1016,29 +1023,29 @@ function ye(e, t) {
|
|
|
1016
1023
|
if (oe(e)) return $({
|
|
1017
1024
|
ok: !1,
|
|
1018
1025
|
changed: !1,
|
|
1019
|
-
revision:
|
|
1026
|
+
revision: P,
|
|
1020
1027
|
retained: [],
|
|
1021
1028
|
dropped: [],
|
|
1022
1029
|
diagnostics: []
|
|
1023
1030
|
});
|
|
1024
1031
|
let n;
|
|
1025
1032
|
try {
|
|
1026
|
-
n = ae(e,
|
|
1033
|
+
n = ae(e, x);
|
|
1027
1034
|
} catch {
|
|
1028
1035
|
return $({
|
|
1029
1036
|
ok: !1,
|
|
1030
1037
|
changed: !1,
|
|
1031
|
-
revision:
|
|
1038
|
+
revision: P,
|
|
1032
1039
|
retained: [],
|
|
1033
1040
|
dropped: [],
|
|
1034
1041
|
diagnostics: []
|
|
1035
1042
|
});
|
|
1036
1043
|
}
|
|
1037
|
-
let r = de(
|
|
1044
|
+
let r = de(S, N, e, n, X);
|
|
1038
1045
|
if (Object.keys(r.values).length === 0 && Object.keys(e.bindings).length > 0) return $({
|
|
1039
1046
|
ok: !1,
|
|
1040
1047
|
changed: !1,
|
|
1041
|
-
revision:
|
|
1048
|
+
revision: P,
|
|
1042
1049
|
retained: [],
|
|
1043
1050
|
dropped: [],
|
|
1044
1051
|
diagnostics: []
|
|
@@ -1050,108 +1057,108 @@ function ye(e, t) {
|
|
|
1050
1057
|
return $({
|
|
1051
1058
|
ok: !1,
|
|
1052
1059
|
changed: !1,
|
|
1053
|
-
revision:
|
|
1060
|
+
revision: P,
|
|
1054
1061
|
retained: [],
|
|
1055
1062
|
dropped: [],
|
|
1056
1063
|
diagnostics: []
|
|
1057
1064
|
});
|
|
1058
1065
|
}
|
|
1059
|
-
for (let e of [
|
|
1060
|
-
let t =
|
|
1066
|
+
for (let e of [O, ...k.keys()]) {
|
|
1067
|
+
let t = A(n, e);
|
|
1061
1068
|
for (let t of Object.keys(e)) delete e[t];
|
|
1062
1069
|
Object.assign(e, t);
|
|
1063
1070
|
}
|
|
1064
|
-
if (
|
|
1071
|
+
if (S = n, N = r.values, F = i.environment, I = i.snapshotState, V = null, P += 1, Z(), t) for (let e of W) e();
|
|
1065
1072
|
return $({
|
|
1066
1073
|
ok: !0,
|
|
1067
1074
|
changed: !0,
|
|
1068
|
-
revision:
|
|
1075
|
+
revision: P,
|
|
1069
1076
|
retained: r.retained,
|
|
1070
1077
|
dropped: r.dropped,
|
|
1071
1078
|
diagnostics: r.diagnostics
|
|
1072
1079
|
});
|
|
1073
1080
|
}, we = (e) => {
|
|
1074
1081
|
let t = /* @__PURE__ */ new Set();
|
|
1075
|
-
for (let
|
|
1082
|
+
for (let n of i([e])) t.add(n.id);
|
|
1076
1083
|
return t;
|
|
1077
1084
|
}, Te = {
|
|
1078
|
-
network:
|
|
1085
|
+
network: d.network,
|
|
1079
1086
|
get document() {
|
|
1080
|
-
return
|
|
1087
|
+
return S.document;
|
|
1081
1088
|
},
|
|
1082
|
-
services:
|
|
1089
|
+
services: D,
|
|
1083
1090
|
snapshot() {
|
|
1084
|
-
return q(),
|
|
1091
|
+
return q(), R;
|
|
1085
1092
|
},
|
|
1086
1093
|
get(e, t) {
|
|
1087
1094
|
q();
|
|
1088
|
-
let n =
|
|
1095
|
+
let n = C(), r = n.nodeIndex.get(e.id);
|
|
1089
1096
|
if (!r) return null;
|
|
1090
|
-
let i = t === void 0 ? n.slotKeys.get(r.id)?.value ?? n.bindingByNode.get(r.id) ??
|
|
1091
|
-
return i && Object.hasOwn(
|
|
1097
|
+
let i = t === void 0 ? n.slotKeys.get(r.id)?.value ?? n.bindingByNode.get(r.id) ?? b(r) : n.slotKeys.get(r.id)?.[t];
|
|
1098
|
+
return i && Object.hasOwn(N, i) ? B(N[i]) : null;
|
|
1092
1099
|
},
|
|
1093
|
-
set(e, t,
|
|
1100
|
+
set(e, t, r) {
|
|
1094
1101
|
q();
|
|
1095
|
-
let i =
|
|
1096
|
-
if (!a) return [H(i.document, e, "local.runtime.binding",
|
|
1102
|
+
let i = C(), a = i.nodeIndex.get(e.id);
|
|
1103
|
+
if (!a) return [H(i.document, e, "local.runtime.binding", n("local.runtime.binding.no-writable"))];
|
|
1097
1104
|
let o = i.slotKeys.get(a.id), s;
|
|
1098
|
-
if (
|
|
1099
|
-
if (o && !o.value) return [H(i.document, a, "local.runtime.binding",
|
|
1100
|
-
s = o?.value ?? i.bindingByNode.get(a.id) ??
|
|
1101
|
-
} else if (s = o?.[
|
|
1105
|
+
if (r === void 0) {
|
|
1106
|
+
if (o && !o.value) return [H(i.document, a, "local.runtime.binding", n("local.runtime.binding.needs-slot"))];
|
|
1107
|
+
s = o?.value ?? i.bindingByNode.get(a.id) ?? b(a);
|
|
1108
|
+
} else if (s = o?.[r], !s) return [H(i.document, a, "local.runtime.binding", n("local.runtime.binding.unknown-slot", { slot: r }))];
|
|
1102
1109
|
let c = Object.hasOwn(i.document.bindings, s) ? i.document.bindings[s] : void 0;
|
|
1103
|
-
if (!c) return [H(i.document, a, "local.runtime.binding",
|
|
1104
|
-
let l =
|
|
1110
|
+
if (!c) return [H(i.document, a, "local.runtime.binding", n("local.runtime.binding.no-writable"))];
|
|
1111
|
+
let l = L(c, i.controls.get(s) ?? [], t, X({ [s]: t }), i.valueRules, i.legacyValueRules);
|
|
1105
1112
|
if (!l.ok) return [H(i.document, a, "local.runtime.value", l.detail)];
|
|
1106
|
-
let
|
|
1107
|
-
if (pe(
|
|
1108
|
-
let
|
|
1109
|
-
...
|
|
1110
|
-
[s]:
|
|
1113
|
+
let u = B(l.value);
|
|
1114
|
+
if (pe(N[s], u)) return [];
|
|
1115
|
+
let d = {
|
|
1116
|
+
...N,
|
|
1117
|
+
[s]: u
|
|
1111
1118
|
};
|
|
1112
|
-
return K(i, a.id,
|
|
1119
|
+
return K(i, a.id, d) ? [H(i.document, a, "local.runtime.value", n("local.runtime.value.range-order"))] : (Q(d), []);
|
|
1113
1120
|
},
|
|
1114
1121
|
setMany(e, t) {
|
|
1115
1122
|
q();
|
|
1116
|
-
let
|
|
1117
|
-
if (!i) return [H(
|
|
1118
|
-
let a =
|
|
1119
|
-
if (!a) return [H(
|
|
1123
|
+
let r = C(), i = r.nodeIndex.get(e.id);
|
|
1124
|
+
if (!i) return [H(r.document, e, "local.runtime.binding", n("local.runtime.binding.no-writable"))];
|
|
1125
|
+
let a = r.slotKeys.get(i.id);
|
|
1126
|
+
if (!a) return [H(r.document, i, "local.runtime.binding", n("local.runtime.binding.no-multi-slot"))];
|
|
1120
1127
|
let o = Object.entries(t);
|
|
1121
1128
|
if (!o.length) return [];
|
|
1122
|
-
let s = { ...
|
|
1123
|
-
...
|
|
1129
|
+
let s = { ...N }, c = J(r, {
|
|
1130
|
+
...N,
|
|
1124
1131
|
...Object.fromEntries(o.map(([e, t]) => [a[e], t]))
|
|
1125
1132
|
}).environment;
|
|
1126
1133
|
for (let [e, t] of o) {
|
|
1127
1134
|
let o = a[e];
|
|
1128
|
-
if (!o || !Object.hasOwn(
|
|
1129
|
-
let l =
|
|
1130
|
-
if (!l.ok) return [H(
|
|
1135
|
+
if (!o || !Object.hasOwn(r.document.bindings, o)) return [H(r.document, i, "local.runtime.binding", n("local.runtime.binding.unknown-slot", { slot: e }))];
|
|
1136
|
+
let l = L(r.document.bindings[o], r.controls.get(o) ?? [], t, (e, t) => M(e, t, c), r.valueRules, r.legacyValueRules);
|
|
1137
|
+
if (!l.ok) return [H(r.document, i, "local.runtime.value", l.detail)];
|
|
1131
1138
|
s[o] = B(l.value);
|
|
1132
1139
|
}
|
|
1133
|
-
return K(
|
|
1140
|
+
return K(r, i.id, s) ? [H(r.document, i, "local.runtime.value", n("local.runtime.value.range-order"))] : (o.every(([e, t]) => pe(N[a[e]], t)) || Q(s), []);
|
|
1134
1141
|
},
|
|
1135
1142
|
parameterNames() {
|
|
1136
|
-
return q(),
|
|
1143
|
+
return q(), C().publicNames;
|
|
1137
1144
|
},
|
|
1138
1145
|
getParameter(e) {
|
|
1139
1146
|
q();
|
|
1140
|
-
let t = le(
|
|
1147
|
+
let t = le(C(), e);
|
|
1141
1148
|
return t === void 0 ? void 0 : B(t);
|
|
1142
1149
|
},
|
|
1143
1150
|
getParameters() {
|
|
1144
1151
|
q();
|
|
1145
|
-
let e =
|
|
1152
|
+
let e = C(), t = {};
|
|
1146
1153
|
for (let n of e.publicNames) {
|
|
1147
|
-
let e =
|
|
1154
|
+
let e = N[n];
|
|
1148
1155
|
t[n] = Array.isArray(e) ? Object.freeze([...e]) : e;
|
|
1149
1156
|
}
|
|
1150
1157
|
return Object.freeze(t);
|
|
1151
1158
|
},
|
|
1152
1159
|
readSubmissionFields(e) {
|
|
1153
1160
|
q();
|
|
1154
|
-
let t =
|
|
1161
|
+
let t = C(), n = /* @__PURE__ */ new Map(), r = (e, n) => M(e, n, F, t);
|
|
1155
1162
|
if (e.length === 0) return {
|
|
1156
1163
|
ok: !1,
|
|
1157
1164
|
field: "",
|
|
@@ -1164,7 +1171,7 @@ function ye(e, t) {
|
|
|
1164
1171
|
field: i,
|
|
1165
1172
|
reason: "unavailable"
|
|
1166
1173
|
};
|
|
1167
|
-
let a =
|
|
1174
|
+
let a = L(t.document.bindings[i], t.controls.get(i) ?? [], e, r, t.valueRules, t.legacyValueRules);
|
|
1168
1175
|
if (!a.ok) {
|
|
1169
1176
|
let e = a.detail.key;
|
|
1170
1177
|
return {
|
|
@@ -1177,7 +1184,7 @@ function ye(e, t) {
|
|
|
1177
1184
|
}
|
|
1178
1185
|
let i = Object.create(null);
|
|
1179
1186
|
for (let [e, r] of n) {
|
|
1180
|
-
for (let [n, i] of
|
|
1187
|
+
for (let [n, i] of f.get(e) ?? []) {
|
|
1181
1188
|
if (!t.controls.get(e)?.some((e) => e.id === i)) continue;
|
|
1182
1189
|
let a = n(B(r));
|
|
1183
1190
|
if (a) return {
|
|
@@ -1195,11 +1202,11 @@ function ye(e, t) {
|
|
|
1195
1202
|
},
|
|
1196
1203
|
registerSubmissionField(e, t) {
|
|
1197
1204
|
if (z) return () => {};
|
|
1198
|
-
let n =
|
|
1205
|
+
let n = C(), r = n.slotKeys.get(e.id)?.value ?? n.bindingByNode.get(e.id);
|
|
1199
1206
|
if (!r || r.startsWith("@")) return () => {};
|
|
1200
|
-
let i =
|
|
1201
|
-
return i ||
|
|
1202
|
-
i.delete(t), i.size === 0 &&
|
|
1207
|
+
let i = f.get(r);
|
|
1208
|
+
return i || f.set(r, i = /* @__PURE__ */ new Map()), i.set(t, e.id), () => {
|
|
1209
|
+
i.delete(t), i.size === 0 && f.get(r) === i && f.delete(r);
|
|
1203
1210
|
};
|
|
1204
1211
|
},
|
|
1205
1212
|
setParameter(e, t) {
|
|
@@ -1212,12 +1219,12 @@ function ye(e, t) {
|
|
|
1212
1219
|
return ye(e);
|
|
1213
1220
|
},
|
|
1214
1221
|
getExternal(e) {
|
|
1215
|
-
if (q(), Object.hasOwn(
|
|
1222
|
+
if (q(), Object.hasOwn(C().document.externals ?? {}, e) && Object.hasOwn(I, e)) return B(I[e]);
|
|
1216
1223
|
},
|
|
1217
1224
|
getExternalValues() {
|
|
1218
1225
|
q();
|
|
1219
1226
|
let e = {};
|
|
1220
|
-
for (let [t, n] of Object.entries(
|
|
1227
|
+
for (let [t, n] of Object.entries(j(C()))) e[t] = Array.isArray(n) ? Object.freeze([...n]) : n;
|
|
1221
1228
|
return Object.freeze(e);
|
|
1222
1229
|
},
|
|
1223
1230
|
setExternalValues(e) {
|
|
@@ -1225,37 +1232,37 @@ function ye(e, t) {
|
|
|
1225
1232
|
},
|
|
1226
1233
|
evaluate(e) {
|
|
1227
1234
|
q();
|
|
1228
|
-
let t = be(e).evaluate(
|
|
1235
|
+
let t = be(e).evaluate(F);
|
|
1229
1236
|
return Array.isArray(t) ? t.slice() : t;
|
|
1230
1237
|
},
|
|
1231
1238
|
validate() {
|
|
1232
|
-
if (q(), V && V.revision ===
|
|
1239
|
+
if (q(), V && V.revision === P) return V.diagnostics.map(fe);
|
|
1233
1240
|
let e = xe();
|
|
1234
1241
|
return V = {
|
|
1235
|
-
revision:
|
|
1242
|
+
revision: P,
|
|
1236
1243
|
diagnostics: e
|
|
1237
1244
|
}, e.map(fe);
|
|
1238
1245
|
},
|
|
1239
1246
|
text(e) {
|
|
1240
|
-
return q(), s(e,
|
|
1247
|
+
return q(), s(e, F);
|
|
1241
1248
|
},
|
|
1242
1249
|
reset(e) {
|
|
1243
1250
|
q();
|
|
1244
|
-
let t =
|
|
1251
|
+
let t = C(), n = t.nodeIndex.get(e.id);
|
|
1245
1252
|
if (!n) return;
|
|
1246
|
-
let
|
|
1253
|
+
let i = we(n), s = { ...N };
|
|
1247
1254
|
for (let [e, n] of Object.entries(t.document.bindings)) {
|
|
1248
|
-
if (!(t.controls.get(e) ?? []).some((e) =>
|
|
1255
|
+
if (!(t.controls.get(e) ?? []).some((e) => i.has(e.id))) continue;
|
|
1249
1256
|
let c = o(n.initial);
|
|
1250
|
-
if (c) throw new a("expression-budget", `Parameter "${e}": ${
|
|
1257
|
+
if (c) throw new a("expression-budget", `Parameter "${e}": ${r(c)}`, 0);
|
|
1251
1258
|
s[e] = B(n.initial);
|
|
1252
1259
|
}
|
|
1253
|
-
for (let e of
|
|
1260
|
+
for (let e of i) G.set(e, (G.get(e) ?? 0) + 1);
|
|
1254
1261
|
Q(s);
|
|
1255
1262
|
},
|
|
1256
1263
|
resetToken(e) {
|
|
1257
1264
|
q();
|
|
1258
|
-
let t =
|
|
1265
|
+
let t = C().nodeIndex.get(e.id);
|
|
1259
1266
|
return t ? G.get(t.id) ?? 0 : 0;
|
|
1260
1267
|
},
|
|
1261
1268
|
subscribe(e) {
|
|
@@ -1265,9 +1272,9 @@ function ye(e, t) {
|
|
|
1265
1272
|
},
|
|
1266
1273
|
dispose() {
|
|
1267
1274
|
if (!z) {
|
|
1268
|
-
z = !0,
|
|
1269
|
-
for (let e of
|
|
1270
|
-
|
|
1275
|
+
z = !0, d.dispose();
|
|
1276
|
+
for (let e of k.values()) e();
|
|
1277
|
+
k.clear(), f.clear(), D.state.flush(), u && D.scheduler.dispose(), W.clear(), _.clear(), x.clear(), S.computationExpressions.clear(), S.constErrors.clear(), S.cycleErrors.clear(), S.validationRules.length = 0, G.clear();
|
|
1271
1278
|
}
|
|
1272
1279
|
}
|
|
1273
1280
|
};
|
|
@@ -1277,6 +1284,6 @@ function ye(e, t) {
|
|
|
1277
1284
|
notify() {
|
|
1278
1285
|
if (!z) for (let e of W) e();
|
|
1279
1286
|
}
|
|
1280
|
-
}), Y(), Z(), ve(
|
|
1287
|
+
}), Y(), Z(), ve(d), Te;
|
|
1281
1288
|
}
|
|
1282
1289
|
export { Q as a, ge as i, ye as n, Z as o, _e as r, ve as t };
|