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