obsidian-dev-utils 55.4.0 → 56.0.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 +11 -0
- package/dist/lib/cjs/abort-controller.cjs +8 -4
- package/dist/lib/cjs/array.cjs +7 -3
- package/dist/lib/cjs/async-events.cjs +9 -5
- package/dist/lib/cjs/async.cjs +8 -4
- package/dist/lib/cjs/blob.cjs +8 -4
- package/dist/lib/cjs/codemirror/index.cjs +7 -3
- package/dist/lib/cjs/codemirror/state-field-spec.cjs +7 -3
- package/dist/lib/cjs/css-class.cjs +7 -3
- package/dist/lib/cjs/debug-controller.cjs +7 -3
- package/dist/lib/cjs/debug.cjs +7 -3
- package/dist/lib/cjs/enum.cjs +7 -3
- package/dist/lib/cjs/error.cjs +7 -3
- package/dist/lib/cjs/function.cjs +7 -3
- package/dist/lib/cjs/html-element.cjs +20 -16
- package/dist/lib/cjs/index.cjs +7 -3
- package/dist/lib/cjs/library.cjs +8 -4
- package/dist/lib/cjs/object-utils.cjs +7 -3
- package/dist/lib/cjs/obsidian/@types/i18next.d.cts +3 -3
- package/dist/lib/cjs/obsidian/app.cjs +7 -3
- package/dist/lib/cjs/obsidian/async-with-notice.cjs +10 -6
- package/dist/lib/cjs/obsidian/attachment-path.cjs +7 -3
- package/dist/lib/cjs/obsidian/backlink.cjs +7 -3
- package/dist/lib/cjs/obsidian/callout.cjs +7 -3
- package/dist/lib/cjs/obsidian/code-block-markdown-information.cjs +7 -3
- package/dist/lib/cjs/obsidian/command-handlers/abstract-file-command-handler.cjs +355 -0
- package/dist/lib/cjs/obsidian/command-handlers/abstract-file-command-handler.d.cts +178 -0
- package/dist/lib/cjs/obsidian/{commands/index.cjs → command-handlers/app-active-file-provider.cjs} +31 -34
- package/dist/lib/cjs/obsidian/command-handlers/app-active-file-provider.d.cts +25 -0
- package/dist/lib/cjs/obsidian/command-handlers/app-menu-event-registrar.cjs +173 -0
- package/dist/lib/cjs/obsidian/command-handlers/app-menu-event-registrar.d.cts +41 -0
- package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.cjs +164 -0
- package/dist/lib/cjs/obsidian/command-handlers/command-handler-component.d.cts +26 -0
- package/dist/lib/cjs/obsidian/command-handlers/command-handler.cjs +174 -0
- package/dist/lib/cjs/obsidian/command-handlers/command-handler.d.cts +143 -0
- package/dist/lib/cjs/obsidian/command-handlers/editor-command-handler.cjs +269 -0
- package/dist/lib/cjs/obsidian/command-handlers/editor-command-handler.d.cts +114 -0
- package/dist/lib/cjs/obsidian/command-handlers/file-command-handler.cjs +261 -0
- package/dist/lib/cjs/obsidian/command-handlers/file-command-handler.d.cts +112 -0
- package/dist/lib/cjs/obsidian/command-handlers/folder-command-handler.cjs +261 -0
- package/dist/lib/cjs/obsidian/command-handlers/folder-command-handler.d.cts +112 -0
- package/dist/lib/cjs/obsidian/command-handlers/global-command-handler.cjs +177 -0
- package/dist/lib/cjs/obsidian/command-handlers/global-command-handler.d.cts +38 -0
- package/dist/lib/cjs/obsidian/command-handlers/index.cjs +170 -0
- package/dist/lib/cjs/obsidian/command-handlers/index.d.cts +9 -0
- package/dist/lib/cjs/obsidian/components/all-windows-event-handler.cjs +8 -4
- package/dist/lib/cjs/obsidian/components/async-component.cjs +164 -0
- package/dist/lib/cjs/obsidian/components/async-component.d.cts +28 -0
- package/dist/lib/cjs/obsidian/components/async-events-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/index.cjs +10 -3
- package/dist/lib/cjs/obsidian/components/index.d.cts +1 -0
- package/dist/lib/cjs/obsidian/components/setting-components/checkbox-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/code-highlighter-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/date-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/date-time-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/email-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/file-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/index.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/month-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/multiple-dropdown-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/multiple-email-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/multiple-file-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/multiple-text-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/number-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/password-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/setting-component-wrapper.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/telephone-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/text-based-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/time-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/tri-state-checkbox-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/typed-dropdown-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/typed-multiple-dropdown-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/typed-range-text-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/typed-text-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/url-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/validator-component.cjs +9 -5
- package/dist/lib/cjs/obsidian/components/setting-components/value-component-with-change-tracking.cjs +7 -3
- package/dist/lib/cjs/obsidian/components/setting-components/week-component.cjs +7 -3
- package/dist/lib/cjs/obsidian/constructors/getDomEventsHandlersConstructor.cjs +7 -3
- package/dist/lib/cjs/obsidian/constructors/index.cjs +7 -3
- package/dist/lib/cjs/obsidian/dataview-link.cjs +7 -3
- package/dist/lib/cjs/obsidian/dataview.cjs +8 -4
- package/dist/lib/cjs/obsidian/editor.cjs +7 -3
- package/dist/lib/cjs/obsidian/file-change.cjs +7 -3
- package/dist/lib/cjs/obsidian/file-manager.cjs +7 -3
- package/dist/lib/cjs/obsidian/file-system.cjs +7 -3
- package/dist/lib/cjs/obsidian/frontmatter-link-cache-with-offsets.cjs +7 -3
- package/dist/lib/cjs/obsidian/frontmatter.cjs +7 -3
- package/dist/lib/cjs/obsidian/i18n/{custom-type-options-base.cjs → custom-type-options.cjs} +9 -5
- package/dist/lib/cjs/obsidian/i18n/custom-type-options.d.cts +37 -0
- package/dist/lib/cjs/obsidian/{plugin/plugin-settings-wrapper.cjs → i18n/default-translations.cjs} +10 -5
- package/dist/lib/cjs/obsidian/i18n/default-translations.d.cts +14 -0
- package/dist/lib/cjs/obsidian/i18n/i18n.cjs +7 -3
- package/dist/lib/cjs/obsidian/i18n/i18n.d.cts +2 -13
- package/dist/lib/cjs/obsidian/i18n/index.cjs +13 -9
- package/dist/lib/cjs/obsidian/i18n/index.d.cts +2 -2
- package/dist/lib/cjs/obsidian/i18n/locales/en.cjs +7 -3
- package/dist/lib/cjs/obsidian/i18n/locales/index.cjs +7 -3
- package/dist/lib/cjs/obsidian/i18n/locales/translations-map.cjs +7 -3
- package/dist/lib/cjs/obsidian/i18n/locales/translations-map.d.cts +1 -2
- package/dist/lib/cjs/obsidian/index.cjs +10 -6
- package/dist/lib/cjs/obsidian/index.d.cts +1 -1
- package/dist/lib/cjs/obsidian/is-in-obsidian.cjs +7 -3
- package/dist/lib/cjs/obsidian/link.cjs +7 -3
- package/dist/lib/cjs/obsidian/logger.cjs +7 -3
- package/dist/lib/cjs/obsidian/loop.cjs +7 -3
- package/dist/lib/cjs/obsidian/markdown-code-block-processor.cjs +7 -3
- package/dist/lib/cjs/obsidian/markdown-view.cjs +7 -3
- package/dist/lib/cjs/obsidian/markdown.cjs +7 -3
- package/dist/lib/cjs/obsidian/metadata-cache.cjs +7 -3
- package/dist/lib/cjs/obsidian/modals/alert.cjs +10 -6
- package/dist/lib/cjs/obsidian/modals/confirm.cjs +10 -6
- package/dist/lib/cjs/obsidian/modals/index.cjs +10 -6
- package/dist/lib/cjs/obsidian/modals/index.d.cts +1 -1
- package/dist/lib/cjs/obsidian/modals/{modal-base.cjs → modal.cjs} +10 -6
- package/dist/lib/cjs/obsidian/modals/prompt.cjs +10 -6
- package/dist/lib/cjs/obsidian/modals/select-item.cjs +9 -5
- package/dist/lib/cjs/obsidian/monkey-around.cjs +7 -3
- package/dist/lib/cjs/obsidian/obsidian-settings.cjs +7 -3
- package/dist/lib/cjs/obsidian/pdf.cjs +10 -6
- package/dist/lib/cjs/obsidian/{commands/non-editor-command-base.cjs → plugin/components/abort-signal-component.cjs} +31 -21
- package/dist/lib/cjs/obsidian/plugin/components/abort-signal-component.d.cts +27 -0
- package/dist/lib/cjs/obsidian/plugin/components/async-error-handler-component.cjs +165 -0
- package/dist/lib/cjs/obsidian/plugin/components/async-error-handler-component.d.cts +29 -0
- package/dist/lib/cjs/obsidian/plugin/components/console-debug-component.cjs +160 -0
- package/dist/lib/cjs/obsidian/plugin/components/console-debug-component.d.cts +29 -0
- package/dist/lib/cjs/obsidian/{i18n/default-translations-base.cjs → plugin/components/i18n-component.cjs} +41 -6
- package/dist/lib/cjs/obsidian/plugin/components/i18n-component.d.cts +23 -0
- package/dist/lib/cjs/obsidian/plugin/components/index.cjs +170 -0
- package/dist/lib/cjs/obsidian/plugin/components/index.d.cts +9 -0
- package/dist/lib/cjs/obsidian/plugin/components/lifecycle-events-component.cjs +207 -0
- package/dist/lib/cjs/obsidian/plugin/components/lifecycle-events-component.d.cts +59 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-context-component.cjs +162 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-context-component.d.cts +25 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-notice-component.cjs +161 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-notice-component.d.cts +25 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-settings-component.cjs +566 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-settings-component.d.cts +296 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-settings-tab-component.cjs +166 -0
- package/dist/lib/cjs/obsidian/plugin/components/plugin-settings-tab-component.d.cts +28 -0
- package/dist/lib/cjs/obsidian/plugin/index.cjs +13 -18
- package/dist/lib/cjs/obsidian/plugin/index.d.cts +2 -5
- package/dist/lib/cjs/obsidian/plugin/obsidian-plugin-repo-paths.cjs +7 -3
- package/dist/lib/cjs/obsidian/plugin/path-settings.cjs +7 -3
- package/dist/lib/cjs/obsidian/plugin/plugin-context.cjs +18 -7
- package/dist/lib/cjs/obsidian/plugin/plugin-context.d.cts +3 -2
- package/dist/lib/cjs/obsidian/plugin/plugin-id.cjs +7 -3
- package/dist/lib/cjs/obsidian/plugin/plugin-settings-tab.cjs +408 -0
- package/dist/lib/cjs/obsidian/plugin/{plugin-settings-tab-base.d.cts → plugin-settings-tab.d.cts} +28 -11
- package/dist/lib/cjs/obsidian/plugin/plugin.cjs +137 -3
- package/dist/lib/cjs/obsidian/plugin/plugin.d.cts +106 -5
- package/dist/lib/cjs/obsidian/queue.cjs +7 -3
- package/dist/lib/cjs/obsidian/react/app-context.cjs +7 -3
- package/dist/lib/cjs/obsidian/react/index.cjs +7 -3
- package/dist/lib/cjs/obsidian/reference.cjs +7 -3
- package/dist/lib/cjs/obsidian/rename-delete-handler.cjs +7 -3
- package/dist/lib/cjs/obsidian/resource-url.cjs +7 -3
- package/dist/lib/cjs/obsidian/setting-ex.cjs +7 -3
- package/dist/lib/cjs/obsidian/setting-group-ex.cjs +7 -3
- package/dist/lib/cjs/obsidian/validation.cjs +7 -3
- package/dist/lib/cjs/obsidian/vault-delete.cjs +7 -3
- package/dist/lib/cjs/obsidian/vault.cjs +7 -3
- package/dist/lib/cjs/obsidian/workspace.cjs +7 -3
- package/dist/lib/cjs/path.cjs +7 -3
- package/dist/lib/cjs/reg-exp.cjs +7 -3
- package/dist/lib/cjs/script-utils/build.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/change-extension-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/custom-esbuild-options-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/dependency.cjs +8 -4
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/fix-esm-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/fix-source-maps-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/obsidian-plugin-builder.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/preprocess-plugin.cjs +10 -6
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/rename-css-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild-impl/svelte-wrapper-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/esbuild.cjs +7 -3
- package/dist/lib/cjs/script-utils/bundlers/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/cli-utils.cjs +7 -3
- package/dist/lib/cjs/script-utils/code-generator.cjs +7 -3
- package/dist/lib/cjs/script-utils/commitlint-config.cjs +7 -3
- package/dist/lib/cjs/script-utils/exec.cjs +7 -3
- package/dist/lib/cjs/script-utils/formatters/dprint.cjs +8 -4
- package/dist/lib/cjs/script-utils/formatters/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/fs.cjs +7 -3
- package/dist/lib/cjs/script-utils/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/json.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/cspell.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint-config.cjs +9 -13
- package/dist/lib/cjs/script-utils/linters/eslint-rules/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint-rules/no-async-callback-to-unsafe-return.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint-rules/no-used-underscore-variables.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint-rules/rule-tester-helper.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/eslint.cjs +8 -4
- package/dist/lib/cjs/script-utils/linters/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/markdownlint-cli2-config.cjs +7 -3
- package/dist/lib/cjs/script-utils/linters/markdownlint.cjs +11 -5
- package/dist/lib/cjs/script-utils/nano-staged-config.cjs +7 -3
- package/dist/lib/cjs/script-utils/npm-publish.cjs +7 -3
- package/dist/lib/cjs/script-utils/npm-run.cjs +7 -3
- package/dist/lib/cjs/script-utils/npm.cjs +7 -3
- package/dist/lib/cjs/script-utils/obsidian-dev-utils-repo-paths.cjs +7 -3
- package/dist/lib/cjs/script-utils/root.cjs +7 -3
- package/dist/lib/cjs/script-utils/test-runners/index.cjs +7 -3
- package/dist/lib/cjs/script-utils/test-runners/vitest.cjs +7 -3
- package/dist/lib/cjs/script-utils/version.cjs +7 -3
- package/dist/lib/cjs/strict-proxy.cjs +7 -3
- package/dist/lib/cjs/string.cjs +7 -3
- package/dist/lib/cjs/transformers/date-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/duration-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/group-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/index.cjs +7 -3
- package/dist/lib/cjs/transformers/map-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/set-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/skip-private-property-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/two-way-map-transformer.cjs +7 -3
- package/dist/lib/cjs/transformers/typed-transformer.cjs +7 -3
- package/dist/lib/cjs/two-way-map.cjs +7 -3
- package/dist/lib/cjs/type-guards.cjs +7 -3
- package/dist/lib/cjs/type.cjs +7 -3
- package/dist/lib/cjs/url.cjs +7 -3
- package/dist/lib/cjs/value-provider.cjs +7 -3
- package/dist/lib/esm/abort-controller.mjs +4 -2
- package/dist/lib/esm/array.mjs +3 -1
- package/dist/lib/esm/async-events.mjs +5 -3
- package/dist/lib/esm/async.mjs +4 -2
- package/dist/lib/esm/blob.mjs +4 -2
- package/dist/lib/esm/codemirror/index.mjs +3 -1
- package/dist/lib/esm/codemirror/state-field-spec.mjs +2 -0
- package/dist/lib/esm/css-class.mjs +3 -1
- package/dist/lib/esm/debug-controller.mjs +2 -0
- package/dist/lib/esm/debug.mjs +3 -1
- package/dist/lib/esm/enum.mjs +3 -1
- package/dist/lib/esm/error.mjs +3 -1
- package/dist/lib/esm/function.mjs +3 -1
- package/dist/lib/esm/html-element.mjs +16 -14
- package/dist/lib/esm/index.mjs +3 -1
- package/dist/lib/esm/library.mjs +4 -2
- package/dist/lib/esm/object-utils.mjs +3 -1
- package/dist/lib/esm/obsidian/@types/i18next.d.mts +3 -3
- package/dist/lib/esm/obsidian/app.mjs +3 -1
- package/dist/lib/esm/obsidian/async-with-notice.mjs +6 -4
- package/dist/lib/esm/obsidian/attachment-path.mjs +3 -1
- package/dist/lib/esm/obsidian/backlink.mjs +3 -1
- package/dist/lib/esm/obsidian/callout.mjs +3 -1
- package/dist/lib/esm/obsidian/code-block-markdown-information.mjs +2 -0
- package/dist/lib/esm/obsidian/command-handlers/abstract-file-command-handler.d.mts +178 -0
- package/dist/lib/esm/obsidian/command-handlers/abstract-file-command-handler.mjs +247 -0
- package/dist/lib/esm/obsidian/command-handlers/app-active-file-provider.d.mts +25 -0
- package/dist/lib/esm/obsidian/command-handlers/app-active-file-provider.mjs +46 -0
- package/dist/lib/esm/obsidian/command-handlers/app-menu-event-registrar.d.mts +41 -0
- package/dist/lib/esm/obsidian/command-handlers/app-menu-event-registrar.mjs +65 -0
- package/dist/lib/esm/obsidian/command-handlers/command-handler-component.d.mts +26 -0
- package/dist/lib/esm/obsidian/command-handlers/command-handler-component.mjs +56 -0
- package/dist/lib/esm/obsidian/command-handlers/command-handler.d.mts +143 -0
- package/dist/lib/esm/obsidian/command-handlers/command-handler.mjs +66 -0
- package/dist/lib/esm/obsidian/command-handlers/editor-command-handler.d.mts +114 -0
- package/dist/lib/esm/obsidian/command-handlers/editor-command-handler.mjs +161 -0
- package/dist/lib/esm/obsidian/command-handlers/file-command-handler.d.mts +112 -0
- package/dist/lib/esm/obsidian/command-handlers/file-command-handler.mjs +157 -0
- package/dist/lib/esm/obsidian/command-handlers/folder-command-handler.d.mts +112 -0
- package/dist/lib/esm/obsidian/command-handlers/folder-command-handler.mjs +157 -0
- package/dist/lib/esm/obsidian/command-handlers/global-command-handler.d.mts +38 -0
- package/dist/lib/esm/obsidian/command-handlers/global-command-handler.mjs +69 -0
- package/dist/lib/esm/obsidian/command-handlers/index.d.mts +9 -0
- package/dist/lib/esm/obsidian/command-handlers/index.mjs +44 -0
- package/dist/lib/esm/obsidian/components/all-windows-event-handler.mjs +4 -2
- package/dist/lib/esm/obsidian/components/async-component.d.mts +28 -0
- package/dist/lib/esm/obsidian/components/async-component.mjs +56 -0
- package/dist/lib/esm/obsidian/components/async-events-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/index.d.mts +1 -0
- package/dist/lib/esm/obsidian/components/index.mjs +5 -1
- package/dist/lib/esm/obsidian/components/setting-components/checkbox-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/code-highlighter-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/date-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/date-time-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/email-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/file-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/index.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/month-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/multiple-dropdown-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/multiple-email-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/multiple-file-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/multiple-text-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/number-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/password-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/setting-component-wrapper.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/telephone-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/text-based-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/time-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/tri-state-checkbox-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/typed-dropdown-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/typed-multiple-dropdown-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/typed-range-text-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/typed-text-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/url-component.mjs +3 -1
- package/dist/lib/esm/obsidian/components/setting-components/validator-component.mjs +5 -3
- package/dist/lib/esm/obsidian/components/setting-components/value-component-with-change-tracking.mjs +2 -0
- package/dist/lib/esm/obsidian/components/setting-components/week-component.mjs +3 -1
- package/dist/lib/esm/obsidian/constructors/getDomEventsHandlersConstructor.mjs +3 -1
- package/dist/lib/esm/obsidian/constructors/index.mjs +3 -1
- package/dist/lib/esm/obsidian/dataview-link.mjs +3 -1
- package/dist/lib/esm/obsidian/dataview.mjs +4 -2
- package/dist/lib/esm/obsidian/editor.mjs +3 -1
- package/dist/lib/esm/obsidian/file-change.mjs +3 -1
- package/dist/lib/esm/obsidian/file-manager.mjs +3 -1
- package/dist/lib/esm/obsidian/file-system.mjs +3 -1
- package/dist/lib/esm/obsidian/frontmatter-link-cache-with-offsets.mjs +3 -1
- package/dist/lib/esm/obsidian/frontmatter.mjs +3 -1
- package/dist/lib/esm/obsidian/i18n/custom-type-options.d.mts +37 -0
- package/dist/lib/esm/obsidian/i18n/custom-type-options.mjs +25 -0
- package/dist/lib/esm/obsidian/i18n/default-translations.d.mts +14 -0
- package/dist/lib/esm/obsidian/i18n/default-translations.mjs +25 -0
- package/dist/lib/esm/obsidian/i18n/i18n.d.mts +2 -13
- package/dist/lib/esm/obsidian/i18n/i18n.mjs +3 -1
- package/dist/lib/esm/obsidian/i18n/index.d.mts +2 -2
- package/dist/lib/esm/obsidian/i18n/index.mjs +7 -5
- package/dist/lib/esm/obsidian/i18n/locales/en.mjs +3 -1
- package/dist/lib/esm/obsidian/i18n/locales/index.mjs +3 -1
- package/dist/lib/esm/obsidian/i18n/locales/translations-map.d.mts +1 -2
- package/dist/lib/esm/obsidian/i18n/locales/translations-map.mjs +3 -1
- package/dist/lib/esm/obsidian/index.d.mts +1 -1
- package/dist/lib/esm/obsidian/index.mjs +5 -3
- package/dist/lib/esm/obsidian/is-in-obsidian.mjs +3 -1
- package/dist/lib/esm/obsidian/link.mjs +3 -1
- package/dist/lib/esm/obsidian/logger.mjs +3 -1
- package/dist/lib/esm/obsidian/loop.mjs +3 -1
- package/dist/lib/esm/obsidian/markdown-code-block-processor.mjs +3 -1
- package/dist/lib/esm/obsidian/markdown-view.mjs +3 -1
- package/dist/lib/esm/obsidian/markdown.mjs +3 -1
- package/dist/lib/esm/obsidian/metadata-cache.mjs +3 -1
- package/dist/lib/esm/obsidian/modals/alert.mjs +4 -2
- package/dist/lib/esm/obsidian/modals/confirm.mjs +4 -2
- package/dist/lib/esm/obsidian/modals/index.d.mts +1 -1
- package/dist/lib/esm/obsidian/modals/index.mjs +5 -3
- package/dist/lib/esm/obsidian/modals/modal.mjs +54 -0
- package/dist/lib/esm/obsidian/modals/prompt.mjs +4 -2
- package/dist/lib/esm/obsidian/modals/select-item.mjs +4 -2
- package/dist/lib/esm/obsidian/monkey-around.mjs +3 -1
- package/dist/lib/esm/obsidian/obsidian-settings.mjs +3 -1
- package/dist/lib/esm/obsidian/pdf.mjs +6 -4
- package/dist/lib/esm/obsidian/plugin/components/abort-signal-component.d.mts +27 -0
- package/dist/lib/esm/obsidian/plugin/components/abort-signal-component.mjs +54 -0
- package/dist/lib/esm/obsidian/plugin/components/async-error-handler-component.d.mts +29 -0
- package/dist/lib/esm/obsidian/plugin/components/async-error-handler-component.mjs +57 -0
- package/dist/lib/esm/obsidian/plugin/components/console-debug-component.d.mts +29 -0
- package/dist/lib/esm/obsidian/plugin/components/console-debug-component.mjs +52 -0
- package/dist/lib/esm/obsidian/plugin/components/i18n-component.d.mts +23 -0
- package/dist/lib/esm/obsidian/plugin/components/i18n-component.mjs +48 -0
- package/dist/lib/esm/obsidian/plugin/components/index.d.mts +9 -0
- package/dist/lib/esm/obsidian/plugin/components/index.mjs +44 -0
- package/dist/lib/esm/obsidian/plugin/components/lifecycle-events-component.d.mts +59 -0
- package/dist/lib/esm/obsidian/plugin/components/lifecycle-events-component.mjs +102 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-context-component.d.mts +25 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-context-component.mjs +57 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-notice-component.d.mts +25 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-notice-component.mjs +56 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-settings-component.d.mts +296 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-settings-component.mjs +463 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-settings-tab-component.d.mts +28 -0
- package/dist/lib/esm/obsidian/plugin/components/plugin-settings-tab-component.mjs +58 -0
- package/dist/lib/esm/obsidian/plugin/index.d.mts +2 -5
- package/dist/lib/esm/obsidian/plugin/index.mjs +7 -11
- package/dist/lib/esm/obsidian/plugin/obsidian-plugin-repo-paths.mjs +3 -1
- package/dist/lib/esm/obsidian/plugin/path-settings.mjs +3 -1
- package/dist/lib/esm/obsidian/plugin/plugin-context.d.mts +3 -2
- package/dist/lib/esm/obsidian/plugin/plugin-context.mjs +14 -5
- package/dist/lib/esm/obsidian/plugin/plugin-id.mjs +3 -1
- package/dist/lib/esm/obsidian/plugin/{plugin-settings-tab-base.d.mts → plugin-settings-tab.d.mts} +28 -11
- package/dist/lib/esm/obsidian/plugin/plugin-settings-tab.mjs +309 -0
- package/dist/lib/esm/obsidian/plugin/plugin.d.mts +106 -5
- package/dist/lib/esm/obsidian/plugin/plugin.mjs +140 -2
- package/dist/lib/esm/obsidian/queue.mjs +3 -1
- package/dist/lib/esm/obsidian/react/app-context.mjs +3 -1
- package/dist/lib/esm/obsidian/react/index.mjs +3 -1
- package/dist/lib/esm/obsidian/reference.mjs +3 -1
- package/dist/lib/esm/obsidian/rename-delete-handler.mjs +3 -1
- package/dist/lib/esm/obsidian/resource-url.mjs +3 -1
- package/dist/lib/esm/obsidian/setting-ex.mjs +3 -1
- package/dist/lib/esm/obsidian/setting-group-ex.mjs +3 -1
- package/dist/lib/esm/obsidian/validation.mjs +3 -1
- package/dist/lib/esm/obsidian/vault-delete.mjs +3 -1
- package/dist/lib/esm/obsidian/vault.mjs +3 -1
- package/dist/lib/esm/obsidian/workspace.mjs +3 -1
- package/dist/lib/esm/path.mjs +3 -1
- package/dist/lib/esm/reg-exp.mjs +3 -1
- package/dist/lib/esm/script-utils/build.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/change-extension-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/custom-esbuild-options-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/dependency.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/fix-esm-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/fix-source-maps-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/index.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/obsidian-plugin-builder.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/preprocess-plugin.mjs +5 -3
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/rename-css-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild-impl/svelte-wrapper-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/esbuild.mjs +3 -1
- package/dist/lib/esm/script-utils/bundlers/index.mjs +3 -1
- package/dist/lib/esm/script-utils/cli-utils.mjs +3 -1
- package/dist/lib/esm/script-utils/code-generator.mjs +3 -1
- package/dist/lib/esm/script-utils/commitlint-config.mjs +3 -1
- package/dist/lib/esm/script-utils/exec.mjs +3 -1
- package/dist/lib/esm/script-utils/formatters/dprint.mjs +3 -1
- package/dist/lib/esm/script-utils/formatters/index.mjs +3 -1
- package/dist/lib/esm/script-utils/fs.mjs +3 -1
- package/dist/lib/esm/script-utils/index.mjs +3 -1
- package/dist/lib/esm/script-utils/json.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/cspell.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint-config.mjs +5 -11
- package/dist/lib/esm/script-utils/linters/eslint-rules/index.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/no-async-callback-to-unsafe-return.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/no-used-underscore-variables.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint-rules/rule-tester-helper.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/eslint.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/index.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/markdownlint-cli2-config.mjs +3 -1
- package/dist/lib/esm/script-utils/linters/markdownlint.mjs +6 -2
- package/dist/lib/esm/script-utils/nano-staged-config.mjs +3 -1
- package/dist/lib/esm/script-utils/npm-publish.mjs +3 -1
- package/dist/lib/esm/script-utils/npm-run.mjs +3 -1
- package/dist/lib/esm/script-utils/npm.mjs +3 -1
- package/dist/lib/esm/script-utils/obsidian-dev-utils-repo-paths.mjs +3 -1
- package/dist/lib/esm/script-utils/root.mjs +3 -1
- package/dist/lib/esm/script-utils/test-runners/index.mjs +3 -1
- package/dist/lib/esm/script-utils/test-runners/vitest.mjs +3 -1
- package/dist/lib/esm/script-utils/version.mjs +3 -1
- package/dist/lib/esm/strict-proxy.mjs +3 -1
- package/dist/lib/esm/string.mjs +3 -1
- package/dist/lib/esm/transformers/date-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/duration-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/group-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/index.mjs +3 -1
- package/dist/lib/esm/transformers/map-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/set-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/skip-private-property-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/transformer.mjs +3 -1
- package/dist/lib/esm/transformers/two-way-map-transformer.mjs +3 -1
- package/dist/lib/esm/transformers/typed-transformer.mjs +3 -1
- package/dist/lib/esm/two-way-map.mjs +3 -1
- package/dist/lib/esm/type-guards.mjs +3 -1
- package/dist/lib/esm/type.mjs +3 -1
- package/dist/lib/esm/url.mjs +3 -1
- package/dist/lib/esm/value-provider.mjs +3 -1
- package/obsidian/Components/async-component/package.json +6 -0
- package/obsidian/Modals/modal/package.json +6 -0
- package/obsidian/Plugin/components/abort-signal-component/package.json +6 -0
- package/obsidian/Plugin/components/async-error-handler-component/package.json +6 -0
- package/obsidian/Plugin/components/console-debug-component/package.json +6 -0
- package/obsidian/Plugin/components/i18n-component/package.json +6 -0
- package/obsidian/Plugin/components/index/package.json +6 -0
- package/obsidian/Plugin/components/lifecycle-events-component/package.json +6 -0
- package/obsidian/Plugin/components/package.json +6 -0
- package/obsidian/Plugin/components/plugin-context-component/package.json +6 -0
- package/obsidian/Plugin/components/plugin-notice-component/package.json +6 -0
- package/obsidian/Plugin/components/plugin-settings-component/package.json +6 -0
- package/obsidian/Plugin/components/plugin-settings-tab-component/package.json +6 -0
- package/obsidian/Plugin/{plugin-settings-wrapper → plugin-settings-tab}/package.json +3 -3
- package/obsidian/command-handlers/abstract-file-command-handler/package.json +6 -0
- package/obsidian/command-handlers/app-active-file-provider/package.json +6 -0
- package/obsidian/command-handlers/app-menu-event-registrar/package.json +6 -0
- package/obsidian/command-handlers/command-handler/package.json +6 -0
- package/obsidian/command-handlers/command-handler-component/package.json +6 -0
- package/obsidian/command-handlers/editor-command-handler/package.json +6 -0
- package/obsidian/command-handlers/file-command-handler/package.json +6 -0
- package/obsidian/command-handlers/folder-command-handler/package.json +6 -0
- package/obsidian/command-handlers/global-command-handler/package.json +6 -0
- package/obsidian/command-handlers/index/package.json +6 -0
- package/obsidian/command-handlers/package.json +6 -0
- package/obsidian/i18n/{custom-type-options-base → custom-type-options}/package.json +3 -3
- package/obsidian/i18n/{default-translations-base → default-translations}/package.json +3 -3
- package/package.json +33 -12
- package/dist/lib/cjs/obsidian/commands/abstract-file-command-base.cjs +0 -439
- package/dist/lib/cjs/obsidian/commands/abstract-file-command-base.d.cts +0 -264
- package/dist/lib/cjs/obsidian/commands/command-base.cjs +0 -253
- package/dist/lib/cjs/obsidian/commands/command-base.d.cts +0 -125
- package/dist/lib/cjs/obsidian/commands/editor-command-base.cjs +0 -280
- package/dist/lib/cjs/obsidian/commands/editor-command-base.d.cts +0 -139
- package/dist/lib/cjs/obsidian/commands/file-command-base.cjs +0 -341
- package/dist/lib/cjs/obsidian/commands/file-command-base.d.cts +0 -191
- package/dist/lib/cjs/obsidian/commands/folder-command-base.cjs +0 -333
- package/dist/lib/cjs/obsidian/commands/folder-command-base.d.cts +0 -184
- package/dist/lib/cjs/obsidian/commands/index.d.cts +0 -6
- package/dist/lib/cjs/obsidian/commands/non-editor-command-base.d.cts +0 -34
- package/dist/lib/cjs/obsidian/i18n/custom-type-options-base.d.cts +0 -37
- package/dist/lib/cjs/obsidian/i18n/default-translations-base.d.cts +0 -25
- package/dist/lib/cjs/obsidian/plugin/plugin-base.cjs +0 -407
- package/dist/lib/cjs/obsidian/plugin/plugin-base.d.cts +0 -176
- package/dist/lib/cjs/obsidian/plugin/plugin-settings-manager-base.cjs +0 -484
- package/dist/lib/cjs/obsidian/plugin/plugin-settings-manager-base.d.cts +0 -186
- package/dist/lib/cjs/obsidian/plugin/plugin-settings-tab-base.cjs +0 -399
- package/dist/lib/cjs/obsidian/plugin/plugin-settings-wrapper.d.cts +0 -25
- package/dist/lib/cjs/obsidian/plugin/plugin-types-base.cjs +0 -120
- package/dist/lib/cjs/obsidian/plugin/plugin-types-base.d.cts +0 -87
- package/dist/lib/esm/obsidian/commands/abstract-file-command-base.d.mts +0 -264
- package/dist/lib/esm/obsidian/commands/abstract-file-command-base.mjs +0 -329
- package/dist/lib/esm/obsidian/commands/command-base.d.mts +0 -125
- package/dist/lib/esm/obsidian/commands/command-base.mjs +0 -146
- package/dist/lib/esm/obsidian/commands/editor-command-base.d.mts +0 -139
- package/dist/lib/esm/obsidian/commands/editor-command-base.mjs +0 -176
- package/dist/lib/esm/obsidian/commands/file-command-base.d.mts +0 -191
- package/dist/lib/esm/obsidian/commands/file-command-base.mjs +0 -240
- package/dist/lib/esm/obsidian/commands/folder-command-base.d.mts +0 -184
- package/dist/lib/esm/obsidian/commands/folder-command-base.mjs +0 -232
- package/dist/lib/esm/obsidian/commands/index.d.mts +0 -6
- package/dist/lib/esm/obsidian/commands/index.mjs +0 -36
- package/dist/lib/esm/obsidian/commands/non-editor-command-base.d.mts +0 -34
- package/dist/lib/esm/obsidian/commands/non-editor-command-base.mjs +0 -46
- package/dist/lib/esm/obsidian/i18n/custom-type-options-base.d.mts +0 -37
- package/dist/lib/esm/obsidian/i18n/custom-type-options-base.mjs +0 -23
- package/dist/lib/esm/obsidian/i18n/default-translations-base.d.mts +0 -25
- package/dist/lib/esm/obsidian/i18n/default-translations-base.mjs +0 -23
- package/dist/lib/esm/obsidian/modals/modal-base.mjs +0 -52
- package/dist/lib/esm/obsidian/plugin/plugin-base.d.mts +0 -176
- package/dist/lib/esm/obsidian/plugin/plugin-base.mjs +0 -317
- package/dist/lib/esm/obsidian/plugin/plugin-settings-manager-base.d.mts +0 -186
- package/dist/lib/esm/obsidian/plugin/plugin-settings-manager-base.mjs +0 -385
- package/dist/lib/esm/obsidian/plugin/plugin-settings-tab-base.mjs +0 -302
- package/dist/lib/esm/obsidian/plugin/plugin-settings-wrapper.d.mts +0 -25
- package/dist/lib/esm/obsidian/plugin/plugin-settings-wrapper.mjs +0 -22
- package/dist/lib/esm/obsidian/plugin/plugin-types-base.d.mts +0 -87
- package/dist/lib/esm/obsidian/plugin/plugin-types-base.mjs +0 -22
- package/obsidian/Commands/abstract-file-command-base/package.json +0 -6
- package/obsidian/Commands/command-base/package.json +0 -6
- package/obsidian/Commands/editor-command-base/package.json +0 -6
- package/obsidian/Commands/file-command-base/package.json +0 -6
- package/obsidian/Commands/folder-command-base/package.json +0 -6
- package/obsidian/Commands/index/package.json +0 -6
- package/obsidian/Commands/non-editor-command-base/package.json +0 -6
- package/obsidian/Commands/package.json +0 -6
- package/obsidian/Modals/modal-base/package.json +0 -6
- package/obsidian/Plugin/plugin-base/package.json +0 -6
- package/obsidian/Plugin/plugin-settings-manager-base/package.json +0 -6
- package/obsidian/Plugin/plugin-settings-tab-base/package.json +0 -6
- package/obsidian/Plugin/plugin-types-base/package.json +0 -6
- /package/dist/lib/cjs/obsidian/modals/{modal-base.d.cts → modal.d.cts} +0 -0
- /package/dist/lib/esm/obsidian/modals/{modal-base.d.mts → modal.d.mts} +0 -0
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
-
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
(function initEsm() {
|
|
7
|
-
if (globalThis.process) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const browserProcess = {
|
|
12
|
-
browser: true,
|
|
13
|
-
cwd() {
|
|
14
|
-
return '/';
|
|
15
|
-
},
|
|
16
|
-
env: {},
|
|
17
|
-
platform: 'android'
|
|
18
|
-
};
|
|
19
|
-
globalThis.process = browserProcess;
|
|
20
|
-
})();
|
|
21
|
-
|
|
22
|
-
import { TFile } from "obsidian";
|
|
23
|
-
import {
|
|
24
|
-
asArrayOfFiles,
|
|
25
|
-
asFile,
|
|
26
|
-
asFileOrNull,
|
|
27
|
-
isFile
|
|
28
|
-
} from "../file-system.mjs";
|
|
29
|
-
import {
|
|
30
|
-
AbstractFileCommandBase,
|
|
31
|
-
AbstractFileCommandInvocationBase,
|
|
32
|
-
AbstractFilesCommandInvocationBase
|
|
33
|
-
} from "./abstract-file-command-base.mjs";
|
|
34
|
-
class FileCommandInvocationBase extends AbstractFileCommandInvocationBase {
|
|
35
|
-
/**
|
|
36
|
-
* Gets the file that the command invocation belongs to.
|
|
37
|
-
*
|
|
38
|
-
* @returns The file that the command invocation belongs to.
|
|
39
|
-
* @throws If the abstract file is not a file.
|
|
40
|
-
*/
|
|
41
|
-
get file() {
|
|
42
|
-
return asFile(this._abstractFile);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new file command invocation.
|
|
46
|
-
*
|
|
47
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
48
|
-
* @param file - The file to invoke the command for.
|
|
49
|
-
*/
|
|
50
|
-
constructor(plugin, file) {
|
|
51
|
-
super(plugin, file);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Checks if the command can execute.
|
|
55
|
-
*
|
|
56
|
-
* @returns Whether the command can execute.
|
|
57
|
-
*/
|
|
58
|
-
canExecute() {
|
|
59
|
-
return super.canExecute() && !!this._abstractFile;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
class ArrayDelegatingFileCommandInvocation extends FileCommandInvocationBase {
|
|
63
|
-
/**
|
|
64
|
-
* Creates a new array-delegating file command invocation.
|
|
65
|
-
*
|
|
66
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
67
|
-
* @param file - The file to invoke the command for.
|
|
68
|
-
* @param createCommandInvocationForFiles - The function to create a command invocation for files.
|
|
69
|
-
*/
|
|
70
|
-
constructor(plugin, file, createCommandInvocationForFiles) {
|
|
71
|
-
super(plugin, file);
|
|
72
|
-
this.createCommandInvocationForFiles = createCommandInvocationForFiles;
|
|
73
|
-
}
|
|
74
|
-
createCommandInvocationForFiles;
|
|
75
|
-
/**
|
|
76
|
-
* Checks if the command can execute.
|
|
77
|
-
*
|
|
78
|
-
* @returns Whether the command can execute.
|
|
79
|
-
*/
|
|
80
|
-
canExecute() {
|
|
81
|
-
return super.canExecute() && this.createCommandInvocationForFiles([this.file]).invoke(true);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Executes the command.
|
|
85
|
-
*
|
|
86
|
-
* @returns A promise that resolves when the command has been executed.
|
|
87
|
-
*/
|
|
88
|
-
async execute() {
|
|
89
|
-
await this.createCommandInvocationForFiles([this.file]).invokeAsync(false);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
class FileCommandBase extends AbstractFileCommandBase {
|
|
93
|
-
/**
|
|
94
|
-
* Creates a new file command.
|
|
95
|
-
*
|
|
96
|
-
* @param params - The parameters for the file command.
|
|
97
|
-
*/
|
|
98
|
-
constructor(params) {
|
|
99
|
-
super(params);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Creates a new abstract file command invocation.
|
|
103
|
-
*
|
|
104
|
-
* @param abstractFile - The abstract file to invoke the command for.
|
|
105
|
-
* @returns The command invocation.
|
|
106
|
-
*/
|
|
107
|
-
createCommandInvocation(abstractFile) {
|
|
108
|
-
return this.createCommandInvocationForAbstractFile(abstractFile ?? this.app.workspace.getActiveFile());
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Creates a new abstract file command invocation for an abstract file.
|
|
112
|
-
*
|
|
113
|
-
* @param abstractFile - The abstract file to invoke the command for. If `null`, the active file is used.
|
|
114
|
-
* @returns The command invocation.
|
|
115
|
-
*/
|
|
116
|
-
createCommandInvocationForAbstractFile(abstractFile) {
|
|
117
|
-
return this.createCommandInvocationForFile(asFileOrNull(abstractFile));
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Creates a new abstract files command invocation for abstract files.
|
|
121
|
-
*
|
|
122
|
-
* @param abstractFiles - The abstract files to invoke the command for.
|
|
123
|
-
* @returns A new abstract files command invocation.
|
|
124
|
-
*/
|
|
125
|
-
createCommandInvocationForAbstractFiles(abstractFiles) {
|
|
126
|
-
return this.createCommandInvocationForFiles(asArrayOfFiles(abstractFiles));
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Creates a new files command invocation for files.
|
|
130
|
-
*
|
|
131
|
-
* @param files - The files to invoke the command for.
|
|
132
|
-
* @returns A new files command invocation.
|
|
133
|
-
*/
|
|
134
|
-
createCommandInvocationForFiles(files) {
|
|
135
|
-
return new SequentialFilesCommandInvocationBase(this.plugin, files, this.createCommandInvocationForFile.bind(this));
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Checks if the command should be added to the abstract file menu.
|
|
139
|
-
*
|
|
140
|
-
* @param abstractFile - The abstract file to check.
|
|
141
|
-
* @param source - The source of the abstract file.
|
|
142
|
-
* @param leaf - The leaf to check.
|
|
143
|
-
* @returns Whether the command should be added to the abstract file menu.
|
|
144
|
-
*/
|
|
145
|
-
shouldAddToAbstractFileMenu(abstractFile, source, leaf) {
|
|
146
|
-
if (!isFile(abstractFile)) {
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
return this.shouldAddToFileMenu(abstractFile, source, leaf);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Checks if the command should be added to the abstract files menu.
|
|
153
|
-
*
|
|
154
|
-
* @param abstractFiles - The abstract files to check.
|
|
155
|
-
* @param source - The source of the abstract files.
|
|
156
|
-
* @param leaf - The leaf to check.
|
|
157
|
-
* @returns Whether the command should be added to the abstract files menu.
|
|
158
|
-
*/
|
|
159
|
-
shouldAddToAbstractFilesMenu(abstractFiles, source, leaf) {
|
|
160
|
-
if (!abstractFiles.every((abstractFile) => isFile(abstractFile))) {
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
return this.shouldAddToFilesMenu(asArrayOfFiles(abstractFiles), source, leaf);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Checks if the command should be added to the file menu.
|
|
167
|
-
*
|
|
168
|
-
* @param _file - The file to check.
|
|
169
|
-
* @param _source - The source of the file.
|
|
170
|
-
* @param _leaf - The leaf to check.
|
|
171
|
-
* @returns Whether the command should be added to the file menu.
|
|
172
|
-
*/
|
|
173
|
-
shouldAddToFileMenu(_file, _source, _leaf) {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Checks if the command should be added to the files menu.
|
|
178
|
-
*
|
|
179
|
-
* @param _files - The files to check.
|
|
180
|
-
* @param _source - The source of the files.
|
|
181
|
-
* @param _leaf - The leaf to check.
|
|
182
|
-
* @returns Whether the command should be added to the files menu.
|
|
183
|
-
*/
|
|
184
|
-
shouldAddToFilesMenu(_files, _source, _leaf) {
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
class FilesCommandInvocationBase extends AbstractFilesCommandInvocationBase {
|
|
189
|
-
/**
|
|
190
|
-
* Creates a new files command invocation.
|
|
191
|
-
*
|
|
192
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
193
|
-
* @param files - The files to invoke the command for.
|
|
194
|
-
*/
|
|
195
|
-
constructor(plugin, files) {
|
|
196
|
-
super(plugin, files);
|
|
197
|
-
this.files = files;
|
|
198
|
-
}
|
|
199
|
-
files;
|
|
200
|
-
}
|
|
201
|
-
class SequentialFilesCommandInvocationBase extends FilesCommandInvocationBase {
|
|
202
|
-
/**
|
|
203
|
-
* Creates a new sequential files command invocation.
|
|
204
|
-
*
|
|
205
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
206
|
-
* @param files - The files to invoke the command for.
|
|
207
|
-
* @param createCommandInvocationForFile - The function to create a command invocation for a file.
|
|
208
|
-
*/
|
|
209
|
-
constructor(plugin, files, createCommandInvocationForFile) {
|
|
210
|
-
super(plugin, files);
|
|
211
|
-
this.createCommandInvocationForFile = createCommandInvocationForFile;
|
|
212
|
-
}
|
|
213
|
-
createCommandInvocationForFile;
|
|
214
|
-
/**
|
|
215
|
-
* Checks if the command can execute.
|
|
216
|
-
*
|
|
217
|
-
* @returns Whether the command can execute.
|
|
218
|
-
*/
|
|
219
|
-
canExecute() {
|
|
220
|
-
return super.canExecute() && this.files.length > 0 && this.files.every((file) => this.createCommandInvocationForFile(file).invoke(true));
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Executes the command.
|
|
224
|
-
*
|
|
225
|
-
* @returns A promise that resolves when the command has been executed.
|
|
226
|
-
*/
|
|
227
|
-
async execute() {
|
|
228
|
-
for (const file of this.files) {
|
|
229
|
-
await this.createCommandInvocationForFile(file).invokeAsync(false);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
export {
|
|
234
|
-
ArrayDelegatingFileCommandInvocation,
|
|
235
|
-
FileCommandBase,
|
|
236
|
-
FileCommandInvocationBase,
|
|
237
|
-
FilesCommandInvocationBase,
|
|
238
|
-
SequentialFilesCommandInvocationBase
|
|
239
|
-
};
|
|
240
|
-
//# sourceMapp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TSxXQUFXLEtBQUssS0FBSyxNQUFNLFNBQVMsS0FBSyxLQUFLLE1BQU0sTUFBTSxDQUFDLFNBQVMsS0FBSywrQkFBK0IsSUFBSSxFQUFFLE9BQU8sSUFBSSxDQUFDO0FBQUEsRUFDekk7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEsRUFPQSxNQUF5QixVQUF5QjtBQUNoRCxlQUFXLFFBQVEsS0FBSyxPQUFPO0FBQzdCLFlBQU0sS0FBSywrQkFBK0IsSUFBSSxFQUFFLFlBQVksS0FBSztBQUFBLElBQ25FO0FBQUEsRUFDRjtBQUNGOyIsCiAgIm5hbWVzIjogW10KfQo=
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file
|
|
3
|
-
*
|
|
4
|
-
* Base classes for folder commands.
|
|
5
|
-
*/
|
|
6
|
-
import type { Plugin, TAbstractFile, WorkspaceLeaf } from 'obsidian';
|
|
7
|
-
import { TFolder } from 'obsidian';
|
|
8
|
-
import type { AbstractFileCommandBaseParams } from './abstract-file-command-base.mjs';
|
|
9
|
-
import { AbstractFileCommandBase, AbstractFileCommandInvocationBase, AbstractFilesCommandInvocationBase } from './abstract-file-command-base.mjs';
|
|
10
|
-
/**
|
|
11
|
-
* Base class for folder command invocations.
|
|
12
|
-
*
|
|
13
|
-
* @typeParam TPlugin - The type of the plugin that the command belongs to.
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class FolderCommandInvocationBase<TPlugin extends Plugin> extends AbstractFileCommandInvocationBase<TPlugin> {
|
|
16
|
-
/**
|
|
17
|
-
* Gets the folder that the command invocation belongs to.
|
|
18
|
-
*
|
|
19
|
-
* @returns The folder that the command invocation belongs to.
|
|
20
|
-
* @throws If the abstract file is not a folder.
|
|
21
|
-
*/
|
|
22
|
-
protected get folder(): TFolder;
|
|
23
|
-
/**
|
|
24
|
-
* Checks if the command can execute.
|
|
25
|
-
*
|
|
26
|
-
* @returns Whether the command can execute.
|
|
27
|
-
*/
|
|
28
|
-
protected canExecute(): boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Base class for array-delegating file command invocations.
|
|
32
|
-
*
|
|
33
|
-
* @typeParam TPlugin - The type of the plugin that the command belongs to.
|
|
34
|
-
*/
|
|
35
|
-
export declare class ArrayDelegatingFolderCommandInvocation<TPlugin extends Plugin> extends FolderCommandInvocationBase<TPlugin> {
|
|
36
|
-
private readonly createCommandInvocationForFiles;
|
|
37
|
-
/**
|
|
38
|
-
* Creates a new array-delegating folder command invocation.
|
|
39
|
-
*
|
|
40
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
41
|
-
* @param folder - The file to invoke the command for.
|
|
42
|
-
* @param createCommandInvocationForFiles - The function to create a command invocation for files.
|
|
43
|
-
*/
|
|
44
|
-
constructor(plugin: TPlugin, folder: null | TFolder, createCommandInvocationForFiles: (folders: TFolder[]) => FoldersCommandInvocationBase<TPlugin>);
|
|
45
|
-
/**
|
|
46
|
-
* Checks if the command can execute.
|
|
47
|
-
*
|
|
48
|
-
* @returns Whether the command can execute.
|
|
49
|
-
*/
|
|
50
|
-
protected canExecute(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Executes the command.
|
|
53
|
-
*
|
|
54
|
-
* @returns A promise that resolves when the command has been executed.
|
|
55
|
-
*/
|
|
56
|
-
protected execute(): Promise<void>;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Base class for folder commands.
|
|
60
|
-
*
|
|
61
|
-
* @typeParam TPlugin - The type of the plugin that the command belongs to.
|
|
62
|
-
*/
|
|
63
|
-
export declare abstract class FolderCommandBase<TPlugin extends Plugin = Plugin> extends AbstractFileCommandBase<TPlugin> {
|
|
64
|
-
/**
|
|
65
|
-
* Creates a new folder command.
|
|
66
|
-
*
|
|
67
|
-
* @param params - The parameters for the folder command.
|
|
68
|
-
*/
|
|
69
|
-
constructor(params: AbstractFileCommandBaseParams<TPlugin>);
|
|
70
|
-
/**
|
|
71
|
-
* Creates a new abstract file command invocation.
|
|
72
|
-
*
|
|
73
|
-
* @param abstractFile - The abstract file to invoke the command for.
|
|
74
|
-
* @returns A new abstract file command invocation.
|
|
75
|
-
*/
|
|
76
|
-
protected createCommandInvocation(abstractFile?: TAbstractFile): AbstractFileCommandInvocationBase<TPlugin>;
|
|
77
|
-
/**
|
|
78
|
-
* Creates a new abstract file command invocation for an abstract file.
|
|
79
|
-
*
|
|
80
|
-
* @param abstractFile - The abstract file to invoke the command for.
|
|
81
|
-
* @returns A new abstract file command invocation.
|
|
82
|
-
*/
|
|
83
|
-
protected createCommandInvocationForAbstractFile(abstractFile: null | TAbstractFile): AbstractFileCommandInvocationBase<TPlugin>;
|
|
84
|
-
/**
|
|
85
|
-
* Creates a new abstract files command invocation for abstract files.
|
|
86
|
-
*
|
|
87
|
-
* @param abstractFiles - The abstract files to invoke the command for.
|
|
88
|
-
* @returns A new abstract files command invocation.
|
|
89
|
-
*/
|
|
90
|
-
protected createCommandInvocationForAbstractFiles(abstractFiles: TAbstractFile[]): AbstractFilesCommandInvocationBase<TPlugin>;
|
|
91
|
-
/**
|
|
92
|
-
* Creates a new abstract file command invocation for a folder.
|
|
93
|
-
*
|
|
94
|
-
* @param folder - The folder to invoke the command for.
|
|
95
|
-
* @returns A new folder command invocation.
|
|
96
|
-
*/
|
|
97
|
-
protected abstract createCommandInvocationForFolder(folder: null | TFolder): FolderCommandInvocationBase<TPlugin>;
|
|
98
|
-
/**
|
|
99
|
-
* Creates a new folders command invocation for folders.
|
|
100
|
-
*
|
|
101
|
-
* @param folders - The folders to invoke the command for.
|
|
102
|
-
* @returns A new folders command invocation.
|
|
103
|
-
*/
|
|
104
|
-
protected createCommandInvocationForFolders(folders: TFolder[]): FoldersCommandInvocationBase<TPlugin>;
|
|
105
|
-
/**
|
|
106
|
-
* Checks if the command should be added to the abstract file menu.
|
|
107
|
-
*
|
|
108
|
-
* @param abstractFile - The abstract file to check.
|
|
109
|
-
* @param source - The source of the abstract file.
|
|
110
|
-
* @param leaf - The leaf to check.
|
|
111
|
-
* @returns Whether the command should be added to the abstract file menu.
|
|
112
|
-
*/
|
|
113
|
-
protected shouldAddToAbstractFileMenu(abstractFile: TAbstractFile, source: string, leaf?: WorkspaceLeaf): boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Checks if the command should be added to the abstract files menu.
|
|
116
|
-
*
|
|
117
|
-
* @param abstractFiles - The abstract files to check.
|
|
118
|
-
* @param source - The source of the abstract files.
|
|
119
|
-
* @param leaf - The leaf to check.
|
|
120
|
-
* @returns Whether the command should be added to the abstract files menu.
|
|
121
|
-
*/
|
|
122
|
-
protected shouldAddToAbstractFilesMenu(abstractFiles: TAbstractFile[], source: string, leaf?: WorkspaceLeaf): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Checks if the command should be added to the folder menu.
|
|
125
|
-
*
|
|
126
|
-
* @param _folder - The folder to check.
|
|
127
|
-
* @param _source - The source of the folder.
|
|
128
|
-
* @param _leaf - The leaf to check.
|
|
129
|
-
* @returns Whether the command should be added to the folder menu.
|
|
130
|
-
*/
|
|
131
|
-
protected shouldAddToFolderMenu(_folder: TFolder, _source: string, _leaf?: WorkspaceLeaf): boolean;
|
|
132
|
-
/**
|
|
133
|
-
* Checks if the command should be added to the folders menu.
|
|
134
|
-
*
|
|
135
|
-
* @param _folders - The folders to check.
|
|
136
|
-
* @param _source - The source of the folders.
|
|
137
|
-
* @param _leaf - The leaf to check.
|
|
138
|
-
* @returns Whether the command should be added to the folders menu.
|
|
139
|
-
*/
|
|
140
|
-
protected shouldAddToFoldersMenu(_folders: TFolder[], _source: string, _leaf?: WorkspaceLeaf): boolean;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Base class for folders command invocations.
|
|
144
|
-
*
|
|
145
|
-
* @typeParam TPlugin - The type of the plugin that the command belongs to.
|
|
146
|
-
*/
|
|
147
|
-
export declare abstract class FoldersCommandInvocationBase<TPlugin extends Plugin> extends AbstractFilesCommandInvocationBase<TPlugin> {
|
|
148
|
-
readonly folders: TFolder[];
|
|
149
|
-
/**
|
|
150
|
-
* Creates a new folders command invocation.
|
|
151
|
-
*
|
|
152
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
153
|
-
* @param folders - The folders to invoke the command for.
|
|
154
|
-
*/
|
|
155
|
-
constructor(plugin: TPlugin, folders: TFolder[]);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Base class for sequential folders command invocations.
|
|
159
|
-
*
|
|
160
|
-
* @typeParam TPlugin - The type of the plugin that the command belongs to.
|
|
161
|
-
*/
|
|
162
|
-
export declare class SequentialFoldersCommandInvocationBase<TPlugin extends Plugin> extends FoldersCommandInvocationBase<TPlugin> {
|
|
163
|
-
private readonly createCommandInvocationForFolder;
|
|
164
|
-
/**
|
|
165
|
-
* Creates a new sequential folders command invocation.
|
|
166
|
-
*
|
|
167
|
-
* @param plugin - The plugin that the command invocation belongs to.
|
|
168
|
-
* @param folders - The folders to invoke the command for.
|
|
169
|
-
* @param createCommandInvocationForFolder - The function to create a command invocation for a folder.
|
|
170
|
-
*/
|
|
171
|
-
constructor(plugin: TPlugin, folders: TFolder[], createCommandInvocationForFolder: (folder: TFolder) => FolderCommandInvocationBase<TPlugin>);
|
|
172
|
-
/**
|
|
173
|
-
* Checks if the command can execute.
|
|
174
|
-
*
|
|
175
|
-
* @returns Whether the command can execute.
|
|
176
|
-
*/
|
|
177
|
-
protected canExecute(): boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Executes the command.
|
|
180
|
-
*
|
|
181
|
-
* @returns A promise that resolves when the command has been executed.
|
|
182
|
-
*/
|
|
183
|
-
protected execute(): Promise<void>;
|
|
184
|
-
}
|