@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,19 @@
|
|
|
1
|
+
import type { LapisPluginModuleFormat } from "./lapis-extension";
|
|
2
|
+
import type { PluginManifest } from "./plugin";
|
|
3
|
+
export type PluginExecutionHostId = "workspace" | "electron-renderer" | "electron-sidecar";
|
|
4
|
+
export interface SelectedPluginRuntimeEntry {
|
|
5
|
+
host: PluginExecutionHostId;
|
|
6
|
+
path: string;
|
|
7
|
+
format: LapisPluginModuleFormat;
|
|
8
|
+
fallbackPath?: string;
|
|
9
|
+
sharedDependencies: string[];
|
|
10
|
+
requiresReloadOnUpdate?: boolean;
|
|
11
|
+
source: "lapis-runtime-entry" | "lapis-legacy-runtime" | "obsidian-main";
|
|
12
|
+
}
|
|
13
|
+
export declare function selectPluginRuntimeEntry(options: {
|
|
14
|
+
manifest: PluginManifest;
|
|
15
|
+
requestedHost: PluginExecutionHostId;
|
|
16
|
+
supportsEsm: boolean;
|
|
17
|
+
supportsNodeEsm: boolean;
|
|
18
|
+
hasMainJs: boolean;
|
|
19
|
+
}): SelectedPluginRuntimeEntry | null;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export function selectPluginRuntimeEntry(options) {
|
|
2
|
+
const lapis = isLapisRuntimeContainer(options.manifest.lapis)
|
|
3
|
+
? options.manifest.lapis
|
|
4
|
+
: null;
|
|
5
|
+
const structuredEntry = lapis
|
|
6
|
+
? selectStructuredEntry(lapis, options.requestedHost)
|
|
7
|
+
: null;
|
|
8
|
+
if (!lapis) {
|
|
9
|
+
if (!options.hasMainJs) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
host: options.requestedHost,
|
|
14
|
+
path: "main.js",
|
|
15
|
+
format: "commonjs",
|
|
16
|
+
sharedDependencies: [],
|
|
17
|
+
source: "obsidian-main",
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
if (structuredEntry) {
|
|
21
|
+
return selectDescriptorEntry(structuredEntry, {
|
|
22
|
+
host: options.requestedHost,
|
|
23
|
+
supportsEsm: options.supportsEsm,
|
|
24
|
+
supportsNodeEsm: options.supportsNodeEsm,
|
|
25
|
+
sharedDependencies: structuredEntry.sharedDependencies ??
|
|
26
|
+
getSharedDependencyDefaults(lapis, options.requestedHost),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const legacyEntry = selectLegacyEntry(lapis, options.requestedHost);
|
|
30
|
+
if (legacyEntry) {
|
|
31
|
+
return {
|
|
32
|
+
host: options.requestedHost,
|
|
33
|
+
path: legacyEntry,
|
|
34
|
+
format: "commonjs",
|
|
35
|
+
sharedDependencies: getSharedDependencyDefaults(lapis, options.requestedHost),
|
|
36
|
+
source: "lapis-legacy-runtime",
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (options.hasMainJs) {
|
|
40
|
+
return {
|
|
41
|
+
host: options.requestedHost,
|
|
42
|
+
path: "main.js",
|
|
43
|
+
format: "commonjs",
|
|
44
|
+
sharedDependencies: getSharedDependencyDefaults(lapis, options.requestedHost),
|
|
45
|
+
source: "obsidian-main",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
function selectDescriptorEntry(descriptor, options) {
|
|
51
|
+
if ((descriptor.format === "esm" && !options.supportsEsm) ||
|
|
52
|
+
(descriptor.format === "node-esm" && !options.supportsNodeEsm)) {
|
|
53
|
+
if (!descriptor.fallbackPath) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
host: options.host,
|
|
58
|
+
path: descriptor.fallbackPath,
|
|
59
|
+
format: "commonjs",
|
|
60
|
+
fallbackPath: descriptor.fallbackPath,
|
|
61
|
+
sharedDependencies: options.sharedDependencies,
|
|
62
|
+
requiresReloadOnUpdate: descriptor.requiresReloadOnUpdate,
|
|
63
|
+
source: "lapis-runtime-entry",
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
host: options.host,
|
|
68
|
+
path: descriptor.path,
|
|
69
|
+
format: descriptor.format,
|
|
70
|
+
fallbackPath: descriptor.fallbackPath,
|
|
71
|
+
sharedDependencies: options.sharedDependencies,
|
|
72
|
+
requiresReloadOnUpdate: descriptor.requiresReloadOnUpdate,
|
|
73
|
+
source: "lapis-runtime-entry",
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function selectStructuredEntry(lapis, host) {
|
|
77
|
+
const entries = lapis.runtime?.entries;
|
|
78
|
+
if (!entries) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
switch (host) {
|
|
82
|
+
case "electron-renderer":
|
|
83
|
+
return entries.electronRenderer ?? entries.workspace ?? null;
|
|
84
|
+
case "electron-sidecar":
|
|
85
|
+
return (entries.trustedDesktop ??
|
|
86
|
+
entries.electronSidecar ??
|
|
87
|
+
entries.desktop ??
|
|
88
|
+
null);
|
|
89
|
+
case "workspace":
|
|
90
|
+
default:
|
|
91
|
+
return entries.workspace ?? null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function selectLegacyEntry(lapis, host) {
|
|
95
|
+
const runtime = lapis.runtime;
|
|
96
|
+
if (!runtime) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (host === "electron-sidecar") {
|
|
100
|
+
return normalizeRuntimePath(runtime.trustedDesktop ?? runtime.desktop);
|
|
101
|
+
}
|
|
102
|
+
return normalizeRuntimePath(runtime.workspace);
|
|
103
|
+
}
|
|
104
|
+
function getSharedDependencyDefaults(lapis, host) {
|
|
105
|
+
const sharedDependencies = lapis?.runtime?.sharedDependencies;
|
|
106
|
+
if (!sharedDependencies) {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
switch (host) {
|
|
110
|
+
case "electron-renderer":
|
|
111
|
+
return normalizeStringArray(sharedDependencies.electronRenderer ?? sharedDependencies.workspace);
|
|
112
|
+
case "electron-sidecar":
|
|
113
|
+
return normalizeStringArray(sharedDependencies.electronSidecar ?? sharedDependencies.desktop);
|
|
114
|
+
case "workspace":
|
|
115
|
+
default:
|
|
116
|
+
return normalizeStringArray(sharedDependencies.workspace);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function normalizeRuntimePath(value) {
|
|
120
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
121
|
+
}
|
|
122
|
+
function normalizeStringArray(value) {
|
|
123
|
+
if (!Array.isArray(value)) {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
return [
|
|
127
|
+
...new Set(value.filter((item) => typeof item === "string")),
|
|
128
|
+
];
|
|
129
|
+
}
|
|
130
|
+
function isLapisRuntimeContainer(value) {
|
|
131
|
+
return isRecord(value) && value.manifestVersion === 1;
|
|
132
|
+
}
|
|
133
|
+
function isRecord(value) {
|
|
134
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
135
|
+
}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import type { MetadataProcessor } from "./cache.svelte";
|
|
2
|
+
import type { IndexProjectionRegistration, RegisteredIndexProjectionHandle } from "./storage/index-projection";
|
|
3
|
+
import type { SearchDocumentProvider, SearchDocumentProviderRegistration } from "./search-document-provider";
|
|
4
|
+
import type { Command, KeymapEventHandler } from "./command.svelte";
|
|
5
|
+
import type { ContextKeyValue, ScopedContextKey } from "./context-keys.svelte";
|
|
6
|
+
import type { App, ExtType } from "./context.svelte";
|
|
7
|
+
import type { LapisExtensionContributions, LapisExtensionKind, LapisExtensionManifest, LapisExtensionPermission, LapisExtensionRuntimeHost, LapisPluginClassification, LapisServiceProviderRegistration, LapisSystemExtensionRegistration } from "./lapis-extension";
|
|
8
|
+
import type { EditorViewContribution } from "./editor-view-registry";
|
|
9
|
+
import type { ConfigurationOptionSourceProvider, ConfigurationOptionSourceRegistration } from "./configuration-option-source-registry";
|
|
10
|
+
import type { HostedPluginCapability } from "./plugin-capability-facade";
|
|
11
|
+
import type { MarkdownDirectiveRenderer, MarkdownPostProcessor, MarkdownPostProcessorContext, MarkdownViewMenuItemProvider } from "./markdown";
|
|
12
|
+
import type { MarkdownExtensionContribution } from "./markdown-extension-registry";
|
|
13
|
+
import type { MarkdownFileSurfaceProvider } from "./markdown-file-surface-registry";
|
|
14
|
+
import type { TypeWidget } from "./metadata.svelte";
|
|
15
|
+
import type { PluginSettingTab } from "./settings.svelte";
|
|
16
|
+
import type { EditorSuggest } from "./suggest";
|
|
17
|
+
import type { TelemetryAttributes, TelemetryMeasurementOptions, TelemetrySpan, TelemetrySpanOptions } from "./telemetry";
|
|
18
|
+
import type { PluginProvenance } from "./plugin-distribution/types";
|
|
19
|
+
import { Component } from "./view.svelte";
|
|
20
|
+
import type { ViewCreator } from "./workspace.svelte";
|
|
21
|
+
import type { DiagnosticCollection, DiagnosticCollectionOptions } from "./diagnostics";
|
|
22
|
+
import type { AppTool, AppToolRegistration } from "./agent-tools";
|
|
23
|
+
import type { AgentResultViewDefinition, AgentResultViewRegistration } from "./agent-result-views";
|
|
24
|
+
import type { AppSkillSourceRegistration, AppSlashCommandDefinition, AppSlashCommandRegistration, ProgrammaticAppSkill } from "./agent-skills";
|
|
25
|
+
/**
|
|
26
|
+
* A concise, plugin-owned palette command that opens a registered view.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type ViewOpenCommand = Omit<Command, "id" | "name" | "sourcePlugin" | "title" | "callback"> & {
|
|
31
|
+
/** @public */
|
|
32
|
+
id: `open-${string}`;
|
|
33
|
+
/** @public */
|
|
34
|
+
name: `Open ${string}`;
|
|
35
|
+
/** @public */
|
|
36
|
+
callback: NonNullable<Command["callback"]>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Declares how a registered view is reached.
|
|
40
|
+
*
|
|
41
|
+
* First-party source must classify every registration. The optional parameter
|
|
42
|
+
* preserves the established third-party plugin API.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export type ViewAccess = {
|
|
47
|
+
kind: "command";
|
|
48
|
+
command: ViewOpenCommand;
|
|
49
|
+
} | {
|
|
50
|
+
kind: "file";
|
|
51
|
+
} | {
|
|
52
|
+
kind: "internal";
|
|
53
|
+
} | {
|
|
54
|
+
kind: "alias";
|
|
55
|
+
canonicalViewType: string;
|
|
56
|
+
};
|
|
57
|
+
export interface PluginManifest {
|
|
58
|
+
/**
|
|
59
|
+
* Vault path to the plugin folder in the config directory.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
dir?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The plugin ID.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* The display name.
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
name: string;
|
|
76
|
+
/**
|
|
77
|
+
* The author's name.
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
author: string;
|
|
82
|
+
/**
|
|
83
|
+
* The current version, using {@link https://semver.org/ Semantic Versioning}.
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
version: string;
|
|
88
|
+
/**
|
|
89
|
+
* The minimum required Obsidian version to run this plugin.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
minAppVersion: string;
|
|
94
|
+
/**
|
|
95
|
+
* A description of the plugin.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
description: string;
|
|
100
|
+
/**
|
|
101
|
+
* A URL to the author's website.
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
authorUrl?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the plugin can be used only on desktop.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
isDesktopOnly?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Runtime host IDs this plugin explicitly supports.
|
|
114
|
+
*
|
|
115
|
+
* Missing or empty values preserve baseline Obsidian manifest behavior.
|
|
116
|
+
*
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
supportedRuntimes?: string[];
|
|
120
|
+
/**
|
|
121
|
+
* Structured host capabilities required before the plugin can be evaluated.
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
requiredCapabilities?: HostedPluginCapability[];
|
|
126
|
+
/**
|
|
127
|
+
* Optional host-specific execution hints for future sidecar scheduling.
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
executionHints?: Record<string, unknown>;
|
|
132
|
+
/**
|
|
133
|
+
* Optional Lapis extension metadata. Existing Obsidian-compatible manifests
|
|
134
|
+
* can omit this namespace and continue to load unchanged.
|
|
135
|
+
*
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
lapis?: LapisExtensionManifest;
|
|
139
|
+
}
|
|
140
|
+
export type { LapisExtensionContributions, LapisExtensionKind, LapisExtensionManifest, LapisExtensionPermission, LapisExtensionRuntimeHost, LapisPluginClassification, LapisSystemExtensionRegistration, };
|
|
141
|
+
/**
|
|
142
|
+
* Identifies where a plugin was loaded from.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export type PluginSource = "core" | "community" | "official" | "system";
|
|
147
|
+
/**
|
|
148
|
+
* Resolve the compatibility data path used by `loadData()` and `saveData()`.
|
|
149
|
+
*
|
|
150
|
+
* Community plugins store data beside their manifest folder, while bundled and
|
|
151
|
+
* system plugins use the shared `/.obsidian/<id>.json` location.
|
|
152
|
+
*
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
export declare function resolvePluginDataPath(pluginId: string, source: PluginSource, basePath?: string): string | null;
|
|
156
|
+
export type PluginRuntimeState = "disabled" | "enabling" | "enabled" | "disabling" | "failed";
|
|
157
|
+
export type PluginConstructor<T extends Plugin = Plugin> = new (app: App) => T;
|
|
158
|
+
/**
|
|
159
|
+
* Runtime metadata applied to a plugin instance before activation.
|
|
160
|
+
*
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
export interface PluginRuntimeOptions {
|
|
164
|
+
basePath?: string;
|
|
165
|
+
source?: PluginSource;
|
|
166
|
+
provenance?: PluginProvenance;
|
|
167
|
+
required?: boolean;
|
|
168
|
+
hostMode?: string;
|
|
169
|
+
requestedCapabilities?: HostedPluginCapability[];
|
|
170
|
+
grantedCapabilities?: HostedPluginCapability[];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Base class for Lapis plugins.
|
|
174
|
+
*
|
|
175
|
+
* Plugins extend {@link Component}, so teardown callbacks, events, commands, and
|
|
176
|
+
* DOM listeners registered through helper methods are cleaned up when the
|
|
177
|
+
* plugin unloads.
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
export declare abstract class Plugin extends Component {
|
|
182
|
+
#private;
|
|
183
|
+
readonly app: App;
|
|
184
|
+
readonly manifest: PluginManifest;
|
|
185
|
+
basePath: string;
|
|
186
|
+
constructor(app: App, manifest: PluginManifest);
|
|
187
|
+
/**
|
|
188
|
+
* Load plugin state and register plugin-owned resources.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
abstract onload(): Promise<void> | void;
|
|
193
|
+
/**
|
|
194
|
+
* Release plugin-owned resources before the plugin unloads.
|
|
195
|
+
*
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
onunload(): Promise<void> | void;
|
|
199
|
+
/**
|
|
200
|
+
* Apply runtime metadata resolved by the plugin manager before activation.
|
|
201
|
+
*
|
|
202
|
+
* @param options - Runtime source, host, and capability information.
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
configureRuntime(options?: PluginRuntimeOptions): void;
|
|
206
|
+
/**
|
|
207
|
+
* Enable the plugin and run its `onload()` lifecycle.
|
|
208
|
+
*
|
|
209
|
+
* @returns A promise that resolves when activation completes.
|
|
210
|
+
* @public
|
|
211
|
+
*/
|
|
212
|
+
enable(): Promise<void>;
|
|
213
|
+
get enabled(): boolean;
|
|
214
|
+
get source(): PluginSource;
|
|
215
|
+
get provenance(): PluginProvenance;
|
|
216
|
+
get required(): boolean;
|
|
217
|
+
/** View types owned by this plugin across enable and disable cycles. */
|
|
218
|
+
get registeredViewTypes(): ReadonlySet<string>;
|
|
219
|
+
get state(): PluginRuntimeState;
|
|
220
|
+
get errorMessage(): string | null;
|
|
221
|
+
get lastFailureMessage(): string | null;
|
|
222
|
+
get failureCount(): number;
|
|
223
|
+
get hostMode(): string;
|
|
224
|
+
get requestedCapabilities(): HostedPluginCapability[];
|
|
225
|
+
get grantedCapabilities(): HostedPluginCapability[];
|
|
226
|
+
get id(): string;
|
|
227
|
+
private getDataPath;
|
|
228
|
+
private readLegacyData;
|
|
229
|
+
private writeLegacyData;
|
|
230
|
+
protected telemetryAttributes(attributes?: TelemetryAttributes): TelemetryAttributes;
|
|
231
|
+
startTelemetrySpan(name: string, options?: TelemetrySpanOptions): TelemetrySpan;
|
|
232
|
+
measureTelemetry<T>(name: string, callback: (span: TelemetrySpan) => T, options?: TelemetryMeasurementOptions): T;
|
|
233
|
+
measureTelemetryAsync<T>(name: string, callback: (span: TelemetrySpan) => Promise<T>, options?: TelemetryMeasurementOptions): Promise<T>;
|
|
234
|
+
disable(): Promise<void>;
|
|
235
|
+
addStatusBarItem(): HTMLElement;
|
|
236
|
+
/**
|
|
237
|
+
* Load settings data from disk. Data is stored in `data.json` in the plugin
|
|
238
|
+
* folder.
|
|
239
|
+
*
|
|
240
|
+
* @public
|
|
241
|
+
* @see {@link https://docs.obsidian.md/Plugins/User+interface/Settings}
|
|
242
|
+
*/
|
|
243
|
+
loadData(): Promise<any>;
|
|
244
|
+
/**
|
|
245
|
+
* Write settings data to disk. Data is stored in `data.json` in the plugin
|
|
246
|
+
* folder.
|
|
247
|
+
*
|
|
248
|
+
* @public
|
|
249
|
+
* @see {@link https://docs.obsidian.md/Plugins/User+interface/Settings}
|
|
250
|
+
*/
|
|
251
|
+
saveData(data: any): Promise<void>;
|
|
252
|
+
loadGeneratedState<T>(key: string): Promise<T | null>;
|
|
253
|
+
saveGeneratedState(key: string, value: unknown): Promise<void>;
|
|
254
|
+
deleteGeneratedState(key: string): Promise<void>;
|
|
255
|
+
migrateDataToGeneratedState<T = unknown>(legacyKey: string, options?: {
|
|
256
|
+
generatedKey?: string;
|
|
257
|
+
pruneLegacyKey?: boolean;
|
|
258
|
+
}): Promise<T | null>;
|
|
259
|
+
private requireGeneratedStateKey;
|
|
260
|
+
private generatedStateMetaKey;
|
|
261
|
+
private generatedStateMigrationMetaKey;
|
|
262
|
+
addRibbonIcon(icon: string, title: string, callback: (evt: MouseEvent) => any): void;
|
|
263
|
+
addCommand(command: Command): Command;
|
|
264
|
+
removeCommand(commandId: string): void;
|
|
265
|
+
registerContextKey(key: string, defaultValue?: ContextKeyValue): ScopedContextKey;
|
|
266
|
+
registerShortcut(handler: KeymapEventHandler): void;
|
|
267
|
+
registerView(type: string, viewCreator: ViewCreator, access?: ViewAccess): void;
|
|
268
|
+
registerSidebarView(type: string, viewCreator: ViewCreator, options?: {
|
|
269
|
+
side?: "left" | "right";
|
|
270
|
+
group?: string;
|
|
271
|
+
groupTitle?: string;
|
|
272
|
+
groupIcon?: string;
|
|
273
|
+
title?: string;
|
|
274
|
+
icon?: string;
|
|
275
|
+
hidden?: boolean;
|
|
276
|
+
}, access?: ViewAccess): void;
|
|
277
|
+
registerEditorView(contribution: EditorViewContribution): void;
|
|
278
|
+
registerConfigurationOptionSource(id: string, provider: Omit<ConfigurationOptionSourceProvider, "pluginId">): ConfigurationOptionSourceRegistration;
|
|
279
|
+
registerHoverLinkSource(id: string, info: any): void;
|
|
280
|
+
registerObsidianProtocolHandler(action: string, handler: (params: Record<string, string>) => any): void;
|
|
281
|
+
registerCliHandler(name: string, prefix: string, callback: (...args: any[]) => any): void;
|
|
282
|
+
registerBasesView(viewId: string, registration: any): boolean;
|
|
283
|
+
registerLapisServiceProvider(registration: Omit<LapisServiceProviderRegistration, "pluginId">): void;
|
|
284
|
+
/** Create an owner-scoped diagnostic collection disposed with this plugin. */
|
|
285
|
+
createDiagnosticCollection(id: string, options?: DiagnosticCollectionOptions): DiagnosticCollection;
|
|
286
|
+
onUserEnable(): Promise<void> | void;
|
|
287
|
+
onExternalSettingsChange(): Promise<void> | void;
|
|
288
|
+
registerExtensions(extensions: string[], viewType?: string): void;
|
|
289
|
+
registerTypeWidget(widget: TypeWidget): void;
|
|
290
|
+
/**
|
|
291
|
+
* Register an EditorSuggest which can provide live suggestions while the user
|
|
292
|
+
* is typing.
|
|
293
|
+
*
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
registerEditorSuggest(editorSuggest: EditorSuggest<any>, viewType?: string): void;
|
|
297
|
+
/**
|
|
298
|
+
* Registers a CodeMirror 6 extension. To reconfigure cm6 extensions for a
|
|
299
|
+
* plugin on the fly, an array should be passed in, and modified dynamically.
|
|
300
|
+
* Once this array is modified, calling {@link Workspace.updateOptions} will
|
|
301
|
+
* apply the changes.
|
|
302
|
+
*
|
|
303
|
+
* @param extension - Must be a CodeMirror 6 `Extension`, or an array of
|
|
304
|
+
* Extensions.
|
|
305
|
+
* @public
|
|
306
|
+
*/
|
|
307
|
+
registerEditorExtension(extension: ExtType, viewType?: string): void;
|
|
308
|
+
/** Register a plugin-owned Markdown contribution for every Markdown surface. */
|
|
309
|
+
registerMarkdownExtension(contribution: MarkdownExtensionContribution): void;
|
|
310
|
+
/** Register a provider for complete Markdown file surfaces. */
|
|
311
|
+
registerMarkdownFileSurfaceProvider(provider: MarkdownFileSurfaceProvider): void;
|
|
312
|
+
/**
|
|
313
|
+
* Registers a post processor, to change how the document looks in reading
|
|
314
|
+
* mode.
|
|
315
|
+
*
|
|
316
|
+
* @public
|
|
317
|
+
* @see {@link https://docs.obsidian.md/Plugins/Editor/Markdown+post+processing}
|
|
318
|
+
*/
|
|
319
|
+
registerMarkdownPostProcessor(postProcessor: MarkdownPostProcessor, sortOrder?: number): MarkdownPostProcessor;
|
|
320
|
+
registerMarkdownCodeBlockProcessor(language: string, handler: (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => Promise<any> | void, sortOrder?: number): MarkdownPostProcessor;
|
|
321
|
+
registerMarkdownDirectiveRenderer(directive: string, renderer: MarkdownDirectiveRenderer): void;
|
|
322
|
+
registerMarkdownViewMenuItem(provider: MarkdownViewMenuItemProvider): void;
|
|
323
|
+
registerMetadataProcessor(processor: MetadataProcessor, ext?: string): void;
|
|
324
|
+
registerIndexProjection<T = Record<string, unknown>>(registration: IndexProjectionRegistration): RegisteredIndexProjectionHandle<T>;
|
|
325
|
+
private backfillIndexProjection;
|
|
326
|
+
/**
|
|
327
|
+
* Contribute normalized searchable content without writing generated state.
|
|
328
|
+
* The local id is namespaced by this plugin's runtime id.
|
|
329
|
+
*/
|
|
330
|
+
registerSearchDocumentProvider(localId: string, provider: Omit<SearchDocumentProvider, "id">): SearchDocumentProviderRegistration;
|
|
331
|
+
/** Register an application tool under this plugin's lifecycle and identity. */
|
|
332
|
+
registerAgentTool<TInput>(tool: AppTool<TInput>): AppToolRegistration;
|
|
333
|
+
/** Register a directory that contains one skill. */
|
|
334
|
+
registerAgentSkillDirectory(path: string): AppSkillSourceRegistration;
|
|
335
|
+
/** Register a root that may contain many skill directories. */
|
|
336
|
+
registerAgentSkillRoot(path: string): AppSkillSourceRegistration;
|
|
337
|
+
/** Register a programmatic skill under this plugin's lifecycle. */
|
|
338
|
+
registerAgentSkill(skill: ProgrammaticAppSkill): AppSkillSourceRegistration;
|
|
339
|
+
/** Register a composer slash command. This is not a workspace palette command. */
|
|
340
|
+
registerAgentSlashCommand(command: AppSlashCommandDefinition): AppSlashCommandRegistration;
|
|
341
|
+
/** Register a transcript result view. This is not a workspace palette command. */
|
|
342
|
+
registerAgentResultView(view: AgentResultViewDefinition<App>): AgentResultViewRegistration;
|
|
343
|
+
/**
|
|
344
|
+
* Register a settings tab, which allows users to change settings.
|
|
345
|
+
*
|
|
346
|
+
* @public
|
|
347
|
+
* @see {@link https://docs.obsidian.md/Plugins/User+interface/Settings#Register+a+settings+tab}
|
|
348
|
+
*/
|
|
349
|
+
addSettingTab(settingTab: PluginSettingTab): void;
|
|
350
|
+
}
|