obsidian-dev-utils 19.1.2-beta.2 → 19.1.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/CHANGELOG.md +4 -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 +3 -3
  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 +4 -4
  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 +4 -4
  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 +5 -5
  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 +1 -1
  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 +1 -1
  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,106 @@
1
- export * from '../../../../../../cjs/obsidian/@types/Dataview/data-model/serialized/markdown.cjs';
1
+ /** Serialized / API facing data types for Dataview objects. */
2
+ import type { DateTime } from 'luxon';
3
+ import type { Pos } from 'obsidian';
4
+ import type {
5
+ Link,
6
+ Literal
7
+ } from '../../data-model/value.d.d.mts';
8
+ export interface SMarkdownPage {
9
+ file: {
10
+ path: string;
11
+ folder: string;
12
+ name: string;
13
+ link: Link;
14
+ outlinks: Link[];
15
+ inlinks: Link[];
16
+ etags: string[];
17
+ tags: string[];
18
+ aliases: string[];
19
+ lists: SListItem[];
20
+ tasks: STask[];
21
+ ctime: DateTime;
22
+ cday: DateTime;
23
+ mtime: DateTime;
24
+ mday: DateTime;
25
+ size: number;
26
+ ext: string;
27
+ starred: boolean;
28
+ day?: DateTime;
29
+ };
30
+ /** Additional fields added by field data. */
31
+ [key: string]: any;
32
+ }
33
+ /** A serialized list item. */
34
+ export type SListItem = SListEntry | STask;
35
+ /** Shared data between list items. */
36
+ export interface SListItemBase {
37
+ /** The symbol used to start this list item, like '1.' or '1)' or '*'. */
38
+ symbol: string;
39
+ /** A link to the closest thing to this list item (a block, a section, or a file). */
40
+ link: Link;
41
+ /** The section that contains this list item. */
42
+ section: Link;
43
+ /** The path of the file that contains this item. */
44
+ path: string;
45
+ /** The line this item starts on. */
46
+ line: number;
47
+ /** The number of lines this item spans. */
48
+ lineCount: number;
49
+ /** The internal Obsidian tracker of the exact position of this line. */
50
+ position: Pos;
51
+ /** The line number of the list that this item is part of. */
52
+ list: number;
53
+ /** If present, the block ID for this item. */
54
+ blockId?: string;
55
+ /** The line number of the parent item to this list, if relevant. */
56
+ parent?: number;
57
+ /** The children elements of this list item. */
58
+ children: SListItem[];
59
+ /** Links contained inside this list item. */
60
+ outlinks: Link[];
61
+ /** The raw text of this item. */
62
+ text: string;
63
+ /**
64
+ * If present, overrides 'text' when rendered in task views. You should not mutate 'text' since it is used to
65
+ * validate a list item when editing it.
66
+ */
67
+ visual?: string;
68
+ /** Whether this item has any metadata annotations on it. */
69
+ annotated?: boolean;
70
+ /** Any tags present in this task. */
71
+ tags: string[];
72
+ /** @deprecated use 'children' instead. */
73
+ subtasks: SListItem[];
74
+ /** @deprecated use 'task' instead. */
75
+ real: boolean;
76
+ /** @deprecated use 'section' instead. */
77
+ header: Link;
78
+ /** Additional fields added by annotations. */
79
+ [key: string]: any;
80
+ }
81
+ /** A serialized list item as seen by users; this is not a task. */
82
+ export interface SListEntry extends SListItemBase {
83
+ task: false;
84
+ }
85
+ /** A serialized task. */
86
+ export interface STask extends SListItemBase {
87
+ task: true;
88
+ /** The status of this task, the text between the brackets ('[ ]'). Will be a space if the task is currently unchecked. */
89
+ status: string;
90
+ /** Indicates whether the task has any value other than empty space. */
91
+ checked: boolean;
92
+ /** Indicates whether the task explicitly has been marked "completed" ('x' or 'X'). */
93
+ completed: boolean;
94
+ /** Indicates whether the task and ALL subtasks have been completed. */
95
+ fullyCompleted: boolean;
96
+ /** If present, then the time that this task was created. */
97
+ created?: Literal;
98
+ /** If present, then the time that this task was due. */
99
+ due?: Literal;
100
+ /** If present, then the time that this task was completed. */
101
+ completion?: Literal;
102
+ /** If present, then the day that this task can be started. */
103
+ start?: Literal;
104
+ /** If present, then the day that work on this task is scheduled. */
105
+ scheduled?: Literal;
106
+ }
@@ -1 +1,7 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/data-model/transferable.cjs';
1
+ /** Simplifies passing dataview values across the JS web worker barrier. */
2
+ export declare namespace Transferable {
3
+ /** Convert a literal value to a serializer-friendly transferable value. */
4
+ function transferable(value: any): any;
5
+ /** Convert a transferable value back to a literal value we can work with. */
6
+ function value(transferable: any): any;
7
+ }
@@ -1 +1,175 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/data-model/value.cjs';
1
+ import type {
2
+ DateTime,
3
+ Duration
4
+ } from 'luxon';
5
+ import type { QuerySettings } from '../settings.d.d.mts';
6
+ /** Shorthand for a mapping from keys to values. */
7
+ export type DataObject = {
8
+ [key: string]: Literal;
9
+ };
10
+ /** The literal types supported by the query engine. */
11
+ export type LiteralType = 'boolean' | 'number' | 'string' | 'date' | 'duration' | 'link' | 'array' | 'object' | 'function' | 'null' | 'html' | 'widget';
12
+ /** The raw values that a literal can take on. */
13
+ export type Literal = boolean | number | string | DateTime | Duration | Link | Array<Literal> | DataObject | Function | null | HTMLElement | Widget;
14
+ /** A grouping on a type which supports recursively-nested groups. */
15
+ export type GroupElement<T> = {
16
+ key: Literal;
17
+ rows: Grouping<T>;
18
+ };
19
+ export type Grouping<T> = T[] | GroupElement<T>[];
20
+ /** Maps the string type to it's external, API-facing representation. */
21
+ export type LiteralRepr<T extends LiteralType> = T extends 'boolean' ? boolean
22
+ : T extends 'number' ? number
23
+ : T extends 'string' ? string
24
+ : T extends 'duration' ? Duration
25
+ : T extends 'date' ? DateTime
26
+ : T extends 'null' ? null
27
+ : T extends 'link' ? Link
28
+ : T extends 'array' ? Array<Literal>
29
+ : T extends 'object' ? Record<string, Literal>
30
+ : T extends 'function' ? Function
31
+ : T extends 'html' ? HTMLElement
32
+ : T extends 'widget' ? Widget
33
+ : any;
34
+ /** A wrapped literal value which can be switched on. */
35
+ export type WrappedLiteral =
36
+ | LiteralWrapper<'string'>
37
+ | LiteralWrapper<'number'>
38
+ | LiteralWrapper<'boolean'>
39
+ | LiteralWrapper<'date'>
40
+ | LiteralWrapper<'duration'>
41
+ | LiteralWrapper<'link'>
42
+ | LiteralWrapper<'array'>
43
+ | LiteralWrapper<'object'>
44
+ | LiteralWrapper<'html'>
45
+ | LiteralWrapper<'widget'>
46
+ | LiteralWrapper<'function'>
47
+ | LiteralWrapper<'null'>;
48
+ export interface LiteralWrapper<T extends LiteralType> {
49
+ type: T;
50
+ value: LiteralRepr<T>;
51
+ }
52
+ export declare namespace Values {
53
+ /** Convert an arbitrary value into a reasonable, Markdown-friendly string if possible. */
54
+ function toString(field: any, setting?: QuerySettings, recursive?: boolean): string;
55
+ /** Wrap a literal value so you can switch on it easily. */
56
+ function wrapValue(val: Literal): WrappedLiteral | undefined;
57
+ /** Recursively map complex objects at the leaves. */
58
+ function mapLeaves(val: Literal, func: (t: Literal) => Literal): Literal;
59
+ /** Compare two arbitrary JavaScript values. Produces a total ordering over ANY possible dataview value. */
60
+ function compareValue(val1: Literal, val2: Literal, linkNormalizer?: (link: string) => string): number;
61
+ /** Find the corresponding Dataview type for an arbitrary value. */
62
+ function typeOf(val: any): LiteralType | undefined;
63
+ /** Determine if the given value is "truthy" (i.e., is non-null and has data in it). */
64
+ function isTruthy(field: Literal): boolean;
65
+ /** Deep copy a field. */
66
+ function deepCopy<T extends Literal>(field: T): T;
67
+ function isString(val: any): val is string;
68
+ function isNumber(val: any): val is number;
69
+ function isDate(val: any): val is DateTime;
70
+ function isDuration(val: any): val is Duration;
71
+ function isNull(val: any): val is null | undefined;
72
+ function isArray(val: any): val is any[];
73
+ function isBoolean(val: any): val is boolean;
74
+ function isLink(val: any): val is Link;
75
+ function isWidget(val: any): val is Widget;
76
+ function isHtml(val: any): val is HTMLElement;
77
+ /** Checks if the given value is an object (and not any other dataview-recognized object-like type). */
78
+ function isObject(val: any): val is Record<string, any>;
79
+ function isFunction(val: any): val is Function;
80
+ }
81
+ export declare namespace Groupings {
82
+ /** Determines if the given group entry is a standalone value, or a grouping of sub-entries. */
83
+ function isElementGroup<T>(entry: T | GroupElement<T>): entry is GroupElement<T>;
84
+ /** Determines if the given array is a grouping array. */
85
+ function isGrouping<T>(entry: Grouping<T>): entry is GroupElement<T>[];
86
+ /** Count the total number of elements in a recursive grouping. */
87
+ function count<T>(elements: Grouping<T>): number;
88
+ }
89
+ /** The Obsidian 'link', used for uniquely describing a file, header, or block. */
90
+ export declare class Link {
91
+ /** The file path this link points to. */
92
+ path: string;
93
+ /** The display name associated with the link. */
94
+ display?: string;
95
+ /** The block ID or header this link points to within a file, if relevant. */
96
+ subpath?: string;
97
+ /** Is this link an embedded link (!)? */
98
+ embed: boolean;
99
+ /** The type of this link, which determines what 'subpath' refers to, if anything. */
100
+ type: 'file' | 'header' | 'block';
101
+ /** Create a link to a specific file. */
102
+ static file(path: string, embed?: boolean, display?: string): Link;
103
+ static infer(linkpath: string, embed?: boolean, display?: string): Link;
104
+ /** Create a link to a specific file and header in that file. */
105
+ static header(path: string, header: string, embed?: boolean, display?: string): Link;
106
+ /** Create a link to a specific file and block in that file. */
107
+ static block(path: string, blockId: string, embed?: boolean, display?: string): Link;
108
+ static fromObject(object: Record<string, any>): Link;
109
+ private constructor();
110
+ /** Checks for link equality (i.e., that the links are pointing to the same exact location). */
111
+ equals(other: Link): boolean;
112
+ /** Convert this link to it's markdown representation. */
113
+ toString(): string;
114
+ /** Convert this link to a raw object which is serialization-friendly. */
115
+ toObject(): Record<string, any>;
116
+ /** Update this link with a new path. */
117
+ withPath(path: string): any;
118
+ /** Return a new link which points to the same location but with a new display value. */
119
+ withDisplay(display?: string): Link;
120
+ /** Convert a file link into a link to a specific header. */
121
+ withHeader(header: string): Link;
122
+ /** Convert any link into a link to its file. */
123
+ toFile(): Link;
124
+ /** Convert this link into an embedded link. */
125
+ toEmbed(): Link;
126
+ /** Convert this link into a non-embedded link. */
127
+ fromEmbed(): Link;
128
+ /** Convert this link to markdown so it can be rendered. */
129
+ markdown(): string;
130
+ /** Convert the inner part of the link to something that Obsidian can open / understand. */
131
+ obsidianLink(): string;
132
+ /** The stripped name of the file this link points to. */
133
+ fileName(): string;
134
+ }
135
+ /**
136
+ * A trivial base class which just defines the '$widget' identifier type. Subtypes of
137
+ * widget are responsible for adding whatever metadata is relevant. If you want your widget
138
+ * to have rendering functionality (which you probably do), you should extend `RenderWidget`.
139
+ */
140
+ export declare abstract class Widget {
141
+ $widget: string;
142
+ constructor($widget: string);
143
+ /**
144
+ * Attempt to render this widget in markdown, if possible; if markdown is not possible,
145
+ * then this will attempt to render as HTML. Note that many widgets have interactive
146
+ * components or difficult functional components and the `markdown` function can simply
147
+ * return a placeholder in this case (such as `<function>` or `<task-list>`).
148
+ */
149
+ abstract markdown(): string;
150
+ }
151
+ /** A trivial widget which renders a (key, value) pair, and allows accessing the key and value. */
152
+ export declare class ListPairWidget extends Widget {
153
+ key: Literal;
154
+ value: Literal;
155
+ constructor(key: Literal, value: Literal);
156
+ markdown(): string;
157
+ }
158
+ /** A simple widget which renders an external link. */
159
+ export declare class ExternalLinkWidget extends Widget {
160
+ url: string;
161
+ display?: string | undefined;
162
+ constructor(url: string, display?: string | undefined);
163
+ markdown(): string;
164
+ }
165
+ export declare namespace Widgets {
166
+ /** Create a list pair widget matching the given key and value. */
167
+ function listPair(key: Literal, value: Literal): ListPairWidget;
168
+ /** Create an external link widget which renders an external Obsidian link. */
169
+ function externalLink(url: string, display?: string): ExternalLinkWidget;
170
+ /** Checks if the given widget is a list pair widget. */
171
+ function isListPair(widget: Widget): widget is ListPairWidget;
172
+ function isExternalLink(widget: Widget): widget is ExternalLinkWidget;
173
+ /** Determines if the given widget is any kind of built-in widget with special rendering handling. */
174
+ function isBuiltin(widget: Widget): boolean;
175
+ }
@@ -1 +1,43 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/expression/binaryop.cjs';
1
+ /** Provides a global dispatch table for evaluating binary operators, including comparison. */
2
+ import type { Result } from '../api/result.d.d.mts';
3
+ import type {
4
+ Literal,
5
+ LiteralRepr,
6
+ LiteralType
7
+ } from '../data-model/value.d.d.mts';
8
+ import type { Context } from '../expression/context.d.d.mts';
9
+ import type { BinaryOp } from '../expression/field.d.d.mts';
10
+ /** A literal type or a catch-all '*'. */
11
+ export type LiteralTypeOrAll = LiteralType | '*';
12
+ /** Maps a literal type or the catch-all '*'. */
13
+ export type LiteralReprAll<T extends LiteralTypeOrAll> = T extends '*' ? Literal : T extends LiteralType ? LiteralRepr<T> : any;
14
+ /** An implementation for a binary operator. */
15
+ export type BinaryOpImpl<A extends Literal, B extends Literal> = (first: A, second: B, ctx: Context) => Literal;
16
+ /** An implementation of a comparator (returning a number) which then automatically defines all of the comparison operators. */
17
+ export type CompareImpl<T extends Literal> = (first: T, second: T, ctx: Context) => number;
18
+ /** Provides implementations for binary operators on two types using a registry. */
19
+ export declare class BinaryOpHandler {
20
+ private map;
21
+ static create(): BinaryOpHandler;
22
+ constructor();
23
+ register<T extends LiteralTypeOrAll, U extends LiteralTypeOrAll>(
24
+ left: T,
25
+ op: BinaryOp,
26
+ right: U,
27
+ func: BinaryOpImpl<LiteralReprAll<T>, LiteralReprAll<U>>
28
+ ): BinaryOpHandler;
29
+ registerComm<T extends LiteralTypeOrAll, U extends LiteralTypeOrAll>(
30
+ left: T,
31
+ op: BinaryOp,
32
+ right: U,
33
+ func: BinaryOpImpl<LiteralReprAll<T>, LiteralReprAll<U>>
34
+ ): BinaryOpHandler;
35
+ /** Implement a comparison function. */
36
+ compare<T extends LiteralTypeOrAll>(type: T, compare: CompareImpl<LiteralReprAll<T>>): BinaryOpHandler;
37
+ /** Attempt to evaluate the given binary operator on the two literal fields. */
38
+ evaluate(op: BinaryOp, left: Literal, right: Literal, ctx: Context): Result<Literal, string>;
39
+ /** Create a string representation of the given triplet for unique lookup in the map. */
40
+ static repr(op: BinaryOp, left: LiteralTypeOrAll, right: LiteralTypeOrAll): string;
41
+ }
42
+ /** Configure and create a binary OP handler with the given parameters. */
43
+ export declare function createBinaryOps(linkNormalizer: (x: string) => string): BinaryOpHandler;
@@ -1 +1,49 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/expression/context.cjs';
1
+ /** Core implementation of the query language evaluation engine. */
2
+ import type { Result } from '../api/result.d.d.mts';
3
+ import type { Literal } from '../data-model/value.d.d.mts';
4
+ import type { QuerySettings } from '../settings.d.d.mts';
5
+ import type { BinaryOpHandler } from './binaryop.d.d.mts';
6
+ import type { Field } from './field.d.d.mts';
7
+ import type { FunctionImpl } from './functions.d.d.mts';
8
+ /** Handles link resolution and normalization inside of a context. */
9
+ export interface LinkHandler {
10
+ /** Resolve a link to the metadata it contains. */
11
+ resolve(path: string): Record<string, Literal> | null;
12
+ /**
13
+ * Normalize a link to it's fully-qualified path for comparison purposes.
14
+ * If the path does not exist, returns it unchanged.
15
+ */
16
+ normalize(path: string): string;
17
+ /** Return true if the given path actually exists, false otherwise. */
18
+ exists(path: string): boolean;
19
+ }
20
+ /**
21
+ * Evaluation context that expressions can be evaluated in. Includes global state, as well as available functions and a handler
22
+ * for binary operators.
23
+ */
24
+ export declare class Context {
25
+ linkHandler: LinkHandler;
26
+ settings: QuerySettings;
27
+ globals: Record<string, Literal>;
28
+ binaryOps: BinaryOpHandler;
29
+ functions: Record<string, FunctionImpl>;
30
+ /**
31
+ * Create a new context with the given namespace of globals, as well as optionally with custom binary operator, function,
32
+ * and link handlers.
33
+ */
34
+ constructor(
35
+ linkHandler: LinkHandler,
36
+ settings: QuerySettings,
37
+ globals?: Record<string, Literal>,
38
+ binaryOps?: BinaryOpHandler,
39
+ functions?: Record<string, FunctionImpl>
40
+ );
41
+ /** Set a global value in this context. */
42
+ set(name: string, value: Literal): Context;
43
+ /** Get the value of a global variable by name. Returns null if not present. */
44
+ get(name: string): Literal;
45
+ /** Try to evaluate an arbitrary field in this context, raising an exception on failure. */
46
+ tryEvaluate(field: Field, data?: Record<string, Literal>): Literal;
47
+ /** Evaluate an arbitrary field in this context. */
48
+ evaluate(field: Field, data?: Record<string, Literal>): Result<Literal, string>;
49
+ }
@@ -1 +1,82 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/expression/field.cjs';
1
+ /** Defines the AST for a field which can be evaluated. */
2
+ import type { Literal } from '../data-model/value.d.d.mts';
3
+ /** Comparison operators which yield true/false. */
4
+ export type CompareOp = '>' | '>=' | '<=' | '<' | '=' | '!=';
5
+ /** Arithmetic operators which yield numbers and other values. */
6
+ export type ArithmeticOp = '+' | '-' | '*' | '/' | '%' | '&' | '|';
7
+ /** All valid binary operators. */
8
+ export type BinaryOp = CompareOp | ArithmeticOp;
9
+ /** A (potentially computed) field to select or compare against. */
10
+ export type Field = BinaryOpField | VariableField | LiteralField | FunctionField | IndexField | NegatedField | LambdaField | ObjectField | ListField;
11
+ /** Literal representation of some field type. */
12
+ export interface LiteralField {
13
+ type: 'literal';
14
+ value: Literal;
15
+ }
16
+ /** A variable field for a variable with a given name. */
17
+ export interface VariableField {
18
+ type: 'variable';
19
+ name: string;
20
+ }
21
+ /** A list, which is an ordered collection of fields. */
22
+ export interface ListField {
23
+ type: 'list';
24
+ values: Field[];
25
+ }
26
+ /** An object, which is a mapping of name to field. */
27
+ export interface ObjectField {
28
+ type: 'object';
29
+ values: Record<string, Field>;
30
+ }
31
+ /** A binary operator field which combines two subnodes somehow. */
32
+ export interface BinaryOpField {
33
+ type: 'binaryop';
34
+ left: Field;
35
+ right: Field;
36
+ op: BinaryOp;
37
+ }
38
+ /** A function field which calls a function on 0 or more arguments. */
39
+ export interface FunctionField {
40
+ type: 'function';
41
+ /** Either the name of the function being called, or a Function object. */
42
+ func: Field;
43
+ /** The arguments being passed to the function. */
44
+ arguments: Field[];
45
+ }
46
+ export interface LambdaField {
47
+ type: 'lambda';
48
+ /** An ordered list of named arguments. */
49
+ arguments: string[];
50
+ /** The field which should be evaluated with the arguments in context. */
51
+ value: Field;
52
+ }
53
+ /** A field which indexes a variable into another variable. */
54
+ export interface IndexField {
55
+ type: 'index';
56
+ /** The field to index into. */
57
+ object: Field;
58
+ /** The index. */
59
+ index: Field;
60
+ }
61
+ /** A field which negates the value of the original field. */
62
+ export interface NegatedField {
63
+ type: 'negated';
64
+ /** The child field to negated. */
65
+ child: Field;
66
+ }
67
+ /** Utility methods for creating & comparing fields. */
68
+ export declare namespace Fields {
69
+ function variable(name: string): VariableField;
70
+ function literal(value: Literal): LiteralField;
71
+ function binaryOp(left: Field, op: BinaryOp, right: Field): Field;
72
+ function index(obj: Field, index: Field): IndexField;
73
+ /** Converts a string in dot-notation-format into a variable which indexes. */
74
+ function indexVariable(name: string): Field;
75
+ function lambda(args: string[], value: Field): LambdaField;
76
+ function func(func: Field, args: Field[]): FunctionField;
77
+ function list(values: Field[]): ListField;
78
+ function object(values: Record<string, Field>): ObjectField;
79
+ function negate(child: Field): NegatedField;
80
+ function isCompareOp(op: BinaryOp): op is CompareOp;
81
+ const NULL: LiteralField;
82
+ }
@@ -1 +1,149 @@
1
- export * from '../../../../../cjs/obsidian/@types/Dataview/expression/functions.cjs';
1
+ /** Default function implementations for the expression evaluator. */
2
+ import type { Literal } from '../data-model/value.d.d.mts';
3
+ import type {
4
+ LiteralReprAll,
5
+ LiteralTypeOrAll
6
+ } from './binaryop.d.d.mts';
7
+ import type { Context } from './context.d.d.mts';
8
+ /**
9
+ * A function implementation which takes in a function context and a variable number of arguments. Throws an error if an
10
+ * invalid number/type of arguments are passed.
11
+ */
12
+ export type FunctionImpl = (context: Context, ...rest: Literal[]) => Literal;
13
+ /** A "bound" function implementation which has already had a function context passed to it. */
14
+ export type BoundFunctionImpl = (...args: Literal[]) => Literal;
15
+ /** A function variant used in the function builder which holds the argument types. */
16
+ interface FunctionVariant {
17
+ args: LiteralTypeOrAll[];
18
+ varargs: boolean;
19
+ /** The implementing function for this specific variant. */
20
+ impl: FunctionImpl;
21
+ }
22
+ /**
23
+ * Allows for the creation of functions that check the number and type of their arguments, and dispatch
24
+ * to different implementations based on the types of the inputs.
25
+ */
26
+ export declare class FunctionBuilder {
27
+ name: string;
28
+ variants: FunctionVariant[];
29
+ vectorized: Record<number, number[]>;
30
+ constructor(name: string);
31
+ /** Add a general function variant which accepts any number of arguments of any type. */
32
+ vararg(impl: FunctionImpl): FunctionBuilder;
33
+ /** Add a function variant which takes in a single argument. */
34
+ add1<T extends LiteralTypeOrAll>(argType: T, impl: (a: LiteralReprAll<T>, context: Context) => Literal): FunctionBuilder;
35
+ /** Add a function variant which takes in two typed arguments. */
36
+ add2<T extends LiteralTypeOrAll, U extends LiteralTypeOrAll>(
37
+ arg1: T,
38
+ arg2: U,
39
+ impl: (a: LiteralReprAll<T>, b: LiteralReprAll<U>, context: Context) => Literal
40
+ ): FunctionBuilder;
41
+ /** Add a function variant which takes in three typed arguments. */
42
+ add3<T extends LiteralTypeOrAll, U extends LiteralTypeOrAll, V extends LiteralTypeOrAll>(
43
+ arg1: T,
44
+ arg2: U,
45
+ arg3: V,
46
+ impl: (a: LiteralReprAll<T>, b: LiteralReprAll<U>, c: LiteralReprAll<V>, context: Context) => Literal
47
+ ): FunctionBuilder;
48
+ /** Add vectorized variants which accept the given number of arguments and delegate. */
49
+ vectorize(numArgs: number, positions: number[]): FunctionBuilder;
50
+ /** Return a function which checks the number and type of arguments, passing them on to the first matching variant. */
51
+ build(): FunctionImpl;
52
+ }
53
+ /** Utilities for managing function implementations. */
54
+ export declare namespace Functions {
55
+ /** Bind a context to a function implementation, yielding a function which does not need the context argument. */
56
+ function bind(func: FunctionImpl, context: Context): BoundFunctionImpl;
57
+ /** Bind a context to all functions in the given map, yielding a new map of bound functions. */
58
+ function bindAll(funcs: Record<string, FunctionImpl>, context: Context): Record<string, BoundFunctionImpl>;
59
+ }
60
+ /**
61
+ * Collection of all defined functions; defined here so that they can be called from within dataview,
62
+ * and test code.
63
+ */
64
+ export declare namespace DefaultFunctions {
65
+ const typeOf: FunctionImpl;
66
+ /** Compute the length of a data type. */
67
+ const length: FunctionImpl;
68
+ /** List constructor function. */
69
+ const list: FunctionImpl;
70
+ /** Object constructor function. */
71
+ const object: FunctionImpl;
72
+ /** Internal link constructor function. */
73
+ const link: FunctionImpl;
74
+ /** Embed and un-embed a link. */
75
+ const embed: FunctionImpl;
76
+ /** External link constructor function. */
77
+ const elink: FunctionImpl;
78
+ /** Date constructor function. */
79
+ const date: FunctionImpl;
80
+ /** Duration constructor function. */
81
+ const dur: FunctionImpl;
82
+ /** Format a date using a luxon/moment-style date format. */
83
+ const dateformat: FunctionImpl;
84
+ const durationformat: FunctionImpl;
85
+ const localtime: FunctionImpl;
86
+ /** Number constructor function. */
87
+ const number: FunctionImpl;
88
+ /** Format a number using a standard currency format. */
89
+ const currencyformat: FunctionImpl;
90
+ /**
91
+ * Convert any value to a reasonable internal string representation. Most useful for dates, strings, numbers, and
92
+ * so on.
93
+ */
94
+ const string: FunctionImpl;
95
+ const round: FunctionImpl;
96
+ const trunc: FunctionImpl;
97
+ const floor: FunctionImpl;
98
+ const ceil: FunctionImpl;
99
+ const min: FunctionImpl;
100
+ const max: FunctionImpl;
101
+ const minby: FunctionImpl;
102
+ const maxby: FunctionImpl;
103
+ const striptime: FunctionImpl;
104
+ const contains: FunctionImpl;
105
+ const icontains: FunctionImpl;
106
+ const econtains: FunctionImpl;
107
+ const containsword: FunctionImpl;
108
+ /** Extract 0 or more keys from a given object via indexing. */
109
+ const extract: FunctionImpl;
110
+ const reverse: FunctionImpl;
111
+ const sort: FunctionImpl;
112
+ const regextest: FunctionImpl;
113
+ const regexmatch: FunctionImpl;
114
+ const regexreplace: FunctionImpl;
115
+ const lower: FunctionImpl;
116
+ const upper: FunctionImpl;
117
+ const replace: FunctionImpl;
118
+ /** Split a string on a given string. */
119
+ const split: FunctionImpl;
120
+ const startswith: FunctionImpl;
121
+ const endswith: FunctionImpl;
122
+ const padleft: FunctionImpl;
123
+ const padright: FunctionImpl;
124
+ const substring: FunctionImpl;
125
+ const truncate: FunctionImpl;
126
+ const fdefault: FunctionImpl;
127
+ const ldefault: FunctionImpl;
128
+ const choice: FunctionImpl;
129
+ const hash: FunctionImpl;
130
+ const reduce: FunctionImpl;
131
+ const sum: FunctionImpl;
132
+ const average: FunctionImpl;
133
+ const product: FunctionImpl;
134
+ const join: FunctionImpl;
135
+ const any: FunctionImpl;
136
+ const all: FunctionImpl;
137
+ const none: FunctionImpl;
138
+ const filter: FunctionImpl;
139
+ const unique: FunctionImpl;
140
+ const map: FunctionImpl;
141
+ const nonnull: FunctionImpl;
142
+ /** Gets an object containing a link's own properties */
143
+ const meta: FunctionImpl;
144
+ const flat: FunctionImpl;
145
+ const slice: FunctionImpl;
146
+ }
147
+ /** Default function implementations for the expression evaluator. */
148
+ export declare const DEFAULT_FUNCTIONS: Record<string, FunctionImpl>;
149
+ export {};