@histoire/app 1.0.0-beta.1 → 1.0.0-beta.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/dist/app/style/README.md +167 -0
- package/dist/app/style/controls.css +28 -0
- package/dist/app/style/density.css +38 -0
- package/dist/app/style/document.pcss +60 -0
- package/dist/app/style/fonts.pcss +1 -0
- package/dist/app/style/main.css +25 -0
- package/dist/app/style/theme.css +117 -0
- package/dist/app/style/tokens.pcss +135 -0
- package/dist/bundle-embed-dev.js +6 -0
- package/dist/bundle-embed.js +6 -0
- package/dist/bundle-main-dev.js +1 -1
- package/dist/bundle-main.js +2 -1
- package/dist/bundle-sandbox-dev.js +3 -2
- package/dist/bundle-sandbox.js +3 -2
- package/dist/bundled/api.js +1 -12
- package/dist/bundled/app.css +183 -75
- package/dist/bundled/chunks/AboutSection-mX7J6xrz.js +42 -0
- package/dist/bundled/chunks/AgentCursor-DcVxonMC.js +124 -0
- package/dist/bundled/chunks/AgentLogo-C2uXqX04.js +69 -0
- package/dist/bundled/chunks/AgentPlanApproval-22I_Lbhn.js +693 -0
- package/dist/bundled/chunks/AgentsSection-DWmUKCX-.js +1126 -0
- package/dist/bundled/chunks/AiPanel-BICtbtCE.js +1130 -0
- package/dist/bundled/chunks/AppearanceSection-maVgcfMk.js +306 -0
- package/dist/bundled/chunks/BasePopover-B3Y5H1gd.js +307 -0
- package/dist/bundled/chunks/CommentsCanvasOverlay-DhqtbJNX.js +955 -0
- package/dist/bundled/chunks/DevBrowseStatus-B6cLRu19.js +48 -0
- package/dist/bundled/chunks/DocsTab-PpFKAC6Q.js +31 -0
- package/dist/bundled/chunks/EmbedDialog-B70Zo-PZ.js +475 -0
- package/dist/bundled/chunks/EventsTab-DLVYcX1N.js +37 -0
- package/dist/bundled/chunks/GeneralSection-dvmJUgqN.js +84 -0
- package/dist/bundled/chunks/HomeCard-JYU5jbs7.js +24 -0
- package/dist/bundled/chunks/InspectionPanel-DDuT3guJ.js +584 -0
- package/dist/bundled/chunks/InspectorGuideLink-7Ui_Y2Wd.js +28 -0
- package/dist/bundled/chunks/MarkdownPage-D_LpsCvG.js +349 -0
- package/dist/bundled/chunks/MarketplaceUpdateBody-BtLPpA7F.js +300 -0
- package/dist/bundled/chunks/MarketplaceView-C1sVFRsq.js +2798 -0
- package/dist/bundled/chunks/MatrixInspector-wqkJJnuf.js +893 -0
- package/dist/bundled/chunks/MatrixView-D-Snu47M.js +646 -0
- package/dist/bundled/chunks/MatrixVisualActions-D3b-cp7N.js +70 -0
- package/dist/bundled/chunks/McpActivity-r2CFr-ny.js +136 -0
- package/dist/bundled/chunks/McpSection-swh7qlM0.js +76 -0
- package/dist/bundled/chunks/MenuItem-BYRJG5YA.js +59 -0
- package/dist/bundled/chunks/NeedsAttention-Cf6ihlT0.js +77 -0
- package/dist/bundled/chunks/PermissionPrompt-CXTPfiIu.js +128 -0
- package/dist/bundled/chunks/PluginTile-CfplGy7m.js +97 -0
- package/dist/bundled/chunks/PluginsSection-Dhv2haa3.js +858 -0
- package/dist/bundled/chunks/PopoverDivider-vLxqs_KP.js +13 -0
- package/dist/bundled/chunks/PopoverTitle-zikHVKQE.js +12 -0
- package/dist/bundled/chunks/SaveToProject-F-tQZKCG.js +206 -0
- package/dist/bundled/chunks/ScreenshotPopover-BZ37-dfK.js +725 -0
- package/dist/bundled/chunks/SettingsChoices-BoESgi62.js +19 -0
- package/dist/bundled/chunks/SettingsPage-D6ZOAgS9.js +174 -0
- package/dist/bundled/chunks/SettingsRow-C4lda-j7.js +22 -0
- package/dist/bundled/chunks/ShortcutsSection-EK2-e56v.js +43 -0
- package/dist/bundled/chunks/StoryInspector-DCNgw0x8.js +1197 -0
- package/dist/bundled/chunks/TestsPanel-D1USqA8I.js +1264 -0
- package/dist/bundled/chunks/TestsSection-CIkkHlyK.js +33 -0
- package/dist/bundled/chunks/TestsTab-ykf9zwmG.js +50 -0
- package/dist/bundled/chunks/ThreadMessage-DxrvoIea.js +2426 -0
- package/dist/bundled/chunks/ToolbarPopover-CXizdbQq.js +276 -0
- package/dist/bundled/chunks/ViewportsSection-D6mpKTSM.js +203 -0
- package/dist/bundled/chunks/VisualViewer-BQqfw1ov.js +888 -0
- package/dist/bundled/chunks/WorkbenchErrorState-D97EoY89.js +48 -0
- package/dist/bundled/chunks/WorkbenchGuideLink-COO1XNvp.js +26 -0
- package/dist/bundled/chunks/WorkbenchLoadingState-CLA8IBL6.js +50 -0
- package/dist/bundled/chunks/WorkbenchPaneHeader-DBuiBHTT.js +15 -0
- package/dist/bundled/chunks/WorkbenchPaneList-cOz9-XSR.js +13 -0
- package/dist/bundled/chunks/WorkbenchPaneToolbar-DEYUs_bD.js +12 -0
- package/dist/bundled/chunks/WorkbenchPanelAction-SLby10Vh.js +100 -0
- package/dist/bundled/chunks/WorkbenchVirtualList-HCZiNo7p.js +67 -0
- package/dist/bundled/chunks/agents-Cnoa7KRp.js +318 -0
- package/dist/bundled/chunks/agents-http-BjeGJFYE.js +27 -0
- package/dist/bundled/chunks/ai-threads-3QfVXZ43.js +402 -0
- package/dist/bundled/chunks/background-CUUIkZVL.js +76 -0
- package/dist/bundled/chunks/canvas-settings-Cw7AXzFG.js +119 -0
- package/dist/bundled/chunks/capture-DxD6llwl.js +20 -0
- package/dist/bundled/chunks/catalog-UvMhynPX.js +39 -0
- package/dist/bundled/chunks/catalog-target-BN1NsBKA.js +9 -0
- package/dist/bundled/chunks/color-scheme-zLURTKoT.js +97 -0
- package/dist/bundled/chunks/content-view-ChEpdsxh.js +15 -0
- package/dist/bundled/chunks/context-menu-Cw2xQKsM.js +121 -0
- package/dist/bundled/chunks/controls-DpdwHd4q.js +23264 -0
- package/dist/bundled/chunks/controls-view-CtDADD0e.js +358 -0
- package/dist/bundled/chunks/events-Dhp302xE.js +30 -0
- package/dist/bundled/chunks/explorer-view-B717fDtg.js +285 -0
- package/dist/bundled/chunks/extensions-BtOjYv3e.js +6283 -0
- package/dist/bundled/chunks/extensions-DY0LLiE_.js +42 -0
- package/dist/bundled/chunks/frame-ledger-C67dpCuY.js +3405 -0
- package/dist/bundled/chunks/frame-owner-Di8_BWb0.js +22 -0
- package/dist/bundled/chunks/frame-screenshot-IEmQR7TR.js +84 -0
- package/dist/bundled/chunks/http-json-B3BE0tJj.js +37 -0
- package/dist/bundled/chunks/icons-DoUVE4X3.js +128 -0
- package/dist/bundled/chunks/internal-BOzwU0KU.js +49 -0
- package/dist/bundled/chunks/keyboard-DWsKh2rn.js +93 -0
- package/dist/bundled/chunks/local-mount-CQ14I_16.js +199 -0
- package/dist/bundled/chunks/marketplace-BE5IMmf3.js +951 -0
- package/dist/bundled/chunks/matrix-BPPIGW-q.js +770 -0
- package/dist/bundled/chunks/mcp-CbWZxLuC.js +212 -0
- package/dist/bundled/chunks/measure-owner-BJxCiOYZ.js +36 -0
- package/dist/bundled/chunks/measurement-BPE7RMeb.js +237 -0
- package/dist/bundled/chunks/model-CIFxQfDH.js +744 -0
- package/dist/bundled/chunks/navigation-view-Co43QbrR.js +20 -0
- package/dist/bundled/chunks/ownership-BVQ3d672.js +48 -0
- package/dist/bundled/chunks/presets-config-CfdpjV2k.js +173 -0
- package/dist/bundled/chunks/project-config-Di_IAjjN.js +190 -0
- package/dist/bundled/chunks/purify.es-DhaLjfsW.js +2463 -0
- package/dist/bundled/chunks/rolldown-runtime-D8jQpDG7.js +12 -0
- package/dist/bundled/chunks/sandbox-shared-CwPQj187.js +1178 -0
- package/dist/bundled/chunks/screenshot-file-5sIH6A7o.js +22 -0
- package/dist/bundled/chunks/screenshot-targets-1TJFnTQJ.js +21 -0
- package/dist/bundled/chunks/selection-BTc1fRMu.js +35 -0
- package/dist/bundled/chunks/settings-B8QvkMcW.js +173 -0
- package/dist/bundled/chunks/settings-BbefKI5N.js +35 -0
- package/dist/bundled/chunks/shell-VHlsl1Wj.js +15 -0
- package/dist/bundled/chunks/shell-extensions-BRqMTtWV.js +29 -0
- package/dist/bundled/chunks/shell-registry-dTiCKXFh.js +66 -0
- package/dist/bundled/chunks/shortcuts-BPetXlYX.js +84 -0
- package/dist/bundled/chunks/src-CDZfcmuw.js +451 -0
- package/dist/bundled/chunks/status-C0sxyPzj.js +48 -0
- package/dist/bundled/chunks/tests-view-RYpujVD_.js +33 -0
- package/dist/bundled/chunks/ui-channel-BPYj8uw2.js +36 -0
- package/dist/bundled/chunks/use-install-plan-D0tiW2wu.js +184 -0
- package/dist/bundled/chunks/visual-nnXRPOP8.js +611 -0
- package/dist/bundled/chunks/workbench-plugin-id-BgjbPURy.js +7 -0
- package/dist/bundled/controls.js +1 -0
- package/dist/bundled/index.js +15557 -33
- package/dist/bundled/sandbox.js +1 -87
- package/dist/embed/EmbedDocument.vue.js +4 -0
- package/dist/embed/EmbedDocument.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/embed/_virtual/_plugin-vue_export-helper.js +7 -0
- package/dist/embed/_virtual/_rolldown/runtime.js +12 -0
- package/dist/embed/adapters/channels.d.ts +34 -0
- package/dist/embed/adapters/channels.js +105 -0
- package/dist/embed/adapters/content-surface.d.ts +1 -0
- package/dist/embed/adapters/content-surface.js +9 -0
- package/dist/embed/adapters/content-view.d.ts +6 -0
- package/dist/embed/adapters/content-view.js +16 -0
- package/dist/embed/adapters/controls-replica.d.ts +10 -0
- package/dist/embed/adapters/controls-replica.js +294 -0
- package/dist/embed/adapters/controls-view.d.ts +7 -0
- package/dist/embed/adapters/controls-view.js +69 -0
- package/dist/embed/adapters/controls.d.ts +1 -0
- package/dist/embed/adapters/controls.js +8 -0
- package/dist/embed/adapters/document.d.ts +24 -0
- package/dist/embed/adapters/document.js +48 -0
- package/dist/embed/adapters/explorer-session.d.ts +13 -0
- package/dist/embed/adapters/explorer-session.js +204 -0
- package/dist/embed/adapters/explorer-view.d.ts +9 -0
- package/dist/embed/adapters/explorer-view.js +84 -0
- package/dist/embed/adapters/explorer.d.ts +1 -0
- package/dist/embed/adapters/explorer.js +9 -0
- package/dist/embed/adapters/geometry.d.ts +1 -0
- package/dist/embed/adapters/geometry.js +1 -0
- package/dist/embed/adapters/layout.d.ts +14 -0
- package/dist/embed/adapters/layout.js +109 -0
- package/dist/embed/adapters/lazy-surface.d.ts +3 -0
- package/dist/embed/adapters/lazy-surface.js +52 -0
- package/dist/embed/adapters/local-mount.d.ts +3 -0
- package/dist/embed/adapters/local-mount.js +180 -0
- package/dist/embed/adapters/navigation-surface.d.ts +1 -0
- package/dist/embed/adapters/navigation-surface.js +14 -0
- package/dist/embed/adapters/navigation-view.d.ts +7 -0
- package/dist/embed/adapters/navigation-view.js +23 -0
- package/dist/embed/adapters/preview.d.ts +1 -0
- package/dist/embed/adapters/preview.js +5 -0
- package/dist/embed/adapters/runtime-frame.d.ts +14 -0
- package/dist/embed/adapters/runtime-frame.js +476 -0
- package/dist/embed/adapters/runtime-layout.d.ts +23 -0
- package/dist/embed/adapters/runtime-layout.js +44 -0
- package/dist/embed/adapters/runtime-loading.d.ts +30 -0
- package/dist/embed/adapters/runtime-loading.js +57 -0
- package/dist/embed/adapters/runtime-readiness.d.ts +14 -0
- package/dist/embed/adapters/runtime-readiness.js +53 -0
- package/dist/embed/adapters/runtime-requests.d.ts +12 -0
- package/dist/embed/adapters/runtime-requests.js +114 -0
- package/dist/embed/adapters/runtime-revision.d.ts +9 -0
- package/dist/embed/adapters/runtime-revision.js +29 -0
- package/dist/embed/adapters/sandbox-urls.d.ts +24 -0
- package/dist/embed/adapters/sandbox-urls.js +41 -0
- package/dist/embed/adapters/stale-preview.d.ts +14 -0
- package/dist/embed/adapters/stale-preview.js +56 -0
- package/dist/embed/adapters/state-presets.d.ts +28 -0
- package/dist/embed/adapters/state-presets.js +108 -0
- package/dist/embed/adapters/state.d.ts +11 -0
- package/dist/embed/adapters/state.js +29 -0
- package/dist/embed/adapters/test-workers.d.ts +30 -0
- package/dist/embed/adapters/test-workers.js +133 -0
- package/dist/embed/adapters/tests-surface.d.ts +1 -0
- package/dist/embed/adapters/tests-surface.js +9 -0
- package/dist/embed/adapters/tests-view.d.ts +7 -0
- package/dist/embed/adapters/tests-view.js +34 -0
- package/dist/embed/adapters/tests.d.ts +8 -0
- package/dist/embed/adapters/tests.js +21 -0
- package/dist/embed/app/standalone/presets.js +67 -0
- package/dist/embed/app.css +175 -0
- package/dist/embed/capabilities.d.ts +5 -0
- package/dist/embed/capabilities.js +23 -0
- package/dist/embed/color-scheme.d.ts +6 -0
- package/dist/embed/color-scheme.js +10 -0
- package/dist/embed/commands.d.ts +9 -0
- package/dist/embed/commands.js +118 -0
- package/dist/embed/descriptor.d.ts +7 -0
- package/dist/embed/descriptor.js +47 -0
- package/dist/embed/direct.d.ts +4 -0
- package/dist/embed/direct.js +55 -0
- package/dist/embed/document.css +11 -0
- package/dist/embed/fetch.d.ts +4 -0
- package/dist/embed/fetch.js +66 -0
- package/dist/embed/handshake.d.ts +7 -0
- package/dist/embed/handshake.js +174 -0
- package/dist/embed/index.d.ts +14 -0
- package/dist/embed/index.js +36 -0
- package/dist/embed/lifecycle.d.ts +7 -0
- package/dist/embed/lifecycle.js +32 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_commands@6.10.1/node_modules/@codemirror/commands/dist/index.js +1567 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js +28 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_language@6.12.1/node_modules/@codemirror/language/dist/index.js +1737 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_lint@6.9.2/node_modules/@codemirror/lint/dist/index.js +559 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_state@6.5.3/node_modules/@codemirror/state/dist/index.js +3351 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_theme-one-dark@6.1.3/node_modules/@codemirror/theme-one-dark/dist/index.js +119 -0
- package/dist/embed/node_modules/.pnpm/@codemirror_view@6.39.9/node_modules/@codemirror/view/dist/index.js +8856 -0
- package/dist/embed/node_modules/.pnpm/@lezer_common@1.5.0/node_modules/@lezer/common/dist/index.js +1521 -0
- package/dist/embed/node_modules/.pnpm/@lezer_highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js +874 -0
- package/dist/embed/node_modules/.pnpm/@lezer_json@1.0.3/node_modules/@lezer/json/dist/index.js +52 -0
- package/dist/embed/node_modules/.pnpm/@lezer_lr@1.4.7/node_modules/@lezer/lr/dist/index.js +1446 -0
- package/dist/embed/node_modules/.pnpm/@marijn_find-cluster-break@1.0.2/node_modules/@marijn/find-cluster-break/src/index.js +71 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_core@3.21.0/node_modules/@shikijs/core/dist/index.js +1775 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_engine-oniguruma@3.21.0/node_modules/@shikijs/engine-oniguruma/dist/index.js +387 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_engine-oniguruma@3.21.0/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +6 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/abap.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ada.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-expression.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-html.js +16 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-inline-style.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-inline-template.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-let-declaration.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-template-blocks.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-template.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/angular-ts.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/apache.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/apex.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/apl.js +16 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/applescript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ara.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/asciidoc.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/asm.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/astro.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/awk.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ballerina.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/bat.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/beancount.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/berry.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/bibtex.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/bicep.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/blade.js +20 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/bsl.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/c.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/c3.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cadence.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cairo.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/clarity.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/clojure.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cmake.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cobol.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/codeowners.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/codeql.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/coffee.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/common-lisp.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/coq.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cpp-macro.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cpp.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/crystal.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/csharp.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/css.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/csv.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cue.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/cypher.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/d.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/dart.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/dax.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/desktop.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/diff.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/docker.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/dotenv.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/dream-maker.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/edge.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/elixir.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/elm.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/erb.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/erlang.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/es-tag-css.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/es-tag-glsl.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/es-tag-html.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/es-tag-sql.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/es-tag-xml.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fennel.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fish.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fluent.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/fsharp.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gdresource.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gdscript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gdshader.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/genie.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gherkin.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/git-commit.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/git-rebase.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gleam.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/glimmer-js.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/glimmer-ts.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/glsl.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gn.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/gnuplot.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/go.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/graphql.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/groovy.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hack.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/haml.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/handlebars.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/haskell.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/haxe.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hcl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hjson.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hlsl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/html-derivative.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/html.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/http.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hurl.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hxml.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/hy.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/imba.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ini.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/java.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/javascript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jinja-html.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jinja.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jison.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/json.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/json5.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jsonc.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jsonl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jsonnet.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jssm.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/jsx.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/julia.js +16 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/kdl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/kotlin.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/kusto.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/latex.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/lean.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/less.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/liquid.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/llvm.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/log.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/logo.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/lua.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/luau.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/make.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/markdown.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/marko.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/matlab.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/mdc.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/mdx.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/mermaid.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/mipsasm.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/mojo.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/moonbit.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/move.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/narrat.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/nextflow.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/nginx.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/nim.js +20 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/nix.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/nushell.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/objective-c.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ocaml.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/openscad.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/pascal.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/perl.js +16 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/php.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/pkl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/plsql.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/po.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/polar.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/postcss.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/powerquery.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/powershell.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/prisma.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/prolog.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/proto.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/pug.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/puppet.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/purescript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/python.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/qml.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/qmldir.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/qss.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/r.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/racket.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/raku.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/razor.js +10 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/reg.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/regexp.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/rel.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/riscv.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/rosmsg.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/rst.js +22 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ruby.js +30 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/rust.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/sas.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/sass.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/scala.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/scheme.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/scss.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/sdbl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/shaderlab.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/shellscript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/shellsession.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/smalltalk.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/solidity.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/soy.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/sparql.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/splunk.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/sql.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ssh-config.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/stata.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/stylus.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/svelte.js +14 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/swift.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/system-verilog.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/systemd.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/talonscript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/tasl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/tcl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/templ.js +12 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/terraform.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/tex.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/toml.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/ts-tags.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/tsv.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/tsx.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/turtle.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/twig.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/typescript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/typespec.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/typst.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/v.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vala.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vb.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/verilog.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vhdl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/viml.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue-directives.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue-html.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue-vine.js +18 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vue.js +26 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/vyper.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wasm.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wenyan.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wgsl.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wikitext.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wit.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/wolfram.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/xml.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/xsl.js +5 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/yaml.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/zenscript.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_langs@3.21.0/node_modules/@shikijs/langs/dist/zig.js +2 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/andromeeda.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/aurora-x.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/ayu-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/catppuccin-latte.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/dark-plus.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/dracula-soft.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/dracula.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/everforest-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/everforest-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-dark-default.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-light-default.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/github-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/houston.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/kanagawa-wave.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/laserwave.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/light-plus.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/material-theme-darker.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/material-theme-lighter.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/material-theme-ocean.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/material-theme-palenight.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/material-theme.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/min-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/min-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/monokai.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/night-owl.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/nord.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/one-dark-pro.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/one-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/plastic.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/poimandres.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/red.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/rose-pine-moon.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/rose-pine.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/slack-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/slack-ochin.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/snazzy-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/solarized-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/solarized-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/synthwave-84.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/tokyo-night.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/vesper.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/vitesse-black.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/vitesse-dark.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_themes@3.21.0/node_modules/@shikijs/themes/dist/vitesse-light.js +3 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_types@3.21.0/node_modules/@shikijs/types/dist/index.js +8 -0
- package/dist/embed/node_modules/.pnpm/@shikijs_vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js +2320 -0
- package/dist/embed/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js +23 -0
- package/dist/embed/node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js +261 -0
- package/dist/embed/node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js +115 -0
- package/dist/embed/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js +16 -0
- package/dist/embed/node_modules/.pnpm/crelt@1.0.6/node_modules/crelt/index.js +23 -0
- package/dist/embed/node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.js +2463 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js +33 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js +23 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js +125 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js +50 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js +25 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js +23 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js +26 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js +238 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js +268 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js +39 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js +97 -0
- package/dist/embed/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js +42 -0
- package/dist/embed/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js +27 -0
- package/dist/embed/node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js +29 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js +25 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js +60 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/find.js +80 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js +315 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js +14 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/svg.js +561 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js +14 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js +13 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js +52 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js +48 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js +32 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js +25 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js +26 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js +23 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xlink.js +18 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xml.js +14 -0
- package/dist/embed/node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/xmlns.js +13 -0
- package/dist/embed/node_modules/.pnpm/shiki@3.21.0/node_modules/shiki/dist/bundle-full.js +13 -0
- package/dist/embed/node_modules/.pnpm/shiki@3.21.0/node_modules/shiki/dist/index.js +7 -0
- package/dist/embed/node_modules/.pnpm/shiki@3.21.0/node_modules/shiki/dist/langs.js +1248 -0
- package/dist/embed/node_modules/.pnpm/shiki@3.21.0/node_modules/shiki/dist/themes.js +365 -0
- package/dist/embed/node_modules/.pnpm/shiki@3.21.0/node_modules/shiki/dist/wasm.js +1 -0
- package/dist/embed/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js +13 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js +18 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js +77 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js +21 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js +40 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js +15 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js +15 -0
- package/dist/embed/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js +35 -0
- package/dist/embed/node_modules/.pnpm/style-mod@4.1.3/node_modules/style-mod/src/style-mod.js +92 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/DynamicScroller.vue_vue_type_script_setup_true_lang-yssX6Q5B.js +130 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/DynamicScrollerItem.vue_vue_type_script_setup_true_lang-qh6MY0wl.js +37 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi.js +202 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/composables/useDynamicScroller.js +705 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/composables/useDynamicScrollerItem.js +47 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/dynamicScrollerMeasurement-Cq5NQLJa.js +122 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/keyField-D6okV6nC.js +15 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/scroller.css_vue_type_style_index_0_src_true_lang--7gJ3zh_.js +100 -0
- package/dist/embed/node_modules/.pnpm/vue-virtual-scroller@3.0.5_vue@3.5.26_@typescript_typescript6@6.0.2_/node_modules/vue-virtual-scroller/dist/useRecycleScroller-D_RDrEg2.js +805 -0
- package/dist/embed/node_modules/.pnpm/w3c-keyname@2.2.8/node_modules/w3c-keyname/index.js +101 -0
- package/dist/embed/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js +105 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchEmptyState.vue.js +4 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchEmptyState.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchLoadingState.vue.js +4 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchLoadingState.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchStateLayout.vue.js +4 -0
- package/dist/embed/packages/histoire-app/src/app/components/shell/WorkbenchStateLayout.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/embed/packages/histoire-controls/src/components/BuiltinIcon.vue.js +6 -0
- package/dist/embed/packages/histoire-controls/src/components/BuiltinIcon.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/embed/packages/histoire-controls/src/components/HstPulsatingDisc.vue.js +6 -0
- package/dist/embed/packages/histoire-controls/src/components/HstPulsatingDisc.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/embed/packages/histoire-controls/src/components/HstWrapper.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/HstWrapper.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/embed/packages/histoire-controls/src/components/button/HstButton.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/button/HstButton.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/embed/packages/histoire-controls/src/components/button/HstButtonGroup.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/button/HstButtonGroup.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/embed/packages/histoire-controls/src/components/design-tokens/HstTokenGrid.vue.js +1 -0
- package/dist/embed/packages/histoire-controls/src/components/json/HstJson.vue.js +6 -0
- package/dist/embed/packages/histoire-controls/src/components/json/HstJson.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/embed/packages/histoire-controls/src/components/json/HstJsonEditor.vue.js +6 -0
- package/dist/embed/packages/histoire-controls/src/components/json/HstJsonEditor.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/embed/packages/histoire-controls/src/components/json/HstJsonEditorAsync.js +22 -0
- package/dist/embed/packages/histoire-controls/src/components/number/HstNumber.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/number/HstNumber.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/embed/packages/histoire-controls/src/components/select/CustomSelect.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/select/CustomSelect.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/embed/packages/histoire-controls/src/components/select/HstSelect.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/select/HstSelect.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/embed/packages/histoire-controls/src/components/slider/HstSlider.vue.js +1 -0
- package/dist/embed/packages/histoire-controls/src/components/switch/HstSwitch.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/switch/HstSwitch.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/embed/packages/histoire-controls/src/components/text/HstText.vue.js +4 -0
- package/dist/embed/packages/histoire-controls/src/components/text/HstText.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/embed/packages/histoire-controls/src/context.js +17 -0
- package/dist/embed/packages/histoire-controls/src/field.js +43 -0
- package/dist/embed/packages/histoire-controls/src/index.js +30 -0
- package/dist/embed/packages/histoire-controls/src/loading/LoadingDelayBoundary.js +13 -0
- package/dist/embed/packages/histoire-controls/src/loading/use-loading-delay.js +24 -0
- package/dist/embed/packages/histoire-controls/src/model.js +28 -0
- package/dist/embed/packages/histoire-controls/src/options.js +12 -0
- package/dist/embed/packages/histoire-controls/src/overlay/appearance.js +64 -0
- package/dist/embed/packages/histoire-controls/src/overlay/focus.js +81 -0
- package/dist/embed/packages/histoire-controls/src/overlay/tooltip.js +116 -0
- package/dist/embed/packages/histoire-controls/src/utils.js +15 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/GenericControls.js +40 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/HistoireControls.js +203 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/PresetMenu.js +267 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/PropControl.js +85 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/StateControl.js +34 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/StatePresets.js +127 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/edit.js +80 -0
- package/dist/embed/packages/histoire-vue/src/components/controls/editor.js +29 -0
- package/dist/embed/packages/histoire-vue/src/components/docs/HistoireDocs.js +149 -0
- package/dist/embed/packages/histoire-vue/src/components/docs/anchors.js +21 -0
- package/dist/embed/packages/histoire-vue/src/components/docs/content.js +12 -0
- package/dist/embed/packages/histoire-vue/src/components/docs/links.js +81 -0
- package/dist/embed/packages/histoire-vue/src/components/docs/sanitize.js +30 -0
- package/dist/embed/packages/histoire-vue/src/components/embed/EmbedPanels.js +64 -0
- package/dist/embed/packages/histoire-vue/src/components/embed/HistoireEmbed.js +99 -0
- package/dist/embed/packages/histoire-vue/src/components/embed/geometry.js +39 -0
- package/dist/embed/packages/histoire-vue/src/components/events/HistoireEvents.js +116 -0
- package/dist/embed/packages/histoire-vue/src/components/explorer/ExplorerNavigation.js +23 -0
- package/dist/embed/packages/histoire-vue/src/components/explorer/ExplorerPanels.js +121 -0
- package/dist/embed/packages/histoire-vue/src/components/explorer/ExplorerPreview.js +136 -0
- package/dist/embed/packages/histoire-vue/src/components/explorer/HistoireExplorer.js +58 -0
- package/dist/embed/packages/histoire-vue/src/components/explorer/panel-tabs.js +69 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/HistoireExtensionOutlet.js +48 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/HistoireExtensionView.js +76 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/panel-action.js +33 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/state-renderer.js +65 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/view-lifecycle.js +109 -0
- package/dist/embed/packages/histoire-vue/src/components/extensions/workbench-components.js +134 -0
- package/dist/embed/packages/histoire-vue/src/components/preview/HistoirePreview.js +5 -0
- package/dist/embed/packages/histoire-vue/src/components/preview/surface.js +130 -0
- package/dist/embed/packages/histoire-vue/src/components/search/HistoireSearch.js +106 -0
- package/dist/embed/packages/histoire-vue/src/components/source/HistoireSource.js +147 -0
- package/dist/embed/packages/histoire-vue/src/components/source/content.js +15 -0
- package/dist/embed/packages/histoire-vue/src/components/source/highlight.js +32 -0
- package/dist/embed/packages/histoire-vue/src/components/source/render.js +15 -0
- package/dist/embed/packages/histoire-vue/src/components/tests/HistoireTests.js +119 -0
- package/dist/embed/packages/histoire-vue/src/components/tests/TestsRunActions.js +186 -0
- package/dist/embed/packages/histoire-vue/src/components/tests/render.js +147 -0
- package/dist/embed/packages/histoire-vue/src/components/toolbar/HistoireToolbar.js +145 -0
- package/dist/embed/packages/histoire-vue/src/components/toolbar/ToolbarExtensions.js +89 -0
- package/dist/embed/packages/histoire-vue/src/components/toolbar/groups.js +25 -0
- package/dist/embed/packages/histoire-vue/src/components/tree/HistoireStoryTree.js +90 -0
- package/dist/embed/packages/histoire-vue/src/composables/snapshot.js +11 -0
- package/dist/embed/packages/histoire-vue/src/content/controller.js +66 -0
- package/dist/embed/packages/histoire-vue/src/foundation/VirtualList.js +156 -0
- package/dist/embed/packages/histoire-vue/src/foundation/floating.js +80 -0
- package/dist/embed/packages/histoire-vue/src/foundation/parts.js +18 -0
- package/dist/embed/packages/histoire-vue/src/overlays/OverlayHost.js +138 -0
- package/dist/embed/packages/histoire-vue/src/overlays/geometry.js +14 -0
- package/dist/embed/packages/histoire-vue/src/overlays/menu-bounds.js +46 -0
- package/dist/embed/packages/histoire-vue/src/provider/HistoireProvider.js +198 -0
- package/dist/embed/packages/histoire-vue/src/provider/context.js +17 -0
- package/dist/embed/packages/histoire-vue/src/provider/extensions.js +150 -0
- package/dist/embed/packages/histoire-vue/src/provider/panels.js +51 -0
- package/dist/embed/packages/histoire-vue/src/provider/plugin-shortcuts.js +75 -0
- package/dist/embed/packages/histoire-vue/src/provider/shortcuts.js +56 -0
- package/dist/embed/packages/histoire-vue/src/provider/theme.js +23 -0
- package/dist/embed/packages/histoire-vue/src/search/navigation.js +51 -0
- package/dist/embed/packages/histoire-vue/src/tests/collector.js +49 -0
- package/dist/embed/packages/histoire-vue/src/tests/controller.js +114 -0
- package/dist/embed/packages/histoire-vue/src/tests/model.js +29 -0
- package/dist/embed/search-match.d.ts +23 -0
- package/dist/embed/search-match.js +51 -0
- package/dist/embed/search.d.ts +5 -0
- package/dist/embed/search.js +54 -0
- package/dist/embed/source.d.ts +4 -0
- package/dist/embed/source.js +151 -0
- package/dist/embed/subscriptions.d.ts +10 -0
- package/dist/embed/subscriptions.js +49 -0
- package/dist/embed/surfaces.d.ts +44 -0
- package/dist/embed/surfaces.js +22 -0
- package/dist/embed/types.d.ts +24 -0
- package/dist/embed/view-session.d.ts +16 -0
- package/dist/embed/view-session.js +196 -0
- package/dist/fonts/SOURCES.txt +2 -0
- package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono.LICENSE +93 -0
- package/dist/fonts/manrope-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/manrope.LICENSE +93 -0
- package/dist/style.css +8195 -2836
- package/package.json +34 -14
- package/postcss-scope-wrapper.cjs +21 -22
- package/postcss.config.cjs +2 -4
- package/scripts/asset-path.mjs +8 -0
- package/scripts/copy.mjs +4 -5
- package/scripts/generate-fonts.mjs +42 -0
- package/scripts/generate-icons.mjs +28 -0
- package/scripts/module-file-name.mjs +8 -0
- package/scripts/watchAndCopy.mjs +8 -5
- package/src/app/App.vue +27 -167
- package/src/app/api.ts +8 -1
- package/src/app/components/agents/AgentLogo.vue +31 -0
- package/src/app/components/agents/PermissionPrompt.vue +74 -0
- package/src/app/components/base/BaseButton.vue +13 -23
- package/src/app/components/base/BaseChip.vue +21 -0
- package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
- package/src/app/components/base/overflow/BaseOverflowToolbar.vue +111 -0
- package/src/app/components/base/overflow/BaseOverflowToolbarItem.vue +36 -0
- package/src/app/components/base/overflow/context.ts +47 -0
- package/src/app/components/base/overflow/fit.ts +28 -0
- package/src/app/components/base/overflow/layout.ts +174 -0
- package/src/app/components/base/overflow/measurement.ts +70 -0
- package/src/app/components/base/overflow/presentation.ts +12 -0
- package/src/app/components/base/popover/BasePopover.vue +147 -0
- package/src/app/components/base/popover/PopoverDivider.vue +12 -0
- package/src/app/components/base/popover/PopoverError.vue +12 -0
- package/src/app/components/base/popover/PopoverMeta.vue +10 -0
- package/src/app/components/base/popover/PopoverRow.vue +19 -0
- package/src/app/components/base/popover/PopoverTitle.vue +16 -0
- package/src/app/components/base/popover/overlay.ts +21 -0
- package/src/app/components/base/popover/position.ts +54 -0
- package/src/app/components/base/popover/scope.ts +45 -0
- package/src/app/components/base/use-menu-keyboard.ts +61 -0
- package/src/app/components/canvas/AgentCursor.vue +66 -0
- package/src/app/components/canvas/CanvasFrame.vue +206 -0
- package/src/app/components/canvas/CanvasHeader.vue +35 -0
- package/src/app/components/canvas/CanvasHintBar.vue +16 -0
- package/src/app/components/canvas/CanvasHintButton.vue +18 -0
- package/src/app/components/canvas/CanvasHintItem.vue +16 -0
- package/src/app/components/canvas/CanvasHintKey.vue +10 -0
- package/src/app/components/canvas/CanvasLoadingIndicator.vue +9 -0
- package/src/app/components/canvas/CanvasMatrixPrimary.vue +147 -0
- package/src/app/components/canvas/CanvasMeasureHint.vue +57 -0
- package/src/app/components/canvas/CanvasReplicaPreview.vue +88 -0
- package/src/app/components/canvas/CanvasSingleVariant.vue +75 -0
- package/src/app/components/canvas/CanvasStatus.vue +53 -0
- package/src/app/components/canvas/CanvasViewport.vue +302 -0
- package/src/app/components/canvas/CollectErrorCard.vue +22 -0
- package/src/app/components/canvas/FrameGrid.vue +14 -0
- package/src/app/components/canvas/FrameList.vue +14 -0
- package/src/app/components/canvas/FramePaddingAligners.vue +44 -0
- package/src/app/components/canvas/MeasureBoxModel.vue +47 -0
- package/src/app/components/canvas/MeasureGuides.vue +30 -0
- package/src/app/components/canvas/MeasureOverlay.vue +252 -0
- package/src/app/components/canvas/SingleVariantResizeHandle.vue +11 -0
- package/src/app/components/canvas/SingleVariantResizeHandles.vue +134 -0
- package/src/app/components/canvas/active-tool.ts +9 -0
- package/src/app/components/canvas/agent-cursor.ts +57 -0
- package/src/app/components/canvas/canvas-extensions.ts +87 -0
- package/src/app/components/canvas/canvas-header-editor.ts +84 -0
- package/src/app/components/canvas/canvas-overlay-occlusion.ts +20 -0
- package/src/app/components/canvas/canvas-startup-activity.ts +46 -0
- package/src/app/components/canvas/content-measure.ts +92 -0
- package/src/app/components/canvas/content-sizes.ts +37 -0
- package/src/app/components/canvas/frame-activation.ts +49 -0
- package/src/app/components/canvas/frame-admission.ts +42 -0
- package/src/app/components/canvas/frame-badges.ts +74 -0
- package/src/app/components/canvas/frame-focus.ts +31 -0
- package/src/app/components/canvas/frame-interactions.ts +81 -0
- package/src/app/components/canvas/frame-layout.ts +179 -0
- package/src/app/components/canvas/frame-menu.ts +13 -0
- package/src/app/components/canvas/frame-props-override.ts +108 -0
- package/src/app/components/canvas/frame-registration.ts +12 -0
- package/src/app/components/canvas/frame-replica.ts +34 -0
- package/src/app/components/canvas/frame-requests.ts +8 -0
- package/src/app/components/canvas/frame-runtime.ts +100 -0
- package/src/app/components/canvas/frame-selection.ts +90 -0
- package/src/app/components/canvas/frame-source.ts +10 -0
- package/src/app/components/canvas/frame-startup-coordinator.ts +250 -0
- package/src/app/components/canvas/frame-startup-lifecycle.ts +197 -0
- package/src/app/components/canvas/frame-state.ts +92 -0
- package/src/app/components/canvas/frame-target.ts +21 -0
- package/src/app/components/canvas/frames/acquire-story-frame.ts +240 -0
- package/src/app/components/canvas/frames/frame-leases.ts +204 -0
- package/src/app/components/canvas/frames/frame-ledger.ts +79 -0
- package/src/app/components/canvas/frames/story-frame-session.ts +156 -0
- package/src/app/components/canvas/frames/viewport-frames.ts +49 -0
- package/src/app/components/canvas/matrix/MatrixAvailabilityState.vue +51 -0
- package/src/app/components/canvas/matrix/MatrixAxisBar.vue +32 -0
- package/src/app/components/canvas/matrix/MatrixAxisEntry.vue +85 -0
- package/src/app/components/canvas/matrix/MatrixAxisForm.vue +16 -0
- package/src/app/components/canvas/matrix/MatrixAxisFormActions.vue +12 -0
- package/src/app/components/canvas/matrix/MatrixBaseProp.vue +59 -0
- package/src/app/components/canvas/matrix/MatrixCell.vue +113 -0
- package/src/app/components/canvas/matrix/MatrixCustomAxes.vue +71 -0
- package/src/app/components/canvas/matrix/MatrixCustomValues.vue +52 -0
- package/src/app/components/canvas/matrix/MatrixInspector.vue +124 -0
- package/src/app/components/canvas/matrix/MatrixNumericValues.vue +95 -0
- package/src/app/components/canvas/matrix/MatrixView.vue +125 -0
- package/src/app/components/canvas/matrix/MatrixVisualActions.vue +52 -0
- package/src/app/components/canvas/matrix/matrix-layout.ts +81 -0
- package/src/app/components/canvas/matrix/matrix-registration.ts +42 -0
- package/src/app/components/canvas/matrix/matrix-selection.ts +18 -0
- package/src/app/components/canvas/measure-controller.ts +205 -0
- package/src/app/components/canvas/measure-geometry.ts +158 -0
- package/src/app/components/canvas/measure-labels.ts +130 -0
- package/src/app/components/canvas/measure-owner.ts +31 -0
- package/src/app/components/canvas/overlays/CanvasPluginLayers.vue +22 -0
- package/src/app/components/canvas/overlays/FrameLayer.vue +28 -0
- package/src/app/components/canvas/overlays/OverlayItem.vue +26 -0
- package/src/app/components/canvas/overlays/OverlayLayer.vue +32 -0
- package/src/app/components/canvas/overlays/frame-overlays.ts +83 -0
- package/src/app/components/canvas/pan/usePanZoom.ts +147 -0
- package/src/app/components/canvas/pan/usePointerPan.ts +99 -0
- package/src/app/components/canvas/pan/useSpacePan.ts +89 -0
- package/src/app/components/canvas/sandbox-boot-gate.ts +63 -0
- package/src/app/components/canvas/single-resize.ts +194 -0
- package/src/app/components/canvas/single-viewport.ts +46 -0
- package/src/app/components/canvas/single-zoom.ts +10 -0
- package/src/app/components/canvas/snapshots/capture.ts +107 -0
- package/src/app/components/canvas/snapshots/document.ts +24 -0
- package/src/app/components/canvas/snapshots/store.ts +127 -0
- package/src/app/components/canvas/snapshots/useFrameSnapshot.ts +98 -0
- package/src/app/components/canvas/story-frame-size.ts +15 -0
- package/src/app/components/canvas/story-view-binding.ts +187 -0
- package/src/app/components/canvas/toolbar/ArrangeSwitch.vue +25 -0
- package/src/app/components/canvas/toolbar/BackgroundPicker.vue +77 -0
- package/src/app/components/canvas/toolbar/CanvasToolbar.vue +157 -0
- package/src/app/components/canvas/toolbar/PluginToolbarItem.vue +74 -0
- package/src/app/components/canvas/toolbar/ScreenshotPopover.vue +195 -0
- package/src/app/components/canvas/toolbar/ScreenshotSetup.vue +193 -0
- package/src/app/components/canvas/toolbar/SearchMatchStepper.vue +27 -0
- package/src/app/components/canvas/toolbar/ToolSwitch.vue +38 -0
- package/src/app/components/canvas/toolbar/ToolbarButton.vue +52 -0
- package/src/app/components/canvas/toolbar/ToolbarPopover.vue +57 -0
- package/src/app/components/canvas/toolbar/ViewportMenu.vue +135 -0
- package/src/app/components/canvas/toolbar/ZoomMenu.vue +60 -0
- package/src/app/components/canvas/toolbar/bounds.ts +30 -0
- package/src/app/components/canvas/toolbar/session-settings.ts +16 -0
- package/src/app/components/canvas/toolbar/settings.ts +25 -0
- package/src/app/components/canvas/toolbar/shortcuts.ts +20 -0
- package/src/app/components/canvas/toolbar/use-screenshot-setup.ts +183 -0
- package/src/app/components/canvas/toolbar/viewport-size.ts +34 -0
- package/src/app/components/canvas/tools/PluginToolLayer.vue +50 -0
- package/src/app/components/canvas/tools/plugin-tool.ts +158 -0
- package/src/app/components/canvas/tools/plugin-tools.ts +134 -0
- package/src/app/components/canvas/useCanvasContentSizing.ts +69 -0
- package/src/app/components/canvas/useCanvasGeometry.ts +99 -0
- package/src/app/components/canvas/useCanvasHeaderOcclusion.ts +52 -0
- package/src/app/components/canvas/useCanvasPan.ts +46 -0
- package/src/app/components/canvas/useCanvasVariantSize.ts +40 -0
- package/src/app/components/canvas/useSingleVariantGeometry.ts +35 -0
- package/src/app/components/canvas/useSingleVariantPan.ts +78 -0
- package/src/app/components/canvas/useSingleVariantZoom.ts +58 -0
- package/src/app/components/canvas/viewport-events.ts +105 -0
- package/src/app/components/canvas/views/PluginCanvasView.vue +59 -0
- package/src/app/components/canvas/views/canvas-views.ts +119 -0
- package/src/app/components/canvas/views/view-input.ts +20 -0
- package/src/app/components/command/CommandPrompts.vue +31 -23
- package/src/app/components/command/PromptSelect.vue +27 -23
- package/src/app/components/command/PromptText.vue +10 -8
- package/src/app/components/comments/CommentComposer.vue +78 -0
- package/src/app/components/comments/CommentContext.vue +56 -0
- package/src/app/components/comments/CommentContextChip.vue +21 -0
- package/src/app/components/comments/CommentPin.vue +31 -0
- package/src/app/components/comments/CommentThread.vue +113 -0
- package/src/app/components/comments/CommentsCanvasOverlay.vue +172 -0
- package/src/app/components/comments/capture.ts +45 -0
- package/src/app/components/comments/destination.ts +45 -0
- package/src/app/components/comments/dismiss-outside.ts +44 -0
- package/src/app/components/comments/frame-geometry.ts +28 -0
- package/src/app/components/comments/pick.ts +83 -0
- package/src/app/components/comments/presentation.ts +85 -0
- package/src/app/components/comments/prompt/AgentPrompt.vue +188 -0
- package/src/app/components/comments/prompt/AttachMenuPanel.vue +67 -0
- package/src/app/components/comments/prompt/AttachmentStrip.vue +54 -0
- package/src/app/components/comments/prompt/AttachmentTile.vue +41 -0
- package/src/app/components/comments/prompt/AttachmentViewer.vue +37 -0
- package/src/app/components/comments/prompt/ContextChip.vue +28 -0
- package/src/app/components/comments/prompt/PromptAttachMenu.vue +52 -0
- package/src/app/components/comments/prompt/PromptMenu.vue +51 -0
- package/src/app/components/comments/prompt/PromptSuggestions.vue +33 -0
- package/src/app/components/comments/prompt/SessionPicker.vue +49 -0
- package/src/app/components/comments/prompt/SessionPopover.vue +21 -0
- package/src/app/components/comments/prompt/SessionRadioList.vue +30 -0
- package/src/app/components/comments/prompt/SessionSettings.vue +71 -0
- package/src/app/components/comments/prompt/actions.ts +85 -0
- package/src/app/components/comments/prompt/attachment-meta.ts +28 -0
- package/src/app/components/comments/prompt/attachments.ts +121 -0
- package/src/app/components/comments/prompt/autogrow.ts +20 -0
- package/src/app/components/comments/prompt/menu-trigger.ts +28 -0
- package/src/app/components/comments/prompt/plan-follow-up.ts +23 -0
- package/src/app/components/comments/prompt/session-labels.ts +36 -0
- package/src/app/components/comments/prompt/suggestions.ts +140 -0
- package/src/app/components/comments/reply-draft.ts +42 -0
- package/src/app/components/comments/thread/AgentActivityPhase.vue +46 -0
- package/src/app/components/comments/thread/AgentDisclosure.vue +12 -0
- package/src/app/components/comments/thread/AgentLiveTail.vue +54 -0
- package/src/app/components/comments/thread/AgentMarkdown.vue +32 -0
- package/src/app/components/comments/thread/AgentPlan.vue +39 -0
- package/src/app/components/comments/thread/AgentPlanDecision.vue +29 -0
- package/src/app/components/comments/thread/ThreadMessage.vue +70 -0
- package/src/app/components/comments/thread/activity-phases.ts +105 -0
- package/src/app/components/comments/thread/markdown.ts +32 -0
- package/src/app/components/comments/thread/questions/AgentElicitation.vue +34 -0
- package/src/app/components/comments/thread/questions/AgentPendingInput.vue +67 -0
- package/src/app/components/comments/thread/questions/AgentPlanApproval.vue +36 -0
- package/src/app/components/comments/thread/questions/ElicitationField.vue +74 -0
- package/src/app/components/comments/thread/questions/ElicitationForm.vue +54 -0
- package/src/app/components/comments/thread/questions/ElicitationLink.vue +64 -0
- package/src/app/components/comments/thread/questions/ElicitationOptions.vue +101 -0
- package/src/app/components/comments/thread/questions/QuestionActions.vue +12 -0
- package/src/app/components/comments/thread/questions/QuestionInput.vue +3 -0
- package/src/app/components/comments/thread/questions/QuestionOption.vue +13 -0
- package/src/app/components/comments/thread/questions/QuestionOptionLabel.vue +12 -0
- package/src/app/components/comments/thread/questions/elicitation-fields.ts +66 -0
- package/src/app/components/comments/thread/questions/use-expiry-countdown.ts +31 -0
- package/src/app/components/comments/thread/stick-to-bottom.ts +43 -0
- package/src/app/components/embed/EmbedDialog.vue +204 -0
- package/src/app/components/embed/EmbedMenu.vue +38 -0
- package/src/app/components/embed/actions.ts +21 -0
- package/src/app/components/embed/controller.ts +74 -0
- package/src/app/components/embed/snippets.ts +124 -0
- package/src/app/components/extensions/ExtensionOutlet.vue +58 -0
- package/src/app/components/extensions/ExtensionView.vue +79 -0
- package/src/app/components/extensions/workbench-components.ts +23 -0
- package/src/app/components/inspector/DocsTab.vue +20 -0
- package/src/app/components/inspector/EventsBadge.vue +9 -0
- package/src/app/components/inspector/EventsTab.vue +29 -0
- package/src/app/components/inspector/InspectorExtensionOutlet.vue +31 -0
- package/src/app/components/inspector/InspectorGuideLink.vue +21 -0
- package/src/app/components/inspector/InspectorHeader.vue +36 -0
- package/src/app/components/inspector/InspectorTabs.vue +103 -0
- package/src/app/components/inspector/PropsTab.vue +33 -0
- package/src/app/components/inspector/SourceAction.vue +14 -0
- package/src/app/components/inspector/SourceDrawer.vue +188 -0
- package/src/app/components/inspector/StoryInspector.vue +149 -0
- package/src/app/components/inspector/TestsBadge.vue +14 -0
- package/src/app/components/inspector/TestsTab.vue +29 -0
- package/src/app/components/inspector/builtins.ts +36 -0
- package/src/app/components/inspector/inspection/InspectionAccessibility.vue +56 -0
- package/src/app/components/inspector/inspection/InspectionComponents.vue +48 -0
- package/src/app/components/inspector/inspection/InspectionPanel.vue +107 -0
- package/src/app/components/inspector/inspection/frame-owner.ts +13 -0
- package/src/app/components/inspector/inspection/picker.ts +80 -0
- package/src/app/components/inspector/inspection/plugin.ts +111 -0
- package/src/app/components/inspector/inspection/use-inspection.ts +227 -0
- package/src/app/components/inspector/model.ts +79 -0
- package/src/app/components/inspector/plugin-tabs.ts +78 -0
- package/src/app/components/inspector/state.ts +131 -0
- package/src/app/components/inspector/tab-overflow.ts +127 -0
- package/src/app/components/lists/WorkbenchVirtualList.vue +41 -0
- package/src/app/components/marketplace/browse/CatalogState.vue +32 -0
- package/src/app/components/marketplace/browse/CollectionRow.vue +36 -0
- package/src/app/components/marketplace/browse/DiscoverHero.vue +43 -0
- package/src/app/components/marketplace/browse/FacetPanel.vue +73 -0
- package/src/app/components/marketplace/browse/MarketplaceAll.vue +46 -0
- package/src/app/components/marketplace/browse/MarketplaceDiscover.vue +53 -0
- package/src/app/components/marketplace/browse/MatchText.vue +28 -0
- package/src/app/components/marketplace/browse/NoResults.vue +63 -0
- package/src/app/components/marketplace/browse/PluginCard.vue +61 -0
- package/src/app/components/marketplace/browse/PluginInstallAction.vue +22 -0
- package/src/app/components/marketplace/browse/ResultsBar.vue +38 -0
- package/src/app/components/marketplace/browse/catalog-client.ts +52 -0
- package/src/app/components/marketplace/browse/catalog-collections.ts +37 -0
- package/src/app/components/marketplace/browse/labels.ts +11 -0
- package/src/app/components/marketplace/browse/plugin-actions.ts +7 -0
- package/src/app/components/marketplace/browse/use-catalog-filters.ts +50 -0
- package/src/app/components/marketplace/browse/use-catalog-query.ts +67 -0
- package/src/app/components/marketplace/detail/ChangelogTab.vue +31 -0
- package/src/app/components/marketplace/detail/DetailHeader.vue +91 -0
- package/src/app/components/marketplace/detail/MarketplaceDetail.vue +83 -0
- package/src/app/components/marketplace/detail/MetaList.vue +76 -0
- package/src/app/components/marketplace/detail/OptionsTab.vue +48 -0
- package/src/app/components/marketplace/detail/OverviewTab.vue +31 -0
- package/src/app/components/marketplace/detail/VersionsTab.vue +24 -0
- package/src/app/components/marketplace/detail/use-plugin-detail.ts +48 -0
- package/src/app/components/marketplace/install/CommandBlock.vue +15 -0
- package/src/app/components/marketplace/install/ConfigDiff.vue +23 -0
- package/src/app/components/marketplace/install/FailureStep.vue +59 -0
- package/src/app/components/marketplace/install/InstallFooter.vue +17 -0
- package/src/app/components/marketplace/install/ManualStep.vue +87 -0
- package/src/app/components/marketplace/install/MarketplaceInstall.vue +121 -0
- package/src/app/components/marketplace/install/OptionField.vue +46 -0
- package/src/app/components/marketplace/install/OptionsStep.vue +43 -0
- package/src/app/components/marketplace/install/OutputLog.vue +22 -0
- package/src/app/components/marketplace/install/ProgressStep.vue +60 -0
- package/src/app/components/marketplace/install/ReviewStep.vue +75 -0
- package/src/app/components/marketplace/install/WizardSteps.vue +27 -0
- package/src/app/components/marketplace/install/manual-instructions.ts +18 -0
- package/src/app/components/marketplace/install/use-copy.ts +15 -0
- package/src/app/components/marketplace/install/use-install-plan.ts +59 -0
- package/src/app/components/marketplace/install/use-install-wizard.ts +166 -0
- package/src/app/components/marketplace/shell/MarketplaceHeader.vue +46 -0
- package/src/app/components/marketplace/shell/MarketplaceModal.vue +52 -0
- package/src/app/components/marketplace/shell/MarketplaceView.vue +16 -0
- package/src/app/components/marketplace/shell/PluginTile.vue +44 -0
- package/src/app/components/marketplace/shell/compatibility-reason.ts +4 -0
- package/src/app/components/marketplace/shell/job-progress-label.ts +22 -0
- package/src/app/components/marketplace/shell/marketplace-jobs.ts +115 -0
- package/src/app/components/marketplace/shell/marketplace-prefs.ts +18 -0
- package/src/app/components/marketplace/shell/marketplace-reads.ts +16 -0
- package/src/app/components/marketplace/shell/marketplace-services.ts +17 -0
- package/src/app/components/marketplace/shell/use-marketplace-keys.ts +34 -0
- package/src/app/components/marketplace/shell/workbench-plugin-id.ts +5 -0
- package/src/app/components/marketplace/spotlight/MarketplaceSpotlightHost.vue +10 -0
- package/src/app/components/marketplace/spotlight/SpotlightCard.vue +95 -0
- package/src/app/components/marketplace/spotlight/use-post-install-spotlight.ts +173 -0
- package/src/app/components/marketplace/spotlight/use-spotlight-targets.ts +80 -0
- package/src/app/components/marketplace/update/MarketplaceUpdateBody.vue +98 -0
- package/src/app/components/marketplace/update/MarketplaceUpdateDialog.vue +40 -0
- package/src/app/components/marketplace/update/ReleaseNotes.vue +27 -0
- package/src/app/components/marketplace/update/use-update-dialog.ts +118 -0
- package/src/app/components/menu/ContextMenu.vue +118 -0
- package/src/app/components/menu/MenuItem.vue +12 -0
- package/src/app/components/menu/SubMenu.vue +48 -0
- package/src/app/components/misc/HatchedPattern.vue +1 -11
- package/src/app/components/pages/home/BrowseSections.vue +39 -0
- package/src/app/components/pages/home/DevBrowseStatus.vue +25 -0
- package/src/app/components/pages/home/GuidesList.vue +31 -0
- package/src/app/components/pages/home/HomeCard.vue +12 -0
- package/src/app/components/pages/home/HomeHeader.vue +30 -0
- package/src/app/components/pages/home/HomeHeading.vue +12 -0
- package/src/app/components/pages/home/HomePage.vue +102 -0
- package/src/app/components/pages/home/HomeRow.vue +18 -0
- package/src/app/components/pages/home/HomeSearch.vue +22 -0
- package/src/app/components/pages/home/NeedsAttention.vue +47 -0
- package/src/app/components/pages/home/PluginHomeSections.vue +44 -0
- package/src/app/components/pages/home/UpdatesList.vue +46 -0
- package/src/app/components/pages/home/catalog.spec.ts +53 -0
- package/src/app/components/pages/home/catalog.ts +59 -0
- package/src/app/components/pages/home/ownership.spec.ts +14 -0
- package/src/app/components/pages/home/ownership.ts +48 -0
- package/src/app/components/pages/markdown/MarkdownOutline.vue +26 -0
- package/src/app/components/pages/markdown/MarkdownPage.vue +141 -0
- package/src/app/components/pages/markdown/MarkdownPager.vue +30 -0
- package/src/app/components/pages/markdown/navigation.spec.ts +18 -0
- package/src/app/components/pages/markdown/navigation.ts +9 -0
- package/src/app/components/pages/markdown/outline-dom.spec.ts +28 -0
- package/src/app/components/pages/markdown/outline-dom.ts +37 -0
- package/src/app/components/pages/markdown/outline.ts +36 -0
- package/src/app/components/pages/settings/AboutSection.vue +27 -0
- package/src/app/components/pages/settings/AgentAdvancedSettings.vue +135 -0
- package/src/app/components/pages/settings/AgentArgumentsField.vue +49 -0
- package/src/app/components/pages/settings/AgentEnvironmentField.vue +67 -0
- package/src/app/components/pages/settings/AgentLaunchField.vue +19 -0
- package/src/app/components/pages/settings/AgentModelSettings.vue +51 -0
- package/src/app/components/pages/settings/AgentPresetRow.vue +79 -0
- package/src/app/components/pages/settings/AgentsSection.vue +149 -0
- package/src/app/components/pages/settings/AppearanceSection.vue +60 -0
- package/src/app/components/pages/settings/BackgroundsSection.vue +96 -0
- package/src/app/components/pages/settings/GeneralSection.vue +33 -0
- package/src/app/components/pages/settings/McpSection.vue +48 -0
- package/src/app/components/pages/settings/PluginsSection.vue +109 -0
- package/src/app/components/pages/settings/ProjectSourceBadge.vue +32 -0
- package/src/app/components/pages/settings/SaveToProject.vue +71 -0
- package/src/app/components/pages/settings/SettingsCard.vue +12 -0
- package/src/app/components/pages/settings/SettingsChoices.vue +7 -0
- package/src/app/components/pages/settings/SettingsNav.vue +35 -0
- package/src/app/components/pages/settings/SettingsPage.vue +59 -0
- package/src/app/components/pages/settings/SettingsRow.vue +20 -0
- package/src/app/components/pages/settings/ShortcutsSection.vue +28 -0
- package/src/app/components/pages/settings/TestsSection.vue +20 -0
- package/src/app/components/pages/settings/ViewportsSection.vue +76 -0
- package/src/app/components/pages/settings/plugins/InstalledPluginRow.vue +90 -0
- package/src/app/components/pages/settings/plugins/MarketplacePrefs.vue +37 -0
- package/src/app/components/pages/settings/plugins/PluginActionsMenu.vue +79 -0
- package/src/app/components/pages/settings/plugins/PluginSettingsCard.vue +23 -0
- package/src/app/components/pages/settings/plugins/builtin-logos.ts +15 -0
- package/src/app/components/pages/settings/plugins/types.ts +4 -0
- package/src/app/components/pages/settings/plugins/use-package-manager.ts +26 -0
- package/src/app/components/pages/settings/plugins/use-plugin-updates.ts +85 -0
- package/src/app/components/pages/settings/plugins/use-settings-jobs.ts +124 -0
- package/src/app/components/pages/settings/project-config-preview.ts +27 -0
- package/src/app/components/pages/settings/usePluginToggles.ts +111 -0
- package/src/app/components/panes/ai/AiCreatedStories.vue +27 -0
- package/src/app/components/panes/ai/AiPanel.vue +102 -0
- package/src/app/components/panes/ai/AiThreadComposer.vue +71 -0
- package/src/app/components/panes/ai/AiThreadHeader.vue +28 -0
- package/src/app/components/panes/ai/AiThreadList.vue +78 -0
- package/src/app/components/panes/ai/AiThreadView.vue +102 -0
- package/src/app/components/panes/ai/created-stories.ts +33 -0
- package/src/app/components/panes/mcp/McpActivity.vue +57 -0
- package/src/app/components/panes/mcp/McpClients.vue +38 -0
- package/src/app/components/panes/mcp/McpContent.vue +49 -0
- package/src/app/components/panes/mcp/McpCurrentOperation.vue +36 -0
- package/src/app/components/panes/mcp/McpEndpoint.vue +51 -0
- package/src/app/components/panes/mcp/McpHistory.vue +39 -0
- package/src/app/components/panes/search/SearchPanel.vue +288 -0
- package/src/app/components/panes/search/SearchResultItem.vue +65 -0
- package/src/app/components/panes/search/SearchResultList.vue +36 -0
- package/src/app/components/panes/search/SearchScopes.vue +21 -0
- package/src/app/components/panes/search/accessibility.ts +14 -0
- package/src/app/components/panes/search/command-execution.ts +42 -0
- package/src/app/components/panes/search/controller.ts +145 -0
- package/src/app/components/panes/search/frame-navigation.ts +61 -0
- package/src/app/components/panes/search/query.ts +114 -0
- package/src/app/components/panes/stories/StoriesPanel.vue +299 -0
- package/src/app/components/panes/stories/row-status.ts +49 -0
- package/src/app/components/panes/stories/tree.spec.ts +79 -0
- package/src/app/components/panes/stories/tree.ts +77 -0
- package/src/app/components/panes/tests/FunctionalTestsPanel.vue +98 -0
- package/src/app/components/panes/tests/TestsFilter.vue +15 -0
- package/src/app/components/panes/tests/TestsPanel.vue +18 -0
- package/src/app/components/panes/tests/TestsSummary.vue +34 -0
- package/src/app/components/panes/tests/TestsTree.vue +122 -0
- package/src/app/components/panes/tests/TestsTreeRow.vue +45 -0
- package/src/app/components/panes/tests/capture.ts +22 -0
- package/src/app/components/panes/tests/dev-runner.ts +48 -0
- package/src/app/components/panes/tests/discovery.ts +201 -0
- package/src/app/components/panes/tests/execution.ts +69 -0
- package/src/app/components/panes/tests/model.ts +305 -0
- package/src/app/components/panes/tests/projection.ts +86 -0
- package/src/app/components/panes/tests/types.ts +96 -0
- package/src/app/components/panes/visual/VisualImageLabel.vue +16 -0
- package/src/app/components/panes/visual/VisualResultRow.vue +43 -0
- package/src/app/components/panes/visual/VisualResultsList.vue +43 -0
- package/src/app/components/panes/visual/VisualRunButton.vue +25 -0
- package/src/app/components/panes/visual/VisualSlider.vue +91 -0
- package/src/app/components/panes/visual/VisualTestsPanel.vue +112 -0
- package/src/app/components/panes/visual/VisualTestsSummary.vue +37 -0
- package/src/app/components/panes/visual/VisualViewer.vue +215 -0
- package/src/app/components/panes/visual/VisualViewerActions.vue +41 -0
- package/src/app/components/panes/visual/VisualViewerDock.vue +75 -0
- package/src/app/components/panes/visual/VisualViewerDockButton.vue +15 -0
- package/src/app/components/panes/visual/VisualViewerHeader.vue +86 -0
- package/src/app/components/panes/visual/VisualViewerSurface.vue +19 -0
- package/src/app/components/panes/visual/projection.ts +62 -0
- package/src/app/components/panes/visual/status.ts +21 -0
- package/src/app/components/panes/visual/viewer-focus.ts +24 -0
- package/src/app/components/panes/visual/viewer-types.ts +5 -0
- package/src/app/components/panes/visual/zoom.spec.ts +21 -0
- package/src/app/components/panes/visual/zoom.ts +30 -0
- package/src/app/components/shell/AppRail.vue +135 -0
- package/src/app/components/shell/InspectorFrame.vue +31 -0
- package/src/app/components/shell/PanelResizeHandle.vue +35 -0
- package/src/app/components/shell/PluginPane.vue +22 -0
- package/src/app/components/shell/RailButton.vue +45 -0
- package/src/app/components/shell/ShellLayout.vue +104 -0
- package/src/app/components/shell/SidePanelHost.vue +24 -0
- package/src/app/components/shell/WorkbenchApp.vue +174 -0
- package/src/app/components/shell/WorkbenchEmptyState.vue +39 -0
- package/src/app/components/shell/WorkbenchErrorState.vue +37 -0
- package/src/app/components/shell/WorkbenchGuideLink.vue +16 -0
- package/src/app/components/shell/WorkbenchLoadingSkeleton.vue +22 -0
- package/src/app/components/shell/WorkbenchLoadingState.vue +34 -0
- package/src/app/components/shell/WorkbenchPaneHeader.vue +19 -0
- package/src/app/components/shell/WorkbenchPaneList.vue +12 -0
- package/src/app/components/shell/WorkbenchPaneToolbar.vue +17 -0
- package/src/app/components/shell/WorkbenchPanelAction.vue +56 -0
- package/src/app/components/shell/WorkbenchStateLayout.vue +36 -0
- package/src/app/components/shell/panel-focus.ts +35 -0
- package/src/app/components/shell/panel-resize.ts +83 -0
- package/src/app/components/shell/rail-items.ts +63 -0
- package/src/app/components/shell/shortcuts.ts +8 -0
- package/src/app/components/story/GenericMountStory.vue +17 -3
- package/src/app/components/story/GenericRenderStory.vue +21 -2
- package/src/app/composables/agent-discovery.ts +25 -0
- package/src/app/composables/canvas-settings.ts +141 -0
- package/src/app/composables/context-menu.ts +156 -0
- package/src/app/composables/controls-host.ts +100 -0
- package/src/app/composables/extensions.ts +50 -0
- package/src/app/composables/keyboard-input.ts +11 -0
- package/src/app/composables/list-density.ts +14 -0
- package/src/app/composables/selection.ts +25 -0
- package/src/app/composables/shell-extensions.ts +40 -0
- package/src/app/composables/shell.ts +18 -0
- package/src/app/extensions/action-surfaces.ts +43 -0
- package/src/app/extensions/canvas-service.ts +208 -0
- package/src/app/extensions/commands.ts +26 -0
- package/src/app/extensions/context.ts +9 -0
- package/src/app/extensions/create-workbench-host.ts +137 -0
- package/src/app/extensions/dev-events.ts +31 -0
- package/src/app/extensions/frame-channels.ts +188 -0
- package/src/app/extensions/frame-context.ts +209 -0
- package/src/app/extensions/icons.ts +28 -0
- package/src/app/extensions/menus.ts +138 -0
- package/src/app/extensions/navigation.ts +144 -0
- package/src/app/extensions/plugins.ts +7 -0
- package/src/app/extensions/shell-registry.ts +87 -0
- package/src/app/extensions/shortcuts.ts +54 -0
- package/src/app/extensions/standalone.ts +50 -0
- package/src/app/extensions/storage.ts +47 -0
- package/src/app/extensions/sync.ts +57 -0
- package/src/app/extensions/tests-service.ts +63 -0
- package/src/app/extensions/toolbar.ts +79 -0
- package/src/app/index.ts +10 -30
- package/src/app/plugin.ts +37 -48
- package/src/app/sandbox.ts +19 -101
- package/src/app/standalone/arrangement.ts +49 -0
- package/src/app/standalone/build-info.ts +10 -0
- package/src/app/standalone/client-actions.ts +58 -0
- package/src/app/standalone/commands.ts +115 -0
- package/src/app/standalone/document.ts +30 -0
- package/src/app/standalone/editable-state.ts +79 -0
- package/src/app/standalone/error-handler.ts +15 -0
- package/src/app/standalone/folders.ts +62 -0
- package/src/app/standalone/markdown-transition.ts +46 -0
- package/src/app/standalone/mount.ts +123 -0
- package/src/app/standalone/navigation.ts +116 -0
- package/src/app/standalone/preferences.ts +36 -0
- package/src/app/standalone/presets.ts +70 -0
- package/src/app/standalone/runtime-binding.ts +57 -0
- package/src/app/standalone/runtime-tests.ts +46 -0
- package/src/app/standalone/selection.ts +76 -0
- package/src/app/standalone/session.ts +32 -0
- package/src/app/standalone/tests.ts +14 -0
- package/src/app/standalone/ui-visibility-menu.ts +27 -0
- package/src/app/standalone/ui-visibility.ts +72 -0
- package/src/app/standalone/workbench-dev.ts +208 -0
- package/src/app/standalone/workbench-navigation.ts +48 -0
- package/src/app/standalone/workbench-stores.ts +54 -0
- package/src/app/standalone/workbench-thread-actions.ts +46 -0
- package/src/app/standalone/workbench-types.ts +39 -0
- package/src/app/standalone/workbench-visual.ts +74 -0
- package/src/app/standalone/workbench.ts +301 -0
- package/src/app/stores/agent-threads.ts +170 -0
- package/src/app/stores/agents-catalog.ts +100 -0
- package/src/app/stores/agents.ts +201 -0
- package/src/app/stores/ai-threads.ts +151 -0
- package/src/app/stores/canvas-arrangement.ts +44 -0
- package/src/app/stores/canvas-preferences.ts +77 -0
- package/src/app/stores/canvas-types.ts +54 -0
- package/src/app/stores/canvas.ts +300 -0
- package/src/app/stores/events.ts +12 -8
- package/src/app/stores/marketplace.ts +229 -0
- package/src/app/stores/matrix-axis-editor.ts +43 -0
- package/src/app/stores/matrix-domains.ts +55 -0
- package/src/app/stores/matrix-preferences.ts +85 -0
- package/src/app/stores/matrix-runtime.ts +106 -0
- package/src/app/stores/matrix.ts +267 -0
- package/src/app/stores/mcp-activity.ts +70 -0
- package/src/app/stores/mcp.ts +170 -0
- package/src/app/stores/presets-config.ts +202 -0
- package/src/app/stores/project-config.ts +170 -0
- package/src/app/stores/project-save-persistence.ts +59 -0
- package/src/app/stores/settings.ts +139 -0
- package/src/app/stores/shell-widths.ts +51 -0
- package/src/app/stores/shell.ts +249 -0
- package/src/app/stores/story-canvas-views.ts +62 -0
- package/src/app/stores/thread-drafts.ts +128 -0
- package/src/app/stores/visual-approval.ts +73 -0
- package/src/app/stores/visual-collection.ts +76 -0
- package/src/app/stores/visual-refresh.ts +31 -0
- package/src/app/stores/visual-transport.ts +85 -0
- package/src/app/stores/visual.ts +293 -0
- package/src/app/style/README.md +167 -0
- package/src/app/style/controls.css +28 -0
- package/src/app/style/density.css +38 -0
- package/src/app/style/document.pcss +60 -0
- package/src/app/style/fonts.pcss +1 -0
- package/src/app/style/main.css +25 -0
- package/src/app/style/theme.css +117 -0
- package/src/app/style/tokens.pcss +135 -0
- package/src/app/types.ts +3 -9
- package/src/app/util/agent-catalog-rows.ts +31 -0
- package/src/app/util/agent-command.ts +9 -0
- package/src/app/util/agents-http.ts +25 -0
- package/src/app/util/agents-transport.ts +24 -0
- package/src/app/util/background.ts +63 -0
- package/src/app/util/builtin-commands.ts +27 -0
- package/src/app/util/catalog-target.ts +17 -0
- package/src/app/util/comments-http.ts +38 -0
- package/src/app/util/const.ts +29 -4
- package/src/app/util/controls-appearance.ts +2 -0
- package/src/app/util/controls-document.ts +26 -0
- package/src/app/util/controls-overlay-anchor.ts +14 -0
- package/src/app/util/dark.ts +45 -17
- package/src/app/util/dev-event-api.ts +236 -0
- package/src/app/util/docs.ts +13 -17
- package/src/app/util/dynamic-source.ts +20 -0
- package/src/app/util/event-payload.ts +30 -0
- package/src/app/util/events.ts +32 -17
- package/src/app/util/frame-actions.ts +204 -0
- package/src/app/util/frame-screenshot.ts +68 -0
- package/src/app/util/frame-variant-source.ts +111 -0
- package/src/app/util/host-channel.ts +148 -0
- package/src/app/util/hot.ts +5 -0
- package/src/app/util/http-json.ts +30 -0
- package/src/app/util/keyboard.ts +1 -82
- package/src/app/util/mapping.ts +26 -5
- package/src/app/util/marketplace-client.ts +180 -0
- package/src/app/util/marketplace-preferences.ts +6 -0
- package/src/app/util/matrix-numeric.ts +19 -0
- package/src/app/util/matrix-values.ts +72 -0
- package/src/app/util/matrix.ts +172 -0
- package/src/app/util/preview-settings.ts +4 -0
- package/src/app/util/runtime-events.ts +101 -0
- package/src/app/util/screenshot-file.ts +32 -0
- package/src/app/util/screenshot-targets.ts +14 -0
- package/src/app/util/shortcuts.ts +111 -0
- package/src/app/util/story-component.ts +51 -0
- package/src/app/util/ui-channel.ts +49 -0
- package/src/app/util/variant-selection.ts +43 -0
- package/src/app/util/vitest-mocker-shim.ts +27 -0
- package/src/bundle-embed-dev.js +6 -0
- package/src/bundle-embed.js +6 -0
- package/src/bundle-main-dev.js +1 -1
- package/src/bundle-main.js +2 -1
- package/src/bundle-sandbox-dev.js +3 -2
- package/src/bundle-sandbox.js +3 -2
- package/src/embed/EmbedDocument.vue +29 -0
- package/src/embed/adapters/channels.ts +113 -0
- package/src/embed/adapters/content-surface.ts +12 -0
- package/src/embed/adapters/content-view.ts +12 -0
- package/src/embed/adapters/controls-replica.ts +281 -0
- package/src/embed/adapters/controls-view.ts +56 -0
- package/src/embed/adapters/controls.ts +8 -0
- package/src/embed/adapters/document.ts +46 -0
- package/src/embed/adapters/explorer-session.ts +171 -0
- package/src/embed/adapters/explorer-view.ts +65 -0
- package/src/embed/adapters/explorer.ts +9 -0
- package/src/embed/adapters/geometry.ts +2 -0
- package/src/embed/adapters/layout.ts +92 -0
- package/src/embed/adapters/lazy-surface.ts +50 -0
- package/src/embed/adapters/local-mount.ts +137 -0
- package/src/embed/adapters/navigation-surface.ts +11 -0
- package/src/embed/adapters/navigation-view.ts +12 -0
- package/src/embed/adapters/preview.ts +5 -0
- package/src/embed/adapters/runtime-frame.ts +342 -0
- package/src/embed/adapters/runtime-layout.ts +58 -0
- package/src/embed/adapters/runtime-loading.ts +66 -0
- package/src/embed/adapters/runtime-readiness.ts +53 -0
- package/src/embed/adapters/runtime-requests.ts +58 -0
- package/src/embed/adapters/runtime-revision.ts +32 -0
- package/src/embed/adapters/sandbox-urls.ts +58 -0
- package/src/embed/adapters/stale-preview.ts +59 -0
- package/src/embed/adapters/state-presets.ts +134 -0
- package/src/embed/adapters/state.ts +24 -0
- package/src/embed/adapters/test-workers.ts +189 -0
- package/src/embed/adapters/tests-surface.ts +9 -0
- package/src/embed/adapters/tests-view.ts +34 -0
- package/src/embed/adapters/tests.ts +27 -0
- package/src/embed/capabilities.ts +12 -0
- package/src/embed/color-scheme.ts +8 -0
- package/src/embed/commands.ts +111 -0
- package/src/embed/descriptor.ts +43 -0
- package/src/embed/direct.ts +49 -0
- package/src/embed/document.css +11 -0
- package/src/embed/fetch.ts +61 -0
- package/src/embed/handshake.ts +142 -0
- package/src/embed/index.ts +36 -0
- package/src/embed/lifecycle.ts +37 -0
- package/src/embed/search-match.ts +50 -0
- package/src/embed/search.ts +33 -0
- package/src/embed/source.ts +129 -0
- package/src/embed/subscriptions.ts +38 -0
- package/src/embed/surfaces.ts +64 -0
- package/src/embed/types.ts +26 -0
- package/src/embed/view-session.ts +153 -0
- package/src/embed/virtual.d.ts +13 -0
- package/src/embed/vue.d.ts +6 -0
- package/src/virtual.d.ts +70 -0
- package/tsconfig.embed.json +11 -0
- package/tsconfig.json +10 -9
- package/tsconfig.workbench.json +12 -0
- package/vite.config.ts +48 -21
- package/vite.embed.config.ts +53 -0
- package/LICENSE +0 -21
- package/dist/app/style/floating.pcss +0 -34
- package/dist/app/style/main.pcss +0 -100
- package/dist/app/style/sandbox.css +0 -24
- package/dist/app/style/transitions.pcss +0 -51
- package/dist/bundled/App.vue.js +0 -5
- package/dist/bundled/App.vue2.js +0 -167
- package/dist/bundled/_virtual/_plugin-vue_export-helper.js +0 -10
- package/dist/bundled/assets/histoire-text-dark.svg.js +0 -4
- package/dist/bundled/assets/histoire-text.svg.js +0 -4
- package/dist/bundled/assets/histoire.svg.js +0 -4
- package/dist/bundled/components/HomeView.vue.js +0 -5
- package/dist/bundled/components/HomeView.vue2.js +0 -66
- package/dist/bundled/components/app/AppHeader.vue.js +0 -5
- package/dist/bundled/components/app/AppHeader.vue2.js +0 -71
- package/dist/bundled/components/app/AppLogo.vue.js +0 -5
- package/dist/bundled/components/app/AppLogo.vue2.js +0 -29
- package/dist/bundled/components/app/Breadcrumb.vue.js +0 -8
- package/dist/bundled/components/app/Breadcrumb.vue2.js +0 -91
- package/dist/bundled/components/app/HomeCounter.vue.js +0 -5
- package/dist/bundled/components/app/HomeCounter.vue2.js +0 -42
- package/dist/bundled/components/app/InitialLoading.vue.js +0 -5
- package/dist/bundled/components/app/InitialLoading.vue2.js +0 -51
- package/dist/bundled/components/app/MobileOverlay.vue.js +0 -5
- package/dist/bundled/components/app/MobileOverlay.vue2.js +0 -45
- package/dist/bundled/components/base/BaseButton.vue.js +0 -5
- package/dist/bundled/components/base/BaseButton.vue2.js +0 -39
- package/dist/bundled/components/base/BaseCheckbox.vue.js +0 -5
- package/dist/bundled/components/base/BaseCheckbox.vue2.js +0 -78
- package/dist/bundled/components/base/BaseEmpty.vue.js +0 -14
- package/dist/bundled/components/base/BaseIcon.vue.js +0 -8
- package/dist/bundled/components/base/BaseIcon.vue2.js +0 -29
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue.js +0 -5
- package/dist/bundled/components/base/BaseKeyboardShortcut.vue2.js +0 -20
- package/dist/bundled/components/base/BaseListItem.vue.js +0 -5
- package/dist/bundled/components/base/BaseListItem.vue2.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue.js +0 -33
- package/dist/bundled/components/base/BaseListItemLink.vue2.js +0 -26
- package/dist/bundled/components/base/BaseOverflowMenu.vue.js +0 -5
- package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +0 -100
- package/dist/bundled/components/base/BaseOverflowTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseOverflowTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseSelect.vue.js +0 -5
- package/dist/bundled/components/base/BaseSelect.vue2.js +0 -77
- package/dist/bundled/components/base/BaseSplitPane.vue.js +0 -8
- package/dist/bundled/components/base/BaseSplitPane.vue2.js +0 -183
- package/dist/bundled/components/base/BaseTab.vue.js +0 -36
- package/dist/bundled/components/base/BaseTab.vue2.js +0 -18
- package/dist/bundled/components/base/BaseTag.vue.js +0 -13
- package/dist/bundled/components/command/CommandPrompts.vue.js +0 -5
- package/dist/bundled/components/command/CommandPrompts.vue2.js +0 -91
- package/dist/bundled/components/command/CommandPromptsModal.vue.js +0 -5
- package/dist/bundled/components/command/CommandPromptsModal.vue2.js +0 -45
- package/dist/bundled/components/command/PromptSelect.vue.js +0 -5
- package/dist/bundled/components/command/PromptSelect.vue2.js +0 -142
- package/dist/bundled/components/command/PromptText.vue.js +0 -5
- package/dist/bundled/components/command/PromptText.vue2.js +0 -67
- package/dist/bundled/components/misc/CheckerboardPattern.vue.js +0 -40
- package/dist/bundled/components/misc/HatchedPattern.vue.js +0 -12
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentPropItem.vue2.js +0 -72
- package/dist/bundled/components/panel/ControlsComponentProps.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentProps.vue2.js +0 -45
- package/dist/bundled/components/panel/ControlsComponentState.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentState.vue2.js +0 -41
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue.js +0 -5
- package/dist/bundled/components/panel/ControlsComponentStateItem.vue2.js +0 -46
- package/dist/bundled/components/panel/PaneTabs.vue.js +0 -5
- package/dist/bundled/components/panel/PaneTabs.vue2.js +0 -114
- package/dist/bundled/components/panel/StatePresets.vue.js +0 -5
- package/dist/bundled/components/panel/StatePresets.vue2.js +0 -193
- package/dist/bundled/components/panel/StoryControls.vue.js +0 -5
- package/dist/bundled/components/panel/StoryControls.vue2.js +0 -87
- package/dist/bundled/components/panel/StoryDocs.vue.js +0 -7
- package/dist/bundled/components/panel/StoryDocs.vue2.js +0 -161
- package/dist/bundled/components/panel/StoryEvent.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvent.vue2.js +0 -59
- package/dist/bundled/components/panel/StoryEvents.vue.js +0 -5
- package/dist/bundled/components/panel/StoryEvents.vue2.js +0 -53
- package/dist/bundled/components/panel/StorySidePanel.vue.js +0 -5
- package/dist/bundled/components/panel/StorySidePanel.vue2.js +0 -83
- package/dist/bundled/components/panel/StorySourceCode.vue.js +0 -8
- package/dist/bundled/components/panel/StorySourceCode.vue2.js +0 -204
- package/dist/bundled/components/search/SearchItem.vue.js +0 -8
- package/dist/bundled/components/search/SearchItem.vue2.js +0 -93
- package/dist/bundled/components/search/SearchItemContent.vue.js +0 -5
- package/dist/bundled/components/search/SearchItemContent.vue2.js +0 -71
- package/dist/bundled/components/search/SearchLoading.vue.js +0 -5
- package/dist/bundled/components/search/SearchLoading.vue2.js +0 -21
- package/dist/bundled/components/search/SearchModal.vue.js +0 -5
- package/dist/bundled/components/search/SearchModal.vue2.js +0 -51
- package/dist/bundled/components/search/SearchPane.vue.js +0 -5
- package/dist/bundled/components/search/SearchPane.vue2.js +0 -272
- package/dist/bundled/components/search/search-docs-data.js +0 -11
- package/dist/bundled/components/search/search-title-data.js +0 -11
- package/dist/bundled/components/story/GenericMountStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericMountStory.vue2.js +0 -34
- package/dist/bundled/components/story/GenericRenderStory.vue.js +0 -5
- package/dist/bundled/components/story/GenericRenderStory.vue2.js +0 -39
- package/dist/bundled/components/story/StoryResponsivePreview.vue.js +0 -8
- package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +0 -207
- package/dist/bundled/components/story/StoryVariantGrid.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantGrid.vue2.js +0 -146
- package/dist/bundled/components/story/StoryVariantGridItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +0 -153
- package/dist/bundled/components/story/StoryVariantListItem.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantListItem.vue2.js +0 -55
- package/dist/bundled/components/story/StoryVariantSingle.vue.js +0 -8
- package/dist/bundled/components/story/StoryVariantSingle.vue2.js +0 -107
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +0 -70
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +0 -128
- package/dist/bundled/components/story/StoryVariantSingleView.vue.js +0 -5
- package/dist/bundled/components/story/StoryVariantSingleView.vue2.js +0 -66
- package/dist/bundled/components/story/StoryView.vue.js +0 -5
- package/dist/bundled/components/story/StoryView.vue2.js +0 -104
- package/dist/bundled/components/story/StoryViewer.vue.js +0 -8
- package/dist/bundled/components/story/StoryViewer.vue2.js +0 -55
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue.js +0 -5
- package/dist/bundled/components/toolbar/DevOnlyToolbarOpenInEditor.vue2.js +0 -31
- package/dist/bundled/components/toolbar/ToolbarBackground.vue.js +0 -8
- package/dist/bundled/components/toolbar/ToolbarBackground.vue2.js +0 -98
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarNewTab.vue2.js +0 -36
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarResponsiveSize.vue2.js +0 -127
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarTextDirection.vue2.js +0 -27
- package/dist/bundled/components/toolbar/ToolbarTitle.vue.js +0 -5
- package/dist/bundled/components/toolbar/ToolbarTitle.vue2.js +0 -26
- package/dist/bundled/components/tree/StoryGroup.vue.js +0 -5
- package/dist/bundled/components/tree/StoryGroup.vue2.js +0 -74
- package/dist/bundled/components/tree/StoryList.vue.js +0 -5
- package/dist/bundled/components/tree/StoryList.vue2.js +0 -41
- package/dist/bundled/components/tree/StoryListFolder.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListFolder.vue2.js +0 -86
- package/dist/bundled/components/tree/StoryListItem.vue.js +0 -8
- package/dist/bundled/components/tree/StoryListItem.vue2.js +0 -69
- package/dist/bundled/plugin.js +0 -49
- package/dist/bundled/router.js +0 -32
- package/dist/bundled/stores/command.js +0 -25
- package/dist/bundled/stores/events.js +0 -29
- package/dist/bundled/stores/folder.js +0 -54
- package/dist/bundled/stores/preview-settings.js +0 -19
- package/dist/bundled/stores/story.js +0 -43
- package/dist/bundled/util/commands.js +0 -57
- package/dist/bundled/util/config.js +0 -8
- package/dist/bundled/util/const.js +0 -10
- package/dist/bundled/util/dark.js +0 -28
- package/dist/bundled/util/docs.js +0 -26
- package/dist/bundled/util/env.js +0 -4
- package/dist/bundled/util/events.js +0 -33
- package/dist/bundled/util/keyboard.js +0 -90
- package/dist/bundled/util/mapping.js +0 -70
- package/dist/bundled/util/open-in-editor.js +0 -6
- package/dist/bundled/util/preview-settings.js +0 -21
- package/dist/bundled/util/responsive.js +0 -6
- package/dist/bundled/util/sandbox.js +0 -11
- package/dist/bundled/util/scroll.js +0 -31
- package/dist/bundled/util/select.js +0 -28
- package/dist/bundled/util/state.js +0 -41
- package/dist/bundled/util/tooltip.js +0 -15
- package/dist/bundled/util/variant.js +0 -21
- package/src/app/components/HomeView.vue +0 -61
- package/src/app/components/app/AppHeader.vue +0 -65
- package/src/app/components/app/AppLogo.vue +0 -25
- package/src/app/components/app/Breadcrumb.vue +0 -98
- package/src/app/components/app/HomeCounter.vue +0 -39
- package/src/app/components/app/InitialLoading.vue +0 -44
- package/src/app/components/app/MobileOverlay.vue +0 -33
- package/src/app/components/base/BaseCheckbox.vue +0 -76
- package/src/app/components/base/BaseCopyIcon.vue +0 -34
- package/src/app/components/base/BaseEmpty.vue +0 -21
- package/src/app/components/base/BaseIcon.vue +0 -31
- package/src/app/components/base/BaseListItem.vue +0 -30
- package/src/app/components/base/BaseListItemLink.vue +0 -56
- package/src/app/components/base/BaseOverflowMenu.vue +0 -119
- package/src/app/components/base/BaseOverflowTab.vue +0 -47
- package/src/app/components/base/BaseSelect.vue +0 -75
- package/src/app/components/base/BaseSplitPane.vue +0 -244
- package/src/app/components/base/BaseTab.vue +0 -47
- package/src/app/components/base/BaseTag.vue +0 -5
- package/src/app/components/command/CommandPromptsModal.vue +0 -41
- package/src/app/components/misc/CheckerboardPattern.vue +0 -32
- package/src/app/components/panel/ControlsComponentPropItem.vue +0 -73
- package/src/app/components/panel/ControlsComponentProps.vue +0 -34
- package/src/app/components/panel/ControlsComponentState.vue +0 -38
- package/src/app/components/panel/ControlsComponentStateItem.vue +0 -44
- package/src/app/components/panel/PaneTabs.vue +0 -84
- package/src/app/components/panel/StatePresets.vue +0 -199
- package/src/app/components/panel/StoryControls.vue +0 -97
- package/src/app/components/panel/StoryDocs.vue +0 -202
- package/src/app/components/panel/StoryEvent.vue +0 -54
- package/src/app/components/panel/StoryEvents.vue +0 -48
- package/src/app/components/panel/StorySidePanel.vue +0 -76
- package/src/app/components/panel/StorySourceCode.vue +0 -248
- package/src/app/components/search/SearchItem.vue +0 -89
- package/src/app/components/search/SearchItemContent.vue +0 -67
- package/src/app/components/search/SearchLoading.vue +0 -16
- package/src/app/components/search/SearchModal.vue +0 -44
- package/src/app/components/search/SearchPane.vue +0 -319
- package/src/app/components/search/search-docs-data.ts +0 -9
- package/src/app/components/search/search-title-data.ts +0 -9
- package/src/app/components/search/types.ts +0 -4
- package/src/app/components/story/StoryResponsivePreview.vue +0 -216
- package/src/app/components/story/StoryVariantGrid.vue +0 -169
- package/src/app/components/story/StoryVariantGridItem.vue +0 -163
- package/src/app/components/story/StoryVariantListItem.vue +0 -52
- package/src/app/components/story/StoryVariantSingle.vue +0 -105
- package/src/app/components/story/StoryVariantSinglePreviewNative.vue +0 -66
- package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +0 -143
- package/src/app/components/story/StoryVariantSingleView.vue +0 -61
- package/src/app/components/story/StoryView.vue +0 -110
- package/src/app/components/story/StoryViewer.vue +0 -52
- package/src/app/components/toolbar/DevOnlyToolbarOpenInEditor.vue +0 -23
- package/src/app/components/toolbar/ToolbarBackground.vue +0 -81
- package/src/app/components/toolbar/ToolbarNewTab.vue +0 -29
- package/src/app/components/toolbar/ToolbarResponsiveSize.vue +0 -82
- package/src/app/components/toolbar/ToolbarTextDirection.vue +0 -19
- package/src/app/components/toolbar/ToolbarTitle.vue +0 -21
- package/src/app/components/tree/StoryGroup.vue +0 -73
- package/src/app/components/tree/StoryList.vue +0 -35
- package/src/app/components/tree/StoryListFolder.vue +0 -88
- package/src/app/components/tree/StoryListItem.vue +0 -72
- package/src/app/router.ts +0 -29
- package/src/app/stores/command.ts +0 -26
- package/src/app/stores/folder.ts +0 -63
- package/src/app/stores/preview-settings.ts +0 -18
- package/src/app/stores/story.ts +0 -47
- package/src/app/style/floating.pcss +0 -34
- package/src/app/style/main.pcss +0 -100
- package/src/app/style/sandbox.css +0 -24
- package/src/app/style/transitions.pcss +0 -51
- package/src/app/util/commands.ts +0 -57
- package/src/app/util/responsive.ts +0 -3
- package/src/app/util/sandbox.ts +0 -9
- package/src/app/util/scroll.ts +0 -32
- package/src/app/util/tooltip.ts +0 -13
- package/src/app/util/variant.ts +0 -21
- package/tailwind.config.cjs +0 -137
|
@@ -0,0 +1,2320 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js
|
|
2
|
+
function clone(something) {
|
|
3
|
+
return doClone(something);
|
|
4
|
+
}
|
|
5
|
+
function doClone(something) {
|
|
6
|
+
if (Array.isArray(something)) return cloneArray(something);
|
|
7
|
+
if (something instanceof RegExp) return something;
|
|
8
|
+
if (typeof something === "object") return cloneObj(something);
|
|
9
|
+
return something;
|
|
10
|
+
}
|
|
11
|
+
function cloneArray(arr) {
|
|
12
|
+
let r = [];
|
|
13
|
+
for (let i = 0, len = arr.length; i < len; i++) r[i] = doClone(arr[i]);
|
|
14
|
+
return r;
|
|
15
|
+
}
|
|
16
|
+
function cloneObj(obj) {
|
|
17
|
+
let r = {};
|
|
18
|
+
for (let key in obj) r[key] = doClone(obj[key]);
|
|
19
|
+
return r;
|
|
20
|
+
}
|
|
21
|
+
function mergeObjects(target, ...sources) {
|
|
22
|
+
sources.forEach((source) => {
|
|
23
|
+
for (let key in source) target[key] = source[key];
|
|
24
|
+
});
|
|
25
|
+
return target;
|
|
26
|
+
}
|
|
27
|
+
function basename(path) {
|
|
28
|
+
const idx = ~path.lastIndexOf("/") || ~path.lastIndexOf("\\");
|
|
29
|
+
if (idx === 0) return path;
|
|
30
|
+
else if (~idx === path.length - 1) return basename(path.substring(0, path.length - 1));
|
|
31
|
+
else return path.substr(~idx + 1);
|
|
32
|
+
}
|
|
33
|
+
var CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;
|
|
34
|
+
var RegexSource = class {
|
|
35
|
+
static hasCaptures(regexSource) {
|
|
36
|
+
if (regexSource === null) return false;
|
|
37
|
+
CAPTURING_REGEX_SOURCE.lastIndex = 0;
|
|
38
|
+
return CAPTURING_REGEX_SOURCE.test(regexSource);
|
|
39
|
+
}
|
|
40
|
+
static replaceCaptures(regexSource, captureSource, captureIndices) {
|
|
41
|
+
return regexSource.replace(CAPTURING_REGEX_SOURCE, (match, index, commandIndex, command) => {
|
|
42
|
+
let capture = captureIndices[parseInt(index || commandIndex, 10)];
|
|
43
|
+
if (capture) {
|
|
44
|
+
let result = captureSource.substring(capture.start, capture.end);
|
|
45
|
+
while (result[0] === ".") result = result.substring(1);
|
|
46
|
+
switch (command) {
|
|
47
|
+
case "downcase": return result.toLowerCase();
|
|
48
|
+
case "upcase": return result.toUpperCase();
|
|
49
|
+
default: return result;
|
|
50
|
+
}
|
|
51
|
+
} else return match;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function strcmp(a, b) {
|
|
56
|
+
if (a < b) return -1;
|
|
57
|
+
if (a > b) return 1;
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
function strArrCmp(a, b) {
|
|
61
|
+
if (a === null && b === null) return 0;
|
|
62
|
+
if (!a) return -1;
|
|
63
|
+
if (!b) return 1;
|
|
64
|
+
let len1 = a.length;
|
|
65
|
+
let len2 = b.length;
|
|
66
|
+
if (len1 === len2) {
|
|
67
|
+
for (let i = 0; i < len1; i++) {
|
|
68
|
+
let res = strcmp(a[i], b[i]);
|
|
69
|
+
if (res !== 0) return res;
|
|
70
|
+
}
|
|
71
|
+
return 0;
|
|
72
|
+
}
|
|
73
|
+
return len1 - len2;
|
|
74
|
+
}
|
|
75
|
+
function isValidHexColor(hex) {
|
|
76
|
+
if (/^#[0-9a-f]{6}$/i.test(hex)) return true;
|
|
77
|
+
if (/^#[0-9a-f]{8}$/i.test(hex)) return true;
|
|
78
|
+
if (/^#[0-9a-f]{3}$/i.test(hex)) return true;
|
|
79
|
+
if (/^#[0-9a-f]{4}$/i.test(hex)) return true;
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
function escapeRegExpCharacters(value) {
|
|
83
|
+
return value.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
|
|
84
|
+
}
|
|
85
|
+
var CachedFn = class {
|
|
86
|
+
constructor(fn) {
|
|
87
|
+
this.fn = fn;
|
|
88
|
+
}
|
|
89
|
+
cache = /* @__PURE__ */ new Map();
|
|
90
|
+
get(key) {
|
|
91
|
+
if (this.cache.has(key)) return this.cache.get(key);
|
|
92
|
+
const value = this.fn(key);
|
|
93
|
+
this.cache.set(key, value);
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var Theme = class {
|
|
98
|
+
constructor(_colorMap, _defaults, _root) {
|
|
99
|
+
this._colorMap = _colorMap;
|
|
100
|
+
this._defaults = _defaults;
|
|
101
|
+
this._root = _root;
|
|
102
|
+
}
|
|
103
|
+
static createFromRawTheme(source, colorMap) {
|
|
104
|
+
return this.createFromParsedTheme(parseTheme(source), colorMap);
|
|
105
|
+
}
|
|
106
|
+
static createFromParsedTheme(source, colorMap) {
|
|
107
|
+
return resolveParsedThemeRules(source, colorMap);
|
|
108
|
+
}
|
|
109
|
+
_cachedMatchRoot = new CachedFn((scopeName) => this._root.match(scopeName));
|
|
110
|
+
getColorMap() {
|
|
111
|
+
return this._colorMap.getColorMap();
|
|
112
|
+
}
|
|
113
|
+
getDefaults() {
|
|
114
|
+
return this._defaults;
|
|
115
|
+
}
|
|
116
|
+
match(scopePath) {
|
|
117
|
+
if (scopePath === null) return this._defaults;
|
|
118
|
+
const scopeName = scopePath.scopeName;
|
|
119
|
+
const effectiveRule = this._cachedMatchRoot.get(scopeName).find((v) => _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes));
|
|
120
|
+
if (!effectiveRule) return null;
|
|
121
|
+
return new StyleAttributes(effectiveRule.fontStyle, effectiveRule.foreground, effectiveRule.background);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
var ScopeStack = class _ScopeStack {
|
|
125
|
+
constructor(parent, scopeName) {
|
|
126
|
+
this.parent = parent;
|
|
127
|
+
this.scopeName = scopeName;
|
|
128
|
+
}
|
|
129
|
+
static push(path, scopeNames) {
|
|
130
|
+
for (const name of scopeNames) path = new _ScopeStack(path, name);
|
|
131
|
+
return path;
|
|
132
|
+
}
|
|
133
|
+
static from(...segments) {
|
|
134
|
+
let result = null;
|
|
135
|
+
for (let i = 0; i < segments.length; i++) result = new _ScopeStack(result, segments[i]);
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
push(scopeName) {
|
|
139
|
+
return new _ScopeStack(this, scopeName);
|
|
140
|
+
}
|
|
141
|
+
getSegments() {
|
|
142
|
+
let item = this;
|
|
143
|
+
const result = [];
|
|
144
|
+
while (item) {
|
|
145
|
+
result.push(item.scopeName);
|
|
146
|
+
item = item.parent;
|
|
147
|
+
}
|
|
148
|
+
result.reverse();
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
toString() {
|
|
152
|
+
return this.getSegments().join(" ");
|
|
153
|
+
}
|
|
154
|
+
extends(other) {
|
|
155
|
+
if (this === other) return true;
|
|
156
|
+
if (this.parent === null) return false;
|
|
157
|
+
return this.parent.extends(other);
|
|
158
|
+
}
|
|
159
|
+
getExtensionIfDefined(base) {
|
|
160
|
+
const result = [];
|
|
161
|
+
let item = this;
|
|
162
|
+
while (item && item !== base) {
|
|
163
|
+
result.push(item.scopeName);
|
|
164
|
+
item = item.parent;
|
|
165
|
+
}
|
|
166
|
+
return item === base ? result.reverse() : void 0;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
function _scopePathMatchesParentScopes(scopePath, parentScopes) {
|
|
170
|
+
if (parentScopes.length === 0) return true;
|
|
171
|
+
for (let index = 0; index < parentScopes.length; index++) {
|
|
172
|
+
let scopePattern = parentScopes[index];
|
|
173
|
+
let scopeMustMatch = false;
|
|
174
|
+
if (scopePattern === ">") {
|
|
175
|
+
if (index === parentScopes.length - 1) return false;
|
|
176
|
+
scopePattern = parentScopes[++index];
|
|
177
|
+
scopeMustMatch = true;
|
|
178
|
+
}
|
|
179
|
+
while (scopePath) {
|
|
180
|
+
if (_matchesScope(scopePath.scopeName, scopePattern)) break;
|
|
181
|
+
if (scopeMustMatch) return false;
|
|
182
|
+
scopePath = scopePath.parent;
|
|
183
|
+
}
|
|
184
|
+
if (!scopePath) return false;
|
|
185
|
+
scopePath = scopePath.parent;
|
|
186
|
+
}
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
function _matchesScope(scopeName, scopePattern) {
|
|
190
|
+
return scopePattern === scopeName || scopeName.startsWith(scopePattern) && scopeName[scopePattern.length] === ".";
|
|
191
|
+
}
|
|
192
|
+
var StyleAttributes = class {
|
|
193
|
+
constructor(fontStyle, foregroundId, backgroundId) {
|
|
194
|
+
this.fontStyle = fontStyle;
|
|
195
|
+
this.foregroundId = foregroundId;
|
|
196
|
+
this.backgroundId = backgroundId;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
function parseTheme(source) {
|
|
200
|
+
if (!source) return [];
|
|
201
|
+
if (!source.settings || !Array.isArray(source.settings)) return [];
|
|
202
|
+
let settings = source.settings;
|
|
203
|
+
let result = [], resultLen = 0;
|
|
204
|
+
for (let i = 0, len = settings.length; i < len; i++) {
|
|
205
|
+
let entry = settings[i];
|
|
206
|
+
if (!entry.settings) continue;
|
|
207
|
+
let scopes;
|
|
208
|
+
if (typeof entry.scope === "string") {
|
|
209
|
+
let _scope = entry.scope;
|
|
210
|
+
_scope = _scope.replace(/^[,]+/, "");
|
|
211
|
+
_scope = _scope.replace(/[,]+$/, "");
|
|
212
|
+
scopes = _scope.split(",");
|
|
213
|
+
} else if (Array.isArray(entry.scope)) scopes = entry.scope;
|
|
214
|
+
else scopes = [""];
|
|
215
|
+
let fontStyle = -1;
|
|
216
|
+
if (typeof entry.settings.fontStyle === "string") {
|
|
217
|
+
fontStyle = 0;
|
|
218
|
+
let segments = entry.settings.fontStyle.split(" ");
|
|
219
|
+
for (let j = 0, lenJ = segments.length; j < lenJ; j++) switch (segments[j]) {
|
|
220
|
+
case "italic":
|
|
221
|
+
fontStyle = fontStyle | 1;
|
|
222
|
+
break;
|
|
223
|
+
case "bold":
|
|
224
|
+
fontStyle = fontStyle | 2;
|
|
225
|
+
break;
|
|
226
|
+
case "underline":
|
|
227
|
+
fontStyle = fontStyle | 4;
|
|
228
|
+
break;
|
|
229
|
+
case "strikethrough": fontStyle = fontStyle | 8;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let foreground = null;
|
|
233
|
+
if (typeof entry.settings.foreground === "string" && isValidHexColor(entry.settings.foreground)) foreground = entry.settings.foreground;
|
|
234
|
+
let background = null;
|
|
235
|
+
if (typeof entry.settings.background === "string" && isValidHexColor(entry.settings.background)) background = entry.settings.background;
|
|
236
|
+
for (let j = 0, lenJ = scopes.length; j < lenJ; j++) {
|
|
237
|
+
let segments = scopes[j].trim().split(" ");
|
|
238
|
+
let scope = segments[segments.length - 1];
|
|
239
|
+
let parentScopes = null;
|
|
240
|
+
if (segments.length > 1) {
|
|
241
|
+
parentScopes = segments.slice(0, segments.length - 1);
|
|
242
|
+
parentScopes.reverse();
|
|
243
|
+
}
|
|
244
|
+
result[resultLen++] = new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return result;
|
|
248
|
+
}
|
|
249
|
+
var ParsedThemeRule = class {
|
|
250
|
+
constructor(scope, parentScopes, index, fontStyle, foreground, background) {
|
|
251
|
+
this.scope = scope;
|
|
252
|
+
this.parentScopes = parentScopes;
|
|
253
|
+
this.index = index;
|
|
254
|
+
this.fontStyle = fontStyle;
|
|
255
|
+
this.foreground = foreground;
|
|
256
|
+
this.background = background;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
var FontStyle = /* @__PURE__ */ ((FontStyle2) => {
|
|
260
|
+
FontStyle2[FontStyle2["NotSet"] = -1] = "NotSet";
|
|
261
|
+
FontStyle2[FontStyle2["None"] = 0] = "None";
|
|
262
|
+
FontStyle2[FontStyle2["Italic"] = 1] = "Italic";
|
|
263
|
+
FontStyle2[FontStyle2["Bold"] = 2] = "Bold";
|
|
264
|
+
FontStyle2[FontStyle2["Underline"] = 4] = "Underline";
|
|
265
|
+
FontStyle2[FontStyle2["Strikethrough"] = 8] = "Strikethrough";
|
|
266
|
+
return FontStyle2;
|
|
267
|
+
})(FontStyle || {});
|
|
268
|
+
function resolveParsedThemeRules(parsedThemeRules, _colorMap) {
|
|
269
|
+
parsedThemeRules.sort((a, b) => {
|
|
270
|
+
let r = strcmp(a.scope, b.scope);
|
|
271
|
+
if (r !== 0) return r;
|
|
272
|
+
r = strArrCmp(a.parentScopes, b.parentScopes);
|
|
273
|
+
if (r !== 0) return r;
|
|
274
|
+
return a.index - b.index;
|
|
275
|
+
});
|
|
276
|
+
let defaultFontStyle = 0;
|
|
277
|
+
let defaultForeground = "#000000";
|
|
278
|
+
let defaultBackground = "#ffffff";
|
|
279
|
+
while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === "") {
|
|
280
|
+
let incomingDefaults = parsedThemeRules.shift();
|
|
281
|
+
if (incomingDefaults.fontStyle !== -1) defaultFontStyle = incomingDefaults.fontStyle;
|
|
282
|
+
if (incomingDefaults.foreground !== null) defaultForeground = incomingDefaults.foreground;
|
|
283
|
+
if (incomingDefaults.background !== null) defaultBackground = incomingDefaults.background;
|
|
284
|
+
}
|
|
285
|
+
let colorMap = new ColorMap(_colorMap);
|
|
286
|
+
let defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));
|
|
287
|
+
let root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1, 0, 0), []);
|
|
288
|
+
for (let i = 0, len = parsedThemeRules.length; i < len; i++) {
|
|
289
|
+
let rule = parsedThemeRules[i];
|
|
290
|
+
root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));
|
|
291
|
+
}
|
|
292
|
+
return new Theme(colorMap, defaults, root);
|
|
293
|
+
}
|
|
294
|
+
var ColorMap = class {
|
|
295
|
+
_isFrozen;
|
|
296
|
+
_lastColorId;
|
|
297
|
+
_id2color;
|
|
298
|
+
_color2id;
|
|
299
|
+
constructor(_colorMap) {
|
|
300
|
+
this._lastColorId = 0;
|
|
301
|
+
this._id2color = [];
|
|
302
|
+
this._color2id = /* @__PURE__ */ Object.create(null);
|
|
303
|
+
if (Array.isArray(_colorMap)) {
|
|
304
|
+
this._isFrozen = true;
|
|
305
|
+
for (let i = 0, len = _colorMap.length; i < len; i++) {
|
|
306
|
+
this._color2id[_colorMap[i]] = i;
|
|
307
|
+
this._id2color[i] = _colorMap[i];
|
|
308
|
+
}
|
|
309
|
+
} else this._isFrozen = false;
|
|
310
|
+
}
|
|
311
|
+
getId(color) {
|
|
312
|
+
if (color === null) return 0;
|
|
313
|
+
color = color.toUpperCase();
|
|
314
|
+
let value = this._color2id[color];
|
|
315
|
+
if (value) return value;
|
|
316
|
+
if (this._isFrozen) throw new Error(`Missing color in color map - ${color}`);
|
|
317
|
+
value = ++this._lastColorId;
|
|
318
|
+
this._color2id[color] = value;
|
|
319
|
+
this._id2color[value] = color;
|
|
320
|
+
return value;
|
|
321
|
+
}
|
|
322
|
+
getColorMap() {
|
|
323
|
+
return this._id2color.slice(0);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
var emptyParentScopes = Object.freeze([]);
|
|
327
|
+
var ThemeTrieElementRule = class _ThemeTrieElementRule {
|
|
328
|
+
scopeDepth;
|
|
329
|
+
parentScopes;
|
|
330
|
+
fontStyle;
|
|
331
|
+
foreground;
|
|
332
|
+
background;
|
|
333
|
+
constructor(scopeDepth, parentScopes, fontStyle, foreground, background) {
|
|
334
|
+
this.scopeDepth = scopeDepth;
|
|
335
|
+
this.parentScopes = parentScopes || emptyParentScopes;
|
|
336
|
+
this.fontStyle = fontStyle;
|
|
337
|
+
this.foreground = foreground;
|
|
338
|
+
this.background = background;
|
|
339
|
+
}
|
|
340
|
+
clone() {
|
|
341
|
+
return new _ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
342
|
+
}
|
|
343
|
+
static cloneArr(arr) {
|
|
344
|
+
let r = [];
|
|
345
|
+
for (let i = 0, len = arr.length; i < len; i++) r[i] = arr[i].clone();
|
|
346
|
+
return r;
|
|
347
|
+
}
|
|
348
|
+
acceptOverwrite(scopeDepth, fontStyle, foreground, background) {
|
|
349
|
+
if (this.scopeDepth > scopeDepth) console.log("how did this happen?");
|
|
350
|
+
else this.scopeDepth = scopeDepth;
|
|
351
|
+
if (fontStyle !== -1) this.fontStyle = fontStyle;
|
|
352
|
+
if (foreground !== 0) this.foreground = foreground;
|
|
353
|
+
if (background !== 0) this.background = background;
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
var ThemeTrieElement = class _ThemeTrieElement {
|
|
357
|
+
constructor(_mainRule, rulesWithParentScopes = [], _children = {}) {
|
|
358
|
+
this._mainRule = _mainRule;
|
|
359
|
+
this._children = _children;
|
|
360
|
+
this._rulesWithParentScopes = rulesWithParentScopes;
|
|
361
|
+
}
|
|
362
|
+
_rulesWithParentScopes;
|
|
363
|
+
static _cmpBySpecificity(a, b) {
|
|
364
|
+
if (a.scopeDepth !== b.scopeDepth) return b.scopeDepth - a.scopeDepth;
|
|
365
|
+
let aParentIndex = 0;
|
|
366
|
+
let bParentIndex = 0;
|
|
367
|
+
while (true) {
|
|
368
|
+
if (a.parentScopes[aParentIndex] === ">") aParentIndex++;
|
|
369
|
+
if (b.parentScopes[bParentIndex] === ">") bParentIndex++;
|
|
370
|
+
if (aParentIndex >= a.parentScopes.length || bParentIndex >= b.parentScopes.length) break;
|
|
371
|
+
const parentScopeLengthDiff = b.parentScopes[bParentIndex].length - a.parentScopes[aParentIndex].length;
|
|
372
|
+
if (parentScopeLengthDiff !== 0) return parentScopeLengthDiff;
|
|
373
|
+
aParentIndex++;
|
|
374
|
+
bParentIndex++;
|
|
375
|
+
}
|
|
376
|
+
return b.parentScopes.length - a.parentScopes.length;
|
|
377
|
+
}
|
|
378
|
+
match(scope) {
|
|
379
|
+
if (scope !== "") {
|
|
380
|
+
let dotIndex = scope.indexOf(".");
|
|
381
|
+
let head;
|
|
382
|
+
let tail;
|
|
383
|
+
if (dotIndex === -1) {
|
|
384
|
+
head = scope;
|
|
385
|
+
tail = "";
|
|
386
|
+
} else {
|
|
387
|
+
head = scope.substring(0, dotIndex);
|
|
388
|
+
tail = scope.substring(dotIndex + 1);
|
|
389
|
+
}
|
|
390
|
+
if (this._children.hasOwnProperty(head)) return this._children[head].match(tail);
|
|
391
|
+
}
|
|
392
|
+
const rules = this._rulesWithParentScopes.concat(this._mainRule);
|
|
393
|
+
rules.sort(_ThemeTrieElement._cmpBySpecificity);
|
|
394
|
+
return rules;
|
|
395
|
+
}
|
|
396
|
+
insert(scopeDepth, scope, parentScopes, fontStyle, foreground, background) {
|
|
397
|
+
if (scope === "") {
|
|
398
|
+
this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
let dotIndex = scope.indexOf(".");
|
|
402
|
+
let head;
|
|
403
|
+
let tail;
|
|
404
|
+
if (dotIndex === -1) {
|
|
405
|
+
head = scope;
|
|
406
|
+
tail = "";
|
|
407
|
+
} else {
|
|
408
|
+
head = scope.substring(0, dotIndex);
|
|
409
|
+
tail = scope.substring(dotIndex + 1);
|
|
410
|
+
}
|
|
411
|
+
let child;
|
|
412
|
+
if (this._children.hasOwnProperty(head)) child = this._children[head];
|
|
413
|
+
else {
|
|
414
|
+
child = new _ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));
|
|
415
|
+
this._children[head] = child;
|
|
416
|
+
}
|
|
417
|
+
child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);
|
|
418
|
+
}
|
|
419
|
+
_doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background) {
|
|
420
|
+
if (parentScopes === null) {
|
|
421
|
+
this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
for (let i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {
|
|
425
|
+
let rule = this._rulesWithParentScopes[i];
|
|
426
|
+
if (strArrCmp(rule.parentScopes, parentScopes) === 0) {
|
|
427
|
+
rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (fontStyle === -1) fontStyle = this._mainRule.fontStyle;
|
|
432
|
+
if (foreground === 0) foreground = this._mainRule.foreground;
|
|
433
|
+
if (background === 0) background = this._mainRule.background;
|
|
434
|
+
this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
var EncodedTokenMetadata = class _EncodedTokenMetadata {
|
|
438
|
+
static toBinaryStr(encodedTokenAttributes) {
|
|
439
|
+
return encodedTokenAttributes.toString(2).padStart(32, "0");
|
|
440
|
+
}
|
|
441
|
+
static print(encodedTokenAttributes) {
|
|
442
|
+
const languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);
|
|
443
|
+
const tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);
|
|
444
|
+
const fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);
|
|
445
|
+
const foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);
|
|
446
|
+
const background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);
|
|
447
|
+
console.log({
|
|
448
|
+
languageId,
|
|
449
|
+
tokenType,
|
|
450
|
+
fontStyle,
|
|
451
|
+
foreground,
|
|
452
|
+
background
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
static getLanguageId(encodedTokenAttributes) {
|
|
456
|
+
return (encodedTokenAttributes & 255) >>> 0;
|
|
457
|
+
}
|
|
458
|
+
static getTokenType(encodedTokenAttributes) {
|
|
459
|
+
return (encodedTokenAttributes & 768) >>> 8;
|
|
460
|
+
}
|
|
461
|
+
static containsBalancedBrackets(encodedTokenAttributes) {
|
|
462
|
+
return (encodedTokenAttributes & 1024) !== 0;
|
|
463
|
+
}
|
|
464
|
+
static getFontStyle(encodedTokenAttributes) {
|
|
465
|
+
return (encodedTokenAttributes & 30720) >>> 11;
|
|
466
|
+
}
|
|
467
|
+
static getForeground(encodedTokenAttributes) {
|
|
468
|
+
return (encodedTokenAttributes & 16744448) >>> 15;
|
|
469
|
+
}
|
|
470
|
+
static getBackground(encodedTokenAttributes) {
|
|
471
|
+
return (encodedTokenAttributes & 4278190080) >>> 24;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Updates the fields in `metadata`.
|
|
475
|
+
* A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
|
|
476
|
+
*/
|
|
477
|
+
static set(encodedTokenAttributes, languageId, tokenType, containsBalancedBrackets, fontStyle, foreground, background) {
|
|
478
|
+
let _languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);
|
|
479
|
+
let _tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);
|
|
480
|
+
let _containsBalancedBracketsBit = _EncodedTokenMetadata.containsBalancedBrackets(encodedTokenAttributes) ? 1 : 0;
|
|
481
|
+
let _fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);
|
|
482
|
+
let _foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);
|
|
483
|
+
let _background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);
|
|
484
|
+
if (languageId !== 0) _languageId = languageId;
|
|
485
|
+
if (tokenType !== 8) _tokenType = fromOptionalTokenType(tokenType);
|
|
486
|
+
if (containsBalancedBrackets !== null) _containsBalancedBracketsBit = containsBalancedBrackets ? 1 : 0;
|
|
487
|
+
if (fontStyle !== -1) _fontStyle = fontStyle;
|
|
488
|
+
if (foreground !== 0) _foreground = foreground;
|
|
489
|
+
if (background !== 0) _background = background;
|
|
490
|
+
return (_languageId << 0 | _tokenType << 8 | _containsBalancedBracketsBit << 10 | _fontStyle << 11 | _foreground << 15 | _background << 24) >>> 0;
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
function toOptionalTokenType(standardType) {
|
|
494
|
+
return standardType;
|
|
495
|
+
}
|
|
496
|
+
function fromOptionalTokenType(standardType) {
|
|
497
|
+
return standardType;
|
|
498
|
+
}
|
|
499
|
+
function createMatchers(selector, matchesName) {
|
|
500
|
+
const results = [];
|
|
501
|
+
const tokenizer = newTokenizer(selector);
|
|
502
|
+
let token = tokenizer.next();
|
|
503
|
+
while (token !== null) {
|
|
504
|
+
let priority = 0;
|
|
505
|
+
if (token.length === 2 && token.charAt(1) === ":") {
|
|
506
|
+
switch (token.charAt(0)) {
|
|
507
|
+
case "R":
|
|
508
|
+
priority = 1;
|
|
509
|
+
break;
|
|
510
|
+
case "L":
|
|
511
|
+
priority = -1;
|
|
512
|
+
break;
|
|
513
|
+
default: console.log(`Unknown priority ${token} in scope selector`);
|
|
514
|
+
}
|
|
515
|
+
token = tokenizer.next();
|
|
516
|
+
}
|
|
517
|
+
let matcher = parseConjunction();
|
|
518
|
+
results.push({
|
|
519
|
+
matcher,
|
|
520
|
+
priority
|
|
521
|
+
});
|
|
522
|
+
if (token !== ",") break;
|
|
523
|
+
token = tokenizer.next();
|
|
524
|
+
}
|
|
525
|
+
return results;
|
|
526
|
+
function parseOperand() {
|
|
527
|
+
if (token === "-") {
|
|
528
|
+
token = tokenizer.next();
|
|
529
|
+
const expressionToNegate = parseOperand();
|
|
530
|
+
return (matcherInput) => !!expressionToNegate && !expressionToNegate(matcherInput);
|
|
531
|
+
}
|
|
532
|
+
if (token === "(") {
|
|
533
|
+
token = tokenizer.next();
|
|
534
|
+
const expressionInParents = parseInnerExpression();
|
|
535
|
+
if (token === ")") token = tokenizer.next();
|
|
536
|
+
return expressionInParents;
|
|
537
|
+
}
|
|
538
|
+
if (isIdentifier(token)) {
|
|
539
|
+
const identifiers = [];
|
|
540
|
+
do {
|
|
541
|
+
identifiers.push(token);
|
|
542
|
+
token = tokenizer.next();
|
|
543
|
+
} while (isIdentifier(token));
|
|
544
|
+
return (matcherInput) => matchesName(identifiers, matcherInput);
|
|
545
|
+
}
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
function parseConjunction() {
|
|
549
|
+
const matchers = [];
|
|
550
|
+
let matcher = parseOperand();
|
|
551
|
+
while (matcher) {
|
|
552
|
+
matchers.push(matcher);
|
|
553
|
+
matcher = parseOperand();
|
|
554
|
+
}
|
|
555
|
+
return (matcherInput) => matchers.every((matcher2) => matcher2(matcherInput));
|
|
556
|
+
}
|
|
557
|
+
function parseInnerExpression() {
|
|
558
|
+
const matchers = [];
|
|
559
|
+
let matcher = parseConjunction();
|
|
560
|
+
while (matcher) {
|
|
561
|
+
matchers.push(matcher);
|
|
562
|
+
if (token === "|" || token === ",") do
|
|
563
|
+
token = tokenizer.next();
|
|
564
|
+
while (token === "|" || token === ",");
|
|
565
|
+
else break;
|
|
566
|
+
matcher = parseConjunction();
|
|
567
|
+
}
|
|
568
|
+
return (matcherInput) => matchers.some((matcher2) => matcher2(matcherInput));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function isIdentifier(token) {
|
|
572
|
+
return !!token && !!token.match(/[\w\.:]+/);
|
|
573
|
+
}
|
|
574
|
+
function newTokenizer(input) {
|
|
575
|
+
let regex = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g;
|
|
576
|
+
let match = regex.exec(input);
|
|
577
|
+
return { next: () => {
|
|
578
|
+
if (!match) return null;
|
|
579
|
+
const res = match[0];
|
|
580
|
+
match = regex.exec(input);
|
|
581
|
+
return res;
|
|
582
|
+
} };
|
|
583
|
+
}
|
|
584
|
+
function disposeOnigString(str) {
|
|
585
|
+
if (typeof str.dispose === "function") str.dispose();
|
|
586
|
+
}
|
|
587
|
+
var TopLevelRuleReference = class {
|
|
588
|
+
constructor(scopeName) {
|
|
589
|
+
this.scopeName = scopeName;
|
|
590
|
+
}
|
|
591
|
+
toKey() {
|
|
592
|
+
return this.scopeName;
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
var TopLevelRepositoryRuleReference = class {
|
|
596
|
+
constructor(scopeName, ruleName) {
|
|
597
|
+
this.scopeName = scopeName;
|
|
598
|
+
this.ruleName = ruleName;
|
|
599
|
+
}
|
|
600
|
+
toKey() {
|
|
601
|
+
return `${this.scopeName}#${this.ruleName}`;
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
var ExternalReferenceCollector = class {
|
|
605
|
+
_references = [];
|
|
606
|
+
_seenReferenceKeys = /* @__PURE__ */ new Set();
|
|
607
|
+
get references() {
|
|
608
|
+
return this._references;
|
|
609
|
+
}
|
|
610
|
+
visitedRule = /* @__PURE__ */ new Set();
|
|
611
|
+
add(reference) {
|
|
612
|
+
const key = reference.toKey();
|
|
613
|
+
if (this._seenReferenceKeys.has(key)) return;
|
|
614
|
+
this._seenReferenceKeys.add(key);
|
|
615
|
+
this._references.push(reference);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
var ScopeDependencyProcessor = class {
|
|
619
|
+
constructor(repo, initialScopeName) {
|
|
620
|
+
this.repo = repo;
|
|
621
|
+
this.initialScopeName = initialScopeName;
|
|
622
|
+
this.seenFullScopeRequests.add(this.initialScopeName);
|
|
623
|
+
this.Q = [new TopLevelRuleReference(this.initialScopeName)];
|
|
624
|
+
}
|
|
625
|
+
seenFullScopeRequests = /* @__PURE__ */ new Set();
|
|
626
|
+
seenPartialScopeRequests = /* @__PURE__ */ new Set();
|
|
627
|
+
Q;
|
|
628
|
+
processQueue() {
|
|
629
|
+
const q = this.Q;
|
|
630
|
+
this.Q = [];
|
|
631
|
+
const deps = new ExternalReferenceCollector();
|
|
632
|
+
for (const dep of q) collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps);
|
|
633
|
+
for (const dep of deps.references) if (dep instanceof TopLevelRuleReference) {
|
|
634
|
+
if (this.seenFullScopeRequests.has(dep.scopeName)) continue;
|
|
635
|
+
this.seenFullScopeRequests.add(dep.scopeName);
|
|
636
|
+
this.Q.push(dep);
|
|
637
|
+
} else {
|
|
638
|
+
if (this.seenFullScopeRequests.has(dep.scopeName)) continue;
|
|
639
|
+
if (this.seenPartialScopeRequests.has(dep.toKey())) continue;
|
|
640
|
+
this.seenPartialScopeRequests.add(dep.toKey());
|
|
641
|
+
this.Q.push(dep);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
function collectReferencesOfReference(reference, baseGrammarScopeName, repo, result) {
|
|
646
|
+
const selfGrammar = repo.lookup(reference.scopeName);
|
|
647
|
+
if (!selfGrammar) {
|
|
648
|
+
if (reference.scopeName === baseGrammarScopeName) throw new Error(`No grammar provided for <${baseGrammarScopeName}>`);
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
const baseGrammar = repo.lookup(baseGrammarScopeName);
|
|
652
|
+
if (reference instanceof TopLevelRuleReference) collectExternalReferencesInTopLevelRule({
|
|
653
|
+
baseGrammar,
|
|
654
|
+
selfGrammar
|
|
655
|
+
}, result);
|
|
656
|
+
else collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, {
|
|
657
|
+
baseGrammar,
|
|
658
|
+
selfGrammar,
|
|
659
|
+
repository: selfGrammar.repository
|
|
660
|
+
}, result);
|
|
661
|
+
const injections = repo.injections(reference.scopeName);
|
|
662
|
+
if (injections) for (const injection of injections) result.add(new TopLevelRuleReference(injection));
|
|
663
|
+
}
|
|
664
|
+
function collectExternalReferencesInTopLevelRepositoryRule(ruleName, context, result) {
|
|
665
|
+
if (context.repository && context.repository[ruleName]) {
|
|
666
|
+
const rule = context.repository[ruleName];
|
|
667
|
+
collectExternalReferencesInRules([rule], context, result);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
function collectExternalReferencesInTopLevelRule(context, result) {
|
|
671
|
+
if (context.selfGrammar.patterns && Array.isArray(context.selfGrammar.patterns)) collectExternalReferencesInRules(context.selfGrammar.patterns, {
|
|
672
|
+
...context,
|
|
673
|
+
repository: context.selfGrammar.repository
|
|
674
|
+
}, result);
|
|
675
|
+
if (context.selfGrammar.injections) collectExternalReferencesInRules(Object.values(context.selfGrammar.injections), {
|
|
676
|
+
...context,
|
|
677
|
+
repository: context.selfGrammar.repository
|
|
678
|
+
}, result);
|
|
679
|
+
}
|
|
680
|
+
function collectExternalReferencesInRules(rules, context, result) {
|
|
681
|
+
for (const rule of rules) {
|
|
682
|
+
if (result.visitedRule.has(rule)) continue;
|
|
683
|
+
result.visitedRule.add(rule);
|
|
684
|
+
const patternRepository = rule.repository ? mergeObjects({}, context.repository, rule.repository) : context.repository;
|
|
685
|
+
if (Array.isArray(rule.patterns)) collectExternalReferencesInRules(rule.patterns, {
|
|
686
|
+
...context,
|
|
687
|
+
repository: patternRepository
|
|
688
|
+
}, result);
|
|
689
|
+
const include = rule.include;
|
|
690
|
+
if (!include) continue;
|
|
691
|
+
const reference = parseInclude(include);
|
|
692
|
+
switch (reference.kind) {
|
|
693
|
+
case 0:
|
|
694
|
+
collectExternalReferencesInTopLevelRule({
|
|
695
|
+
...context,
|
|
696
|
+
selfGrammar: context.baseGrammar
|
|
697
|
+
}, result);
|
|
698
|
+
break;
|
|
699
|
+
case 1:
|
|
700
|
+
collectExternalReferencesInTopLevelRule(context, result);
|
|
701
|
+
break;
|
|
702
|
+
case 2:
|
|
703
|
+
collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, {
|
|
704
|
+
...context,
|
|
705
|
+
repository: patternRepository
|
|
706
|
+
}, result);
|
|
707
|
+
break;
|
|
708
|
+
case 3:
|
|
709
|
+
case 4:
|
|
710
|
+
const selfGrammar = reference.scopeName === context.selfGrammar.scopeName ? context.selfGrammar : reference.scopeName === context.baseGrammar.scopeName ? context.baseGrammar : void 0;
|
|
711
|
+
if (selfGrammar) {
|
|
712
|
+
const newContext = {
|
|
713
|
+
baseGrammar: context.baseGrammar,
|
|
714
|
+
selfGrammar,
|
|
715
|
+
repository: patternRepository
|
|
716
|
+
};
|
|
717
|
+
if (reference.kind === 4) collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result);
|
|
718
|
+
else collectExternalReferencesInTopLevelRule(newContext, result);
|
|
719
|
+
} else if (reference.kind === 4) result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName));
|
|
720
|
+
else result.add(new TopLevelRuleReference(reference.scopeName));
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
var BaseReference = class {
|
|
725
|
+
kind = 0;
|
|
726
|
+
};
|
|
727
|
+
var SelfReference = class {
|
|
728
|
+
kind = 1;
|
|
729
|
+
};
|
|
730
|
+
var RelativeReference = class {
|
|
731
|
+
constructor(ruleName) {
|
|
732
|
+
this.ruleName = ruleName;
|
|
733
|
+
}
|
|
734
|
+
kind = 2;
|
|
735
|
+
};
|
|
736
|
+
var TopLevelReference = class {
|
|
737
|
+
constructor(scopeName) {
|
|
738
|
+
this.scopeName = scopeName;
|
|
739
|
+
}
|
|
740
|
+
kind = 3;
|
|
741
|
+
};
|
|
742
|
+
var TopLevelRepositoryReference = class {
|
|
743
|
+
constructor(scopeName, ruleName) {
|
|
744
|
+
this.scopeName = scopeName;
|
|
745
|
+
this.ruleName = ruleName;
|
|
746
|
+
}
|
|
747
|
+
kind = 4;
|
|
748
|
+
};
|
|
749
|
+
function parseInclude(include) {
|
|
750
|
+
if (include === "$base") return new BaseReference();
|
|
751
|
+
else if (include === "$self") return new SelfReference();
|
|
752
|
+
const indexOfSharp = include.indexOf("#");
|
|
753
|
+
if (indexOfSharp === -1) return new TopLevelReference(include);
|
|
754
|
+
else if (indexOfSharp === 0) return new RelativeReference(include.substring(1));
|
|
755
|
+
else return new TopLevelRepositoryReference(include.substring(0, indexOfSharp), include.substring(indexOfSharp + 1));
|
|
756
|
+
}
|
|
757
|
+
var HAS_BACK_REFERENCES = /\\(\d+)/;
|
|
758
|
+
var BACK_REFERENCING_END = /\\(\d+)/g;
|
|
759
|
+
var endRuleId = -1;
|
|
760
|
+
var whileRuleId = -2;
|
|
761
|
+
function ruleIdFromNumber(id) {
|
|
762
|
+
return id;
|
|
763
|
+
}
|
|
764
|
+
function ruleIdToNumber(id) {
|
|
765
|
+
return id;
|
|
766
|
+
}
|
|
767
|
+
var Rule = class {
|
|
768
|
+
$location;
|
|
769
|
+
id;
|
|
770
|
+
_nameIsCapturing;
|
|
771
|
+
_name;
|
|
772
|
+
_contentNameIsCapturing;
|
|
773
|
+
_contentName;
|
|
774
|
+
constructor($location, id, name, contentName) {
|
|
775
|
+
this.$location = $location;
|
|
776
|
+
this.id = id;
|
|
777
|
+
this._name = name || null;
|
|
778
|
+
this._nameIsCapturing = RegexSource.hasCaptures(this._name);
|
|
779
|
+
this._contentName = contentName || null;
|
|
780
|
+
this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);
|
|
781
|
+
}
|
|
782
|
+
get debugName() {
|
|
783
|
+
const location = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : "unknown";
|
|
784
|
+
return `${this.constructor.name}#${this.id} @ ${location}`;
|
|
785
|
+
}
|
|
786
|
+
getName(lineText, captureIndices) {
|
|
787
|
+
if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) return this._name;
|
|
788
|
+
return RegexSource.replaceCaptures(this._name, lineText, captureIndices);
|
|
789
|
+
}
|
|
790
|
+
getContentName(lineText, captureIndices) {
|
|
791
|
+
if (!this._contentNameIsCapturing || this._contentName === null) return this._contentName;
|
|
792
|
+
return RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
var CaptureRule = class extends Rule {
|
|
796
|
+
retokenizeCapturedWithRuleId;
|
|
797
|
+
constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {
|
|
798
|
+
super($location, id, name, contentName);
|
|
799
|
+
this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;
|
|
800
|
+
}
|
|
801
|
+
dispose() {}
|
|
802
|
+
collectPatterns(grammar, out) {
|
|
803
|
+
throw new Error("Not supported!");
|
|
804
|
+
}
|
|
805
|
+
compile(grammar, endRegexSource) {
|
|
806
|
+
throw new Error("Not supported!");
|
|
807
|
+
}
|
|
808
|
+
compileAG(grammar, endRegexSource, allowA, allowG) {
|
|
809
|
+
throw new Error("Not supported!");
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
var MatchRule = class extends Rule {
|
|
813
|
+
_match;
|
|
814
|
+
captures;
|
|
815
|
+
_cachedCompiledPatterns;
|
|
816
|
+
constructor($location, id, name, match, captures) {
|
|
817
|
+
super($location, id, name, null);
|
|
818
|
+
this._match = new RegExpSource(match, this.id);
|
|
819
|
+
this.captures = captures;
|
|
820
|
+
this._cachedCompiledPatterns = null;
|
|
821
|
+
}
|
|
822
|
+
dispose() {
|
|
823
|
+
if (this._cachedCompiledPatterns) {
|
|
824
|
+
this._cachedCompiledPatterns.dispose();
|
|
825
|
+
this._cachedCompiledPatterns = null;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
get debugMatchRegExp() {
|
|
829
|
+
return `${this._match.source}`;
|
|
830
|
+
}
|
|
831
|
+
collectPatterns(grammar, out) {
|
|
832
|
+
out.push(this._match);
|
|
833
|
+
}
|
|
834
|
+
compile(grammar, endRegexSource) {
|
|
835
|
+
return this._getCachedCompiledPatterns(grammar).compile(grammar);
|
|
836
|
+
}
|
|
837
|
+
compileAG(grammar, endRegexSource, allowA, allowG) {
|
|
838
|
+
return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
|
|
839
|
+
}
|
|
840
|
+
_getCachedCompiledPatterns(grammar) {
|
|
841
|
+
if (!this._cachedCompiledPatterns) {
|
|
842
|
+
this._cachedCompiledPatterns = new RegExpSourceList();
|
|
843
|
+
this.collectPatterns(grammar, this._cachedCompiledPatterns);
|
|
844
|
+
}
|
|
845
|
+
return this._cachedCompiledPatterns;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
var IncludeOnlyRule = class extends Rule {
|
|
849
|
+
hasMissingPatterns;
|
|
850
|
+
patterns;
|
|
851
|
+
_cachedCompiledPatterns;
|
|
852
|
+
constructor($location, id, name, contentName, patterns) {
|
|
853
|
+
super($location, id, name, contentName);
|
|
854
|
+
this.patterns = patterns.patterns;
|
|
855
|
+
this.hasMissingPatterns = patterns.hasMissingPatterns;
|
|
856
|
+
this._cachedCompiledPatterns = null;
|
|
857
|
+
}
|
|
858
|
+
dispose() {
|
|
859
|
+
if (this._cachedCompiledPatterns) {
|
|
860
|
+
this._cachedCompiledPatterns.dispose();
|
|
861
|
+
this._cachedCompiledPatterns = null;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
collectPatterns(grammar, out) {
|
|
865
|
+
for (const pattern of this.patterns) grammar.getRule(pattern).collectPatterns(grammar, out);
|
|
866
|
+
}
|
|
867
|
+
compile(grammar, endRegexSource) {
|
|
868
|
+
return this._getCachedCompiledPatterns(grammar).compile(grammar);
|
|
869
|
+
}
|
|
870
|
+
compileAG(grammar, endRegexSource, allowA, allowG) {
|
|
871
|
+
return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
|
|
872
|
+
}
|
|
873
|
+
_getCachedCompiledPatterns(grammar) {
|
|
874
|
+
if (!this._cachedCompiledPatterns) {
|
|
875
|
+
this._cachedCompiledPatterns = new RegExpSourceList();
|
|
876
|
+
this.collectPatterns(grammar, this._cachedCompiledPatterns);
|
|
877
|
+
}
|
|
878
|
+
return this._cachedCompiledPatterns;
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
var BeginEndRule = class extends Rule {
|
|
882
|
+
_begin;
|
|
883
|
+
beginCaptures;
|
|
884
|
+
_end;
|
|
885
|
+
endHasBackReferences;
|
|
886
|
+
endCaptures;
|
|
887
|
+
applyEndPatternLast;
|
|
888
|
+
hasMissingPatterns;
|
|
889
|
+
patterns;
|
|
890
|
+
_cachedCompiledPatterns;
|
|
891
|
+
constructor($location, id, name, contentName, begin, beginCaptures, end, endCaptures, applyEndPatternLast, patterns) {
|
|
892
|
+
super($location, id, name, contentName);
|
|
893
|
+
this._begin = new RegExpSource(begin, this.id);
|
|
894
|
+
this.beginCaptures = beginCaptures;
|
|
895
|
+
this._end = new RegExpSource(end ? end : "", -1);
|
|
896
|
+
this.endHasBackReferences = this._end.hasBackReferences;
|
|
897
|
+
this.endCaptures = endCaptures;
|
|
898
|
+
this.applyEndPatternLast = applyEndPatternLast || false;
|
|
899
|
+
this.patterns = patterns.patterns;
|
|
900
|
+
this.hasMissingPatterns = patterns.hasMissingPatterns;
|
|
901
|
+
this._cachedCompiledPatterns = null;
|
|
902
|
+
}
|
|
903
|
+
dispose() {
|
|
904
|
+
if (this._cachedCompiledPatterns) {
|
|
905
|
+
this._cachedCompiledPatterns.dispose();
|
|
906
|
+
this._cachedCompiledPatterns = null;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
get debugBeginRegExp() {
|
|
910
|
+
return `${this._begin.source}`;
|
|
911
|
+
}
|
|
912
|
+
get debugEndRegExp() {
|
|
913
|
+
return `${this._end.source}`;
|
|
914
|
+
}
|
|
915
|
+
getEndWithResolvedBackReferences(lineText, captureIndices) {
|
|
916
|
+
return this._end.resolveBackReferences(lineText, captureIndices);
|
|
917
|
+
}
|
|
918
|
+
collectPatterns(grammar, out) {
|
|
919
|
+
out.push(this._begin);
|
|
920
|
+
}
|
|
921
|
+
compile(grammar, endRegexSource) {
|
|
922
|
+
return this._getCachedCompiledPatterns(grammar, endRegexSource).compile(grammar);
|
|
923
|
+
}
|
|
924
|
+
compileAG(grammar, endRegexSource, allowA, allowG) {
|
|
925
|
+
return this._getCachedCompiledPatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);
|
|
926
|
+
}
|
|
927
|
+
_getCachedCompiledPatterns(grammar, endRegexSource) {
|
|
928
|
+
if (!this._cachedCompiledPatterns) {
|
|
929
|
+
this._cachedCompiledPatterns = new RegExpSourceList();
|
|
930
|
+
for (const pattern of this.patterns) grammar.getRule(pattern).collectPatterns(grammar, this._cachedCompiledPatterns);
|
|
931
|
+
if (this.applyEndPatternLast) this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end);
|
|
932
|
+
else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);
|
|
933
|
+
}
|
|
934
|
+
if (this._end.hasBackReferences) {
|
|
935
|
+
if (this.applyEndPatternLast) this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, endRegexSource);
|
|
936
|
+
else this._cachedCompiledPatterns.setSource(0, endRegexSource);
|
|
937
|
+
}
|
|
938
|
+
return this._cachedCompiledPatterns;
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
var BeginWhileRule = class extends Rule {
|
|
942
|
+
_begin;
|
|
943
|
+
beginCaptures;
|
|
944
|
+
whileCaptures;
|
|
945
|
+
_while;
|
|
946
|
+
whileHasBackReferences;
|
|
947
|
+
hasMissingPatterns;
|
|
948
|
+
patterns;
|
|
949
|
+
_cachedCompiledPatterns;
|
|
950
|
+
_cachedCompiledWhilePatterns;
|
|
951
|
+
constructor($location, id, name, contentName, begin, beginCaptures, _while, whileCaptures, patterns) {
|
|
952
|
+
super($location, id, name, contentName);
|
|
953
|
+
this._begin = new RegExpSource(begin, this.id);
|
|
954
|
+
this.beginCaptures = beginCaptures;
|
|
955
|
+
this.whileCaptures = whileCaptures;
|
|
956
|
+
this._while = new RegExpSource(_while, whileRuleId);
|
|
957
|
+
this.whileHasBackReferences = this._while.hasBackReferences;
|
|
958
|
+
this.patterns = patterns.patterns;
|
|
959
|
+
this.hasMissingPatterns = patterns.hasMissingPatterns;
|
|
960
|
+
this._cachedCompiledPatterns = null;
|
|
961
|
+
this._cachedCompiledWhilePatterns = null;
|
|
962
|
+
}
|
|
963
|
+
dispose() {
|
|
964
|
+
if (this._cachedCompiledPatterns) {
|
|
965
|
+
this._cachedCompiledPatterns.dispose();
|
|
966
|
+
this._cachedCompiledPatterns = null;
|
|
967
|
+
}
|
|
968
|
+
if (this._cachedCompiledWhilePatterns) {
|
|
969
|
+
this._cachedCompiledWhilePatterns.dispose();
|
|
970
|
+
this._cachedCompiledWhilePatterns = null;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
get debugBeginRegExp() {
|
|
974
|
+
return `${this._begin.source}`;
|
|
975
|
+
}
|
|
976
|
+
get debugWhileRegExp() {
|
|
977
|
+
return `${this._while.source}`;
|
|
978
|
+
}
|
|
979
|
+
getWhileWithResolvedBackReferences(lineText, captureIndices) {
|
|
980
|
+
return this._while.resolveBackReferences(lineText, captureIndices);
|
|
981
|
+
}
|
|
982
|
+
collectPatterns(grammar, out) {
|
|
983
|
+
out.push(this._begin);
|
|
984
|
+
}
|
|
985
|
+
compile(grammar, endRegexSource) {
|
|
986
|
+
return this._getCachedCompiledPatterns(grammar).compile(grammar);
|
|
987
|
+
}
|
|
988
|
+
compileAG(grammar, endRegexSource, allowA, allowG) {
|
|
989
|
+
return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
|
|
990
|
+
}
|
|
991
|
+
_getCachedCompiledPatterns(grammar) {
|
|
992
|
+
if (!this._cachedCompiledPatterns) {
|
|
993
|
+
this._cachedCompiledPatterns = new RegExpSourceList();
|
|
994
|
+
for (const pattern of this.patterns) grammar.getRule(pattern).collectPatterns(grammar, this._cachedCompiledPatterns);
|
|
995
|
+
}
|
|
996
|
+
return this._cachedCompiledPatterns;
|
|
997
|
+
}
|
|
998
|
+
compileWhile(grammar, endRegexSource) {
|
|
999
|
+
return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compile(grammar);
|
|
1000
|
+
}
|
|
1001
|
+
compileWhileAG(grammar, endRegexSource, allowA, allowG) {
|
|
1002
|
+
return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);
|
|
1003
|
+
}
|
|
1004
|
+
_getCachedCompiledWhilePatterns(grammar, endRegexSource) {
|
|
1005
|
+
if (!this._cachedCompiledWhilePatterns) {
|
|
1006
|
+
this._cachedCompiledWhilePatterns = new RegExpSourceList();
|
|
1007
|
+
this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while);
|
|
1008
|
+
}
|
|
1009
|
+
if (this._while.hasBackReferences) this._cachedCompiledWhilePatterns.setSource(0, endRegexSource ? endRegexSource : "");
|
|
1010
|
+
return this._cachedCompiledWhilePatterns;
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
var RuleFactory = class _RuleFactory {
|
|
1014
|
+
static createCaptureRule(helper, $location, name, contentName, retokenizeCapturedWithRuleId) {
|
|
1015
|
+
return helper.registerRule((id) => {
|
|
1016
|
+
return new CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId);
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
static getCompiledRuleId(desc, helper, repository) {
|
|
1020
|
+
if (!desc.id) helper.registerRule((id) => {
|
|
1021
|
+
desc.id = id;
|
|
1022
|
+
if (desc.match) return new MatchRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.match, _RuleFactory._compileCaptures(desc.captures, helper, repository));
|
|
1023
|
+
if (typeof desc.begin === "undefined") {
|
|
1024
|
+
if (desc.repository) repository = mergeObjects({}, repository, desc.repository);
|
|
1025
|
+
let patterns = desc.patterns;
|
|
1026
|
+
if (typeof patterns === "undefined" && desc.include) patterns = [{ include: desc.include }];
|
|
1027
|
+
return new IncludeOnlyRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, _RuleFactory._compilePatterns(patterns, helper, repository));
|
|
1028
|
+
}
|
|
1029
|
+
if (desc.while) return new BeginWhileRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, desc.begin, _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository), desc.while, _RuleFactory._compileCaptures(desc.whileCaptures || desc.captures, helper, repository), _RuleFactory._compilePatterns(desc.patterns, helper, repository));
|
|
1030
|
+
return new BeginEndRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, desc.begin, _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository), desc.end, _RuleFactory._compileCaptures(desc.endCaptures || desc.captures, helper, repository), desc.applyEndPatternLast, _RuleFactory._compilePatterns(desc.patterns, helper, repository));
|
|
1031
|
+
});
|
|
1032
|
+
return desc.id;
|
|
1033
|
+
}
|
|
1034
|
+
static _compileCaptures(captures, helper, repository) {
|
|
1035
|
+
let r = [];
|
|
1036
|
+
if (captures) {
|
|
1037
|
+
let maximumCaptureId = 0;
|
|
1038
|
+
for (const captureId in captures) {
|
|
1039
|
+
if (captureId === "$vscodeTextmateLocation") continue;
|
|
1040
|
+
const numericCaptureId = parseInt(captureId, 10);
|
|
1041
|
+
if (numericCaptureId > maximumCaptureId) maximumCaptureId = numericCaptureId;
|
|
1042
|
+
}
|
|
1043
|
+
for (let i = 0; i <= maximumCaptureId; i++) r[i] = null;
|
|
1044
|
+
for (const captureId in captures) {
|
|
1045
|
+
if (captureId === "$vscodeTextmateLocation") continue;
|
|
1046
|
+
const numericCaptureId = parseInt(captureId, 10);
|
|
1047
|
+
let retokenizeCapturedWithRuleId = 0;
|
|
1048
|
+
if (captures[captureId].patterns) retokenizeCapturedWithRuleId = _RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);
|
|
1049
|
+
r[numericCaptureId] = _RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
return r;
|
|
1053
|
+
}
|
|
1054
|
+
static _compilePatterns(patterns, helper, repository) {
|
|
1055
|
+
let r = [];
|
|
1056
|
+
if (patterns) for (let i = 0, len = patterns.length; i < len; i++) {
|
|
1057
|
+
const pattern = patterns[i];
|
|
1058
|
+
let ruleId = -1;
|
|
1059
|
+
if (pattern.include) {
|
|
1060
|
+
const reference = parseInclude(pattern.include);
|
|
1061
|
+
switch (reference.kind) {
|
|
1062
|
+
case 0:
|
|
1063
|
+
case 1:
|
|
1064
|
+
ruleId = _RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);
|
|
1065
|
+
break;
|
|
1066
|
+
case 2:
|
|
1067
|
+
let localIncludedRule = repository[reference.ruleName];
|
|
1068
|
+
if (localIncludedRule) ruleId = _RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);
|
|
1069
|
+
break;
|
|
1070
|
+
case 3:
|
|
1071
|
+
case 4:
|
|
1072
|
+
const externalGrammarName = reference.scopeName;
|
|
1073
|
+
const externalGrammarInclude = reference.kind === 4 ? reference.ruleName : null;
|
|
1074
|
+
const externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);
|
|
1075
|
+
if (externalGrammar) {
|
|
1076
|
+
if (externalGrammarInclude) {
|
|
1077
|
+
let externalIncludedRule = externalGrammar.repository[externalGrammarInclude];
|
|
1078
|
+
if (externalIncludedRule) ruleId = _RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);
|
|
1079
|
+
} else ruleId = _RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
} else ruleId = _RuleFactory.getCompiledRuleId(pattern, helper, repository);
|
|
1083
|
+
if (ruleId !== -1) {
|
|
1084
|
+
const rule = helper.getRule(ruleId);
|
|
1085
|
+
let skipRule = false;
|
|
1086
|
+
if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {
|
|
1087
|
+
if (rule.hasMissingPatterns && rule.patterns.length === 0) skipRule = true;
|
|
1088
|
+
}
|
|
1089
|
+
if (skipRule) continue;
|
|
1090
|
+
r.push(ruleId);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
return {
|
|
1094
|
+
patterns: r,
|
|
1095
|
+
hasMissingPatterns: (patterns ? patterns.length : 0) !== r.length
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
var RegExpSource = class _RegExpSource {
|
|
1100
|
+
source;
|
|
1101
|
+
ruleId;
|
|
1102
|
+
hasAnchor;
|
|
1103
|
+
hasBackReferences;
|
|
1104
|
+
_anchorCache;
|
|
1105
|
+
constructor(regExpSource, ruleId) {
|
|
1106
|
+
if (regExpSource && typeof regExpSource === "string") {
|
|
1107
|
+
const len = regExpSource.length;
|
|
1108
|
+
let lastPushedPos = 0;
|
|
1109
|
+
let output = [];
|
|
1110
|
+
let hasAnchor = false;
|
|
1111
|
+
for (let pos = 0; pos < len; pos++) if (regExpSource.charAt(pos) === "\\") {
|
|
1112
|
+
if (pos + 1 < len) {
|
|
1113
|
+
const nextCh = regExpSource.charAt(pos + 1);
|
|
1114
|
+
if (nextCh === "z") {
|
|
1115
|
+
output.push(regExpSource.substring(lastPushedPos, pos));
|
|
1116
|
+
output.push("$(?!\\n)(?<!\\n)");
|
|
1117
|
+
lastPushedPos = pos + 2;
|
|
1118
|
+
} else if (nextCh === "A" || nextCh === "G") hasAnchor = true;
|
|
1119
|
+
pos++;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
this.hasAnchor = hasAnchor;
|
|
1123
|
+
if (lastPushedPos === 0) this.source = regExpSource;
|
|
1124
|
+
else {
|
|
1125
|
+
output.push(regExpSource.substring(lastPushedPos, len));
|
|
1126
|
+
this.source = output.join("");
|
|
1127
|
+
}
|
|
1128
|
+
} else {
|
|
1129
|
+
this.hasAnchor = false;
|
|
1130
|
+
this.source = regExpSource;
|
|
1131
|
+
}
|
|
1132
|
+
if (this.hasAnchor) this._anchorCache = this._buildAnchorCache();
|
|
1133
|
+
else this._anchorCache = null;
|
|
1134
|
+
this.ruleId = ruleId;
|
|
1135
|
+
if (typeof this.source === "string") this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);
|
|
1136
|
+
else this.hasBackReferences = false;
|
|
1137
|
+
}
|
|
1138
|
+
clone() {
|
|
1139
|
+
return new _RegExpSource(this.source, this.ruleId);
|
|
1140
|
+
}
|
|
1141
|
+
setSource(newSource) {
|
|
1142
|
+
if (this.source === newSource) return;
|
|
1143
|
+
this.source = newSource;
|
|
1144
|
+
if (this.hasAnchor) this._anchorCache = this._buildAnchorCache();
|
|
1145
|
+
}
|
|
1146
|
+
resolveBackReferences(lineText, captureIndices) {
|
|
1147
|
+
if (typeof this.source !== "string") throw new Error("This method should only be called if the source is a string");
|
|
1148
|
+
let capturedValues = captureIndices.map((capture) => {
|
|
1149
|
+
return lineText.substring(capture.start, capture.end);
|
|
1150
|
+
});
|
|
1151
|
+
BACK_REFERENCING_END.lastIndex = 0;
|
|
1152
|
+
return this.source.replace(BACK_REFERENCING_END, (match, g1) => {
|
|
1153
|
+
return escapeRegExpCharacters(capturedValues[parseInt(g1, 10)] || "");
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
_buildAnchorCache() {
|
|
1157
|
+
if (typeof this.source !== "string") throw new Error("This method should only be called if the source is a string");
|
|
1158
|
+
let A0_G0_result = [];
|
|
1159
|
+
let A0_G1_result = [];
|
|
1160
|
+
let A1_G0_result = [];
|
|
1161
|
+
let A1_G1_result = [];
|
|
1162
|
+
let pos, len, ch, nextCh;
|
|
1163
|
+
for (pos = 0, len = this.source.length; pos < len; pos++) {
|
|
1164
|
+
ch = this.source.charAt(pos);
|
|
1165
|
+
A0_G0_result[pos] = ch;
|
|
1166
|
+
A0_G1_result[pos] = ch;
|
|
1167
|
+
A1_G0_result[pos] = ch;
|
|
1168
|
+
A1_G1_result[pos] = ch;
|
|
1169
|
+
if (ch === "\\") {
|
|
1170
|
+
if (pos + 1 < len) {
|
|
1171
|
+
nextCh = this.source.charAt(pos + 1);
|
|
1172
|
+
if (nextCh === "A") {
|
|
1173
|
+
A0_G0_result[pos + 1] = "";
|
|
1174
|
+
A0_G1_result[pos + 1] = "";
|
|
1175
|
+
A1_G0_result[pos + 1] = "A";
|
|
1176
|
+
A1_G1_result[pos + 1] = "A";
|
|
1177
|
+
} else if (nextCh === "G") {
|
|
1178
|
+
A0_G0_result[pos + 1] = "";
|
|
1179
|
+
A0_G1_result[pos + 1] = "G";
|
|
1180
|
+
A1_G0_result[pos + 1] = "";
|
|
1181
|
+
A1_G1_result[pos + 1] = "G";
|
|
1182
|
+
} else {
|
|
1183
|
+
A0_G0_result[pos + 1] = nextCh;
|
|
1184
|
+
A0_G1_result[pos + 1] = nextCh;
|
|
1185
|
+
A1_G0_result[pos + 1] = nextCh;
|
|
1186
|
+
A1_G1_result[pos + 1] = nextCh;
|
|
1187
|
+
}
|
|
1188
|
+
pos++;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
return {
|
|
1193
|
+
A0_G0: A0_G0_result.join(""),
|
|
1194
|
+
A0_G1: A0_G1_result.join(""),
|
|
1195
|
+
A1_G0: A1_G0_result.join(""),
|
|
1196
|
+
A1_G1: A1_G1_result.join("")
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
resolveAnchors(allowA, allowG) {
|
|
1200
|
+
if (!this.hasAnchor || !this._anchorCache || typeof this.source !== "string") return this.source;
|
|
1201
|
+
if (allowA) {
|
|
1202
|
+
if (allowG) return this._anchorCache.A1_G1;
|
|
1203
|
+
else return this._anchorCache.A1_G0;
|
|
1204
|
+
} else if (allowG) return this._anchorCache.A0_G1;
|
|
1205
|
+
else return this._anchorCache.A0_G0;
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
var RegExpSourceList = class {
|
|
1209
|
+
_items;
|
|
1210
|
+
_hasAnchors;
|
|
1211
|
+
_cached;
|
|
1212
|
+
_anchorCache;
|
|
1213
|
+
constructor() {
|
|
1214
|
+
this._items = [];
|
|
1215
|
+
this._hasAnchors = false;
|
|
1216
|
+
this._cached = null;
|
|
1217
|
+
this._anchorCache = {
|
|
1218
|
+
A0_G0: null,
|
|
1219
|
+
A0_G1: null,
|
|
1220
|
+
A1_G0: null,
|
|
1221
|
+
A1_G1: null
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
dispose() {
|
|
1225
|
+
this._disposeCaches();
|
|
1226
|
+
}
|
|
1227
|
+
_disposeCaches() {
|
|
1228
|
+
if (this._cached) {
|
|
1229
|
+
this._cached.dispose();
|
|
1230
|
+
this._cached = null;
|
|
1231
|
+
}
|
|
1232
|
+
if (this._anchorCache.A0_G0) {
|
|
1233
|
+
this._anchorCache.A0_G0.dispose();
|
|
1234
|
+
this._anchorCache.A0_G0 = null;
|
|
1235
|
+
}
|
|
1236
|
+
if (this._anchorCache.A0_G1) {
|
|
1237
|
+
this._anchorCache.A0_G1.dispose();
|
|
1238
|
+
this._anchorCache.A0_G1 = null;
|
|
1239
|
+
}
|
|
1240
|
+
if (this._anchorCache.A1_G0) {
|
|
1241
|
+
this._anchorCache.A1_G0.dispose();
|
|
1242
|
+
this._anchorCache.A1_G0 = null;
|
|
1243
|
+
}
|
|
1244
|
+
if (this._anchorCache.A1_G1) {
|
|
1245
|
+
this._anchorCache.A1_G1.dispose();
|
|
1246
|
+
this._anchorCache.A1_G1 = null;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
push(item) {
|
|
1250
|
+
this._items.push(item);
|
|
1251
|
+
this._hasAnchors = this._hasAnchors || item.hasAnchor;
|
|
1252
|
+
}
|
|
1253
|
+
unshift(item) {
|
|
1254
|
+
this._items.unshift(item);
|
|
1255
|
+
this._hasAnchors = this._hasAnchors || item.hasAnchor;
|
|
1256
|
+
}
|
|
1257
|
+
length() {
|
|
1258
|
+
return this._items.length;
|
|
1259
|
+
}
|
|
1260
|
+
setSource(index, newSource) {
|
|
1261
|
+
if (this._items[index].source !== newSource) {
|
|
1262
|
+
this._disposeCaches();
|
|
1263
|
+
this._items[index].setSource(newSource);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
compile(onigLib) {
|
|
1267
|
+
if (!this._cached) {
|
|
1268
|
+
let regExps = this._items.map((e) => e.source);
|
|
1269
|
+
this._cached = new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));
|
|
1270
|
+
}
|
|
1271
|
+
return this._cached;
|
|
1272
|
+
}
|
|
1273
|
+
compileAG(onigLib, allowA, allowG) {
|
|
1274
|
+
if (!this._hasAnchors) return this.compile(onigLib);
|
|
1275
|
+
else if (allowA) {
|
|
1276
|
+
if (allowG) {
|
|
1277
|
+
if (!this._anchorCache.A1_G1) this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);
|
|
1278
|
+
return this._anchorCache.A1_G1;
|
|
1279
|
+
} else {
|
|
1280
|
+
if (!this._anchorCache.A1_G0) this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);
|
|
1281
|
+
return this._anchorCache.A1_G0;
|
|
1282
|
+
}
|
|
1283
|
+
} else if (allowG) {
|
|
1284
|
+
if (!this._anchorCache.A0_G1) this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);
|
|
1285
|
+
return this._anchorCache.A0_G1;
|
|
1286
|
+
} else {
|
|
1287
|
+
if (!this._anchorCache.A0_G0) this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);
|
|
1288
|
+
return this._anchorCache.A0_G0;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
_resolveAnchors(onigLib, allowA, allowG) {
|
|
1292
|
+
return new CompiledRule(onigLib, this._items.map((e) => e.resolveAnchors(allowA, allowG)), this._items.map((e) => e.ruleId));
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
var CompiledRule = class {
|
|
1296
|
+
constructor(onigLib, regExps, rules) {
|
|
1297
|
+
this.regExps = regExps;
|
|
1298
|
+
this.rules = rules;
|
|
1299
|
+
this.scanner = onigLib.createOnigScanner(regExps);
|
|
1300
|
+
}
|
|
1301
|
+
scanner;
|
|
1302
|
+
dispose() {
|
|
1303
|
+
if (typeof this.scanner.dispose === "function") this.scanner.dispose();
|
|
1304
|
+
}
|
|
1305
|
+
toString() {
|
|
1306
|
+
const r = [];
|
|
1307
|
+
for (let i = 0, len = this.rules.length; i < len; i++) r.push(" - " + this.rules[i] + ": " + this.regExps[i]);
|
|
1308
|
+
return r.join("\n");
|
|
1309
|
+
}
|
|
1310
|
+
findNextMatchSync(string, startPosition, options) {
|
|
1311
|
+
const result = this.scanner.findNextMatchSync(string, startPosition, options);
|
|
1312
|
+
if (!result) return null;
|
|
1313
|
+
return {
|
|
1314
|
+
ruleId: this.rules[result.index],
|
|
1315
|
+
captureIndices: result.captureIndices
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
};
|
|
1319
|
+
var BasicScopeAttributes = class {
|
|
1320
|
+
constructor(languageId, tokenType) {
|
|
1321
|
+
this.languageId = languageId;
|
|
1322
|
+
this.tokenType = tokenType;
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
var BasicScopeAttributesProvider = class _BasicScopeAttributesProvider {
|
|
1326
|
+
_defaultAttributes;
|
|
1327
|
+
_embeddedLanguagesMatcher;
|
|
1328
|
+
constructor(initialLanguageId, embeddedLanguages) {
|
|
1329
|
+
this._defaultAttributes = new BasicScopeAttributes(initialLanguageId, 8);
|
|
1330
|
+
this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(embeddedLanguages || {}));
|
|
1331
|
+
}
|
|
1332
|
+
getDefaultAttributes() {
|
|
1333
|
+
return this._defaultAttributes;
|
|
1334
|
+
}
|
|
1335
|
+
getBasicScopeAttributes(scopeName) {
|
|
1336
|
+
if (scopeName === null) return _BasicScopeAttributesProvider._NULL_SCOPE_METADATA;
|
|
1337
|
+
return this._getBasicScopeAttributes.get(scopeName);
|
|
1338
|
+
}
|
|
1339
|
+
static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);
|
|
1340
|
+
_getBasicScopeAttributes = new CachedFn((scopeName) => {
|
|
1341
|
+
return new BasicScopeAttributes(this._scopeToLanguage(scopeName), this._toStandardTokenType(scopeName));
|
|
1342
|
+
});
|
|
1343
|
+
/**
|
|
1344
|
+
* Given a produced TM scope, return the language that token describes or null if unknown.
|
|
1345
|
+
* e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null
|
|
1346
|
+
*/
|
|
1347
|
+
_scopeToLanguage(scope) {
|
|
1348
|
+
return this._embeddedLanguagesMatcher.match(scope) || 0;
|
|
1349
|
+
}
|
|
1350
|
+
_toStandardTokenType(scopeName) {
|
|
1351
|
+
const m = scopeName.match(_BasicScopeAttributesProvider.STANDARD_TOKEN_TYPE_REGEXP);
|
|
1352
|
+
if (!m) return 8;
|
|
1353
|
+
switch (m[1]) {
|
|
1354
|
+
case "comment": return 1;
|
|
1355
|
+
case "string": return 2;
|
|
1356
|
+
case "regex": return 3;
|
|
1357
|
+
case "meta.embedded": return 0;
|
|
1358
|
+
}
|
|
1359
|
+
throw new Error("Unexpected match for standard token type!");
|
|
1360
|
+
}
|
|
1361
|
+
static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
|
|
1362
|
+
};
|
|
1363
|
+
var ScopeMatcher = class {
|
|
1364
|
+
values;
|
|
1365
|
+
scopesRegExp;
|
|
1366
|
+
constructor(values) {
|
|
1367
|
+
if (values.length === 0) {
|
|
1368
|
+
this.values = null;
|
|
1369
|
+
this.scopesRegExp = null;
|
|
1370
|
+
} else {
|
|
1371
|
+
this.values = new Map(values);
|
|
1372
|
+
const escapedScopes = values.map(([scopeName, value]) => escapeRegExpCharacters(scopeName));
|
|
1373
|
+
escapedScopes.sort();
|
|
1374
|
+
escapedScopes.reverse();
|
|
1375
|
+
this.scopesRegExp = new RegExp(`^((${escapedScopes.join(")|(")}))($|\\.)`, "");
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
match(scope) {
|
|
1379
|
+
if (!this.scopesRegExp) return;
|
|
1380
|
+
const m = scope.match(this.scopesRegExp);
|
|
1381
|
+
if (!m) return;
|
|
1382
|
+
return this.values.get(m[1]);
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
typeof process !== "undefined" && process.env["VSCODE_TEXTMATE_DEBUG"];
|
|
1386
|
+
var UseOnigurumaFindOptions = false;
|
|
1387
|
+
var TokenizeStringResult = class {
|
|
1388
|
+
constructor(stack, stoppedEarly) {
|
|
1389
|
+
this.stack = stack;
|
|
1390
|
+
this.stoppedEarly = stoppedEarly;
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
function _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens, checkWhileConditions, timeLimit) {
|
|
1394
|
+
const lineLength = lineText.content.length;
|
|
1395
|
+
let STOP = false;
|
|
1396
|
+
let anchorPosition = -1;
|
|
1397
|
+
if (checkWhileConditions) {
|
|
1398
|
+
const whileCheckResult = _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens);
|
|
1399
|
+
stack = whileCheckResult.stack;
|
|
1400
|
+
linePos = whileCheckResult.linePos;
|
|
1401
|
+
isFirstLine = whileCheckResult.isFirstLine;
|
|
1402
|
+
anchorPosition = whileCheckResult.anchorPosition;
|
|
1403
|
+
}
|
|
1404
|
+
const startTime = Date.now();
|
|
1405
|
+
while (!STOP) {
|
|
1406
|
+
if (timeLimit !== 0) {
|
|
1407
|
+
if (Date.now() - startTime > timeLimit) return new TokenizeStringResult(stack, true);
|
|
1408
|
+
}
|
|
1409
|
+
scanNext();
|
|
1410
|
+
}
|
|
1411
|
+
return new TokenizeStringResult(stack, false);
|
|
1412
|
+
function scanNext() {
|
|
1413
|
+
const r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
|
|
1414
|
+
if (!r) {
|
|
1415
|
+
lineTokens.produce(stack, lineLength);
|
|
1416
|
+
STOP = true;
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
const captureIndices = r.captureIndices;
|
|
1420
|
+
const matchedRuleId = r.matchedRuleId;
|
|
1421
|
+
const hasAdvanced = captureIndices && captureIndices.length > 0 ? captureIndices[0].end > linePos : false;
|
|
1422
|
+
if (matchedRuleId === endRuleId) {
|
|
1423
|
+
const poppedRule = stack.getRule(grammar);
|
|
1424
|
+
lineTokens.produce(stack, captureIndices[0].start);
|
|
1425
|
+
stack = stack.withContentNameScopesList(stack.nameScopesList);
|
|
1426
|
+
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices);
|
|
1427
|
+
lineTokens.produce(stack, captureIndices[0].end);
|
|
1428
|
+
const popped = stack;
|
|
1429
|
+
stack = stack.parent;
|
|
1430
|
+
anchorPosition = popped.getAnchorPos();
|
|
1431
|
+
if (!hasAdvanced && popped.getEnterPos() === linePos) {
|
|
1432
|
+
stack = popped;
|
|
1433
|
+
lineTokens.produce(stack, lineLength);
|
|
1434
|
+
STOP = true;
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
} else {
|
|
1438
|
+
const _rule = grammar.getRule(matchedRuleId);
|
|
1439
|
+
lineTokens.produce(stack, captureIndices[0].start);
|
|
1440
|
+
const beforePush = stack;
|
|
1441
|
+
const scopeName = _rule.getName(lineText.content, captureIndices);
|
|
1442
|
+
const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);
|
|
1443
|
+
stack = stack.push(matchedRuleId, linePos, anchorPosition, captureIndices[0].end === lineLength, null, nameScopesList, nameScopesList);
|
|
1444
|
+
if (_rule instanceof BeginEndRule) {
|
|
1445
|
+
const pushedRule = _rule;
|
|
1446
|
+
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);
|
|
1447
|
+
lineTokens.produce(stack, captureIndices[0].end);
|
|
1448
|
+
anchorPosition = captureIndices[0].end;
|
|
1449
|
+
const contentName = pushedRule.getContentName(lineText.content, captureIndices);
|
|
1450
|
+
const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);
|
|
1451
|
+
stack = stack.withContentNameScopesList(contentNameScopesList);
|
|
1452
|
+
if (pushedRule.endHasBackReferences) stack = stack.withEndRule(pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices));
|
|
1453
|
+
if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
|
|
1454
|
+
stack = stack.pop();
|
|
1455
|
+
lineTokens.produce(stack, lineLength);
|
|
1456
|
+
STOP = true;
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
} else if (_rule instanceof BeginWhileRule) {
|
|
1460
|
+
const pushedRule = _rule;
|
|
1461
|
+
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);
|
|
1462
|
+
lineTokens.produce(stack, captureIndices[0].end);
|
|
1463
|
+
anchorPosition = captureIndices[0].end;
|
|
1464
|
+
const contentName = pushedRule.getContentName(lineText.content, captureIndices);
|
|
1465
|
+
const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);
|
|
1466
|
+
stack = stack.withContentNameScopesList(contentNameScopesList);
|
|
1467
|
+
if (pushedRule.whileHasBackReferences) stack = stack.withEndRule(pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices));
|
|
1468
|
+
if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
|
|
1469
|
+
stack = stack.pop();
|
|
1470
|
+
lineTokens.produce(stack, lineLength);
|
|
1471
|
+
STOP = true;
|
|
1472
|
+
return;
|
|
1473
|
+
}
|
|
1474
|
+
} else {
|
|
1475
|
+
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, _rule.captures, captureIndices);
|
|
1476
|
+
lineTokens.produce(stack, captureIndices[0].end);
|
|
1477
|
+
stack = stack.pop();
|
|
1478
|
+
if (!hasAdvanced) {
|
|
1479
|
+
stack = stack.safePop();
|
|
1480
|
+
lineTokens.produce(stack, lineLength);
|
|
1481
|
+
STOP = true;
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
if (captureIndices[0].end > linePos) {
|
|
1487
|
+
linePos = captureIndices[0].end;
|
|
1488
|
+
isFirstLine = false;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
function _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {
|
|
1493
|
+
let anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1;
|
|
1494
|
+
const whileRules = [];
|
|
1495
|
+
for (let node = stack; node; node = node.pop()) {
|
|
1496
|
+
const nodeRule = node.getRule(grammar);
|
|
1497
|
+
if (nodeRule instanceof BeginWhileRule) whileRules.push({
|
|
1498
|
+
rule: nodeRule,
|
|
1499
|
+
stack: node
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
for (let whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {
|
|
1503
|
+
const { ruleScanner, findOptions } = prepareRuleWhileSearch(whileRule.rule, grammar, whileRule.stack.endRule, isFirstLine, linePos === anchorPosition);
|
|
1504
|
+
const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
|
|
1505
|
+
if (r) {
|
|
1506
|
+
if (r.ruleId !== whileRuleId) {
|
|
1507
|
+
stack = whileRule.stack.pop();
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
if (r.captureIndices && r.captureIndices.length) {
|
|
1511
|
+
lineTokens.produce(whileRule.stack, r.captureIndices[0].start);
|
|
1512
|
+
handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);
|
|
1513
|
+
lineTokens.produce(whileRule.stack, r.captureIndices[0].end);
|
|
1514
|
+
anchorPosition = r.captureIndices[0].end;
|
|
1515
|
+
if (r.captureIndices[0].end > linePos) {
|
|
1516
|
+
linePos = r.captureIndices[0].end;
|
|
1517
|
+
isFirstLine = false;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
} else {
|
|
1521
|
+
stack = whileRule.stack.pop();
|
|
1522
|
+
break;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
return {
|
|
1526
|
+
stack,
|
|
1527
|
+
linePos,
|
|
1528
|
+
anchorPosition,
|
|
1529
|
+
isFirstLine
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
function matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
|
|
1533
|
+
const matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
|
|
1534
|
+
const injections = grammar.getInjections();
|
|
1535
|
+
if (injections.length === 0) return matchResult;
|
|
1536
|
+
const injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
|
|
1537
|
+
if (!injectionResult) return matchResult;
|
|
1538
|
+
if (!matchResult) return injectionResult;
|
|
1539
|
+
const matchResultScore = matchResult.captureIndices[0].start;
|
|
1540
|
+
const injectionResultScore = injectionResult.captureIndices[0].start;
|
|
1541
|
+
if (injectionResultScore < matchResultScore || injectionResult.priorityMatch && injectionResultScore === matchResultScore) return injectionResult;
|
|
1542
|
+
return matchResult;
|
|
1543
|
+
}
|
|
1544
|
+
function matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
|
|
1545
|
+
const { ruleScanner, findOptions } = prepareRuleSearch(stack.getRule(grammar), grammar, stack.endRule, isFirstLine, linePos === anchorPosition);
|
|
1546
|
+
const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
|
|
1547
|
+
if (r) return {
|
|
1548
|
+
captureIndices: r.captureIndices,
|
|
1549
|
+
matchedRuleId: r.ruleId
|
|
1550
|
+
};
|
|
1551
|
+
return null;
|
|
1552
|
+
}
|
|
1553
|
+
function matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
|
|
1554
|
+
let bestMatchRating = Number.MAX_VALUE;
|
|
1555
|
+
let bestMatchCaptureIndices = null;
|
|
1556
|
+
let bestMatchRuleId;
|
|
1557
|
+
let bestMatchResultPriority = 0;
|
|
1558
|
+
const scopes = stack.contentNameScopesList.getScopeNames();
|
|
1559
|
+
for (let i = 0, len = injections.length; i < len; i++) {
|
|
1560
|
+
const injection = injections[i];
|
|
1561
|
+
if (!injection.matcher(scopes)) continue;
|
|
1562
|
+
const { ruleScanner, findOptions } = prepareRuleSearch(grammar.getRule(injection.ruleId), grammar, null, isFirstLine, linePos === anchorPosition);
|
|
1563
|
+
const matchResult = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
|
|
1564
|
+
if (!matchResult) continue;
|
|
1565
|
+
const matchRating = matchResult.captureIndices[0].start;
|
|
1566
|
+
if (matchRating >= bestMatchRating) continue;
|
|
1567
|
+
bestMatchRating = matchRating;
|
|
1568
|
+
bestMatchCaptureIndices = matchResult.captureIndices;
|
|
1569
|
+
bestMatchRuleId = matchResult.ruleId;
|
|
1570
|
+
bestMatchResultPriority = injection.priority;
|
|
1571
|
+
if (bestMatchRating === linePos) break;
|
|
1572
|
+
}
|
|
1573
|
+
if (bestMatchCaptureIndices) return {
|
|
1574
|
+
priorityMatch: bestMatchResultPriority === -1,
|
|
1575
|
+
captureIndices: bestMatchCaptureIndices,
|
|
1576
|
+
matchedRuleId: bestMatchRuleId
|
|
1577
|
+
};
|
|
1578
|
+
return null;
|
|
1579
|
+
}
|
|
1580
|
+
function prepareRuleSearch(rule, grammar, endRegexSource, allowA, allowG) {
|
|
1581
|
+
if (UseOnigurumaFindOptions) return {
|
|
1582
|
+
ruleScanner: rule.compile(grammar, endRegexSource),
|
|
1583
|
+
findOptions: getFindOptions(allowA, allowG)
|
|
1584
|
+
};
|
|
1585
|
+
return {
|
|
1586
|
+
ruleScanner: rule.compileAG(grammar, endRegexSource, allowA, allowG),
|
|
1587
|
+
findOptions: 0
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
function prepareRuleWhileSearch(rule, grammar, endRegexSource, allowA, allowG) {
|
|
1591
|
+
if (UseOnigurumaFindOptions) return {
|
|
1592
|
+
ruleScanner: rule.compileWhile(grammar, endRegexSource),
|
|
1593
|
+
findOptions: getFindOptions(allowA, allowG)
|
|
1594
|
+
};
|
|
1595
|
+
return {
|
|
1596
|
+
ruleScanner: rule.compileWhileAG(grammar, endRegexSource, allowA, allowG),
|
|
1597
|
+
findOptions: 0
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
function getFindOptions(allowA, allowG) {
|
|
1601
|
+
let options = 0;
|
|
1602
|
+
if (!allowA) options |= 1;
|
|
1603
|
+
if (!allowG) options |= 4;
|
|
1604
|
+
return options;
|
|
1605
|
+
}
|
|
1606
|
+
function handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {
|
|
1607
|
+
if (captures.length === 0) return;
|
|
1608
|
+
const lineTextContent = lineText.content;
|
|
1609
|
+
const len = Math.min(captures.length, captureIndices.length);
|
|
1610
|
+
const localStack = [];
|
|
1611
|
+
const maxEnd = captureIndices[0].end;
|
|
1612
|
+
for (let i = 0; i < len; i++) {
|
|
1613
|
+
const captureRule = captures[i];
|
|
1614
|
+
if (captureRule === null) continue;
|
|
1615
|
+
const captureIndex = captureIndices[i];
|
|
1616
|
+
if (captureIndex.length === 0) continue;
|
|
1617
|
+
if (captureIndex.start > maxEnd) break;
|
|
1618
|
+
while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {
|
|
1619
|
+
lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);
|
|
1620
|
+
localStack.pop();
|
|
1621
|
+
}
|
|
1622
|
+
if (localStack.length > 0) lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);
|
|
1623
|
+
else lineTokens.produce(stack, captureIndex.start);
|
|
1624
|
+
if (captureRule.retokenizeCapturedWithRuleId) {
|
|
1625
|
+
const scopeName = captureRule.getName(lineTextContent, captureIndices);
|
|
1626
|
+
const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);
|
|
1627
|
+
const contentName = captureRule.getContentName(lineTextContent, captureIndices);
|
|
1628
|
+
const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);
|
|
1629
|
+
const stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList);
|
|
1630
|
+
const onigSubStr = grammar.createOnigString(lineTextContent.substring(0, captureIndex.end));
|
|
1631
|
+
_tokenizeString(grammar, onigSubStr, isFirstLine && captureIndex.start === 0, captureIndex.start, stackClone, lineTokens, false, 0);
|
|
1632
|
+
disposeOnigString(onigSubStr);
|
|
1633
|
+
continue;
|
|
1634
|
+
}
|
|
1635
|
+
const captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices);
|
|
1636
|
+
if (captureRuleScopeName !== null) {
|
|
1637
|
+
const captureRuleScopesList = (localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList).pushAttributed(captureRuleScopeName, grammar);
|
|
1638
|
+
localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
while (localStack.length > 0) {
|
|
1642
|
+
lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);
|
|
1643
|
+
localStack.pop();
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
var LocalStackElement = class {
|
|
1647
|
+
scopes;
|
|
1648
|
+
endPos;
|
|
1649
|
+
constructor(scopes, endPos) {
|
|
1650
|
+
this.scopes = scopes;
|
|
1651
|
+
this.endPos = endPos;
|
|
1652
|
+
}
|
|
1653
|
+
};
|
|
1654
|
+
function createGrammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib) {
|
|
1655
|
+
return new Grammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib);
|
|
1656
|
+
}
|
|
1657
|
+
function collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {
|
|
1658
|
+
const matchers = createMatchers(selector, nameMatcher);
|
|
1659
|
+
const ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);
|
|
1660
|
+
for (const matcher of matchers) result.push({
|
|
1661
|
+
debugSelector: selector,
|
|
1662
|
+
matcher: matcher.matcher,
|
|
1663
|
+
ruleId,
|
|
1664
|
+
grammar,
|
|
1665
|
+
priority: matcher.priority
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
function nameMatcher(identifers, scopes) {
|
|
1669
|
+
if (scopes.length < identifers.length) return false;
|
|
1670
|
+
let lastIndex = 0;
|
|
1671
|
+
return identifers.every((identifier) => {
|
|
1672
|
+
for (let i = lastIndex; i < scopes.length; i++) if (scopesAreMatching(scopes[i], identifier)) {
|
|
1673
|
+
lastIndex = i + 1;
|
|
1674
|
+
return true;
|
|
1675
|
+
}
|
|
1676
|
+
return false;
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
function scopesAreMatching(thisScopeName, scopeName) {
|
|
1680
|
+
if (!thisScopeName) return false;
|
|
1681
|
+
if (thisScopeName === scopeName) return true;
|
|
1682
|
+
const len = scopeName.length;
|
|
1683
|
+
return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === ".";
|
|
1684
|
+
}
|
|
1685
|
+
var Grammar = class {
|
|
1686
|
+
constructor(_rootScopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, _onigLib) {
|
|
1687
|
+
this._rootScopeName = _rootScopeName;
|
|
1688
|
+
this.balancedBracketSelectors = balancedBracketSelectors;
|
|
1689
|
+
this._onigLib = _onigLib;
|
|
1690
|
+
this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(initialLanguage, embeddedLanguages);
|
|
1691
|
+
this._rootId = -1;
|
|
1692
|
+
this._lastRuleId = 0;
|
|
1693
|
+
this._ruleId2desc = [null];
|
|
1694
|
+
this._includedGrammars = {};
|
|
1695
|
+
this._grammarRepository = grammarRepository;
|
|
1696
|
+
this._grammar = initGrammar(grammar, null);
|
|
1697
|
+
this._injections = null;
|
|
1698
|
+
this._tokenTypeMatchers = [];
|
|
1699
|
+
if (tokenTypes) for (const selector of Object.keys(tokenTypes)) {
|
|
1700
|
+
const matchers = createMatchers(selector, nameMatcher);
|
|
1701
|
+
for (const matcher of matchers) this._tokenTypeMatchers.push({
|
|
1702
|
+
matcher: matcher.matcher,
|
|
1703
|
+
type: tokenTypes[selector]
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
_rootId;
|
|
1708
|
+
_lastRuleId;
|
|
1709
|
+
_ruleId2desc;
|
|
1710
|
+
_includedGrammars;
|
|
1711
|
+
_grammarRepository;
|
|
1712
|
+
_grammar;
|
|
1713
|
+
_injections;
|
|
1714
|
+
_basicScopeAttributesProvider;
|
|
1715
|
+
_tokenTypeMatchers;
|
|
1716
|
+
get themeProvider() {
|
|
1717
|
+
return this._grammarRepository;
|
|
1718
|
+
}
|
|
1719
|
+
dispose() {
|
|
1720
|
+
for (const rule of this._ruleId2desc) if (rule) rule.dispose();
|
|
1721
|
+
}
|
|
1722
|
+
createOnigScanner(sources) {
|
|
1723
|
+
return this._onigLib.createOnigScanner(sources);
|
|
1724
|
+
}
|
|
1725
|
+
createOnigString(sources) {
|
|
1726
|
+
return this._onigLib.createOnigString(sources);
|
|
1727
|
+
}
|
|
1728
|
+
getMetadataForScope(scope) {
|
|
1729
|
+
return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);
|
|
1730
|
+
}
|
|
1731
|
+
_collectInjections() {
|
|
1732
|
+
const grammarRepository = {
|
|
1733
|
+
lookup: (scopeName2) => {
|
|
1734
|
+
if (scopeName2 === this._rootScopeName) return this._grammar;
|
|
1735
|
+
return this.getExternalGrammar(scopeName2);
|
|
1736
|
+
},
|
|
1737
|
+
injections: (scopeName2) => {
|
|
1738
|
+
return this._grammarRepository.injections(scopeName2);
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
const result = [];
|
|
1742
|
+
const scopeName = this._rootScopeName;
|
|
1743
|
+
const grammar = grammarRepository.lookup(scopeName);
|
|
1744
|
+
if (grammar) {
|
|
1745
|
+
const rawInjections = grammar.injections;
|
|
1746
|
+
if (rawInjections) for (let expression in rawInjections) collectInjections(result, expression, rawInjections[expression], this, grammar);
|
|
1747
|
+
const injectionScopeNames = this._grammarRepository.injections(scopeName);
|
|
1748
|
+
if (injectionScopeNames) injectionScopeNames.forEach((injectionScopeName) => {
|
|
1749
|
+
const injectionGrammar = this.getExternalGrammar(injectionScopeName);
|
|
1750
|
+
if (injectionGrammar) {
|
|
1751
|
+
const selector = injectionGrammar.injectionSelector;
|
|
1752
|
+
if (selector) collectInjections(result, selector, injectionGrammar, this, injectionGrammar);
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
result.sort((i1, i2) => i1.priority - i2.priority);
|
|
1757
|
+
return result;
|
|
1758
|
+
}
|
|
1759
|
+
getInjections() {
|
|
1760
|
+
if (this._injections === null) this._injections = this._collectInjections();
|
|
1761
|
+
return this._injections;
|
|
1762
|
+
}
|
|
1763
|
+
registerRule(factory) {
|
|
1764
|
+
const id = ++this._lastRuleId;
|
|
1765
|
+
const result = factory(ruleIdFromNumber(id));
|
|
1766
|
+
this._ruleId2desc[id] = result;
|
|
1767
|
+
return result;
|
|
1768
|
+
}
|
|
1769
|
+
getRule(ruleId) {
|
|
1770
|
+
return this._ruleId2desc[ruleIdToNumber(ruleId)];
|
|
1771
|
+
}
|
|
1772
|
+
getExternalGrammar(scopeName, repository) {
|
|
1773
|
+
if (this._includedGrammars[scopeName]) return this._includedGrammars[scopeName];
|
|
1774
|
+
else if (this._grammarRepository) {
|
|
1775
|
+
const rawIncludedGrammar = this._grammarRepository.lookup(scopeName);
|
|
1776
|
+
if (rawIncludedGrammar) {
|
|
1777
|
+
this._includedGrammars[scopeName] = initGrammar(rawIncludedGrammar, repository && repository.$base);
|
|
1778
|
+
return this._includedGrammars[scopeName];
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
tokenizeLine(lineText, prevState, timeLimit = 0) {
|
|
1783
|
+
const r = this._tokenize(lineText, prevState, false, timeLimit);
|
|
1784
|
+
return {
|
|
1785
|
+
tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),
|
|
1786
|
+
ruleStack: r.ruleStack,
|
|
1787
|
+
stoppedEarly: r.stoppedEarly
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
tokenizeLine2(lineText, prevState, timeLimit = 0) {
|
|
1791
|
+
const r = this._tokenize(lineText, prevState, true, timeLimit);
|
|
1792
|
+
return {
|
|
1793
|
+
tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),
|
|
1794
|
+
ruleStack: r.ruleStack,
|
|
1795
|
+
stoppedEarly: r.stoppedEarly
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
_tokenize(lineText, prevState, emitBinaryTokens, timeLimit) {
|
|
1799
|
+
if (this._rootId === -1) {
|
|
1800
|
+
this._rootId = RuleFactory.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository);
|
|
1801
|
+
this.getInjections();
|
|
1802
|
+
}
|
|
1803
|
+
let isFirstLine;
|
|
1804
|
+
if (!prevState || prevState === StateStackImpl.NULL) {
|
|
1805
|
+
isFirstLine = true;
|
|
1806
|
+
const rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();
|
|
1807
|
+
const defaultStyle = this.themeProvider.getDefaults();
|
|
1808
|
+
const defaultMetadata = EncodedTokenMetadata.set(0, rawDefaultMetadata.languageId, rawDefaultMetadata.tokenType, null, defaultStyle.fontStyle, defaultStyle.foregroundId, defaultStyle.backgroundId);
|
|
1809
|
+
const rootScopeName = this.getRule(this._rootId).getName(null, null);
|
|
1810
|
+
let scopeList;
|
|
1811
|
+
if (rootScopeName) scopeList = AttributedScopeStack.createRootAndLookUpScopeName(rootScopeName, defaultMetadata, this);
|
|
1812
|
+
else scopeList = AttributedScopeStack.createRoot("unknown", defaultMetadata);
|
|
1813
|
+
prevState = new StateStackImpl(null, this._rootId, -1, -1, false, null, scopeList, scopeList);
|
|
1814
|
+
} else {
|
|
1815
|
+
isFirstLine = false;
|
|
1816
|
+
prevState.reset();
|
|
1817
|
+
}
|
|
1818
|
+
lineText = lineText + "\n";
|
|
1819
|
+
const onigLineText = this.createOnigString(lineText);
|
|
1820
|
+
const lineLength = onigLineText.content.length;
|
|
1821
|
+
const lineTokens = new LineTokens(emitBinaryTokens, lineText, this._tokenTypeMatchers, this.balancedBracketSelectors);
|
|
1822
|
+
const r = _tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens, true, timeLimit);
|
|
1823
|
+
disposeOnigString(onigLineText);
|
|
1824
|
+
return {
|
|
1825
|
+
lineLength,
|
|
1826
|
+
lineTokens,
|
|
1827
|
+
ruleStack: r.stack,
|
|
1828
|
+
stoppedEarly: r.stoppedEarly
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
function initGrammar(grammar, base) {
|
|
1833
|
+
grammar = clone(grammar);
|
|
1834
|
+
grammar.repository = grammar.repository || {};
|
|
1835
|
+
grammar.repository.$self = {
|
|
1836
|
+
$vscodeTextmateLocation: grammar.$vscodeTextmateLocation,
|
|
1837
|
+
patterns: grammar.patterns,
|
|
1838
|
+
name: grammar.scopeName
|
|
1839
|
+
};
|
|
1840
|
+
grammar.repository.$base = base || grammar.repository.$self;
|
|
1841
|
+
return grammar;
|
|
1842
|
+
}
|
|
1843
|
+
var AttributedScopeStack = class _AttributedScopeStack {
|
|
1844
|
+
/**
|
|
1845
|
+
* Invariant:
|
|
1846
|
+
* ```
|
|
1847
|
+
* if (parent && !scopePath.extends(parent.scopePath)) {
|
|
1848
|
+
* throw new Error();
|
|
1849
|
+
* }
|
|
1850
|
+
* ```
|
|
1851
|
+
*/
|
|
1852
|
+
constructor(parent, scopePath, tokenAttributes) {
|
|
1853
|
+
this.parent = parent;
|
|
1854
|
+
this.scopePath = scopePath;
|
|
1855
|
+
this.tokenAttributes = tokenAttributes;
|
|
1856
|
+
}
|
|
1857
|
+
static fromExtension(namesScopeList, contentNameScopesList) {
|
|
1858
|
+
let current = namesScopeList;
|
|
1859
|
+
let scopeNames = namesScopeList?.scopePath ?? null;
|
|
1860
|
+
for (const frame of contentNameScopesList) {
|
|
1861
|
+
scopeNames = ScopeStack.push(scopeNames, frame.scopeNames);
|
|
1862
|
+
current = new _AttributedScopeStack(current, scopeNames, frame.encodedTokenAttributes);
|
|
1863
|
+
}
|
|
1864
|
+
return current;
|
|
1865
|
+
}
|
|
1866
|
+
static createRoot(scopeName, tokenAttributes) {
|
|
1867
|
+
return new _AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);
|
|
1868
|
+
}
|
|
1869
|
+
static createRootAndLookUpScopeName(scopeName, tokenAttributes, grammar) {
|
|
1870
|
+
const rawRootMetadata = grammar.getMetadataForScope(scopeName);
|
|
1871
|
+
const scopePath = new ScopeStack(null, scopeName);
|
|
1872
|
+
const rootStyle = grammar.themeProvider.themeMatch(scopePath);
|
|
1873
|
+
const resolvedTokenAttributes = _AttributedScopeStack.mergeAttributes(tokenAttributes, rawRootMetadata, rootStyle);
|
|
1874
|
+
return new _AttributedScopeStack(null, scopePath, resolvedTokenAttributes);
|
|
1875
|
+
}
|
|
1876
|
+
get scopeName() {
|
|
1877
|
+
return this.scopePath.scopeName;
|
|
1878
|
+
}
|
|
1879
|
+
toString() {
|
|
1880
|
+
return this.getScopeNames().join(" ");
|
|
1881
|
+
}
|
|
1882
|
+
equals(other) {
|
|
1883
|
+
return _AttributedScopeStack.equals(this, other);
|
|
1884
|
+
}
|
|
1885
|
+
static equals(a, b) {
|
|
1886
|
+
do {
|
|
1887
|
+
if (a === b) return true;
|
|
1888
|
+
if (!a && !b) return true;
|
|
1889
|
+
if (!a || !b) return false;
|
|
1890
|
+
if (a.scopeName !== b.scopeName || a.tokenAttributes !== b.tokenAttributes) return false;
|
|
1891
|
+
a = a.parent;
|
|
1892
|
+
b = b.parent;
|
|
1893
|
+
} while (true);
|
|
1894
|
+
}
|
|
1895
|
+
static mergeAttributes(existingTokenAttributes, basicScopeAttributes, styleAttributes) {
|
|
1896
|
+
let fontStyle = -1;
|
|
1897
|
+
let foreground = 0;
|
|
1898
|
+
let background = 0;
|
|
1899
|
+
if (styleAttributes !== null) {
|
|
1900
|
+
fontStyle = styleAttributes.fontStyle;
|
|
1901
|
+
foreground = styleAttributes.foregroundId;
|
|
1902
|
+
background = styleAttributes.backgroundId;
|
|
1903
|
+
}
|
|
1904
|
+
return EncodedTokenMetadata.set(existingTokenAttributes, basicScopeAttributes.languageId, basicScopeAttributes.tokenType, null, fontStyle, foreground, background);
|
|
1905
|
+
}
|
|
1906
|
+
pushAttributed(scopePath, grammar) {
|
|
1907
|
+
if (scopePath === null) return this;
|
|
1908
|
+
if (scopePath.indexOf(" ") === -1) return _AttributedScopeStack._pushAttributed(this, scopePath, grammar);
|
|
1909
|
+
const scopes = scopePath.split(/ /g);
|
|
1910
|
+
let result = this;
|
|
1911
|
+
for (const scope of scopes) result = _AttributedScopeStack._pushAttributed(result, scope, grammar);
|
|
1912
|
+
return result;
|
|
1913
|
+
}
|
|
1914
|
+
static _pushAttributed(target, scopeName, grammar) {
|
|
1915
|
+
const rawMetadata = grammar.getMetadataForScope(scopeName);
|
|
1916
|
+
const newPath = target.scopePath.push(scopeName);
|
|
1917
|
+
const scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);
|
|
1918
|
+
const metadata = _AttributedScopeStack.mergeAttributes(target.tokenAttributes, rawMetadata, scopeThemeMatchResult);
|
|
1919
|
+
return new _AttributedScopeStack(target, newPath, metadata);
|
|
1920
|
+
}
|
|
1921
|
+
getScopeNames() {
|
|
1922
|
+
return this.scopePath.getSegments();
|
|
1923
|
+
}
|
|
1924
|
+
getExtensionIfDefined(base) {
|
|
1925
|
+
const result = [];
|
|
1926
|
+
let self = this;
|
|
1927
|
+
while (self && self !== base) {
|
|
1928
|
+
result.push({
|
|
1929
|
+
encodedTokenAttributes: self.tokenAttributes,
|
|
1930
|
+
scopeNames: self.scopePath.getExtensionIfDefined(self.parent?.scopePath ?? null)
|
|
1931
|
+
});
|
|
1932
|
+
self = self.parent;
|
|
1933
|
+
}
|
|
1934
|
+
return self === base ? result.reverse() : void 0;
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
var StateStackImpl = class _StateStackImpl {
|
|
1938
|
+
/**
|
|
1939
|
+
* Invariant:
|
|
1940
|
+
* ```
|
|
1941
|
+
* if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {
|
|
1942
|
+
* throw new Error();
|
|
1943
|
+
* }
|
|
1944
|
+
* if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {
|
|
1945
|
+
* throw new Error();
|
|
1946
|
+
* }
|
|
1947
|
+
* ```
|
|
1948
|
+
*/
|
|
1949
|
+
constructor(parent, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {
|
|
1950
|
+
this.parent = parent;
|
|
1951
|
+
this.ruleId = ruleId;
|
|
1952
|
+
this.beginRuleCapturedEOL = beginRuleCapturedEOL;
|
|
1953
|
+
this.endRule = endRule;
|
|
1954
|
+
this.nameScopesList = nameScopesList;
|
|
1955
|
+
this.contentNameScopesList = contentNameScopesList;
|
|
1956
|
+
this.depth = this.parent ? this.parent.depth + 1 : 1;
|
|
1957
|
+
this._enterPos = enterPos;
|
|
1958
|
+
this._anchorPos = anchorPos;
|
|
1959
|
+
}
|
|
1960
|
+
_stackElementBrand = void 0;
|
|
1961
|
+
static NULL = new _StateStackImpl(null, 0, 0, 0, false, null, null, null);
|
|
1962
|
+
/**
|
|
1963
|
+
* The position on the current line where this state was pushed.
|
|
1964
|
+
* This is relevant only while tokenizing a line, to detect endless loops.
|
|
1965
|
+
* Its value is meaningless across lines.
|
|
1966
|
+
*/
|
|
1967
|
+
_enterPos;
|
|
1968
|
+
/**
|
|
1969
|
+
* The captured anchor position when this stack element was pushed.
|
|
1970
|
+
* This is relevant only while tokenizing a line, to restore the anchor position when popping.
|
|
1971
|
+
* Its value is meaningless across lines.
|
|
1972
|
+
*/
|
|
1973
|
+
_anchorPos;
|
|
1974
|
+
/**
|
|
1975
|
+
* The depth of the stack.
|
|
1976
|
+
*/
|
|
1977
|
+
depth;
|
|
1978
|
+
equals(other) {
|
|
1979
|
+
if (other === null) return false;
|
|
1980
|
+
return _StateStackImpl._equals(this, other);
|
|
1981
|
+
}
|
|
1982
|
+
static _equals(a, b) {
|
|
1983
|
+
if (a === b) return true;
|
|
1984
|
+
if (!this._structuralEquals(a, b)) return false;
|
|
1985
|
+
return AttributedScopeStack.equals(a.contentNameScopesList, b.contentNameScopesList);
|
|
1986
|
+
}
|
|
1987
|
+
/**
|
|
1988
|
+
* A structural equals check. Does not take into account `scopes`.
|
|
1989
|
+
*/
|
|
1990
|
+
static _structuralEquals(a, b) {
|
|
1991
|
+
do {
|
|
1992
|
+
if (a === b) return true;
|
|
1993
|
+
if (!a && !b) return true;
|
|
1994
|
+
if (!a || !b) return false;
|
|
1995
|
+
if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) return false;
|
|
1996
|
+
a = a.parent;
|
|
1997
|
+
b = b.parent;
|
|
1998
|
+
} while (true);
|
|
1999
|
+
}
|
|
2000
|
+
clone() {
|
|
2001
|
+
return this;
|
|
2002
|
+
}
|
|
2003
|
+
static _reset(el) {
|
|
2004
|
+
while (el) {
|
|
2005
|
+
el._enterPos = -1;
|
|
2006
|
+
el._anchorPos = -1;
|
|
2007
|
+
el = el.parent;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
reset() {
|
|
2011
|
+
_StateStackImpl._reset(this);
|
|
2012
|
+
}
|
|
2013
|
+
pop() {
|
|
2014
|
+
return this.parent;
|
|
2015
|
+
}
|
|
2016
|
+
safePop() {
|
|
2017
|
+
if (this.parent) return this.parent;
|
|
2018
|
+
return this;
|
|
2019
|
+
}
|
|
2020
|
+
push(ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {
|
|
2021
|
+
return new _StateStackImpl(this, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList);
|
|
2022
|
+
}
|
|
2023
|
+
getEnterPos() {
|
|
2024
|
+
return this._enterPos;
|
|
2025
|
+
}
|
|
2026
|
+
getAnchorPos() {
|
|
2027
|
+
return this._anchorPos;
|
|
2028
|
+
}
|
|
2029
|
+
getRule(grammar) {
|
|
2030
|
+
return grammar.getRule(this.ruleId);
|
|
2031
|
+
}
|
|
2032
|
+
toString() {
|
|
2033
|
+
const r = [];
|
|
2034
|
+
this._writeString(r, 0);
|
|
2035
|
+
return "[" + r.join(",") + "]";
|
|
2036
|
+
}
|
|
2037
|
+
_writeString(res, outIndex) {
|
|
2038
|
+
if (this.parent) outIndex = this.parent._writeString(res, outIndex);
|
|
2039
|
+
res[outIndex++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`;
|
|
2040
|
+
return outIndex;
|
|
2041
|
+
}
|
|
2042
|
+
withContentNameScopesList(contentNameScopeStack) {
|
|
2043
|
+
if (this.contentNameScopesList === contentNameScopeStack) return this;
|
|
2044
|
+
return this.parent.push(this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, this.endRule, this.nameScopesList, contentNameScopeStack);
|
|
2045
|
+
}
|
|
2046
|
+
withEndRule(endRule) {
|
|
2047
|
+
if (this.endRule === endRule) return this;
|
|
2048
|
+
return new _StateStackImpl(this.parent, this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, endRule, this.nameScopesList, this.contentNameScopesList);
|
|
2049
|
+
}
|
|
2050
|
+
hasSameRuleAs(other) {
|
|
2051
|
+
let el = this;
|
|
2052
|
+
while (el && el._enterPos === other._enterPos) {
|
|
2053
|
+
if (el.ruleId === other.ruleId) return true;
|
|
2054
|
+
el = el.parent;
|
|
2055
|
+
}
|
|
2056
|
+
return false;
|
|
2057
|
+
}
|
|
2058
|
+
toStateStackFrame() {
|
|
2059
|
+
return {
|
|
2060
|
+
ruleId: ruleIdToNumber(this.ruleId),
|
|
2061
|
+
beginRuleCapturedEOL: this.beginRuleCapturedEOL,
|
|
2062
|
+
endRule: this.endRule,
|
|
2063
|
+
nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],
|
|
2064
|
+
contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []
|
|
2065
|
+
};
|
|
2066
|
+
}
|
|
2067
|
+
static pushFrame(self, frame) {
|
|
2068
|
+
const namesScopeList = AttributedScopeStack.fromExtension(self?.nameScopesList ?? null, frame.nameScopesList);
|
|
2069
|
+
return new _StateStackImpl(self, ruleIdFromNumber(frame.ruleId), frame.enterPos ?? -1, frame.anchorPos ?? -1, frame.beginRuleCapturedEOL, frame.endRule, namesScopeList, AttributedScopeStack.fromExtension(namesScopeList, frame.contentNameScopesList));
|
|
2070
|
+
}
|
|
2071
|
+
};
|
|
2072
|
+
var BalancedBracketSelectors = class {
|
|
2073
|
+
balancedBracketScopes;
|
|
2074
|
+
unbalancedBracketScopes;
|
|
2075
|
+
allowAny = false;
|
|
2076
|
+
constructor(balancedBracketScopes, unbalancedBracketScopes) {
|
|
2077
|
+
this.balancedBracketScopes = balancedBracketScopes.flatMap((selector) => {
|
|
2078
|
+
if (selector === "*") {
|
|
2079
|
+
this.allowAny = true;
|
|
2080
|
+
return [];
|
|
2081
|
+
}
|
|
2082
|
+
return createMatchers(selector, nameMatcher).map((m) => m.matcher);
|
|
2083
|
+
});
|
|
2084
|
+
this.unbalancedBracketScopes = unbalancedBracketScopes.flatMap((selector) => createMatchers(selector, nameMatcher).map((m) => m.matcher));
|
|
2085
|
+
}
|
|
2086
|
+
get matchesAlways() {
|
|
2087
|
+
return this.allowAny && this.unbalancedBracketScopes.length === 0;
|
|
2088
|
+
}
|
|
2089
|
+
get matchesNever() {
|
|
2090
|
+
return this.balancedBracketScopes.length === 0 && !this.allowAny;
|
|
2091
|
+
}
|
|
2092
|
+
match(scopes) {
|
|
2093
|
+
for (const excluder of this.unbalancedBracketScopes) if (excluder(scopes)) return false;
|
|
2094
|
+
for (const includer of this.balancedBracketScopes) if (includer(scopes)) return true;
|
|
2095
|
+
return this.allowAny;
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2098
|
+
var LineTokens = class {
|
|
2099
|
+
constructor(emitBinaryTokens, lineText, tokenTypeOverrides, balancedBracketSelectors) {
|
|
2100
|
+
this.balancedBracketSelectors = balancedBracketSelectors;
|
|
2101
|
+
this._emitBinaryTokens = emitBinaryTokens;
|
|
2102
|
+
this._tokenTypeOverrides = tokenTypeOverrides;
|
|
2103
|
+
this._lineText = null;
|
|
2104
|
+
this._tokens = [];
|
|
2105
|
+
this._binaryTokens = [];
|
|
2106
|
+
this._lastTokenEndIndex = 0;
|
|
2107
|
+
}
|
|
2108
|
+
_emitBinaryTokens;
|
|
2109
|
+
/**
|
|
2110
|
+
* defined only if `false`.
|
|
2111
|
+
*/
|
|
2112
|
+
_lineText;
|
|
2113
|
+
/**
|
|
2114
|
+
* used only if `_emitBinaryTokens` is false.
|
|
2115
|
+
*/
|
|
2116
|
+
_tokens;
|
|
2117
|
+
/**
|
|
2118
|
+
* used only if `_emitBinaryTokens` is true.
|
|
2119
|
+
*/
|
|
2120
|
+
_binaryTokens;
|
|
2121
|
+
_lastTokenEndIndex;
|
|
2122
|
+
_tokenTypeOverrides;
|
|
2123
|
+
produce(stack, endIndex) {
|
|
2124
|
+
this.produceFromScopes(stack.contentNameScopesList, endIndex);
|
|
2125
|
+
}
|
|
2126
|
+
produceFromScopes(scopesList, endIndex) {
|
|
2127
|
+
if (this._lastTokenEndIndex >= endIndex) return;
|
|
2128
|
+
if (this._emitBinaryTokens) {
|
|
2129
|
+
let metadata = scopesList?.tokenAttributes ?? 0;
|
|
2130
|
+
let containsBalancedBrackets = false;
|
|
2131
|
+
if (this.balancedBracketSelectors?.matchesAlways) containsBalancedBrackets = true;
|
|
2132
|
+
if (this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {
|
|
2133
|
+
const scopes2 = scopesList?.getScopeNames() ?? [];
|
|
2134
|
+
for (const tokenType of this._tokenTypeOverrides) if (tokenType.matcher(scopes2)) metadata = EncodedTokenMetadata.set(metadata, 0, toOptionalTokenType(tokenType.type), null, -1, 0, 0);
|
|
2135
|
+
if (this.balancedBracketSelectors) containsBalancedBrackets = this.balancedBracketSelectors.match(scopes2);
|
|
2136
|
+
}
|
|
2137
|
+
if (containsBalancedBrackets) metadata = EncodedTokenMetadata.set(metadata, 0, 8, containsBalancedBrackets, -1, 0, 0);
|
|
2138
|
+
if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {
|
|
2139
|
+
this._lastTokenEndIndex = endIndex;
|
|
2140
|
+
return;
|
|
2141
|
+
}
|
|
2142
|
+
this._binaryTokens.push(this._lastTokenEndIndex);
|
|
2143
|
+
this._binaryTokens.push(metadata);
|
|
2144
|
+
this._lastTokenEndIndex = endIndex;
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
const scopes = scopesList?.getScopeNames() ?? [];
|
|
2148
|
+
this._tokens.push({
|
|
2149
|
+
startIndex: this._lastTokenEndIndex,
|
|
2150
|
+
endIndex,
|
|
2151
|
+
scopes
|
|
2152
|
+
});
|
|
2153
|
+
this._lastTokenEndIndex = endIndex;
|
|
2154
|
+
}
|
|
2155
|
+
getResult(stack, lineLength) {
|
|
2156
|
+
if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) this._tokens.pop();
|
|
2157
|
+
if (this._tokens.length === 0) {
|
|
2158
|
+
this._lastTokenEndIndex = -1;
|
|
2159
|
+
this.produce(stack, lineLength);
|
|
2160
|
+
this._tokens[this._tokens.length - 1].startIndex = 0;
|
|
2161
|
+
}
|
|
2162
|
+
return this._tokens;
|
|
2163
|
+
}
|
|
2164
|
+
getBinaryResult(stack, lineLength) {
|
|
2165
|
+
if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {
|
|
2166
|
+
this._binaryTokens.pop();
|
|
2167
|
+
this._binaryTokens.pop();
|
|
2168
|
+
}
|
|
2169
|
+
if (this._binaryTokens.length === 0) {
|
|
2170
|
+
this._lastTokenEndIndex = -1;
|
|
2171
|
+
this.produce(stack, lineLength);
|
|
2172
|
+
this._binaryTokens[this._binaryTokens.length - 2] = 0;
|
|
2173
|
+
}
|
|
2174
|
+
const result = new Uint32Array(this._binaryTokens.length);
|
|
2175
|
+
for (let i = 0, len = this._binaryTokens.length; i < len; i++) result[i] = this._binaryTokens[i];
|
|
2176
|
+
return result;
|
|
2177
|
+
}
|
|
2178
|
+
};
|
|
2179
|
+
var SyncRegistry = class {
|
|
2180
|
+
constructor(theme, _onigLib) {
|
|
2181
|
+
this._onigLib = _onigLib;
|
|
2182
|
+
this._theme = theme;
|
|
2183
|
+
}
|
|
2184
|
+
_grammars = /* @__PURE__ */ new Map();
|
|
2185
|
+
_rawGrammars = /* @__PURE__ */ new Map();
|
|
2186
|
+
_injectionGrammars = /* @__PURE__ */ new Map();
|
|
2187
|
+
_theme;
|
|
2188
|
+
dispose() {
|
|
2189
|
+
for (const grammar of this._grammars.values()) grammar.dispose();
|
|
2190
|
+
}
|
|
2191
|
+
setTheme(theme) {
|
|
2192
|
+
this._theme = theme;
|
|
2193
|
+
}
|
|
2194
|
+
getColorMap() {
|
|
2195
|
+
return this._theme.getColorMap();
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* Add `grammar` to registry and return a list of referenced scope names
|
|
2199
|
+
*/
|
|
2200
|
+
addGrammar(grammar, injectionScopeNames) {
|
|
2201
|
+
this._rawGrammars.set(grammar.scopeName, grammar);
|
|
2202
|
+
if (injectionScopeNames) this._injectionGrammars.set(grammar.scopeName, injectionScopeNames);
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Lookup a raw grammar.
|
|
2206
|
+
*/
|
|
2207
|
+
lookup(scopeName) {
|
|
2208
|
+
return this._rawGrammars.get(scopeName);
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* Returns the injections for the given grammar
|
|
2212
|
+
*/
|
|
2213
|
+
injections(targetScope) {
|
|
2214
|
+
return this._injectionGrammars.get(targetScope);
|
|
2215
|
+
}
|
|
2216
|
+
/**
|
|
2217
|
+
* Get the default theme settings
|
|
2218
|
+
*/
|
|
2219
|
+
getDefaults() {
|
|
2220
|
+
return this._theme.getDefaults();
|
|
2221
|
+
}
|
|
2222
|
+
/**
|
|
2223
|
+
* Match a scope in the theme.
|
|
2224
|
+
*/
|
|
2225
|
+
themeMatch(scopePath) {
|
|
2226
|
+
return this._theme.match(scopePath);
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Lookup a grammar.
|
|
2230
|
+
*/
|
|
2231
|
+
grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {
|
|
2232
|
+
if (!this._grammars.has(scopeName)) {
|
|
2233
|
+
let rawGrammar = this._rawGrammars.get(scopeName);
|
|
2234
|
+
if (!rawGrammar) return null;
|
|
2235
|
+
this._grammars.set(scopeName, createGrammar(scopeName, rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, this, this._onigLib));
|
|
2236
|
+
}
|
|
2237
|
+
return this._grammars.get(scopeName);
|
|
2238
|
+
}
|
|
2239
|
+
};
|
|
2240
|
+
var Registry = class {
|
|
2241
|
+
_options;
|
|
2242
|
+
_syncRegistry;
|
|
2243
|
+
_ensureGrammarCache;
|
|
2244
|
+
constructor(options) {
|
|
2245
|
+
this._options = options;
|
|
2246
|
+
this._syncRegistry = new SyncRegistry(Theme.createFromRawTheme(options.theme, options.colorMap), options.onigLib);
|
|
2247
|
+
this._ensureGrammarCache = /* @__PURE__ */ new Map();
|
|
2248
|
+
}
|
|
2249
|
+
dispose() {
|
|
2250
|
+
this._syncRegistry.dispose();
|
|
2251
|
+
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Change the theme. Once called, no previous `ruleStack` should be used anymore.
|
|
2254
|
+
*/
|
|
2255
|
+
setTheme(theme, colorMap) {
|
|
2256
|
+
this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, colorMap));
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* Returns a lookup array for color ids.
|
|
2260
|
+
*/
|
|
2261
|
+
getColorMap() {
|
|
2262
|
+
return this._syncRegistry.getColorMap();
|
|
2263
|
+
}
|
|
2264
|
+
/**
|
|
2265
|
+
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
|
2266
|
+
* Please do not use language id 0.
|
|
2267
|
+
*/
|
|
2268
|
+
loadGrammarWithEmbeddedLanguages(initialScopeName, initialLanguage, embeddedLanguages) {
|
|
2269
|
+
return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages });
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
|
2273
|
+
* Please do not use language id 0.
|
|
2274
|
+
*/
|
|
2275
|
+
loadGrammarWithConfiguration(initialScopeName, initialLanguage, configuration) {
|
|
2276
|
+
return this._loadGrammar(initialScopeName, initialLanguage, configuration.embeddedLanguages, configuration.tokenTypes, new BalancedBracketSelectors(configuration.balancedBracketSelectors || [], configuration.unbalancedBracketSelectors || []));
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
|
2280
|
+
*/
|
|
2281
|
+
loadGrammar(initialScopeName) {
|
|
2282
|
+
return this._loadGrammar(initialScopeName, 0, null, null, null);
|
|
2283
|
+
}
|
|
2284
|
+
_loadGrammar(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {
|
|
2285
|
+
const dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName);
|
|
2286
|
+
while (dependencyProcessor.Q.length > 0) {
|
|
2287
|
+
dependencyProcessor.Q.map((request) => this._loadSingleGrammar(request.scopeName));
|
|
2288
|
+
dependencyProcessor.processQueue();
|
|
2289
|
+
}
|
|
2290
|
+
return this._grammarForScopeName(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors);
|
|
2291
|
+
}
|
|
2292
|
+
_loadSingleGrammar(scopeName) {
|
|
2293
|
+
if (!this._ensureGrammarCache.has(scopeName)) {
|
|
2294
|
+
this._doLoadSingleGrammar(scopeName);
|
|
2295
|
+
this._ensureGrammarCache.set(scopeName, true);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
_doLoadSingleGrammar(scopeName) {
|
|
2299
|
+
const grammar = this._options.loadGrammar(scopeName);
|
|
2300
|
+
if (grammar) {
|
|
2301
|
+
const injections = typeof this._options.getInjections === "function" ? this._options.getInjections(scopeName) : void 0;
|
|
2302
|
+
this._syncRegistry.addGrammar(grammar, injections);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* Adds a rawGrammar.
|
|
2307
|
+
*/
|
|
2308
|
+
addGrammar(rawGrammar, injections = [], initialLanguage = 0, embeddedLanguages = null) {
|
|
2309
|
+
this._syncRegistry.addGrammar(rawGrammar, injections);
|
|
2310
|
+
return this._grammarForScopeName(rawGrammar.scopeName, initialLanguage, embeddedLanguages);
|
|
2311
|
+
}
|
|
2312
|
+
/**
|
|
2313
|
+
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.
|
|
2314
|
+
*/
|
|
2315
|
+
_grammarForScopeName(scopeName, initialLanguage = 0, embeddedLanguages = null, tokenTypes = null, balancedBracketSelectors = null) {
|
|
2316
|
+
return this._syncRegistry.grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors);
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
var INITIAL = StateStackImpl.NULL;
|
|
2320
|
+
export { EncodedTokenMetadata, FontStyle, INITIAL, Registry, Theme, disposeOnigString };
|