@lapis-notes/api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/LICENSE.md +4 -0
- package/README.md +43 -0
- package/dist/__tests__/data-adapter-conformance.js +205 -0
- package/dist/__tests__/lapis-runtime-manifest.js +32 -0
- package/dist/__tests__/svelte-internal-client.d.ts +3 -0
- package/dist/agent-result-views.d.ts +52 -0
- package/dist/agent-result-views.js +89 -0
- package/dist/agent-skills.d.ts +99 -0
- package/dist/agent-skills.js +182 -0
- package/dist/agent-tools.d.ts +92 -0
- package/dist/agent-tools.js +139 -0
- package/dist/app-database-host.d.ts +4 -0
- package/dist/app-database-host.js +4 -0
- package/dist/app-shell-plugin-persistence.d.ts +15 -0
- package/dist/app-shell-plugin-persistence.js +34 -0
- package/dist/app-url.d.ts +54 -0
- package/dist/app-url.js +269 -0
- package/dist/application-compatibility.d.ts +31 -0
- package/dist/application-compatibility.js +64 -0
- package/dist/application-state.svelte.d.ts +14 -0
- package/dist/application-state.svelte.js +30 -0
- package/dist/assets/lapis-logo.svg +471 -0
- package/dist/bases.d.ts +281 -0
- package/dist/bases.js +475 -0
- package/dist/cache.svelte.d.ts +569 -0
- package/dist/cache.svelte.js +1433 -0
- package/dist/command.svelte.d.ts +337 -0
- package/dist/command.svelte.js +571 -0
- package/dist/compat.d.ts +29 -0
- package/dist/compat.js +30 -0
- package/dist/components/configuration/configuration.css +199 -0
- package/dist/components/configuration/date-setting.svelte +71 -0
- package/dist/components/configuration/date-setting.svelte.d.ts +8 -0
- package/dist/components/configuration/list-setting.svelte +128 -0
- package/dist/components/configuration/list-setting.svelte.d.ts +13 -0
- package/dist/components/configuration/object-array-row-grip.svelte +78 -0
- package/dist/components/configuration/object-array-row-grip.svelte.d.ts +9 -0
- package/dist/components/configuration/object-array-row.svelte +163 -0
- package/dist/components/configuration/object-array-row.svelte.d.ts +19 -0
- package/dist/components/configuration/object-array-setting.svelte +196 -0
- package/dist/components/configuration/object-array-setting.svelte.d.ts +15 -0
- package/dist/components/configuration/object-array-table-dnd.d.ts +8 -0
- package/dist/components/configuration/object-array-table-dnd.js +10 -0
- package/dist/components/configuration/object-array-utils.d.ts +11 -0
- package/dist/components/configuration/object-array-utils.js +103 -0
- package/dist/components/configuration/object-grid-setting.svelte +79 -0
- package/dist/components/configuration/object-grid-setting.svelte.d.ts +10 -0
- package/dist/components/configuration/object-map-row.svelte +147 -0
- package/dist/components/configuration/object-map-row.svelte.d.ts +15 -0
- package/dist/components/configuration/object-map-setting.svelte +137 -0
- package/dist/components/configuration/object-map-setting.svelte.d.ts +14 -0
- package/dist/components/configuration/object-map-types.d.ts +5 -0
- package/dist/components/configuration/object-map-types.js +1 -0
- package/dist/components/configuration/options-combobox-setting.svelte +129 -0
- package/dist/components/configuration/options-combobox-setting.svelte.d.ts +12 -0
- package/dist/components/copy-button/button.svelte +93 -0
- package/dist/components/copy-button/button.svelte.d.ts +13 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/copy-button/index.js +2 -0
- package/dist/components/editor/editor.css +565 -0
- package/dist/components/editor/editor.d.ts +33 -0
- package/dist/components/editor/editor.js +132 -0
- package/dist/components/editor/editor.svelte +176 -0
- package/dist/components/editor/editor.svelte.d.ts +15 -0
- package/dist/components/editor/embedded-editor-surface.d.ts +12 -0
- package/dist/components/editor/embedded-editor-surface.js +22 -0
- package/dist/components/editor/embedded-editor-surface.svelte +115 -0
- package/dist/components/editor/embedded-editor-surface.svelte.d.ts +17 -0
- package/dist/components/editor/extensions/autocomplete/index.d.ts +2 -0
- package/dist/components/editor/extensions/autocomplete/index.js +2 -0
- package/dist/components/editor/extensions/autocomplete/lapis-code-mirror-autocomplete.d.ts +16 -0
- package/dist/components/editor/extensions/autocomplete/lapis-code-mirror-autocomplete.js +34 -0
- package/dist/components/editor/extensions/autocomplete/vault-completion-sources.d.ts +27 -0
- package/dist/components/editor/extensions/autocomplete/vault-completion-sources.js +55 -0
- package/dist/components/editor/extensions/class-highlighter/index.d.ts +1 -0
- package/dist/components/editor/extensions/class-highlighter/index.js +47 -0
- package/dist/components/editor/extensions/fold-gutter/index.d.ts +8 -0
- package/dist/components/editor/extensions/fold-gutter/index.js +40 -0
- package/dist/components/editor/extensions/gutter-line-style-sync/index.d.ts +2 -0
- package/dist/components/editor/extensions/gutter-line-style-sync/index.js +118 -0
- package/dist/components/editor/extensions/lint/index.d.ts +4 -0
- package/dist/components/editor/extensions/lint/index.js +4 -0
- package/dist/components/editor/extensions/lint/lapis-code-mirror-lint.d.ts +26 -0
- package/dist/components/editor/extensions/lint/lapis-code-mirror-lint.js +101 -0
- package/dist/components/editor/extensions/lint/lapis-lint-diagnostic-helpers.d.ts +8 -0
- package/dist/components/editor/extensions/lint/lapis-lint-diagnostic-helpers.js +7 -0
- package/dist/components/editor/extensions/lint/lapis-lint-diagnostic.d.ts +20 -0
- package/dist/components/editor/extensions/lint/lapis-lint-diagnostic.js +47 -0
- package/dist/components/editor/extensions/lint/lapis-lint-hover-tooltip.d.ts +9 -0
- package/dist/components/editor/extensions/lint/lapis-lint-hover-tooltip.js +373 -0
- package/dist/components/editor/extensions/lint/lapis-lint-inline-widget.d.ts +31 -0
- package/dist/components/editor/extensions/lint/lapis-lint-inline-widget.js +191 -0
- package/dist/components/editor/extensions/lint/lapis-lint-tooltip.svelte +176 -0
- package/dist/components/editor/extensions/lint/lapis-lint-tooltip.svelte.d.ts +15 -0
- package/dist/components/editor/extensions/lint/lint-tooltip-actions.d.ts +11 -0
- package/dist/components/editor/extensions/lint/lint-tooltip-actions.js +21 -0
- package/dist/components/editor/extensions/lint/mount-lint-tooltip.d.ts +16 -0
- package/dist/components/editor/extensions/lint/mount-lint-tooltip.js +60 -0
- package/dist/components/editor/extensions/search/dom.d.ts +2 -0
- package/dist/components/editor/extensions/search/dom.js +6 -0
- package/dist/components/editor/extensions/search/index.d.ts +35 -0
- package/dist/components/editor/extensions/search/index.js +44 -0
- package/dist/components/editor/extensions/search/search.svelte +335 -0
- package/dist/components/editor/extensions/search/search.svelte.d.ts +8 -0
- package/dist/components/editor/index.d.ts +9 -0
- package/dist/components/editor/index.js +9 -0
- package/dist/components/editor/language-service/dom.d.ts +1 -0
- package/dist/components/editor/language-service/dom.js +6 -0
- package/dist/components/editor/language-service/index.d.ts +28 -0
- package/dist/components/editor/language-service/index.js +342 -0
- package/dist/components/empty-view/empty-view.css +39 -0
- package/dist/components/empty-view/empty-view.svelte +26 -0
- package/dist/components/empty-view/empty-view.svelte.d.ts +9 -0
- package/dist/components/empty-view/index.d.ts +2 -0
- package/dist/components/empty-view/index.js +2 -0
- package/dist/components/icon/icon-list.css +74 -0
- package/dist/components/icon/icon-list.svelte +213 -0
- package/dist/components/icon/icon-list.svelte.d.ts +11 -0
- package/dist/components/icon/icon.svelte +15 -0
- package/dist/components/icon/icon.svelte.d.ts +7 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.js +3 -0
- package/dist/components/menu/context-menu.svelte +89 -0
- package/dist/components/menu/context-menu.svelte.d.ts +11 -0
- package/dist/components/menu/drawer-menu.svelte +83 -0
- package/dist/components/menu/drawer-menu.svelte.d.ts +8 -0
- package/dist/components/menu/dropdown-menu.svelte +89 -0
- package/dist/components/menu/dropdown-menu.svelte.d.ts +11 -0
- package/dist/components/menu/index.d.ts +6 -0
- package/dist/components/menu/index.js +6 -0
- package/dist/components/menu/menu.css +139 -0
- package/dist/components/menu/menu.svelte +37 -0
- package/dist/components/menu/menu.svelte.d.ts +11 -0
- package/dist/components/menu/mobile-menu-query.svelte.d.ts +3 -0
- package/dist/components/menu/mobile-menu-query.svelte.js +21 -0
- package/dist/components/menu/popover-menu.svelte +90 -0
- package/dist/components/menu/popover-menu.svelte.d.ts +10 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/select/select.svelte +72 -0
- package/dist/components/select/select.svelte.d.ts +25 -0
- package/dist/configuration-option-source-providers.d.ts +17 -0
- package/dist/configuration-option-source-providers.js +59 -0
- package/dist/configuration-option-source-registry.d.ts +59 -0
- package/dist/configuration-option-source-registry.js +123 -0
- package/dist/configuration.svelte.d.ts +258 -0
- package/dist/configuration.svelte.js +887 -0
- package/dist/context-keys.svelte.d.ts +42 -0
- package/dist/context-keys.svelte.js +278 -0
- package/dist/context.svelte.d.ts +247 -0
- package/dist/context.svelte.js +540 -0
- package/dist/daily-document-provider.d.ts +38 -0
- package/dist/daily-document-provider.js +176 -0
- package/dist/design-core-button-types.d.ts +7 -0
- package/dist/design-core-button-types.js +1 -0
- package/dist/diagnostics.d.ts +93 -0
- package/dist/diagnostics.js +84 -0
- package/dist/dialog-portal.d.ts +3 -0
- package/dist/dialog-portal.js +3 -0
- package/dist/docs-api.d.ts +44 -0
- package/dist/docs-api.js +29 -0
- package/dist/editor-view-registry.d.ts +35 -0
- package/dist/editor-view-registry.js +112 -0
- package/dist/editor.svelte.d.ts +126 -0
- package/dist/editor.svelte.js +454 -0
- package/dist/embed-registry.d.ts +15 -0
- package/dist/embed-registry.js +16 -0
- package/dist/enhance.d.ts +111 -0
- package/dist/enhance.js +309 -0
- package/dist/events.d.ts +28 -0
- package/dist/events.js +49 -0
- package/dist/file-manager.d.ts +90 -0
- package/dist/file-manager.js +289 -0
- package/dist/file-tools/app-tools.d.ts +3 -0
- package/dist/file-tools/app-tools.js +242 -0
- package/dist/file-tools/index.d.ts +3 -0
- package/dist/file-tools/index.js +3 -0
- package/dist/file-tools/paths.d.ts +14 -0
- package/dist/file-tools/paths.js +33 -0
- package/dist/file-tools/vault-operations.d.ts +3 -0
- package/dist/file-tools/vault-operations.js +60 -0
- package/dist/generated/plugin-host-modules.schema.generated.d.ts +371 -0
- package/dist/generated/plugin-host-modules.schema.generated.js +374 -0
- package/dist/glob.d.ts +15 -0
- package/dist/glob.js +68 -0
- package/dist/history.svelte.d.ts +24 -0
- package/dist/history.svelte.js +74 -0
- package/dist/hooks/createVirtualizer.svelte.d.ts +7 -0
- package/dist/hooks/createVirtualizer.svelte.js +70 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/is-mobile.svelte.d.ts +5 -0
- package/dist/hooks/is-mobile.svelte.js +23 -0
- package/dist/hooks/mountComponent.svelte.d.ts +7 -0
- package/dist/hooks/mountComponent.svelte.js +16 -0
- package/dist/hooks/use-text-highlight.d.ts +17 -0
- package/dist/hooks/use-text-highlight.js +82 -0
- package/dist/hooks/useBoundingRect.svelte.d.ts +11 -0
- package/dist/hooks/useBoundingRect.svelte.js +46 -0
- package/dist/icons/index.d.ts +57 -0
- package/dist/icons/index.js +288 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +87 -0
- package/dist/language-service/index.d.ts +9 -0
- package/dist/language-service/index.js +7 -0
- package/dist/language-service/manager.d.ts +47 -0
- package/dist/language-service/manager.js +404 -0
- package/dist/language-service/types.d.ts +92 -0
- package/dist/language-service/types.js +1 -0
- package/dist/language-service/virtual-document.d.ts +11 -0
- package/dist/language-service/virtual-document.js +45 -0
- package/dist/language-service/worker-protocol.d.ts +63 -0
- package/dist/language-service/worker-protocol.js +1 -0
- package/dist/language-service/worker-provider.d.ts +9 -0
- package/dist/language-service/worker-provider.js +38 -0
- package/dist/lapis-extension.d.ts +244 -0
- package/dist/lapis-extension.js +591 -0
- package/dist/links.d.ts +34 -0
- package/dist/links.js +191 -0
- package/dist/loaders.d.ts +9 -0
- package/dist/loaders.js +59 -0
- package/dist/localization-manager.svelte.d.ts +56 -0
- package/dist/localization-manager.svelte.js +157 -0
- package/dist/logging.d.ts +172 -0
- package/dist/logging.js +352 -0
- package/dist/markdown-extension-registry.d.ts +31 -0
- package/dist/markdown-extension-registry.js +31 -0
- package/dist/markdown-file-surface-registry.d.ts +25 -0
- package/dist/markdown-file-surface-registry.js +23 -0
- package/dist/markdown.d.ts +205 -0
- package/dist/markdown.js +147 -0
- package/dist/menu-utils.d.ts +1 -0
- package/dist/menu-utils.js +47 -0
- package/dist/menu.svelte.d.ts +121 -0
- package/dist/menu.svelte.js +295 -0
- package/dist/metadata-value.d.ts +10 -0
- package/dist/metadata-value.js +173 -0
- package/dist/metadata.svelte.d.ts +106 -0
- package/dist/metadata.svelte.js +608 -0
- package/dist/notifications.d.ts +209 -0
- package/dist/notifications.js +338 -0
- package/dist/open-file.d.ts +23 -0
- package/dist/open-file.js +102 -0
- package/dist/platform.d.ts +86 -0
- package/dist/platform.js +86 -0
- package/dist/plugin-asset-server.d.ts +60 -0
- package/dist/plugin-asset-server.js +222 -0
- package/dist/plugin-assets.d.ts +4 -0
- package/dist/plugin-assets.js +3 -0
- package/dist/plugin-capability-facade.d.ts +104 -0
- package/dist/plugin-capability-facade.js +61 -0
- package/dist/plugin-dependency-resolver.d.ts +36 -0
- package/dist/plugin-dependency-resolver.js +54 -0
- package/dist/plugin-dependency-scanner.d.ts +9 -0
- package/dist/plugin-dependency-scanner.js +274 -0
- package/dist/plugin-distribution/canonical-json.d.ts +1 -0
- package/dist/plugin-distribution/canonical-json.js +40 -0
- package/dist/plugin-distribution/compatibility.d.ts +5 -0
- package/dist/plugin-distribution/compatibility.js +38 -0
- package/dist/plugin-distribution/errors.d.ts +11 -0
- package/dist/plugin-distribution/errors.js +13 -0
- package/dist/plugin-distribution/hashes.d.ts +2 -0
- package/dist/plugin-distribution/hashes.js +17 -0
- package/dist/plugin-distribution/index.d.ts +18 -0
- package/dist/plugin-distribution/index.js +18 -0
- package/dist/plugin-distribution/installed-plugin-state.d.ts +20 -0
- package/dist/plugin-distribution/installed-plugin-state.js +73 -0
- package/dist/plugin-distribution/installer.d.ts +89 -0
- package/dist/plugin-distribution/installer.js +395 -0
- package/dist/plugin-distribution/manager.d.ts +128 -0
- package/dist/plugin-distribution/manager.js +358 -0
- package/dist/plugin-distribution/path-safety.d.ts +2 -0
- package/dist/plugin-distribution/path-safety.js +20 -0
- package/dist/plugin-distribution/plugin-bundle-verifier.d.ts +28 -0
- package/dist/plugin-distribution/plugin-bundle-verifier.js +96 -0
- package/dist/plugin-distribution/plugin-bundle-worker.d.ts +34 -0
- package/dist/plugin-distribution/plugin-bundle-worker.js +99 -0
- package/dist/plugin-distribution/plugin-bundle.d.ts +16 -0
- package/dist/plugin-distribution/plugin-bundle.js +244 -0
- package/dist/plugin-distribution/plugin-bundle.worker.d.ts +1 -0
- package/dist/plugin-distribution/plugin-bundle.worker.js +38 -0
- package/dist/plugin-distribution/registry-cache.d.ts +26 -0
- package/dist/plugin-distribution/registry-cache.js +85 -0
- package/dist/plugin-distribution/registry-client.d.ts +36 -0
- package/dist/plugin-distribution/registry-client.js +115 -0
- package/dist/plugin-distribution/reserved-ids.d.ts +4 -0
- package/dist/plugin-distribution/reserved-ids.js +10 -0
- package/dist/plugin-distribution/runtime-validation.d.ts +14 -0
- package/dist/plugin-distribution/runtime-validation.js +388 -0
- package/dist/plugin-distribution/schemas.d.ts +4895 -0
- package/dist/plugin-distribution/schemas.js +299 -0
- package/dist/plugin-distribution/signing.d.ts +5 -0
- package/dist/plugin-distribution/signing.js +38 -0
- package/dist/plugin-distribution/types.d.ts +217 -0
- package/dist/plugin-distribution/types.js +1 -0
- package/dist/plugin-install-progress.d.ts +15 -0
- package/dist/plugin-install-progress.js +86 -0
- package/dist/plugin-manager.d.ts +306 -0
- package/dist/plugin-manager.js +2848 -0
- package/dist/plugin-runtime-entry.d.ts +19 -0
- package/dist/plugin-runtime-entry.js +135 -0
- package/dist/plugin.d.ts +350 -0
- package/dist/plugin.js +754 -0
- package/dist/popover.d.ts +20 -0
- package/dist/popover.js +32 -0
- package/dist/promise-worker.d.ts +22 -0
- package/dist/promise-worker.js +65 -0
- package/dist/prompt-confirm.d.ts +9 -0
- package/dist/prompt-confirm.js +33 -0
- package/dist/search-document-provider.d.ts +45 -0
- package/dist/search-document-provider.js +54 -0
- package/dist/search-query/index.d.ts +78 -0
- package/dist/search-query/index.js +426 -0
- package/dist/search-query/parser.d.ts +3 -0
- package/dist/search-query/parser.js +16 -0
- package/dist/search-query/parser.terms.js +26 -0
- package/dist/search-query/search-query.grammar +128 -0
- package/dist/search.d.ts +19 -0
- package/dist/search.js +104 -0
- package/dist/setting-section-layout.d.ts +19 -0
- package/dist/setting-section-layout.js +194 -0
- package/dist/settings.svelte.d.ts +474 -0
- package/dist/settings.svelte.js +1421 -0
- package/dist/source-text-file-view.d.ts +25 -0
- package/dist/source-text-file-view.js +78 -0
- package/dist/status-bar.svelte.d.ts +29 -0
- package/dist/status-bar.svelte.js +72 -0
- package/dist/storage/app-database.d.ts +860 -0
- package/dist/storage/app-database.js +2372 -0
- package/dist/storage/blob-store.d.ts +12 -0
- package/dist/storage/blob-store.js +1 -0
- package/dist/storage/browser-app-database-coordination.d.ts +35 -0
- package/dist/storage/browser-app-database-coordination.js +207 -0
- package/dist/storage/browser-coordinated-app-database.d.ts +109 -0
- package/dist/storage/browser-coordinated-app-database.js +704 -0
- package/dist/storage/browser.d.ts +153 -0
- package/dist/storage/browser.js +794 -0
- package/dist/storage/desktop-native.d.ts +184 -0
- package/dist/storage/desktop-native.js +415 -0
- package/dist/storage/fs.d.ts +188 -0
- package/dist/storage/fs.js +307 -0
- package/dist/storage/index-projection.d.ts +236 -0
- package/dist/storage/index-projection.js +402 -0
- package/dist/storage/index.d.ts +17 -0
- package/dist/storage/index.js +17 -0
- package/dist/storage/keyval.d.ts +94 -0
- package/dist/storage/keyval.js +199 -0
- package/dist/storage/memory-vault-adapter.d.ts +44 -0
- package/dist/storage/memory-vault-adapter.js +351 -0
- package/dist/storage/native-vault-bootstrap-kv.d.ts +22 -0
- package/dist/storage/native-vault-bootstrap-kv.js +96 -0
- package/dist/storage/path.d.ts +22 -0
- package/dist/storage/path.js +110 -0
- package/dist/storage/search-embedding-provider.d.ts +75 -0
- package/dist/storage/search-embedding-provider.js +446 -0
- package/dist/storage/search-embedding-worker.d.ts +1 -0
- package/dist/storage/search-embedding-worker.js +63 -0
- package/dist/storage/search-query-evaluator.d.ts +14 -0
- package/dist/storage/search-query-evaluator.js +678 -0
- package/dist/storage/task-projection.d.ts +152 -0
- package/dist/storage/task-projection.js +154 -0
- package/dist/storage/turso-app-database.d.ts +150 -0
- package/dist/storage/turso-app-database.js +2671 -0
- package/dist/storage/vault-session.d.ts +37 -0
- package/dist/storage/vault-session.js +196 -0
- package/dist/storage/vault-state.d.ts +74 -0
- package/dist/storage/vault-state.js +181 -0
- package/dist/storage/vault.svelte.d.ts +257 -0
- package/dist/storage/vault.svelte.js +661 -0
- package/dist/suggest.d.ts +193 -0
- package/dist/suggest.js +391 -0
- package/dist/tasks.d.ts +7 -0
- package/dist/tasks.js +18 -0
- package/dist/telemetry.d.ts +116 -0
- package/dist/telemetry.js +103 -0
- package/dist/utils.d.ts +55 -0
- package/dist/utils.js +314 -0
- package/dist/vault-api.d.ts +5 -0
- package/dist/vault-api.js +3 -0
- package/dist/vault-maintenance-commands.d.ts +5 -0
- package/dist/vault-maintenance-commands.js +32 -0
- package/dist/view.svelte.d.ts +215 -0
- package/dist/view.svelte.js +381 -0
- package/dist/vite-env.d.ts +2 -0
- package/dist/workspace-host-internal.d.ts +7 -0
- package/dist/workspace-host-internal.js +7 -0
- package/dist/workspace-host.d.ts +10 -0
- package/dist/workspace-host.js +14 -0
- package/dist/workspace-layout-commands.d.ts +3 -0
- package/dist/workspace-layout-commands.js +72 -0
- package/dist/workspace-layout-normalizer.d.ts +92 -0
- package/dist/workspace-layout-normalizer.js +301 -0
- package/dist/workspace-layouts.d.ts +7 -0
- package/dist/workspace-layouts.js +23 -0
- package/dist/workspace-trust.d.ts +32 -0
- package/dist/workspace-trust.js +72 -0
- package/dist/workspace.svelte.d.ts +796 -0
- package/dist/workspace.svelte.js +4380 -0
- package/package.json +240 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventDispatcher } from "./events";
|
|
2
|
+
export type ContextKeyValue = string | number | boolean | null | undefined;
|
|
3
|
+
export interface ContextKeyChangeEvent {
|
|
4
|
+
keys: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ScopedContextKey {
|
|
7
|
+
readonly key: string;
|
|
8
|
+
get(): ContextKeyValue;
|
|
9
|
+
set(value: ContextKeyValue): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
}
|
|
12
|
+
type WhenExpression = {
|
|
13
|
+
type: "identifier";
|
|
14
|
+
name: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "literal";
|
|
17
|
+
value: string | number | boolean;
|
|
18
|
+
} | {
|
|
19
|
+
type: "unary";
|
|
20
|
+
operator: "!";
|
|
21
|
+
operand: WhenExpression;
|
|
22
|
+
} | {
|
|
23
|
+
type: "binary";
|
|
24
|
+
operator: "&&" | "||" | "==" | "!=";
|
|
25
|
+
left: WhenExpression;
|
|
26
|
+
right: WhenExpression;
|
|
27
|
+
};
|
|
28
|
+
export declare function parseWhenClause(expression: string): WhenExpression;
|
|
29
|
+
export declare function evaluateWhenClause(expression: string | WhenExpression, lookup: (key: string) => ContextKeyValue): boolean;
|
|
30
|
+
export declare class ContextKeyService extends EventDispatcher<{
|
|
31
|
+
change: [event: ContextKeyChangeEvent];
|
|
32
|
+
}> {
|
|
33
|
+
#private;
|
|
34
|
+
constructor(initialValues?: Record<string, ContextKeyValue>);
|
|
35
|
+
get(key: string): ContextKeyValue;
|
|
36
|
+
set(key: string, value: ContextKeyValue): void;
|
|
37
|
+
reset(key: string): void;
|
|
38
|
+
evaluate(expression: string | null | undefined): boolean;
|
|
39
|
+
createScopedKey(scope: string, key: string, defaultValue?: ContextKeyValue): ScopedContextKey;
|
|
40
|
+
private bump;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { EventDispatcher } from "./events";
|
|
2
|
+
class WhenParser {
|
|
3
|
+
tokens;
|
|
4
|
+
#index = 0;
|
|
5
|
+
constructor(tokens) {
|
|
6
|
+
this.tokens = tokens;
|
|
7
|
+
}
|
|
8
|
+
parse() {
|
|
9
|
+
const expression = this.parseOr();
|
|
10
|
+
this.expect("eof");
|
|
11
|
+
return expression;
|
|
12
|
+
}
|
|
13
|
+
parseOr() {
|
|
14
|
+
let left = this.parseAnd();
|
|
15
|
+
while (this.match("||")) {
|
|
16
|
+
left = {
|
|
17
|
+
type: "binary",
|
|
18
|
+
operator: "||",
|
|
19
|
+
left,
|
|
20
|
+
right: this.parseAnd(),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return left;
|
|
24
|
+
}
|
|
25
|
+
parseAnd() {
|
|
26
|
+
let left = this.parseEquality();
|
|
27
|
+
while (this.match("&&")) {
|
|
28
|
+
left = {
|
|
29
|
+
type: "binary",
|
|
30
|
+
operator: "&&",
|
|
31
|
+
left,
|
|
32
|
+
right: this.parseEquality(),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return left;
|
|
36
|
+
}
|
|
37
|
+
parseEquality() {
|
|
38
|
+
let left = this.parseUnary();
|
|
39
|
+
while (true) {
|
|
40
|
+
if (this.match("==")) {
|
|
41
|
+
left = {
|
|
42
|
+
type: "binary",
|
|
43
|
+
operator: "==",
|
|
44
|
+
left,
|
|
45
|
+
right: this.parseUnary(),
|
|
46
|
+
};
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (this.match("!=")) {
|
|
50
|
+
left = {
|
|
51
|
+
type: "binary",
|
|
52
|
+
operator: "!=",
|
|
53
|
+
left,
|
|
54
|
+
right: this.parseUnary(),
|
|
55
|
+
};
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
return left;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
parseUnary() {
|
|
62
|
+
if (this.match("!")) {
|
|
63
|
+
return {
|
|
64
|
+
type: "unary",
|
|
65
|
+
operator: "!",
|
|
66
|
+
operand: this.parseUnary(),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return this.parsePrimary();
|
|
70
|
+
}
|
|
71
|
+
parsePrimary() {
|
|
72
|
+
const token = this.current();
|
|
73
|
+
if (token.type === "identifier") {
|
|
74
|
+
this.#index += 1;
|
|
75
|
+
return { type: "identifier", name: token.value };
|
|
76
|
+
}
|
|
77
|
+
if (token.type === "string" ||
|
|
78
|
+
token.type === "number" ||
|
|
79
|
+
token.type === "boolean") {
|
|
80
|
+
this.#index += 1;
|
|
81
|
+
return { type: "literal", value: token.value };
|
|
82
|
+
}
|
|
83
|
+
if (this.match("(")) {
|
|
84
|
+
const expression = this.parseOr();
|
|
85
|
+
this.expect(")");
|
|
86
|
+
return expression;
|
|
87
|
+
}
|
|
88
|
+
throw new Error(`Unexpected token ${describeToken(token)}`);
|
|
89
|
+
}
|
|
90
|
+
current() {
|
|
91
|
+
return this.tokens[this.#index] ?? { type: "eof" };
|
|
92
|
+
}
|
|
93
|
+
match(type) {
|
|
94
|
+
if (this.current().type !== type) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
this.#index += 1;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
expect(type) {
|
|
101
|
+
if (!this.match(type)) {
|
|
102
|
+
throw new Error(`Expected ${type}, received ${describeToken(this.current())}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function describeToken(token) {
|
|
107
|
+
return token.type === "identifier"
|
|
108
|
+
? `identifier ${token.value}`
|
|
109
|
+
: token.type === "string"
|
|
110
|
+
? `string ${JSON.stringify(token.value)}`
|
|
111
|
+
: token.type === "number"
|
|
112
|
+
? `number ${token.value}`
|
|
113
|
+
: token.type === "boolean"
|
|
114
|
+
? `boolean ${token.value}`
|
|
115
|
+
: token.type;
|
|
116
|
+
}
|
|
117
|
+
function tokenizeWhenClause(expression) {
|
|
118
|
+
const tokens = [];
|
|
119
|
+
let index = 0;
|
|
120
|
+
while (index < expression.length) {
|
|
121
|
+
const char = expression[index];
|
|
122
|
+
if (/\s/.test(char)) {
|
|
123
|
+
index += 1;
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const pair = expression.slice(index, index + 2);
|
|
127
|
+
if (pair === "&&" || pair === "||" || pair === "==" || pair === "!=") {
|
|
128
|
+
tokens.push({ type: pair });
|
|
129
|
+
index += 2;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (char === "!" || char === "(" || char === ")") {
|
|
133
|
+
tokens.push({ type: char });
|
|
134
|
+
index += 1;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (char === '"' || char === "'") {
|
|
138
|
+
const quote = char;
|
|
139
|
+
index += 1;
|
|
140
|
+
let value = "";
|
|
141
|
+
while (index < expression.length) {
|
|
142
|
+
const next = expression[index];
|
|
143
|
+
if (next === "\\") {
|
|
144
|
+
const escaped = expression[index + 1];
|
|
145
|
+
if (escaped === undefined) {
|
|
146
|
+
throw new Error("Unterminated string literal");
|
|
147
|
+
}
|
|
148
|
+
value += escaped;
|
|
149
|
+
index += 2;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (next === quote) {
|
|
153
|
+
index += 1;
|
|
154
|
+
tokens.push({ type: "string", value });
|
|
155
|
+
value = "";
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
value += next;
|
|
159
|
+
index += 1;
|
|
160
|
+
}
|
|
161
|
+
if (value !== "") {
|
|
162
|
+
throw new Error("Unterminated string literal");
|
|
163
|
+
}
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
const numberMatch = expression.slice(index).match(/^\d+(?:\.\d+)?/);
|
|
167
|
+
if (numberMatch) {
|
|
168
|
+
tokens.push({ type: "number", value: Number(numberMatch[0]) });
|
|
169
|
+
index += numberMatch[0].length;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
const identifierMatch = expression
|
|
173
|
+
.slice(index)
|
|
174
|
+
.match(/^[A-Za-z_][A-Za-z0-9_.-]*/);
|
|
175
|
+
if (identifierMatch) {
|
|
176
|
+
const value = identifierMatch[0];
|
|
177
|
+
if (value === "true" || value === "false") {
|
|
178
|
+
tokens.push({ type: "boolean", value: value === "true" });
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
tokens.push({ type: "identifier", value });
|
|
182
|
+
}
|
|
183
|
+
index += value.length;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
throw new Error(`Unexpected character ${JSON.stringify(char)}`);
|
|
187
|
+
}
|
|
188
|
+
tokens.push({ type: "eof" });
|
|
189
|
+
return tokens;
|
|
190
|
+
}
|
|
191
|
+
export function parseWhenClause(expression) {
|
|
192
|
+
return new WhenParser(tokenizeWhenClause(expression)).parse();
|
|
193
|
+
}
|
|
194
|
+
export function evaluateWhenClause(expression, lookup) {
|
|
195
|
+
const parsed = typeof expression === "string" ? parseWhenClause(expression) : expression;
|
|
196
|
+
return Boolean(evaluateExpression(parsed, lookup));
|
|
197
|
+
}
|
|
198
|
+
function evaluateExpression(expression, lookup) {
|
|
199
|
+
switch (expression.type) {
|
|
200
|
+
case "identifier":
|
|
201
|
+
return lookup(expression.name);
|
|
202
|
+
case "literal":
|
|
203
|
+
return expression.value;
|
|
204
|
+
case "unary":
|
|
205
|
+
return !Boolean(evaluateExpression(expression.operand, lookup));
|
|
206
|
+
case "binary": {
|
|
207
|
+
if (expression.operator === "&&") {
|
|
208
|
+
return (Boolean(evaluateExpression(expression.left, lookup)) &&
|
|
209
|
+
Boolean(evaluateExpression(expression.right, lookup)));
|
|
210
|
+
}
|
|
211
|
+
if (expression.operator === "||") {
|
|
212
|
+
return (Boolean(evaluateExpression(expression.left, lookup)) ||
|
|
213
|
+
Boolean(evaluateExpression(expression.right, lookup)));
|
|
214
|
+
}
|
|
215
|
+
const left = evaluateExpression(expression.left, lookup);
|
|
216
|
+
const right = evaluateExpression(expression.right, lookup);
|
|
217
|
+
return expression.operator === "==" ? left === right : left !== right;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export class ContextKeyService extends EventDispatcher {
|
|
222
|
+
#values = new Map();
|
|
223
|
+
#parsedExpressions = new Map();
|
|
224
|
+
#version = $state(0);
|
|
225
|
+
constructor(initialValues = {}) {
|
|
226
|
+
super();
|
|
227
|
+
for (const [key, value] of Object.entries(initialValues)) {
|
|
228
|
+
this.#values.set(key, value);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
get(key) {
|
|
232
|
+
this.#version;
|
|
233
|
+
return this.#values.get(key);
|
|
234
|
+
}
|
|
235
|
+
set(key, value) {
|
|
236
|
+
if (this.#values.get(key) === value && this.#values.has(key)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
this.#values.set(key, value);
|
|
240
|
+
this.bump([key]);
|
|
241
|
+
}
|
|
242
|
+
reset(key) {
|
|
243
|
+
if (!this.#values.delete(key)) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
this.bump([key]);
|
|
247
|
+
}
|
|
248
|
+
evaluate(expression) {
|
|
249
|
+
this.#version;
|
|
250
|
+
if (!expression?.trim()) {
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const parsed = this.#parsedExpressions.get(expression) ?? parseWhenClause(expression);
|
|
255
|
+
this.#parsedExpressions.set(expression, parsed);
|
|
256
|
+
return evaluateWhenClause(parsed, (key) => this.#values.get(key));
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
createScopedKey(scope, key, defaultValue) {
|
|
263
|
+
const scopedKey = `${scope}.${key}`;
|
|
264
|
+
if (defaultValue !== undefined) {
|
|
265
|
+
this.set(scopedKey, defaultValue);
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
key: scopedKey,
|
|
269
|
+
get: () => this.get(scopedKey),
|
|
270
|
+
set: (value) => this.set(scopedKey, value),
|
|
271
|
+
reset: () => this.reset(scopedKey),
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
bump(keys) {
|
|
275
|
+
this.#version += 1;
|
|
276
|
+
this.emit("change", { keys });
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { Workspace } from "./workspace.svelte";
|
|
2
|
+
import { TFile, Vault, type AppDatabase, type DataAdapter, type VaultSession } from "./storage";
|
|
3
|
+
import { AppSettings } from "./settings.svelte";
|
|
4
|
+
import type { Extension } from "@codemirror/state";
|
|
5
|
+
import { PluginManager } from "./plugin-manager";
|
|
6
|
+
import { Configuration } from "./configuration.svelte";
|
|
7
|
+
import { CommandManager, Keymap, Scope, type UserEvent } from "./command.svelte";
|
|
8
|
+
import { MetadataCache } from "./cache.svelte";
|
|
9
|
+
import type { MarkdownDirectiveRenderer, MarkdownPostProcessor, MarkdownViewMenuItemProvider } from "./markdown";
|
|
10
|
+
import { type Logger } from "./logging";
|
|
11
|
+
import type { Component } from "./view.svelte";
|
|
12
|
+
import { MetadataTypeManager } from "./metadata.svelte";
|
|
13
|
+
import type { EditorSuggest } from "./suggest";
|
|
14
|
+
import { FileManager } from "./file-manager";
|
|
15
|
+
import { EmbedRegistry } from "./embed-registry";
|
|
16
|
+
import type { OpenViewState } from "./workspace.svelte";
|
|
17
|
+
import { LocalizationManager } from "./localization-manager.svelte";
|
|
18
|
+
import { NotificationManager } from "./notifications";
|
|
19
|
+
import { type TelemetryService } from "./telemetry";
|
|
20
|
+
import { LanguageServiceManager } from "./language-service";
|
|
21
|
+
import { ContextKeyService } from "./context-keys.svelte";
|
|
22
|
+
import { StatusBarManager } from "./status-bar.svelte";
|
|
23
|
+
import { AppUrlService } from "./app-url";
|
|
24
|
+
import { WorkspaceTrustService } from "./workspace-trust";
|
|
25
|
+
import { DefaultPluginDistributionManager, type DefaultPluginDistributionManagerOptions } from "./plugin-distribution";
|
|
26
|
+
import type { PluginDependencyResolverFactory } from "./plugin-dependency-resolver";
|
|
27
|
+
import type { PluginAssetServer } from "./plugin-asset-server";
|
|
28
|
+
import { SearchDocumentProviderRegistry } from "./search-document-provider";
|
|
29
|
+
import { DailyDocumentProviderRegistry } from "./daily-document-provider";
|
|
30
|
+
import { AppToolRegistry } from "./agent-tools";
|
|
31
|
+
import { MarkdownExtensionRegistry } from "./markdown-extension-registry";
|
|
32
|
+
import { MarkdownFileSurfaceRegistry } from "./markdown-file-surface-registry";
|
|
33
|
+
export interface AppWorkspaceShellApplicationProperties {
|
|
34
|
+
/** Application name shown by the shell's About surface. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Optional application logo. Use `null` to fall back to the shell icon. */
|
|
37
|
+
logoUrl?: string | null;
|
|
38
|
+
buildTime?: string | null;
|
|
39
|
+
commitHash?: string;
|
|
40
|
+
copyright?: string;
|
|
41
|
+
}
|
|
42
|
+
/** Host-owned metadata and minimal static chrome for the workspace shell. */
|
|
43
|
+
export interface AppWorkspaceShellProperties {
|
|
44
|
+
application?: AppWorkspaceShellApplicationProperties;
|
|
45
|
+
/** Enable design-core's notification center and status affordance. */
|
|
46
|
+
notifications?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Bootstrap dependencies required to construct an {@link App} instance.
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export type AppStateProperties = {
|
|
54
|
+
version: string;
|
|
55
|
+
configPath: string;
|
|
56
|
+
adapter?: DataAdapter;
|
|
57
|
+
session?: VaultSession;
|
|
58
|
+
appDatabase?: AppDatabase;
|
|
59
|
+
safeMode?: AppSafeModeState;
|
|
60
|
+
createCommunityPluginDependencyResolver?: PluginDependencyResolverFactory;
|
|
61
|
+
pluginAssetServer?: PluginAssetServer;
|
|
62
|
+
pluginDistributionOptions?: AppPluginDistributionOptions;
|
|
63
|
+
workspaceShell?: AppWorkspaceShellProperties;
|
|
64
|
+
markdownRenderer: (markdown: string, el: HTMLElement, sourcePath: string, component: Component) => Promise<void>;
|
|
65
|
+
};
|
|
66
|
+
export type AppPluginDistributionOptions = Omit<DefaultPluginDistributionManagerOptions, "adapter" | "appVersion" | "platform" | "workspaceTrusted" | "pluginManager">;
|
|
67
|
+
export type ExtType = Extension | ((context: Record<string, any>) => Extension);
|
|
68
|
+
/**
|
|
69
|
+
* Details about the last startup failure that caused safe mode to activate.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export interface AppSafeModeFailure {
|
|
74
|
+
task: string | null;
|
|
75
|
+
message: string;
|
|
76
|
+
detail: string;
|
|
77
|
+
pluginId: string | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Safe mode flags that disable risky startup behavior after a failed launch.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export interface AppSafeModeState {
|
|
85
|
+
active: boolean;
|
|
86
|
+
disableCommunityPlugins: boolean;
|
|
87
|
+
disableOptionalCorePlugins: boolean;
|
|
88
|
+
skipLayoutRestore: boolean;
|
|
89
|
+
disableNotebookExecution: boolean;
|
|
90
|
+
lastStartupFailure: AppSafeModeFailure | null;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create the default safe mode state used for a normal startup.
|
|
94
|
+
*
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
export declare function createDefaultAppSafeModeState(): AppSafeModeState;
|
|
98
|
+
/**
|
|
99
|
+
* Ephemeral renderer state shared while processing a markdown view.
|
|
100
|
+
*
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export declare class RenderContext {
|
|
104
|
+
hoverPopover: null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* In-memory secret store used by runtime services and plugins.
|
|
108
|
+
*
|
|
109
|
+
* Hosts may replace or mirror this with stronger persisted storage, but the API
|
|
110
|
+
* surface intentionally stays small and synchronous for plugin code.
|
|
111
|
+
*
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export declare class SecretStorage {
|
|
115
|
+
private secrets;
|
|
116
|
+
/**
|
|
117
|
+
* Store or replace a secret value.
|
|
118
|
+
*
|
|
119
|
+
* @param id - Stable identifier for the secret.
|
|
120
|
+
* @param secret - Raw secret value to store.
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
setSecret(id: string, secret: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* Look up a secret by id.
|
|
126
|
+
*
|
|
127
|
+
* @param id - Stable identifier for the secret.
|
|
128
|
+
* @returns The stored secret value, or `null` if no secret exists.
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
getSecret(id: string): string | null;
|
|
132
|
+
/**
|
|
133
|
+
* List the ids of all stored secrets.
|
|
134
|
+
*
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
listSecrets(): string[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Central runtime service container exposed to plugins, views, and renderer
|
|
141
|
+
* integrations.
|
|
142
|
+
*
|
|
143
|
+
* `App` owns the active vault session, workspace layout, plugin runtime,
|
|
144
|
+
* commands, metadata cache, notifications, and related shared services.
|
|
145
|
+
*
|
|
146
|
+
* @public
|
|
147
|
+
*/
|
|
148
|
+
export declare class App {
|
|
149
|
+
readonly props: AppStateProperties;
|
|
150
|
+
readonly i18n: LocalizationManager;
|
|
151
|
+
readonly workspace: Workspace;
|
|
152
|
+
readonly vault: Vault;
|
|
153
|
+
readonly appDatabase: AppDatabase;
|
|
154
|
+
readonly session?: VaultSession;
|
|
155
|
+
readonly safeMode: AppSafeModeState;
|
|
156
|
+
plugins: PluginManager;
|
|
157
|
+
scope: Scope;
|
|
158
|
+
keymap: Keymap;
|
|
159
|
+
readonly settings: AppSettings;
|
|
160
|
+
readonly editors: Map<string, Set<ExtType>>;
|
|
161
|
+
readonly editorSuggest: Map<string, Set<EditorSuggest<any>>>;
|
|
162
|
+
readonly configuration: Configuration;
|
|
163
|
+
readonly fileManager: FileManager;
|
|
164
|
+
readonly contextKeys: ContextKeyService;
|
|
165
|
+
readonly statusBar: StatusBarManager;
|
|
166
|
+
readonly urls: AppUrlService;
|
|
167
|
+
readonly workspaceTrust: WorkspaceTrustService;
|
|
168
|
+
readonly pluginDistribution: DefaultPluginDistributionManager;
|
|
169
|
+
mardownPostProcessor: Array<MarkdownPostProcessor>;
|
|
170
|
+
mardownCodeBlockPostProcessor: Record<string, Array<MarkdownPostProcessor>>;
|
|
171
|
+
markdownDirectiveRenderers: Record<string, MarkdownDirectiveRenderer>;
|
|
172
|
+
readonly markdownViewMenuItems: Set<MarkdownViewMenuItemProvider>;
|
|
173
|
+
metadataTypeManager: MetadataTypeManager;
|
|
174
|
+
commands: CommandManager;
|
|
175
|
+
settingsOpen: boolean;
|
|
176
|
+
settingsTabId: string | null;
|
|
177
|
+
metadataCache: MetadataCache;
|
|
178
|
+
embedRegistry: EmbedRegistry;
|
|
179
|
+
readonly searchDocumentProviders: SearchDocumentProviderRegistry;
|
|
180
|
+
readonly dailyDocumentProviders: DailyDocumentProviderRegistry;
|
|
181
|
+
readonly indexProjections: import("./storage/index-projection").IndexProjectionRegistry;
|
|
182
|
+
readonly agentTools: AppToolRegistry;
|
|
183
|
+
readonly markdownExtensions: MarkdownExtensionRegistry;
|
|
184
|
+
readonly markdownFileSurfaces: MarkdownFileSurfaceRegistry;
|
|
185
|
+
readonly agentSkills: import("./agent-skills").AppSkillRegistry;
|
|
186
|
+
readonly agentSlashCommands: import("./agent-skills").AppSlashCommandRegistry;
|
|
187
|
+
readonly agentResultViews: import("./agent-result-views").AppResultViewRegistry;
|
|
188
|
+
lastEvent: UserEvent | null;
|
|
189
|
+
renderContext: RenderContext;
|
|
190
|
+
secretStorage: SecretStorage;
|
|
191
|
+
notifications: NotificationManager;
|
|
192
|
+
telemetry: TelemetryService;
|
|
193
|
+
readonly languageServices: LanguageServiceManager;
|
|
194
|
+
get internalPlugins(): {
|
|
195
|
+
plugins: Record<string, {
|
|
196
|
+
manifest: import("./plugin").PluginManifest;
|
|
197
|
+
}>;
|
|
198
|
+
getEnabledPluginById: (pluginId: string) => any | null;
|
|
199
|
+
};
|
|
200
|
+
readonly logger: Logger;
|
|
201
|
+
/**
|
|
202
|
+
* Create the application service container for a mounted vault session.
|
|
203
|
+
*
|
|
204
|
+
* @param props - Runtime services and adapters required to bootstrap the app.
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
constructor(props: AppStateProperties);
|
|
208
|
+
private initializeContextKeys;
|
|
209
|
+
private syncWorkspaceContextKeys;
|
|
210
|
+
setWorkspaceTrusted(trusted: boolean): void;
|
|
211
|
+
openFile(file: TFile, openState?: OpenViewState): Promise<void>;
|
|
212
|
+
editorExtensions(viewType: string, context?: Record<string, any>): Extension[];
|
|
213
|
+
/**
|
|
214
|
+
* Registers a CodeMirror 6 extension. To reconfigure cm6 extensions for a
|
|
215
|
+
* plugin on the fly, an array should be passed in, and modified dynamically.
|
|
216
|
+
* Once this array is modified, calling {@link Workspace#updateOptions} will
|
|
217
|
+
* apply the changes.
|
|
218
|
+
*
|
|
219
|
+
* @param extension - Must be a CodeMirror 6 `Extension`, or an array of
|
|
220
|
+
* Extensions.
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
registerEditorExtension(extension: ExtType, viewType?: string): void;
|
|
224
|
+
unregisterEditorExtension(extension: ExtType, viewType?: string): void;
|
|
225
|
+
registerEditorSuggest(suggest: EditorSuggest<any>, viewType?: string): void;
|
|
226
|
+
unregisterEditorSuggest(suggest: EditorSuggest<any>, viewType?: string): void;
|
|
227
|
+
registerMarkdownPostProcessor(postProcessor: MarkdownPostProcessor): void;
|
|
228
|
+
unregisterMarkdownPostProcessor(postProcessor: MarkdownPostProcessor): void;
|
|
229
|
+
registerMarkdownCodeBlockProcessor(language: string, postProcessor: MarkdownPostProcessor): void;
|
|
230
|
+
unregisterMarkdownCodeBlockProcessor(language: string, postProcessor: MarkdownPostProcessor): void;
|
|
231
|
+
registerMarkdownDirectiveRenderer(directive: string, renderer: MarkdownDirectiveRenderer): void;
|
|
232
|
+
unregisterMarkdownDirectiveRenderer(directive: string): void;
|
|
233
|
+
registerMarkdownViewMenuItem(provider: MarkdownViewMenuItemProvider): void;
|
|
234
|
+
unregisterMarkdownViewMenuItem(provider: MarkdownViewMenuItemProvider): void;
|
|
235
|
+
get version(): string;
|
|
236
|
+
get isDarkMode(): boolean;
|
|
237
|
+
loadLocalStorage(key: string): string | null;
|
|
238
|
+
saveLocalStorage(key: string, data: string): void;
|
|
239
|
+
setting(id: "options" | "core-plugins" | "community-plugins"): import("./settings.svelte").SettingGroup;
|
|
240
|
+
}
|
|
241
|
+
export type AppState = App;
|
|
242
|
+
declare global {
|
|
243
|
+
var app: App;
|
|
244
|
+
}
|
|
245
|
+
export declare function setApplicationState(props: AppStateProperties): AppState;
|
|
246
|
+
export { getApplicationCompatibility, installApplicationCompatibility, resolveApplication } from "./application-compatibility";
|
|
247
|
+
export { provideApplicationState, useApplicationState } from "./application-state.svelte";
|