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,1121 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, F as n, I as r, N as i, Q as a, R as o, X as s, Z as c, a as l, i as u, it as d, q as f, st as p, t as m } from "./preset-core-CKc5YXSM.js";
|
|
2
|
-
import { D as h, E as g, O as _, T as v, V as y, _ as b, a as x, c as S, d as C, h as w, i as T, m as ee, n as E, o as te, p as ne, r as D, s as re, t as ie, v as ae, y as O } from "./config-validation-F47AcE6o.js";
|
|
3
|
-
import { a as k, n as oe, s as se, t as ce } from "./compile-wUv8KEge.js";
|
|
4
|
-
import { n as le } from "./props-sJ8vk0cr.js";
|
|
5
|
-
import { p as ue, r as de, x as fe } from "./registry-core-Bbad9Bm2.js";
|
|
6
|
-
// node_modules/devlop/lib/default.js
|
|
7
|
-
function pe() {}
|
|
8
|
-
// node_modules/mdast-util-to-string/lib/index.js
|
|
9
|
-
var me = {};
|
|
10
|
-
function he(e, t) {
|
|
11
|
-
let n = t || me;
|
|
12
|
-
return ge(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
|
|
13
|
-
}
|
|
14
|
-
function ge(e, t, n) {
|
|
15
|
-
if (ve(e)) {
|
|
16
|
-
if ("value" in e) return e.type === "html" && !n ? "" : e.value;
|
|
17
|
-
if (t && "alt" in e && e.alt) return e.alt;
|
|
18
|
-
if ("children" in e) return _e(e.children, t, n);
|
|
19
|
-
}
|
|
20
|
-
return Array.isArray(e) ? _e(e, t, n) : "";
|
|
21
|
-
}
|
|
22
|
-
function _e(e, t, n) {
|
|
23
|
-
let r = [], i = -1;
|
|
24
|
-
for (; ++i < e.length;) r[i] = ge(e[i], t, n);
|
|
25
|
-
return r.join("");
|
|
26
|
-
}
|
|
27
|
-
function ve(e) {
|
|
28
|
-
return !!(e && typeof e == "object");
|
|
29
|
-
}
|
|
30
|
-
// node_modules/micromark-util-chunked/index.js
|
|
31
|
-
function A(e, t, n, r) {
|
|
32
|
-
let i = e.length, a = 0, o;
|
|
33
|
-
if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
|
|
34
|
-
else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
|
|
35
|
-
}
|
|
36
|
-
function ye(e, t) {
|
|
37
|
-
return e.length > 0 ? (A(e, e.length, 0, t), e) : t;
|
|
38
|
-
}
|
|
39
|
-
// node_modules/micromark-util-combine-extensions/index.js
|
|
40
|
-
var j = {}.hasOwnProperty;
|
|
41
|
-
function be(e) {
|
|
42
|
-
let t = {}, n = -1;
|
|
43
|
-
for (; ++n < e.length;) xe(t, e[n]);
|
|
44
|
-
return t;
|
|
45
|
-
}
|
|
46
|
-
function xe(e, t) {
|
|
47
|
-
let n;
|
|
48
|
-
for (n in t) {
|
|
49
|
-
let r = (j.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
|
|
50
|
-
if (i) for (a in i) {
|
|
51
|
-
j.call(r, a) || (r[a] = []);
|
|
52
|
-
let e = i[a];
|
|
53
|
-
Se(r[a], Array.isArray(e) ? e : e ? [e] : []);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function Se(e, t) {
|
|
58
|
-
let n = -1, r = [];
|
|
59
|
-
for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
|
|
60
|
-
A(e, 0, 0, r);
|
|
61
|
-
}
|
|
62
|
-
// node_modules/micromark-util-normalize-identifier/index.js
|
|
63
|
-
function Ce(e) {
|
|
64
|
-
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
65
|
-
}
|
|
66
|
-
// node_modules/micromark-util-character/index.js
|
|
67
|
-
var we = L(/[A-Za-z]/), Te = L(/[\dA-Za-z]/), Ee = L(/[#-'*+\--9=?A-Z^-~]/);
|
|
68
|
-
function De(e) {
|
|
69
|
-
return e !== null && (e < 32 || e === 127);
|
|
70
|
-
}
|
|
71
|
-
var Oe = L(/\d/), ke = L(/[\dA-Fa-f]/), Ae = L(/[!-/:-@[-`{-~]/);
|
|
72
|
-
function M(e) {
|
|
73
|
-
return e !== null && e < -2;
|
|
74
|
-
}
|
|
75
|
-
function N(e) {
|
|
76
|
-
return e !== null && (e < 0 || e === 32);
|
|
77
|
-
}
|
|
78
|
-
function P(e) {
|
|
79
|
-
return e === -2 || e === -1 || e === 32;
|
|
80
|
-
}
|
|
81
|
-
var F = L(/\p{P}|\p{S}/u), I = L(/\s/);
|
|
82
|
-
function L(e) {
|
|
83
|
-
return t;
|
|
84
|
-
function t(t) {
|
|
85
|
-
return t !== null && t > -1 && e.test(String.fromCharCode(t));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// node_modules/micromark-factory-space/index.js
|
|
89
|
-
function R(e, t, n, r) {
|
|
90
|
-
let i = r ? r - 1 : Infinity, a = 0;
|
|
91
|
-
return o;
|
|
92
|
-
function o(r) {
|
|
93
|
-
return P(r) ? (e.enter(n), s(r)) : t(r);
|
|
94
|
-
}
|
|
95
|
-
function s(r) {
|
|
96
|
-
return P(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function je(e, t, n, r, i, a) {
|
|
100
|
-
let o = 0;
|
|
101
|
-
return s;
|
|
102
|
-
function s(t) {
|
|
103
|
-
return a > 0 && P(t) ? (e.enter(r), c(t)) : l(t);
|
|
104
|
-
}
|
|
105
|
-
function c(t) {
|
|
106
|
-
return P(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
|
|
107
|
-
}
|
|
108
|
-
function l(e) {
|
|
109
|
-
return o >= i ? t(e) : n(e);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
// node_modules/micromark-util-classify-character/index.js
|
|
113
|
-
function Me(e) {
|
|
114
|
-
if (e === null || N(e) || I(e)) return 1;
|
|
115
|
-
if (F(e)) return 2;
|
|
116
|
-
}
|
|
117
|
-
// node_modules/micromark-util-resolve-all/index.js
|
|
118
|
-
function Ne(e, t, n) {
|
|
119
|
-
let r = [], i = -1;
|
|
120
|
-
for (; ++i < e.length;) {
|
|
121
|
-
let a = e[i].resolveAll;
|
|
122
|
-
a && !r.includes(a) && (t = a(t, n), r.push(a));
|
|
123
|
-
}
|
|
124
|
-
return t;
|
|
125
|
-
}
|
|
126
|
-
// node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
127
|
-
var Pe = {
|
|
128
|
-
partial: !0,
|
|
129
|
-
tokenize: Fe
|
|
130
|
-
};
|
|
131
|
-
function Fe(e, t, n) {
|
|
132
|
-
return r;
|
|
133
|
-
function r(t) {
|
|
134
|
-
return P(t) ? R(e, i, "linePrefix")(t) : i(t);
|
|
135
|
-
}
|
|
136
|
-
function i(e) {
|
|
137
|
-
return e === null || M(e) ? t(e) : n(e);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
// src/local/html/html-table-names.ts
|
|
141
|
-
var Ie = /* @__PURE__ */ new Set([
|
|
142
|
-
"table",
|
|
143
|
-
"caption",
|
|
144
|
-
"colgroup",
|
|
145
|
-
"col",
|
|
146
|
-
"thead",
|
|
147
|
-
"tbody",
|
|
148
|
-
"tfoot",
|
|
149
|
-
"tr",
|
|
150
|
-
"th",
|
|
151
|
-
"td"
|
|
152
|
-
]), z = {
|
|
153
|
-
colgroup: /* @__PURE__ */ new Set(["span"]),
|
|
154
|
-
col: /* @__PURE__ */ new Set(["span"]),
|
|
155
|
-
td: /* @__PURE__ */ new Set([
|
|
156
|
-
"colspan",
|
|
157
|
-
"rowspan",
|
|
158
|
-
"headers",
|
|
159
|
-
"align"
|
|
160
|
-
]),
|
|
161
|
-
th: /* @__PURE__ */ new Set([
|
|
162
|
-
"colspan",
|
|
163
|
-
"rowspan",
|
|
164
|
-
"headers",
|
|
165
|
-
"scope",
|
|
166
|
-
"abbr",
|
|
167
|
-
"align"
|
|
168
|
-
])
|
|
169
|
-
};
|
|
170
|
-
function B(e, t) {
|
|
171
|
-
let n = t.trim();
|
|
172
|
-
return [
|
|
173
|
-
"colspan",
|
|
174
|
-
"rowspan",
|
|
175
|
-
"span"
|
|
176
|
-
].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? _(t) !== null : e !== "scope" || [
|
|
177
|
-
"row",
|
|
178
|
-
"col",
|
|
179
|
-
"rowgroup",
|
|
180
|
-
"colgroup"
|
|
181
|
-
].includes(n.toLowerCase());
|
|
182
|
-
}
|
|
183
|
-
// src/local/html/html-policy.ts
|
|
184
|
-
var Le = {
|
|
185
|
-
b: "strong",
|
|
186
|
-
strong: "strong",
|
|
187
|
-
i: "emphasis",
|
|
188
|
-
em: "emphasis",
|
|
189
|
-
s: "delete",
|
|
190
|
-
del: "delete",
|
|
191
|
-
u: "underline",
|
|
192
|
-
mark: "mark",
|
|
193
|
-
sup: "sup",
|
|
194
|
-
sub: "sub"
|
|
195
|
-
}, Re = /* @__PURE__ */ new Set([
|
|
196
|
-
"br",
|
|
197
|
-
"hr",
|
|
198
|
-
"img",
|
|
199
|
-
"col"
|
|
200
|
-
]), ze = /* @__PURE__ */ new Set([
|
|
201
|
-
"pre",
|
|
202
|
-
"code",
|
|
203
|
-
"script",
|
|
204
|
-
"style",
|
|
205
|
-
"textarea",
|
|
206
|
-
"title",
|
|
207
|
-
"xmp",
|
|
208
|
-
"iframe",
|
|
209
|
-
"noembed",
|
|
210
|
-
"noframes",
|
|
211
|
-
"plaintext"
|
|
212
|
-
]), Be = /* @__PURE__ */ new Set([
|
|
213
|
-
"id",
|
|
214
|
-
"title",
|
|
215
|
-
"lang",
|
|
216
|
-
"dir"
|
|
217
|
-
]), Ve = {
|
|
218
|
-
a: g,
|
|
219
|
-
img: /* @__PURE__ */ new Set([
|
|
220
|
-
"src",
|
|
221
|
-
"alt",
|
|
222
|
-
"width",
|
|
223
|
-
"height"
|
|
224
|
-
]),
|
|
225
|
-
ol: /* @__PURE__ */ new Set(["start"]),
|
|
226
|
-
details: /* @__PURE__ */ new Set(["open"]),
|
|
227
|
-
...z
|
|
228
|
-
};
|
|
229
|
-
function He(e, t, n) {
|
|
230
|
-
let r = "";
|
|
231
|
-
for (let i = t; i < n; i += 1) {
|
|
232
|
-
let t = e[i];
|
|
233
|
-
if (r) t === r && (r = "");
|
|
234
|
-
else if (t === "\"" || t === "'") r = t;
|
|
235
|
-
else if (t === ">") return i + 1;
|
|
236
|
-
}
|
|
237
|
-
return -1;
|
|
238
|
-
}
|
|
239
|
-
function Ue(e, t, n) {
|
|
240
|
-
if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
|
|
241
|
-
if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
|
|
242
|
-
let r = e.indexOf("-->", t + 4);
|
|
243
|
-
return r < 0 || r + 3 > n ? n : r + 3;
|
|
244
|
-
}
|
|
245
|
-
function We(e) {
|
|
246
|
-
return e.trim().replace(/[\u0000- ]+/g, "");
|
|
247
|
-
}
|
|
248
|
-
function V(e, t) {
|
|
249
|
-
let n = /^([a-z][a-z0-9+.-]*):/i.exec(We(e));
|
|
250
|
-
if (!n) return !1;
|
|
251
|
-
let r = n[1].toLowerCase();
|
|
252
|
-
return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
|
|
253
|
-
}
|
|
254
|
-
function Ge(e, t) {
|
|
255
|
-
return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && v.has(e) || Be.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : Ve[e]?.has(t) ?? !1;
|
|
256
|
-
}
|
|
257
|
-
function Ke(e, t) {
|
|
258
|
-
return !(e === "dir" && ![
|
|
259
|
-
"ltr",
|
|
260
|
-
"rtl",
|
|
261
|
-
"auto"
|
|
262
|
-
].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !B(e, t) || e === "href" && V(t, "link") || e === "src" && V(t, "image"));
|
|
263
|
-
}
|
|
264
|
-
function qe(e, t) {
|
|
265
|
-
return v.has(e) ? _(t) : null;
|
|
266
|
-
}
|
|
267
|
-
// src/local/types.ts
|
|
268
|
-
var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.freeze({}), Ze = Object.freeze([
|
|
269
|
-
"anchor",
|
|
270
|
-
"checkbox",
|
|
271
|
-
"column",
|
|
272
|
-
"coordinate",
|
|
273
|
-
"counter",
|
|
274
|
-
"date",
|
|
275
|
-
"edge",
|
|
276
|
-
"input",
|
|
277
|
-
"number",
|
|
278
|
-
"progress",
|
|
279
|
-
"range-slider",
|
|
280
|
-
"slider",
|
|
281
|
-
"textarea",
|
|
282
|
-
"timer",
|
|
283
|
-
"toggle",
|
|
284
|
-
"validation"
|
|
285
|
-
]);
|
|
286
|
-
function Qe(e) {
|
|
287
|
-
let t = /* @__PURE__ */ new Set();
|
|
288
|
-
for (let n of Ze) e(n) || t.add(n);
|
|
289
|
-
return t;
|
|
290
|
-
}
|
|
291
|
-
// src/sdk/compiler-config.ts
|
|
292
|
-
var H = Object.freeze({
|
|
293
|
-
id: u,
|
|
294
|
-
version: l
|
|
295
|
-
}), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap();
|
|
296
|
-
function G(e, t = H) {
|
|
297
|
-
if (e.length === 0) return;
|
|
298
|
-
let n = t.id === H.id && t.version === H.version;
|
|
299
|
-
if (n) {
|
|
300
|
-
let t = U.get(e);
|
|
301
|
-
if (t) return t;
|
|
302
|
-
}
|
|
303
|
-
let r = m({
|
|
304
|
-
protocol: o,
|
|
305
|
-
id: t.id,
|
|
306
|
-
version: t.version,
|
|
307
|
-
components: e
|
|
308
|
-
});
|
|
309
|
-
return n && U.set(e, r), r;
|
|
310
|
-
}
|
|
311
|
-
function $e(e, t, n, r, i = "reactive-md-config/v1") {
|
|
312
|
-
let a = w(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
|
|
313
|
-
profile: i,
|
|
314
|
-
key: r
|
|
315
|
-
})] : []];
|
|
316
|
-
return C(e, a, o);
|
|
317
|
-
}
|
|
318
|
-
function et(e) {
|
|
319
|
-
return x(e) || T("assembly", "must be an object."), D(e, /* @__PURE__ */ new Set([
|
|
320
|
-
"protocol",
|
|
321
|
-
"presets",
|
|
322
|
-
"components",
|
|
323
|
-
"replacementPolicy",
|
|
324
|
-
"themes"
|
|
325
|
-
]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && T("assembly.protocol", `must be "${i}".`), ee(e);
|
|
326
|
-
}
|
|
327
|
-
function tt(e, a = [], o = []) {
|
|
328
|
-
let s = ae(o);
|
|
329
|
-
if (x(e) || T("config", "must be an object."), D(e, ie, "config"), e.protocol === "reactive-md-config/v2") {
|
|
330
|
-
let n = et(e.assembly), r = $e(n, a, s);
|
|
331
|
-
return t(n) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), r;
|
|
332
|
-
}
|
|
333
|
-
e.protocol !== "reactive-md-config/v1" && T("config.protocol", `must be "${r}" (or legacy "${n}").`);
|
|
334
|
-
let c = re(e.presets, H, s)[0] ?? H, l = b(c, s);
|
|
335
|
-
l === void 0 && T("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${c.id}" ${c.version}.`);
|
|
336
|
-
let u = l.legacyKeys[0];
|
|
337
|
-
u === void 0 && T("presets", `local.config.migration-unsupported: profile "${l.name}" has no legacy key mapping.`), S(l, a);
|
|
338
|
-
let d = te(e.components, a);
|
|
339
|
-
d.some((e) => e.replaces !== void 0) && T("config", "replaces is not supported by reactive-md-config/v1.");
|
|
340
|
-
let f = G(a, l.preset), p = Object.freeze({
|
|
341
|
-
protocol: i,
|
|
342
|
-
presets: Object.freeze(f ? [f] : []),
|
|
343
|
-
components: d,
|
|
344
|
-
replacementPolicy: "forbid",
|
|
345
|
-
themes: Object.freeze([])
|
|
346
|
-
}), m = $e(p, a, s, a.length > 0 ? ne(l.preset, d) : void 0, u.profile);
|
|
347
|
-
return t(p) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), m;
|
|
348
|
-
}
|
|
349
|
-
function nt(e) {
|
|
350
|
-
let t = W.get(e);
|
|
351
|
-
if (t !== void 0) return t;
|
|
352
|
-
let n = G(e), r = Object.freeze({
|
|
353
|
-
protocol: i,
|
|
354
|
-
presets: Object.freeze(n ? [n] : []),
|
|
355
|
-
components: Object.freeze([]),
|
|
356
|
-
replacementPolicy: "forbid",
|
|
357
|
-
themes: Object.freeze([])
|
|
358
|
-
}), a = w(r).key;
|
|
359
|
-
return W.set(e, a), a;
|
|
360
|
-
}
|
|
361
|
-
// src/local/configuration/capability-policy.ts
|
|
362
|
-
var K = Object.freeze({
|
|
363
|
-
enableCss: !0,
|
|
364
|
-
enableJavaScript: !1,
|
|
365
|
-
enableExtendedHtml: !1
|
|
366
|
-
});
|
|
367
|
-
function rt(e, t) {
|
|
368
|
-
return {
|
|
369
|
-
enableCss: e?.enableCss === !0 && (t?.enableCss ?? K.enableCss) === !0,
|
|
370
|
-
enableJavaScript: e?.enableJavaScript === !0 && t?.enableJavaScript === !0,
|
|
371
|
-
enableExtendedHtml: e?.enableExtendedHtml === !0 && t?.enableExtendedHtml === !0
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
// src/local/configuration/options-core.ts
|
|
375
|
-
var it = [
|
|
376
|
-
"enableCss",
|
|
377
|
-
"enableJavaScript",
|
|
378
|
-
"enableExtendedHtml"
|
|
379
|
-
], at = H;
|
|
380
|
-
function q(e) {
|
|
381
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
382
|
-
}
|
|
383
|
-
var ot = "local.options.invalid.host-components", st = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ct = /* @__PURE__ */ new Set([
|
|
384
|
-
"string",
|
|
385
|
-
"number",
|
|
386
|
-
"boolean",
|
|
387
|
-
"enum"
|
|
388
|
-
]), lt = /* @__PURE__ */ new Set([
|
|
389
|
-
"leaf",
|
|
390
|
-
"inline",
|
|
391
|
-
"container"
|
|
392
|
-
]), ut = /* @__PURE__ */ new Set([
|
|
393
|
-
"string",
|
|
394
|
-
"number",
|
|
395
|
-
"boolean"
|
|
396
|
-
]), dt = /* @__PURE__ */ new Set([
|
|
397
|
-
"bind",
|
|
398
|
-
"initial",
|
|
399
|
-
"disabled"
|
|
400
|
-
]), ft = /* @__PURE__ */ new Set([
|
|
401
|
-
"maxSyntaxNodes",
|
|
402
|
-
"maxParseWork",
|
|
403
|
-
"maxMarkdownDepth"
|
|
404
|
-
]);
|
|
405
|
-
function J(e, t, n) {
|
|
406
|
-
if (!Object.hasOwn(e, t)) return {
|
|
407
|
-
ok: !0,
|
|
408
|
-
value: n
|
|
409
|
-
};
|
|
410
|
-
let r = e[t];
|
|
411
|
-
if (r === void 0) return {
|
|
412
|
-
ok: !0,
|
|
413
|
-
value: n
|
|
414
|
-
};
|
|
415
|
-
if (typeof r != "number" || !Number.isSafeInteger(r) || r < 1) {
|
|
416
|
-
let e = t === "maxSyntaxNodes" ? "max-syntax-nodes" : t === "maxParseWork" ? "max-parse-work" : "max-markdown-depth";
|
|
417
|
-
return {
|
|
418
|
-
ok: !1,
|
|
419
|
-
message: `Compile option limits.${t} must be a positive safe integer.`,
|
|
420
|
-
key: `local.options.invalid.${e}`
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
return {
|
|
424
|
-
ok: !0,
|
|
425
|
-
value: r
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
function Y(e) {
|
|
429
|
-
return {
|
|
430
|
-
ok: !1,
|
|
431
|
-
message: `Compile option hostComponents is invalid: ${e}`,
|
|
432
|
-
key: ot,
|
|
433
|
-
detail: e
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
function pt(e, t) {
|
|
437
|
-
if (e === void 0) return {
|
|
438
|
-
ok: !0,
|
|
439
|
-
binding: void 0
|
|
440
|
-
};
|
|
441
|
-
if (!q(e)) return Y(`${t} "binding" must be an object.`);
|
|
442
|
-
for (let n of Object.keys(e)) if (![
|
|
443
|
-
"kind",
|
|
444
|
-
"initialRule",
|
|
445
|
-
"min",
|
|
446
|
-
"max",
|
|
447
|
-
"step",
|
|
448
|
-
"options",
|
|
449
|
-
"exclusive"
|
|
450
|
-
].includes(n)) return Y(`${t} "binding" has unknown field "${n}".`);
|
|
451
|
-
let n = e.kind;
|
|
452
|
-
if (typeof n != "string" || !ut.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
|
|
453
|
-
let r = { kind: n };
|
|
454
|
-
if (Object.hasOwn(e, "exclusive") && e.exclusive !== void 0) {
|
|
455
|
-
if (typeof e.exclusive != "boolean") return Y(`${t} "binding.exclusive" must be a boolean.`);
|
|
456
|
-
r.exclusive = e.exclusive;
|
|
457
|
-
}
|
|
458
|
-
if (Object.hasOwn(e, "initialRule") && e.initialRule !== void 0) {
|
|
459
|
-
let n = e.initialRule;
|
|
460
|
-
if (typeof n != "string" || ![
|
|
461
|
-
"empty",
|
|
462
|
-
"false",
|
|
463
|
-
"nearest-zero",
|
|
464
|
-
"min",
|
|
465
|
-
"first-option"
|
|
466
|
-
].includes(n)) return Y(`${t} "binding.initialRule" is not supported.`);
|
|
467
|
-
r.initialRule = n;
|
|
468
|
-
}
|
|
469
|
-
for (let n of [
|
|
470
|
-
"min",
|
|
471
|
-
"max",
|
|
472
|
-
"step"
|
|
473
|
-
]) {
|
|
474
|
-
if (!Object.hasOwn(e, n) || e[n] === void 0) continue;
|
|
475
|
-
if (r.kind !== "number") return Y(`${t} "binding.${n}" is only valid for number bindings.`);
|
|
476
|
-
let i = e[n];
|
|
477
|
-
if (typeof i != "number" || !Number.isFinite(i)) return Y(`${t} "binding.${n}" must be a finite number.`);
|
|
478
|
-
r[n] = i;
|
|
479
|
-
}
|
|
480
|
-
if (r.kind === "number") {
|
|
481
|
-
if (r.step !== void 0 && !(r.step > 0)) return Y(`${t} "binding.step" must be greater than 0.`);
|
|
482
|
-
if (r.min !== void 0 && r.max !== void 0 && r.min > r.max) return Y(`${t} "binding.min" cannot exceed "binding.max".`);
|
|
483
|
-
if (r.initialRule !== void 0 && !["min", "nearest-zero"].includes(r.initialRule)) return Y(`${t} "binding.initialRule" must be "min" or "nearest-zero" for number bindings.`);
|
|
484
|
-
r.initialRule ??= "nearest-zero";
|
|
485
|
-
}
|
|
486
|
-
let i = Object.hasOwn(e, "options") && e.options !== void 0;
|
|
487
|
-
if (i) {
|
|
488
|
-
if (r.kind !== "string") return Y(`${t} "binding.options" is only valid for string bindings.`);
|
|
489
|
-
let n = e.options;
|
|
490
|
-
if (!Array.isArray(n) || n.length === 0) return Y(`${t} "binding.options" must be a non-empty string array.`);
|
|
491
|
-
if (n.length > 64) return Y(`${t} "binding.options" accepts at most 64 values.`);
|
|
492
|
-
let i = /* @__PURE__ */ new Set(), a = [];
|
|
493
|
-
for (let e of n) {
|
|
494
|
-
if (typeof e != "string" || e === "") return Y(`${t} "binding.options" must be a non-empty string array.`);
|
|
495
|
-
if (e.length > 128) return Y(`${t} "binding.options" value exceeds the 128-character limit.`);
|
|
496
|
-
if (i.has(e)) return Y(`${t} "binding.options" value "${e}" is declared more than once.`);
|
|
497
|
-
i.add(e), a.push(e);
|
|
498
|
-
}
|
|
499
|
-
r.options = a, r.initialRule ??= "first-option";
|
|
500
|
-
}
|
|
501
|
-
if (r.kind === "string") {
|
|
502
|
-
let e = i ? "first-option" : "empty";
|
|
503
|
-
if (r.initialRule !== void 0 && r.initialRule !== e) return Y(`${t} "binding.initialRule" must be "${e}" for ${i ? "choice" : "string"} bindings.`);
|
|
504
|
-
r.initialRule ??= e;
|
|
505
|
-
}
|
|
506
|
-
if (r.kind === "boolean") {
|
|
507
|
-
if (r.initialRule !== void 0 && r.initialRule !== "false") return Y(`${t} "binding.initialRule" must be "false" for boolean bindings.`);
|
|
508
|
-
r.initialRule ??= "false";
|
|
509
|
-
}
|
|
510
|
-
return {
|
|
511
|
-
ok: !0,
|
|
512
|
-
binding: r
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
function mt(e, t) {
|
|
516
|
-
let n = [], r = /* @__PURE__ */ new Map();
|
|
517
|
-
if (e === void 0) return {
|
|
518
|
-
ok: !0,
|
|
519
|
-
hostComponents: n,
|
|
520
|
-
hostByName: r
|
|
521
|
-
};
|
|
522
|
-
if (!Array.isArray(e)) return Y("must be an array.");
|
|
523
|
-
if (e.length > 32) return Y("accepts at most 32 components.");
|
|
524
|
-
let i = /* @__PURE__ */ new Set();
|
|
525
|
-
for (let e of t) i.add(e.name.toLowerCase());
|
|
526
|
-
for (let e of O) i.add(e.name.toLowerCase());
|
|
527
|
-
for (let e of h) i.add(e.toLowerCase());
|
|
528
|
-
i.add("theme");
|
|
529
|
-
for (let t = 0; t < e.length; t += 1) {
|
|
530
|
-
let a = e[t], o = `hostComponents[${t}]`;
|
|
531
|
-
if (!q(a)) return Y(`${o} must be an object.`);
|
|
532
|
-
let s = a.name;
|
|
533
|
-
if (typeof s != "string") return Y(`${o} "name" must be a string.`);
|
|
534
|
-
if (s.length > 128) return Y(`${o} "name" exceeds the 128-character limit.`);
|
|
535
|
-
if (!st.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
|
|
536
|
-
if (i.has(s.toLowerCase())) return Y(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);
|
|
537
|
-
if (r.has(s.toLowerCase())) return Y(`${o} "name" ${s} is declared more than once.`);
|
|
538
|
-
if (typeof a.form != "string" || !lt.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
|
|
539
|
-
let c = a.form, l = pt(a.binding, o);
|
|
540
|
-
if (!l.ok) return l;
|
|
541
|
-
let u = l.binding, d = a.props;
|
|
542
|
-
if (!q(d)) return Y(`${o} "props" must be an object.`);
|
|
543
|
-
let p = {};
|
|
544
|
-
for (let e of Object.keys(d)) {
|
|
545
|
-
if (!st.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
|
|
546
|
-
if (u && dt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
|
|
547
|
-
let t = d[e];
|
|
548
|
-
if (!q(t)) return Y(`${o} property "${e}" must be an object.`);
|
|
549
|
-
let n = t.kind;
|
|
550
|
-
if (typeof n != "string" || !ct.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
|
|
551
|
-
let r = { kind: n };
|
|
552
|
-
for (let n of ["required", "static"]) if (Object.hasOwn(t, n) && t[n] !== void 0) {
|
|
553
|
-
if (typeof t[n] != "boolean") return Y(`${o} property "${e}" "${n}" must be a boolean.`);
|
|
554
|
-
r[n] = t[n];
|
|
555
|
-
}
|
|
556
|
-
let i = Object.hasOwn(t, "enum") && t.enum !== void 0;
|
|
557
|
-
if (n !== "enum") {
|
|
558
|
-
if (i) return Y(`${o} property "${e}" has "enum" but kind is "${n}".`);
|
|
559
|
-
} else {
|
|
560
|
-
let n = t.enum;
|
|
561
|
-
if (!Array.isArray(n) || n.length === 0) return Y(`${o} property "${e}" "enum" must be a non-empty string array.`);
|
|
562
|
-
if (n.length > 64) return Y(`${o} property "${e}" "enum" accepts at most 64 values.`);
|
|
563
|
-
let i = /* @__PURE__ */ new Set();
|
|
564
|
-
for (let t of n) {
|
|
565
|
-
if (typeof t != "string") return Y(`${o} property "${e}" "enum" must be a non-empty string array.`);
|
|
566
|
-
if (t.length > 128) return Y(`${o} property "${e}" enum value exceeds the 128-character limit.`);
|
|
567
|
-
if (i.has(t)) return Y(`${o} property "${e}" enum value "${t}" is declared more than once.`);
|
|
568
|
-
i.add(t);
|
|
569
|
-
}
|
|
570
|
-
r.enum = [...n];
|
|
571
|
-
}
|
|
572
|
-
let a = Object.hasOwn(t, "pattern") && t.pattern !== void 0;
|
|
573
|
-
if (n !== "string") {
|
|
574
|
-
if (a) return Y(`${o} property "${e}" has "pattern" but kind is "${n}".`);
|
|
575
|
-
} else if (a) {
|
|
576
|
-
let n = t.pattern;
|
|
577
|
-
if (typeof n != "string") return Y(`${o} property "${e}" "pattern" must be a string.`);
|
|
578
|
-
if (n.length > 512) return Y(`${o} property "${e}" "pattern" exceeds the 512-character limit.`);
|
|
579
|
-
try {
|
|
580
|
-
new RegExp(n);
|
|
581
|
-
} catch {
|
|
582
|
-
return Y(`${o} property "${e}" "pattern" is not a valid regular expression.`);
|
|
583
|
-
}
|
|
584
|
-
if (!f(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
|
|
585
|
-
r.pattern = n;
|
|
586
|
-
}
|
|
587
|
-
p[e] = r;
|
|
588
|
-
}
|
|
589
|
-
let m = {
|
|
590
|
-
name: s,
|
|
591
|
-
form: c,
|
|
592
|
-
props: p,
|
|
593
|
-
...u ? { binding: u } : {}
|
|
594
|
-
};
|
|
595
|
-
n.push(m), r.set(s, m);
|
|
596
|
-
}
|
|
597
|
-
return {
|
|
598
|
-
ok: !0,
|
|
599
|
-
hostComponents: n,
|
|
600
|
-
hostByName: r
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
function ht(e) {
|
|
604
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
605
|
-
}
|
|
606
|
-
function gt(e) {
|
|
607
|
-
let t = e.static === !0 || e.dynamic === !1;
|
|
608
|
-
if (e.kind === "enum") {
|
|
609
|
-
let n = `^(?:${(e.enum ?? []).map(ht).join("|")})$`;
|
|
610
|
-
if (n.length <= 512) return {
|
|
611
|
-
kind: "string",
|
|
612
|
-
...e.required === !0 ? { required: !0 } : {},
|
|
613
|
-
...t ? { static: !0 } : {},
|
|
614
|
-
pattern: n
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
let n = { kind: e.kind };
|
|
618
|
-
return e.required === !0 && e.default === void 0 && (n.required = !0), t && (n.static = !0), e.enum && (n.enum = [...e.enum]), e.pattern !== void 0 && (n.pattern = e.pattern), n;
|
|
619
|
-
}
|
|
620
|
-
function _t(e) {
|
|
621
|
-
let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
622
|
-
for (let i of e.components) {
|
|
623
|
-
let e = {};
|
|
624
|
-
for (let t of Object.keys(i.props)) e[t] = gt(i.props[t]);
|
|
625
|
-
let a = le(i), o = {
|
|
626
|
-
name: i.name,
|
|
627
|
-
form: i.form,
|
|
628
|
-
props: e,
|
|
629
|
-
...a ? { binding: a } : {}
|
|
630
|
-
};
|
|
631
|
-
t.push(o), n.set(i.name, o), r.set(i.name, i);
|
|
632
|
-
}
|
|
633
|
-
return {
|
|
634
|
-
hostComponents: t,
|
|
635
|
-
hostByName: n,
|
|
636
|
-
sdkByName: r
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
function X(e, t) {
|
|
640
|
-
let n = /* @__PURE__ */ new Map();
|
|
641
|
-
for (let t of e) n.set(t.name, t);
|
|
642
|
-
let r = /* @__PURE__ */ new Map();
|
|
643
|
-
for (let e of t.values()) r.set(e.name, e);
|
|
644
|
-
for (let e of O) r.has(e.name) || r.set(e.name, fe(e));
|
|
645
|
-
return {
|
|
646
|
-
componentByName: n,
|
|
647
|
-
schemaByName: r
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
function Z(e) {
|
|
651
|
-
let t = /* @__PURE__ */ new Map();
|
|
652
|
-
for (let n of e) t.set(n.name, de(n));
|
|
653
|
-
return t;
|
|
654
|
-
}
|
|
655
|
-
function vt(e, t) {
|
|
656
|
-
let n = t.defaults, r = new Set(n.map((e) => e.name));
|
|
657
|
-
if (e !== void 0 && !q(e)) return {
|
|
658
|
-
ok: !1,
|
|
659
|
-
message: "Compile options must be an object.",
|
|
660
|
-
key: "local.options.invalid.object"
|
|
661
|
-
};
|
|
662
|
-
let i = e ?? {}, o = { ...K };
|
|
663
|
-
for (let e of it) {
|
|
664
|
-
if (!Object.hasOwn(i, e)) continue;
|
|
665
|
-
let t = i[e];
|
|
666
|
-
if (t !== void 0) {
|
|
667
|
-
if (typeof t != "boolean") return {
|
|
668
|
-
ok: !1,
|
|
669
|
-
message: `Compile option ${e} must be a boolean.`,
|
|
670
|
-
key: "local.options.invalid.html-flag"
|
|
671
|
-
};
|
|
672
|
-
o[e] = t;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
let l = !1;
|
|
676
|
-
if (Object.hasOwn(i, "markdownBreaks")) {
|
|
677
|
-
let e = i.markdownBreaks;
|
|
678
|
-
if (e !== void 0) {
|
|
679
|
-
if (typeof e != "boolean") return {
|
|
680
|
-
ok: !1,
|
|
681
|
-
message: "Compile option markdownBreaks must be a boolean.",
|
|
682
|
-
key: "local.options.invalid.markdown-breaks"
|
|
683
|
-
};
|
|
684
|
-
l = e;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
let u = !0;
|
|
688
|
-
if (Object.hasOwn(i, "strict")) {
|
|
689
|
-
let e = i.strict;
|
|
690
|
-
if (e !== void 0) {
|
|
691
|
-
if (typeof e != "boolean") return {
|
|
692
|
-
ok: !1,
|
|
693
|
-
message: "Compile option strict must be a boolean.",
|
|
694
|
-
key: "local.options.invalid.strict"
|
|
695
|
-
};
|
|
696
|
-
u = e;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
if (Object.hasOwn(i, "sourcePhase")) {
|
|
700
|
-
let e = i.sourcePhase;
|
|
701
|
-
if (e !== void 0 && e !== "streaming" && e !== "final") return {
|
|
702
|
-
ok: !1,
|
|
703
|
-
message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
|
|
704
|
-
key: "local.options.invalid.source-phase"
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
let d = i.limits, f = a, p = c, m = s;
|
|
708
|
-
if (d !== void 0) {
|
|
709
|
-
if (!q(d)) return {
|
|
710
|
-
ok: !1,
|
|
711
|
-
message: "Compile option limits must be an object.",
|
|
712
|
-
key: "local.options.invalid.limits"
|
|
713
|
-
};
|
|
714
|
-
for (let e of Object.keys(d)) if (!ft.has(e) && d[e] !== void 0) return {
|
|
715
|
-
ok: !1,
|
|
716
|
-
message: `Compile option limits.${e} is not supported.`,
|
|
717
|
-
key: "local.options.invalid.limits-unknown",
|
|
718
|
-
detail: e
|
|
719
|
-
};
|
|
720
|
-
let e = J(d, "maxSyntaxNodes", f);
|
|
721
|
-
if (!e.ok) return e;
|
|
722
|
-
f = e.value;
|
|
723
|
-
let t = J(d, "maxParseWork", p);
|
|
724
|
-
if (!t.ok) return t;
|
|
725
|
-
p = t.value;
|
|
726
|
-
let n = J(d, "maxMarkdownDepth", m);
|
|
727
|
-
if (!n.ok) return n;
|
|
728
|
-
m = n.value;
|
|
729
|
-
}
|
|
730
|
-
let h = Object.hasOwn(i, "config") && i.config !== void 0, g = Object.hasOwn(i, "hostComponents") && i.hostComponents !== void 0;
|
|
731
|
-
if (h && g) return {
|
|
732
|
-
ok: !1,
|
|
733
|
-
message: "Compile option config cannot be combined with hostComponents.",
|
|
734
|
-
key: "local.options.invalid.config-conflict"
|
|
735
|
-
};
|
|
736
|
-
let _, v, y, b, x, S, C, w, T;
|
|
737
|
-
if (h) {
|
|
738
|
-
try {
|
|
739
|
-
_ = t.readConfig(i.config, n);
|
|
740
|
-
} catch (e) {
|
|
741
|
-
let t = e instanceof Error ? e.message : String(e);
|
|
742
|
-
return {
|
|
743
|
-
ok: !1,
|
|
744
|
-
message: `Compile option config is invalid: ${t}`,
|
|
745
|
-
key: "local.options.invalid.config",
|
|
746
|
-
detail: t
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
let e = _t(_);
|
|
750
|
-
v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
|
|
751
|
-
let r = X(x, Z(x));
|
|
752
|
-
S = r.schemaByName, C = r.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
|
|
753
|
-
} else if (g) {
|
|
754
|
-
let e = mt(i.hostComponents, n);
|
|
755
|
-
if (!e.ok) return e;
|
|
756
|
-
v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = n;
|
|
757
|
-
let t = Z(n);
|
|
758
|
-
for (let [n, r] of e.hostByName) t.set(n, fe({
|
|
759
|
-
...r,
|
|
760
|
-
legacyHost: !0
|
|
761
|
-
}));
|
|
762
|
-
let r = X(n, t);
|
|
763
|
-
S = r.schemaByName, C = r.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
|
|
764
|
-
} else {
|
|
765
|
-
v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = n;
|
|
766
|
-
let e = X(n, Z(n));
|
|
767
|
-
S = e.schemaByName, C = e.componentByName, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
|
|
768
|
-
}
|
|
769
|
-
return {
|
|
770
|
-
ok: !0,
|
|
771
|
-
maxSyntaxNodes: f,
|
|
772
|
-
maxParseWork: p,
|
|
773
|
-
maxMarkdownDepth: m,
|
|
774
|
-
html: o,
|
|
775
|
-
markdownBreaks: l,
|
|
776
|
-
strict: u,
|
|
777
|
-
hostComponents: v,
|
|
778
|
-
hostByName: y,
|
|
779
|
-
..._ ? { config: _ } : {},
|
|
780
|
-
sdkByName: b,
|
|
781
|
-
registry: x,
|
|
782
|
-
componentByName: C,
|
|
783
|
-
schemaByName: S,
|
|
784
|
-
defaultComponentNames: r,
|
|
785
|
-
unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Qe((e) => S.has(e)) : /* @__PURE__ */ new Set(),
|
|
786
|
-
externalComponentNames: w,
|
|
787
|
-
legacyHostNames: T,
|
|
788
|
-
componentConfigKey: _ ? t.configKey(_) : t.defaultConfigKey,
|
|
789
|
-
capabilities: t.capabilities ?? Xe,
|
|
790
|
-
...t.preset ? { preset: t.preset } : {}
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
function yt(e, t = [], n) {
|
|
794
|
-
let r = t.length > 0 ? at : void 0;
|
|
795
|
-
return vt(e, {
|
|
796
|
-
defaults: t,
|
|
797
|
-
...r ? { preset: r } : {},
|
|
798
|
-
defaultConfigKey: nt(t),
|
|
799
|
-
readConfig: tt,
|
|
800
|
-
configKey: (e) => e.key,
|
|
801
|
-
...n ? { capabilities: n } : {}
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
function bt(e) {
|
|
805
|
-
return e.componentConfigKey;
|
|
806
|
-
}
|
|
807
|
-
// src/local/configuration/kernel-value-rules.ts
|
|
808
|
-
function Q(e) {
|
|
809
|
-
let t = {};
|
|
810
|
-
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
|
|
811
|
-
return t;
|
|
812
|
-
}
|
|
813
|
-
function xt(e) {
|
|
814
|
-
let t = [];
|
|
815
|
-
for (let n of ue(e)) switch (n.kind) {
|
|
816
|
-
case "value-date":
|
|
817
|
-
t.push(Q({
|
|
818
|
-
kind: "date",
|
|
819
|
-
min: n.min,
|
|
820
|
-
max: n.max,
|
|
821
|
-
required: n.required
|
|
822
|
-
}));
|
|
823
|
-
break;
|
|
824
|
-
case "value-length":
|
|
825
|
-
t.push(Q({
|
|
826
|
-
kind: "length",
|
|
827
|
-
min: n.min,
|
|
828
|
-
max: n.max
|
|
829
|
-
})), (n.email !== void 0 || n.emailType !== void 0) && t.push(Q({
|
|
830
|
-
kind: "email",
|
|
831
|
-
type: n.email ?? "type",
|
|
832
|
-
value: n.emailType ?? "email"
|
|
833
|
-
}));
|
|
834
|
-
break;
|
|
835
|
-
case "value-email":
|
|
836
|
-
t.push(Q({
|
|
837
|
-
kind: "email",
|
|
838
|
-
type: n.type ?? "type",
|
|
839
|
-
value: n.value ?? "email"
|
|
840
|
-
}));
|
|
841
|
-
break;
|
|
842
|
-
case "value-required": t.push({
|
|
843
|
-
kind: "required",
|
|
844
|
-
required: n.required
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
|
-
return t;
|
|
848
|
-
}
|
|
849
|
-
function St(e) {
|
|
850
|
-
if (!e || typeof e != "object") return;
|
|
851
|
-
let t = e.kernel;
|
|
852
|
-
if (t && typeof t == "object") return t;
|
|
853
|
-
}
|
|
854
|
-
var Ct = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
855
|
-
function wt(e) {
|
|
856
|
-
return Ct.test(e);
|
|
857
|
-
}
|
|
858
|
-
function Tt(e, t, n) {
|
|
859
|
-
let r = [];
|
|
860
|
-
for (let i of e) {
|
|
861
|
-
let e = i.target;
|
|
862
|
-
e ? e.startsWith("#") || /\s/.test(e) ? r.push({
|
|
863
|
-
code: "local.jump.target",
|
|
864
|
-
message: `<${i.name}> target "${e}" must be a bare heading slug or anchor id without "#" or whitespace.`,
|
|
865
|
-
start: i.offset,
|
|
866
|
-
key: "local.jump.bad-target",
|
|
867
|
-
params: { target: e }
|
|
868
|
-
}) : !t.has(e) && !n.has(e) && r.push({
|
|
869
|
-
code: "local.jump.target",
|
|
870
|
-
message: `<${i.name}> target "${e}" does not resolve to a heading or explicit anchor in this document.`,
|
|
871
|
-
start: i.offset,
|
|
872
|
-
key: "local.jump.unresolved",
|
|
873
|
-
params: { target: e }
|
|
874
|
-
}) : r.push({
|
|
875
|
-
code: "local.jump.target",
|
|
876
|
-
message: "<jump> target cannot be empty.",
|
|
877
|
-
start: i.offset,
|
|
878
|
-
key: "local.jump.empty"
|
|
879
|
-
});
|
|
880
|
-
}
|
|
881
|
-
return r;
|
|
882
|
-
}
|
|
883
|
-
Object.freeze({
|
|
884
|
-
arrayLength: e,
|
|
885
|
-
dataTableColumns: 20,
|
|
886
|
-
plotCurves: 16,
|
|
887
|
-
plotPoints: p
|
|
888
|
-
});
|
|
889
|
-
// src/local/evaluation/computations.ts
|
|
890
|
-
function $(e, t, n) {
|
|
891
|
-
let r = t ? oe(t, n) : void 0;
|
|
892
|
-
return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
|
|
893
|
-
}
|
|
894
|
-
function Et(e, t, n, r = "local.expression") {
|
|
895
|
-
t instanceof k ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
|
|
896
|
-
}
|
|
897
|
-
function Dt(e) {
|
|
898
|
-
return e instanceof k ? e : new k("expression-eval", e instanceof Error ? e.message : String(e), 0);
|
|
899
|
-
}
|
|
900
|
-
function Ot(e, t) {
|
|
901
|
-
let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
902
|
-
for (let t of e) r.set(t, 0);
|
|
903
|
-
for (let a of e) for (let e of t(a)) {
|
|
904
|
-
if (!n.has(e)) continue;
|
|
905
|
-
r.set(a, (r.get(a) ?? 0) + 1);
|
|
906
|
-
let t = i.get(e);
|
|
907
|
-
t ? t.push(a) : i.set(e, [a]);
|
|
908
|
-
}
|
|
909
|
-
let a = [];
|
|
910
|
-
for (let t of e) (r.get(t) ?? 0) === 0 && a.push(t);
|
|
911
|
-
let o = [];
|
|
912
|
-
for (let e = 0; e < a.length; e += 1) {
|
|
913
|
-
let t = a[e];
|
|
914
|
-
o.push(t);
|
|
915
|
-
for (let e of i.get(t) ?? []) {
|
|
916
|
-
let t = (r.get(e) ?? 0) - 1;
|
|
917
|
-
r.set(e, t), t === 0 && a.push(e);
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
let s = new Set(o);
|
|
921
|
-
return {
|
|
922
|
-
order: o,
|
|
923
|
-
cyclic: e.filter((e) => !s.has(e))
|
|
924
|
-
};
|
|
925
|
-
}
|
|
926
|
-
function kt(e) {
|
|
927
|
-
let t = Object.keys(e), n = new Set(t);
|
|
928
|
-
return Ot(t, (t) => {
|
|
929
|
-
let r = e[t];
|
|
930
|
-
return r ? r.dependencies.filter((e) => n.has(e)) : [];
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
|
|
934
|
-
let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = [], l = /* @__PURE__ */ new Set();
|
|
935
|
-
for (let t of e) s.has(t.name) || (s.set(t.name, t), c.push(t.name));
|
|
936
|
-
let u = new Set(c);
|
|
937
|
-
for (let e of c) {
|
|
938
|
-
let t = s.get(e), r;
|
|
939
|
-
try {
|
|
940
|
-
r = i?.expression(t.source) ?? ce(t.source);
|
|
941
|
-
} catch (r) {
|
|
942
|
-
Et(n, r, t.expressionOffset), l.add(e);
|
|
943
|
-
continue;
|
|
944
|
-
}
|
|
945
|
-
a.set(e, r), o.set(e, [...r.dependencies]);
|
|
946
|
-
}
|
|
947
|
-
for (let e of c) if (!l.has(e)) {
|
|
948
|
-
for (let r of o.get(e) ?? []) if (!(u.has(r) || Object.hasOwn(t, r))) {
|
|
949
|
-
n("local.computation.unknown", `Reference to undeclared parameter ${r} in computation "${e}".`, $(s.get(e), a.get(e), r)), l.add(e);
|
|
950
|
-
break;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
let d = /* @__PURE__ */ new Set();
|
|
954
|
-
for (let e of c) {
|
|
955
|
-
if (l.has(e)) continue;
|
|
956
|
-
let i = s.get(e);
|
|
957
|
-
if (i.kind === "const") for (let c of o.get(e) ?? []) {
|
|
958
|
-
let o = u.has(c) ? s.get(c).kind : null;
|
|
959
|
-
Object.hasOwn(t, c) ? (n("local.computation.const", `Constant "${e}" cannot depend on ${r.has(c) ? "external data" : "control parameter"} "${c}".`, $(i, a.get(e), c)), d.add(e)) : o === "computed" && (n("local.computation.const", `Constant "${e}" cannot depend on computed value "${c}".`, $(i, a.get(e), c)), d.add(e));
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
let { order: f, cyclic: p } = Ot(c, (e) => o.get(e) ?? []);
|
|
963
|
-
if (p.length > 0) {
|
|
964
|
-
let e = new Set(p), t = [], r = /* @__PURE__ */ new Map(), i = p[0];
|
|
965
|
-
for (; !r.has(i);) {
|
|
966
|
-
r.set(i, t.length), t.push(i);
|
|
967
|
-
let n = (o.get(i) ?? []).find((t) => e.has(t));
|
|
968
|
-
if (n === void 0) break;
|
|
969
|
-
i = n;
|
|
970
|
-
}
|
|
971
|
-
let a = r.has(i) ? t.slice(r.get(i)) : [p[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
|
|
972
|
-
for (let e of a.slice(0, 100)) {
|
|
973
|
-
let t = s.get(e);
|
|
974
|
-
n("local.computation.cycle", `Computation "${e}" is part of a dependency cycle: ${c}.`, t.range.start, t.range.end);
|
|
975
|
-
}
|
|
976
|
-
for (let e of p) l.add(e);
|
|
977
|
-
}
|
|
978
|
-
for (let e of f) if (!l.has(e) && !(s.get(e).kind !== "const" || d.has(e)) && (o.get(e) ?? []).some((e) => u.has(e) ? s.get(e).kind === "const" && d.has(e) : !1)) {
|
|
979
|
-
let t = s.get(e);
|
|
980
|
-
n("local.computation.const", `Constant "${e}" indirectly depends on a value that is not a constant.`, t.expressionOffset), d.add(e);
|
|
981
|
-
}
|
|
982
|
-
let m = {}, h = { ...t };
|
|
983
|
-
for (let e of f) {
|
|
984
|
-
if (l.has(e)) continue;
|
|
985
|
-
let t = s.get(e);
|
|
986
|
-
if ((o.get(e) ?? []).some((e) => l.has(e))) {
|
|
987
|
-
l.add(e);
|
|
988
|
-
continue;
|
|
989
|
-
}
|
|
990
|
-
let r = a.get(e);
|
|
991
|
-
try {
|
|
992
|
-
let t = i ? i.infer(r, h) : r.inferType(h);
|
|
993
|
-
m[e] = t, h[e] = t;
|
|
994
|
-
} catch (r) {
|
|
995
|
-
Et(n, r, t.expressionOffset), l.add(e);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
let g = {}, _ = {}, v = /* @__PURE__ */ Error("failed constant read"), y = (e) => {
|
|
999
|
-
l.add(e), Object.defineProperty(_, e, {
|
|
1000
|
-
enumerable: !0,
|
|
1001
|
-
configurable: !0,
|
|
1002
|
-
get() {
|
|
1003
|
-
throw v;
|
|
1004
|
-
}
|
|
1005
|
-
});
|
|
1006
|
-
};
|
|
1007
|
-
for (let e of f) {
|
|
1008
|
-
if (l.has(e) || s.get(e).kind !== "const" || d.has(e)) continue;
|
|
1009
|
-
let t = s.get(e), r = a.get(e);
|
|
1010
|
-
try {
|
|
1011
|
-
let i = r.evaluate(_), a = se(i);
|
|
1012
|
-
if (a) {
|
|
1013
|
-
n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), y(e);
|
|
1014
|
-
continue;
|
|
1015
|
-
}
|
|
1016
|
-
g[e] = Array.isArray(i) ? i.slice() : i, _[e] = g[e];
|
|
1017
|
-
} catch (r) {
|
|
1018
|
-
if (r === v) {
|
|
1019
|
-
y(e);
|
|
1020
|
-
continue;
|
|
1021
|
-
}
|
|
1022
|
-
let i = Dt(r);
|
|
1023
|
-
n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), y(e);
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
let b = {};
|
|
1027
|
-
for (let e of c) {
|
|
1028
|
-
let t = s.get(e);
|
|
1029
|
-
if (l.has(e) || m[e] === void 0) continue;
|
|
1030
|
-
let n = {
|
|
1031
|
-
name: e,
|
|
1032
|
-
kind: t.kind,
|
|
1033
|
-
source: t.source,
|
|
1034
|
-
dependencies: [...o.get(e) ?? []],
|
|
1035
|
-
type: m[e],
|
|
1036
|
-
nodeId: t.nodeId,
|
|
1037
|
-
range: { ...t.range }
|
|
1038
|
-
};
|
|
1039
|
-
t.kind === "const" && Object.hasOwn(g, e) && (n.value = g[e]), b[e] = n;
|
|
1040
|
-
}
|
|
1041
|
-
return {
|
|
1042
|
-
computations: b,
|
|
1043
|
-
kinds: m,
|
|
1044
|
-
order: f.filter((e) => !l.has(e)),
|
|
1045
|
-
expressions: a,
|
|
1046
|
-
constValues: g
|
|
1047
|
-
};
|
|
1048
|
-
}
|
|
1049
|
-
function jt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
|
|
1050
|
-
let o = {}, s = /* @__PURE__ */ new Map(), c = {};
|
|
1051
|
-
for (let [e, t] of Object.entries(r)) c[e] = t;
|
|
1052
|
-
for (let [e, t] of a) Object.defineProperty(c, e, {
|
|
1053
|
-
enumerable: !0,
|
|
1054
|
-
configurable: !0,
|
|
1055
|
-
get() {
|
|
1056
|
-
throw t;
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
for (let [e, t] of Object.entries(i)) o[e] = t, c[e] = t;
|
|
1060
|
-
for (let r of t) {
|
|
1061
|
-
let t = e[r];
|
|
1062
|
-
if (!t || t.kind === "const") continue;
|
|
1063
|
-
let i = n.get(r);
|
|
1064
|
-
if (i) try {
|
|
1065
|
-
let e = i.evaluate(c), t = se(e);
|
|
1066
|
-
if (t) throw new k("expression-budget", t, 0);
|
|
1067
|
-
o[r] = e, c[r] = e;
|
|
1068
|
-
} catch (e) {
|
|
1069
|
-
let t = Dt(e);
|
|
1070
|
-
s.set(r, t), Object.defineProperty(c, r, {
|
|
1071
|
-
enumerable: !0,
|
|
1072
|
-
configurable: !0,
|
|
1073
|
-
get() {
|
|
1074
|
-
throw t;
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
return {
|
|
1080
|
-
values: o,
|
|
1081
|
-
errors: s
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1084
|
-
// src/local/evaluation/validation.ts
|
|
1085
|
-
var Mt = "local.validation.failed", Nt = "local.validation.expression", Pt = "Validation failed.";
|
|
1086
|
-
function Ft(e) {
|
|
1087
|
-
return e.length > 2e3 ? `${y(e, d - 1)}…` : e;
|
|
1088
|
-
}
|
|
1089
|
-
function It(e) {
|
|
1090
|
-
let t = e.trim();
|
|
1091
|
-
return t ? t.split(/\s+/) : [];
|
|
1092
|
-
}
|
|
1093
|
-
function Lt(e) {
|
|
1094
|
-
let t = [0];
|
|
1095
|
-
for (let n = 0; n < e.length; n += 1) e[n] === "\n" && t.push(n + 1);
|
|
1096
|
-
return t;
|
|
1097
|
-
}
|
|
1098
|
-
function Rt(e) {
|
|
1099
|
-
if (!e || typeof e != "object") return !1;
|
|
1100
|
-
let t = e, n = t.range;
|
|
1101
|
-
return typeof t.expression == "string" && typeof t.message == "string" && Array.isArray(t.fields) && !!n && Number.isFinite(n.start) && Number.isFinite(n.end);
|
|
1102
|
-
}
|
|
1103
|
-
function zt(e, t, n, r, i) {
|
|
1104
|
-
let a = e.length, o = Math.max(0, Math.min(a, Math.trunc(n.start))), s = Math.max(o + 1, Math.min(a, Math.trunc(n.end))), c = 0, l = Math.max(0, t.length - 1);
|
|
1105
|
-
for (; c < l;) {
|
|
1106
|
-
let e = Math.ceil((c + l) / 2);
|
|
1107
|
-
t[e] <= o ? c = e : l = e - 1;
|
|
1108
|
-
}
|
|
1109
|
-
return {
|
|
1110
|
-
code: r,
|
|
1111
|
-
message: i,
|
|
1112
|
-
severity: "error",
|
|
1113
|
-
range: {
|
|
1114
|
-
start: o,
|
|
1115
|
-
end: s
|
|
1116
|
-
},
|
|
1117
|
-
line: c + 1,
|
|
1118
|
-
column: o - t[c] + 1
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
export { be as $, Ge as A, we as B, Je as C, qe as D, Re as E, Pe as F, ke as G, Ee as H, Ne as I, N as J, Ae as K, Me as L, z as M, Ie as N, Ue as O, B as P, Ce as Q, R, Ye as S, ze as T, De as U, Te as V, Oe as W, F as X, P as Y, I as Z, bt as _, Rt as a, K as b, zt as c, At as d, ye as et, wt as f, it as g, xt as h, Ft as i, Ke as j, He as k, jt as l, Tt as m, Mt as n, he as nt, Lt as o, St as p, M as q, Pt as r, pe as rt, It as s, Nt as t, A as tt, kt as u, yt as v, Le as w, rt as x, vt as y, je as z };
|