reactive-md 0.8.0 → 0.9.1
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 +54 -4
- package/CHANGELOG.md +55 -4
- package/CONTRIBUTING-ch.md +13 -2
- package/CONTRIBUTING.md +13 -2
- package/README-ch.md +132 -23
- package/README-en.md +130 -21
- package/README.md +128 -21
- package/SECURITY-ch.md +3 -3
- package/SECURITY.md +3 -3
- package/THIRD_PARTY_NOTICES.md +111 -1
- package/cli/args.mjs +51 -1
- package/cli/assets.mjs +6 -1
- package/cli/build.mjs +125 -9
- package/cli/fs-utils.mjs +3 -3
- package/cli/help.mjs +12 -5
- package/cli/init.mjs +1 -1
- package/cli/package.mjs +1 -0
- package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
- package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
- package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
- package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
- package/dist-library/compile-wUv8KEge.js +1249 -0
- package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
- package/dist-library/compiler-eOfcinZs.js +62 -0
- package/dist-library/component-state-BoLCGee4.js +801 -0
- package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
- package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
- package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
- package/dist-library/controls-CcT6n7k_.js +6740 -0
- package/dist-library/coordinate-CWS9p5q_.js +293 -0
- package/dist-library/data-table-Bgccxd7h.js +296 -0
- package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
- package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
- package/dist-library/export-BqVmTXm8.js +369 -0
- package/dist-library/gallery-CY6mTx8i.js +360 -0
- package/dist-library/html-CNT4KD-2.js +757 -0
- package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
- package/dist-library/latex-1w7aQgD5.js +928 -0
- package/dist-library/layout-C0YlEPGr.js +562 -0
- package/dist-library/mount-preset-KxvtKgJb.js +13 -0
- package/dist-library/options-1aDLK7JY.js +121 -0
- package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
- package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
- package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
- package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
- package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
- package/dist-library/react-BbyAgeXc.js +6070 -0
- package/dist-library/react-D5iGiUdL.js +7 -0
- package/dist-library/reactive-md-authoring.js +222 -223
- package/dist-library/reactive-md-build.js +126 -72
- package/dist-library/reactive-md-compiler-standard.js +12 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-default-packs.js +2 -2
- package/dist-library/reactive-md-default-preset.js +4 -4
- package/dist-library/reactive-md-export-assets.js +57 -0
- package/dist-library/reactive-md-export.js +5 -111
- package/dist-library/reactive-md-minimal-preset.js +24 -0
- package/dist-library/reactive-md-minimal-react-preset.js +26 -0
- package/dist-library/reactive-md-minimal-styles.js +80 -0
- package/dist-library/reactive-md-minimal.css +2 -0
- package/dist-library/reactive-md-pdf.js +7582 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -0
- package/dist-library/reactive-md-plugin-data.js +17 -0
- package/dist-library/reactive-md-plugin-diagram.js +18 -0
- package/dist-library/reactive-md-plugin-forms.js +18 -0
- package/dist-library/reactive-md-plugin-gallery.js +12 -0
- package/dist-library/reactive-md-plugin-navigation.js +15 -0
- package/dist-library/reactive-md-plugin-network.js +222 -0
- package/dist-library/reactive-md-plugin-plot.js +24 -0
- package/dist-library/reactive-md-print.css +5 -0
- package/dist-library/reactive-md-react-minimal.js +28 -0
- package/dist-library/reactive-md-react-server.js +34 -32
- package/dist-library/reactive-md-react-unstyled.js +14 -9
- package/dist-library/reactive-md-react.js +14 -9
- package/dist-library/reactive-md-runtime-browser.js +847 -15
- package/dist-library/reactive-md-runtime.js +3 -3
- package/dist-library/reactive-md-sdk.js +8 -6
- package/dist-library/reactive-md-standalone-configured.js +16 -0
- package/dist-library/reactive-md-standalone-host.js +9 -438
- package/dist-library/reactive-md-testing-browser.js +5 -4
- package/dist-library/reactive-md-testing-react.js +46 -44
- package/dist-library/reactive-md-testing.js +45 -44
- package/dist-library/reactive-md-vite.js +135 -37
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +590 -498
- package/dist-library/registry-B9NGct4d.js +20 -0
- package/dist-library/registry-core-Bbad9Bm2.js +479 -0
- package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
- package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
- package/dist-library/runtime-kcA7bG7G.js +1282 -0
- package/dist-library/sample-bP4zHB3L.js +289 -0
- package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
- package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
- package/dist-library/session-core-nmJHuR9c.js +452 -0
- package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
- package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
- package/dist-library/types/authoring/catalog.d.ts +2 -3
- package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/authoring/insert.d.ts +1 -1
- package/dist-library/types/authoring/templates.d.ts +2 -2
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/build/host.d.ts +1 -1
- package/dist-library/types/build/index.d.ts +1 -1
- package/dist-library/types/build/notices.d.ts +1 -1
- package/dist-library/types/build/resources.d.ts +1 -1
- package/dist-library/types/build/vite.d.ts +1 -1
- package/dist-library/types/compiler/index.d.ts +2 -2
- package/dist-library/types/compiler/result.d.ts +1 -1
- package/dist-library/types/compiler/standard.d.ts +2 -2
- package/dist-library/types/compiler/types.d.ts +1 -1
- package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
- package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
- package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
- package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
- package/dist-library/types/components/minimal-preset.d.ts +2 -0
- package/dist-library/types/components/mount-preset.d.ts +4 -0
- package/dist-library/types/components/network/submit-button.d.ts +10 -0
- package/dist-library/types/components/plot/coordinate.d.ts +2 -0
- package/dist-library/types/components/plugins/chart.d.ts +2 -0
- package/dist-library/types/components/plugins/data.d.ts +2 -0
- package/dist-library/types/components/plugins/diagram.d.ts +2 -0
- package/dist-library/types/components/plugins/forms.d.ts +2 -0
- package/dist-library/types/components/plugins/gallery.d.ts +2 -0
- package/dist-library/types/components/plugins/navigation.d.ts +2 -0
- package/dist-library/types/components/plugins/network.d.ts +2 -0
- package/dist-library/types/components/plugins/plot.d.ts +2 -0
- package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
- package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
- package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
- package/dist-library/types/export/component-state.d.ts +1 -1
- package/dist-library/types/export/index.d.ts +2 -1
- package/dist-library/types/export/print-document.d.ts +18 -0
- package/dist-library/types/export/render-markup.d.ts +23 -0
- package/dist-library/types/export/requirements.d.ts +1 -1
- package/dist-library/types/export/resources.d.ts +1 -1
- package/dist-library/types/export/restoration.d.ts +1 -1
- package/dist-library/types/export-assets/index.d.ts +25 -0
- package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
- package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
- package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
- package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
- package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
- package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
- package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
- package/dist-library/types/local/compilation/compiler.d.ts +7 -14
- package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
- package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
- package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
- package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
- package/dist-library/types/local/compilation/streaming.d.ts +27 -0
- package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
- package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
- package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
- package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
- package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
- package/dist-library/types/local/configuration/options-core.d.ts +5 -4
- package/dist-library/types/local/configuration/options.d.ts +2 -1
- package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
- package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
- package/dist-library/types/local/configuration/schema.d.ts +1 -1
- package/dist-library/types/local/css/author-css.d.ts +66 -0
- package/dist-library/types/local/evaluation/computations.d.ts +2 -2
- package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
- package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
- package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
- package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
- package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
- package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
- package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
- package/dist-library/types/local/evaluation/validation.d.ts +1 -1
- package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
- package/dist-library/types/local/html/html-details.d.ts +1 -1
- package/dist-library/types/local/html/html-entities.d.ts +11 -2
- package/dist-library/types/local/html/html-recovery.d.ts +1 -1
- package/dist-library/types/local/html/html-table.d.ts +1 -1
- package/dist-library/types/local/html/html.d.ts +40 -4
- package/dist-library/types/local/index.d.ts +14 -13
- package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
- package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
- package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
- package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
- package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
- package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
- package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
- package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
- package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
- package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
- package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
- package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
- package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
- package/dist-library/types/local/parsing/parser.d.ts +3 -3
- package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
- package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
- package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
- package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
- package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
- package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
- package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
- package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
- package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
- package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
- package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
- package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
- package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
- package/dist-library/types/local/rendering/render-types.d.ts +1 -1
- package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
- package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
- package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
- package/dist-library/types/local/runtime/retention.d.ts +1 -1
- package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
- package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
- package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
- package/dist-library/types/local/runtime/runtime.d.ts +4 -2
- package/dist-library/types/local/runtime/state.d.ts +1 -1
- package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
- package/dist-library/types/local/source/authoring.d.ts +1 -1
- package/dist-library/types/local/source/source-context.d.ts +23 -0
- package/dist-library/types/local/source/source-migration.d.ts +2 -2
- package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
- package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
- package/dist-library/types/local/transport/shared-data.d.ts +1 -1
- package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
- package/dist-library/types/local/transport/worker-job.d.ts +28 -0
- package/dist-library/types/local/transport/worker.d.ts +32 -46
- package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
- package/dist-library/types/pdf.d.ts +22 -0
- package/dist-library/types/presets/identity.d.ts +1 -0
- package/dist-library/types/presets/minimal.d.ts +2 -0
- package/dist-library/types/presets/plugin-packs.d.ts +1 -0
- package/dist-library/types/react/component-api.d.ts +20 -4
- package/dist-library/types/react/component-primitives.d.ts +10 -10
- package/dist-library/types/react/component-utils.d.ts +9 -1
- package/dist-library/types/react/index.d.ts +6 -5
- package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
- package/dist-library/types/react/minimal.d.ts +13 -0
- package/dist-library/types/react/package-core.d.ts +67 -0
- package/dist-library/types/react/package.d.ts +3 -67
- package/dist-library/types/react/runtime/common.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +115 -0
- package/dist-library/types/react/sdk.d.ts +4 -110
- package/dist-library/types/react/server.d.ts +2 -2
- package/dist-library/types/react/use-draft-field.d.ts +5 -1
- package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
- package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
- package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
- package/dist-library/types/runtime-services/component-state.d.ts +1 -1
- package/dist-library/types/runtime-services/index.d.ts +2 -0
- package/dist-library/types/runtime-services/network.d.ts +86 -0
- package/dist-library/types/runtime-services/runtime.d.ts +1 -1
- package/dist-library/types/sdk/config.d.ts +1 -1
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/props.d.ts +1 -1
- package/dist-library/types/sdk/registry-core.d.ts +1 -1
- package/dist-library/types/sdk/theme.d.ts +5 -4
- package/dist-library/types/sdk/types.d.ts +2 -2
- package/dist-library/types/shareable.d.ts +6 -5
- package/dist-library/types/standalone/diagnostics.d.ts +1 -1
- package/dist-library/types/standalone/host.d.ts +5 -0
- package/dist-library/types/standalone/payload.d.ts +1 -1
- package/dist-library/types/standalone/prepare.d.ts +2 -2
- package/dist-library/types/standalone/session-core.d.ts +68 -0
- package/dist-library/types/standalone/session.d.ts +6 -68
- package/dist-library/types/themes/contract.d.ts +7 -0
- package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
- package/dist-library/types/vite/client.d.ts +19 -0
- package/dist-library/types/vite/index.d.ts +18 -3
- package/dist-library/types/vite/registration.d.ts +2 -2
- package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
- package/dist-library/validation-BEBA_HvS.js +1121 -0
- package/dist-library/visual-frame-CyV1FXzs.js +48 -0
- package/dist-library/visuals-B5KSafVk.js +3 -0
- package/dist-library/visuals-BZbZYA7w.js +72572 -0
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +146 -137
- package/docs/README-ch.md +16 -11
- package/docs/README.md +16 -11
- package/docs/compatibility/compatibility-ch.md +8 -8
- package/docs/compatibility/compatibility-en.md +8 -8
- package/docs/compatibility/source-versioning-ch.md +1 -1
- package/docs/compatibility/source-versioning-en.md +1 -1
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-development-reference-ch.md +4 -4
- package/docs/development/component-development-reference-en.md +4 -4
- package/docs/development/component-protocol-ch.md +14 -14
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/development/extension-tutorial-ch.md +308 -0
- package/docs/development/extension-tutorial-en.md +308 -0
- package/docs/development/local-module-layout-ch.md +10 -50
- package/docs/development/local-module-layout-en.md +9 -49
- package/docs/development/performance-overview-ch.md +174 -154
- package/docs/development/performance-overview-en.md +174 -154
- package/docs/guides/local-guide-ch.md +2 -2
- package/docs/guides/local-guide-en.md +2 -2
- package/docs/integration/author-tools-ch.md +2 -2
- package/docs/integration/author-tools-en.md +2 -2
- package/docs/integration/compiler-ch.md +4 -2
- package/docs/integration/compiler-en.md +4 -2
- package/docs/integration/directory-discovery-ch.md +5 -1
- package/docs/integration/directory-discovery-en.md +5 -1
- package/docs/integration/editor-ch.md +35 -5
- package/docs/integration/editor-en.md +42 -4
- package/docs/integration/extension-sdk-ch.md +6 -4
- package/docs/integration/extension-sdk-en.md +6 -4
- package/docs/integration/local-integration-ch.md +201 -19
- package/docs/integration/local-integration-en.md +194 -18
- package/docs/integration/network-host-ch.md +75 -0
- package/docs/integration/network-host-en.md +75 -0
- package/docs/integration/shareable-export-ch.md +58 -16
- package/docs/integration/shareable-export-en.md +57 -15
- package/docs/reference/html-compatibility-ch.md +20 -67
- package/docs/reference/html-compatibility-en.md +19 -64
- package/docs/reference/local-interaction-syntax-ch.md +199 -26
- package/docs/reference/local-interaction-syntax-en.md +194 -27
- package/docs/reference/public-api-ch.md +416 -0
- package/docs/reference/public-api-en.md +416 -0
- package/docs/reference/theme-protocol-ch.md +27 -8
- package/docs/reference/theme-protocol-en.md +46 -8
- package/docs/releases/release-0.4.0-ch.md +2 -2
- package/docs/releases/release-0.4.0-en.md +2 -2
- package/docs/releases/release-0.8.0-ch.md +19 -3
- package/docs/releases/release-0.8.0-en.md +19 -3
- package/docs/releases/release-0.9.0-ch.md +44 -0
- package/docs/releases/release-0.9.0-en.md +44 -0
- package/docs/releases/release-0.9.1-ch.md +29 -0
- package/docs/releases/release-0.9.1-en.md +29 -0
- package/examples/component-package/README-ch.md +1 -1
- package/examples/component-package/README.md +1 -1
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/game-2048-package/README-ch.md +3 -9
- package/examples/game-2048-package/README.md +8 -12
- package/examples/integration/README-ch.md +21 -2
- package/examples/integration/README.md +21 -2
- package/examples/integration/extension-sdk/README-ch.md +1 -1
- package/examples/integration/extension-sdk/README.md +1 -1
- package/examples/integration/streaming/index.html +48 -0
- package/examples/integration/streaming/main.js +175 -0
- package/examples/integration/streaming/package.json +13 -0
- package/examples/integration/streaming/worker.js +3 -0
- package/examples/local/README-ch.md +3 -3
- package/examples/local/README.md +2 -2
- package/examples/local/minimal-budget.reactive.md +48 -0
- package/examples/minimal-extension/README-ch.md +78 -0
- package/examples/minimal-extension/README.md +78 -0
- package/examples/minimal-extension/index.html +15 -0
- package/examples/minimal-extension/package.json +26 -0
- package/examples/minimal-extension/sample/document.reactive.md +10 -0
- package/examples/minimal-extension/scripts/build.mjs +32 -0
- package/examples/minimal-extension/scripts/export.mjs +72 -0
- package/examples/minimal-extension/scripts/test-node.mjs +75 -0
- package/examples/minimal-extension/src/extension.tsx +90 -0
- package/examples/minimal-extension/src/preview.tsx +12 -0
- package/examples/minimal-extension/src/source.ts +4 -0
- package/examples/minimal-extension/tsconfig.json +14 -0
- package/examples/network-survey/README.md +200 -0
- package/examples/network-survey/index.html +49 -0
- package/examples/network-survey/package.json +26 -0
- package/examples/network-survey/sample/document.reactive.md +51 -0
- package/examples/network-survey/src/components.tsx +325 -0
- package/examples/network-survey/src/host.ts +316 -0
- package/examples/network-survey/src/main.tsx +91 -0
- package/examples/network-survey/src/source.ts +1 -0
- package/examples/network-survey/tsconfig.json +26 -0
- package/examples/network-survey/vite.config.ts +227 -0
- package/examples/sci-fi-theme/README-ch.md +4 -2
- package/examples/sci-fi-theme/README.md +4 -2
- package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
- package/examples/sci-fi-theme/demo/demo.css +129 -23
- package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
- package/examples/sci-fi-theme/demo/main.tsx +45 -10
- package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
- package/examples/sci-fi-theme/package.json +2 -1
- package/examples/sci-fi-theme/src/components.css +1064 -154
- package/examples/sci-fi-theme/src/notch.css +142 -0
- package/examples/sci-fi-theme/src/sci-fi.css +3 -1
- package/examples/sci-fi-theme/src/theme.ts +2 -0
- package/examples/sci-fi-theme/src/tokens.css +512 -408
- package/examples/tetris-package/README-ch.md +4 -4
- package/examples/tetris-package/README.md +4 -4
- package/package.json +70 -3
- package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
- package/dist-library/compiler--ea2CKQF.js +0 -61
- package/dist-library/component-state-Cq2K5gkS.js +0 -490
- package/dist-library/options-CX5m5n-J.js +0 -115
- package/dist-library/runtime-C-sbfpOX.js +0 -1157
- package/dist-library/types/local/contracts/locale.d.ts +0 -1
- package/dist-library/types/local/contracts/version.d.ts +0 -2
- package/dist-library/types/local/evaluation/dates.d.ts +0 -2
- package/dist-library/types/local/evaluation/expression.d.ts +0 -47
- package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
- package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
- package/dist-library/types/local/session/incremental.d.ts +0 -48
- package/dist-library/types/local/source/node-walk.d.ts +0 -3
- package/dist-library/types/local/source/text-length.d.ts +0 -13
- package/dist-library/types/local/theme/theme-name.d.ts +0 -3
- package/dist-library/types/local/widgets/visuals.d.ts +0 -25
- package/dist-library/types/react/default-theme.d.ts +0 -6
- package/dist-library/validation-W-bmny-x.js +0 -2253
- package/docs/development/releasing-ch.md +0 -12
- package/docs/development/releasing-en.md +0 -12
- package/docs/integration/codemirror-ch.md +0 -52
- package/docs/integration/codemirror-en.md +0 -29
- package/docs/integration/repository-split-ch.md +0 -40
- package/docs/integration/repository-split-en.md +0 -23
- package/docs/reference/computations-formatting-ch.md +0 -89
- package/docs/reference/computations-formatting-en.md +0 -89
- package/docs/reference/constraints-collections-ch.md +0 -104
- package/docs/reference/constraints-collections-en.md +0 -104
- package/docs/reference/local-components-v2-ch.md +0 -140
- package/docs/reference/local-components-v2-en.md +0 -106
- package/docs/reference/tolerance-ch.md +0 -64
- package/docs/reference/tolerance-en.md +0 -57
- /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
- /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
- /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
- /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
- /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
- /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
- /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
- /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
- /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
- /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
|
@@ -1,83 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as t } from "./config-validation-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"math",
|
|
12
|
-
"inlineMath",
|
|
13
|
-
"fallback",
|
|
14
|
-
"comment",
|
|
15
|
-
"footnoteDefinition"
|
|
16
|
-
]), u = /* @__PURE__ */ new Set([
|
|
17
|
-
"local.version.unsupported",
|
|
18
|
-
"local.version.malformed",
|
|
19
|
-
"local.version.duplicate",
|
|
20
|
-
"local.version.placement",
|
|
21
|
-
"local.parse",
|
|
22
|
-
"local.interpolation",
|
|
23
|
-
"local.tag.unclosed",
|
|
24
|
-
"local.tag.mismatch",
|
|
25
|
-
"local.tag.closing",
|
|
26
|
-
"local.tag.shape",
|
|
27
|
-
"local.attribute",
|
|
28
|
-
"local.budget"
|
|
29
|
-
]);
|
|
30
|
-
function d(e) {
|
|
31
|
-
return e !== void 0 && /[A-Za-z_]/.test(e);
|
|
32
|
-
}
|
|
33
|
-
function f(e) {
|
|
34
|
-
return e !== void 0 && /[A-Za-z0-9_]/.test(e);
|
|
35
|
-
}
|
|
36
|
-
function p(e) {
|
|
37
|
-
return e !== void 0 && /\s/.test(e);
|
|
38
|
-
}
|
|
39
|
-
function m(e) {
|
|
40
|
-
return e.length > 0 && e.length <= c && s.test(e) && !n.has(e);
|
|
41
|
-
}
|
|
42
|
-
function h(e) {
|
|
43
|
-
return {
|
|
44
|
-
start: e.start,
|
|
45
|
-
end: e.end
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function g(e, t) {
|
|
49
|
-
try {
|
|
50
|
-
return a(e, t).diagnostics;
|
|
51
|
-
} catch {
|
|
52
|
-
return [];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function _(e) {
|
|
56
|
-
let t = i(e);
|
|
57
|
-
return t.ok ? t.htmlActive ? "html" : "markdown" : "invalid";
|
|
58
|
-
}
|
|
59
|
-
function v(e) {
|
|
60
|
-
let t = i(e);
|
|
61
|
-
return t.ok ? [...t.schemaByName.values()] : [];
|
|
62
|
-
}
|
|
63
|
-
var y = /^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/;
|
|
64
|
-
function b(e, t) {
|
|
1
|
+
import { o as e } from "./latex-1w7aQgD5.js";
|
|
2
|
+
import { D as t } from "./config-validation-F47AcE6o.js";
|
|
3
|
+
import { o as n } from "./compile-wUv8KEge.js";
|
|
4
|
+
import { N as r } from "./validation-BEBA_HvS.js";
|
|
5
|
+
import { r as i } from "./options-1aDLK7JY.js";
|
|
6
|
+
import { t as a } from "./compiler-eOfcinZs.js";
|
|
7
|
+
import { c as o } from "./schema-BufhKUSM.js";
|
|
8
|
+
// src/local/source/authoring-syntax.ts
|
|
9
|
+
var s = /^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/;
|
|
10
|
+
function c(e, t) {
|
|
65
11
|
if (e[t] !== "<") return null;
|
|
66
|
-
let n =
|
|
12
|
+
let n = s.exec(e.slice(t));
|
|
67
13
|
if (!n) return null;
|
|
68
|
-
let r = !!n[1], i = n[2], a = t + (r ? 2 : 1), o = "",
|
|
69
|
-
for (;
|
|
70
|
-
let t = e[
|
|
14
|
+
let r = !!n[1], i = n[2], a = t + (r ? 2 : 1), o = "", c = t + n[0].length;
|
|
15
|
+
for (; c < e.length; c += 1) {
|
|
16
|
+
let t = e[c];
|
|
71
17
|
if (o) t === o && (o = "");
|
|
72
18
|
else if (t === "\"" || t === "'") o = t;
|
|
73
19
|
else if (t === ">") break;
|
|
74
20
|
}
|
|
75
|
-
if (
|
|
76
|
-
let
|
|
21
|
+
if (c >= e.length) return null;
|
|
22
|
+
let l = c, u = c + 1;
|
|
77
23
|
if (r) return {
|
|
78
24
|
start: t,
|
|
79
|
-
end:
|
|
80
|
-
contentEnd:
|
|
25
|
+
end: u,
|
|
26
|
+
contentEnd: l,
|
|
81
27
|
name: i,
|
|
82
28
|
nameRange: {
|
|
83
29
|
start: a,
|
|
@@ -87,39 +33,39 @@ function b(e, t) {
|
|
|
87
33
|
selfClosing: !1,
|
|
88
34
|
attrs: []
|
|
89
35
|
};
|
|
90
|
-
let
|
|
91
|
-
for (;
|
|
92
|
-
for (;
|
|
93
|
-
if (
|
|
94
|
-
if (e[
|
|
95
|
-
|
|
36
|
+
let d = [], f = a + i.length;
|
|
37
|
+
for (; f < l;) {
|
|
38
|
+
for (; f < l && h(e[f]);) f += 1;
|
|
39
|
+
if (f >= l) break;
|
|
40
|
+
if (e[f] === "/") {
|
|
41
|
+
f += 1;
|
|
96
42
|
continue;
|
|
97
43
|
}
|
|
98
|
-
let t = /^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(
|
|
44
|
+
let t = /^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(f, l));
|
|
99
45
|
if (!t) {
|
|
100
|
-
|
|
46
|
+
f += 1;
|
|
101
47
|
continue;
|
|
102
48
|
}
|
|
103
|
-
let n =
|
|
104
|
-
|
|
105
|
-
let i =
|
|
106
|
-
for (; a <
|
|
49
|
+
let n = f, r = t[0];
|
|
50
|
+
f += r.length;
|
|
51
|
+
let i = f, a = f;
|
|
52
|
+
for (; a < l && h(e[a]);) a += 1;
|
|
107
53
|
if (e[a] !== "=") {
|
|
108
|
-
|
|
54
|
+
d.push({
|
|
109
55
|
name: r,
|
|
110
56
|
nameRange: {
|
|
111
57
|
start: n,
|
|
112
58
|
end: n + r.length
|
|
113
59
|
}
|
|
114
|
-
}),
|
|
60
|
+
}), f = i;
|
|
115
61
|
continue;
|
|
116
62
|
}
|
|
117
|
-
for (
|
|
118
|
-
let o = e[
|
|
63
|
+
for (f = a + 1; f < l && h(e[f]);) f += 1;
|
|
64
|
+
let o = e[f];
|
|
119
65
|
if (o === "\"" || o === "'") {
|
|
120
|
-
let t =
|
|
121
|
-
if (a < 0 || a >
|
|
122
|
-
|
|
66
|
+
let t = f, i = f + 1, a = e.indexOf(o, i);
|
|
67
|
+
if (a < 0 || a > l) {
|
|
68
|
+
d.push({
|
|
123
69
|
name: r,
|
|
124
70
|
nameRange: {
|
|
125
71
|
start: n,
|
|
@@ -127,14 +73,14 @@ function b(e, t) {
|
|
|
127
73
|
},
|
|
128
74
|
valueRange: {
|
|
129
75
|
start: i,
|
|
130
|
-
end:
|
|
76
|
+
end: l
|
|
131
77
|
},
|
|
132
78
|
quoteStart: t,
|
|
133
|
-
quoteEnd:
|
|
134
|
-
}),
|
|
79
|
+
quoteEnd: l
|
|
80
|
+
}), f = l;
|
|
135
81
|
continue;
|
|
136
82
|
}
|
|
137
|
-
|
|
83
|
+
d.push({
|
|
138
84
|
name: r,
|
|
139
85
|
nameRange: {
|
|
140
86
|
start: n,
|
|
@@ -146,12 +92,12 @@ function b(e, t) {
|
|
|
146
92
|
},
|
|
147
93
|
quoteStart: t,
|
|
148
94
|
quoteEnd: a
|
|
149
|
-
}),
|
|
95
|
+
}), f = a + 1;
|
|
150
96
|
continue;
|
|
151
97
|
}
|
|
152
|
-
let s =
|
|
153
|
-
for (;
|
|
154
|
-
|
|
98
|
+
let s = f;
|
|
99
|
+
for (; f < l && !h(e[f]);) f += 1;
|
|
100
|
+
d.push({
|
|
155
101
|
name: r,
|
|
156
102
|
nameRange: {
|
|
157
103
|
start: n,
|
|
@@ -159,33 +105,33 @@ function b(e, t) {
|
|
|
159
105
|
},
|
|
160
106
|
valueRange: {
|
|
161
107
|
start: s,
|
|
162
|
-
end:
|
|
108
|
+
end: f
|
|
163
109
|
},
|
|
164
110
|
unquoted: !0
|
|
165
111
|
});
|
|
166
112
|
}
|
|
167
113
|
return {
|
|
168
114
|
start: t,
|
|
169
|
-
end:
|
|
170
|
-
contentEnd:
|
|
115
|
+
end: u,
|
|
116
|
+
contentEnd: l,
|
|
171
117
|
name: i,
|
|
172
118
|
nameRange: {
|
|
173
119
|
start: a,
|
|
174
120
|
end: a + i.length
|
|
175
121
|
},
|
|
176
122
|
closing: !1,
|
|
177
|
-
selfClosing: /\/\s*$/.test(e.slice(a + i.length,
|
|
178
|
-
attrs:
|
|
123
|
+
selfClosing: /\/\s*$/.test(e.slice(a + i.length, l)),
|
|
124
|
+
attrs: d
|
|
179
125
|
};
|
|
180
126
|
}
|
|
181
|
-
function
|
|
127
|
+
function l(e, n, i) {
|
|
182
128
|
if (n.range.end <= i) return null;
|
|
183
129
|
let a = e.lastIndexOf("</", n.range.end - 1);
|
|
184
130
|
if (a < i) return null;
|
|
185
|
-
let o =
|
|
131
|
+
let o = c(e, a);
|
|
186
132
|
return !o || !o.closing || o.end > n.range.end || o.name !== n.name && (!t.has(o.name.toLowerCase()) && !r.has(o.name.toLowerCase()) || o.name.toLowerCase() !== n.name?.toLowerCase()) ? null : o;
|
|
187
133
|
}
|
|
188
|
-
function
|
|
134
|
+
function u(e, t, n) {
|
|
189
135
|
let r = [];
|
|
190
136
|
for (let i = t; i < n;) {
|
|
191
137
|
if (e[i] === "\\" && e.startsWith("{{", i + 1)) {
|
|
@@ -213,7 +159,7 @@ function S(e, t, n) {
|
|
|
213
159
|
}
|
|
214
160
|
return r;
|
|
215
161
|
}
|
|
216
|
-
function
|
|
162
|
+
function d(e, t) {
|
|
217
163
|
let n = {
|
|
218
164
|
quot: "\"",
|
|
219
165
|
apos: "'",
|
|
@@ -230,7 +176,7 @@ function C(e, t) {
|
|
|
230
176
|
offsets: r
|
|
231
177
|
};
|
|
232
178
|
}
|
|
233
|
-
function
|
|
179
|
+
function f(e, t, r) {
|
|
234
180
|
let i = [];
|
|
235
181
|
for (let a = t; a < r;) {
|
|
236
182
|
let t = e[a];
|
|
@@ -252,11 +198,11 @@ function w(e, t, r) {
|
|
|
252
198
|
continue;
|
|
253
199
|
}
|
|
254
200
|
}
|
|
255
|
-
if (
|
|
201
|
+
if (p(t)) {
|
|
256
202
|
let t = a;
|
|
257
|
-
for (a += 1; a < r &&
|
|
203
|
+
for (a += 1; a < r && m(e[a]);) a += 1;
|
|
258
204
|
let o = e.slice(t, a), s = a;
|
|
259
|
-
for (; s < r &&
|
|
205
|
+
for (; s < r && h(e[s]);) s += 1;
|
|
260
206
|
if (e[s] === "(" || o === "true" || o === "false" || o === "null" || o === "pi" || o === "e" || n.has(o)) continue;
|
|
261
207
|
i.push({
|
|
262
208
|
name: o,
|
|
@@ -270,18 +216,76 @@ function w(e, t, r) {
|
|
|
270
216
|
}
|
|
271
217
|
return i;
|
|
272
218
|
}
|
|
219
|
+
function p(e) {
|
|
220
|
+
return e !== void 0 && /[A-Za-z_]/.test(e);
|
|
221
|
+
}
|
|
222
|
+
function m(e) {
|
|
223
|
+
return e !== void 0 && /[A-Za-z0-9_]/.test(e);
|
|
224
|
+
}
|
|
225
|
+
function h(e) {
|
|
226
|
+
return e !== void 0 && /\s/.test(e);
|
|
227
|
+
}
|
|
228
|
+
// src/local/source/authoring.ts
|
|
229
|
+
var g = /^[A-Za-z_][A-Za-z0-9_]*$/, _ = 128, v = /* @__PURE__ */ new Set([
|
|
230
|
+
"code",
|
|
231
|
+
"inlineCode",
|
|
232
|
+
"math",
|
|
233
|
+
"inlineMath",
|
|
234
|
+
"fallback",
|
|
235
|
+
"comment",
|
|
236
|
+
"footnoteDefinition",
|
|
237
|
+
"authorCss",
|
|
238
|
+
"authorJavaScript",
|
|
239
|
+
"extendedHtmlRaw"
|
|
240
|
+
]), y = /* @__PURE__ */ new Set([
|
|
241
|
+
"local.version.unsupported",
|
|
242
|
+
"local.version.malformed",
|
|
243
|
+
"local.version.duplicate",
|
|
244
|
+
"local.version.placement",
|
|
245
|
+
"local.parse",
|
|
246
|
+
"local.interpolation",
|
|
247
|
+
"local.tag.unclosed",
|
|
248
|
+
"local.tag.mismatch",
|
|
249
|
+
"local.tag.closing",
|
|
250
|
+
"local.tag.shape",
|
|
251
|
+
"local.attribute",
|
|
252
|
+
"local.budget"
|
|
253
|
+
]);
|
|
254
|
+
function b(e) {
|
|
255
|
+
return e.length > 0 && e.length <= _ && g.test(e) && !n.has(e);
|
|
256
|
+
}
|
|
257
|
+
function x(e) {
|
|
258
|
+
return {
|
|
259
|
+
start: e.start,
|
|
260
|
+
end: e.end
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function S(e, t) {
|
|
264
|
+
try {
|
|
265
|
+
return a(e, t).diagnostics;
|
|
266
|
+
} catch {
|
|
267
|
+
return [];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function C(e) {
|
|
271
|
+
return i(e).ok;
|
|
272
|
+
}
|
|
273
|
+
function w(e) {
|
|
274
|
+
let t = i(e);
|
|
275
|
+
return t.ok ? [...t.schemaByName.values()] : [];
|
|
276
|
+
}
|
|
273
277
|
function T(e, t) {
|
|
274
278
|
return Object.values(e.bindings ?? {}).some((e) => e.bind === t);
|
|
275
279
|
}
|
|
276
280
|
function E(e, t = []) {
|
|
277
|
-
for (let n of e)
|
|
281
|
+
for (let n of e) v.has(n.type) && t.push(x(n.range)), n.type !== "fallback" && n.children && E(n.children, t);
|
|
278
282
|
return t;
|
|
279
283
|
}
|
|
280
284
|
function D(e, t) {
|
|
281
285
|
let n = E(t), r = (t) => {
|
|
282
286
|
for (let i of t) {
|
|
283
287
|
if (i.type === "component" || i.type === "hostComponent") {
|
|
284
|
-
let t =
|
|
288
|
+
let t = c(e, i.range.start);
|
|
285
289
|
t && n.push({
|
|
286
290
|
start: t.start,
|
|
287
291
|
end: t.end
|
|
@@ -326,100 +330,100 @@ function k(n, i, a, o) {
|
|
|
326
330
|
id: e.nodeId,
|
|
327
331
|
range: e.range
|
|
328
332
|
});
|
|
329
|
-
let
|
|
330
|
-
for (let r of
|
|
331
|
-
},
|
|
332
|
-
let n =
|
|
333
|
-
n ? n.push(
|
|
334
|
-
},
|
|
335
|
-
if (
|
|
336
|
-
let r =
|
|
333
|
+
let p = s.length ? i.concat(s) : i, m = /* @__PURE__ */ new Set(), h = [], g = /* @__PURE__ */ new Map(), _ = [], y = [], S = (e, t) => {
|
|
334
|
+
for (let r of f(n, e, t)) _.push(r);
|
|
335
|
+
}, C = (e, t) => {
|
|
336
|
+
let n = g.get(e);
|
|
337
|
+
n ? n.push(x(t)) : g.set(e, [x(t)]);
|
|
338
|
+
}, w = (e, t) => {
|
|
339
|
+
if (m.has(e.range.start)) return;
|
|
340
|
+
let r = c(n, e.range.start);
|
|
337
341
|
if (!r || r.closing) return;
|
|
338
|
-
|
|
342
|
+
m.add(e.range.start), h.push({
|
|
339
343
|
kind: "tag",
|
|
340
|
-
range:
|
|
344
|
+
range: x(r.nameRange)
|
|
341
345
|
});
|
|
342
346
|
let i = a.find((t) => t.name === e.name);
|
|
343
347
|
for (let t of r.attrs) {
|
|
344
|
-
if (
|
|
348
|
+
if (h.push({
|
|
345
349
|
kind: "attribute",
|
|
346
|
-
range:
|
|
350
|
+
range: x(t.nameRange)
|
|
347
351
|
}), !t.valueRange) continue;
|
|
348
|
-
let o = O(e.name ?? "", a)?.[t.name], s = i !== void 0 && T(i, t.name) && Object.values(i.bindings ?? {}).some((e) => e.bind === t.name && (e.requiresAttributes ?? []).every((e) => r.attrs.some((t) => t.name === e))), c = (e.name === "computed" || e.name === "const" || e.name === "external") && t.name === "name", l = n.slice(t.valueRange.start, t.valueRange.end),
|
|
352
|
+
let o = O(e.name ?? "", a)?.[t.name], s = i !== void 0 && T(i, t.name) && Object.values(i.bindings ?? {}).some((e) => e.bind === t.name && (e.requiresAttributes ?? []).every((e) => r.attrs.some((t) => t.name === e))), c = (e.name === "computed" || e.name === "const" || e.name === "external") && t.name === "name", l = n.slice(t.valueRange.start, t.valueRange.end), p = d(n, t.valueRange);
|
|
349
353
|
if (i?.rules?.some((e) => e.kind === "validation-rule" && e.fields === t.name)) {
|
|
350
|
-
for (let e of
|
|
351
|
-
if (!
|
|
354
|
+
for (let e of p.text.matchAll(/\S+/g)) {
|
|
355
|
+
if (!b(e[0])) continue;
|
|
352
356
|
let t = {
|
|
353
|
-
start:
|
|
354
|
-
end:
|
|
357
|
+
start: p.offsets[e.index],
|
|
358
|
+
end: p.offsets[e.index + e[0].length]
|
|
355
359
|
};
|
|
356
|
-
|
|
360
|
+
_.push({
|
|
357
361
|
name: e[0],
|
|
358
362
|
range: t
|
|
359
|
-
}),
|
|
363
|
+
}), h.push({
|
|
360
364
|
kind: "binding",
|
|
361
365
|
range: t
|
|
362
366
|
});
|
|
363
367
|
}
|
|
364
368
|
continue;
|
|
365
369
|
}
|
|
366
|
-
let
|
|
367
|
-
if (
|
|
370
|
+
let m = o && !o.static ? u(p.text, 0, p.text.length) : [];
|
|
371
|
+
if (m.length > 0) {
|
|
368
372
|
let e = 0;
|
|
369
|
-
for (let n of
|
|
370
|
-
n.start > e &&
|
|
373
|
+
for (let n of m) {
|
|
374
|
+
n.start > e && h.push({
|
|
371
375
|
kind: "string",
|
|
372
376
|
range: {
|
|
373
|
-
start:
|
|
374
|
-
end:
|
|
377
|
+
start: p.offsets[e],
|
|
378
|
+
end: p.offsets[n.start]
|
|
375
379
|
}
|
|
376
|
-
}),
|
|
380
|
+
}), h.push({
|
|
377
381
|
kind: "expression",
|
|
378
382
|
range: {
|
|
379
|
-
start:
|
|
380
|
-
end:
|
|
383
|
+
start: p.offsets[n.start],
|
|
384
|
+
end: p.offsets[n.end]
|
|
381
385
|
}
|
|
382
386
|
});
|
|
383
|
-
for (let e of
|
|
387
|
+
for (let e of f(p.text, n.innerStart, n.innerEnd)) (!i?.rules?.some((e) => e.kind === "scoped-expressions" && e.scope === "row" && e.attributes.includes(t.name) || e.kind === "row-values" && e.key === t.name) || e.name !== "item" && e.name !== "index") && _.push({
|
|
384
388
|
name: e.name,
|
|
385
389
|
range: {
|
|
386
|
-
start:
|
|
387
|
-
end:
|
|
390
|
+
start: p.offsets[e.range.start],
|
|
391
|
+
end: p.offsets[e.range.end]
|
|
388
392
|
}
|
|
389
393
|
});
|
|
390
394
|
e = n.end;
|
|
391
395
|
}
|
|
392
|
-
e <
|
|
396
|
+
e < p.text.length && h.push({
|
|
393
397
|
kind: "string",
|
|
394
398
|
range: {
|
|
395
|
-
start:
|
|
399
|
+
start: p.offsets[e],
|
|
396
400
|
end: t.valueRange.end
|
|
397
401
|
}
|
|
398
402
|
});
|
|
399
|
-
} else (s || c) &&
|
|
403
|
+
} else (s || c) && b(l) ? (h.push({
|
|
400
404
|
kind: "binding",
|
|
401
|
-
range:
|
|
402
|
-
}),
|
|
405
|
+
range: x(t.valueRange)
|
|
406
|
+
}), C(l, t.valueRange)) : t.valueRange.end > t.valueRange.start && h.push({
|
|
403
407
|
kind: "string",
|
|
404
|
-
range:
|
|
408
|
+
range: x(t.valueRange)
|
|
405
409
|
});
|
|
406
410
|
}
|
|
407
|
-
let o =
|
|
408
|
-
o &&
|
|
411
|
+
let o = l(n, e, r.end);
|
|
412
|
+
o && h.push({
|
|
409
413
|
kind: "tag",
|
|
410
|
-
range:
|
|
414
|
+
range: x(o.nameRange)
|
|
411
415
|
});
|
|
412
416
|
}, E = (i, o) => {
|
|
413
417
|
for (let s of i) {
|
|
414
|
-
if ((s.type === "component" || s.type === "hostComponent") && s.name)
|
|
415
|
-
else if (s.type === "interpolation")
|
|
418
|
+
if ((s.type === "component" || s.type === "hostComponent") && s.name) w(s, o);
|
|
419
|
+
else if (s.type === "interpolation") h.push({
|
|
416
420
|
kind: "expression",
|
|
417
|
-
range:
|
|
418
|
-
}),
|
|
421
|
+
range: x(s.range)
|
|
422
|
+
}), S(s.range.start + 2, Math.max(s.range.start + 2, s.range.end - 2));
|
|
419
423
|
else if (s.type === "math" || s.type === "inlineMath") {
|
|
420
|
-
if (
|
|
424
|
+
if (h.push({
|
|
421
425
|
kind: "math",
|
|
422
|
-
range:
|
|
426
|
+
range: x(s.range)
|
|
423
427
|
}), a.find((e) => e.name === o)?.rules?.some((e) => e.kind === "inline-math-reads") && s.type === "math") {
|
|
424
428
|
let t = s.range.start + 2;
|
|
425
429
|
try {
|
|
@@ -431,20 +435,20 @@ function k(n, i, a, o) {
|
|
|
431
435
|
end: t + r.range.end
|
|
432
436
|
}
|
|
433
437
|
};
|
|
434
|
-
|
|
438
|
+
_.push(e), y.push(e);
|
|
435
439
|
}
|
|
436
440
|
} catch {}
|
|
437
441
|
}
|
|
438
|
-
} else s.type === "code" || s.type === "inlineCode" ?
|
|
442
|
+
} else s.type === "code" || s.type === "inlineCode" ? h.push({
|
|
439
443
|
kind: "code",
|
|
440
|
-
range:
|
|
441
|
-
}) : s.type === "comment" &&
|
|
444
|
+
range: x(s.range)
|
|
445
|
+
}) : s.type === "comment" && h.push({
|
|
442
446
|
kind: "comment",
|
|
443
|
-
range:
|
|
447
|
+
range: x(s.range)
|
|
444
448
|
});
|
|
445
|
-
if (!
|
|
446
|
-
let e =
|
|
447
|
-
e && !e.closing && (t.has(e.name.toLowerCase()) || r.has(e.name.toLowerCase())) &&
|
|
449
|
+
if (!v.has(s.type) && n[s.range.start] === "<" && !m.has(s.range.start)) {
|
|
450
|
+
let e = c(n, s.range.start);
|
|
451
|
+
e && !e.closing && (t.has(e.name.toLowerCase()) || r.has(e.name.toLowerCase())) && w({
|
|
448
452
|
...s,
|
|
449
453
|
name: e.name
|
|
450
454
|
}, o);
|
|
@@ -452,25 +456,25 @@ function k(n, i, a, o) {
|
|
|
452
456
|
s.type !== "fallback" && s.children && E(s.children, s.name);
|
|
453
457
|
}
|
|
454
458
|
};
|
|
455
|
-
E(
|
|
456
|
-
for (let e of D(n,
|
|
459
|
+
E(p);
|
|
460
|
+
for (let e of D(n, p)) h.push({
|
|
457
461
|
kind: "comment",
|
|
458
462
|
range: e
|
|
459
463
|
});
|
|
460
|
-
|
|
464
|
+
h.sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end);
|
|
461
465
|
let k = [];
|
|
462
|
-
for (let e of
|
|
466
|
+
for (let e of h) {
|
|
463
467
|
if (e.range.end <= e.range.start) continue;
|
|
464
468
|
let t = k[k.length - 1];
|
|
465
469
|
t && e.range.start < t.range.end || k.push(e);
|
|
466
470
|
}
|
|
467
471
|
let A = [];
|
|
468
|
-
for (let [e, t] of
|
|
472
|
+
for (let [e, t] of g) {
|
|
469
473
|
let n = [], r = /* @__PURE__ */ new Set();
|
|
470
|
-
for (let t of
|
|
474
|
+
for (let t of _) {
|
|
471
475
|
if (t.name !== e) continue;
|
|
472
476
|
let i = `${t.range.start}:${t.range.end}`;
|
|
473
|
-
r.has(i) || (r.add(i), n.push(
|
|
477
|
+
r.has(i) || (r.add(i), n.push(x(t.range)));
|
|
474
478
|
}
|
|
475
479
|
n.sort((e, t) => e.start - t.start || e.end - t.end), t.sort((e, t) => e.start - t.start || e.end - t.end), A.push({
|
|
476
480
|
name: e,
|
|
@@ -481,7 +485,7 @@ function k(n, i, a, o) {
|
|
|
481
485
|
return A.sort((e, t) => e.declarations[0].start - t.declarations[0].start || e.name.localeCompare(t.name)), {
|
|
482
486
|
tokens: k,
|
|
483
487
|
bindings: A,
|
|
484
|
-
mathReferences:
|
|
488
|
+
mathReferences: y
|
|
485
489
|
};
|
|
486
490
|
}
|
|
487
491
|
function A(e, t, n = {}) {
|
|
@@ -490,16 +494,16 @@ function A(e, t, n = {}) {
|
|
|
490
494
|
bindings: [],
|
|
491
495
|
diagnostics: []
|
|
492
496
|
};
|
|
493
|
-
if (
|
|
497
|
+
if (!C(t)) return {
|
|
494
498
|
tokens: [],
|
|
495
499
|
bindings: [],
|
|
496
|
-
diagnostics: n.diagnostics === !1 ? [] :
|
|
500
|
+
diagnostics: n.diagnostics === !1 ? [] : S(e, t)
|
|
497
501
|
};
|
|
498
|
-
let r = n.document?.source === e ? n.document : o(e, t), i = k(e, r.nodes,
|
|
502
|
+
let r = n.document?.source === e ? n.document : o(e, t), i = k(e, r.nodes, w(t), r);
|
|
499
503
|
return {
|
|
500
504
|
tokens: i.tokens,
|
|
501
505
|
bindings: i.bindings,
|
|
502
|
-
diagnostics: n.diagnostics === !1 ? [] :
|
|
506
|
+
diagnostics: n.diagnostics === !1 ? [] : S(e, t)
|
|
503
507
|
};
|
|
504
508
|
}
|
|
505
509
|
function j(e, t, n) {
|
|
@@ -509,7 +513,7 @@ function j(e, t, n) {
|
|
|
509
513
|
if (!i) {
|
|
510
514
|
let t = o;
|
|
511
515
|
for (; t < n;) {
|
|
512
|
-
for (; t < n &&
|
|
516
|
+
for (; t < n && h(e[t]);) t += 1;
|
|
513
517
|
if (t >= n) break;
|
|
514
518
|
if (e[t] === "/") {
|
|
515
519
|
u = !0, t += 1;
|
|
@@ -523,7 +527,7 @@ function j(e, t, n) {
|
|
|
523
527
|
let i = r[0], a = t;
|
|
524
528
|
t += i.length;
|
|
525
529
|
let o = t, d = t;
|
|
526
|
-
for (; d < n &&
|
|
530
|
+
for (; d < n && h(e[d]);) d += 1;
|
|
527
531
|
if (e[d] !== "=") {
|
|
528
532
|
s.push({
|
|
529
533
|
name: i,
|
|
@@ -536,7 +540,7 @@ function j(e, t, n) {
|
|
|
536
540
|
}), t = o;
|
|
537
541
|
continue;
|
|
538
542
|
}
|
|
539
|
-
for (t = d + 1; t < n &&
|
|
543
|
+
for (t = d + 1; t < n && h(e[t]);) t += 1;
|
|
540
544
|
let f = e[t];
|
|
541
545
|
if (f === "\"" || f === "'") {
|
|
542
546
|
let r = t, u = t + 1, d = e.indexOf(f, u);
|
|
@@ -576,8 +580,8 @@ function j(e, t, n) {
|
|
|
576
580
|
}), t = d + 1;
|
|
577
581
|
continue;
|
|
578
582
|
}
|
|
579
|
-
let
|
|
580
|
-
for (; t < n && !
|
|
583
|
+
let p = t;
|
|
584
|
+
for (; t < n && !h(e[t]);) t += 1;
|
|
581
585
|
s.push({
|
|
582
586
|
name: i,
|
|
583
587
|
nameStart: a,
|
|
@@ -587,7 +591,7 @@ function j(e, t, n) {
|
|
|
587
591
|
end: o
|
|
588
592
|
},
|
|
589
593
|
valueRange: {
|
|
590
|
-
start:
|
|
594
|
+
start: p,
|
|
591
595
|
end: t
|
|
592
596
|
},
|
|
593
597
|
unquoted: !0
|
|
@@ -598,7 +602,7 @@ function j(e, t, n) {
|
|
|
598
602
|
if (!c) {
|
|
599
603
|
let t = n;
|
|
600
604
|
for (; t > o && /[A-Za-z0-9_-]/.test(e[t - 1]);) --t;
|
|
601
|
-
t > o &&
|
|
605
|
+
t > o && h(e[t - 1]) && (d = t);
|
|
602
606
|
}
|
|
603
607
|
return {
|
|
604
608
|
name: a,
|
|
@@ -618,7 +622,7 @@ function M(e, t, n) {
|
|
|
618
622
|
for (let n = r.length - 1; n >= 0; --n) {
|
|
619
623
|
let i = r[n];
|
|
620
624
|
if (i >= t) continue;
|
|
621
|
-
let a =
|
|
625
|
+
let a = c(e, i);
|
|
622
626
|
if (a && t <= a.end) return i;
|
|
623
627
|
if (a && a.end < t) break;
|
|
624
628
|
}
|
|
@@ -631,7 +635,7 @@ function M(e, t, n) {
|
|
|
631
635
|
continue;
|
|
632
636
|
}
|
|
633
637
|
let r = e[n + 1];
|
|
634
|
-
if (r !== "/" && !
|
|
638
|
+
if (r !== "/" && !p(r)) a = n;
|
|
635
639
|
else if (N(e, n, t)) a = n;
|
|
636
640
|
else return n;
|
|
637
641
|
}
|
|
@@ -704,10 +708,10 @@ function L(e, t, n, r) {
|
|
|
704
708
|
function R(e, t, n, r) {
|
|
705
709
|
if (F(e, n.innerStart, t)) return [];
|
|
706
710
|
let i = t;
|
|
707
|
-
for (; i > n.innerStart &&
|
|
711
|
+
for (; i > n.innerStart && m(e[i - 1]);) --i;
|
|
708
712
|
if (e[i - 1] === ".") return [];
|
|
709
713
|
let a = e.slice(i, t);
|
|
710
|
-
return a && !
|
|
714
|
+
return a && !p(a[0]) ? [] : r.filter((e) => e.name.startsWith(a)).map((n) => ({
|
|
711
715
|
label: n.name,
|
|
712
716
|
insertText: n.name,
|
|
713
717
|
range: L(e, i, t, n.name),
|
|
@@ -735,8 +739,23 @@ function B(e, t, n, r) {
|
|
|
735
739
|
if (!i) return [];
|
|
736
740
|
let a = e.slice(n.partialStart, t);
|
|
737
741
|
if (a && !/^[A-Za-z0-9_-]*$/.test(a)) return [];
|
|
738
|
-
let o = new Set(n.attrs.filter((e) => e.nameEnd < n.partialStart).map((e) => e.name));
|
|
739
|
-
return
|
|
742
|
+
let o = new Set(n.attrs.filter((e) => e.nameEnd < n.partialStart).map((e) => e.name)), s = { ...i };
|
|
743
|
+
return ![
|
|
744
|
+
"computed",
|
|
745
|
+
"const",
|
|
746
|
+
"external",
|
|
747
|
+
"validation",
|
|
748
|
+
"option",
|
|
749
|
+
"column",
|
|
750
|
+
"edge",
|
|
751
|
+
"step"
|
|
752
|
+
].includes(n.name) && !Object.hasOwn(i, "css") && (s.css = {
|
|
753
|
+
kind: "string",
|
|
754
|
+
static: !0
|
|
755
|
+
}), n.name === "counter" && !Object.hasOwn(i, "action-id") && (s["action-id"] = {
|
|
756
|
+
kind: "string",
|
|
757
|
+
static: !0
|
|
758
|
+
}), Object.entries(s).filter(([e]) => !o.has(e) && e.startsWith(a)).map(([r, i]) => ({
|
|
740
759
|
label: r,
|
|
741
760
|
insertText: r,
|
|
742
761
|
range: L(e, n.partialStart, t, r),
|
|
@@ -751,25 +770,28 @@ function V(e, t, n) {
|
|
|
751
770
|
if (e[o] !== "<" || e[o - 1] === "\\") return [];
|
|
752
771
|
let s = e[o + 1] === "/", c = o + (s ? 2 : 1);
|
|
753
772
|
if (c > t) return [];
|
|
754
|
-
let l = a[1] ?? "";
|
|
755
|
-
return
|
|
773
|
+
let l = a[1] ?? "", u = s ? n.filter((e) => e.form !== "leaf").map((e) => e.name) : n.map((e) => e.name), d = ["css", "javascript"].filter((e) => !n.some((t) => t.name === e));
|
|
774
|
+
return [...u, ...d].filter((e) => e.startsWith(l)).map((n) => ({
|
|
756
775
|
label: n,
|
|
757
|
-
insertText: n,
|
|
776
|
+
insertText: !s && d.includes(n) && e[L(e, c, t, n).end] !== ">" ? `${n}>\n\n</${n}>` : n,
|
|
758
777
|
range: L(e, c, t, n),
|
|
759
778
|
kind: "tag",
|
|
760
|
-
detail: s ? "closing tag" : "component"
|
|
779
|
+
detail: s ? "closing tag" : d.includes(n) ? "document declaration" : "component"
|
|
761
780
|
}));
|
|
762
781
|
}
|
|
763
782
|
function H(e, t, n) {
|
|
764
|
-
if (typeof e != "string" || !Number.isFinite(t) ||
|
|
765
|
-
let r = Math.max(0, Math.min(e.length, Math.floor(t))), i =
|
|
783
|
+
if (typeof e != "string" || !Number.isFinite(t) || !C(n)) return [];
|
|
784
|
+
let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = w(n), a = o(e, n), s = [...E(a.nodes), ...D(e, a.nodes)].sort((e, t) => e.start - t.start);
|
|
766
785
|
if (I(s, r) || r === e.length && s.some((e) => e.end === r && e.start < r)) return [];
|
|
767
786
|
let c = k(e, a.nodes, i), l = P(e, r);
|
|
768
787
|
if (l) {
|
|
769
788
|
let t = M(e, r, a.nodes);
|
|
770
789
|
if (t >= 0) {
|
|
771
790
|
let n = j(e, t, r);
|
|
772
|
-
if (n?.inValue && n.currentAttribute
|
|
791
|
+
if (n?.inValue && n.currentAttribute) {
|
|
792
|
+
let e = O(n.name, i)?.[n.currentAttribute.name];
|
|
793
|
+
if (e?.static || !e && ["css", "action-id"].includes(n.currentAttribute.name)) return [];
|
|
794
|
+
}
|
|
773
795
|
}
|
|
774
796
|
return R(e, r, l, c.bindings);
|
|
775
797
|
}
|
|
@@ -793,30 +815,30 @@ function U(e, t) {
|
|
|
793
815
|
}
|
|
794
816
|
function W(e, t, n, r) {
|
|
795
817
|
if (typeof e != "string" || typeof t != "string" || typeof n != "string") throw Error("Rename requires string arguments.");
|
|
796
|
-
if (
|
|
797
|
-
if (!
|
|
798
|
-
let i = k(e, o(e, r).nodes,
|
|
818
|
+
if (!C(r)) throw Error("Bindings cannot be renamed with invalid compile options.");
|
|
819
|
+
if (!b(n)) throw Error(`"${n}" is not a valid binding name. Use [A-Za-z_][A-Za-z0-9_]* and avoid reserved names.`);
|
|
820
|
+
let i = k(e, o(e, r).nodes, w(r)), s = i.bindings.find((e) => e.name === t);
|
|
799
821
|
if (!s || s.declarations.length === 0) throw Error(`Binding "${t}" is not declared in this document.`);
|
|
800
822
|
if (t === n) return {
|
|
801
823
|
source: e,
|
|
802
824
|
edits: []
|
|
803
825
|
};
|
|
804
826
|
if (i.bindings.some((e) => e.name === n)) throw Error(`Binding "${n}" already exists.`);
|
|
805
|
-
if (
|
|
827
|
+
if (S(e, r).some((e) => e.severity === "error" && y.has(e.code))) throw Error("The document cannot be renamed safely while parse errors remain.");
|
|
806
828
|
let c = /* @__PURE__ */ new Set(), l = [];
|
|
807
829
|
for (let e of [...s.declarations, ...s.references]) {
|
|
808
830
|
let t = `${e.start}:${e.end}`;
|
|
809
|
-
c.has(t) || (c.add(t), l.push(
|
|
831
|
+
c.has(t) || (c.add(t), l.push(x(e)));
|
|
810
832
|
}
|
|
811
833
|
l.sort((e, t) => e.start - t.start || e.end - t.end);
|
|
812
|
-
let
|
|
813
|
-
range:
|
|
814
|
-
text:
|
|
815
|
-
})),
|
|
816
|
-
if (a(e, r).ok && !a(
|
|
834
|
+
let u = new Set(i.mathReferences.filter((e) => e.name === t).map((e) => `${e.range.start}:${e.range.end}`)), d = l.map((e) => ({
|
|
835
|
+
range: x(e),
|
|
836
|
+
text: u.has(`${e.start}:${e.end}`) ? `\\mathrm{${n}}` : n
|
|
837
|
+
})), f = U(e, d);
|
|
838
|
+
if (a(e, r).ok && !a(f, r).ok) throw Error("Rename could not preserve all binding references; the source was left unchanged.");
|
|
817
839
|
return {
|
|
818
|
-
source:
|
|
819
|
-
edits:
|
|
840
|
+
source: f,
|
|
841
|
+
edits: d
|
|
820
842
|
};
|
|
821
843
|
}
|
|
822
844
|
function G(e, t) {
|
|
@@ -827,7 +849,7 @@ function G(e, t) {
|
|
|
827
849
|
return t.selfClosing ? `${i} />` : `${i}>`;
|
|
828
850
|
}
|
|
829
851
|
function K(e, t) {
|
|
830
|
-
if (typeof e != "string" ||
|
|
852
|
+
if (typeof e != "string" || !C(t)) return e;
|
|
831
853
|
let n;
|
|
832
854
|
try {
|
|
833
855
|
n = a(e, t);
|
|
@@ -838,7 +860,7 @@ function K(e, t) {
|
|
|
838
860
|
let r = o(e, t), i = [], s = (t) => {
|
|
839
861
|
for (let n of t) {
|
|
840
862
|
if ((n.type === "component" || n.type === "hostComponent") && n.name) {
|
|
841
|
-
let t =
|
|
863
|
+
let t = c(e, n.range.start);
|
|
842
864
|
if (t && !t.closing && !/[\r\n]/.test(e.slice(t.start, t.end))) {
|
|
843
865
|
let n = G(e, t);
|
|
844
866
|
n !== e.slice(t.start, t.end) && i.push({
|
|
@@ -848,7 +870,7 @@ function K(e, t) {
|
|
|
848
870
|
});
|
|
849
871
|
}
|
|
850
872
|
if (t) {
|
|
851
|
-
let r =
|
|
873
|
+
let r = l(e, n, t.end);
|
|
852
874
|
if (r && !/[\r\n]/.test(e.slice(r.start, r.end))) {
|
|
853
875
|
let t = `</${e.slice(r.nameRange.start, r.nameRange.end)}>`;
|
|
854
876
|
t !== e.slice(r.start, r.end) && i.push({
|
|
@@ -863,8 +885,8 @@ function K(e, t) {
|
|
|
863
885
|
}
|
|
864
886
|
};
|
|
865
887
|
s(r.nodes), i.sort((e, t) => e.start - t.start || e.end - t.end);
|
|
866
|
-
let
|
|
867
|
-
for (let t of i) t.start <
|
|
868
|
-
return
|
|
888
|
+
let u = "", d = 0;
|
|
889
|
+
for (let t of i) t.start < d || (u += e.slice(d, t.start) + t.text, d = t.end);
|
|
890
|
+
return u + e.slice(d);
|
|
869
891
|
}
|
|
870
892
|
export { W as i, H as n, K as r, A as t };
|