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.
Files changed (275) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/lib/cjs/Debug.d.cts +1 -1
  3. package/dist/lib/cjs/Library.cjs +1 -1
  4. package/dist/lib/cjs/ScriptUtils/CliUtils.d.cts +1 -1
  5. package/dist/lib/cjs/ScriptUtils/ESLint/index.d.cts +2 -2
  6. package/dist/lib/cjs/ScriptUtils/Fs.d.cts +1 -1
  7. package/dist/lib/cjs/ScriptUtils/JSON.d.cts +1 -1
  8. package/dist/lib/cjs/ScriptUtils/Npm.d.cts +1 -1
  9. package/dist/lib/cjs/ScriptUtils/Root.d.cts +1 -1
  10. package/dist/lib/cjs/ScriptUtils/esbuild/ObsidianPluginBuilder.d.cts +1 -1
  11. package/dist/lib/cjs/ScriptUtils/esbuild/index.d.cts +9 -9
  12. package/dist/lib/cjs/ScriptUtils/index.d.cts +17 -17
  13. package/dist/lib/cjs/String.d.cts +1 -1
  14. package/dist/lib/cjs/Transformers/DateTransformer.d.cts +1 -1
  15. package/dist/lib/cjs/Transformers/DurationTransformer.d.cts +1 -1
  16. package/dist/lib/cjs/Transformers/GroupTransformer.d.cts +1 -1
  17. package/dist/lib/cjs/Transformers/SkipPrivatePropertyTransformer.d.cts +1 -1
  18. package/dist/lib/cjs/Transformers/TypedTransformer.d.cts +1 -1
  19. package/dist/lib/cjs/Transformers/index.d.cts +6 -6
  20. package/dist/lib/cjs/ValueProvider.d.cts +1 -1
  21. package/dist/lib/cjs/codemirror/index.d.cts +1 -1
  22. package/dist/lib/cjs/index.d.cts +20 -20
  23. package/dist/lib/cjs/obsidian/@types/Dataview/api/data-array.d.cts +1 -1
  24. package/dist/lib/cjs/obsidian/@types/Dataview/api/extensions.d.cts +1 -1
  25. package/dist/lib/cjs/obsidian/@types/Dataview/api/inline-api.d.cts +9 -9
  26. package/dist/lib/cjs/obsidian/@types/Dataview/api/plugin-api.d.cts +10 -10
  27. package/dist/lib/cjs/obsidian/@types/Dataview/data-import/csv.d.cts +1 -1
  28. package/dist/lib/cjs/obsidian/@types/Dataview/data-import/inline-field.d.cts +1 -1
  29. package/dist/lib/cjs/obsidian/@types/Dataview/data-import/markdown-file.d.cts +3 -3
  30. package/dist/lib/cjs/obsidian/@types/Dataview/data-import/persister.d.cts +1 -1
  31. package/dist/lib/cjs/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.cts +1 -1
  32. package/dist/lib/cjs/obsidian/@types/Dataview/data-index/index.d.cts +5 -5
  33. package/dist/lib/cjs/obsidian/@types/Dataview/data-index/resolver.d.cts +4 -4
  34. package/dist/lib/cjs/obsidian/@types/Dataview/data-model/markdown.d.cts +4 -4
  35. package/dist/lib/cjs/obsidian/@types/Dataview/data-model/serialized/markdown.d.cts +1 -1
  36. package/dist/lib/cjs/obsidian/@types/Dataview/data-model/value.d.cts +1 -1
  37. package/dist/lib/cjs/obsidian/@types/Dataview/expression/binaryop.d.cts +4 -4
  38. package/dist/lib/cjs/obsidian/@types/Dataview/expression/context.d.cts +6 -6
  39. package/dist/lib/cjs/obsidian/@types/Dataview/expression/field.d.cts +1 -1
  40. package/dist/lib/cjs/obsidian/@types/Dataview/expression/functions.d.cts +3 -3
  41. package/dist/lib/cjs/obsidian/@types/Dataview/expression/parse.d.cts +4 -4
  42. package/dist/lib/cjs/obsidian/@types/Dataview/index.d.cts +11 -11
  43. package/dist/lib/cjs/obsidian/@types/Dataview/main.d.cts +4 -4
  44. package/dist/lib/cjs/obsidian/@types/Dataview/query/engine.d.cts +9 -9
  45. package/dist/lib/cjs/obsidian/@types/Dataview/query/parse.d.cts +4 -4
  46. package/dist/lib/cjs/obsidian/@types/Dataview/query/query.d.cts +2 -2
  47. package/dist/lib/cjs/obsidian/@types/Dataview/typings/obsidian-ex.d.cts +1 -1
  48. package/dist/lib/cjs/obsidian/@types/Dataview/ui/export/markdown.d.cts +3 -3
  49. package/dist/lib/cjs/obsidian/@types/Dataview/ui/lp-render.d.cts +3 -3
  50. package/dist/lib/cjs/obsidian/@types/Dataview/ui/markdown.d.cts +3 -3
  51. package/dist/lib/cjs/obsidian/@types/Dataview/ui/refreshable-view.d.cts +2 -2
  52. package/dist/lib/cjs/obsidian/@types/Dataview/ui/render.d.cts +2 -2
  53. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/calendar-view.d.cts +4 -4
  54. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.cts +2 -2
  55. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/inline-view.d.cts +4 -4
  56. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/js-view.d.cts +2 -2
  57. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/list-view.d.cts +3 -3
  58. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/table-view.d.cts +3 -3
  59. package/dist/lib/cjs/obsidian/@types/Dataview/ui/views/task-view.d.cts +4 -4
  60. package/dist/lib/cjs/obsidian/@types/Dataview/util/media.d.cts +1 -1
  61. package/dist/lib/cjs/obsidian/@types/Dataview/util/normalize.d.cts +2 -2
  62. package/dist/lib/cjs/obsidian/AttachmentPath.d.cts +1 -1
  63. package/dist/lib/cjs/obsidian/Backlink.d.cts +2 -2
  64. package/dist/lib/cjs/obsidian/Callout.d.cts +2 -2
  65. package/dist/lib/cjs/obsidian/Components/DateComponent.d.cts +1 -1
  66. package/dist/lib/cjs/obsidian/Components/DateTimeComponent.d.cts +1 -1
  67. package/dist/lib/cjs/obsidian/Components/EmailComponent.d.cts +1 -1
  68. package/dist/lib/cjs/obsidian/Components/FileComponent.d.cts +1 -1
  69. package/dist/lib/cjs/obsidian/Components/MonthComponent.d.cts +1 -1
  70. package/dist/lib/cjs/obsidian/Components/MultipleDropdownComponent.d.cts +5 -5
  71. package/dist/lib/cjs/obsidian/Components/MultipleEmailComponent.d.cts +1 -1
  72. package/dist/lib/cjs/obsidian/Components/MultipleFileComponent.d.cts +1 -1
  73. package/dist/lib/cjs/obsidian/Components/MultipleTextComponent.d.cts +5 -5
  74. package/dist/lib/cjs/obsidian/Components/NumberComponent.d.cts +1 -1
  75. package/dist/lib/cjs/obsidian/Components/TimeComponent.d.cts +1 -1
  76. package/dist/lib/cjs/obsidian/Components/TypedRangeTextComponent.d.cts +1 -1
  77. package/dist/lib/cjs/obsidian/Components/TypedTextComponent.d.cts +6 -6
  78. package/dist/lib/cjs/obsidian/Components/UrlComponent.d.cts +1 -1
  79. package/dist/lib/cjs/obsidian/Components/ValidatorComponent.d.cts +1 -1
  80. package/dist/lib/cjs/obsidian/Components/ValueComponentWithChangeTracking.d.cts +2 -2
  81. package/dist/lib/cjs/obsidian/Components/WeekComponent.d.cts +1 -1
  82. package/dist/lib/cjs/obsidian/Components/index.d.cts +17 -17
  83. package/dist/lib/cjs/obsidian/Dataview.d.cts +6 -6
  84. package/dist/lib/cjs/obsidian/DataviewLink.d.cts +2 -2
  85. package/dist/lib/cjs/obsidian/FileChange.d.cts +3 -3
  86. package/dist/lib/cjs/obsidian/FileManager.d.cts +4 -4
  87. package/dist/lib/cjs/obsidian/Link.d.cts +3 -3
  88. package/dist/lib/cjs/obsidian/Logger.d.cts +1 -1
  89. package/dist/lib/cjs/obsidian/Loop.d.cts +1 -1
  90. package/dist/lib/cjs/obsidian/MarkdownCodeBlockProcessor.d.cts +1 -1
  91. package/dist/lib/cjs/obsidian/MetadataCache.d.cts +3 -3
  92. package/dist/lib/cjs/obsidian/Modals/ModalBase.d.cts +1 -1
  93. package/dist/lib/cjs/obsidian/Modals/Prompt.d.cts +2 -2
  94. package/dist/lib/cjs/obsidian/Modals/index.d.cts +5 -5
  95. package/dist/lib/cjs/obsidian/Plugin/EmptySettings.d.cts +1 -1
  96. package/dist/lib/cjs/obsidian/Plugin/PluginBase.d.cts +3 -3
  97. package/dist/lib/cjs/obsidian/Plugin/PluginSettingsBase.d.cts +1 -1
  98. package/dist/lib/cjs/obsidian/Plugin/PluginSettingsTabBase.d.cts +5 -5
  99. package/dist/lib/cjs/obsidian/Plugin/index.d.cts +8 -8
  100. package/dist/lib/cjs/obsidian/Queue.d.cts +1 -1
  101. package/dist/lib/cjs/obsidian/Reference.d.cts +1 -1
  102. package/dist/lib/cjs/obsidian/SettingEx.d.cts +13 -13
  103. package/dist/lib/cjs/obsidian/Vault.d.cts +3 -3
  104. package/dist/lib/cjs/obsidian/VaultEx.d.cts +1 -1
  105. package/dist/lib/cjs/obsidian/index.d.cts +29 -29
  106. package/dist/lib/esm/@types/debug.d.mts +16 -1
  107. package/dist/lib/esm/Async.d.mts +153 -1
  108. package/dist/lib/esm/Blob.d.mts +40 -1
  109. package/dist/lib/esm/CssClass.d.mts +97 -1
  110. package/dist/lib/esm/Debug.d.mts +41 -1
  111. package/dist/lib/esm/DebugController.d.mts +85 -1
  112. package/dist/lib/esm/Enum.d.mts +20 -1
  113. package/dist/lib/esm/Error.d.mts +45 -1
  114. package/dist/lib/esm/Function.d.mts +28 -1
  115. package/dist/lib/esm/HTMLElement.d.mts +49 -1
  116. package/dist/lib/esm/Library.d.mts +16 -1
  117. package/dist/lib/esm/Library.mjs +1 -1
  118. package/dist/lib/esm/Object.d.mts +211 -1
  119. package/dist/lib/esm/Path.d.mts +133 -1
  120. package/dist/lib/esm/RegExp.d.mts +18 -1
  121. package/dist/lib/esm/ScriptUtils/CliUtils.d.mts +70 -1
  122. package/dist/lib/esm/ScriptUtils/CodeGenerator.d.mts +12 -1
  123. package/dist/lib/esm/ScriptUtils/ESLint/@types/@guardian__eslint-plugin-tsdoc-required.d.mts +13 -1
  124. package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-modules-newlines.d.mts +13 -1
  125. package/dist/lib/esm/ScriptUtils/ESLint/@types/eslint-plugin-verify-tsdoc.d.mts +13 -1
  126. package/dist/lib/esm/ScriptUtils/ESLint/ESLint.d.mts +13 -1
  127. package/dist/lib/esm/ScriptUtils/ESLint/eslint.config.d.mts +16 -1
  128. package/dist/lib/esm/ScriptUtils/ESLint/index.d.mts +2 -1
  129. package/dist/lib/esm/ScriptUtils/Exec.d.mts +83 -1
  130. package/dist/lib/esm/ScriptUtils/Fs.d.mts +72 -1
  131. package/dist/lib/esm/ScriptUtils/JSON.d.mts +64 -1
  132. package/dist/lib/esm/ScriptUtils/NodeModules.d.mts +14 -1
  133. package/dist/lib/esm/ScriptUtils/Npm.d.mts +151 -1
  134. package/dist/lib/esm/ScriptUtils/NpmPublish.d.mts +9 -1
  135. package/dist/lib/esm/ScriptUtils/ObsidianDevUtilsRepoPaths.d.mts +106 -1
  136. package/dist/lib/esm/ScriptUtils/Root.d.mts +67 -1
  137. package/dist/lib/esm/ScriptUtils/build.d.mts +41 -1
  138. package/dist/lib/esm/ScriptUtils/cli.d.mts +14 -1
  139. package/dist/lib/esm/ScriptUtils/esbuild/Dependency.d.mts +18 -1
  140. package/dist/lib/esm/ScriptUtils/esbuild/ObsidianPluginBuilder.d.mts +53 -1
  141. package/dist/lib/esm/ScriptUtils/esbuild/changeExtensionPlugin.d.mts +12 -1
  142. package/dist/lib/esm/ScriptUtils/esbuild/copyToObsidianPluginsFolderPlugin.d.mts +18 -1
  143. package/dist/lib/esm/ScriptUtils/esbuild/fixEsmPlugin.d.mts +11 -1
  144. package/dist/lib/esm/ScriptUtils/esbuild/fixSourceMapsPlugin.d.mts +17 -1
  145. package/dist/lib/esm/ScriptUtils/esbuild/index.d.mts +9 -1
  146. package/dist/lib/esm/ScriptUtils/esbuild/preprocessPlugin.d.mts +23 -1
  147. package/dist/lib/esm/ScriptUtils/esbuild/renameCssPlugin.d.mts +8 -1
  148. package/dist/lib/esm/ScriptUtils/esbuild/svelteWrapperPlugin.d.mts +8 -1
  149. package/dist/lib/esm/ScriptUtils/format.d.mts +10 -1
  150. package/dist/lib/esm/ScriptUtils/index.d.mts +17 -1
  151. package/dist/lib/esm/ScriptUtils/spellcheck.d.mts +14 -1
  152. package/dist/lib/esm/ScriptUtils/version.d.mts +171 -1
  153. package/dist/lib/esm/String.d.mts +138 -1
  154. package/dist/lib/esm/Transformers/DateTransformer.d.mts +35 -1
  155. package/dist/lib/esm/Transformers/DurationTransformer.d.mts +34 -1
  156. package/dist/lib/esm/Transformers/GroupTransformer.d.mts +65 -1
  157. package/dist/lib/esm/Transformers/SkipPrivatePropertyTransformer.d.mts +32 -1
  158. package/dist/lib/esm/Transformers/Transformer.d.mts +67 -1
  159. package/dist/lib/esm/Transformers/TypedTransformer.d.mts +37 -1
  160. package/dist/lib/esm/Transformers/index.d.mts +6 -1
  161. package/dist/lib/esm/ValueProvider.d.mts +22 -1
  162. package/dist/lib/esm/codemirror/StateFieldSpec.d.mts +68 -1
  163. package/dist/lib/esm/codemirror/index.d.mts +1 -1
  164. package/dist/lib/esm/index.d.mts +20 -1
  165. package/dist/lib/esm/obsidian/@types/Dataview/api/data-array.d.mts +136 -1
  166. package/dist/lib/esm/obsidian/@types/Dataview/api/extensions.d.mts +15 -1
  167. package/dist/lib/esm/obsidian/@types/Dataview/api/inline-api.d.mts +186 -1
  168. package/dist/lib/esm/obsidian/@types/Dataview/api/plugin-api.d.mts +209 -1
  169. package/dist/lib/esm/obsidian/@types/Dataview/api/result.d.mts +38 -1
  170. package/dist/lib/esm/obsidian/@types/Dataview/data-import/common.d.mts +3 -1
  171. package/dist/lib/esm/obsidian/@types/Dataview/data-import/csv.d.mts +3 -1
  172. package/dist/lib/esm/obsidian/@types/Dataview/data-import/inline-field.d.mts +42 -1
  173. package/dist/lib/esm/obsidian/@types/Dataview/data-import/markdown-file.d.mts +52 -1
  174. package/dist/lib/esm/obsidian/@types/Dataview/data-import/persister.d.mts +32 -1
  175. package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-entry.d.mts +1 -1
  176. package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.mts +6 -1
  177. package/dist/lib/esm/obsidian/@types/Dataview/data-import/web-worker/import-manager.d.mts +37 -1
  178. package/dist/lib/esm/obsidian/@types/Dataview/data-index/index.d.mts +186 -1
  179. package/dist/lib/esm/obsidian/@types/Dataview/data-index/resolver.d.mts +23 -1
  180. package/dist/lib/esm/obsidian/@types/Dataview/data-index/source.d.mts +71 -1
  181. package/dist/lib/esm/obsidian/@types/Dataview/data-model/markdown.d.mts +115 -1
  182. package/dist/lib/esm/obsidian/@types/Dataview/data-model/serialized/markdown.d.mts +106 -1
  183. package/dist/lib/esm/obsidian/@types/Dataview/data-model/transferable.d.mts +7 -1
  184. package/dist/lib/esm/obsidian/@types/Dataview/data-model/value.d.mts +175 -1
  185. package/dist/lib/esm/obsidian/@types/Dataview/expression/binaryop.d.mts +43 -1
  186. package/dist/lib/esm/obsidian/@types/Dataview/expression/context.d.mts +49 -1
  187. package/dist/lib/esm/obsidian/@types/Dataview/expression/field.d.mts +82 -1
  188. package/dist/lib/esm/obsidian/@types/Dataview/expression/functions.d.mts +149 -1
  189. package/dist/lib/esm/obsidian/@types/Dataview/expression/parse.d.mts +163 -1
  190. package/dist/lib/esm/obsidian/@types/Dataview/index.d.mts +55 -1
  191. package/dist/lib/esm/obsidian/@types/Dataview/main.d.mts +52 -1
  192. package/dist/lib/esm/obsidian/@types/Dataview/query/engine.d.mts +103 -1
  193. package/dist/lib/esm/obsidian/@types/Dataview/query/parse.d.mts +44 -1
  194. package/dist/lib/esm/obsidian/@types/Dataview/query/query.d.mts +95 -1
  195. package/dist/lib/esm/obsidian/@types/Dataview/settings.d.mts +60 -1
  196. package/dist/lib/esm/obsidian/@types/Dataview/typings/obsidian-ex.d.mts +28 -1
  197. package/dist/lib/esm/obsidian/@types/Dataview/typings/workers.d.mts +4 -1
  198. package/dist/lib/esm/obsidian/@types/Dataview/ui/export/markdown.d.mts +15 -1
  199. package/dist/lib/esm/obsidian/@types/Dataview/ui/lp-render.d.mts +37 -1
  200. package/dist/lib/esm/obsidian/@types/Dataview/ui/markdown.d.mts +86 -1
  201. package/dist/lib/esm/obsidian/@types/Dataview/ui/refreshable-view.d.mts +18 -1
  202. package/dist/lib/esm/obsidian/@types/Dataview/ui/render.d.mts +33 -1
  203. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/calendar-view.d.mts +17 -1
  204. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.mts +42 -1
  205. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/inline-view.d.mts +28 -1
  206. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/js-view.d.mts +23 -1
  207. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/list-view.d.mts +25 -1
  208. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/table-view.d.mts +28 -1
  209. package/dist/lib/esm/obsidian/@types/Dataview/ui/views/task-view.d.mts +51 -1
  210. package/dist/lib/esm/obsidian/@types/Dataview/util/hash.d.mts +1 -1
  211. package/dist/lib/esm/obsidian/@types/Dataview/util/locale.d.mts +2 -1
  212. package/dist/lib/esm/obsidian/@types/Dataview/util/media.d.mts +6 -1
  213. package/dist/lib/esm/obsidian/@types/Dataview/util/normalize.d.mts +44 -1
  214. package/dist/lib/esm/obsidian/App.d.mts +30 -1
  215. package/dist/lib/esm/obsidian/AttachmentPath.d.mts +54 -1
  216. package/dist/lib/esm/obsidian/Backlink.d.mts +60 -1
  217. package/dist/lib/esm/obsidian/Callout.d.mts +55 -1
  218. package/dist/lib/esm/obsidian/Components/DateComponent.d.mts +36 -1
  219. package/dist/lib/esm/obsidian/Components/DateTimeComponent.d.mts +36 -1
  220. package/dist/lib/esm/obsidian/Components/EmailComponent.d.mts +29 -1
  221. package/dist/lib/esm/obsidian/Components/FileComponent.d.mts +41 -1
  222. package/dist/lib/esm/obsidian/Components/MonthComponent.d.mts +49 -1
  223. package/dist/lib/esm/obsidian/Components/MultipleDropdownComponent.d.mts +73 -1
  224. package/dist/lib/esm/obsidian/Components/MultipleEmailComponent.d.mts +36 -1
  225. package/dist/lib/esm/obsidian/Components/MultipleFileComponent.d.mts +41 -1
  226. package/dist/lib/esm/obsidian/Components/MultipleTextComponent.d.mts +67 -1
  227. package/dist/lib/esm/obsidian/Components/NumberComponent.d.mts +29 -1
  228. package/dist/lib/esm/obsidian/Components/TimeComponent.d.mts +37 -1
  229. package/dist/lib/esm/obsidian/Components/TypedRangeTextComponent.d.mts +31 -1
  230. package/dist/lib/esm/obsidian/Components/TypedTextComponent.d.mts +84 -1
  231. package/dist/lib/esm/obsidian/Components/UrlComponent.d.mts +29 -1
  232. package/dist/lib/esm/obsidian/Components/ValidatorComponent.d.mts +22 -1
  233. package/dist/lib/esm/obsidian/Components/ValueComponentWithChangeTracking.d.mts +17 -1
  234. package/dist/lib/esm/obsidian/Components/WeekComponent.d.mts +49 -1
  235. package/dist/lib/esm/obsidian/Components/index.d.mts +17 -1
  236. package/dist/lib/esm/obsidian/Dataview.d.mts +215 -1
  237. package/dist/lib/esm/obsidian/DataviewLink.d.mts +23 -1
  238. package/dist/lib/esm/obsidian/FileChange.d.mts +68 -1
  239. package/dist/lib/esm/obsidian/FileManager.d.mts +38 -1
  240. package/dist/lib/esm/obsidian/FileSystem.d.mts +185 -1
  241. package/dist/lib/esm/obsidian/Frontmatter.d.mts +69 -1
  242. package/dist/lib/esm/obsidian/Link.d.mts +366 -1
  243. package/dist/lib/esm/obsidian/Logger.d.mts +13 -1
  244. package/dist/lib/esm/obsidian/Loop.d.mts +36 -1
  245. package/dist/lib/esm/obsidian/Markdown.d.mts +24 -1
  246. package/dist/lib/esm/obsidian/MarkdownCodeBlockProcessor.d.mts +23 -1
  247. package/dist/lib/esm/obsidian/MarkdownView.d.mts +12 -1
  248. package/dist/lib/esm/obsidian/MetadataCache.d.mts +87 -1
  249. package/dist/lib/esm/obsidian/Modals/Alert.d.mts +39 -1
  250. package/dist/lib/esm/obsidian/Modals/Confirm.d.mts +43 -1
  251. package/dist/lib/esm/obsidian/Modals/ModalBase.d.mts +35 -1
  252. package/dist/lib/esm/obsidian/Modals/Prompt.d.mts +50 -1
  253. package/dist/lib/esm/obsidian/Modals/SelectItem.d.mts +41 -1
  254. package/dist/lib/esm/obsidian/Modals/index.d.mts +5 -1
  255. package/dist/lib/esm/obsidian/ObsidianSettings.d.mts +17 -1
  256. package/dist/lib/esm/obsidian/Pdf.d.mts +24 -1
  257. package/dist/lib/esm/obsidian/Plugin/EmptySettings.d.mts +14 -1
  258. package/dist/lib/esm/obsidian/Plugin/ObsidianPluginRepoPaths.d.mts +53 -1
  259. package/dist/lib/esm/obsidian/Plugin/Plugin.d.mts +21 -1
  260. package/dist/lib/esm/obsidian/Plugin/PluginBase.d.mts +108 -1
  261. package/dist/lib/esm/obsidian/Plugin/PluginContext.d.mts +12 -1
  262. package/dist/lib/esm/obsidian/Plugin/PluginId.d.mts +20 -1
  263. package/dist/lib/esm/obsidian/Plugin/PluginSettingsBase.d.mts +31 -1
  264. package/dist/lib/esm/obsidian/Plugin/PluginSettingsTabBase.d.mts +99 -1
  265. package/dist/lib/esm/obsidian/Plugin/index.d.mts +8 -1
  266. package/dist/lib/esm/obsidian/Queue.d.mts +30 -1
  267. package/dist/lib/esm/obsidian/Reference.d.mts +21 -1
  268. package/dist/lib/esm/obsidian/RenameDeleteHandler.d.mts +49 -1
  269. package/dist/lib/esm/obsidian/ResourceUrl.d.mts +14 -1
  270. package/dist/lib/esm/obsidian/SettingEx.d.mts +124 -1
  271. package/dist/lib/esm/obsidian/Vault.d.mts +130 -1
  272. package/dist/lib/esm/obsidian/VaultEx.d.mts +27 -1
  273. package/dist/lib/esm/obsidian/index.d.mts +29 -1
  274. package/dist/lib/esm/url.d.mts +11 -1
  275. package/package.json +1 -1
@@ -1 +1,68 @@
1
- export * from '../../cjs/codemirror/StateFieldSpec.cjs';
1
+ /**
2
+ * @packageDocumentation StateFieldSpec
3
+ * Contains a specification for a state field.
4
+ */
5
+ import type { EditorState, Extension, StateField, Transaction } from '@codemirror/state';
6
+ /**
7
+ * A specification for a state field.
8
+ */
9
+ export interface StateFieldSpec<Value> {
10
+ /**
11
+ * Compare two values of the field, returning `true` when they are
12
+ * the same. This is used to avoid recomputing facets that depend
13
+ * on the field when its value did not change. Defaults to using
14
+ * `===`.
15
+ *
16
+ * @param a - The first value to compare.
17
+ * @param b - The second value to compare.
18
+ * @returns `true` if the values are the same, `false` otherwise.
19
+ */
20
+ compare?: (a: Value, b: Value) => boolean;
21
+ /**
22
+ * Creates the initial value for the field when a state is created.
23
+ *
24
+ * @param state - The state to create the value for.
25
+ * @returns The initial value for the field.
26
+ */
27
+ create: (state: EditorState) => Value;
28
+ /**
29
+ * A function that deserializes the JSON representation of this
30
+ * field's content.
31
+ *
32
+ * @param json - The JSON representation of the value.
33
+ * @param state - The state to deserialize the value for.
34
+ * @returns The deserialized value.
35
+ */
36
+ fromJSON?: (json: unknown, state: EditorState) => Value;
37
+ /**
38
+ * Provide extensions based on this field. The given function will
39
+ * be called once with the initialized field. It will usually want
40
+ * to call some facet's [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method to
41
+ * create facet inputs from this field, but can also return other
42
+ * extensions that should be enabled when the field is present in a
43
+ * configuration.
44
+ *
45
+ * @param field - The initialized field.
46
+ * @returns The extensions to enable when the field is present in a configuration.
47
+ */
48
+ provide?: (field: StateField<Value>) => Extension;
49
+ /**
50
+ * A function used to serialize this field's content to JSON. Only
51
+ * necessary when this field is included in the argument to
52
+ * [`EditorState.toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON).
53
+ *
54
+ * @param value - The value to serialize.
55
+ * @param state - The state to serialize the value for.
56
+ * @returns The serialized value.
57
+ */
58
+ toJSON?: (value: Value, state: EditorState) => unknown;
59
+ /**
60
+ * Compute a new value from the field's previous value and a
61
+ * [transaction](https://codemirror.net/6/docs/ref/#state.Transaction).
62
+ *
63
+ * @param value - The previous value of the field.
64
+ * @param transaction - The transaction to compute the new value from.
65
+ * @returns The new value of the field.
66
+ */
67
+ update: (value: Value, transaction: Transaction) => Value;
68
+ }
@@ -1 +1 @@
1
- export * from '../../cjs/codemirror/index.cjs';
1
+ export * as StateFieldSpec from './StateFieldSpec.ts';
@@ -1 +1,20 @@
1
- export * from '../cjs/index.cjs';
1
+ export * as Async from './Async.ts';
2
+ export * as Blob from './Blob.ts';
3
+ export * as codemirror from './codemirror/index.ts';
4
+ export * as CssClass from './CssClass.ts';
5
+ export * as Debug from './Debug.ts';
6
+ export * as DebugController from './DebugController.ts';
7
+ export * as Enum from './Enum.ts';
8
+ export * as Error from './Error.ts';
9
+ export * as Function from './Function.ts';
10
+ export * as HTMLElement from './HTMLElement.ts';
11
+ export * as Library from './Library.ts';
12
+ export * as Object from './Object.ts';
13
+ export * as obsidian from './obsidian/index.ts';
14
+ export * as Path from './Path.ts';
15
+ export * as RegExp from './RegExp.ts';
16
+ export * as ScriptUtils from './ScriptUtils/index.ts';
17
+ export * as String from './String.ts';
18
+ export * as Transformers from './Transformers/index.ts';
19
+ export * as url from './url.ts';
20
+ export * as ValueProvider from './ValueProvider.ts';
@@ -1 +1,136 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/api/data-array.cjs';
1
+ import type { QuerySettings } from '../settings.d.d.mts';
2
+ /** A function which maps an array element to some value. */
3
+ export type ArrayFunc<T, O> = (elem: T, index: number, arr: T[]) => O;
4
+ /** A function which compares two types. */
5
+ export type ArrayComparator<T> = (a: T, b: T) => number;
6
+ /** Finds the value of the lowest value type in a grouping. */
7
+ export type LowestKey<T> = T extends {
8
+ key: any;
9
+ rows: any;
10
+ } ? LowestKey<T['rows'][0]>
11
+ : T;
12
+ /** A ridiculous type which properly types the result of the 'groupIn' command. */
13
+ export type Ingrouped<U, T> = T extends {
14
+ key: any;
15
+ rows: any;
16
+ } ? {
17
+ key: T['key'];
18
+ rows: Ingrouped<U, T['rows'][0]>;
19
+ }
20
+ : {
21
+ key: U;
22
+ rows: T[];
23
+ };
24
+ /**
25
+ * Proxied interface which allows manipulating array-based data. All functions on a data array produce a NEW array
26
+ * (i.e., the arrays are immutable).
27
+ */
28
+ export interface DataArray<T> {
29
+ /** The total number of elements in the array. */
30
+ length: number;
31
+ /** Filter the data array down to just elements which match the given predicate. */
32
+ where(predicate: ArrayFunc<T, boolean>): DataArray<T>;
33
+ /** Alias for 'where' for people who want array semantics. */
34
+ filter(predicate: ArrayFunc<T, boolean>): DataArray<T>;
35
+ /** Map elements in the data array by applying a function to each. */
36
+ map<U>(f: ArrayFunc<T, U>): DataArray<U>;
37
+ /** Map elements in the data array by applying a function to each, then flatten the results to produce a new array. */
38
+ flatMap<U>(f: ArrayFunc<T, U[]>): DataArray<U>;
39
+ /** Mutably change each value in the array, returning the same array which you can further chain off of. */
40
+ mutate(f: ArrayFunc<T, void>): DataArray<T>;
41
+ /** Limit the total number of entries in the array to the given value. */
42
+ limit(count: number): DataArray<T>;
43
+ /**
44
+ * Take a slice of the array. If `start` is undefined, it is assumed to be 0; if `end` is undefined, it is assumed
45
+ * to be the end of the array.
46
+ */
47
+ slice(start?: number, end?: number): DataArray<T>;
48
+ /** Concatenate the values in this data array with those of another iterable / data array / array. */
49
+ concat(other: Iterable<T>): DataArray<T>;
50
+ /** Return the first index of the given (optionally starting the search) */
51
+ indexOf(element: T, fromIndex?: number): number;
52
+ /** Return the first element that satisfies the given predicate. */
53
+ find(pred: ArrayFunc<T, boolean>): T | undefined;
54
+ /** Find the index of the first element that satisfies the given predicate. Returns -1 if nothing was found. */
55
+ findIndex(pred: ArrayFunc<T, boolean>, fromIndex?: number): number;
56
+ /** Returns true if the array contains the given element, and false otherwise. */
57
+ includes(element: T): boolean;
58
+ /**
59
+ * Return a string obtained by converting each element in the array to a string, and joining it with the
60
+ * given separator (which defaults to ', ').
61
+ */
62
+ join(sep?: string): string;
63
+ /**
64
+ * Return a sorted array sorted by the given key; an optional comparator can be provided, which will
65
+ * be used to compare the keys in lieu of the default dataview comparator.
66
+ */
67
+ sort<U>(key: ArrayFunc<T, U>, direction?: 'asc' | 'desc', comparator?: ArrayComparator<U>): DataArray<T>;
68
+ /**
69
+ * Mutably modify the current array with an in place sort; this is less flexible than a regular sort in exchange
70
+ * for being a little more performant. Only use this is performance is a serious consideration.
71
+ */
72
+ sortInPlace<U>(key: (v: T) => U, direction?: 'asc' | 'desc', comparator?: ArrayComparator<U>): DataArray<T>;
73
+ /**
74
+ * Return an array where elements are grouped by the given key; the resulting array will have objects of the form
75
+ * { key: <key value>, rows: DataArray }.
76
+ */
77
+ groupBy<U>(key: ArrayFunc<T, U>, comparator?: ArrayComparator<U>): DataArray<{
78
+ key: U;
79
+ rows: DataArray<T>;
80
+ }>;
81
+ /**
82
+ * If the array is not grouped, groups it as `groupBy` does; otherwise, groups the elements inside each current
83
+ * group. This allows for top-down recursive grouping which may be easier than bottom-up grouping.
84
+ */
85
+ groupIn<U>(key: ArrayFunc<LowestKey<T>, U>, comparator?: ArrayComparator<U>): DataArray<Ingrouped<U, T>>;
86
+ /**
87
+ * Return distinct entries. If a key is provided, then rows with distinct keys are returned.
88
+ */
89
+ distinct<U>(key?: ArrayFunc<T, U>, comparator?: ArrayComparator<U>): DataArray<T>;
90
+ /** Return true if the predicate is true for all values. */
91
+ every(f: ArrayFunc<T, boolean>): boolean;
92
+ /** Return true if the predicate is true for at least one value. */
93
+ some(f: ArrayFunc<T, boolean>): boolean;
94
+ /** Return true if the predicate is FALSE for all values. */
95
+ none(f: ArrayFunc<T, boolean>): boolean;
96
+ /** Return the first element in the data array. Returns undefined if the array is empty. */
97
+ first(): T;
98
+ /** Return the last element in the data array. Returns undefined if the array is empty. */
99
+ last(): T;
100
+ /** Map every element in this data array to the given key, and then flatten it.*/
101
+ to(key: string): DataArray<any>;
102
+ /** Map every element in this data array to the given key; unlike to(), does not flatten the result. */
103
+ into(key: string): DataArray<any>;
104
+ /**
105
+ * Recursively expand the given key, flattening a tree structure based on the key into a flat array. Useful for handling
106
+ * hierarchical data like tasks with 'subtasks'.
107
+ */
108
+ expand(key: string): DataArray<any>;
109
+ /** Run a lambda on each element in the array. */
110
+ forEach(f: ArrayFunc<T, void>): void;
111
+ /** Calculate the sum of the elements in the array. */
112
+ sum(): number;
113
+ /** Calculate the average of the elements in the array. */
114
+ avg(): number;
115
+ /** Calculate the minimum of the elements in the array. */
116
+ min(): number;
117
+ /** Calculate the maximum of the elements in the array. */
118
+ max(): number;
119
+ /** Convert this to a plain javascript array. */
120
+ array(): T[];
121
+ /** Allow iterating directly over the array. */
122
+ [Symbol.iterator](): Iterator<T>;
123
+ /** Map indexes to values. */
124
+ [index: number]: any;
125
+ /** Automatic flattening of fields. Equivalent to implicitly calling `array.to("field")` */
126
+ [field: string]: any;
127
+ }
128
+ /** Provides utility functions for generating data arrays. */
129
+ export declare namespace DataArray {
130
+ /** Create a new Dataview data array. */
131
+ function wrap<T>(raw: T[] | DataArray<T>, settings: QuerySettings): DataArray<T>;
132
+ /** Create a new DataArray from an iterable object. */
133
+ function from<T>(raw: Iterable<T>, settings: QuerySettings): DataArray<T>;
134
+ /** Return true if the given object is a data array. */
135
+ function isDataArray(obj: any): obj is DataArray<any>;
136
+ }
@@ -1 +1,15 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/api/extensions.cjs';
1
+ import type { STask } from '../data-model/serialized/markdown.d.d.mts';
2
+ /** A general function for deciding how to check a task given it's current state. */
3
+ export type TaskStatusSelector = (task: STask) => Promise<string>;
4
+ /**
5
+ * A dataview extension; allows for registering new functions, altering views, and altering some more
6
+ * advanced dataview behavior.
7
+ */
8
+ export declare class Extension {
9
+ plugin: string;
10
+ /** All registered task status selectors for this extension. */
11
+ taskStatusSelectors: Record<string, TaskStatusSelector>;
12
+ constructor(plugin: string);
13
+ /** Register a task status selector under the given name. */
14
+ taskStatusSelector(name: string, selector: TaskStatusSelector): Extension;
15
+ }
@@ -1 +1,186 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/api/inline-api.cjs';
1
+ /** Fancy wrappers for the JavaScript API, used both by external plugins AND by the dataview javascript view. */
2
+ import type {
3
+ DateTime,
4
+ Duration
5
+ } from 'luxon';
6
+ import * as Luxon from 'luxon';
7
+ import type {
8
+ App,
9
+ Component
10
+ } from 'obsidian';
11
+ import type {
12
+ DataviewApi,
13
+ DataviewIOApi,
14
+ QueryApiSettings,
15
+ QueryResult
16
+ } from '../api/plugin-api.d.d.mts';
17
+ import type { Result } from '../api/result.d.d.mts';
18
+ import type { FullIndex } from '../data-index/index.d.d.mts';
19
+ import type { SListItem } from '../data-model/serialized/markdown.d.d.mts';
20
+ import type {
21
+ DataObject,
22
+ Grouping,
23
+ Link,
24
+ Literal,
25
+ Values,
26
+ Widgets
27
+ } from '../data-model/value.d.d.mts';
28
+ import type { Context } from '../expression/context.d.d.mts';
29
+ import type { BoundFunctionImpl } from '../expression/functions.d.d.mts';
30
+ import type {
31
+ DataviewSettings,
32
+ ExportSettings
33
+ } from '../settings.d.d.mts';
34
+ import type { DataArray } from './data-array.d.d.mts';
35
+ /** Asynchronous API calls related to file / system IO. */
36
+ export declare class DataviewInlineIOApi {
37
+ api: DataviewIOApi;
38
+ currentFile: string;
39
+ constructor(api: DataviewIOApi, currentFile: string);
40
+ /** Load the contents of a CSV asynchronously, returning a data array of rows (or undefined if it does not exist). */
41
+ csv(path: string, originFile?: string): Promise<DataArray<DataObject> | undefined>;
42
+ /** Asynchronously load the contents of any link or path in an Obsidian vault. */
43
+ load(path: Link | string, originFile?: string): Promise<string | undefined>;
44
+ /** Normalize a link or path relative to an optional origin file. Returns a textual fully-qualified-path. */
45
+ normalize(path: Link | string, originFile?: string): string;
46
+ }
47
+ export declare class DataviewInlineApi {
48
+ /**
49
+ * The raw dataview indices, which track file <-> metadata relations. Use these if the intuitive API does not support
50
+ * your use case.
51
+ */
52
+ index: FullIndex;
53
+ /** The component that handles the lifetime of this view. Use it if you are adding custom event handlers/components. */
54
+ component: Component;
55
+ /** The path to the current file this script is running in. */
56
+ currentFilePath: string;
57
+ /**
58
+ * The container which holds the output of this view. You can directly append fields to this, if you wish, though
59
+ * the rendering API is likely to be easier for straight-forward purposes.
60
+ */
61
+ container: HTMLElement;
62
+ /** Directly access the Obsidian app object, such as for reaching out to other plugins. */
63
+ app: App;
64
+ /** The general plugin API which much of this inline API delegates to. */
65
+ api: DataviewApi;
66
+ /** Settings which determine defaults, incl. many rendering options. */
67
+ settings: DataviewSettings;
68
+ /** Evaluation context which expressions can be evaluated in. */
69
+ evaluationContext: Context;
70
+ /** Value utilities which allow for type-checking and comparisons. */
71
+ value: typeof Values;
72
+ /** Widget utility functions for creating built-in widgets. */
73
+ widget: typeof Widgets;
74
+ /** IO utilities which are largely asynchronous. */
75
+ io: DataviewInlineIOApi;
76
+ /** Re-exporting of luxon for people who can't easily require it. Sorry! */
77
+ luxon: typeof Luxon;
78
+ /** Dataview functions which can be called from DataviewJS. */
79
+ func: Record<string, BoundFunctionImpl>;
80
+ constructor(api: DataviewApi, component: Component, container: HTMLElement, currentFilePath: string);
81
+ /** Return an array of paths (as strings) corresponding to pages which match the query. */
82
+ pagePaths(query?: string): DataArray<string>;
83
+ /** Map a page path to the actual data contained within that page. */
84
+ page(path: string | Link): DataObject | undefined;
85
+ /** Return an array of page objects corresponding to pages which match the query. */
86
+ pages(query?: string): DataArray<any>;
87
+ /** Return the information about the current page. */
88
+ current(): Record<string, any> | undefined;
89
+ /** Execute a Dataview query, returning the results in programmatic form. */
90
+ query(source: string, originFile?: string, settings?: QueryApiSettings): Promise<Result<QueryResult, string>>;
91
+ /** Error-throwing version of {@link query}. */
92
+ tryQuery(source: string, originFile?: string, settings?: QueryApiSettings): Promise<QueryResult>;
93
+ /** Execute a Dataview query, returning the results in Markdown. */
94
+ queryMarkdown(source: string, originFile?: string, settings?: QueryApiSettings): Promise<Result<string, string>>;
95
+ /** Error-throwing version of {@link queryMarkdown}. */
96
+ tryQueryMarkdown(source: string, originFile?: string, settings?: QueryApiSettings): Promise<string>;
97
+ /**
98
+ * Evaluate a dataview expression (like '2 + 2' or 'link("hello")'), returning the evaluated result.
99
+ * This takes an optional second argument which provides definitions for variables, such as:
100
+ *
101
+ * ```
102
+ * dv.evaluate("x + 6", { x: 2 }) = 8
103
+ * dv.evaluate('link(target)', { target: "Okay" }) = [[Okay]]
104
+ * ```
105
+ *
106
+ * Note that `this` is implicitly available and refers to the current file.
107
+ *
108
+ * This method returns a Result type instead of throwing an error; you can check the result of the
109
+ * execution via `result.successful` and obtain `result.value` or `result.error` accordingly. If
110
+ * you'd rather this method throw on an error, use `dv.tryEvaluate`.
111
+ */
112
+ evaluate(expression: string, context?: DataObject): Result<Literal, string>;
113
+ /** Error-throwing version of `dv.evaluate`. */
114
+ tryEvaluate(expression: string, context?: DataObject): Literal;
115
+ /** Execute a Dataview query and embed it into the current view. */
116
+ execute(source: string): Promise<void>;
117
+ /** Execute a DataviewJS query and embed it into the current view. */
118
+ executeJs(code: string): Promise<void>;
119
+ /**
120
+ * Convert an input element or array into a Dataview data-array. If the input is already a data array,
121
+ * it is returned unchanged.
122
+ */
123
+ array(raw: any): DataArray<any>;
124
+ /** Return true if the given value is a javascript array OR a dataview data array. */
125
+ isArray(raw: any): raw is DataArray<any> | Array<any>;
126
+ /** Return true if the given value is a dataview data array; this returns FALSE for plain JS arrays. */
127
+ isDataArray(raw: unknown): raw is DataArray<any>;
128
+ /** Create a dataview file link to the given path. */
129
+ fileLink(path: string, embed?: boolean, display?: string): Link;
130
+ /** Create a dataview section link to the given path. */
131
+ sectionLink(path: string, section: string, embed?: boolean, display?: string): Link;
132
+ /** Create a dataview block link to the given path. */
133
+ blockLink(path: string, blockId: string, embed?: boolean, display?: string): Link;
134
+ /** Attempt to extract a date from a string, link or date. */
135
+ date(pathlike: string | Link | DateTime): DateTime | null;
136
+ /** Attempt to extract a duration from a string or duration. */
137
+ duration(dur: string | Duration): Duration | null;
138
+ /** Parse a raw textual value into a complex Dataview type, if possible. */
139
+ parse(value: string): Literal;
140
+ /** Convert a basic JS type into a Dataview type by parsing dates, links, durations, and so on. */
141
+ literal(value: any): Literal;
142
+ /** Deep clone the given literal, returning a new literal which is independent of the original. */
143
+ clone(value: Literal): Literal;
144
+ /**
145
+ * Compare two arbitrary JavaScript values using Dataview's default comparison rules. Returns a negative value if
146
+ * a < b, 0 if a = b, and a positive value if a > b.
147
+ */
148
+ compare(a: any, b: any): number;
149
+ /** Return true if the two given JavaScript values are equal using Dataview's default comparison rules. */
150
+ equal(a: any, b: any): boolean;
151
+ /** Render an HTML element, containing arbitrary text. */
152
+ el<K extends keyof HTMLElementTagNameMap>(el: K, text: any, { container, ...options }?: DomElementInfo & {
153
+ container?: HTMLElement;
154
+ }): HTMLElementTagNameMap[K];
155
+ /** Render an HTML header; the level can be anything from 1 - 6. */
156
+ header(level: number, text: any, options?: DomElementInfo): HTMLHeadingElement;
157
+ /** Render an HTML paragraph, containing arbitrary text. */
158
+ paragraph(text: any, options?: DomElementInfo): HTMLParagraphElement;
159
+ /** Render an inline span, containing arbitrary text. */
160
+ span(text: any, options?: DomElementInfo): HTMLSpanElement;
161
+ /**
162
+ * Render HTML from the output of a template "view" saved as a file in the vault.
163
+ * Takes a filename and arbitrary input data.
164
+ */
165
+ view(viewName: string, input: any): Promise<void>;
166
+ /** Render a dataview list of the given values. */
167
+ list(values?: any[] | DataArray<any>): Promise<void>;
168
+ /** Render a dataview table with the given headers, and the 2D array of values. */
169
+ table(headers: string[], values?: any[][] | DataArray<any>): Promise<void>;
170
+ /** Render a dataview task view with the given tasks. */
171
+ taskList(tasks: Grouping<SListItem>, groupByFile?: boolean): Promise<void>;
172
+ /** Render a table directly to markdown, returning the markdown. */
173
+ markdownTable(headers: string[], values?: any[][] | DataArray<any>, settings?: Partial<ExportSettings>): string;
174
+ /** Render a list directly to markdown, returning the markdown. */
175
+ markdownList(values?: any[] | DataArray<any> | undefined, settings?: Partial<ExportSettings>): string;
176
+ /** Render at ask list directly to markdown, returning the markdown. */
177
+ markdownTaskList(values: Grouping<SListItem>, settings?: Partial<ExportSettings>): string;
178
+ }
179
+ /**
180
+ * Evaluate a script where 'this' for the script is set to the given context. Allows you to define global variables.
181
+ */
182
+ export declare function evalInContext(script: string, context: any): any;
183
+ /**
184
+ * Evaluate a script possibly asynchronously, if the script contains `async/await` blocks.
185
+ */
186
+ export declare function asyncEvalInContext(script: string, context: any): Promise<any>;
@@ -1 +1,209 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/api/plugin-api.cjs';
1
+ /** The general, externally accessible plugin API (available at `app.plugins.plugins.dataview.api` or as global `DataviewAPI`). */
2
+ import type { CompareOperator } from 'compare-versions';
3
+ import type {
4
+ DateTime,
5
+ Duration
6
+ } from 'luxon';
7
+ import * as Luxon from 'luxon';
8
+ import type {
9
+ App,
10
+ Component,
11
+ MarkdownPostProcessorContext
12
+ } from 'obsidian';
13
+ import type { Result } from '../api/result.d.d.mts';
14
+ import type { FullIndex } from '../data-index/index.d.d.mts';
15
+ import type { SListItem } from '../data-model/serialized/markdown.d.d.mts';
16
+ import type {
17
+ DataObject,
18
+ Grouping,
19
+ Link,
20
+ Literal,
21
+ Values,
22
+ Widgets
23
+ } from '../data-model/value.d.d.mts';
24
+ import type { Context } from '../expression/context.d.d.mts';
25
+ import type { BoundFunctionImpl } from '../expression/functions.d.d.mts';
26
+ import type { IdentifierMeaning } from '../query/engine.d.d.mts';
27
+ import type { Query } from '../query/query.d.d.mts';
28
+ import type {
29
+ DataviewSettings,
30
+ ExportSettings
31
+ } from '../settings.d.d.mts';
32
+ import type { DataArray } from './data-array.d.d.mts';
33
+ /** Asynchronous API calls related to file / system IO. */
34
+ export declare class DataviewIOApi {
35
+ api: DataviewApi;
36
+ constructor(api: DataviewApi);
37
+ /** Load the contents of a CSV asynchronously, returning a data array of rows (or undefined if it does not exist). */
38
+ csv(path: Link | string, originFile?: string): Promise<DataArray<DataObject> | undefined>;
39
+ /** Asynchronously load the contents of any link or path in an Obsidian vault. */
40
+ load(path: Link | string, originFile?: string): Promise<string | undefined>;
41
+ /** Normalize a link or path relative to an optional origin file. Returns a textual fully-qualified-path. */
42
+ normalize(path: Link | string, originFile?: string): string;
43
+ }
44
+ /** Global API for accessing the Dataview API, executing dataview queries, and */
45
+ export declare class DataviewApi {
46
+ app: App;
47
+ index: FullIndex;
48
+ settings: DataviewSettings;
49
+ private verNum;
50
+ /** Evaluation context which expressions can be evaluated in. */
51
+ evaluationContext: Context;
52
+ /** IO API which supports asynchronous loading of data directly. */
53
+ io: DataviewIOApi;
54
+ /** Dataview functions which can be called from DataviewJS. */
55
+ func: Record<string, BoundFunctionImpl>;
56
+ /** Value utility functions for comparisons and type-checking. */
57
+ value: typeof Values;
58
+ /** Widget utility functions for creating built-in widgets. */
59
+ widget: typeof Widgets;
60
+ /** Re-exporting of luxon for people who can't easily require it. Sorry! */
61
+ luxon: typeof Luxon;
62
+ constructor(app: App, index: FullIndex, settings: DataviewSettings, verNum: string);
63
+ /** Utilities to check the current Dataview version and compare it to SemVer version ranges. */
64
+ version: {
65
+ current: string;
66
+ compare: (op: CompareOperator, ver: string) => boolean;
67
+ satisfies: (range: string) => boolean;
68
+ };
69
+ /** Return an array of paths (as strings) corresponding to pages which match the query. */
70
+ pagePaths(query?: string, originFile?: string): DataArray<string>;
71
+ /** Map a page path to the actual data contained within that page. */
72
+ page(path: string | Link, originFile?: string): Record<string, Literal> | undefined;
73
+ /** Return an array of page objects corresponding to pages which match the source query. */
74
+ pages(query?: string, originFile?: string): DataArray<Record<string, Literal>>;
75
+ /** Remaps important metadata to add data arrays. */
76
+ private _addDataArrays;
77
+ /**
78
+ * Convert an input element or array into a Dataview data-array. If the input is already a data array,
79
+ * it is returned unchanged.
80
+ */
81
+ array(raw: unknown): DataArray<any>;
82
+ /** Return true if the given value is a javascript array OR a dataview data array. */
83
+ isArray(raw: unknown): raw is DataArray<any> | Array<any>;
84
+ /** Return true if the given value is a dataview data array; this returns FALSE for plain JS arrays. */
85
+ isDataArray(raw: unknown): raw is DataArray<any>;
86
+ /** Create a dataview file link to the given path. */
87
+ fileLink(path: string, embed?: boolean, display?: string): Link;
88
+ /** Create a dataview section link to the given path. */
89
+ sectionLink(path: string, section: string, embed?: boolean, display?: string): Link;
90
+ /** Create a dataview block link to the given path. */
91
+ blockLink(path: string, blockId: string, embed?: boolean, display?: string): Link;
92
+ /** Attempt to extract a date from a string, link or date. */
93
+ date(pathlike: string | Link | DateTime): DateTime | null;
94
+ /** Attempt to extract a duration from a string or duration. */
95
+ duration(str: string | Duration): Duration | null;
96
+ /** Parse a raw textual value into a complex Dataview type, if possible. */
97
+ parse(value: string): Literal;
98
+ /** Convert a basic JS type into a Dataview type by parsing dates, links, durations, and so on. */
99
+ literal(value: any): Literal;
100
+ /** Deep clone the given literal, returning a new literal which is independent of the original. */
101
+ clone(value: Literal): Literal;
102
+ /**
103
+ * Compare two arbitrary JavaScript values using Dataview's default comparison rules. Returns a negative value if
104
+ * a < b, 0 if a = b, and a positive value if a > b.
105
+ */
106
+ compare(a: any, b: any): number;
107
+ /** Return true if the two given JavaScript values are equal using Dataview's default comparison rules. */
108
+ equal(a: any, b: any): boolean;
109
+ /**
110
+ * Execute an arbitrary Dataview query, returning a query result which:
111
+ *
112
+ * 1. Indicates the type of query,
113
+ * 2. Includes the raw AST of the parsed query.
114
+ * 3. Includes the output in the form relevant to that query type.
115
+ *
116
+ * List queries will return a list of objects ({ id, value }); table queries return a header array
117
+ * and a 2D array of values; and task arrays return a Grouping<Task> type which allows for recursive
118
+ * task nesting.
119
+ */
120
+ query(source: string | Query, originFile?: string, settings?: QueryApiSettings): Promise<Result<QueryResult, string>>;
121
+ /** Error-throwing version of {@link query}. */
122
+ tryQuery(source: string, originFile?: string, settings?: QueryApiSettings): Promise<QueryResult>;
123
+ /** Execute an arbitrary dataview query, returning the results in well-formatted markdown. */
124
+ queryMarkdown(source: string | Query, originFile?: string, settings?: Partial<QueryApiSettings & ExportSettings>): Promise<Result<string, string>>;
125
+ /** Error-throwing version of {@link queryMarkdown}. */
126
+ tryQueryMarkdown(source: string | Query, originFile?: string, settings?: Partial<QueryApiSettings & ExportSettings>): Promise<string>;
127
+ /**
128
+ * Evaluate a dataview expression (like '2 + 2' or 'link("hello")'), returning the evaluated result.
129
+ * This takes an optional second argument which provides definitions for variables, such as:
130
+ *
131
+ * ```
132
+ * dv.evaluate("x + 6", { x: 2 }) = 8
133
+ * dv.evaluate('link(target)', { target: "Okay" }) = [[Okay]]
134
+ * ```
135
+ *
136
+ * This method returns a Result type instead of throwing an error; you can check the result of the
137
+ * execution via `result.successful` and obtain `result.value` or `result.error` accordingly. If
138
+ * you'd rather this method throw on an error, use `dv.tryEvaluate`.
139
+ */
140
+ evaluate(expression: string, context?: DataObject, originFile?: string): Result<Literal, string>;
141
+ /** Error-throwing version of `dv.evaluate`. */
142
+ tryEvaluate(expression: string, context?: DataObject, originFile?: string): Literal;
143
+ /** Evaluate an expression in the context of the given file. */
144
+ evaluateInline(expression: string, origin: string): Result<Literal, string>;
145
+ /**
146
+ * Execute the given query, rendering results into the given container using the components lifecycle.
147
+ * Your component should be a *real* component which calls onload() on it's child components at some point,
148
+ * or a MarkdownPostProcessorContext!
149
+ *
150
+ * Note that views made in this way are live updating and will automatically clean themselves up when
151
+ * the component is unloaded or the container is removed.
152
+ */
153
+ execute(source: string, container: HTMLElement, component: Component | MarkdownPostProcessorContext, filePath: string): Promise<void>;
154
+ /**
155
+ * Execute the given DataviewJS query, rendering results into the given container using the components lifecycle.
156
+ * See {@link execute} for general rendering semantics.
157
+ */
158
+ executeJs(code: string, container: HTMLElement, component: Component | MarkdownPostProcessorContext, filePath: string): Promise<void>;
159
+ /** Render a dataview list of the given values. */
160
+ list(values: any[] | DataArray<any> | undefined, container: HTMLElement, component: Component, filePath: string): Promise<void>;
161
+ /** Render a dataview table with the given headers, and the 2D array of values. */
162
+ table(headers: string[], values: any[][] | DataArray<any> | undefined, container: HTMLElement, component: Component, filePath: string): Promise<void>;
163
+ /** Render a dataview task view with the given tasks. */
164
+ taskList(tasks: Grouping<SListItem>, groupByFile: boolean | undefined, container: HTMLElement, component: Component, filePath?: string): Promise<void>;
165
+ /** Render an arbitrary value into a container. */
166
+ renderValue(value: any, container: HTMLElement, component: Component, filePath: string, inline?: boolean): Promise<void>;
167
+ /** Render data to a markdown table. */
168
+ markdownTable(headers: string[] | undefined, values: any[][] | DataArray<any> | undefined, settings?: Partial<ExportSettings>): string;
169
+ /** Render data to a markdown list. */
170
+ markdownList(values: any[] | DataArray<any> | undefined, settings?: Partial<ExportSettings>): string;
171
+ /** Render tasks or list items to a markdown task list. */
172
+ markdownTaskList(values: Grouping<SListItem>, settings?: Partial<ExportSettings>): string;
173
+ }
174
+ /** The result of executing a table query. */
175
+ export type TableResult = {
176
+ type: 'table';
177
+ headers: string[];
178
+ values: Literal[][];
179
+ idMeaning: IdentifierMeaning;
180
+ };
181
+ /** The result of executing a list query. */
182
+ export type ListResult = {
183
+ type: 'list';
184
+ values: Literal[];
185
+ primaryMeaning: IdentifierMeaning;
186
+ };
187
+ /** The result of executing a task query. */
188
+ export type TaskResult = {
189
+ type: 'task';
190
+ values: Grouping<SListItem>;
191
+ };
192
+ /** The result of executing a calendar query. */
193
+ export type CalendarResult = {
194
+ type: 'calendar';
195
+ values: {
196
+ date: DateTime;
197
+ link: Link;
198
+ value?: Literal[];
199
+ }[];
200
+ };
201
+ /** The result of executing a query of some sort. */
202
+ export type QueryResult = TableResult | ListResult | TaskResult | CalendarResult;
203
+ /** Settings when querying the dataview API. */
204
+ export type QueryApiSettings = {
205
+ /** If present, then this forces queries to include/exclude the implicit id field (such as with `WITHOUT ID`). */
206
+ forceId?: boolean;
207
+ };
208
+ /** Determines if source-path has a `?no-dataview` annotation that disables dataview. */
209
+ export declare function isDataviewDisabled(sourcePath: string): boolean;