obsidian-dev-utils 19.1.2-beta.2 → 19.1.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/lib/cjs/Debug.d.cts +1 -1
- package/dist/lib/cjs/Library.cjs +1 -1
- package/dist/lib/cjs/ScriptUtils/CliUtils.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/ESLint/index.d.cts +2 -2
- package/dist/lib/cjs/ScriptUtils/Fs.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/JSON.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/Npm.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/Root.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/esbuild/ObsidianPluginBuilder.d.cts +1 -1
- package/dist/lib/cjs/ScriptUtils/esbuild/index.d.cts +9 -9
- package/dist/lib/cjs/ScriptUtils/index.d.cts +17 -17
- package/dist/lib/cjs/String.d.cts +1 -1
- package/dist/lib/cjs/Transformers/DateTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/DurationTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/GroupTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/SkipPrivatePropertyTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/TypedTransformer.d.cts +1 -1
- package/dist/lib/cjs/Transformers/index.d.cts +6 -6
- package/dist/lib/cjs/ValueProvider.d.cts +1 -1
- package/dist/lib/cjs/codemirror/index.d.cts +1 -1
- package/dist/lib/cjs/index.d.cts +20 -20
- package/dist/lib/cjs/obsidian/@types/Dataview/api/data-array.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/api/extensions.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/api/inline-api.d.cts +9 -9
- package/dist/lib/cjs/obsidian/@types/Dataview/api/plugin-api.d.cts +10 -10
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/csv.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/inline-field.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/markdown-file.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/persister.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-index/index.d.cts +5 -5
- package/dist/lib/cjs/obsidian/@types/Dataview/data-index/resolver.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/markdown.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/serialized/markdown.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/data-model/value.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/binaryop.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/context.d.cts +6 -6
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/field.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/functions.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/expression/parse.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/index.d.cts +11 -11
- package/dist/lib/cjs/obsidian/@types/Dataview/main.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/query/engine.d.cts +9 -9
- package/dist/lib/cjs/obsidian/@types/Dataview/query/parse.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/query/query.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/typings/obsidian-ex.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/export/markdown.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/lp-render.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/markdown.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/refreshable-view.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/render.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/calendar-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/js-view.d.cts +2 -2
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/list-view.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/table-view.d.cts +3 -3
- package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/task-view.d.cts +4 -4
- package/dist/lib/cjs/obsidian/@types/Dataview/util/media.d.cts +1 -1
- package/dist/lib/cjs/obsidian/@types/Dataview/util/normalize.d.cts +2 -2
- package/dist/lib/cjs/obsidian/AttachmentPath.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Backlink.d.cts +2 -2
- package/dist/lib/cjs/obsidian/Callout.d.cts +2 -2
- package/dist/lib/cjs/obsidian/Components/DateComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/DateTimeComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/EmailComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/FileComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MonthComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleDropdownComponent.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Components/MultipleEmailComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleFileComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/MultipleTextComponent.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Components/NumberComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TimeComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TypedRangeTextComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/TypedTextComponent.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Components/UrlComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/ValidatorComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/ValueComponentWithChangeTracking.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/WeekComponent.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Components/index.d.cts +17 -17
- package/dist/lib/cjs/obsidian/Dataview.d.cts +6 -6
- package/dist/lib/cjs/obsidian/DataviewLink.d.cts +2 -2
- package/dist/lib/cjs/obsidian/FileChange.d.cts +3 -3
- package/dist/lib/cjs/obsidian/FileManager.d.cts +4 -4
- package/dist/lib/cjs/obsidian/Link.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Logger.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Loop.d.cts +1 -1
- package/dist/lib/cjs/obsidian/MarkdownCodeBlockProcessor.d.cts +1 -1
- package/dist/lib/cjs/obsidian/MetadataCache.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Modals/ModalBase.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Modals/Prompt.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Modals/index.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Plugin/EmptySettings.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Plugin/PluginBase.d.cts +3 -3
- package/dist/lib/cjs/obsidian/Plugin/PluginSettingsBase.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Plugin/PluginSettingsTabBase.d.cts +5 -5
- package/dist/lib/cjs/obsidian/Plugin/index.d.cts +8 -8
- package/dist/lib/cjs/obsidian/Queue.d.cts +1 -1
- package/dist/lib/cjs/obsidian/Reference.d.cts +1 -1
- package/dist/lib/cjs/obsidian/SettingEx.d.cts +13 -13
- package/dist/lib/cjs/obsidian/Vault.d.cts +3 -3
- package/dist/lib/cjs/obsidian/VaultEx.d.cts +1 -1
- package/dist/lib/cjs/obsidian/index.d.cts +29 -29
- package/dist/lib/esm/@types/debug.d.mts +16 -1
- package/dist/lib/esm/Async.d.mts +153 -1
- package/dist/lib/esm/Blob.d.mts +40 -1
- package/dist/lib/esm/CssClass.d.mts +97 -1
- package/dist/lib/esm/Debug.d.mts +41 -1
- package/dist/lib/esm/DebugController.d.mts +85 -1
- package/dist/lib/esm/Enum.d.mts +20 -1
- package/dist/lib/esm/Error.d.mts +45 -1
- package/dist/lib/esm/Function.d.mts +28 -1
- package/dist/lib/esm/HTMLElement.d.mts +49 -1
- package/dist/lib/esm/Library.d.mts +16 -1
- package/dist/lib/esm/Library.mjs +1 -1
- package/dist/lib/esm/Object.d.mts +211 -1
- package/dist/lib/esm/Path.d.mts +133 -1
- package/dist/lib/esm/RegExp.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/CliUtils.d.mts +70 -1
- package/dist/lib/esm/ScriptUtils/CodeGenerator.d.mts +12 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/@guardian__eslint-plugin-tsdoc-required.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-modules-newlines.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-verify-tsdoc.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/ESLint.d.mts +13 -1
- package/dist/lib/esm/ScriptUtils/ESLint/eslint.config.d.mts +16 -1
- package/dist/lib/esm/ScriptUtils/ESLint/index.d.mts +2 -1
- package/dist/lib/esm/ScriptUtils/Exec.d.mts +83 -1
- package/dist/lib/esm/ScriptUtils/Fs.d.mts +72 -1
- package/dist/lib/esm/ScriptUtils/JSON.d.mts +64 -1
- package/dist/lib/esm/ScriptUtils/NodeModules.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/Npm.d.mts +151 -1
- package/dist/lib/esm/ScriptUtils/NpmPublish.d.mts +9 -1
- package/dist/lib/esm/ScriptUtils/ObsidianDevUtilsRepoPaths.d.mts +106 -1
- package/dist/lib/esm/ScriptUtils/Root.d.mts +67 -1
- package/dist/lib/esm/ScriptUtils/build.d.mts +41 -1
- package/dist/lib/esm/ScriptUtils/cli.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/esbuild/Dependency.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/esbuild/ObsidianPluginBuilder.d.mts +53 -1
- package/dist/lib/esm/ScriptUtils/esbuild/changeExtensionPlugin.d.mts +12 -1
- package/dist/lib/esm/ScriptUtils/esbuild/copyToObsidianPluginsFolderPlugin.d.mts +18 -1
- package/dist/lib/esm/ScriptUtils/esbuild/fixEsmPlugin.d.mts +11 -1
- package/dist/lib/esm/ScriptUtils/esbuild/fixSourceMapsPlugin.d.mts +17 -1
- package/dist/lib/esm/ScriptUtils/esbuild/index.d.mts +9 -1
- package/dist/lib/esm/ScriptUtils/esbuild/preprocessPlugin.d.mts +23 -1
- package/dist/lib/esm/ScriptUtils/esbuild/renameCssPlugin.d.mts +8 -1
- package/dist/lib/esm/ScriptUtils/esbuild/svelteWrapperPlugin.d.mts +8 -1
- package/dist/lib/esm/ScriptUtils/format.d.mts +10 -1
- package/dist/lib/esm/ScriptUtils/index.d.mts +17 -1
- package/dist/lib/esm/ScriptUtils/spellcheck.d.mts +14 -1
- package/dist/lib/esm/ScriptUtils/version.d.mts +171 -1
- package/dist/lib/esm/String.d.mts +138 -1
- package/dist/lib/esm/Transformers/DateTransformer.d.mts +35 -1
- package/dist/lib/esm/Transformers/DurationTransformer.d.mts +34 -1
- package/dist/lib/esm/Transformers/GroupTransformer.d.mts +65 -1
- package/dist/lib/esm/Transformers/SkipPrivatePropertyTransformer.d.mts +32 -1
- package/dist/lib/esm/Transformers/Transformer.d.mts +67 -1
- package/dist/lib/esm/Transformers/TypedTransformer.d.mts +37 -1
- package/dist/lib/esm/Transformers/index.d.mts +6 -1
- package/dist/lib/esm/ValueProvider.d.mts +22 -1
- package/dist/lib/esm/codemirror/StateFieldSpec.d.mts +68 -1
- package/dist/lib/esm/codemirror/index.d.mts +1 -1
- package/dist/lib/esm/index.d.mts +20 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/data-array.d.mts +136 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/extensions.d.mts +15 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/inline-api.d.mts +186 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/plugin-api.d.mts +209 -1
- package/dist/lib/esm/obsidian/@types/Dataview/api/result.d.mts +38 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/common.d.mts +3 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/csv.d.mts +3 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/inline-field.d.mts +42 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/markdown-file.d.mts +52 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/persister.d.mts +32 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-entry.d.mts +1 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.mts +6 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-manager.d.mts +37 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/index.d.mts +186 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/resolver.d.mts +23 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-index/source.d.mts +71 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/markdown.d.mts +115 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/serialized/markdown.d.mts +106 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/transferable.d.mts +7 -1
- package/dist/lib/esm/obsidian/@types/Dataview/data-model/value.d.mts +175 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/binaryop.d.mts +43 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/context.d.mts +49 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/field.d.mts +82 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/functions.d.mts +149 -1
- package/dist/lib/esm/obsidian/@types/Dataview/expression/parse.d.mts +163 -1
- package/dist/lib/esm/obsidian/@types/Dataview/index.d.mts +55 -1
- package/dist/lib/esm/obsidian/@types/Dataview/main.d.mts +52 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/engine.d.mts +103 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/parse.d.mts +44 -1
- package/dist/lib/esm/obsidian/@types/Dataview/query/query.d.mts +95 -1
- package/dist/lib/esm/obsidian/@types/Dataview/settings.d.mts +60 -1
- package/dist/lib/esm/obsidian/@types/Dataview/typings/obsidian-ex.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/typings/workers.d.mts +4 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/export/markdown.d.mts +15 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/lp-render.d.mts +37 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/markdown.d.mts +86 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/refreshable-view.d.mts +18 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/render.d.mts +33 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/calendar-view.d.mts +17 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.mts +42 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-view.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/js-view.d.mts +23 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/list-view.d.mts +25 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/table-view.d.mts +28 -1
- package/dist/lib/esm/obsidian/@types/Dataview/ui/views/task-view.d.mts +51 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/hash.d.mts +1 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/locale.d.mts +2 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/media.d.mts +6 -1
- package/dist/lib/esm/obsidian/@types/Dataview/util/normalize.d.mts +44 -1
- package/dist/lib/esm/obsidian/App.d.mts +30 -1
- package/dist/lib/esm/obsidian/AttachmentPath.d.mts +54 -1
- package/dist/lib/esm/obsidian/Backlink.d.mts +60 -1
- package/dist/lib/esm/obsidian/Callout.d.mts +55 -1
- package/dist/lib/esm/obsidian/Components/DateComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/DateTimeComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/EmailComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/FileComponent.d.mts +41 -1
- package/dist/lib/esm/obsidian/Components/MonthComponent.d.mts +49 -1
- package/dist/lib/esm/obsidian/Components/MultipleDropdownComponent.d.mts +73 -1
- package/dist/lib/esm/obsidian/Components/MultipleEmailComponent.d.mts +36 -1
- package/dist/lib/esm/obsidian/Components/MultipleFileComponent.d.mts +41 -1
- package/dist/lib/esm/obsidian/Components/MultipleTextComponent.d.mts +67 -1
- package/dist/lib/esm/obsidian/Components/NumberComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/TimeComponent.d.mts +37 -1
- package/dist/lib/esm/obsidian/Components/TypedRangeTextComponent.d.mts +31 -1
- package/dist/lib/esm/obsidian/Components/TypedTextComponent.d.mts +84 -1
- package/dist/lib/esm/obsidian/Components/UrlComponent.d.mts +29 -1
- package/dist/lib/esm/obsidian/Components/ValidatorComponent.d.mts +22 -1
- package/dist/lib/esm/obsidian/Components/ValueComponentWithChangeTracking.d.mts +17 -1
- package/dist/lib/esm/obsidian/Components/WeekComponent.d.mts +49 -1
- package/dist/lib/esm/obsidian/Components/index.d.mts +17 -1
- package/dist/lib/esm/obsidian/Dataview.d.mts +215 -1
- package/dist/lib/esm/obsidian/DataviewLink.d.mts +23 -1
- package/dist/lib/esm/obsidian/FileChange.d.mts +68 -1
- package/dist/lib/esm/obsidian/FileManager.d.mts +38 -1
- package/dist/lib/esm/obsidian/FileSystem.d.mts +185 -1
- package/dist/lib/esm/obsidian/Frontmatter.d.mts +69 -1
- package/dist/lib/esm/obsidian/Link.d.mts +366 -1
- package/dist/lib/esm/obsidian/Logger.d.mts +13 -1
- package/dist/lib/esm/obsidian/Loop.d.mts +36 -1
- package/dist/lib/esm/obsidian/Markdown.d.mts +24 -1
- package/dist/lib/esm/obsidian/MarkdownCodeBlockProcessor.d.mts +23 -1
- package/dist/lib/esm/obsidian/MarkdownView.d.mts +12 -1
- package/dist/lib/esm/obsidian/MetadataCache.d.mts +87 -1
- package/dist/lib/esm/obsidian/Modals/Alert.d.mts +39 -1
- package/dist/lib/esm/obsidian/Modals/Confirm.d.mts +43 -1
- package/dist/lib/esm/obsidian/Modals/ModalBase.d.mts +35 -1
- package/dist/lib/esm/obsidian/Modals/Prompt.d.mts +50 -1
- package/dist/lib/esm/obsidian/Modals/SelectItem.d.mts +41 -1
- package/dist/lib/esm/obsidian/Modals/index.d.mts +5 -1
- package/dist/lib/esm/obsidian/ObsidianSettings.d.mts +17 -1
- package/dist/lib/esm/obsidian/Pdf.d.mts +24 -1
- package/dist/lib/esm/obsidian/Plugin/EmptySettings.d.mts +14 -1
- package/dist/lib/esm/obsidian/Plugin/ObsidianPluginRepoPaths.d.mts +53 -1
- package/dist/lib/esm/obsidian/Plugin/Plugin.d.mts +21 -1
- package/dist/lib/esm/obsidian/Plugin/PluginBase.d.mts +108 -1
- package/dist/lib/esm/obsidian/Plugin/PluginContext.d.mts +12 -1
- package/dist/lib/esm/obsidian/Plugin/PluginId.d.mts +20 -1
- package/dist/lib/esm/obsidian/Plugin/PluginSettingsBase.d.mts +31 -1
- package/dist/lib/esm/obsidian/Plugin/PluginSettingsTabBase.d.mts +99 -1
- package/dist/lib/esm/obsidian/Plugin/index.d.mts +8 -1
- package/dist/lib/esm/obsidian/Queue.d.mts +30 -1
- package/dist/lib/esm/obsidian/Reference.d.mts +21 -1
- package/dist/lib/esm/obsidian/RenameDeleteHandler.d.mts +49 -1
- package/dist/lib/esm/obsidian/ResourceUrl.d.mts +14 -1
- package/dist/lib/esm/obsidian/SettingEx.d.mts +124 -1
- package/dist/lib/esm/obsidian/Vault.d.mts +130 -1
- package/dist/lib/esm/obsidian/VaultEx.d.mts +27 -1
- package/dist/lib/esm/obsidian/index.d.mts +29 -1
- package/dist/lib/esm/url.d.mts +11 -1
- package/package.json +1 -1
@@ -2,8 +2,8 @@
|
|
2
2
|
* @packageDocumentation DataviewLink
|
3
3
|
* This module provides utility functions for working with Dataview links in Obsidian
|
4
4
|
*/
|
5
|
-
import type { DataviewInlineApi, Link } from './Dataview.cts';
|
6
|
-
import type { PathOrFile } from './FileSystem.cts';
|
5
|
+
import type { DataviewInlineApi, Link } from './Dataview.d.cts';
|
6
|
+
import type { PathOrFile } from './FileSystem.d.cts';
|
7
7
|
/**
|
8
8
|
* Fixes the title of a file or folder note by generating a `Link` object with a proper title.
|
9
9
|
*
|
@@ -3,9 +3,9 @@
|
|
3
3
|
* Contains utility types and functions for handling file changes in Obsidian.
|
4
4
|
*/
|
5
5
|
import type { App } from 'obsidian';
|
6
|
-
import type { ValueProvider } from '../ValueProvider.cts';
|
7
|
-
import type { PathOrFile } from './FileSystem.cts';
|
8
|
-
import type { ProcessOptions } from './Vault.cts';
|
6
|
+
import type { ValueProvider } from '../ValueProvider.d.cts';
|
7
|
+
import type { PathOrFile } from './FileSystem.d.cts';
|
8
|
+
import type { ProcessOptions } from './Vault.d.cts';
|
9
9
|
/**
|
10
10
|
* Represents a content body change in the Vault.
|
11
11
|
*/
|
@@ -3,10 +3,10 @@
|
|
3
3
|
* Contains utility functions for managing files in Obsidian.
|
4
4
|
*/
|
5
5
|
import type { App } from 'obsidian';
|
6
|
-
import type { MaybePromise } from '../Async.cts';
|
7
|
-
import type { PathOrFile } from './FileSystem.cts';
|
8
|
-
import type { CombinedFrontmatter } from './Frontmatter.cts';
|
9
|
-
import type { ProcessOptions } from './Vault.cts';
|
6
|
+
import type { MaybePromise } from '../Async.d.cts';
|
7
|
+
import type { PathOrFile } from './FileSystem.d.cts';
|
8
|
+
import type { CombinedFrontmatter } from './Frontmatter.d.cts';
|
9
|
+
import type { ProcessOptions } from './Vault.d.cts';
|
10
10
|
/**
|
11
11
|
* Adds an alias to the front matter of a given file if it does not already exist.
|
12
12
|
*
|
@@ -5,9 +5,9 @@
|
|
5
5
|
* The functions integrate with Obsidian's API to ensure that links are managed correctly within the vault.
|
6
6
|
*/
|
7
7
|
import type { App, Reference, TFile } from 'obsidian';
|
8
|
-
import type { MaybePromise } from '../Async.cts';
|
9
|
-
import type { PathOrFile } from './FileSystem.cts';
|
10
|
-
import type { ProcessOptions } from './Vault.cts';
|
8
|
+
import type { MaybePromise } from '../Async.d.cts';
|
9
|
+
import type { PathOrFile } from './FileSystem.d.cts';
|
10
|
+
import type { ProcessOptions } from './Vault.d.cts';
|
11
11
|
/**
|
12
12
|
* Options for converting a link.
|
13
13
|
*/
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @packageDocumentation Logger
|
3
3
|
* Contains utility functions for logging in Obsidian.
|
4
4
|
*/
|
5
|
-
import type { MaybePromise } from '../Async.cts';
|
5
|
+
import type { MaybePromise } from '../Async.d.cts';
|
6
6
|
/**
|
7
7
|
* Invokes a function and logs the start, end, and duration of the invocation.
|
8
8
|
*
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* This module provides utility functions for processing code blocks in Obsidian.
|
4
4
|
*/
|
5
5
|
import type { App, MarkdownPostProcessorContext } from 'obsidian';
|
6
|
-
import type { ValueProvider } from '../ValueProvider.cts';
|
6
|
+
import type { ValueProvider } from '../ValueProvider.d.cts';
|
7
7
|
/**
|
8
8
|
* Retrieves the argument of a code block from the given MarkdownPostProcessorContext and HTMLElement.
|
9
9
|
*
|
@@ -4,9 +4,9 @@
|
|
4
4
|
*/
|
5
5
|
import type { App, CachedMetadata, Reference, TAbstractFile } from 'obsidian';
|
6
6
|
import type { CustomArrayDict } from 'obsidian-typings';
|
7
|
-
import type { RetryOptions } from '../Async.cts';
|
8
|
-
import type { PathOrFile } from './FileSystem.cts';
|
9
|
-
import type { CombinedFrontmatter } from './Frontmatter.cts';
|
7
|
+
import type { RetryOptions } from '../Async.d.cts';
|
8
|
+
import type { PathOrFile } from './FileSystem.d.cts';
|
9
|
+
import type { CombinedFrontmatter } from './Frontmatter.d.cts';
|
10
10
|
/**
|
11
11
|
* Wrapper for the getBacklinksForFile method that provides a safe overload.
|
12
12
|
*/
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* This module exports a function to display a modal that prompts the user for input. The modal includes "OK" and "Cancel" buttons.
|
6
6
|
*/
|
7
7
|
import { App } from 'obsidian';
|
8
|
-
import type { MaybePromise } from '../../Async.cts';
|
8
|
+
import type { MaybePromise } from '../../Async.d.cts';
|
9
9
|
/**
|
10
10
|
* The options for the prompt modal.
|
11
11
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * as Alert from './Alert.cts';
|
2
|
-
export * as Confirm from './Confirm.cts';
|
3
|
-
export * as ModalBase from './ModalBase.cts';
|
4
|
-
export * as Prompt from './Prompt.cts';
|
5
|
-
export * as SelectItem from './SelectItem.cts';
|
1
|
+
export * as Alert from './Alert.d.cts';
|
2
|
+
export * as Confirm from './Confirm.d.cts';
|
3
|
+
export * as ModalBase from './ModalBase.d.cts';
|
4
|
+
export * as Prompt from './Prompt.d.cts';
|
5
|
+
export * as SelectItem from './SelectItem.d.cts';
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @packageDocumentation EmptySettings
|
3
3
|
* Empty settings class.
|
4
4
|
*/
|
5
|
-
import { PluginSettingsBase } from './PluginSettingsBase.cts';
|
5
|
+
import { PluginSettingsBase } from './PluginSettingsBase.d.cts';
|
6
6
|
/**
|
7
7
|
* @packageDocumentation EmptySettings
|
8
8
|
* Empty settings class.
|
@@ -8,9 +8,9 @@
|
|
8
8
|
*/
|
9
9
|
import type { ReadonlyDeep } from 'type-fest';
|
10
10
|
import { Plugin, PluginSettingTab } from 'obsidian';
|
11
|
-
import type { MaybePromise } from '../../Async.cts';
|
12
|
-
import type { EmptySettings } from './EmptySettings.cts';
|
13
|
-
import type { PluginSettingsBase } from './PluginSettingsBase.cts';
|
11
|
+
import type { MaybePromise } from '../../Async.d.cts';
|
12
|
+
import type { EmptySettings } from './EmptySettings.d.cts';
|
13
|
+
import type { PluginSettingsBase } from './PluginSettingsBase.d.cts';
|
14
14
|
/**
|
15
15
|
* Base class for creating Obsidian plugins with built-in support for settings management, error handling, and notifications.
|
16
16
|
*
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @packageDocumentation PluginSettingsBase
|
3
3
|
* Base class for plugin settings.
|
4
4
|
*/
|
5
|
-
import { Transformer } from '../../Transformers/Transformer.cts';
|
5
|
+
import { Transformer } from '../../Transformers/Transformer.d.cts';
|
6
6
|
/**
|
7
7
|
* Base class for plugin settings.
|
8
8
|
*/
|
@@ -5,11 +5,11 @@
|
|
5
5
|
*/
|
6
6
|
import type { BaseComponent } from 'obsidian';
|
7
7
|
import { PluginSettingTab } from 'obsidian';
|
8
|
-
import type { MaybePromise } from '../../Async.cts';
|
9
|
-
import type { KeysMatching } from '../../Object.cts';
|
10
|
-
import type { ValueComponentWithChangeTracking } from '../Components/ValueComponentWithChangeTracking.cts';
|
11
|
-
import type { PluginSettingsBase } from './PluginSettingsBase.cts';
|
12
|
-
import { PluginBase } from './PluginBase.cts';
|
8
|
+
import type { MaybePromise } from '../../Async.d.cts';
|
9
|
+
import type { KeysMatching } from '../../Object.d.cts';
|
10
|
+
import type { ValueComponentWithChangeTracking } from '../Components/ValueComponentWithChangeTracking.d.cts';
|
11
|
+
import type { PluginSettingsBase } from './PluginSettingsBase.d.cts';
|
12
|
+
import { PluginBase } from './PluginBase.d.cts';
|
13
13
|
/**
|
14
14
|
* Options for binding a value component to a plugin setting.
|
15
15
|
*/
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export * as EmptySettings from './EmptySettings.cts';
|
2
|
-
export * as ObsidianPluginRepoPaths from './ObsidianPluginRepoPaths.cts';
|
3
|
-
export * as Plugin from './Plugin.cts';
|
4
|
-
export * as PluginBase from './PluginBase.cts';
|
5
|
-
export * as PluginContext from './PluginContext.cts';
|
6
|
-
export * as PluginId from './PluginId.cts';
|
7
|
-
export * as PluginSettingsBase from './PluginSettingsBase.cts';
|
8
|
-
export * as PluginSettingsTabBase from './PluginSettingsTabBase.cts';
|
1
|
+
export * as EmptySettings from './EmptySettings.d.cts';
|
2
|
+
export * as ObsidianPluginRepoPaths from './ObsidianPluginRepoPaths.d.cts';
|
3
|
+
export * as Plugin from './Plugin.d.cts';
|
4
|
+
export * as PluginBase from './PluginBase.d.cts';
|
5
|
+
export * as PluginContext from './PluginContext.d.cts';
|
6
|
+
export * as PluginId from './PluginId.d.cts';
|
7
|
+
export * as PluginSettingsBase from './PluginSettingsBase.d.cts';
|
8
|
+
export * as PluginSettingsTabBase from './PluginSettingsTabBase.d.cts';
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Contains utility functions for enqueuing and processing functions in Obsidian.
|
4
4
|
*/
|
5
5
|
import type { App } from 'obsidian';
|
6
|
-
import type { MaybePromise } from '../Async.cts';
|
6
|
+
import type { MaybePromise } from '../Async.d.cts';
|
7
7
|
/**
|
8
8
|
* Adds an asynchronous function to be executed after the previous function completes.
|
9
9
|
*
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Contains utility functions for handling references in Obsidian.
|
4
4
|
*/
|
5
5
|
import type { Reference } from 'obsidian';
|
6
|
-
import type { FileChange } from './FileChange.cts';
|
6
|
+
import type { FileChange } from './FileChange.d.cts';
|
7
7
|
/**
|
8
8
|
* Converts a reference to a file change.
|
9
9
|
*
|
@@ -4,19 +4,19 @@
|
|
4
4
|
*/
|
5
5
|
import type { BaseComponent } from 'obsidian';
|
6
6
|
import { Setting } from 'obsidian';
|
7
|
-
import { DateComponent } from './Components/DateComponent.cts';
|
8
|
-
import { DateTimeComponent } from './Components/DateTimeComponent.cts';
|
9
|
-
import { EmailComponent } from './Components/EmailComponent.cts';
|
10
|
-
import { FileComponent } from './Components/FileComponent.cts';
|
11
|
-
import { MonthComponent } from './Components/MonthComponent.cts';
|
12
|
-
import { MultipleDropdownComponent } from './Components/MultipleDropdownComponent.cts';
|
13
|
-
import { MultipleEmailComponent } from './Components/MultipleEmailComponent.cts';
|
14
|
-
import { MultipleFileComponent } from './Components/MultipleFileComponent.cts';
|
15
|
-
import { MultipleTextComponent } from './Components/MultipleTextComponent.cts';
|
16
|
-
import { NumberComponent } from './Components/NumberComponent.cts';
|
17
|
-
import { TimeComponent } from './Components/TimeComponent.cts';
|
18
|
-
import { UrlComponent } from './Components/UrlComponent.cts';
|
19
|
-
import { WeekComponent } from './Components/WeekComponent.cts';
|
7
|
+
import { DateComponent } from './Components/DateComponent.d.cts';
|
8
|
+
import { DateTimeComponent } from './Components/DateTimeComponent.d.cts';
|
9
|
+
import { EmailComponent } from './Components/EmailComponent.d.cts';
|
10
|
+
import { FileComponent } from './Components/FileComponent.d.cts';
|
11
|
+
import { MonthComponent } from './Components/MonthComponent.d.cts';
|
12
|
+
import { MultipleDropdownComponent } from './Components/MultipleDropdownComponent.d.cts';
|
13
|
+
import { MultipleEmailComponent } from './Components/MultipleEmailComponent.d.cts';
|
14
|
+
import { MultipleFileComponent } from './Components/MultipleFileComponent.d.cts';
|
15
|
+
import { MultipleTextComponent } from './Components/MultipleTextComponent.d.cts';
|
16
|
+
import { NumberComponent } from './Components/NumberComponent.d.cts';
|
17
|
+
import { TimeComponent } from './Components/TimeComponent.d.cts';
|
18
|
+
import { UrlComponent } from './Components/UrlComponent.d.cts';
|
19
|
+
import { WeekComponent } from './Components/WeekComponent.d.cts';
|
20
20
|
/**
|
21
21
|
* Extends the Setting class with additional methods for adding components.
|
22
22
|
*/
|
@@ -4,9 +4,9 @@
|
|
4
4
|
*/
|
5
5
|
import type { ListedFiles } from 'obsidian';
|
6
6
|
import { App, TFile } from 'obsidian';
|
7
|
-
import type { RetryOptions } from '../Async.cts';
|
8
|
-
import type { ValueProvider } from '../ValueProvider.cts';
|
9
|
-
import type { PathOrFile, PathOrFolder } from './FileSystem.cts';
|
7
|
+
import type { RetryOptions } from '../Async.d.cts';
|
8
|
+
import type { ValueProvider } from '../ValueProvider.d.cts';
|
9
|
+
import type { PathOrFile, PathOrFolder } from './FileSystem.d.cts';
|
10
10
|
/**
|
11
11
|
* Options for the `process` function.
|
12
12
|
*/
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* It has to be extracted from `Vault` because of circular dependencies.
|
6
6
|
*/
|
7
7
|
import type { App } from 'obsidian';
|
8
|
-
import type { PathOrAbstractFile, PathOrFolder } from './FileSystem.cts';
|
8
|
+
import type { PathOrAbstractFile, PathOrFolder } from './FileSystem.d.cts';
|
9
9
|
/**
|
10
10
|
* Removes empty folder hierarchy starting from the given folder.
|
11
11
|
*
|
@@ -1,29 +1,29 @@
|
|
1
|
-
export * as App from './App.cts';
|
2
|
-
export * as AttachmentPath from './AttachmentPath.cts';
|
3
|
-
export * as Backlink from './Backlink.cts';
|
4
|
-
export * as Callout from './Callout.cts';
|
5
|
-
export * as Components from './Components/index.cts';
|
6
|
-
export * as Dataview from './Dataview.cts';
|
7
|
-
export * as DataviewLink from './DataviewLink.cts';
|
8
|
-
export * as FileChange from './FileChange.cts';
|
9
|
-
export * as FileManager from './FileManager.cts';
|
10
|
-
export * as FileSystem from './FileSystem.cts';
|
11
|
-
export * as Frontmatter from './Frontmatter.cts';
|
12
|
-
export * as Link from './Link.cts';
|
13
|
-
export * as Logger from './Logger.cts';
|
14
|
-
export * as Loop from './Loop.cts';
|
15
|
-
export * as Markdown from './Markdown.cts';
|
16
|
-
export * as MarkdownCodeBlockProcessor from './MarkdownCodeBlockProcessor.cts';
|
17
|
-
export * as MarkdownView from './MarkdownView.cts';
|
18
|
-
export * as MetadataCache from './MetadataCache.cts';
|
19
|
-
export * as Modals from './Modals/index.cts';
|
20
|
-
export * as ObsidianSettings from './ObsidianSettings.cts';
|
21
|
-
export * as Pdf from './Pdf.cts';
|
22
|
-
export * as Plugin from './Plugin/index.cts';
|
23
|
-
export * as Queue from './Queue.cts';
|
24
|
-
export * as Reference from './Reference.cts';
|
25
|
-
export * as RenameDeleteHandler from './RenameDeleteHandler.cts';
|
26
|
-
export * as ResourceUrl from './ResourceUrl.cts';
|
27
|
-
export * as SettingEx from './SettingEx.cts';
|
28
|
-
export * as Vault from './Vault.cts';
|
29
|
-
export * as VaultEx from './VaultEx.cts';
|
1
|
+
export * as App from './App.d.cts';
|
2
|
+
export * as AttachmentPath from './AttachmentPath.d.cts';
|
3
|
+
export * as Backlink from './Backlink.d.cts';
|
4
|
+
export * as Callout from './Callout.d.cts';
|
5
|
+
export * as Components from './Components/index.d.cts';
|
6
|
+
export * as Dataview from './Dataview.d.cts';
|
7
|
+
export * as DataviewLink from './DataviewLink.d.cts';
|
8
|
+
export * as FileChange from './FileChange.d.cts';
|
9
|
+
export * as FileManager from './FileManager.d.cts';
|
10
|
+
export * as FileSystem from './FileSystem.d.cts';
|
11
|
+
export * as Frontmatter from './Frontmatter.d.cts';
|
12
|
+
export * as Link from './Link.d.cts';
|
13
|
+
export * as Logger from './Logger.d.cts';
|
14
|
+
export * as Loop from './Loop.d.cts';
|
15
|
+
export * as Markdown from './Markdown.d.cts';
|
16
|
+
export * as MarkdownCodeBlockProcessor from './MarkdownCodeBlockProcessor.d.cts';
|
17
|
+
export * as MarkdownView from './MarkdownView.d.cts';
|
18
|
+
export * as MetadataCache from './MetadataCache.d.cts';
|
19
|
+
export * as Modals from './Modals/index.d.cts';
|
20
|
+
export * as ObsidianSettings from './ObsidianSettings.d.cts';
|
21
|
+
export * as Pdf from './Pdf.d.cts';
|
22
|
+
export * as Plugin from './Plugin/index.d.cts';
|
23
|
+
export * as Queue from './Queue.d.cts';
|
24
|
+
export * as Reference from './Reference.d.cts';
|
25
|
+
export * as RenameDeleteHandler from './RenameDeleteHandler.d.cts';
|
26
|
+
export * as ResourceUrl from './ResourceUrl.d.cts';
|
27
|
+
export * as SettingEx from './SettingEx.d.cts';
|
28
|
+
export * as Vault from './Vault.d.cts';
|
29
|
+
export * as VaultEx from './VaultEx.d.cts';
|
@@ -1 +1,16 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation debug
|
3
|
+
* Fixed typings for the `debug` package.
|
4
|
+
*/
|
5
|
+
|
6
|
+
export {};
|
7
|
+
|
8
|
+
declare module 'debug' {
|
9
|
+
interface Debug {
|
10
|
+
/**
|
11
|
+
* Loads the debug configuration from the environment.
|
12
|
+
* @returns The loaded debug configuration.
|
13
|
+
*/
|
14
|
+
load(): null | string;
|
15
|
+
}
|
16
|
+
}
|
package/dist/lib/esm/Async.d.mts
CHANGED
@@ -1 +1,153 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation Async
|
3
|
+
* Contains utility functions for asynchronous operations.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* A type representing a value that can either be a direct value or a Promise resolving to that value.
|
7
|
+
* @typeParam T - The type of the value.
|
8
|
+
*/
|
9
|
+
export type MaybePromise<T> = Promise<T> | T;
|
10
|
+
/**
|
11
|
+
* A type representing a function that resolves a Promise.
|
12
|
+
*
|
13
|
+
* @typeParam T - The type of the value.
|
14
|
+
*/
|
15
|
+
export type PromiseResolve<T> = undefined extends T ? (value?: PromiseLike<T> | T) => void : (value: PromiseLike<T> | T) => void;
|
16
|
+
/**
|
17
|
+
* Options for configuring the retry behavior.
|
18
|
+
*/
|
19
|
+
export interface RetryOptions {
|
20
|
+
/**
|
21
|
+
* The abort signal to cancel the retry operation.
|
22
|
+
*/
|
23
|
+
abortSignal?: AbortSignal;
|
24
|
+
/**
|
25
|
+
* The delay in milliseconds between retry attempts.
|
26
|
+
*/
|
27
|
+
retryDelayInMilliseconds?: number;
|
28
|
+
/**
|
29
|
+
* Whether to retry the function on error.
|
30
|
+
*/
|
31
|
+
shouldRetryOnError?: boolean;
|
32
|
+
/**
|
33
|
+
* The maximum time in milliseconds to wait before giving up on retrying.
|
34
|
+
*/
|
35
|
+
timeoutInMilliseconds?: number;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* A marker interface to indicate that an error should terminate retry logic.
|
39
|
+
*/
|
40
|
+
export interface TerminateRetry {
|
41
|
+
/**
|
42
|
+
* A marker property to indicate that an error should terminate retry logic.
|
43
|
+
*/
|
44
|
+
__terminateRetry: true;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Adds an error handler to a Promise that catches any errors and emits an async error event.
|
48
|
+
*
|
49
|
+
* @param asyncFn - The asynchronous function to add an error handler to.
|
50
|
+
* @returns A Promise that resolves when the asynchronous function completes or emits async error event.
|
51
|
+
*/
|
52
|
+
export declare function addErrorHandler(asyncFn: () => Promise<unknown>): Promise<void>;
|
53
|
+
/**
|
54
|
+
* Filters an array asynchronously, keeping only the elements that satisfy the provided predicate function.
|
55
|
+
*
|
56
|
+
* @typeParam T - The type of elements in the input array.
|
57
|
+
* @param arr - The array to filter.
|
58
|
+
* @param predicate - The predicate function to test each element.
|
59
|
+
* @returns A Promise that resolves with an array of elements that satisfy the predicate function.
|
60
|
+
*/
|
61
|
+
export declare function asyncFilter<T>(arr: T[], predicate: (value: T, index: number, array: T[]) => MaybePromise<boolean>): Promise<T[]>;
|
62
|
+
/**
|
63
|
+
* Maps over an array asynchronously, applying the provided callback function to each element, and then flattens the results into a single array.
|
64
|
+
*
|
65
|
+
* @typeParam T - The type of elements in the input array.
|
66
|
+
* @typeParam U - The type of elements in the output array.
|
67
|
+
* @param arr - The array to map over and flatten.
|
68
|
+
* @param callback - The callback function to apply to each element.
|
69
|
+
* @returns A Promise that resolves with a flattened array of the results of the callback function.
|
70
|
+
*/
|
71
|
+
export declare function asyncFlatMap<T, U>(arr: T[], callback: (value: T, index: number, array: T[]) => MaybePromise<U[]>): Promise<U[]>;
|
72
|
+
/**
|
73
|
+
* Maps over an array asynchronously, applying the provided callback function to each element.
|
74
|
+
*
|
75
|
+
* @typeParam T - The type of elements in the input array.
|
76
|
+
* @typeParam U - The type of elements in the output array.
|
77
|
+
* @param arr - The array to map over.
|
78
|
+
* @param callback - The callback function to apply to each element.
|
79
|
+
* @returns A Promise that resolves with an array of the results of the callback function.
|
80
|
+
*/
|
81
|
+
export declare function asyncMap<T, U>(arr: T[], callback: (value: T, index: number, array: T[]) => MaybePromise<U>): Promise<U[]>;
|
82
|
+
/**
|
83
|
+
* Converts an asynchronous function to a synchronous one by automatically handling the Promise rejection.
|
84
|
+
*
|
85
|
+
* @typeParam Args - The types of the arguments the function accepts.
|
86
|
+
* @param asyncFunc - The asynchronous function to convert.
|
87
|
+
* @returns A function that wraps the asynchronous function in a synchronous interface.
|
88
|
+
*/
|
89
|
+
export declare function convertAsyncToSync<Args extends unknown[]>(asyncFunc: (...args: Args) => Promise<unknown>): (...args: Args) => void;
|
90
|
+
/**
|
91
|
+
* Converts a synchronous function to an asynchronous one by wrapping it in a Promise.
|
92
|
+
*
|
93
|
+
* @typeParam Args - The types of the arguments the function accepts.
|
94
|
+
* @typeParam Result - The type of the function's return value.
|
95
|
+
* @param syncFn - The synchronous function to convert.
|
96
|
+
* @returns A function that wraps the synchronous function in an asynchronous interface.
|
97
|
+
*/
|
98
|
+
export declare function convertSyncToAsync<Args extends unknown[], Result>(syncFn: (...args: Args) => Result): (...args: Args) => Promise<Result>;
|
99
|
+
/**
|
100
|
+
* Invokes a Promise and safely handles any errors by catching them and emitting an async error event.
|
101
|
+
*
|
102
|
+
* @param asyncFn - The asynchronous function to invoke safely.
|
103
|
+
*/
|
104
|
+
export declare function invokeAsyncSafely(asyncFn: () => Promise<unknown>): void;
|
105
|
+
/**
|
106
|
+
* Marks an error to terminate retry logic.
|
107
|
+
*
|
108
|
+
* @param error - The error to mark to terminate retry logic.
|
109
|
+
* @returns An error that should terminate retry logic.
|
110
|
+
*/
|
111
|
+
export declare function marksAsTerminateRetry<TError extends Error>(error: TError): TerminateRetry & TError;
|
112
|
+
/**
|
113
|
+
* Retries the provided function until it returns true or the timeout is reached.
|
114
|
+
*
|
115
|
+
* @param fn - The function to retry.
|
116
|
+
* @param retryOptions - Optional parameters to configure the retry behavior.
|
117
|
+
* @param stackTrace - Optional stack trace.
|
118
|
+
* @returns A Promise that resolves when the function returns true or rejects when the timeout is reached.
|
119
|
+
*/
|
120
|
+
export declare function retryWithTimeout(fn: () => MaybePromise<boolean>, retryOptions?: RetryOptions, stackTrace?: string): Promise<void>;
|
121
|
+
/**
|
122
|
+
* Executes a function with a timeout. If the function does not complete within the specified time, it is considered to have timed out.
|
123
|
+
*
|
124
|
+
* If `DEBUG=obsidian-dev-utils:Async:runWithTimeout` is set, the execution is not terminated after the timeout and the function is allowed to run indefinitely.
|
125
|
+
*
|
126
|
+
* @typeParam R - The type of the result from the asynchronous function.
|
127
|
+
* @param timeoutInMilliseconds - The maximum time to wait in milliseconds.
|
128
|
+
* @param fn - The function to execute.
|
129
|
+
* @returns A Promise that resolves with the result of the asynchronous function or rejects if it times out.
|
130
|
+
*/
|
131
|
+
export declare function runWithTimeout<R>(timeoutInMilliseconds: number, fn: () => MaybePromise<R>): Promise<R>;
|
132
|
+
/**
|
133
|
+
* Delays execution for a specified number of milliseconds.
|
134
|
+
*
|
135
|
+
* @param milliseconds - The time to wait in milliseconds.
|
136
|
+
* @returns A Promise that resolves after the specified delay.
|
137
|
+
*/
|
138
|
+
export declare function sleep(milliseconds: number): Promise<void>;
|
139
|
+
/**
|
140
|
+
* Returns a Promise that rejects after the specified timeout period.
|
141
|
+
*
|
142
|
+
* @param timeoutInMilliseconds - The timeout period in milliseconds.
|
143
|
+
* @returns A Promise that always rejects with a timeout error.
|
144
|
+
*/
|
145
|
+
export declare function timeout(timeoutInMilliseconds: number): Promise<never>;
|
146
|
+
/**
|
147
|
+
* Converts an AsyncIterableIterator to an array by consuming all its elements.
|
148
|
+
*
|
149
|
+
* @typeParam T - The type of elements produced by the AsyncIterableIterator.
|
150
|
+
* @param iter - The AsyncIterableIterator to convert.
|
151
|
+
* @returns A Promise that resolves with an array of all the elements in the AsyncIterableIterator.
|
152
|
+
*/
|
153
|
+
export declare function toArray<T>(iter: AsyncIterableIterator<T>): Promise<T[]>;
|
package/dist/lib/esm/Blob.d.mts
CHANGED
@@ -1 +1,40 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation Async
|
3
|
+
* Contains utility functions for Blob objects.
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* Converts a Blob object to an ArrayBuffer.
|
7
|
+
*
|
8
|
+
* @param blob - The Blob object to convert.
|
9
|
+
* @returns A promise that resolves to an ArrayBuffer.
|
10
|
+
*/
|
11
|
+
export declare function blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
|
12
|
+
/**
|
13
|
+
* Converts a Blob object to a data URL.
|
14
|
+
*
|
15
|
+
* @param blob - The Blob object to convert.
|
16
|
+
* @returns A promise that resolves to a data URL.
|
17
|
+
*/
|
18
|
+
export declare function blobToDataUrl(blob: Blob): Promise<string>;
|
19
|
+
/**
|
20
|
+
* Converts a Blob object to a JPEG ArrayBuffer with the specified quality.
|
21
|
+
*
|
22
|
+
* @param blob - The Blob object to convert.
|
23
|
+
* @param jpegQuality - The quality of the JPEG image (0 to 1).
|
24
|
+
* @returns A promise that resolves to an ArrayBuffer.
|
25
|
+
*/
|
26
|
+
export declare function blobToJpegArrayBuffer(blob: Blob, jpegQuality: number): Promise<ArrayBuffer>;
|
27
|
+
/**
|
28
|
+
* Converts a base64 encoded string to an ArrayBuffer.
|
29
|
+
*
|
30
|
+
* @param dataUrl - The data URL to convert.
|
31
|
+
* @returns The decoded ArrayBuffer.
|
32
|
+
*/
|
33
|
+
export declare function dataUrlToArrayBuffer(dataUrl: string): ArrayBuffer;
|
34
|
+
/**
|
35
|
+
* Checks if a given file is an image.
|
36
|
+
*
|
37
|
+
* @param file - The file to check.
|
38
|
+
* @returns True if the file is an image, false otherwise.
|
39
|
+
*/
|
40
|
+
export declare function isImageFile(file: File): boolean;
|