obsidian-dev-utils 19.0.0 → 19.0.1

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 (173) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +0 -3
  3. package/dist/lib/@types/debug.d.mts +1 -16
  4. package/dist/lib/Async.d.mts +1 -153
  5. package/dist/lib/Blob.d.mts +1 -40
  6. package/dist/lib/CssClass.d.mts +1 -97
  7. package/dist/lib/Debug.d.mts +1 -41
  8. package/dist/lib/DebugController.d.mts +1 -85
  9. package/dist/lib/Enum.d.mts +1 -20
  10. package/dist/lib/Error.d.mts +1 -45
  11. package/dist/lib/Function.d.mts +1 -28
  12. package/dist/lib/HTMLElement.d.mts +1 -49
  13. package/dist/lib/Library.cjs +1 -1
  14. package/dist/lib/Library.d.mts +1 -16
  15. package/dist/lib/Library.mjs +1 -1
  16. package/dist/lib/Object.d.mts +1 -211
  17. package/dist/lib/Path.d.mts +1 -133
  18. package/dist/lib/RegExp.d.mts +1 -18
  19. package/dist/lib/ScriptUtils/CliUtils.d.mts +1 -70
  20. package/dist/lib/ScriptUtils/CodeGenerator.d.mts +1 -12
  21. package/dist/lib/ScriptUtils/ESLint/@types/@guardian__eslint-plugin-tsdoc-required.d.mts +1 -13
  22. package/dist/lib/ScriptUtils/ESLint/@types/eslint-plugin-modules-newlines.d.mts +1 -13
  23. package/dist/lib/ScriptUtils/ESLint/@types/eslint-plugin-verify-tsdoc.d.mts +1 -13
  24. package/dist/lib/ScriptUtils/ESLint/ESLint.d.mts +1 -13
  25. package/dist/lib/ScriptUtils/ESLint/eslint.config.d.mts +1 -16
  26. package/dist/lib/ScriptUtils/ESLint/index.d.mts +1 -2
  27. package/dist/lib/ScriptUtils/Exec.d.mts +1 -83
  28. package/dist/lib/ScriptUtils/Fs.d.mts +1 -72
  29. package/dist/lib/ScriptUtils/JSON.d.mts +1 -64
  30. package/dist/lib/ScriptUtils/NodeModules.d.mts +1 -14
  31. package/dist/lib/ScriptUtils/Npm.d.mts +1 -151
  32. package/dist/lib/ScriptUtils/NpmPublish.d.mts +1 -9
  33. package/dist/lib/ScriptUtils/ObsidianDevUtilsRepoPaths.d.mts +1 -88
  34. package/dist/lib/ScriptUtils/Root.d.mts +1 -67
  35. package/dist/lib/ScriptUtils/build.d.mts +1 -41
  36. package/dist/lib/ScriptUtils/cli.d.mts +1 -14
  37. package/dist/lib/ScriptUtils/esbuild/Dependency.d.mts +1 -18
  38. package/dist/lib/ScriptUtils/esbuild/ObsidianPluginBuilder.d.mts +1 -53
  39. package/dist/lib/ScriptUtils/esbuild/changeExtensionPlugin.d.mts +1 -12
  40. package/dist/lib/ScriptUtils/esbuild/copyToObsidianPluginsFolderPlugin.d.mts +1 -18
  41. package/dist/lib/ScriptUtils/esbuild/fixEsmPlugin.d.mts +1 -11
  42. package/dist/lib/ScriptUtils/esbuild/fixSourceMapsPlugin.d.mts +1 -17
  43. package/dist/lib/ScriptUtils/esbuild/index.d.mts +1 -9
  44. package/dist/lib/ScriptUtils/esbuild/preprocessPlugin.d.mts +1 -23
  45. package/dist/lib/ScriptUtils/esbuild/renameCssPlugin.d.mts +1 -8
  46. package/dist/lib/ScriptUtils/esbuild/svelteWrapperPlugin.d.mts +1 -8
  47. package/dist/lib/ScriptUtils/format.d.mts +1 -10
  48. package/dist/lib/ScriptUtils/index.d.mts +1 -17
  49. package/dist/lib/ScriptUtils/spellcheck.d.mts +1 -14
  50. package/dist/lib/ScriptUtils/version.d.mts +1 -171
  51. package/dist/lib/String.d.mts +1 -138
  52. package/dist/lib/Transformers/DateTransformer.d.mts +1 -35
  53. package/dist/lib/Transformers/DurationTransformer.d.mts +1 -34
  54. package/dist/lib/Transformers/GroupTransformer.d.mts +1 -65
  55. package/dist/lib/Transformers/SkipPrivatePropertyTransformer.d.mts +1 -32
  56. package/dist/lib/Transformers/Transformer.d.mts +1 -67
  57. package/dist/lib/Transformers/TypedTransformer.d.mts +1 -37
  58. package/dist/lib/Transformers/index.d.mts +1 -6
  59. package/dist/lib/ValueProvider.d.mts +1 -22
  60. package/dist/lib/codemirror/StateFieldSpec.d.mts +1 -68
  61. package/dist/lib/codemirror/index.d.mts +1 -1
  62. package/dist/lib/index.d.mts +1 -20
  63. package/dist/lib/obsidian/@types/Dataview/api/data-array.d.mts +1 -136
  64. package/dist/lib/obsidian/@types/Dataview/api/extensions.d.mts +1 -15
  65. package/dist/lib/obsidian/@types/Dataview/api/inline-api.d.mts +1 -186
  66. package/dist/lib/obsidian/@types/Dataview/api/plugin-api.d.mts +1 -209
  67. package/dist/lib/obsidian/@types/Dataview/api/result.d.mts +1 -38
  68. package/dist/lib/obsidian/@types/Dataview/data-import/common.d.mts +1 -3
  69. package/dist/lib/obsidian/@types/Dataview/data-import/csv.d.mts +1 -3
  70. package/dist/lib/obsidian/@types/Dataview/data-import/inline-field.d.mts +1 -42
  71. package/dist/lib/obsidian/@types/Dataview/data-import/markdown-file.d.mts +1 -52
  72. package/dist/lib/obsidian/@types/Dataview/data-import/persister.d.mts +1 -32
  73. package/dist/lib/obsidian/@types/Dataview/data-import/web-worker/import-entry.d.mts +1 -1
  74. package/dist/lib/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.mts +1 -6
  75. package/dist/lib/obsidian/@types/Dataview/data-import/web-worker/import-manager.d.mts +1 -37
  76. package/dist/lib/obsidian/@types/Dataview/data-index/index.d.mts +1 -186
  77. package/dist/lib/obsidian/@types/Dataview/data-index/resolver.d.mts +1 -23
  78. package/dist/lib/obsidian/@types/Dataview/data-index/source.d.mts +1 -71
  79. package/dist/lib/obsidian/@types/Dataview/data-model/markdown.d.mts +1 -115
  80. package/dist/lib/obsidian/@types/Dataview/data-model/serialized/markdown.d.mts +1 -106
  81. package/dist/lib/obsidian/@types/Dataview/data-model/transferable.d.mts +1 -7
  82. package/dist/lib/obsidian/@types/Dataview/data-model/value.d.mts +1 -175
  83. package/dist/lib/obsidian/@types/Dataview/expression/binaryop.d.mts +1 -43
  84. package/dist/lib/obsidian/@types/Dataview/expression/context.d.mts +1 -49
  85. package/dist/lib/obsidian/@types/Dataview/expression/field.d.mts +1 -82
  86. package/dist/lib/obsidian/@types/Dataview/expression/functions.d.mts +1 -149
  87. package/dist/lib/obsidian/@types/Dataview/expression/parse.d.mts +1 -163
  88. package/dist/lib/obsidian/@types/Dataview/index.d.mts +1 -55
  89. package/dist/lib/obsidian/@types/Dataview/main.d.mts +1 -52
  90. package/dist/lib/obsidian/@types/Dataview/query/engine.d.mts +1 -103
  91. package/dist/lib/obsidian/@types/Dataview/query/parse.d.mts +1 -44
  92. package/dist/lib/obsidian/@types/Dataview/query/query.d.mts +1 -95
  93. package/dist/lib/obsidian/@types/Dataview/settings.d.mts +1 -60
  94. package/dist/lib/obsidian/@types/Dataview/typings/obsidian-ex.d.mts +1 -28
  95. package/dist/lib/obsidian/@types/Dataview/typings/workers.d.mts +1 -4
  96. package/dist/lib/obsidian/@types/Dataview/ui/export/markdown.d.mts +1 -15
  97. package/dist/lib/obsidian/@types/Dataview/ui/lp-render.d.mts +1 -37
  98. package/dist/lib/obsidian/@types/Dataview/ui/markdown.d.mts +1 -86
  99. package/dist/lib/obsidian/@types/Dataview/ui/refreshable-view.d.mts +1 -18
  100. package/dist/lib/obsidian/@types/Dataview/ui/render.d.mts +1 -33
  101. package/dist/lib/obsidian/@types/Dataview/ui/views/calendar-view.d.mts +1 -17
  102. package/dist/lib/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.mts +1 -42
  103. package/dist/lib/obsidian/@types/Dataview/ui/views/inline-view.d.mts +1 -28
  104. package/dist/lib/obsidian/@types/Dataview/ui/views/js-view.d.mts +1 -23
  105. package/dist/lib/obsidian/@types/Dataview/ui/views/list-view.d.mts +1 -25
  106. package/dist/lib/obsidian/@types/Dataview/ui/views/table-view.d.mts +1 -28
  107. package/dist/lib/obsidian/@types/Dataview/ui/views/task-view.d.mts +1 -51
  108. package/dist/lib/obsidian/@types/Dataview/util/hash.d.mts +1 -1
  109. package/dist/lib/obsidian/@types/Dataview/util/locale.d.mts +1 -2
  110. package/dist/lib/obsidian/@types/Dataview/util/media.d.mts +1 -6
  111. package/dist/lib/obsidian/@types/Dataview/util/normalize.d.mts +1 -44
  112. package/dist/lib/obsidian/App.d.mts +1 -30
  113. package/dist/lib/obsidian/AttachmentPath.d.mts +1 -54
  114. package/dist/lib/obsidian/Backlink.d.mts +1 -60
  115. package/dist/lib/obsidian/Callout.d.mts +1 -55
  116. package/dist/lib/obsidian/Components/DateComponent.d.mts +1 -36
  117. package/dist/lib/obsidian/Components/DateTimeComponent.d.mts +1 -36
  118. package/dist/lib/obsidian/Components/EmailComponent.d.mts +1 -29
  119. package/dist/lib/obsidian/Components/FileComponent.d.mts +1 -41
  120. package/dist/lib/obsidian/Components/MonthComponent.d.mts +1 -49
  121. package/dist/lib/obsidian/Components/MultipleDropdownComponent.d.mts +1 -73
  122. package/dist/lib/obsidian/Components/MultipleEmailComponent.d.mts +1 -36
  123. package/dist/lib/obsidian/Components/MultipleFileComponent.d.mts +1 -41
  124. package/dist/lib/obsidian/Components/MultipleTextComponent.d.mts +1 -67
  125. package/dist/lib/obsidian/Components/NumberComponent.d.mts +1 -29
  126. package/dist/lib/obsidian/Components/TimeComponent.d.mts +1 -37
  127. package/dist/lib/obsidian/Components/TypedRangeTextComponent.d.mts +1 -31
  128. package/dist/lib/obsidian/Components/TypedTextComponent.d.mts +1 -84
  129. package/dist/lib/obsidian/Components/UrlComponent.d.mts +1 -29
  130. package/dist/lib/obsidian/Components/ValidatorComponent.d.mts +1 -22
  131. package/dist/lib/obsidian/Components/ValueComponentWithChangeTracking.d.mts +1 -17
  132. package/dist/lib/obsidian/Components/WeekComponent.d.mts +1 -49
  133. package/dist/lib/obsidian/Components/index.d.mts +1 -17
  134. package/dist/lib/obsidian/Dataview.d.mts +1 -215
  135. package/dist/lib/obsidian/DataviewLink.d.mts +1 -23
  136. package/dist/lib/obsidian/FileChange.d.mts +1 -68
  137. package/dist/lib/obsidian/FileManager.d.mts +1 -38
  138. package/dist/lib/obsidian/FileSystem.d.mts +1 -185
  139. package/dist/lib/obsidian/Frontmatter.d.mts +1 -69
  140. package/dist/lib/obsidian/Link.d.mts +1 -366
  141. package/dist/lib/obsidian/Logger.d.mts +1 -13
  142. package/dist/lib/obsidian/Loop.d.mts +1 -36
  143. package/dist/lib/obsidian/Markdown.d.mts +1 -24
  144. package/dist/lib/obsidian/MarkdownCodeBlockProcessor.d.mts +1 -23
  145. package/dist/lib/obsidian/MarkdownView.d.mts +1 -12
  146. package/dist/lib/obsidian/MetadataCache.d.mts +1 -87
  147. package/dist/lib/obsidian/Modals/Alert.d.mts +1 -39
  148. package/dist/lib/obsidian/Modals/Confirm.d.mts +1 -43
  149. package/dist/lib/obsidian/Modals/ModalBase.d.mts +1 -35
  150. package/dist/lib/obsidian/Modals/Prompt.d.mts +1 -50
  151. package/dist/lib/obsidian/Modals/SelectItem.d.mts +1 -41
  152. package/dist/lib/obsidian/Modals/index.d.mts +1 -5
  153. package/dist/lib/obsidian/ObsidianSettings.d.mts +1 -17
  154. package/dist/lib/obsidian/Pdf.d.mts +1 -24
  155. package/dist/lib/obsidian/Plugin/EmptySettings.d.mts +1 -14
  156. package/dist/lib/obsidian/Plugin/ObsidianPluginRepoPaths.d.mts +1 -55
  157. package/dist/lib/obsidian/Plugin/Plugin.d.mts +1 -21
  158. package/dist/lib/obsidian/Plugin/PluginBase.d.mts +1 -108
  159. package/dist/lib/obsidian/Plugin/PluginContext.d.mts +1 -12
  160. package/dist/lib/obsidian/Plugin/PluginId.d.mts +1 -20
  161. package/dist/lib/obsidian/Plugin/PluginSettingsBase.d.mts +1 -31
  162. package/dist/lib/obsidian/Plugin/PluginSettingsTabBase.d.mts +1 -99
  163. package/dist/lib/obsidian/Plugin/index.d.mts +1 -8
  164. package/dist/lib/obsidian/Queue.d.mts +1 -30
  165. package/dist/lib/obsidian/Reference.d.mts +1 -21
  166. package/dist/lib/obsidian/RenameDeleteHandler.d.mts +1 -49
  167. package/dist/lib/obsidian/ResourceUrl.d.mts +1 -14
  168. package/dist/lib/obsidian/SettingEx.d.mts +1 -124
  169. package/dist/lib/obsidian/Vault.d.mts +1 -130
  170. package/dist/lib/obsidian/VaultEx.d.mts +1 -27
  171. package/dist/lib/obsidian/index.d.mts +1 -29
  172. package/dist/lib/url.d.mts +1 -11
  173. package/package.json +7 -7
@@ -1,54 +1 @@
1
- /**
2
- * @packageDocumentation AttachmentPath
3
- * Provides utility functions for working with attachment paths.
4
- */
5
- import type { App, TFile } from 'obsidian';
6
- import type { PathOrFile } from './FileSystem.mjs';
7
- /**
8
- * Is overridden wrapper.
9
- */
10
- export interface ExtendedWrapper {
11
- /**
12
- * Is extended.
13
- */
14
- isExtended: true;
15
- }
16
- /**
17
- * Get available path for attachments function.
18
- */
19
- export type GetAvailablePathForAttachmentsExtendedFn = (filename: string, extension: string, file: null | TFile, shouldSkipFolderCreation?: boolean) => Promise<string>;
20
- /**
21
- * Retrieves the file path for an attachment within a note.
22
- *
23
- * @param app - The Obsidian application instance.
24
- * @param attachmentPathOrFile - The path of the attachment.
25
- * @param notePathOrFile - The path of the note.
26
- * @returns A promise that resolves to the file path of the attachment.
27
- */
28
- export declare function getAttachmentFilePath(app: App, attachmentPathOrFile: PathOrFile, notePathOrFile: PathOrFile): Promise<string>;
29
- /**
30
- * Retrieves the attachment folder path for a given note.
31
- *
32
- * @param app - The Obsidian application instance.
33
- * @param notePathOrFile - The path of the note.
34
- * @returns A promise that resolves to the attachment folder path.
35
- */
36
- export declare function getAttachmentFolderPath(app: App, notePathOrFile: PathOrFile): Promise<string>;
37
- /**
38
- * Retrieves the available path for attachments.
39
- * @param app - The Obsidian application instance.
40
- * @param filename - Name of the file.
41
- * @param extension - Extension of the file.
42
- * @param file - The file to attach to.
43
- * @param shouldSkipFolderCreation - Should folder creation be skipped?
44
- * @returns A promise that resolves to the available path for attachments.
45
- */
46
- export declare function getAvailablePathForAttachments(app: App, filename: string, extension: string, file: null | TFile, shouldSkipFolderCreation: boolean): Promise<string>;
47
- /**
48
- * Checks if a note has its own attachment folder.
49
- *
50
- * @param app - The Obsidian application instance.
51
- * @param path - The path of the note.
52
- * @returns A promise that resolves to a boolean indicating whether the note has its own attachment folder.
53
- */
54
- export declare function hasOwnAttachmentFolder(app: App, path: string): Promise<boolean>;
1
+ export * from './AttachmentPath.cjs';
@@ -1,60 +1 @@
1
- /**
2
- * @packageDocumentation Backlink
3
- * Provides utility functions for working with backlinks.
4
- */
5
- import type { DataviewInlineApi } from './Dataview.mjs';
6
- import type { PathOrAbstractFile, PathOrFile } from './FileSystem.mjs';
7
- /**
8
- * Options for rendering delayed backlinks for a folder.
9
- */
10
- export interface RenderDelayedBacklinksForFolderOptions {
11
- /**
12
- * The DataviewInlineApi instance.
13
- */
14
- dv: DataviewInlineApi;
15
- /**
16
- * The folder path. If not provided, the current file's folder will be used.
17
- */
18
- folder?: string;
19
- /**
20
- * The title for the rendered backlinks. Defaults to "Folder Backlinks".
21
- */
22
- title?: string;
23
- }
24
- /**
25
- * Options for rendering delayed backlinks.
26
- */
27
- export interface RenderDelayedBacklinksOptions {
28
- /**
29
- * The DataviewInlineApi instance.
30
- */
31
- dv: DataviewInlineApi;
32
- /**
33
- * An array of PathOrFile.
34
- */
35
- files: PathOrFile[];
36
- /**
37
- * The title for the rendered backlinks. Defaults to "Backlinks".
38
- */
39
- title?: string;
40
- }
41
- /**
42
- * Renders a backlinks table using the provided DataviewInlineApi and optional array of PathOrAbstractFile.
43
- *
44
- * @param dv - The DataviewInlineApi instance.
45
- * @param pathOrFiles - An optional array of PathOrAbstractFile.
46
- * @returns A Promise that resolves when the backlinks table has been rendered.
47
- */
48
- export declare function renderBacklinksTable(dv: DataviewInlineApi, pathOrFiles?: PathOrAbstractFile[]): Promise<void>;
49
- /**
50
- * Renders delayed backlinks.
51
- *
52
- * @param options - The options for rendering delayed backlinks.
53
- */
54
- export declare function renderDelayedBacklinks(options: RenderDelayedBacklinksOptions): void;
55
- /**
56
- * Renders delayed backlinks for a specific folder.
57
- *
58
- * @param options - The options for rendering delayed backlinks.
59
- */
60
- export declare function renderDelayedBacklinksForFolder(options: RenderDelayedBacklinksForFolderOptions): void;
1
+ export * from './Backlink.cjs';
@@ -1,55 +1 @@
1
- /**
2
- * @packageDocumentation Callout
3
- * This module provides utility functions for rendering callouts in Dataview.
4
- */
5
- import type { ValueProvider } from '../ValueProvider.mjs';
6
- import type { DataviewInlineApi } from './Dataview.mjs';
7
- /**
8
- * Enum representing the mode of a callout.
9
- */
10
- export declare enum CalloutMode {
11
- /** Default mode, with no special behavior. */
12
- Default = 0,
13
- /** Foldable mode with the callout collapsed. */
14
- FoldableCollapsed = 1,
15
- /** Foldable mode with the callout expanded. */
16
- FoldableExpanded = 2
17
- }
18
- /**
19
- * Options for rendering a callout block in Dataview.
20
- */
21
- export interface RenderCalloutOptions {
22
- /**
23
- * An optional provider for the content, which can be either a string or a Node.
24
- */
25
- contentProvider?: ValueProvider<Node | string | void>;
26
- /**
27
- * The DataviewInlineApi instance.
28
- */
29
- dv: DataviewInlineApi;
30
- /**
31
- * The header text of the callout, default is an empty string.
32
- */
33
- header?: string;
34
- /**
35
- * The callout mode, default is `CalloutMode.FoldableCollapsed`.
36
- */
37
- mode?: CalloutMode;
38
- /**
39
- * The type of the callout, default is `"NOTE"`.
40
- */
41
- type?: string;
42
- }
43
- /**
44
- * Renders a callout block in Dataview.
45
- *
46
- * @param options - The options for rendering the callout.
47
- */
48
- export declare function renderCallout(options: RenderCalloutOptions): void;
49
- /**
50
- * Wraps the provided content in blockquote syntax for a callout.
51
- *
52
- * @param content - The content to wrap.
53
- * @returns The content wrapped in blockquote syntax.
54
- */
55
- export declare function wrapForCallout(content: string): string;
1
+ export * from './Callout.cjs';
@@ -1,36 +1 @@
1
- /**
2
- * @packageDocumentation DateComponent
3
- * Contains a component that displays and edits a date.
4
- */
5
- import { TypedRangeTextComponent } from './TypedRangeTextComponent.mjs';
6
- /**
7
- * A component that displays and edits a date.
8
- *
9
- * You can add this component using {@link SettingEx.addDate}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class DateComponent extends TypedRangeTextComponent<Date> {
16
- /**
17
- * Creates a new date component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Converts a string to a date.
24
- *
25
- * @param str - The string to convert.
26
- * @returns The date.
27
- */
28
- valueFromString(str: string): Date;
29
- /**
30
- * Converts a date to a string.
31
- *
32
- * @param value - The date to convert.
33
- * @returns The string.
34
- */
35
- valueToString(value: Date): string;
36
- }
1
+ export * from './DateComponent.cjs';
@@ -1,36 +1 @@
1
- /**
2
- * @packageDocumentation DateTimeComponent
3
- * Contains a component that displays and edits a date and time.
4
- */
5
- import { TypedRangeTextComponent } from './TypedRangeTextComponent.mjs';
6
- /**
7
- * A component that displays and edits a date and time.
8
- *
9
- * You can add this component using {@link SettingEx.addDateTime}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class DateTimeComponent extends TypedRangeTextComponent<Date> {
16
- /**
17
- * Creates a new date and time component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Converts a string to a date.
24
- *
25
- * @param str - The string to convert.
26
- * @returns The date.
27
- */
28
- valueFromString(str: string): Date;
29
- /**
30
- * Converts a date to a string.
31
- *
32
- * @param value - The date to convert.
33
- * @returns The string.
34
- */
35
- valueToString(value: Date): string;
36
- }
1
+ export * from './DateTimeComponent.cjs';
@@ -1,29 +1 @@
1
- /**
2
- * @packageDocumentation EmailComponent
3
- * Contains a component that displays and edits an email address.
4
- */
5
- import { TypedTextComponent } from './TypedTextComponent.mjs';
6
- /**
7
- * A component that displays and edits an email address.
8
- *
9
- * You can add this component using {@link SettingEx.addEmail}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class EmailComponent extends TypedTextComponent<string> {
16
- /**
17
- * Creates a new email component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Converts a string to an email address.
24
- *
25
- * @param str - The string to convert.
26
- * @returns The email address.
27
- */
28
- valueFromString(str: string): string;
29
- }
1
+ export * from './EmailComponent.cjs';
@@ -1,41 +1 @@
1
- /**
2
- * @packageDocumentation FileComponent
3
- * Contains a component that displays and edits a file.
4
- */
5
- import { TypedTextComponent } from './TypedTextComponent.mjs';
6
- /**
7
- * A component that displays and edits a file.
8
- *
9
- * You can add this component using {@link SettingEx.addFile}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class FileComponent extends TypedTextComponent<File | null> {
16
- /**
17
- * Creates a new file component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Gets the value of the component.
24
- *
25
- * @returns The value of the component.
26
- */
27
- getValue(): File | null;
28
- /**
29
- * Converts a string to a file.
30
- *
31
- * @returns The file.
32
- */
33
- valueFromString(): File | null;
34
- /**
35
- * Converts a file to a string.
36
- *
37
- * @param value - The file to convert.
38
- * @returns The string.
39
- */
40
- valueToString(value: File | null): string;
41
- }
1
+ export * from './FileComponent.cjs';
@@ -1,49 +1 @@
1
- /**
2
- * @packageDocumentation MonthComponent
3
- * Contains a component that displays and edits a month.
4
- */
5
- import { TypedRangeTextComponent } from './TypedRangeTextComponent.mjs';
6
- /**
7
- * An ISO 8601 month.
8
- */
9
- export interface IsoMonth {
10
- /**
11
- * The month (1-12).
12
- */
13
- month: number;
14
- /**
15
- * The year (1-9999).
16
- */
17
- year: number;
18
- }
19
- /**
20
- * A component that displays and edits a month.
21
- *
22
- * You can add this component using {@link SettingEx.addMonth}.
23
- *
24
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
25
- *
26
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
27
- */
28
- export declare class MonthComponent extends TypedRangeTextComponent<IsoMonth> {
29
- /**
30
- * Creates a new month component.
31
- *
32
- * @param containerEl - The container element of the component.
33
- */
34
- constructor(containerEl: HTMLElement);
35
- /**
36
- * Converts a string to a month.
37
- *
38
- * @param str - The string to convert.
39
- * @returns The month.
40
- */
41
- valueFromString(str: string): IsoMonth;
42
- /**
43
- * Converts a month to a string.
44
- *
45
- * @param value - The month to convert.
46
- * @returns The string.
47
- */
48
- valueToString(value: IsoMonth): string;
49
- }
1
+ export * from './MonthComponent.cjs';
@@ -1,73 +1 @@
1
- /**
2
- * @packageDocumentation MultipleDropdownComponent
3
- * Contains a component that displays and edits a multi-select dropdown.
4
- */
5
- import { ValueComponent } from 'obsidian';
6
- import type { MaybePromise } from '../../Async.mjs';
7
- import type { ValidatorElement } from '../../HTMLElement.mjs';
8
- import type { ValidatorComponent } from './ValidatorComponent.mjs';
9
- import type { ValueComponentWithChangeTracking } from './ValueComponentWithChangeTracking.mjs';
10
- /**
11
- * A multi-select dropdown component.
12
- *
13
- * You can add this component using {@link SettingEx.addMultipleDropdown}.
14
- *
15
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
16
- *
17
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
18
- */
19
- export declare class MultipleDropdownComponent extends ValueComponent<string[]> implements ValidatorComponent, ValueComponentWithChangeTracking<string[]> {
20
- /**
21
- * The validator element of the component.
22
- */
23
- get validatorEl(): ValidatorElement;
24
- private readonly dropdownComponent;
25
- /**
26
- * Creates a new multiple dropdown component.
27
- *
28
- * @param containerEl - The container element of the component.
29
- */
30
- constructor(containerEl: HTMLElement);
31
- /**
32
- * Adds an option to the dropdown.
33
- *
34
- * @param value - The value of the option.
35
- * @param display - The display text of the option.
36
- * @returns The component.
37
- */
38
- addOption(value: string, display: string): this;
39
- /**
40
- * Adds multiple options to the dropdown.
41
- *
42
- * @param options - The options to add.
43
- * @returns The component.
44
- */
45
- addOptions(options: Record<string, string>): this;
46
- /**
47
- * Gets the value of the component.
48
- *
49
- * @returns The value of the component.
50
- */
51
- getValue(): string[];
52
- /**
53
- * Sets the callback function to be called when the component is changed.
54
- *
55
- * @param callback - The callback function to be called when the component is changed.
56
- * @returns The component.
57
- */
58
- onChange(callback: (value: string[]) => MaybePromise<void>): this;
59
- /**
60
- * Sets the disabled state of the component.
61
- *
62
- * @param disabled - The disabled state to set.
63
- * @returns The component.
64
- */
65
- setDisabled(disabled: boolean): this;
66
- /**
67
- * Sets the value of the component.
68
- *
69
- * @param value - The value to set.
70
- * @returns The component.
71
- */
72
- setValue(value: string[]): this;
73
- }
1
+ export * from './MultipleDropdownComponent.cjs';
@@ -1,36 +1 @@
1
- /**
2
- * @packageDocumentation MultipleEmailComponent
3
- * Contains a component that displays and edits multiple email addresses.
4
- */
5
- import { TypedTextComponent } from './TypedTextComponent.mjs';
6
- /**
7
- * A component that displays and edits multiple email addresses.
8
- *
9
- * You can add this component using {@link SettingEx.addMultipleEmail}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class MultipleEmailComponent extends TypedTextComponent<string[]> {
16
- /**
17
- * Creates a new multiple emails component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Converts a string to an email address.
24
- *
25
- * @param str - The string to convert.
26
- * @returns The email address.
27
- */
28
- valueFromString(str: string): string[];
29
- /**
30
- * Converts an email address to a string.
31
- *
32
- * @param value - The email address to convert.
33
- * @returns The string.
34
- */
35
- valueToString(value: string[]): string;
36
- }
1
+ export * from './MultipleEmailComponent.cjs';
@@ -1,41 +1 @@
1
- /**
2
- * @packageDocumentation MultipleFileComponent
3
- * Contains a component that displays and edits multiple files.
4
- */
5
- import { TypedTextComponent } from './TypedTextComponent.mjs';
6
- /**
7
- * A component that displays and edits multiple files.
8
- *
9
- * You can add this component using {@link SettingEx.addMultipleFile}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class MultipleFileComponent extends TypedTextComponent<File[]> {
16
- /**
17
- * Creates a new multiple file component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Gets the value of the component.
24
- *
25
- * @returns The value of the component.
26
- */
27
- getValue(): File[];
28
- /**
29
- * Converts a string to a file.
30
- *
31
- * @returns The file.
32
- */
33
- valueFromString(): File[];
34
- /**
35
- * Converts a file to a string.
36
- *
37
- * @param value - The file to convert.
38
- * @returns The string.
39
- */
40
- valueToString(value: File[]): string;
41
- }
1
+ export * from './MultipleFileComponent.cjs';
@@ -1,67 +1 @@
1
- /**
2
- * @packageDocumentation MultipleTextComponent
3
- * Contains a component that displays and edits multiple text values.
4
- */
5
- import { ValueComponent } from 'obsidian';
6
- import type { MaybePromise } from '../../Async.mjs';
7
- import type { ValidatorElement } from '../../HTMLElement.mjs';
8
- import type { ValidatorComponent } from './ValidatorComponent.mjs';
9
- import type { ValueComponentWithChangeTracking } from './ValueComponentWithChangeTracking.mjs';
10
- /**
11
- * A component that displays and edits multiple text values.
12
- *
13
- * You can add this component using {@link SettingEx.addMultipleText}.
14
- *
15
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
16
- *
17
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
18
- */
19
- export declare class MultipleTextComponent extends ValueComponent<string[]> implements ValidatorComponent, ValueComponentWithChangeTracking<string[]> {
20
- /**
21
- * Gets the validator element of the component.
22
- *
23
- * @returns The validator element of the component.
24
- */
25
- get validatorEl(): ValidatorElement;
26
- private readonly textAreaComponent;
27
- /**
28
- * Creates a new multiple text component.
29
- *
30
- * @param containerEl - The container element of the component.
31
- */
32
- constructor(containerEl: HTMLElement);
33
- /**
34
- * Gets the value of the component.
35
- *
36
- * @returns The value of the component.
37
- */
38
- getValue(): string[];
39
- /**
40
- * Adds a change listener to the component.
41
- *
42
- * @param callback - The callback to call when the value changes.
43
- * @returns The component.
44
- */
45
- onChange(callback: (newValue: string[]) => MaybePromise<void>): this;
46
- /**
47
- * Sets the disabled state of the component.
48
- *
49
- * @param disabled - The disabled state to set.
50
- * @returns The component.
51
- */
52
- setDisabled(disabled: boolean): this;
53
- /**
54
- * Sets the placeholder of the component.
55
- *
56
- * @param placeholder - The placeholder to set.
57
- * @returns The component.
58
- */
59
- setPlaceholder(placeholder: string): this;
60
- /**
61
- * Sets the value of the component.
62
- *
63
- * @param value - The value to set.
64
- * @returns The component.
65
- */
66
- setValue(value: string[]): this;
67
- }
1
+ export * from './MultipleTextComponent.cjs';
@@ -1,29 +1 @@
1
- /**
2
- * @packageDocumentation NumberComponent
3
- * Contains a component that displays and edits a number.
4
- */
5
- import { TypedRangeTextComponent } from './TypedRangeTextComponent.mjs';
6
- /**
7
- * A component that displays and edits a number.
8
- *
9
- * You can add this component using {@link SettingEx.addNumber}.
10
- *
11
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
12
- *
13
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
14
- */
15
- export declare class NumberComponent extends TypedRangeTextComponent<number> {
16
- /**
17
- * Creates a new number component.
18
- *
19
- * @param containerEl - The container element of the component.
20
- */
21
- constructor(containerEl: HTMLElement);
22
- /**
23
- * Converts a string to a number.
24
- *
25
- * @param str - The string to convert.
26
- * @returns The number.
27
- */
28
- valueFromString(str: string): number;
29
- }
1
+ export * from './NumberComponent.cjs';
@@ -1,37 +1 @@
1
- /**
2
- * @packageDocumentation TimeComponent
3
- * Contains a component that displays and edits a time.
4
- */
5
- import type { Duration } from 'moment';
6
- import { TypedRangeTextComponent } from './TypedRangeTextComponent.mjs';
7
- /**
8
- * A component that displays and edits a time.
9
- *
10
- * You can add this component using {@link SettingEx.addTime}.
11
- *
12
- * In order to add the styles for the component, use {@link initPluginContext} in your plugin's `onload()` function.
13
- *
14
- * Alternatively, you can copy styles from {@link https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css}.
15
- */
16
- export declare class TimeComponent extends TypedRangeTextComponent<Duration> {
17
- /**
18
- * Creates a new time component.
19
- *
20
- * @param containerEl - The container element of the component.
21
- */
22
- constructor(containerEl: HTMLElement);
23
- /**
24
- * Converts a string to a time.
25
- *
26
- * @param str - The string to convert.
27
- * @returns The date.
28
- */
29
- valueFromString(str: string): Duration;
30
- /**
31
- * Converts a time to a string.
32
- *
33
- * @param value - The time to convert.
34
- * @returns The string.
35
- */
36
- valueToString(value: Duration): string;
37
- }
1
+ export * from './TimeComponent.cjs';