reactive-md 0.9.2 → 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 +363 -333
- package/CHANGELOG.md +364 -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/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 +323 -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-D6zQkTkt.js +112 -0
- package/dist-library/{LocalDocumentViewCore-DXE0I0Qc.js → LocalDocumentViewCore-CmJhemcA.js} +356 -9441
- package/dist-library/LocalReactiveDocumentCore-lAKOGAZ7.js +283 -0
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +143 -0
- package/dist-library/{authoring-Ci_KzJ0q.js → authoring-B14SsOXZ.js} +21 -20
- package/dist-library/chart-B1TUtzm-.js +3 -0
- package/dist-library/color-values-r8Wf7ALn.js +6 -0
- package/dist-library/{compile-Dx6Uw3D9.js → compile-D50B5_Ww.js} +25 -25
- package/dist-library/compile-cache-key-6GgpETz_.js +28 -0
- package/dist-library/compiler-DLkKUK4t.js +98 -0
- package/dist-library/{compiler-core-DDDdvuLy.js → compiler-core-Niqhp9wV.js} +2877 -3262
- package/dist-library/{registry-core-C9xOunaw.js → component-kernel-IG4wOO0i.js} +72 -195
- package/dist-library/{component-state-BRwvTV0d.js → component-state-Ht-hOK0W.js} +1 -1
- 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-B1VFK9fd.js → coordinate-PyLPMIQK.js} +85 -85
- package/dist-library/data-BtFlkJzp.js +3 -0
- package/dist-library/{data-table-8-3F15Jf.js → data-table-Kv_ZA2Z2.js} +14 -13
- package/dist-library/data-visuals-_Z7QqYTk.js +384 -0
- package/dist-library/{default-components-s21NevON.js → default-components-jugH7Ubr.js} +327 -326
- package/dist-library/{config-DXLvctiZ.js → default-config-DIrRpuQz.js} +103 -88
- package/dist-library/default-options-DU5dxuU6.js +125 -0
- package/dist-library/{registry-D6OGkOcX.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_uutKkN.js → display-y4v9v0Qd.js} +1 -1
- package/dist-library/dist-Cueh1Psp.js +4761 -0
- package/dist-library/{document-theme-C8J6UyNO.js → document-theme-DBAfnk7y.js} +57 -2
- package/dist-library/{export-CIAIPBov.js → export-heVBqgxA.js} +64 -63
- package/dist-library/gallery-BC6FYTqw.js +3 -0
- package/dist-library/{gallery-Dv1rOvL0.js → gallery-Q6VPS2ep.js} +1 -1
- package/dist-library/{html-Cr4CBwAH.js → html-CCnvzan1.js} +49 -48
- package/dist-library/{incremental-9nx92u9c.js → incremental-Bzvh8_lB.js} +526 -379
- package/dist-library/{layout-BBB2VF0S.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-4KqXhIEU.js → observability-CYLuvFfL.js} +124 -43
- package/dist-library/package-core-9UK5ZdqB.js +127 -0
- 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-DeZPA8IE.js → preset-core-BW3NWZJ9.js} +212 -210
- package/dist-library/props-pJRrfDc6.js +179 -0
- package/dist-library/react-BSo0o998.js +32 -0
- package/dist-library/reactive-md-authoring.js +268 -257
- package/dist-library/reactive-md-build.js +7 -10
- 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 -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 +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 +125 -3
- 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 -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-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-scan.js +1 -0
- package/dist-library/reactive-md-sdk.js +9 -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-worker-pool.js +401 -0
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +82 -1548
- package/dist-library/registry-core-CziAIP5P.js +125 -0
- package/dist-library/render-nodes-DKjg_TR1.js +9369 -0
- package/dist-library/requirements-DhIkxAbl.js +157 -0
- 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-BpQdZmFI.js → runtime-CuJndKqK.js} +53 -52
- package/dist-library/runtime-requirement-C4-vNcf5.js +769 -0
- package/dist-library/schema-core-4sd1Vu7V.js +132 -0
- package/dist-library/{sdk-core-ChslheKs.js → sdk-core-BLsW9cCy.js} +497 -524
- package/dist-library/{session-core-dxQCJBNa.js → session-core-DLBRPV7f.js} +26 -25
- package/dist-library/{shareable-B8xMoGEa.js → shareable-C6mUerpQ.js} +145 -142
- 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/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 +6 -1
- 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/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/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 +14 -0
- package/dist-library/types/local/types.d.ts +37 -25
- 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 +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-Ib5kSScP.js → types-Bza88SGK.js} +1 -1
- package/dist-library/use-hydrated-W-laKPhY.js +22975 -0
- package/dist-library/validation-XXlb-spV.js +860 -0
- package/dist-library/{version-DAxuGOG2.js → version-B0G1699c.js} +24 -33
- 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 +121 -120
- package/docs/README-ch.md +102 -101
- package/docs/README.md +102 -101
- package/docs/compatibility/compatibility-ch.md +146 -146
- package/docs/compatibility/compatibility-en.md +146 -146
- package/docs/compatibility/deprecation-ch.md +1 -1
- package/docs/compatibility/deprecation-en.md +1 -1
- package/docs/compatibility/source-versioning-ch.md +162 -162
- package/docs/compatibility/source-versioning-en.md +162 -162
- package/docs/compatibility/support-matrix-ch.md +1 -1
- package/docs/compatibility/support-matrix-en.md +1 -1
- 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 +532 -532
- package/docs/guides/local-guide-en.md +532 -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 +398 -394
- package/docs/integration/extension-sdk-en.md +383 -379
- package/docs/integration/local-integration-ch.md +648 -646
- package/docs/integration/local-integration-en.md +664 -662
- package/docs/integration/shareable-export-ch.md +307 -307
- package/docs/integration/shareable-export-en.md +309 -309
- package/docs/reference/diagnostics-counting-ch.md +104 -104
- package/docs/reference/diagnostics-counting-en.md +104 -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 +724 -724
- package/docs/reference/local-interaction-syntax-en.md +722 -722
- package/docs/reference/public-api-ch.md +114 -7
- package/docs/reference/public-api-en.md +114 -7
- package/docs/reference/theme-protocol-ch.md +198 -198
- package/docs/reference/theme-protocol-en.md +217 -217
- 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/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 +61 -2
- package/dist-library/LocalDocumentView-BuqgJZEY.js +0 -109
- package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +0 -275
- 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/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/props-sJ8vk0cr.js +0 -183
- package/dist-library/react-0DCh-Mar.js +0 -7
- package/dist-library/resources-B0x_w3s9.js +0 -229
- package/dist-library/schema-BryM_VRW.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-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,61 +1,63 @@
|
|
|
1
1
|
import { r as e } from "./latex-1w7aQgD5.js";
|
|
2
|
-
import "./
|
|
3
|
-
import { t } from "./compile-
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
2
|
+
import "./limits-CFERRrlC.js";
|
|
3
|
+
import { t } from "./compile-D50B5_Ww.js";
|
|
4
|
+
import { a as n, i as r, r as i } from "./compiler-core-Niqhp9wV.js";
|
|
5
|
+
import { n as a } from "./runtime-requirement-C4-vNcf5.js";
|
|
6
|
+
import { n as o } from "./compiler-DLkKUK4t.js";
|
|
7
|
+
import { n as s } from "./display-y4v9v0Qd.js";
|
|
8
|
+
import { i as c, n as l, r as u } from "./parser-standard-BPIy4HOu.js";
|
|
9
|
+
import { s as d } from "./default-config-DIrRpuQz.js";
|
|
10
|
+
import { r as f, t as p } from "./default-options-DU5dxuU6.js";
|
|
11
|
+
import { t as m } from "./parser-9yNJxGip.js";
|
|
12
|
+
import { r as h } from "./default-schema-Ch-Vznpm.js";
|
|
13
|
+
function g(e, t) {
|
|
12
14
|
if (typeof t != "string" || t.length > 1e6) return !0;
|
|
13
15
|
if (e.severity !== "error") return !1;
|
|
14
16
|
let n = e.code, r = (e) => n === e || n.startsWith(`${e}.`);
|
|
15
17
|
return r("local.options") || r("local.budget") || r("local.version") || r("local.html") || r("local.parse") || r("local.security") || r("local.config") || r("local.registry") || r("local.capability");
|
|
16
18
|
}
|
|
17
|
-
function
|
|
18
|
-
let n = e.filter((e) => !
|
|
19
|
-
for (let i of e)
|
|
19
|
+
function _(e, t) {
|
|
20
|
+
let n = e.filter((e) => !g(e, t)), r = [];
|
|
21
|
+
for (let i of e) g(i, t) && (i.code === "local.html" && n.some((e) => e.range.start === i.range.start && e.range.end === i.range.end) ? n.push(i) : r.push(i));
|
|
20
22
|
return {
|
|
21
23
|
definite: r,
|
|
22
24
|
transient: n
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
|
-
function
|
|
27
|
+
function v(e) {
|
|
26
28
|
return `${e.code}:${e.range.start}:${e.range.end}`;
|
|
27
29
|
}
|
|
28
|
-
function
|
|
30
|
+
function y(e, t) {
|
|
29
31
|
return e.range.start - t.range.start || e.range.end - t.range.end || e.line - t.line || e.column - t.column || (e.code < t.code ? -1 : +(e.code > t.code));
|
|
30
32
|
}
|
|
31
|
-
function
|
|
33
|
+
function b(e) {
|
|
32
34
|
let t = /* @__PURE__ */ new Map();
|
|
33
35
|
for (let n of e) for (let e of n) {
|
|
34
|
-
let n =
|
|
36
|
+
let n = v(e);
|
|
35
37
|
t.has(n) || t.set(n, e);
|
|
36
38
|
}
|
|
37
|
-
return [...t.values()].sort(
|
|
39
|
+
return [...t.values()].sort(y);
|
|
38
40
|
}
|
|
39
|
-
function
|
|
40
|
-
let n = t.filter((e) => e.code !== "local.author.unclosed"), r = t.filter((e) => e.code === "local.author.unclosed"), i = new Set(n.map(
|
|
41
|
+
function x(e, t) {
|
|
42
|
+
let n = t.filter((e) => e.code !== "local.author.unclosed"), r = t.filter((e) => e.code === "local.author.unclosed"), i = new Set(n.map(v));
|
|
41
43
|
return {
|
|
42
44
|
diagnostics: n,
|
|
43
|
-
transientDiagnostics:
|
|
45
|
+
transientDiagnostics: b([...e, r]).filter((e) => !i.has(v(e)))
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
|
-
function
|
|
48
|
+
function S(e, t) {
|
|
47
49
|
if (e.length !== t.length) return !1;
|
|
48
50
|
for (let n = 0; n < e.length; n += 1) if (e[n].start !== t[n].start || e[n].end !== t[n].end) return !1;
|
|
49
51
|
return !0;
|
|
50
52
|
}
|
|
51
|
-
function
|
|
53
|
+
function C(e, t) {
|
|
52
54
|
return e.length === 1 && e[0].start === 0 && e[0].end === t;
|
|
53
55
|
}
|
|
54
|
-
function
|
|
56
|
+
function w(e, t, n) {
|
|
55
57
|
for (let r of e) if (r.range.start <= t && r.range.end >= n) return r;
|
|
56
58
|
}
|
|
57
|
-
function
|
|
58
|
-
let r = t.length, i = Math.max(0, Math.min(r, e.range.start)), a =
|
|
59
|
+
function T(e, t, n) {
|
|
60
|
+
let r = t.length, i = Math.max(0, Math.min(r, e.range.start)), a = w(n, i, Math.max(i, Math.min(r, e.range.end)));
|
|
59
61
|
if (a) return {
|
|
60
62
|
start: a.range.start,
|
|
61
63
|
end: a.range.end
|
|
@@ -72,111 +74,120 @@ function C(e, t, n) {
|
|
|
72
74
|
end: r
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
|
-
function
|
|
77
|
+
function E(e, t) {
|
|
76
78
|
let n = t;
|
|
77
79
|
for (let t of e) t.range.start < n && (n = t.range.start);
|
|
78
80
|
return n;
|
|
79
81
|
}
|
|
80
|
-
function
|
|
82
|
+
function D(e, t, r, i, a) {
|
|
81
83
|
let o = [...e];
|
|
82
|
-
for (let e of t) o.push(
|
|
83
|
-
let s =
|
|
84
|
-
return a && (s =
|
|
84
|
+
for (let e of t) o.push(T(e, i, r?.nodes ?? []));
|
|
85
|
+
let s = n(o, i.length), c = E(t, i.length);
|
|
86
|
+
return a && (s = n([...s, {
|
|
85
87
|
start: c,
|
|
86
88
|
end: i.length
|
|
87
|
-
}], i.length)),
|
|
89
|
+
}], i.length)), S(s, e) && (s = n([...e, {
|
|
88
90
|
start: c,
|
|
89
91
|
end: i.length
|
|
90
92
|
}], i.length)), s;
|
|
91
93
|
}
|
|
92
|
-
function
|
|
94
|
+
function O(e, t) {
|
|
93
95
|
for (let [n, r] of Object.entries(t)) typeof r == "number" && Number.isFinite(r) && (e[n] = (e[n] ?? 0) + r);
|
|
94
96
|
}
|
|
95
|
-
function
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
function k(e) {
|
|
98
|
+
let t = e;
|
|
99
|
+
if (typeof t != "object" || !t || Array.isArray(t)) return e;
|
|
100
|
+
let n = t.sourcePhase;
|
|
101
|
+
return n !== void 0 && n !== "streaming" && n !== "final" ? e : {
|
|
102
|
+
...e,
|
|
103
|
+
sourcePhase: "streaming"
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function ee(e, t, n, r = !1) {
|
|
107
|
+
let i = k(t), a = [], s = [], c = {}, l, u = 0;
|
|
108
|
+
for (let t = 1; t <= 6; t += 1) {
|
|
109
|
+
u = t, l = o(e, i, n, a, r), O(c, l.timings);
|
|
110
|
+
let d = l.result;
|
|
111
|
+
if (d.ok) {
|
|
112
|
+
let e = x(s, d.diagnostics);
|
|
102
113
|
return {
|
|
103
114
|
result: {
|
|
104
|
-
...
|
|
115
|
+
...d,
|
|
105
116
|
status: "partial",
|
|
106
117
|
...e
|
|
107
118
|
},
|
|
108
|
-
...
|
|
119
|
+
...l.parsed ? { parsed: l.parsed } : {},
|
|
109
120
|
transientDiagnostics: e.transientDiagnostics,
|
|
110
|
-
literalRanges: [...
|
|
111
|
-
attempts:
|
|
112
|
-
timings:
|
|
121
|
+
literalRanges: [...a],
|
|
122
|
+
attempts: u,
|
|
123
|
+
timings: c
|
|
113
124
|
};
|
|
114
125
|
}
|
|
115
|
-
let { definite:
|
|
116
|
-
if (
|
|
117
|
-
let e =
|
|
126
|
+
let { definite: f, transient: p } = _(d.diagnostics, e);
|
|
127
|
+
if (f.length > 0) {
|
|
128
|
+
let e = b([...s, p]);
|
|
118
129
|
return {
|
|
119
130
|
result: {
|
|
120
131
|
ok: !1,
|
|
121
|
-
diagnostics:
|
|
122
|
-
...
|
|
132
|
+
diagnostics: f,
|
|
133
|
+
...d.recoveries ? { recoveries: [...d.recoveries] } : {},
|
|
123
134
|
status: "failed",
|
|
124
135
|
transientDiagnostics: e
|
|
125
136
|
},
|
|
126
|
-
...
|
|
137
|
+
...l.parsed ? { parsed: l.parsed } : {},
|
|
127
138
|
transientDiagnostics: e,
|
|
128
|
-
literalRanges: [...
|
|
129
|
-
attempts:
|
|
130
|
-
timings:
|
|
139
|
+
literalRanges: [...a],
|
|
140
|
+
attempts: u,
|
|
141
|
+
timings: c
|
|
131
142
|
};
|
|
132
143
|
}
|
|
133
|
-
if (
|
|
134
|
-
let
|
|
135
|
-
if (
|
|
136
|
-
|
|
144
|
+
if (s.push(p), t === 6) break;
|
|
145
|
+
let m = D(a, p, l.parsed, e, t >= 5);
|
|
146
|
+
if (S(m, a)) break;
|
|
147
|
+
a = m, C(a, e.length);
|
|
137
148
|
}
|
|
138
|
-
if (typeof e == "string" && e.length <= 1e6 && !
|
|
139
|
-
let
|
|
149
|
+
if (typeof e == "string" && e.length <= 1e6 && !C(a, e.length)) {
|
|
150
|
+
let t = [{
|
|
140
151
|
start: 0,
|
|
141
152
|
end: e.length
|
|
142
|
-
}],
|
|
143
|
-
if (
|
|
144
|
-
let e =
|
|
153
|
+
}], l = o(e, i, n, t, r);
|
|
154
|
+
if (O(c, l.timings), u += 1, l.result.ok) {
|
|
155
|
+
let e = x(s, l.result.diagnostics);
|
|
145
156
|
return {
|
|
146
157
|
result: {
|
|
147
|
-
...
|
|
158
|
+
...l.result,
|
|
148
159
|
status: "partial",
|
|
149
160
|
...e
|
|
150
161
|
},
|
|
151
|
-
...
|
|
162
|
+
...l.parsed ? { parsed: l.parsed } : {},
|
|
152
163
|
transientDiagnostics: e.transientDiagnostics,
|
|
153
|
-
literalRanges:
|
|
154
|
-
attempts:
|
|
155
|
-
timings:
|
|
164
|
+
literalRanges: t,
|
|
165
|
+
attempts: u,
|
|
166
|
+
timings: c
|
|
156
167
|
};
|
|
157
168
|
}
|
|
158
|
-
let { definite:
|
|
159
|
-
if (
|
|
169
|
+
let { definite: d, transient: f } = _(l.result.diagnostics, e), p = b([...s, f]);
|
|
170
|
+
if (d.length > 0) return {
|
|
160
171
|
result: {
|
|
161
172
|
ok: !1,
|
|
162
|
-
diagnostics:
|
|
163
|
-
...
|
|
173
|
+
diagnostics: d,
|
|
174
|
+
...l.result.recoveries ? { recoveries: [...l.result.recoveries] } : {},
|
|
164
175
|
status: "failed",
|
|
165
|
-
transientDiagnostics:
|
|
176
|
+
transientDiagnostics: p
|
|
166
177
|
},
|
|
167
|
-
...
|
|
168
|
-
transientDiagnostics:
|
|
169
|
-
literalRanges:
|
|
170
|
-
attempts:
|
|
171
|
-
timings:
|
|
178
|
+
...l.parsed ? { parsed: l.parsed } : {},
|
|
179
|
+
transientDiagnostics: p,
|
|
180
|
+
literalRanges: t,
|
|
181
|
+
attempts: u,
|
|
182
|
+
timings: c
|
|
172
183
|
};
|
|
173
|
-
|
|
184
|
+
a = t;
|
|
174
185
|
}
|
|
175
|
-
let
|
|
186
|
+
let d = l, f = b(s);
|
|
176
187
|
return {
|
|
177
188
|
result: {
|
|
178
189
|
ok: !1,
|
|
179
|
-
diagnostics:
|
|
190
|
+
diagnostics: d !== void 0 && d.result.ok === !1 && d.result.diagnostics.length > 0 ? [...d.result.diagnostics] : f.length > 0 ? f : [{
|
|
180
191
|
code: "local.parse",
|
|
181
192
|
message: "The streaming snapshot could not be compiled.",
|
|
182
193
|
severity: "error",
|
|
@@ -187,19 +198,19 @@ function ee(e, t, n) {
|
|
|
187
198
|
line: 1,
|
|
188
199
|
column: 1
|
|
189
200
|
}],
|
|
190
|
-
...
|
|
201
|
+
...d?.result.recoveries ? { recoveries: [...d.result.recoveries] } : {},
|
|
191
202
|
status: "failed",
|
|
192
|
-
transientDiagnostics:
|
|
203
|
+
transientDiagnostics: f
|
|
193
204
|
},
|
|
194
|
-
...
|
|
195
|
-
transientDiagnostics:
|
|
196
|
-
literalRanges: [...
|
|
197
|
-
attempts:
|
|
198
|
-
timings:
|
|
205
|
+
...d?.parsed ? { parsed: d.parsed } : {},
|
|
206
|
+
transientDiagnostics: f,
|
|
207
|
+
literalRanges: [...a],
|
|
208
|
+
attempts: u,
|
|
209
|
+
timings: c
|
|
199
210
|
};
|
|
200
211
|
}
|
|
201
212
|
// src/local/compilation/session/semantic-cache.ts
|
|
202
|
-
var
|
|
213
|
+
var A = () => ({
|
|
203
214
|
expressionsCompiled: 0,
|
|
204
215
|
expressionsReused: 0,
|
|
205
216
|
typesInferred: 0,
|
|
@@ -218,12 +229,12 @@ var D = () => ({
|
|
|
218
229
|
key;
|
|
219
230
|
values = /* @__PURE__ */ new Map();
|
|
220
231
|
weight = 0;
|
|
221
|
-
counts =
|
|
232
|
+
counts = A();
|
|
222
233
|
constructor(e = 16384, t = 8e6) {
|
|
223
234
|
this.capacity = e, this.maxWeight = t;
|
|
224
235
|
}
|
|
225
236
|
begin(e) {
|
|
226
|
-
this.key !== e && (this.clear(), this.key = e), this.counts =
|
|
237
|
+
this.key !== e && (this.clear(), this.key = e), this.counts = A();
|
|
227
238
|
}
|
|
228
239
|
get stats() {
|
|
229
240
|
return {
|
|
@@ -232,7 +243,7 @@ var D = () => ({
|
|
|
232
243
|
};
|
|
233
244
|
}
|
|
234
245
|
clear() {
|
|
235
|
-
this.values.clear(), this.weight = 0, this.key = void 0, this.counts =
|
|
246
|
+
this.values.clear(), this.weight = 0, this.key = void 0, this.counts = A();
|
|
236
247
|
}
|
|
237
248
|
get(e) {
|
|
238
249
|
let t = this.values.get(e);
|
|
@@ -283,14 +294,14 @@ var D = () => ({
|
|
|
283
294
|
display(e, t) {
|
|
284
295
|
let n = "display:" + JSON.stringify([e, t]), r = this.get(n);
|
|
285
296
|
if (r) return this.counts.displaysReused++, r;
|
|
286
|
-
let
|
|
287
|
-
return this.counts.displaysInspected++, this.put(n,
|
|
297
|
+
let i = s(e, t);
|
|
298
|
+
return this.counts.displaysInspected++, this.put(n, i), i;
|
|
288
299
|
}
|
|
289
|
-
}, ne = 128, re = 512, ie = 32, ae = 131072,
|
|
300
|
+
}, ne = 128, re = 512, ie = 32, ae = 131072, j = (e) => JSON.parse(JSON.stringify(e));
|
|
290
301
|
function oe(e) {
|
|
291
302
|
return typeof e == "object" && !!e && e.strict === !1;
|
|
292
303
|
}
|
|
293
|
-
var
|
|
304
|
+
var M = class {
|
|
294
305
|
limit;
|
|
295
306
|
byteLimit;
|
|
296
307
|
entries = /* @__PURE__ */ new Map();
|
|
@@ -322,9 +333,9 @@ var k = class {
|
|
|
322
333
|
disposed = !1;
|
|
323
334
|
optionKey;
|
|
324
335
|
recoveryMode;
|
|
325
|
-
plans = new
|
|
326
|
-
inline = new
|
|
327
|
-
trees = new
|
|
336
|
+
plans = new M(ne, 524288);
|
|
337
|
+
inline = new M(re, 262144);
|
|
338
|
+
trees = new M(ie, 524288);
|
|
328
339
|
counts = {
|
|
329
340
|
hits: 0,
|
|
330
341
|
misses: 0,
|
|
@@ -337,8 +348,8 @@ var k = class {
|
|
|
337
348
|
};
|
|
338
349
|
parse(e, t, n, r, i) {
|
|
339
350
|
if (this.disposed) throw Error("Local parse session is disposed");
|
|
340
|
-
let a =
|
|
341
|
-
return (a !== this.optionKey || o !== this.recoveryMode) && (this.optionKey = a, this.recoveryMode = o, this.reset()), i && i.length > 0 ?
|
|
351
|
+
let a = p(t), o = oe(t);
|
|
352
|
+
return (a !== this.optionKey || o !== this.recoveryMode) && (this.optionKey = a, this.recoveryMode = o, this.reset()), i && i.length > 0 ? m(e, t, n, void 0, void 0, i) : m(e, t, n, this, r);
|
|
342
353
|
}
|
|
343
354
|
clear() {
|
|
344
355
|
this.optionKey = void 0, this.recoveryMode = void 0, this.reset();
|
|
@@ -383,9 +394,9 @@ var k = class {
|
|
|
383
394
|
return this.lookup(this.inline, e);
|
|
384
395
|
}
|
|
385
396
|
writeInline(e, t) {
|
|
386
|
-
e.length > ae || this.inline.write(
|
|
397
|
+
e.length > ae || this.inline.write(j(e), t?.map((e) => ({
|
|
387
398
|
...e,
|
|
388
|
-
value:
|
|
399
|
+
value: j(e.value)
|
|
389
400
|
})));
|
|
390
401
|
}
|
|
391
402
|
notePlanReuse() {
|
|
@@ -407,8 +418,8 @@ var k = class {
|
|
|
407
418
|
let r = e.read(t);
|
|
408
419
|
return r.hit ? (this.counts.hits += 1, n && (this.counts.reusedAst += 1)) : this.counts.misses += 1, r;
|
|
409
420
|
}
|
|
410
|
-
},
|
|
411
|
-
function
|
|
421
|
+
}, N = /* @__PURE__ */ new WeakSet();
|
|
422
|
+
function P(e, t) {
|
|
412
423
|
let n = 0, r = 0, i = /* @__PURE__ */ new WeakMap(), a = [], o = (e, t, n) => {
|
|
413
424
|
e && (Object.defineProperty(e.output, t, {
|
|
414
425
|
value: n,
|
|
@@ -419,7 +430,7 @@ function j(e, t) {
|
|
|
419
430
|
}, s = (e, t, r, o) => {
|
|
420
431
|
if (typeof t != "object" || !t) return t;
|
|
421
432
|
if (e === t) return n++, e;
|
|
422
|
-
if (e === void 0 &&
|
|
433
|
+
if (e === void 0 && N.has(t)) return n++, t;
|
|
423
434
|
if (i.has(t)) return i.get(t);
|
|
424
435
|
let s = Array.isArray(t), c = typeof e == "object" && e && Array.isArray(e) === s ? e : void 0, l = Object.keys(t), u = c ? Object.keys(c) : [], d = s ? Array(t.length) : {};
|
|
425
436
|
i.set(t, d);
|
|
@@ -446,7 +457,7 @@ function j(e, t) {
|
|
|
446
457
|
}
|
|
447
458
|
a.pop();
|
|
448
459
|
let t;
|
|
449
|
-
e.equal ? (t = e.before, n++) : (r++, t = Object.isFrozen(e.after) ? Object.freeze(e.output) : e.output,
|
|
460
|
+
e.equal ? (t = e.before, n++) : (r++, t = Object.isFrozen(e.after) ? Object.freeze(e.output) : e.output, N.add(t)), i.set(e.after, t), e.parent ? o(e.parent, e.key, t) : c = t;
|
|
450
461
|
}
|
|
451
462
|
return {
|
|
452
463
|
value: c,
|
|
@@ -469,7 +480,7 @@ function ce(e, t) {
|
|
|
469
480
|
return i;
|
|
470
481
|
}
|
|
471
482
|
// src/local/compilation/session/row-reuse.ts
|
|
472
|
-
function
|
|
483
|
+
function F(e) {
|
|
473
484
|
if (e.nodes.length !== 1) return;
|
|
474
485
|
let t = e.nodes[0], n, r;
|
|
475
486
|
if (t.type === "list") n = "item", r = "listItem";
|
|
@@ -495,25 +506,25 @@ function M(e) {
|
|
|
495
506
|
rows: a
|
|
496
507
|
};
|
|
497
508
|
}
|
|
498
|
-
function
|
|
509
|
+
function I(e, t) {
|
|
499
510
|
if (e === t) return !0;
|
|
500
511
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
501
512
|
let n = Object.keys(e), r = Object.keys(t);
|
|
502
513
|
if (n.length !== r.length) return !1;
|
|
503
|
-
for (let r of n) if (!Object.hasOwn(t, r) || !
|
|
514
|
+
for (let r of n) if (!Object.hasOwn(t, r) || !I(e[r], t[r])) return !1;
|
|
504
515
|
return !0;
|
|
505
516
|
}
|
|
506
|
-
function
|
|
517
|
+
function L(e, t, n, r) {
|
|
507
518
|
if (e.type !== t.type || e.range.start - n !== t.range.start - r || e.range.end - n !== t.range.end - r) return !1;
|
|
508
519
|
let i = Object.keys(e), a = Object.keys(t);
|
|
509
520
|
if (i.length !== a.length) return !1;
|
|
510
|
-
for (let n of i) if (n !== "id" && n !== "range" && n !== "children" && (!Object.hasOwn(t, n) || !
|
|
521
|
+
for (let n of i) if (n !== "id" && n !== "range" && n !== "children" && (!Object.hasOwn(t, n) || !I(e[n], t[n]))) return !1;
|
|
511
522
|
let o = e.children ?? [], s = t.children ?? [];
|
|
512
523
|
if (o.length !== s.length) return !1;
|
|
513
|
-
for (let e = 0; e < o.length; e++) if (!
|
|
524
|
+
for (let e = 0; e < o.length; e++) if (!L(o[e], s[e], n, r)) return !1;
|
|
514
525
|
return !0;
|
|
515
526
|
}
|
|
516
|
-
function
|
|
527
|
+
function R(e, t) {
|
|
517
528
|
let n = {
|
|
518
529
|
...e,
|
|
519
530
|
range: {
|
|
@@ -521,14 +532,14 @@ function F(e, t) {
|
|
|
521
532
|
end: e.range.end + t
|
|
522
533
|
}
|
|
523
534
|
};
|
|
524
|
-
return e.attrs && (n.attrs = { ...e.attrs }), e.align && (n.align = [...e.align]), e.children && (n.children = e.children.map((e) =>
|
|
535
|
+
return e.attrs && (n.attrs = { ...e.attrs }), e.align && (n.align = [...e.align]), e.children && (n.children = e.children.map((e) => R(e, t))), n;
|
|
525
536
|
}
|
|
526
|
-
function
|
|
527
|
-
if (t.add(e.id), e.children) for (let n of e.children)
|
|
537
|
+
function z(e, t) {
|
|
538
|
+
if (t.add(e.id), e.children) for (let n of e.children) z(n, t);
|
|
528
539
|
}
|
|
529
540
|
function le(e, t) {
|
|
530
541
|
if (!e) return;
|
|
531
|
-
let n =
|
|
542
|
+
let n = F(e), r = F(t);
|
|
532
543
|
if (!n || !r || n.kind !== r.kind) return;
|
|
533
544
|
let i = n.rows, a = r.rows, o = Math.min(i.length, a.length), s = 0;
|
|
534
545
|
for (; s < o && i[s].text === a[s].text;) s += 1;
|
|
@@ -539,9 +550,9 @@ function le(e, t) {
|
|
|
539
550
|
let n;
|
|
540
551
|
if (t < s ? n = t : t >= a.length - c && (n = i.length - (a.length - t)), n === void 0) return e.node;
|
|
541
552
|
let r = i[n];
|
|
542
|
-
if (!
|
|
543
|
-
let o = e.node.range.start - r.node.range.start, d = o === 0 ? r.node :
|
|
544
|
-
return u += 1,
|
|
553
|
+
if (!L(r.node, e.node, r.node.range.start, e.node.range.start)) return e.node;
|
|
554
|
+
let o = e.node.range.start - r.node.range.start, d = o === 0 ? r.node : R(r.node, o);
|
|
555
|
+
return u += 1, z(d, l), d;
|
|
545
556
|
});
|
|
546
557
|
if (!u) return;
|
|
547
558
|
let f = {
|
|
@@ -557,13 +568,13 @@ function le(e, t) {
|
|
|
557
568
|
};
|
|
558
569
|
}
|
|
559
570
|
// src/local/compilation/session/incremental.ts
|
|
560
|
-
function
|
|
571
|
+
function B(e) {
|
|
561
572
|
return typeof e == "object" && !!e && e.strict === !1;
|
|
562
573
|
}
|
|
563
|
-
function
|
|
574
|
+
function V(e) {
|
|
564
575
|
return Object.hasOwn(e, "recoveries") && e.recoveries !== void 0;
|
|
565
576
|
}
|
|
566
|
-
function
|
|
577
|
+
function H(e) {
|
|
567
578
|
return e === "streaming" || e === "final" ? e : void 0;
|
|
568
579
|
}
|
|
569
580
|
function ue() {
|
|
@@ -588,13 +599,13 @@ function ue() {
|
|
|
588
599
|
}
|
|
589
600
|
function de(e) {
|
|
590
601
|
try {
|
|
591
|
-
return typeof e == "object" && e ?
|
|
602
|
+
return typeof e == "object" && e ? H(e.sourcePhase) : void 0;
|
|
592
603
|
} catch {
|
|
593
604
|
return;
|
|
594
605
|
}
|
|
595
606
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
607
|
+
var U = u.configure(l), W = "\n\n<!-- incremental-boundary -->\n\n";
|
|
608
|
+
function G(e) {
|
|
598
609
|
let t = [], n = [...e].reverse();
|
|
599
610
|
for (; n.length;) {
|
|
600
611
|
let e = n.pop();
|
|
@@ -602,7 +613,7 @@ function H(e) {
|
|
|
602
613
|
}
|
|
603
614
|
return t;
|
|
604
615
|
}
|
|
605
|
-
function
|
|
616
|
+
function K(e, t, n) {
|
|
606
617
|
return t === 0 && !n ? e : e.map((e) => ({
|
|
607
618
|
...e,
|
|
608
619
|
id: n?.get(e.id) ?? e.id,
|
|
@@ -610,44 +621,78 @@ function U(e, t, n) {
|
|
|
610
621
|
start: e.range.start + t,
|
|
611
622
|
end: e.range.end + t
|
|
612
623
|
},
|
|
624
|
+
...e.fallback ? { fallback: {
|
|
625
|
+
...e.fallback,
|
|
626
|
+
range: {
|
|
627
|
+
start: e.fallback.range.start + t,
|
|
628
|
+
end: e.fallback.range.end + t
|
|
629
|
+
}
|
|
630
|
+
} } : {},
|
|
613
631
|
...e.attrs ? { attrs: { ...e.attrs } } : {},
|
|
614
632
|
...e.align ? { align: [...e.align] } : {},
|
|
615
|
-
...e.children ? { children:
|
|
633
|
+
...e.children ? { children: K(e.children, t, n) } : {}
|
|
616
634
|
}));
|
|
617
635
|
}
|
|
618
|
-
function
|
|
636
|
+
function q(e, t, n) {
|
|
619
637
|
let r = Object.create(null);
|
|
620
|
-
for (let i of
|
|
638
|
+
for (let i of G(e)) r[n?.get(i.id) ?? i.id] = t.dependencies?.[i.id] ?? null;
|
|
621
639
|
return r;
|
|
622
640
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
641
|
+
var J = /* @__PURE__ */ new Set(), fe = "raw-body";
|
|
642
|
+
function pe(e) {
|
|
643
|
+
try {
|
|
644
|
+
let t = f(e);
|
|
645
|
+
if (!t.ok) return J;
|
|
646
|
+
let n = /* @__PURE__ */ new Set();
|
|
647
|
+
for (let [e, r] of t.schemaByName) r.form === "container" && r.structure.rule === fe && n.add(e);
|
|
648
|
+
return n.size ? n : J;
|
|
649
|
+
} catch {
|
|
650
|
+
return J;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function Y(e, t) {
|
|
654
|
+
return (e.type === "component" || e.type === "hostComponent") && e.name !== void 0 && t.has(e.name);
|
|
655
|
+
}
|
|
656
|
+
function X(e, t = J) {
|
|
657
|
+
if (Y(e, t)) return "raw";
|
|
658
|
+
let n = !1;
|
|
659
|
+
for (let r of G([e])) {
|
|
626
660
|
if ([
|
|
627
661
|
"authorCss",
|
|
628
662
|
"authorJavaScript",
|
|
629
663
|
"extendedHtmlRaw"
|
|
630
|
-
].includes(
|
|
664
|
+
].includes(r.type) || r.attrs && (Object.hasOwn(r.attrs, "css") || Object.hasOwn(r.attrs, "action-id")) || [
|
|
631
665
|
"definition",
|
|
632
666
|
"footnoteDefinition",
|
|
633
667
|
"footnoteReference",
|
|
634
668
|
"linkReference",
|
|
635
669
|
"imageReference"
|
|
636
|
-
].includes(
|
|
637
|
-
if (
|
|
638
|
-
if (
|
|
639
|
-
|
|
670
|
+
].includes(r.type)) return "unsupported";
|
|
671
|
+
if (r.type === "hostComponent" || r.type === "htmlDocument" || r.type === "fallback") {
|
|
672
|
+
if (Y(r, t)) {
|
|
673
|
+
n = !0;
|
|
674
|
+
continue;
|
|
675
|
+
}
|
|
676
|
+
return "unsupported";
|
|
677
|
+
}
|
|
678
|
+
if (r.type === "component") {
|
|
679
|
+
if (Y(r, t)) {
|
|
680
|
+
n = !0;
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
if (["anchor", "jump"].includes(r.name ?? "") || !h(r.name ?? "")) return "unsupported";
|
|
684
|
+
n = !0;
|
|
640
685
|
}
|
|
641
|
-
|
|
686
|
+
r.type === "comment" && (n = !0);
|
|
642
687
|
}
|
|
643
|
-
return
|
|
688
|
+
return n ? "context" : "fragment";
|
|
644
689
|
}
|
|
645
|
-
function
|
|
690
|
+
function Z(e, t) {
|
|
646
691
|
let n = "", r = 0;
|
|
647
692
|
for (let i of t) n += e.slice(r, i.from) + i.text.replace(/[^\r\n]/g, " "), r = i.to;
|
|
648
693
|
return n + e.slice(r);
|
|
649
694
|
}
|
|
650
|
-
function
|
|
695
|
+
function Q(e, t, n) {
|
|
651
696
|
let r = e.cursor();
|
|
652
697
|
do
|
|
653
698
|
if (r.name === "LinkReference") return null;
|
|
@@ -666,14 +711,14 @@ function q(e, t, n) {
|
|
|
666
711
|
}
|
|
667
712
|
return i;
|
|
668
713
|
}
|
|
669
|
-
function
|
|
714
|
+
function me(e) {
|
|
670
715
|
return /\r(?!\n)/.test(e);
|
|
671
716
|
}
|
|
672
|
-
function
|
|
717
|
+
function he(e, t) {
|
|
673
718
|
for (; t > 0 && e[t - 1] !== "\n" && e[t - 1] !== "\r";) t--;
|
|
674
719
|
return t;
|
|
675
720
|
}
|
|
676
|
-
function
|
|
721
|
+
function ge(e, t) {
|
|
677
722
|
let n = new Set(t.map((e) => e.from));
|
|
678
723
|
for (let r of t) {
|
|
679
724
|
let t = r.to;
|
|
@@ -688,7 +733,7 @@ function Y(e, t) {
|
|
|
688
733
|
}
|
|
689
734
|
return !1;
|
|
690
735
|
}
|
|
691
|
-
function
|
|
736
|
+
function $(e, t, n, r) {
|
|
692
737
|
if (e.type !== n.type || e.range.start + t !== n.range.start + r || e.range.end + t !== n.range.end + r) return !1;
|
|
693
738
|
let i = 0;
|
|
694
739
|
for (let [a, o] of Object.entries(e)) {
|
|
@@ -698,13 +743,13 @@ function X(e, t, n, r) {
|
|
|
698
743
|
if (a === "children") {
|
|
699
744
|
let n = o, i = e;
|
|
700
745
|
if (!i || n.length !== i.length) return !1;
|
|
701
|
-
for (let e = 0; e < n.length; e++) if (
|
|
746
|
+
for (let e = 0; e < n.length; e++) if (!$(n[e], t, i[e], r)) return !1;
|
|
702
747
|
} else if (o !== e && JSON.stringify(o) !== JSON.stringify(e)) return !1;
|
|
703
748
|
}
|
|
704
749
|
for (let [e, t] of Object.entries(n)) t !== void 0 && e !== "id" && e !== "range" && i--;
|
|
705
750
|
return i === 0;
|
|
706
751
|
}
|
|
707
|
-
function
|
|
752
|
+
function _e(e, t) {
|
|
708
753
|
let n = 0, r = e.length, i = t.length;
|
|
709
754
|
for (; n < r && n < i && e.charCodeAt(n) === t.charCodeAt(n);) n++;
|
|
710
755
|
for (; r > n && i > n && e.charCodeAt(r - 1) === t.charCodeAt(i - 1);) r--, i--;
|
|
@@ -715,14 +760,14 @@ function Z(e, t) {
|
|
|
715
760
|
delta: i - r
|
|
716
761
|
};
|
|
717
762
|
}
|
|
718
|
-
function
|
|
763
|
+
function ve(e, t) {
|
|
719
764
|
let n = e.parsed?.plans;
|
|
720
765
|
if (n?.length) {
|
|
721
766
|
for (let e of n) if (e.source === t) return e.rows;
|
|
722
767
|
if (n.length === 1) return n[0].rows;
|
|
723
768
|
}
|
|
724
769
|
}
|
|
725
|
-
var
|
|
770
|
+
var ye = class {
|
|
726
771
|
disposed = !1;
|
|
727
772
|
snapshot = null;
|
|
728
773
|
deferred = null;
|
|
@@ -732,6 +777,7 @@ var $ = class {
|
|
|
732
777
|
parser: this.parseSession,
|
|
733
778
|
semantic: this.semantic
|
|
734
779
|
};
|
|
780
|
+
rawNamesCache = null;
|
|
735
781
|
shared = null;
|
|
736
782
|
sharedKey;
|
|
737
783
|
sharedMode;
|
|
@@ -752,8 +798,8 @@ var $ = class {
|
|
|
752
798
|
cacheBuilds: this.cacheBuilds
|
|
753
799
|
};
|
|
754
800
|
}
|
|
755
|
-
compile(e, t,
|
|
756
|
-
let i = this.compileShared(e, t,
|
|
801
|
+
compile(e, t, n) {
|
|
802
|
+
let i = this.compileShared(e, t, n), a = performance.now(), o = r(i);
|
|
757
803
|
return this.lastStats = {
|
|
758
804
|
...this.lastStats,
|
|
759
805
|
stages: {
|
|
@@ -762,159 +808,167 @@ var $ = class {
|
|
|
762
808
|
}
|
|
763
809
|
}, o;
|
|
764
810
|
}
|
|
765
|
-
compileShared(e, t, n) {
|
|
811
|
+
compileShared(e, t, n, r = !!t?.observer?.onTrace) {
|
|
766
812
|
if (this.disposed) throw Error("Local compile session is disposed");
|
|
767
|
-
if (n !== void 0 &&
|
|
768
|
-
let
|
|
769
|
-
return
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
813
|
+
if (n !== void 0 && H(n) === void 0) return ue();
|
|
814
|
+
let i = de(t), a = H(n) ?? i;
|
|
815
|
+
return a === "streaming" ? this.compileStreaming(e, t, r) : a === "final" ? this.compileFinal(e, i === "streaming" ? {
|
|
816
|
+
...t,
|
|
817
|
+
sourcePhase: "final"
|
|
818
|
+
} : t, r) : this.compileFinalOrLegacy(e, t, r);
|
|
819
|
+
}
|
|
820
|
+
compileFinal(e, t, n) {
|
|
821
|
+
let r = this.compileFinalOrLegacy(e, t, n);
|
|
822
|
+
return r.ok ? {
|
|
823
|
+
...r,
|
|
824
|
+
status: V(r) ? "recovered" : "valid"
|
|
776
825
|
} : {
|
|
777
|
-
...
|
|
826
|
+
...r,
|
|
778
827
|
status: "failed"
|
|
779
828
|
};
|
|
780
829
|
}
|
|
781
|
-
compileStreaming(e, t) {
|
|
782
|
-
let
|
|
783
|
-
if (
|
|
830
|
+
compileStreaming(e, t, n) {
|
|
831
|
+
let r = f(t).ok, i = p(t), a = this.streamingCache;
|
|
832
|
+
if (r && a !== null && a.source === e && a.key === i) return this.lastStats = {
|
|
784
833
|
mode: "streaming",
|
|
785
|
-
totalBlocks:
|
|
834
|
+
totalBlocks: a.blocks,
|
|
786
835
|
compiledBlocks: 0,
|
|
787
836
|
reusedBlocks: 0,
|
|
788
837
|
compiledCharacters: 0
|
|
789
|
-
},
|
|
790
|
-
let
|
|
838
|
+
}, a.result;
|
|
839
|
+
let o = ee(e, t, this.services, n), s = o.parsed?.nodes.length ?? 0;
|
|
791
840
|
return this.lastStats = {
|
|
792
841
|
mode: "streaming",
|
|
793
|
-
totalBlocks:
|
|
794
|
-
compiledBlocks:
|
|
842
|
+
totalBlocks: s,
|
|
843
|
+
compiledBlocks: s,
|
|
795
844
|
reusedBlocks: 0,
|
|
796
845
|
compiledCharacters: typeof e == "string" ? e.length : 0,
|
|
797
|
-
stages:
|
|
798
|
-
},
|
|
846
|
+
stages: o.timings
|
|
847
|
+
}, r && (this.streamingCache = {
|
|
799
848
|
source: e,
|
|
800
|
-
key:
|
|
801
|
-
result:
|
|
802
|
-
blocks:
|
|
803
|
-
}),
|
|
849
|
+
key: i,
|
|
850
|
+
result: o.result,
|
|
851
|
+
blocks: s
|
|
852
|
+
}), o.result;
|
|
804
853
|
}
|
|
805
|
-
compileFinalOrLegacy(e, t) {
|
|
854
|
+
compileFinalOrLegacy(e, t, n) {
|
|
806
855
|
this.epoch++;
|
|
807
|
-
let
|
|
808
|
-
(
|
|
809
|
-
let
|
|
810
|
-
return this.shared =
|
|
856
|
+
let r = p(t), i = B(t);
|
|
857
|
+
(r !== this.sharedKey || i !== this.sharedMode) && (this.shared = null, this.sharedKey = r, this.sharedMode = i);
|
|
858
|
+
let a = this.compileCore(e, t, n), o = performance.now(), s = this.shared, c = P(s ?? void 0, a).value;
|
|
859
|
+
return this.shared = c, this.lastStats = {
|
|
811
860
|
...this.lastStats,
|
|
812
|
-
sharedNodes: ce(
|
|
861
|
+
sharedNodes: ce(s, c),
|
|
813
862
|
parse: this.parseSession.stats,
|
|
814
863
|
semantic: this.lastStats.semantic ?? this.semantic.stats,
|
|
815
864
|
stages: {
|
|
816
865
|
...this.lastStats.stages,
|
|
817
|
-
sharedPublicationMs: performance.now() -
|
|
866
|
+
sharedPublicationMs: performance.now() - o
|
|
818
867
|
}
|
|
819
|
-
},
|
|
868
|
+
}, c;
|
|
820
869
|
}
|
|
821
|
-
compileCore(e, t) {
|
|
870
|
+
compileCore(e, t, n) {
|
|
822
871
|
if (this.disposed) throw Error("Local compile session is disposed");
|
|
823
872
|
this.cacheBuilds = 0;
|
|
824
|
-
let
|
|
825
|
-
if (this.deferred = null, !
|
|
826
|
-
if (e ===
|
|
873
|
+
let i = p(t), a = f(t), s = this.rawNames(i, t), c = B(t), l = c ? "recovery-reference" : "initial", u = !1, m = this.deferred;
|
|
874
|
+
if (this.deferred = null, !c && m && m.key === i && a.ok && typeof e == "string" && e.length <= 1e6) {
|
|
875
|
+
if (e === m.source) return this.deferred = m, this.lastStats = {
|
|
827
876
|
mode: "cached",
|
|
828
877
|
totalBlocks: this.lastStats.totalBlocks,
|
|
829
878
|
compiledBlocks: 0,
|
|
830
879
|
reusedBlocks: this.lastStats.totalBlocks,
|
|
831
880
|
compiledCharacters: 0
|
|
832
|
-
},
|
|
833
|
-
|
|
834
|
-
let n =
|
|
835
|
-
if (a && !/[`\\~]/.test(
|
|
836
|
-
this.snapshot = this.seed(
|
|
881
|
+
}, m.tracked.result;
|
|
882
|
+
u = !0, l = "scope-or-boundary";
|
|
883
|
+
let n = _e(m.source, e), r = (e) => n.from <= e.end && n.oldTo >= e.start, a = m.tracked.parsed;
|
|
884
|
+
if (a && !/[`\\~]/.test(m.source.slice(n.from, n.oldTo) + e.slice(n.from, n.newTo)) && !a.nodes.some((e) => r(e.range) && X(e, s) !== "fragment") && ![a.versionDeclaration?.range, a.themeRange].some((e) => e && r(e))) try {
|
|
885
|
+
this.snapshot = this.seed(m.source, i, m.tracked, t, void 0, s);
|
|
837
886
|
} catch {
|
|
838
887
|
this.snapshot = null;
|
|
839
888
|
}
|
|
840
|
-
} else
|
|
841
|
-
let
|
|
842
|
-
if (!
|
|
843
|
-
if (e ===
|
|
889
|
+
} else m && (l = c ? "recovery-reference" : "options-or-limits");
|
|
890
|
+
let h = this.snapshot;
|
|
891
|
+
if (!c && h && h.key === i && a.ok && typeof e == "string" && e.length <= 1e6) {
|
|
892
|
+
if (e === h.source) return this.lastStats = {
|
|
844
893
|
mode: "cached",
|
|
845
|
-
totalBlocks:
|
|
894
|
+
totalBlocks: h.blocks.length,
|
|
846
895
|
compiledBlocks: 0,
|
|
847
|
-
reusedBlocks:
|
|
896
|
+
reusedBlocks: h.blocks.length,
|
|
848
897
|
compiledCharacters: 0
|
|
849
|
-
}, this.publish(
|
|
850
|
-
let
|
|
898
|
+
}, this.publish(h);
|
|
899
|
+
let r = null;
|
|
851
900
|
try {
|
|
852
|
-
|
|
901
|
+
r = this.update(h, e, t, a.maxSyntaxNodes, s, n);
|
|
853
902
|
} catch {}
|
|
854
|
-
if (
|
|
855
|
-
|
|
856
|
-
} else
|
|
903
|
+
if (r) return this.snapshot = r, this.publish(r);
|
|
904
|
+
l = "scope-or-boundary", u = !0;
|
|
905
|
+
} else h && (l = c ? "recovery-reference" : "options-or-limits");
|
|
857
906
|
this.snapshot = null;
|
|
858
|
-
let
|
|
907
|
+
let g = o(e, t, this.services, void 0, n);
|
|
859
908
|
if (this.lastStats = {
|
|
860
909
|
mode: "full",
|
|
861
|
-
totalBlocks:
|
|
862
|
-
compiledBlocks:
|
|
910
|
+
totalBlocks: g.parsed?.nodes.length ?? 0,
|
|
911
|
+
compiledBlocks: g.parsed?.nodes.length ?? 0,
|
|
863
912
|
reusedBlocks: 0,
|
|
864
913
|
compiledCharacters: typeof e == "string" ? e.length : 0,
|
|
865
|
-
fallbackReason:
|
|
866
|
-
semantic:
|
|
867
|
-
stages:
|
|
868
|
-
}, !
|
|
869
|
-
if (
|
|
870
|
-
let
|
|
871
|
-
if (
|
|
914
|
+
fallbackReason: l,
|
|
915
|
+
semantic: g.semantic,
|
|
916
|
+
stages: g.timings
|
|
917
|
+
}, !c && g.result.ok && !g.result.document.capabilities && g.result.diagnostics.length === 0 && !V(g.result) && a.ok && i !== "invalid") {
|
|
918
|
+
if (u) {
|
|
919
|
+
let n = t === void 0 ? void 0 : r(t), a = n;
|
|
920
|
+
if (n?.config !== void 0) try {
|
|
872
921
|
a = {
|
|
873
|
-
...
|
|
874
|
-
config:
|
|
922
|
+
...n,
|
|
923
|
+
config: d(n.config)
|
|
875
924
|
};
|
|
876
925
|
} catch {}
|
|
877
926
|
this.deferred = {
|
|
878
927
|
source: e,
|
|
879
|
-
key:
|
|
880
|
-
tracked:
|
|
928
|
+
key: i,
|
|
929
|
+
tracked: g,
|
|
881
930
|
options: a
|
|
882
931
|
};
|
|
883
932
|
} else try {
|
|
884
|
-
this.snapshot = this.seed(e,
|
|
933
|
+
this.snapshot = this.seed(e, i, g, t, void 0, s);
|
|
885
934
|
} catch {
|
|
886
935
|
this.snapshot = null;
|
|
887
936
|
}
|
|
888
937
|
this.snapshot && (this.lastStats.totalBlocks = this.lastStats.compiledBlocks = this.snapshot.blocks.length);
|
|
889
938
|
}
|
|
890
|
-
return this.snapshot ? this.publish(this.snapshot) :
|
|
939
|
+
return this.snapshot ? this.publish(this.snapshot) : g.result;
|
|
891
940
|
}
|
|
892
|
-
seed(e, t, n, r, i) {
|
|
893
|
-
if (this.cacheBuilds++, !n.result.ok || !n.parsed ||
|
|
894
|
-
let a = n.parsed.nodes,
|
|
895
|
-
if (
|
|
896
|
-
let
|
|
941
|
+
seed(e, t, n, r, i, a) {
|
|
942
|
+
if (this.cacheBuilds++, !n.result.ok || !n.parsed || V(n.result) || e.includes("[^") || e.includes("") || me(e)) return null;
|
|
943
|
+
let o = a ?? this.rawNamesFor(r), s = n.parsed.nodes, c = s.map((e) => X(e, o)), l = s.length === 1 && c[0] === "fragment" && (s[0].type === "list" || s[0].type === "table"), u = c.filter((e) => e === "raw").length;
|
|
944
|
+
if (c.includes("unsupported") || !l && u === 0 && c.filter((e) => e === "fragment").length < 2) return null;
|
|
945
|
+
let d = {
|
|
897
946
|
...n.result.document,
|
|
898
947
|
nodes: [],
|
|
899
948
|
source: ""
|
|
900
|
-
},
|
|
901
|
-
for (let t = 0; t <
|
|
902
|
-
let n =
|
|
903
|
-
if (
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
949
|
+
}, f = new Map(n.result.document.nodes.map((e) => [e.id, e])), p = [], m = [];
|
|
950
|
+
for (let t = 0; t < s.length; t++) {
|
|
951
|
+
let n = s[t], r = c[t];
|
|
952
|
+
if (r === "fragment") {
|
|
953
|
+
m.push(n);
|
|
954
|
+
continue;
|
|
955
|
+
}
|
|
956
|
+
let i = f.has(n.id) ? [f.get(n.id)] : [], a = {
|
|
957
|
+
from: n.range.start,
|
|
958
|
+
to: n.range.end,
|
|
959
|
+
origin: n.range.start,
|
|
960
|
+
text: e.slice(n.range.start, n.range.end),
|
|
961
|
+
nodes: i,
|
|
962
|
+
dependencies: q(i, d),
|
|
963
|
+
cost: 0
|
|
964
|
+
};
|
|
965
|
+
if (r === "raw") {
|
|
966
|
+
if (!i.length) return null;
|
|
967
|
+
a.opaque = !0, a.cost = G(i).length;
|
|
915
968
|
}
|
|
969
|
+
p.push(a);
|
|
916
970
|
}
|
|
917
|
-
for (let t of [n.parsed.versionDeclaration?.range, n.parsed.themeRange]) t && !
|
|
971
|
+
for (let t of [n.parsed.versionDeclaration?.range, n.parsed.themeRange]) t && !p.some((e) => t.start >= e.from && t.end <= e.to) && p.push({
|
|
918
972
|
from: t.start,
|
|
919
973
|
to: t.end,
|
|
920
974
|
origin: t.start,
|
|
@@ -923,144 +977,228 @@ var $ = class {
|
|
|
923
977
|
dependencies: {},
|
|
924
978
|
cost: 0
|
|
925
979
|
});
|
|
926
|
-
if (
|
|
927
|
-
let
|
|
928
|
-
if (
|
|
929
|
-
let
|
|
930
|
-
if (!
|
|
931
|
-
let
|
|
932
|
-
for (let
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
980
|
+
if (p.sort((e, t) => e.from - t.from), ge(e, p)) return null;
|
|
981
|
+
let h = Z(e, p);
|
|
982
|
+
if (h.includes("<")) return null;
|
|
983
|
+
let g = i ?? U.parse(h), _ = Q(g, p, h);
|
|
984
|
+
if (!_) return null;
|
|
985
|
+
let v = p.filter((e) => e.opaque);
|
|
986
|
+
for (let e of v) if (_.some((t) => t.start < e.to && t.end > e.from)) return null;
|
|
987
|
+
let y = [..._.map((e) => ({ range: e })), ...v.map((e) => ({
|
|
988
|
+
range: {
|
|
989
|
+
start: e.from,
|
|
990
|
+
end: e.to
|
|
991
|
+
},
|
|
992
|
+
opaque: e
|
|
993
|
+
}))].sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end), b = [], x = 0;
|
|
994
|
+
for (let t of y) {
|
|
995
|
+
let i = t.range;
|
|
996
|
+
if (t.opaque) {
|
|
997
|
+
let e = t.opaque;
|
|
998
|
+
if (x < m.length && m[x].range.start < i.end) return null;
|
|
999
|
+
let n = p.filter((t) => t !== e), a = n.length ? n.map((e) => e.text).join(W) + W : "", o = 0;
|
|
1000
|
+
if (a) {
|
|
1001
|
+
let e = this.parseSession.parse(a, r);
|
|
1002
|
+
if (e.diagnostics.length) return null;
|
|
1003
|
+
o = e.syntaxNodes ?? 0;
|
|
1004
|
+
}
|
|
1005
|
+
e.prefix = a, e.prefixCost = o, b.push(e);
|
|
1006
|
+
continue;
|
|
938
1007
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
1008
|
+
let a = [];
|
|
1009
|
+
for (; x < m.length && m[x].range.start < i.end;) {
|
|
1010
|
+
let e = m[x];
|
|
1011
|
+
if (e.range.start < i.start || e.range.end > i.end) return null;
|
|
1012
|
+
a.push(e), x++;
|
|
1013
|
+
}
|
|
1014
|
+
if (!a.length) return null;
|
|
1015
|
+
let o = a.flatMap((e) => f.has(e.id) ? [f.get(e.id)] : []), s = G(o).length, c = e.slice(i.start, i.end);
|
|
1016
|
+
b.push({
|
|
1017
|
+
from: i.start,
|
|
1018
|
+
to: i.end,
|
|
1019
|
+
origin: i.start,
|
|
1020
|
+
text: c,
|
|
1021
|
+
nodes: o,
|
|
1022
|
+
dependencies: q(o, d),
|
|
1023
|
+
cost: s,
|
|
1024
|
+
rowPlans: ve(n, c)
|
|
950
1025
|
});
|
|
951
1026
|
}
|
|
952
|
-
if (
|
|
953
|
-
let
|
|
954
|
-
if (
|
|
955
|
-
let
|
|
956
|
-
return
|
|
1027
|
+
if (x !== m.length) return null;
|
|
1028
|
+
let S = p.length ? p.map((e) => e.text).join(W) + W : "", C = S ? this.parseSession.parse(S, r) : null;
|
|
1029
|
+
if (C?.diagnostics.length) return null;
|
|
1030
|
+
let w = (n.parsed.syntaxNodes ?? 0) - b.reduce((e, t) => e + t.cost, 0);
|
|
1031
|
+
return w < 0 ? null : (d.nodes = [], d.source = "", delete d.dependencies, {
|
|
957
1032
|
source: e,
|
|
958
1033
|
key: t,
|
|
959
|
-
tree:
|
|
960
|
-
metadata:
|
|
961
|
-
blocks:
|
|
962
|
-
context:
|
|
963
|
-
contextCost:
|
|
964
|
-
prefix:
|
|
965
|
-
prefixCost:
|
|
1034
|
+
tree: g,
|
|
1035
|
+
metadata: d,
|
|
1036
|
+
blocks: b,
|
|
1037
|
+
context: p.filter((e) => !e.opaque),
|
|
1038
|
+
contextCost: w,
|
|
1039
|
+
prefix: S,
|
|
1040
|
+
prefixCost: C?.syntaxNodes ?? 0
|
|
966
1041
|
});
|
|
967
1042
|
}
|
|
968
|
-
update(e, t, n, r) {
|
|
969
|
-
if (t.includes("[^") || t.includes("") ||
|
|
970
|
-
let i =
|
|
971
|
-
if (/[`\\~]/.test(e.source.slice(
|
|
972
|
-
let
|
|
1043
|
+
update(e, t, n, r, i, a) {
|
|
1044
|
+
if (t.includes("[^") || t.includes("") || me(t)) return null;
|
|
1045
|
+
let s = i, l = _e(e.source, t);
|
|
1046
|
+
if (/[`\\~]/.test(e.source.slice(l.from, l.oldTo) + t.slice(l.from, l.newTo))) return null;
|
|
1047
|
+
let u = [];
|
|
973
1048
|
for (let n of e.context) {
|
|
974
|
-
if (
|
|
975
|
-
let e = n.from >=
|
|
1049
|
+
if (l.from <= n.to && l.oldTo >= n.from) return null;
|
|
1050
|
+
let e = n.from >= l.oldTo ? l.delta : 0, r = {
|
|
976
1051
|
...n,
|
|
977
1052
|
from: n.from + e,
|
|
978
1053
|
to: n.to + e
|
|
979
1054
|
};
|
|
980
1055
|
if (t.slice(r.from, r.to) !== n.text) return null;
|
|
981
|
-
|
|
1056
|
+
u.push(r);
|
|
982
1057
|
}
|
|
983
|
-
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1058
|
+
let d = [];
|
|
1059
|
+
for (let n of e.blocks) {
|
|
1060
|
+
if (!n.opaque) continue;
|
|
1061
|
+
if (l.from > n.from && l.oldTo < n.to) {
|
|
1062
|
+
let e = n.to + l.delta;
|
|
1063
|
+
d.push({
|
|
1064
|
+
...n,
|
|
1065
|
+
to: e,
|
|
1066
|
+
text: t.slice(n.from, e)
|
|
1067
|
+
});
|
|
1068
|
+
continue;
|
|
1069
|
+
}
|
|
1070
|
+
if (l.from <= n.to && l.oldTo >= n.from) return null;
|
|
1071
|
+
let e = n.from >= l.oldTo ? l.delta : 0, r = {
|
|
1072
|
+
...n,
|
|
1073
|
+
from: n.from + e,
|
|
1074
|
+
to: n.to + e
|
|
1075
|
+
};
|
|
1076
|
+
if (t.slice(r.from, r.to) !== n.text) return null;
|
|
1077
|
+
d.push(r);
|
|
1078
|
+
}
|
|
1079
|
+
let f = [...u, ...d].sort((e, t) => e.from - t.from);
|
|
1080
|
+
if (ge(t, f)) return null;
|
|
1081
|
+
let p = c.applyChanges(c.addTree(e.tree), [{
|
|
1082
|
+
fromA: l.from,
|
|
1083
|
+
toA: l.oldTo,
|
|
1084
|
+
fromB: l.from,
|
|
1085
|
+
toB: l.newTo
|
|
1086
|
+
}], 0), m = Z(t, f);
|
|
1087
|
+
if (m.includes("<")) return null;
|
|
1088
|
+
let h = U.parse(m, p), g = Q(h, f, m);
|
|
1089
|
+
if (!g) return null;
|
|
1090
|
+
for (let e of d) if (g.some((t) => t.start < e.to && t.end > e.from)) return null;
|
|
1091
|
+
let _ = [...g.map((e) => ({ range: e })), ...d.map((e) => ({
|
|
1092
|
+
range: {
|
|
1093
|
+
start: e.from,
|
|
1094
|
+
end: e.to
|
|
1095
|
+
},
|
|
1096
|
+
opaque: e
|
|
1097
|
+
}))].sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end), v = new Map(e.blocks.map((e) => [`${e.from}:${e.to}`, e])), y = [], b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), S = 0, C = 0, w = 0, T = e.contextCost, E = 0, D = 0, O = 0, k = 0;
|
|
1098
|
+
for (let i of _) {
|
|
1099
|
+
let c = i.range, u = c.start >= l.newTo ? l.delta : 0, d = c.end <= l.from || c.start >= l.newTo ? v.get(`${c.start - u}:${c.end - u}`) : void 0, f = t.slice(c.start, c.end);
|
|
1100
|
+
if (d && d.text === f) {
|
|
1101
|
+
let e = a ? performance.now() : 0;
|
|
1102
|
+
y.push({
|
|
1103
|
+
...d,
|
|
1104
|
+
from: c.start,
|
|
1105
|
+
to: c.end
|
|
1106
|
+
}), S++, T += d.cost;
|
|
1107
|
+
for (let e of G(d.nodes)) b.add(e.id);
|
|
1108
|
+
a && (E += performance.now() - e);
|
|
1109
|
+
} else if (i.opaque) {
|
|
1110
|
+
let e = i.opaque.prefix ?? "", t = e.length, r = o(e + f, n, this.services, void 0, a);
|
|
1111
|
+
if (a && (D += r.timings.totalMs, O += r.timings.parseMs ?? 0, k += r.timings.semanticMs ?? 0), w += t + f.length, C++, !r.result.ok || r.result.diagnostics.length || !r.parsed || V(r.result)) return null;
|
|
1112
|
+
let l = r.parsed.nodes.filter((e) => e.range.start >= t);
|
|
1113
|
+
if (l.length !== 1 || X(l[0], s) !== "raw") return null;
|
|
1114
|
+
let u = r.result.document.nodes.filter((e) => e.range.start >= t);
|
|
1115
|
+
if (u.length !== 1) return null;
|
|
1116
|
+
let d = new Map(G(u).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), p = K(u, 0, d), m = (r.parsed.syntaxNodes ?? 0) - (i.opaque.prefixCost ?? 0);
|
|
1117
|
+
if (m < G(p).length) return null;
|
|
1118
|
+
let h = q(u, r.result.document, d), g = Object.create(null);
|
|
1119
|
+
for (let e of G(p)) g[e.id] = h[e.id] ?? null;
|
|
1120
|
+
let _ = {
|
|
1121
|
+
from: c.start,
|
|
1122
|
+
to: c.end,
|
|
1123
|
+
origin: t,
|
|
1124
|
+
text: f,
|
|
1125
|
+
nodes: p,
|
|
1126
|
+
dependencies: g,
|
|
1127
|
+
cost: m,
|
|
1128
|
+
opaque: !0,
|
|
1129
|
+
prefix: e,
|
|
1130
|
+
prefixCost: i.opaque.prefixCost ?? 0
|
|
1131
|
+
};
|
|
1132
|
+
y.push(_), x.add(_), T += m;
|
|
1003
1133
|
} else {
|
|
1004
1134
|
let t = e.prefix.length, r = e.blocks.find((e) => {
|
|
1005
|
-
let t = e.from >=
|
|
1006
|
-
return t <
|
|
1007
|
-
}),
|
|
1135
|
+
let t = e.from >= l.oldTo ? e.from + l.delta : e.from, n = e.to >= l.oldTo ? e.to + l.delta : e.to;
|
|
1136
|
+
return t < c.end && n > c.start;
|
|
1137
|
+
}), i = r?.rowPlans ? {
|
|
1008
1138
|
...this.services,
|
|
1009
1139
|
rowPlans: r.rowPlans
|
|
1010
|
-
} : this.services, s =
|
|
1011
|
-
if (
|
|
1012
|
-
let
|
|
1013
|
-
if (!
|
|
1014
|
-
let
|
|
1140
|
+
} : this.services, s = o(e.prefix + f, n, i, void 0, a);
|
|
1141
|
+
if (a && (D += s.timings.totalMs, O += s.timings.parseMs ?? 0, k += s.timings.semanticMs ?? 0), w += t + f.length, C++, !s.result.ok || s.result.diagnostics.length || !s.parsed || V(s.result)) return null;
|
|
1142
|
+
let u = s.parsed.nodes.filter((e) => e.range.start >= t);
|
|
1143
|
+
if (!u.length || u.some((e) => X(e) !== "fragment")) return null;
|
|
1144
|
+
let d = s.result.document.nodes.filter((e) => e.range.start >= t), p = new Map(G(d).map((e) => [e.id, `incremental-${++this.serial}-${e.id}`])), m = K(d, 0, p), h = r ? le({
|
|
1015
1145
|
text: r.text,
|
|
1016
1146
|
origin: r.origin,
|
|
1017
1147
|
nodes: r.nodes
|
|
1018
1148
|
}, {
|
|
1019
|
-
text:
|
|
1149
|
+
text: f,
|
|
1020
1150
|
origin: t,
|
|
1021
|
-
nodes:
|
|
1151
|
+
nodes: m
|
|
1022
1152
|
}) : void 0;
|
|
1023
|
-
if (
|
|
1024
|
-
for (let e of
|
|
1025
|
-
|
|
1153
|
+
if (h) {
|
|
1154
|
+
for (let e of h.reusedIds) if (b.has(e)) {
|
|
1155
|
+
h = void 0;
|
|
1026
1156
|
break;
|
|
1027
1157
|
}
|
|
1028
1158
|
}
|
|
1029
|
-
let
|
|
1030
|
-
if (
|
|
1031
|
-
let
|
|
1032
|
-
for (let e of
|
|
1033
|
-
if (
|
|
1034
|
-
let e = r.nodes[0]?.id, t =
|
|
1035
|
-
for (let n of
|
|
1036
|
-
for (let e = 0; e <
|
|
1159
|
+
let g = h?.nodes ?? m, _ = (s.parsed.syntaxNodes ?? 0) - e.prefixCost;
|
|
1160
|
+
if (_ < G(g).length) return null;
|
|
1161
|
+
let v = q(d, s.result.document, p), S = Object.create(null);
|
|
1162
|
+
for (let e of G(g)) S[e.id] = v[e.id] ?? null;
|
|
1163
|
+
if (h && r) {
|
|
1164
|
+
let e = r.nodes[0]?.id, t = m[0]?.id;
|
|
1165
|
+
for (let n of h.reusedIds) S[n] = n === e && t !== void 0 ? v[t] ?? null : r.dependencies[n] ?? null, b.add(n);
|
|
1166
|
+
for (let e = 0; e < h.reused; e++) this.parseSession.noteRowReuse(h.kind);
|
|
1037
1167
|
}
|
|
1038
|
-
let
|
|
1039
|
-
from:
|
|
1040
|
-
to:
|
|
1168
|
+
let E = {
|
|
1169
|
+
from: c.start,
|
|
1170
|
+
to: c.end,
|
|
1041
1171
|
origin: t,
|
|
1042
|
-
text:
|
|
1043
|
-
nodes:
|
|
1044
|
-
dependencies:
|
|
1045
|
-
cost:
|
|
1046
|
-
rowPlans:
|
|
1172
|
+
text: f,
|
|
1173
|
+
nodes: g,
|
|
1174
|
+
dependencies: S,
|
|
1175
|
+
cost: _,
|
|
1176
|
+
rowPlans: ve(s, f)
|
|
1047
1177
|
};
|
|
1048
|
-
|
|
1178
|
+
y.push(E), x.add(E), T += _;
|
|
1049
1179
|
}
|
|
1050
|
-
if (
|
|
1180
|
+
if (T > r) return null;
|
|
1051
1181
|
}
|
|
1052
|
-
return
|
|
1182
|
+
return T > r || !this.sameBoundaries(t, y, u, x, l, n) ? null : (this.lastStats = {
|
|
1053
1183
|
mode: "incremental",
|
|
1054
|
-
totalBlocks:
|
|
1055
|
-
compiledBlocks:
|
|
1056
|
-
reusedBlocks:
|
|
1057
|
-
compiledCharacters:
|
|
1184
|
+
totalBlocks: y.length,
|
|
1185
|
+
compiledBlocks: C,
|
|
1186
|
+
reusedBlocks: S,
|
|
1187
|
+
compiledCharacters: w,
|
|
1188
|
+
...a ? { stages: {
|
|
1189
|
+
...S ? { reuseMs: E } : {},
|
|
1190
|
+
...C ? {
|
|
1191
|
+
rebuildMs: D,
|
|
1192
|
+
parseMs: O,
|
|
1193
|
+
semanticMs: k
|
|
1194
|
+
} : {}
|
|
1195
|
+
} } : {}
|
|
1058
1196
|
}, {
|
|
1059
1197
|
...e,
|
|
1060
1198
|
source: t,
|
|
1061
|
-
tree:
|
|
1062
|
-
context:
|
|
1063
|
-
blocks:
|
|
1199
|
+
tree: h,
|
|
1200
|
+
context: u,
|
|
1201
|
+
blocks: y
|
|
1064
1202
|
});
|
|
1065
1203
|
}
|
|
1066
1204
|
sameBoundaries(e, t, n, r, i, a) {
|
|
@@ -1083,7 +1221,7 @@ var $ = class {
|
|
|
1083
1221
|
delta: a
|
|
1084
1222
|
});
|
|
1085
1223
|
}
|
|
1086
|
-
let i = r[0], l = r[r.length - 1], u = "node" in i ? Math.max(s[t].from,
|
|
1224
|
+
let i = r[0], l = r[r.length - 1], u = "node" in i ? Math.max(s[t].from, he(e, i.node.range.start + i.delta)) : i.from, d = "node" in l ? l.node.range.end + l.delta : l.to, f = s.slice(t, n + 2).flatMap((e) => e.rowPlans ? [e.rowPlans] : []), p = f.length < 2 ? f[0] : {
|
|
1087
1225
|
has: (e) => f.some((t) => t.has(e)),
|
|
1088
1226
|
get: (e) => f.find((t) => t.has(e))?.get(e)
|
|
1089
1227
|
}, m = this.parseSession.parse(e.slice(u, d), a, void 0, p);
|
|
@@ -1091,7 +1229,7 @@ var $ = class {
|
|
|
1091
1229
|
for (let e = 0; e < r.length; e++) {
|
|
1092
1230
|
let t = r[e], n = m.nodes[e];
|
|
1093
1231
|
if ("node" in t) {
|
|
1094
|
-
if (
|
|
1232
|
+
if (!$(n, u, t.node, t.delta)) return !1;
|
|
1095
1233
|
} else if (n.range.start + u !== t.from || n.range.end + u !== t.to) return !1;
|
|
1096
1234
|
}
|
|
1097
1235
|
t = n;
|
|
@@ -1099,40 +1237,40 @@ var $ = class {
|
|
|
1099
1237
|
return !0;
|
|
1100
1238
|
}
|
|
1101
1239
|
publish(e) {
|
|
1102
|
-
let t =
|
|
1240
|
+
let t = r(e.metadata);
|
|
1103
1241
|
t.source = e.source;
|
|
1104
|
-
let
|
|
1105
|
-
t.nodes =
|
|
1242
|
+
let n = [...e.blocks, ...e.context].sort((e, t) => e.from - t.from), o = new Map(this.shared?.ok ? this.shared.document.nodes.map((e) => [e.id, e]) : []);
|
|
1243
|
+
t.nodes = n.flatMap((e) => {
|
|
1106
1244
|
let t = e.from - e.origin;
|
|
1107
1245
|
if (e.publication?.delta === t) return e.publication.nodes;
|
|
1108
|
-
let n =
|
|
1246
|
+
let n = P(e.publication?.nodes ?? e.nodes.map((e) => o.get(e.id)).filter((e) => !!e), K(e.nodes, t)).value;
|
|
1109
1247
|
return e.publication = {
|
|
1110
1248
|
delta: t,
|
|
1111
1249
|
nodes: n
|
|
1112
1250
|
}, n;
|
|
1113
1251
|
});
|
|
1114
|
-
let
|
|
1115
|
-
for (let e of
|
|
1252
|
+
let s = {};
|
|
1253
|
+
for (let e of n) for (let [t, n] of Object.entries(e.dependencies)) Object.defineProperty(s, t, {
|
|
1116
1254
|
value: n === null ? null : Object.freeze([...n]),
|
|
1117
1255
|
enumerable: !0
|
|
1118
1256
|
});
|
|
1119
|
-
t.dependencies = Object.freeze(
|
|
1120
|
-
let
|
|
1121
|
-
let
|
|
1257
|
+
t.dependencies = Object.freeze(s);
|
|
1258
|
+
let c = [...e.context, ...e.blocks.filter((e) => e.opaque)], l = (e) => {
|
|
1259
|
+
let t = c.find((t) => e.start >= t.origin && e.end <= t.origin + t.text.length), n = t ? t.from - t.origin : 0;
|
|
1122
1260
|
return {
|
|
1123
|
-
start:
|
|
1124
|
-
end:
|
|
1261
|
+
start: e.start + n,
|
|
1262
|
+
end: e.end + n
|
|
1125
1263
|
};
|
|
1126
1264
|
};
|
|
1127
|
-
t.versionDeclaration && (t.versionDeclaration.range =
|
|
1128
|
-
for (let e of Object.values(t.computations ?? {})) e.range =
|
|
1129
|
-
for (let e of t.validations ?? []) e.range =
|
|
1130
|
-
for (let e of Object.values(t.externals ?? {})) e.range =
|
|
1131
|
-
for (let e of Object.values(t.dynamicConstraints ?? {})) for (let t of Object.values(e)) t.offset =
|
|
1265
|
+
t.versionDeclaration && (t.versionDeclaration.range = l(t.versionDeclaration.range)), t.themeRange &&= l(t.themeRange);
|
|
1266
|
+
for (let e of Object.values(t.computations ?? {})) e.range = l(e.range);
|
|
1267
|
+
for (let e of t.validations ?? []) e.range = l(e.range);
|
|
1268
|
+
for (let e of Object.values(t.externals ?? {})) e.range = l(e.range);
|
|
1269
|
+
for (let e of Object.values(t.dynamicConstraints ?? {})) for (let t of Object.values(e)) t.offset = l({
|
|
1132
1270
|
start: t.offset,
|
|
1133
1271
|
end: t.offset
|
|
1134
1272
|
}).start;
|
|
1135
|
-
return {
|
|
1273
|
+
return t.requiresRuntime = a(t), t.usedComponents = i(t.nodes), {
|
|
1136
1274
|
ok: !0,
|
|
1137
1275
|
document: t,
|
|
1138
1276
|
diagnostics: []
|
|
@@ -1157,10 +1295,10 @@ var $ = class {
|
|
|
1157
1295
|
if (this.disposed || !this.deferred || e?.aborted) return !1;
|
|
1158
1296
|
let n = this.deferred, r = this.epoch, i = () => !this.disposed && !e?.aborted && this.epoch === r && this.deferred === n;
|
|
1159
1297
|
if (await t(), !i() || !n.tracked.result.ok || !n.tracked.parsed) return !1;
|
|
1160
|
-
let a = [], o = n.tracked.parsed.nodes;
|
|
1298
|
+
let a = [], o = n.tracked.parsed.nodes, s = this.rawNamesFor(n.options);
|
|
1161
1299
|
for (let e = 0; e < o.length; e++) {
|
|
1162
|
-
let r = o[e],
|
|
1163
|
-
if (
|
|
1300
|
+
let r = o[e], c = X(r, s);
|
|
1301
|
+
if (c === "unsupported" || ((c === "context" || c === "raw") && a.push({
|
|
1164
1302
|
from: r.range.start,
|
|
1165
1303
|
to: r.range.end,
|
|
1166
1304
|
origin: r.range.start,
|
|
@@ -1180,29 +1318,38 @@ var $ = class {
|
|
|
1180
1318
|
cost: 0
|
|
1181
1319
|
});
|
|
1182
1320
|
a.sort((e, t) => e.from - t.from);
|
|
1183
|
-
let
|
|
1184
|
-
if (
|
|
1185
|
-
let
|
|
1186
|
-
for (; !
|
|
1321
|
+
let c = Z(n.source, a);
|
|
1322
|
+
if (c.includes("<")) return !1;
|
|
1323
|
+
let l = U.startParse(c), u = null;
|
|
1324
|
+
for (; !u;) if (u = l.advance(), !u && (await t(), !i())) return !1;
|
|
1187
1325
|
if (await t(), !i()) return !1;
|
|
1188
|
-
let
|
|
1326
|
+
let d = this.cacheBuilds;
|
|
1189
1327
|
try {
|
|
1190
|
-
let e = this.seed(n.source, n.key, n.tracked, n.options,
|
|
1328
|
+
let e = this.seed(n.source, n.key, n.tracked, n.options, u, s);
|
|
1191
1329
|
return i() ? (this.snapshot = e, this.deferred = null, e !== null) : !1;
|
|
1192
1330
|
} catch {
|
|
1193
1331
|
return !1;
|
|
1194
1332
|
} finally {
|
|
1195
|
-
this.cacheBuilds =
|
|
1333
|
+
this.cacheBuilds = d;
|
|
1196
1334
|
}
|
|
1197
1335
|
}
|
|
1336
|
+
rawNames(e, t) {
|
|
1337
|
+
return this.rawNamesCache?.key !== e && (this.rawNamesCache = {
|
|
1338
|
+
key: e,
|
|
1339
|
+
names: pe(t)
|
|
1340
|
+
}), this.rawNamesCache.names;
|
|
1341
|
+
}
|
|
1342
|
+
rawNamesFor(e) {
|
|
1343
|
+
return this.rawNames(p(e), e);
|
|
1344
|
+
}
|
|
1198
1345
|
clear() {
|
|
1199
|
-
this.epoch++, this.snapshot = null, this.deferred = null, this.serial = 0, this.cacheBuilds = 0, this.shared = null, this.sharedKey = void 0, this.sharedMode = void 0, this.streamingCache = null, this.parseSession.clear(), this.semantic.clear();
|
|
1346
|
+
this.epoch++, this.snapshot = null, this.deferred = null, this.serial = 0, this.cacheBuilds = 0, this.shared = null, this.sharedKey = void 0, this.sharedMode = void 0, this.streamingCache = null, this.rawNamesCache = null, this.parseSession.clear(), this.semantic.clear();
|
|
1200
1347
|
}
|
|
1201
1348
|
dispose() {
|
|
1202
1349
|
this.clear(), this.parseSession.dispose(), this.disposed = !0;
|
|
1203
1350
|
}
|
|
1204
1351
|
};
|
|
1205
|
-
function
|
|
1206
|
-
return new
|
|
1352
|
+
function be() {
|
|
1353
|
+
return new ye();
|
|
1207
1354
|
}
|
|
1208
|
-
export {
|
|
1355
|
+
export { be as n, ye as t };
|