obsidian-dev-utils 19.1.2-beta.2 → 19.1.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/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 +4 -4
- 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 +5 -5
- 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 +5 -5
- 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 +6 -6
- 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 +2 -2
- 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 +2 -2
- 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
@@ -1 +1,86 @@
|
|
1
|
-
|
1
|
+
/** Provides core preact / rendering utilities for all view types. */
|
2
|
+
import type {
|
3
|
+
App,
|
4
|
+
MarkdownRenderChild
|
5
|
+
} from 'obsidian';
|
6
|
+
import type { Component } from 'obsidian';
|
7
|
+
import type {
|
8
|
+
ComponentChildren,
|
9
|
+
h
|
10
|
+
} from 'preact';
|
11
|
+
import React from 'preact/compat';
|
12
|
+
import type { FullIndex } from '../data-index/index.d.d.mts';
|
13
|
+
import type { Literal } from '../data-model/value.d.d.mts';
|
14
|
+
import type { DataviewSettings } from '../settings.d.d.mts';
|
15
|
+
export type MarkdownProps = {
|
16
|
+
contents: string;
|
17
|
+
sourcePath: string;
|
18
|
+
};
|
19
|
+
export type MarkdownContext = {
|
20
|
+
component: Component;
|
21
|
+
};
|
22
|
+
/** Context need to create dataviews. */
|
23
|
+
export type DataviewInit = {
|
24
|
+
app: App;
|
25
|
+
index: FullIndex;
|
26
|
+
settings: DataviewSettings;
|
27
|
+
container: HTMLElement;
|
28
|
+
};
|
29
|
+
/** Shared context for dataview views and objects. */
|
30
|
+
export type DataviewContexts = DataviewInit & {
|
31
|
+
component: Component;
|
32
|
+
};
|
33
|
+
export declare const DataviewContext: React.Context<DataviewContexts>;
|
34
|
+
/** Hacky preact component which wraps Obsidian's markdown renderer into a neat component. */
|
35
|
+
export declare function RawMarkdown({ content, sourcePath, inline, style, cls, onClick }: {
|
36
|
+
content: string;
|
37
|
+
sourcePath: string;
|
38
|
+
inline?: boolean;
|
39
|
+
style?: string;
|
40
|
+
cls?: string;
|
41
|
+
onClick?: (e: preact.JSX.TargetedMouseEvent<HTMLElement>) => void;
|
42
|
+
}): h.JSX.Element;
|
43
|
+
/** Hacky preact component which wraps Obsidian's markdown renderer into a neat component. */
|
44
|
+
export declare const Markdown: typeof RawMarkdown;
|
45
|
+
/** Embeds an HTML element in the react DOM. */
|
46
|
+
export declare function RawEmbedHtml({ element }: {
|
47
|
+
element: HTMLElement;
|
48
|
+
}): h.JSX.Element;
|
49
|
+
/** Embeds an HTML element in the react DOM. */
|
50
|
+
export declare const EmbedHtml: typeof RawEmbedHtml;
|
51
|
+
/** Intelligently render an arbitrary literal value. */
|
52
|
+
export declare function RawLit({ value, sourcePath, inline, depth }: {
|
53
|
+
value: Literal | undefined;
|
54
|
+
sourcePath: string;
|
55
|
+
inline?: boolean;
|
56
|
+
depth?: number;
|
57
|
+
}): h.JSX.Element;
|
58
|
+
/** Intelligently render an arbitrary literal value. */
|
59
|
+
export declare const Lit: typeof RawLit;
|
60
|
+
/** Render a simple nice looking error box in a code style. */
|
61
|
+
export declare function ErrorPre(props: {
|
62
|
+
children: ComponentChildren;
|
63
|
+
}, {}: {}): h.JSX.Element;
|
64
|
+
/** Render a pretty centered error message in a box. */
|
65
|
+
export declare function ErrorMessage({ message }: {
|
66
|
+
message: string;
|
67
|
+
}): h.JSX.Element;
|
68
|
+
/**
|
69
|
+
* Complex convenience hook which calls `compute` every time the index updates, updating the current state.
|
70
|
+
*/
|
71
|
+
export declare function useIndexBackedState<T>(
|
72
|
+
container: HTMLElement,
|
73
|
+
app: App,
|
74
|
+
settings: DataviewSettings,
|
75
|
+
index: FullIndex,
|
76
|
+
initial: T,
|
77
|
+
compute: () => Promise<T>
|
78
|
+
): T;
|
79
|
+
/** A trivial wrapper which allows a react component to live for the duration of a `MarkdownRenderChild`. */
|
80
|
+
export declare class ReactRenderer extends MarkdownRenderChild {
|
81
|
+
init: DataviewInit;
|
82
|
+
element: h.JSX.Element;
|
83
|
+
constructor(init: DataviewInit, element: h.JSX.Element);
|
84
|
+
onload(): void;
|
85
|
+
onunload(): void;
|
86
|
+
}
|
@@ -1 +1,18 @@
|
|
1
|
-
|
1
|
+
import type {
|
2
|
+
App,
|
3
|
+
MarkdownRenderChild
|
4
|
+
} from 'obsidian';
|
5
|
+
import type { FullIndex } from '../data-index/index.d.d.mts';
|
6
|
+
import type { DataviewSettings } from '../settings.d.d.mts';
|
7
|
+
/** Generic code for embedded Dataviews. */
|
8
|
+
export declare abstract class DataviewRefreshableRenderer extends MarkdownRenderChild {
|
9
|
+
container: HTMLElement;
|
10
|
+
index: FullIndex;
|
11
|
+
app: App;
|
12
|
+
settings: DataviewSettings;
|
13
|
+
private lastReload;
|
14
|
+
constructor(container: HTMLElement, index: FullIndex, app: App, settings: DataviewSettings);
|
15
|
+
abstract render(): Promise<void>;
|
16
|
+
onload(): void;
|
17
|
+
maybeRefresh: () => void;
|
18
|
+
}
|
@@ -1 +1,33 @@
|
|
1
|
-
|
1
|
+
import type {
|
2
|
+
App,
|
3
|
+
Component
|
4
|
+
} from 'obsidian';
|
5
|
+
import type { Literal } from '../data-model/value.d.d.mts';
|
6
|
+
import type { QuerySettings } from '../settings.d.d.mts';
|
7
|
+
/** Render simple fields compactly, removing wrapping content like paragraph and span. */
|
8
|
+
export declare function renderCompactMarkdown(
|
9
|
+
app: App,
|
10
|
+
markdown: string,
|
11
|
+
container: HTMLElement,
|
12
|
+
sourcePath: string,
|
13
|
+
component: Component,
|
14
|
+
isInlineFieldLivePreview?: boolean
|
15
|
+
): Promise<void>;
|
16
|
+
/** Render a pre block with an error in it; returns the element to allow for dynamic updating. */
|
17
|
+
export declare function renderErrorPre(container: HTMLElement, error: string): HTMLElement;
|
18
|
+
/** Render a static codeblock. */
|
19
|
+
export declare function renderCodeBlock(container: HTMLElement, source: string, language?: string): HTMLElement;
|
20
|
+
export type ValueRenderContext = 'root' | 'list';
|
21
|
+
/** Prettily render a value into a container with the given settings. */
|
22
|
+
export declare function renderValue(
|
23
|
+
app: App,
|
24
|
+
field: Literal,
|
25
|
+
container: HTMLElement,
|
26
|
+
originFile: string,
|
27
|
+
component: Component,
|
28
|
+
settings: QuerySettings,
|
29
|
+
expandList?: boolean,
|
30
|
+
context?: ValueRenderContext,
|
31
|
+
depth?: number,
|
32
|
+
isInlineFieldLivePreview?: boolean
|
33
|
+
): Promise<void>;
|
@@ -1 +1,17 @@
|
|
1
|
-
|
1
|
+
import type { App } from 'obsidian';
|
2
|
+
import type { FullIndex } from '../../data-index/index.d.d.mts';
|
3
|
+
import type { Query } from '../../query/query.d.d.mts';
|
4
|
+
import type { DataviewSettings } from '../../settings.d.d.mts';
|
5
|
+
import type { DataviewRefreshableRenderer } from '../../ui/refreshable-view.d.d.mts';
|
6
|
+
export declare class DataviewCalendarRenderer extends DataviewRefreshableRenderer {
|
7
|
+
query: Query;
|
8
|
+
container: HTMLElement;
|
9
|
+
index: FullIndex;
|
10
|
+
origin: string;
|
11
|
+
settings: DataviewSettings;
|
12
|
+
app: App;
|
13
|
+
private calendar;
|
14
|
+
constructor(query: Query, container: HTMLElement, index: FullIndex, origin: string, settings: DataviewSettings, app: App);
|
15
|
+
render(): Promise<void>;
|
16
|
+
onClose(): Promise<void>;
|
17
|
+
}
|
@@ -1 +1,42 @@
|
|
1
|
-
|
1
|
+
import type {
|
2
|
+
RangeSet,
|
3
|
+
RangeValue,
|
4
|
+
StateField
|
5
|
+
} from '@codemirror/state';
|
6
|
+
import type {
|
7
|
+
DecorationSet,
|
8
|
+
EditorView,
|
9
|
+
ViewPlugin,
|
10
|
+
ViewUpdate
|
11
|
+
} from '@codemirror/view';
|
12
|
+
import type {
|
13
|
+
App,
|
14
|
+
Component,
|
15
|
+
TFile
|
16
|
+
} from 'obsidian';
|
17
|
+
import type { InlineField } from '../../data-import/inline-field.d.d.mts';
|
18
|
+
import type { DataviewSettings } from '../../settings.d.d.mts';
|
19
|
+
declare class InlineFieldValue extends RangeValue {
|
20
|
+
field: InlineField;
|
21
|
+
constructor(field: InlineField);
|
22
|
+
eq(other: InlineFieldValue): boolean;
|
23
|
+
}
|
24
|
+
/** A state field that stores the inline fields and their positions as a range set. */
|
25
|
+
export declare const inlineFieldsField: StateField<RangeSet<InlineFieldValue>>;
|
26
|
+
/** Create a view plugin that renders inline fields in live preview just as in the reading view. */
|
27
|
+
export declare const replaceInlineFieldsInLivePreview: (app: App, settings: DataviewSettings) => ViewPlugin<{
|
28
|
+
decorations: DecorationSet;
|
29
|
+
component: Component;
|
30
|
+
destroy(): void;
|
31
|
+
buildDecorations(view: EditorView): DecorationSet;
|
32
|
+
update(update: ViewUpdate): void;
|
33
|
+
updateDecorations(view: EditorView): void;
|
34
|
+
removeDeco(start: number, end: number): void;
|
35
|
+
addDeco(start: number, end: number, field: InlineField, file: TFile, view: EditorView): void;
|
36
|
+
}>;
|
37
|
+
/**
|
38
|
+
* A state effect that represents the workspace's layout change.
|
39
|
+
* Mainly intended to detect when the user switches between live preview and source mode.
|
40
|
+
*/
|
41
|
+
export declare const workspaceLayoutChangeEffect: import('@codemirror/state').StateEffectType<null>;
|
42
|
+
export {};
|
@@ -1 +1,28 @@
|
|
1
|
-
|
1
|
+
import type { App } from 'obsidian';
|
2
|
+
import type { FullIndex } from '../../data-index/index.d.d.mts';
|
3
|
+
import type { Field } from '../../expression/field.d.d.mts';
|
4
|
+
import type { DataviewSettings } from '../../settings.d.d.mts';
|
5
|
+
import type { DataviewRefreshableRenderer } from '../../ui/refreshable-view.d.d.mts';
|
6
|
+
/** Refreshable renderer which renders inline instead of in a div. */
|
7
|
+
export declare class DataviewInlineRenderer extends DataviewRefreshableRenderer {
|
8
|
+
field: Field;
|
9
|
+
fieldText: string;
|
10
|
+
container: HTMLElement;
|
11
|
+
target: HTMLElement;
|
12
|
+
index: FullIndex;
|
13
|
+
origin: string;
|
14
|
+
settings: DataviewSettings;
|
15
|
+
app: App;
|
16
|
+
errorbox?: HTMLElement;
|
17
|
+
constructor(
|
18
|
+
field: Field,
|
19
|
+
fieldText: string,
|
20
|
+
container: HTMLElement,
|
21
|
+
target: HTMLElement,
|
22
|
+
index: FullIndex,
|
23
|
+
origin: string,
|
24
|
+
settings: DataviewSettings,
|
25
|
+
app: App
|
26
|
+
);
|
27
|
+
render(): Promise<void>;
|
28
|
+
}
|
@@ -1 +1,23 @@
|
|
1
|
-
|
1
|
+
import type { DataviewApi } from '../../api/plugin-api.d.d.mts';
|
2
|
+
import type { DataviewRefreshableRenderer } from '../../ui/refreshable-view.d.d.mts';
|
3
|
+
export declare class DataviewJSRenderer extends DataviewRefreshableRenderer {
|
4
|
+
api: DataviewApi;
|
5
|
+
script: string;
|
6
|
+
container: HTMLElement;
|
7
|
+
origin: string;
|
8
|
+
static PREAMBLE: string;
|
9
|
+
constructor(api: DataviewApi, script: string, container: HTMLElement, origin: string);
|
10
|
+
render(): Promise<void>;
|
11
|
+
}
|
12
|
+
/** Inline JS renderer accessible using '=$' by default. */
|
13
|
+
export declare class DataviewInlineJSRenderer extends DataviewRefreshableRenderer {
|
14
|
+
api: DataviewApi;
|
15
|
+
script: string;
|
16
|
+
container: HTMLElement;
|
17
|
+
target: HTMLElement;
|
18
|
+
origin: string;
|
19
|
+
static PREAMBLE: string;
|
20
|
+
errorbox?: HTMLElement;
|
21
|
+
constructor(api: DataviewApi, script: string, container: HTMLElement, target: HTMLElement, origin: string);
|
22
|
+
render(): Promise<void>;
|
23
|
+
}
|
@@ -1 +1,25 @@
|
|
1
|
-
|
1
|
+
import type { MarkdownRenderChild } from 'obsidian';
|
2
|
+
import type { h } from 'preact';
|
3
|
+
import type { Literal } from '../../data-model/value.d.d.mts';
|
4
|
+
import type { Query } from '../../query/query.d.d.mts';
|
5
|
+
import type { DataviewInit } from '../../ui/markdown.d.d.mts';
|
6
|
+
export declare function ListGrouping({ items, sourcePath }: {
|
7
|
+
items: Literal[];
|
8
|
+
sourcePath: string;
|
9
|
+
}): h.JSX.Element;
|
10
|
+
export type ListViewState = {
|
11
|
+
state: 'loading';
|
12
|
+
} | {
|
13
|
+
state: 'error';
|
14
|
+
error: string;
|
15
|
+
} | {
|
16
|
+
state: 'ready';
|
17
|
+
items: Literal[];
|
18
|
+
};
|
19
|
+
/** Pure view over list elements. */
|
20
|
+
export declare function ListView({ query, sourcePath }: {
|
21
|
+
query: Query;
|
22
|
+
sourcePath: string;
|
23
|
+
}): h.JSX.Element;
|
24
|
+
export declare function createListView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
25
|
+
export declare function createFixedListView(init: DataviewInit, elements: Literal[], sourcePath: string): MarkdownRenderChild;
|
@@ -1 +1,28 @@
|
|
1
|
-
|
1
|
+
import type { MarkdownRenderChild } from 'obsidian';
|
2
|
+
import type { h } from 'preact';
|
3
|
+
import type { Literal } from '../../data-model/value.d.d.mts';
|
4
|
+
import type { Query } from '../../query/query.d.d.mts';
|
5
|
+
import type { DataviewInit } from '../../ui/markdown.d.d.mts';
|
6
|
+
/** Simple table over headings and corresponding values. */
|
7
|
+
export declare function TableGrouping({ headings, values, sourcePath }: {
|
8
|
+
headings: string[];
|
9
|
+
values: Literal[][];
|
10
|
+
sourcePath: string;
|
11
|
+
}): h.JSX.Element;
|
12
|
+
export type TableViewState = {
|
13
|
+
state: 'loading';
|
14
|
+
} | {
|
15
|
+
state: 'error';
|
16
|
+
error: string;
|
17
|
+
} | {
|
18
|
+
state: 'ready';
|
19
|
+
headings: string[];
|
20
|
+
values: Literal[][];
|
21
|
+
};
|
22
|
+
/** Pure view over list elements. */
|
23
|
+
export declare function TableView({ query, sourcePath }: {
|
24
|
+
query: Query;
|
25
|
+
sourcePath: string;
|
26
|
+
}): h.JSX.Element;
|
27
|
+
export declare function createTableView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
28
|
+
export declare function createFixedTableView(init: DataviewInit, headings: string[], values: Literal[][], sourcePath: string): MarkdownRenderChild;
|
@@ -1 +1,51 @@
|
|
1
|
-
|
1
|
+
import type {
|
2
|
+
MarkdownRenderChild,
|
3
|
+
Vault
|
4
|
+
} from 'obsidian';
|
5
|
+
import type { h } from 'preact';
|
6
|
+
import type {
|
7
|
+
SListItem,
|
8
|
+
STask
|
9
|
+
} from '../../data-model/serialized/markdown.d.d.mts';
|
10
|
+
import type { Grouping } from '../../data-model/value.d.d.mts';
|
11
|
+
import type { Query } from '../../query/query.d.d.mts';
|
12
|
+
import type { DataviewInit } from '../../ui/markdown.d.d.mts';
|
13
|
+
export type TaskViewState = {
|
14
|
+
state: 'loading';
|
15
|
+
} | {
|
16
|
+
state: 'error';
|
17
|
+
error: string;
|
18
|
+
} | {
|
19
|
+
state: 'ready';
|
20
|
+
items: Grouping<SListItem>;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* Pure view over (potentially grouped) tasks and list items which allows for checking/unchecking tasks and manipulating
|
24
|
+
* the task view.
|
25
|
+
*/
|
26
|
+
export declare function TaskView({ query, sourcePath }: {
|
27
|
+
query: Query;
|
28
|
+
sourcePath: string;
|
29
|
+
}): h.JSX.Element;
|
30
|
+
export declare function createTaskView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
31
|
+
export declare function createFixedTaskView(init: DataviewInit, items: Grouping<SListItem>, sourcePath: string): MarkdownRenderChild;
|
32
|
+
/**
|
33
|
+
* Removes tasks from a list if they are already present by being a child of another task. Fixes child pointers.
|
34
|
+
* Retains original order of input list.
|
35
|
+
*/
|
36
|
+
export declare function nestItems(raw: SListItem[]): [SListItem[], Set<string>];
|
37
|
+
/**
|
38
|
+
* Recursively removes tasks from each subgroup if they are already present by being a child of another task.
|
39
|
+
* Fixes child pointers. Retains original order of input list.
|
40
|
+
*/
|
41
|
+
export declare function nestGroups(raw: Grouping<SListItem>): Grouping<SListItem>;
|
42
|
+
/** Set the task completion key on check. */
|
43
|
+
export declare function setTaskCompletion(
|
44
|
+
originalText: string,
|
45
|
+
useEmojiShorthand: boolean,
|
46
|
+
completionKey: string,
|
47
|
+
completionDateFormat: string,
|
48
|
+
complete: boolean
|
49
|
+
): string;
|
50
|
+
/** Rewrite a task with the given completion status and new text. */
|
51
|
+
export declare function rewriteTask(vault: Vault, task: STask, desiredStatus: string, desiredText?: string): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export declare function cyrb53(str: string, seed?: number): number;
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
/** Test-environment-friendly function which fetches the current system locale. */
|
2
|
+
export declare function currentLocale(): string;
|
@@ -1 +1,6 @@
|
|
1
|
-
|
1
|
+
import type { Link } from '../data-model/value.d.d.mts';
|
2
|
+
export declare const IMAGE_EXTENSIONS: Readonly<Set<string>>;
|
3
|
+
/** Determines if the given link points to an embedded image. */
|
4
|
+
export declare function isImageEmbed(link: Link): boolean;
|
5
|
+
/** Extract text of the form 'WxH' or 'W' from the display of a link. */
|
6
|
+
export declare function extractImageDimensions(link: Link): [number, number] | [number] | undefined;
|
@@ -1 +1,44 @@
|
|
1
|
-
|
1
|
+
import type {
|
2
|
+
DateTime,
|
3
|
+
Duration
|
4
|
+
} from 'luxon';
|
5
|
+
import type { Result } from '../api/result.d.d.mts';
|
6
|
+
import type { QuerySettings } from '../settings.d.d.mts';
|
7
|
+
/** Normalize a duration to all of the proper units. */
|
8
|
+
export declare function normalizeDuration(dur: Duration): Duration;
|
9
|
+
/** Strip the time components of a date time object. */
|
10
|
+
export declare function stripTime(dt: DateTime): DateTime;
|
11
|
+
/** Try to extract a YYYYMMDD date from a string. */
|
12
|
+
export declare function extractDate(str: string): DateTime | undefined;
|
13
|
+
/** Get the folder containing the given path (i.e., like computing 'path/..'). */
|
14
|
+
export declare function getParentFolder(path: string): string;
|
15
|
+
/** Get the file name for the file referenced in the given path, by stripping the parent folders. */
|
16
|
+
export declare function getFileName(path: string): string;
|
17
|
+
/** Get the "title" for a file, by stripping other parts of the path as well as the extension. */
|
18
|
+
export declare function getFileTitle(path: string): string;
|
19
|
+
/** Get the extension of a file from the file path. */
|
20
|
+
export declare function getExtension(path: string): string;
|
21
|
+
/** Parse all subtags out of the given tag. I.e., #hello/i/am would yield [#hello/i/am, #hello/i, #hello]. */
|
22
|
+
export declare function extractSubtags(tag: string): string[];
|
23
|
+
/** Try calling the given function; on failure, return the error message. */
|
24
|
+
export declare function tryOrPropogate<T>(func: () => Result<T, string>): Result<T, string>;
|
25
|
+
/** Try asynchronously calling the given function; on failure, return the error message. */
|
26
|
+
export declare function asyncTryOrPropogate<T>(func: () => Promise<Result<T, string>>): Promise<Result<T, string>>;
|
27
|
+
/**
|
28
|
+
* Escape regex characters in a string.
|
29
|
+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions.
|
30
|
+
*/
|
31
|
+
export declare function escapeRegex(str: string): string;
|
32
|
+
/** Convert an arbitrary variable name into something JS/query friendly. */
|
33
|
+
export declare function canonicalizeVarName(name: string): string;
|
34
|
+
/**
|
35
|
+
* Normalizes the text in a header to be something that is actually linkable to. This mimics
|
36
|
+
* how Obsidian does it's normalization, collapsing repeated spaces and stripping out control characters.
|
37
|
+
*/
|
38
|
+
export declare function normalizeHeaderForLink(header: string): string;
|
39
|
+
/** Render a DateTime in a minimal format to save space. */
|
40
|
+
export declare function renderMinimalDate(time: DateTime, settings: QuerySettings, locale: string): string;
|
41
|
+
/** Render a duration in a minimal format to save space. */
|
42
|
+
export declare function renderMinimalDuration(dur: Duration): string;
|
43
|
+
/** Determine if two sets are equal in contents. */
|
44
|
+
export declare function setsEqual<T>(first: Set<T>, second: Set<T>): boolean;
|
@@ -1 +1,30 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation App
|
3
|
+
* Provides a utility to retrieve the Obsidian `App` instance.
|
4
|
+
*/
|
5
|
+
import type { App } from 'obsidian';
|
6
|
+
/**
|
7
|
+
* Wrapper type for storing shared state in the Obsidian app.
|
8
|
+
*/
|
9
|
+
export declare class ValueWrapper<T> {
|
10
|
+
value: T;
|
11
|
+
constructor(value: T);
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* Retrieves the Obsidian `App` instance.
|
15
|
+
*
|
16
|
+
* @returns The `App` instance.
|
17
|
+
* @throws Will throw an error if the `App` instance cannot be found.
|
18
|
+
*
|
19
|
+
* @see {@link https://github.com/mnaoumov/obsidian-codescript-toolkit?tab=readme-ov-file#obsidianapp-module}
|
20
|
+
*/
|
21
|
+
export declare function getApp(): App;
|
22
|
+
/**
|
23
|
+
* Retrieves or creates a shared state wrapper object for a given key in the Obsidian app.
|
24
|
+
*
|
25
|
+
* @param app - The Obsidian app instance.
|
26
|
+
* @param key - The key to store or retrieve the shared state.
|
27
|
+
* @param defaultValue - The default value to use if the shared state does not exist.
|
28
|
+
* @returns The ValueWrapper object that stores the shared state.
|
29
|
+
*/
|
30
|
+
export declare function getObsidianDevUtilsState<T>(app: App, key: string, defaultValue: T): ValueWrapper<T>;
|
@@ -1 +1,54 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation AttachmentPath
|
3
|
+
* Provides utility functions for working with attachment paths.
|
4
|
+
*/
|
5
|
+
import type { App, TFile } from 'obsidian';
|
6
|
+
import type { PathOrFile } from './FileSystem.d.mts';
|
7
|
+
/**
|
8
|
+
* Is overridden wrapper.
|
9
|
+
*/
|
10
|
+
export interface ExtendedWrapper {
|
11
|
+
/**
|
12
|
+
* Is extended.
|
13
|
+
*/
|
14
|
+
isExtended: true;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Get available path for attachments function.
|
18
|
+
*/
|
19
|
+
export type GetAvailablePathForAttachmentsExtendedFn = (filename: string, extension: string, file: null | TFile, shouldSkipFolderCreation?: boolean) => Promise<string>;
|
20
|
+
/**
|
21
|
+
* Retrieves the file path for an attachment within a note.
|
22
|
+
*
|
23
|
+
* @param app - The Obsidian application instance.
|
24
|
+
* @param attachmentPathOrFile - The path of the attachment.
|
25
|
+
* @param notePathOrFile - The path of the note.
|
26
|
+
* @returns A promise that resolves to the file path of the attachment.
|
27
|
+
*/
|
28
|
+
export declare function getAttachmentFilePath(app: App, attachmentPathOrFile: PathOrFile, notePathOrFile: PathOrFile): Promise<string>;
|
29
|
+
/**
|
30
|
+
* Retrieves the attachment folder path for a given note.
|
31
|
+
*
|
32
|
+
* @param app - The Obsidian application instance.
|
33
|
+
* @param notePathOrFile - The path of the note.
|
34
|
+
* @returns A promise that resolves to the attachment folder path.
|
35
|
+
*/
|
36
|
+
export declare function getAttachmentFolderPath(app: App, notePathOrFile: PathOrFile): Promise<string>;
|
37
|
+
/**
|
38
|
+
* Retrieves the available path for attachments.
|
39
|
+
* @param app - The Obsidian application instance.
|
40
|
+
* @param filename - Name of the file.
|
41
|
+
* @param extension - Extension of the file.
|
42
|
+
* @param file - The file to attach to.
|
43
|
+
* @param shouldSkipFolderCreation - Should folder creation be skipped?
|
44
|
+
* @returns A promise that resolves to the available path for attachments.
|
45
|
+
*/
|
46
|
+
export declare function getAvailablePathForAttachments(app: App, filename: string, extension: string, file: null | TFile, shouldSkipFolderCreation: boolean): Promise<string>;
|
47
|
+
/**
|
48
|
+
* Checks if a note has its own attachment folder.
|
49
|
+
*
|
50
|
+
* @param app - The Obsidian application instance.
|
51
|
+
* @param path - The path of the note.
|
52
|
+
* @returns A promise that resolves to a boolean indicating whether the note has its own attachment folder.
|
53
|
+
*/
|
54
|
+
export declare function hasOwnAttachmentFolder(app: App, path: string): Promise<boolean>;
|
@@ -1 +1,60 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation Backlink
|
3
|
+
* Provides utility functions for working with backlinks.
|
4
|
+
*/
|
5
|
+
import type { DataviewInlineApi } from './Dataview.d.mts';
|
6
|
+
import type { PathOrAbstractFile, PathOrFile } from './FileSystem.d.mts';
|
7
|
+
/**
|
8
|
+
* Options for rendering delayed backlinks for a folder.
|
9
|
+
*/
|
10
|
+
export interface RenderDelayedBacklinksForFolderOptions {
|
11
|
+
/**
|
12
|
+
* The DataviewInlineApi instance.
|
13
|
+
*/
|
14
|
+
dv: DataviewInlineApi;
|
15
|
+
/**
|
16
|
+
* The folder path. If not provided, the current file's folder will be used.
|
17
|
+
*/
|
18
|
+
folder?: string;
|
19
|
+
/**
|
20
|
+
* The title for the rendered backlinks. Defaults to "Folder Backlinks".
|
21
|
+
*/
|
22
|
+
title?: string;
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Options for rendering delayed backlinks.
|
26
|
+
*/
|
27
|
+
export interface RenderDelayedBacklinksOptions {
|
28
|
+
/**
|
29
|
+
* The DataviewInlineApi instance.
|
30
|
+
*/
|
31
|
+
dv: DataviewInlineApi;
|
32
|
+
/**
|
33
|
+
* An array of PathOrFile.
|
34
|
+
*/
|
35
|
+
files: PathOrFile[];
|
36
|
+
/**
|
37
|
+
* The title for the rendered backlinks. Defaults to "Backlinks".
|
38
|
+
*/
|
39
|
+
title?: string;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* Renders a backlinks table using the provided DataviewInlineApi and optional array of PathOrAbstractFile.
|
43
|
+
*
|
44
|
+
* @param dv - The DataviewInlineApi instance.
|
45
|
+
* @param pathOrFiles - An optional array of PathOrAbstractFile.
|
46
|
+
* @returns A Promise that resolves when the backlinks table has been rendered.
|
47
|
+
*/
|
48
|
+
export declare function renderBacklinksTable(dv: DataviewInlineApi, pathOrFiles?: PathOrAbstractFile[]): Promise<void>;
|
49
|
+
/**
|
50
|
+
* Renders delayed backlinks.
|
51
|
+
*
|
52
|
+
* @param options - The options for rendering delayed backlinks.
|
53
|
+
*/
|
54
|
+
export declare function renderDelayedBacklinks(options: RenderDelayedBacklinksOptions): void;
|
55
|
+
/**
|
56
|
+
* Renders delayed backlinks for a specific folder.
|
57
|
+
*
|
58
|
+
* @param options - The options for rendering delayed backlinks.
|
59
|
+
*/
|
60
|
+
export declare function renderDelayedBacklinksForFolder(options: RenderDelayedBacklinksForFolderOptions): void;
|
@@ -1 +1,55 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @packageDocumentation Callout
|
3
|
+
* This module provides utility functions for rendering callouts in Dataview.
|
4
|
+
*/
|
5
|
+
import type { ValueProvider } from '../ValueProvider.d.mts';
|
6
|
+
import type { DataviewInlineApi } from './Dataview.d.mts';
|
7
|
+
/**
|
8
|
+
* Enum representing the mode of a callout.
|
9
|
+
*/
|
10
|
+
export declare enum CalloutMode {
|
11
|
+
/** Default mode, with no special behavior. */
|
12
|
+
Default = 0,
|
13
|
+
/** Foldable mode with the callout collapsed. */
|
14
|
+
FoldableCollapsed = 1,
|
15
|
+
/** Foldable mode with the callout expanded. */
|
16
|
+
FoldableExpanded = 2
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Options for rendering a callout block in Dataview.
|
20
|
+
*/
|
21
|
+
export interface RenderCalloutOptions {
|
22
|
+
/**
|
23
|
+
* An optional provider for the content, which can be either a string or a Node.
|
24
|
+
*/
|
25
|
+
contentProvider?: ValueProvider<Node | string | void>;
|
26
|
+
/**
|
27
|
+
* The DataviewInlineApi instance.
|
28
|
+
*/
|
29
|
+
dv: DataviewInlineApi;
|
30
|
+
/**
|
31
|
+
* The header text of the callout, default is an empty string.
|
32
|
+
*/
|
33
|
+
header?: string;
|
34
|
+
/**
|
35
|
+
* The callout mode, default is `CalloutMode.FoldableCollapsed`.
|
36
|
+
*/
|
37
|
+
mode?: CalloutMode;
|
38
|
+
/**
|
39
|
+
* The type of the callout, default is `"NOTE"`.
|
40
|
+
*/
|
41
|
+
type?: string;
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Renders a callout block in Dataview.
|
45
|
+
*
|
46
|
+
* @param options - The options for rendering the callout.
|
47
|
+
*/
|
48
|
+
export declare function renderCallout(options: RenderCalloutOptions): void;
|
49
|
+
/**
|
50
|
+
* Wraps the provided content in blockquote syntax for a callout.
|
51
|
+
*
|
52
|
+
* @param content - The content to wrap.
|
53
|
+
* @returns The content wrapped in blockquote syntax.
|
54
|
+
*/
|
55
|
+
export declare function wrapForCallout(content: string): string;
|