@mnaoumov/obsidian-lib 1.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cjs/__merged.cjs +15 -1
- package/dist/lib/cjs/__merged.d.cts +5 -3
- package/dist/lib/cjs/app.cjs +1 -1
- package/dist/lib/cjs/attachment-path.cjs +62 -9
- package/dist/lib/cjs/attachment-path.d.cts +21 -43
- package/dist/lib/cjs/attachment-unit-folder.cjs +1 -1
- package/dist/lib/cjs/attachment-unit-folder.d.cts +8 -9
- package/dist/lib/cjs/components/plugin-notice-component.cjs +7 -2
- package/dist/lib/cjs/components/plugin-notice-component.d.cts +3 -0
- package/dist/lib/cjs/components/release-notes-component.cjs +3 -2
- package/dist/lib/cjs/components/settings-migration-component.cjs +5 -5
- package/dist/lib/cjs/components/settings-migration-component.d.cts +6 -4
- package/dist/lib/cjs/dataview.cjs +1 -1
- package/dist/lib/cjs/dataview.d.cts +9 -3
- package/dist/lib/cjs/demo-vault-helper.cjs +3 -2
- package/dist/lib/cjs/desktop-demo-vault-opener.cjs +9 -8
- package/dist/lib/cjs/file-system.cjs +6 -1
- package/dist/lib/cjs/file-system.d.cts +7 -0
- package/dist/lib/cjs/generated-during-build.cjs +2 -2
- package/dist/lib/cjs/metadata-cache.cjs +25 -7
- package/dist/lib/cjs/metadata-cache.d.cts +8 -19
- package/dist/lib/cjs/plugin/index.cjs +4 -1
- package/dist/lib/cjs/plugin/index.d.cts +1 -0
- package/dist/lib/cjs/plugin/plugin-api-schema.cjs +171 -0
- package/dist/lib/cjs/plugin/plugin-api-schema.d.cts +59 -0
- package/dist/lib/cjs/plugin/plugin-api.cjs +7 -1
- package/dist/lib/cjs/plugin/plugin-api.d.cts +83 -10
- package/dist/lib/cjs/plugin/settings-migration-api.cjs +30 -1
- package/dist/lib/cjs/plugin/settings-migration-api.d.cts +16 -3
- package/dist/lib/esm/__merged.d.mts +5 -3
- package/dist/lib/esm/__merged.mjs +15 -1
- package/dist/lib/esm/app.mjs +1 -1
- package/dist/lib/esm/attachment-path.d.mts +21 -43
- package/dist/lib/esm/attachment-path.mjs +65 -9
- package/dist/lib/esm/attachment-unit-folder.d.mts +8 -9
- package/dist/lib/esm/attachment-unit-folder.mjs +1 -1
- package/dist/lib/esm/components/plugin-notice-component.d.mts +3 -0
- package/dist/lib/esm/components/plugin-notice-component.mjs +7 -2
- package/dist/lib/esm/components/release-notes-component.mjs +6 -2
- package/dist/lib/esm/components/settings-migration-component.d.mts +6 -4
- package/dist/lib/esm/components/settings-migration-component.mjs +5 -5
- package/dist/lib/esm/dataview.d.mts +9 -3
- package/dist/lib/esm/dataview.mjs +1 -1
- package/dist/lib/esm/demo-vault-helper.mjs +3 -2
- package/dist/lib/esm/desktop-demo-vault-opener.mjs +12 -8
- package/dist/lib/esm/file-system.d.mts +7 -0
- package/dist/lib/esm/file-system.mjs +5 -1
- package/dist/lib/esm/generated-during-build.mjs +2 -2
- package/dist/lib/esm/metadata-cache.d.mts +8 -19
- package/dist/lib/esm/metadata-cache.mjs +30 -8
- package/dist/lib/esm/plugin/index.d.mts +1 -0
- package/dist/lib/esm/plugin/index.mjs +3 -1
- package/dist/lib/esm/plugin/plugin-api-schema.d.mts +59 -0
- package/dist/lib/esm/plugin/plugin-api-schema.mjs +73 -0
- package/dist/lib/esm/plugin/plugin-api.d.mts +83 -10
- package/dist/lib/esm/plugin/plugin-api.mjs +6 -1
- package/dist/lib/esm/plugin/settings-migration-api.d.mts +16 -3
- package/dist/lib/esm/plugin/settings-migration-api.mjs +25 -1
- package/dist/styles.css +4 -1
- package/package.json +4 -135
- package/plugin/plugin-api-schema/package.json +6 -0
- package/@types/dataview/api/data-array/package.json +0 -4
- package/@types/dataview/api/extensions/package.json +0 -4
- package/@types/dataview/api/inline-api/package.json +0 -4
- package/@types/dataview/api/plugin-api/package.json +0 -4
- package/@types/dataview/api/result/package.json +0 -4
- package/@types/dataview/data-import/common/package.json +0 -4
- package/@types/dataview/data-import/csv/package.json +0 -4
- package/@types/dataview/data-import/inline-field/package.json +0 -4
- package/@types/dataview/data-import/markdown-file/package.json +0 -4
- package/@types/dataview/data-import/persister/package.json +0 -4
- package/@types/dataview/data-import/web-worker/import-entry/package.json +0 -4
- package/@types/dataview/data-import/web-worker/import-impl/package.json +0 -4
- package/@types/dataview/data-import/web-worker/import-manager/package.json +0 -4
- package/@types/dataview/data-index/index/package.json +0 -4
- package/@types/dataview/data-index/package.json +0 -4
- package/@types/dataview/data-index/resolver/package.json +0 -4
- package/@types/dataview/data-index/source/package.json +0 -4
- package/@types/dataview/data-model/markdown/package.json +0 -4
- package/@types/dataview/data-model/serialized/markdown/package.json +0 -4
- package/@types/dataview/data-model/transferable/package.json +0 -4
- package/@types/dataview/data-model/value/package.json +0 -4
- package/@types/dataview/expression/binaryop/package.json +0 -4
- package/@types/dataview/expression/context/package.json +0 -4
- package/@types/dataview/expression/field/package.json +0 -4
- package/@types/dataview/expression/functions/package.json +0 -4
- package/@types/dataview/expression/parse/package.json +0 -4
- package/@types/dataview/index/package.json +0 -4
- package/@types/dataview/main/package.json +0 -4
- package/@types/dataview/package.json +0 -4
- package/@types/dataview/query/engine/package.json +0 -4
- package/@types/dataview/query/parse/package.json +0 -4
- package/@types/dataview/query/query/package.json +0 -4
- package/@types/dataview/settings/package.json +0 -4
- package/@types/dataview/typings/obsidian-ex/package.json +0 -4
- package/@types/dataview/typings/workers/package.json +0 -4
- package/@types/dataview/ui/export/markdown/package.json +0 -4
- package/@types/dataview/ui/lp-render/package.json +0 -4
- package/@types/dataview/ui/markdown/package.json +0 -4
- package/@types/dataview/ui/refreshable-view/package.json +0 -4
- package/@types/dataview/ui/render/package.json +0 -4
- package/@types/dataview/ui/views/calendar-view/package.json +0 -4
- package/@types/dataview/ui/views/inline-field-live-preview/package.json +0 -4
- package/@types/dataview/ui/views/inline-view/package.json +0 -4
- package/@types/dataview/ui/views/js-view/package.json +0 -4
- package/@types/dataview/ui/views/list-view/package.json +0 -4
- package/@types/dataview/ui/views/table-view/package.json +0 -4
- package/@types/dataview/ui/views/task-view/package.json +0 -4
- package/@types/dataview/util/hash/package.json +0 -4
- package/@types/dataview/util/locale/package.json +0 -4
- package/@types/dataview/util/media/package.json +0 -4
- package/@types/dataview/util/normalize/package.json +0 -4
- package/dist/lib/cjs/@types/dataview/api/data-array.d.cts +0 -137
- package/dist/lib/cjs/@types/dataview/api/extensions.d.cts +0 -16
- package/dist/lib/cjs/@types/dataview/api/inline-api.d.cts +0 -187
- package/dist/lib/cjs/@types/dataview/api/plugin-api.d.cts +0 -210
- package/dist/lib/cjs/@types/dataview/api/result.d.cts +0 -39
- package/dist/lib/cjs/@types/dataview/data-import/common.d.cts +0 -4
- package/dist/lib/cjs/@types/dataview/data-import/csv.d.cts +0 -4
- package/dist/lib/cjs/@types/dataview/data-import/inline-field.d.cts +0 -43
- package/dist/lib/cjs/@types/dataview/data-import/markdown-file.d.cts +0 -53
- package/dist/lib/cjs/@types/dataview/data-import/persister.d.cts +0 -33
- package/dist/lib/cjs/@types/dataview/data-import/web-worker/import-entry.d.cts +0 -2
- package/dist/lib/cjs/@types/dataview/data-import/web-worker/import-impl.d.cts +0 -7
- package/dist/lib/cjs/@types/dataview/data-import/web-worker/import-manager.d.cts +0 -38
- package/dist/lib/cjs/@types/dataview/data-index/index.d.cts +0 -187
- package/dist/lib/cjs/@types/dataview/data-index/resolver.d.cts +0 -24
- package/dist/lib/cjs/@types/dataview/data-index/source.d.cts +0 -72
- package/dist/lib/cjs/@types/dataview/data-model/markdown.d.cts +0 -116
- package/dist/lib/cjs/@types/dataview/data-model/serialized/markdown.d.cts +0 -107
- package/dist/lib/cjs/@types/dataview/data-model/transferable.d.cts +0 -8
- package/dist/lib/cjs/@types/dataview/data-model/value.d.cts +0 -176
- package/dist/lib/cjs/@types/dataview/expression/binaryop.d.cts +0 -44
- package/dist/lib/cjs/@types/dataview/expression/context.d.cts +0 -50
- package/dist/lib/cjs/@types/dataview/expression/field.d.cts +0 -83
- package/dist/lib/cjs/@types/dataview/expression/functions.d.cts +0 -150
- package/dist/lib/cjs/@types/dataview/expression/parse.d.cts +0 -164
- package/dist/lib/cjs/@types/dataview/index.d.cts +0 -56
- package/dist/lib/cjs/@types/dataview/main.d.cts +0 -53
- package/dist/lib/cjs/@types/dataview/query/engine.d.cts +0 -104
- package/dist/lib/cjs/@types/dataview/query/parse.d.cts +0 -45
- package/dist/lib/cjs/@types/dataview/query/query.d.cts +0 -96
- package/dist/lib/cjs/@types/dataview/settings.d.cts +0 -61
- package/dist/lib/cjs/@types/dataview/typings/obsidian-ex.d.cts +0 -29
- package/dist/lib/cjs/@types/dataview/typings/workers.d.cts +0 -5
- package/dist/lib/cjs/@types/dataview/ui/export/markdown.d.cts +0 -16
- package/dist/lib/cjs/@types/dataview/ui/lp-render.d.cts +0 -38
- package/dist/lib/cjs/@types/dataview/ui/markdown.d.cts +0 -87
- package/dist/lib/cjs/@types/dataview/ui/refreshable-view.d.cts +0 -19
- package/dist/lib/cjs/@types/dataview/ui/render.d.cts +0 -34
- package/dist/lib/cjs/@types/dataview/ui/views/calendar-view.d.cts +0 -18
- package/dist/lib/cjs/@types/dataview/ui/views/inline-field-live-preview.d.cts +0 -43
- package/dist/lib/cjs/@types/dataview/ui/views/inline-view.d.cts +0 -29
- package/dist/lib/cjs/@types/dataview/ui/views/js-view.d.cts +0 -24
- package/dist/lib/cjs/@types/dataview/ui/views/list-view.d.cts +0 -26
- package/dist/lib/cjs/@types/dataview/ui/views/table-view.d.cts +0 -29
- package/dist/lib/cjs/@types/dataview/ui/views/task-view.d.cts +0 -52
- package/dist/lib/cjs/@types/dataview/util/hash.d.cts +0 -2
- package/dist/lib/cjs/@types/dataview/util/locale.d.cts +0 -3
- package/dist/lib/cjs/@types/dataview/util/media.d.cts +0 -7
- package/dist/lib/cjs/@types/dataview/util/normalize.d.cts +0 -45
- package/dist/lib/esm/@types/dataview/api/data-array.d.mts +0 -137
- package/dist/lib/esm/@types/dataview/api/extensions.d.mts +0 -16
- package/dist/lib/esm/@types/dataview/api/inline-api.d.mts +0 -187
- package/dist/lib/esm/@types/dataview/api/plugin-api.d.mts +0 -210
- package/dist/lib/esm/@types/dataview/api/result.d.mts +0 -39
- package/dist/lib/esm/@types/dataview/data-import/common.d.mts +0 -4
- package/dist/lib/esm/@types/dataview/data-import/csv.d.mts +0 -4
- package/dist/lib/esm/@types/dataview/data-import/inline-field.d.mts +0 -43
- package/dist/lib/esm/@types/dataview/data-import/markdown-file.d.mts +0 -53
- package/dist/lib/esm/@types/dataview/data-import/persister.d.mts +0 -33
- package/dist/lib/esm/@types/dataview/data-import/web-worker/import-entry.d.mts +0 -2
- package/dist/lib/esm/@types/dataview/data-import/web-worker/import-impl.d.mts +0 -7
- package/dist/lib/esm/@types/dataview/data-import/web-worker/import-manager.d.mts +0 -38
- package/dist/lib/esm/@types/dataview/data-index/index.d.mts +0 -187
- package/dist/lib/esm/@types/dataview/data-index/resolver.d.mts +0 -24
- package/dist/lib/esm/@types/dataview/data-index/source.d.mts +0 -72
- package/dist/lib/esm/@types/dataview/data-model/markdown.d.mts +0 -116
- package/dist/lib/esm/@types/dataview/data-model/serialized/markdown.d.mts +0 -107
- package/dist/lib/esm/@types/dataview/data-model/transferable.d.mts +0 -8
- package/dist/lib/esm/@types/dataview/data-model/value.d.mts +0 -176
- package/dist/lib/esm/@types/dataview/expression/binaryop.d.mts +0 -44
- package/dist/lib/esm/@types/dataview/expression/context.d.mts +0 -50
- package/dist/lib/esm/@types/dataview/expression/field.d.mts +0 -83
- package/dist/lib/esm/@types/dataview/expression/functions.d.mts +0 -150
- package/dist/lib/esm/@types/dataview/expression/parse.d.mts +0 -164
- package/dist/lib/esm/@types/dataview/index.d.mts +0 -56
- package/dist/lib/esm/@types/dataview/main.d.mts +0 -53
- package/dist/lib/esm/@types/dataview/query/engine.d.mts +0 -104
- package/dist/lib/esm/@types/dataview/query/parse.d.mts +0 -45
- package/dist/lib/esm/@types/dataview/query/query.d.mts +0 -96
- package/dist/lib/esm/@types/dataview/settings.d.mts +0 -61
- package/dist/lib/esm/@types/dataview/typings/obsidian-ex.d.mts +0 -29
- package/dist/lib/esm/@types/dataview/typings/workers.d.mts +0 -5
- package/dist/lib/esm/@types/dataview/ui/export/markdown.d.mts +0 -16
- package/dist/lib/esm/@types/dataview/ui/lp-render.d.mts +0 -38
- package/dist/lib/esm/@types/dataview/ui/markdown.d.mts +0 -87
- package/dist/lib/esm/@types/dataview/ui/refreshable-view.d.mts +0 -19
- package/dist/lib/esm/@types/dataview/ui/render.d.mts +0 -34
- package/dist/lib/esm/@types/dataview/ui/views/calendar-view.d.mts +0 -18
- package/dist/lib/esm/@types/dataview/ui/views/inline-field-live-preview.d.mts +0 -43
- package/dist/lib/esm/@types/dataview/ui/views/inline-view.d.mts +0 -29
- package/dist/lib/esm/@types/dataview/ui/views/js-view.d.mts +0 -24
- package/dist/lib/esm/@types/dataview/ui/views/list-view.d.mts +0 -26
- package/dist/lib/esm/@types/dataview/ui/views/table-view.d.mts +0 -29
- package/dist/lib/esm/@types/dataview/ui/views/task-view.d.mts +0 -52
- package/dist/lib/esm/@types/dataview/util/hash.d.mts +0 -2
- package/dist/lib/esm/@types/dataview/util/locale.d.mts +0 -3
- package/dist/lib/esm/@types/dataview/util/media.d.mts +0 -7
- package/dist/lib/esm/@types/dataview/util/normalize.d.mts +0 -45
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type {
|
|
3
|
-
RangeSet,
|
|
4
|
-
RangeValue,
|
|
5
|
-
StateField
|
|
6
|
-
} from '@codemirror/state';
|
|
7
|
-
import type {
|
|
8
|
-
DecorationSet,
|
|
9
|
-
EditorView,
|
|
10
|
-
ViewPlugin,
|
|
11
|
-
ViewUpdate
|
|
12
|
-
} from '@codemirror/view';
|
|
13
|
-
import type {
|
|
14
|
-
App,
|
|
15
|
-
Component,
|
|
16
|
-
TFile
|
|
17
|
-
} from 'obsidian';
|
|
18
|
-
import type { InlineField } from '../../data-import/inline-field.d.mjs';
|
|
19
|
-
import type { DataviewSettings } from '../../settings.d.mjs';
|
|
20
|
-
declare class InlineFieldValue extends RangeValue {
|
|
21
|
-
field: InlineField;
|
|
22
|
-
constructor(field: InlineField);
|
|
23
|
-
eq(other: InlineFieldValue): boolean;
|
|
24
|
-
}
|
|
25
|
-
/** A state field that stores the inline fields and their positions as a range set. */
|
|
26
|
-
export declare const inlineFieldsField: StateField<RangeSet<InlineFieldValue>>;
|
|
27
|
-
/** Create a view plugin that renders inline fields in live preview just as in the reading view. */
|
|
28
|
-
export declare const replaceInlineFieldsInLivePreview: (app: App, settings: DataviewSettings) => ViewPlugin<{
|
|
29
|
-
decorations: DecorationSet;
|
|
30
|
-
component: Component;
|
|
31
|
-
destroy(): void;
|
|
32
|
-
buildDecorations(view: EditorView): DecorationSet;
|
|
33
|
-
update(update: ViewUpdate): void;
|
|
34
|
-
updateDecorations(view: EditorView): void;
|
|
35
|
-
removeDeco(start: number, end: number): void;
|
|
36
|
-
addDeco(start: number, end: number, field: InlineField, file: TFile, view: EditorView): void;
|
|
37
|
-
}>;
|
|
38
|
-
/**
|
|
39
|
-
* A state effect that represents the workspace's layout change.
|
|
40
|
-
* Mainly intended to detect when the user switches between live preview and source mode.
|
|
41
|
-
*/
|
|
42
|
-
export declare const workspaceLayoutChangeEffect: import('@codemirror/state').StateEffectType<null>;
|
|
43
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type { App } from 'obsidian';
|
|
3
|
-
import type { FullIndex } from '../../data-index/index.d.mjs';
|
|
4
|
-
import type { Field } from '../../expression/field.d.mjs';
|
|
5
|
-
import type { DataviewSettings } from '../../settings.d.mjs';
|
|
6
|
-
import type { DataviewRefreshableRenderer } from '../refreshable-view.d.mjs';
|
|
7
|
-
/** Refreshable renderer which renders inline instead of in a div. */
|
|
8
|
-
export declare class DataviewInlineRenderer extends DataviewRefreshableRenderer {
|
|
9
|
-
field: Field;
|
|
10
|
-
fieldText: string;
|
|
11
|
-
container: HTMLElement;
|
|
12
|
-
target: HTMLElement;
|
|
13
|
-
index: FullIndex;
|
|
14
|
-
origin: string;
|
|
15
|
-
settings: DataviewSettings;
|
|
16
|
-
app: App;
|
|
17
|
-
errorbox?: HTMLElement;
|
|
18
|
-
constructor(
|
|
19
|
-
field: Field,
|
|
20
|
-
fieldText: string,
|
|
21
|
-
container: HTMLElement,
|
|
22
|
-
target: HTMLElement,
|
|
23
|
-
index: FullIndex,
|
|
24
|
-
origin: string,
|
|
25
|
-
settings: DataviewSettings,
|
|
26
|
-
app: App
|
|
27
|
-
);
|
|
28
|
-
render(): Promise<void>;
|
|
29
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type { DataviewApi } from '../../api/plugin-api.d.mjs';
|
|
3
|
-
import type { DataviewRefreshableRenderer } from '../refreshable-view.d.mjs';
|
|
4
|
-
export declare class DataviewJSRenderer extends DataviewRefreshableRenderer {
|
|
5
|
-
api: DataviewApi;
|
|
6
|
-
script: string;
|
|
7
|
-
container: HTMLElement;
|
|
8
|
-
origin: string;
|
|
9
|
-
static PREAMBLE: string;
|
|
10
|
-
constructor(api: DataviewApi, script: string, container: HTMLElement, origin: string);
|
|
11
|
-
render(): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
/** Inline JS renderer accessible using '=$' by default. */
|
|
14
|
-
export declare class DataviewInlineJSRenderer extends DataviewRefreshableRenderer {
|
|
15
|
-
api: DataviewApi;
|
|
16
|
-
script: string;
|
|
17
|
-
container: HTMLElement;
|
|
18
|
-
target: HTMLElement;
|
|
19
|
-
origin: string;
|
|
20
|
-
static PREAMBLE: string;
|
|
21
|
-
errorbox?: HTMLElement;
|
|
22
|
-
constructor(api: DataviewApi, script: string, container: HTMLElement, target: HTMLElement, origin: string);
|
|
23
|
-
render(): Promise<void>;
|
|
24
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type { MarkdownRenderChild } from 'obsidian';
|
|
3
|
-
import type { h } from 'preact';
|
|
4
|
-
import type { Literal } from '../../data-model/value.d.mjs';
|
|
5
|
-
import type { Query } from '../../query/query.d.mjs';
|
|
6
|
-
import type { DataviewInit } from '../markdown.d.mjs';
|
|
7
|
-
export declare function ListGrouping({ items, sourcePath }: {
|
|
8
|
-
items: Literal[];
|
|
9
|
-
sourcePath: string;
|
|
10
|
-
}): h.JSX.Element;
|
|
11
|
-
export type ListViewState = {
|
|
12
|
-
state: 'loading';
|
|
13
|
-
} | {
|
|
14
|
-
state: 'error';
|
|
15
|
-
error: string;
|
|
16
|
-
} | {
|
|
17
|
-
state: 'ready';
|
|
18
|
-
items: Literal[];
|
|
19
|
-
};
|
|
20
|
-
/** Pure view over list elements. */
|
|
21
|
-
export declare function ListView({ query, sourcePath }: {
|
|
22
|
-
query: Query;
|
|
23
|
-
sourcePath: string;
|
|
24
|
-
}): h.JSX.Element;
|
|
25
|
-
export declare function createListView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
|
26
|
-
export declare function createFixedListView(init: DataviewInit, elements: Literal[], sourcePath: string): MarkdownRenderChild;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type { MarkdownRenderChild } from 'obsidian';
|
|
3
|
-
import type { h } from 'preact';
|
|
4
|
-
import type { Literal } from '../../data-model/value.d.mjs';
|
|
5
|
-
import type { Query } from '../../query/query.d.mjs';
|
|
6
|
-
import type { DataviewInit } from '../markdown.d.mjs';
|
|
7
|
-
/** Simple table over headings and corresponding values. */
|
|
8
|
-
export declare function TableGrouping({ headings, values, sourcePath }: {
|
|
9
|
-
headings: string[];
|
|
10
|
-
values: Literal[][];
|
|
11
|
-
sourcePath: string;
|
|
12
|
-
}): h.JSX.Element;
|
|
13
|
-
export type TableViewState = {
|
|
14
|
-
state: 'loading';
|
|
15
|
-
} | {
|
|
16
|
-
state: 'error';
|
|
17
|
-
error: string;
|
|
18
|
-
} | {
|
|
19
|
-
state: 'ready';
|
|
20
|
-
headings: string[];
|
|
21
|
-
values: Literal[][];
|
|
22
|
-
};
|
|
23
|
-
/** Pure view over list elements. */
|
|
24
|
-
export declare function TableView({ query, sourcePath }: {
|
|
25
|
-
query: Query;
|
|
26
|
-
sourcePath: string;
|
|
27
|
-
}): h.JSX.Element;
|
|
28
|
-
export declare function createTableView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
|
29
|
-
export declare function createFixedTableView(init: DataviewInit, headings: string[], values: Literal[][], sourcePath: string): MarkdownRenderChild;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../library.d.mts" />
|
|
2
|
-
import type {
|
|
3
|
-
MarkdownRenderChild,
|
|
4
|
-
Vault
|
|
5
|
-
} from 'obsidian';
|
|
6
|
-
import type { h } from 'preact';
|
|
7
|
-
import type {
|
|
8
|
-
SListItem,
|
|
9
|
-
STask
|
|
10
|
-
} from '../../data-model/serialized/markdown.d.mjs';
|
|
11
|
-
import type { Grouping } from '../../data-model/value.d.mjs';
|
|
12
|
-
import type { Query } from '../../query/query.d.mjs';
|
|
13
|
-
import type { DataviewInit } from '../markdown.d.mjs';
|
|
14
|
-
export type TaskViewState = {
|
|
15
|
-
state: 'loading';
|
|
16
|
-
} | {
|
|
17
|
-
state: 'error';
|
|
18
|
-
error: string;
|
|
19
|
-
} | {
|
|
20
|
-
state: 'ready';
|
|
21
|
-
items: Grouping<SListItem>;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Pure view over (potentially grouped) tasks and list items which allows for checking/unchecking tasks and manipulating
|
|
25
|
-
* the task view.
|
|
26
|
-
*/
|
|
27
|
-
export declare function TaskView({ query, sourcePath }: {
|
|
28
|
-
query: Query;
|
|
29
|
-
sourcePath: string;
|
|
30
|
-
}): h.JSX.Element;
|
|
31
|
-
export declare function createTaskView(init: DataviewInit, query: Query, sourcePath: string): MarkdownRenderChild;
|
|
32
|
-
export declare function createFixedTaskView(init: DataviewInit, items: Grouping<SListItem>, sourcePath: string): MarkdownRenderChild;
|
|
33
|
-
/**
|
|
34
|
-
* Removes tasks from a list if they are already present by being a child of another task. Fixes child pointers.
|
|
35
|
-
* Retains original order of input list.
|
|
36
|
-
*/
|
|
37
|
-
export declare function nestItems(raw: SListItem[]): [SListItem[], Set<string>];
|
|
38
|
-
/**
|
|
39
|
-
* Recursively removes tasks from each subgroup if they are already present by being a child of another task.
|
|
40
|
-
* Fixes child pointers. Retains original order of input list.
|
|
41
|
-
*/
|
|
42
|
-
export declare function nestGroups(raw: Grouping<SListItem>): Grouping<SListItem>;
|
|
43
|
-
/** Set the task completion key on check. */
|
|
44
|
-
export declare function setTaskCompletion(
|
|
45
|
-
originalText: string,
|
|
46
|
-
useEmojiShorthand: boolean,
|
|
47
|
-
completionKey: string,
|
|
48
|
-
completionDateFormat: string,
|
|
49
|
-
complete: boolean
|
|
50
|
-
): string;
|
|
51
|
-
/** Rewrite a task with the given completion status and new text. */
|
|
52
|
-
export declare function rewriteTask(vault: Vault, task: STask, desiredStatus: string, desiredText?: string): Promise<void>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../library.d.mts" />
|
|
2
|
-
import type { Link } from '../data-model/value.d.mjs';
|
|
3
|
-
export declare const IMAGE_EXTENSIONS: Readonly<Set<string>>;
|
|
4
|
-
/** Determines if the given link points to an embedded image. */
|
|
5
|
-
export declare function isImageEmbed(link: Link): boolean;
|
|
6
|
-
/** Extract text of the form 'WxH' or 'W' from the display of a link. */
|
|
7
|
-
export declare function extractImageDimensions(link: Link): [number, number] | [number] | undefined;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../library.d.mts" />
|
|
2
|
-
import type {
|
|
3
|
-
DateTime,
|
|
4
|
-
Duration
|
|
5
|
-
} from 'luxon';
|
|
6
|
-
import type { Result } from '../api/result.d.mjs';
|
|
7
|
-
import type { QuerySettings } from '../settings.d.mjs';
|
|
8
|
-
/** Normalize a duration to all of the proper units. */
|
|
9
|
-
export declare function normalizeDuration(dur: Duration): Duration;
|
|
10
|
-
/** Strip the time components of a date time object. */
|
|
11
|
-
export declare function stripTime(dt: DateTime): DateTime;
|
|
12
|
-
/** Try to extract a YYYYMMDD date from a string. */
|
|
13
|
-
export declare function extractDate(str: string): DateTime | undefined;
|
|
14
|
-
/** Get the folder containing the given path (i.e., like computing 'path/..'). */
|
|
15
|
-
export declare function getParentFolder(path: string): string;
|
|
16
|
-
/** Get the file name for the file referenced in the given path, by stripping the parent folders. */
|
|
17
|
-
export declare function getFileName(path: string): string;
|
|
18
|
-
/** Get the "title" for a file, by stripping other parts of the path as well as the extension. */
|
|
19
|
-
export declare function getFileTitle(path: string): string;
|
|
20
|
-
/** Get the extension of a file from the file path. */
|
|
21
|
-
export declare function getExtension(path: string): string;
|
|
22
|
-
/** Parse all subtags out of the given tag. I.e., #hello/i/am would yield [#hello/i/am, #hello/i, #hello]. */
|
|
23
|
-
export declare function extractSubtags(tag: string): string[];
|
|
24
|
-
/** Try calling the given function; on failure, return the error message. */
|
|
25
|
-
export declare function tryOrPropogate<T>(func: () => Result<T, string>): Result<T, string>;
|
|
26
|
-
/** Try asynchronously calling the given function; on failure, return the error message. */
|
|
27
|
-
export declare function asyncTryOrPropogate<T>(func: () => Promise<Result<T, string>>): Promise<Result<T, string>>;
|
|
28
|
-
/**
|
|
29
|
-
* Escape regex characters in a string.
|
|
30
|
-
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions.
|
|
31
|
-
*/
|
|
32
|
-
export declare function escapeRegex(str: string): string;
|
|
33
|
-
/** Convert an arbitrary variable name into something JS/query friendly. */
|
|
34
|
-
export declare function canonicalizeVarName(name: string): string;
|
|
35
|
-
/**
|
|
36
|
-
* Normalizes the text in a header to be something that is actually linkable to. This mimics
|
|
37
|
-
* how Obsidian does it's normalization, collapsing repeated spaces and stripping out control characters.
|
|
38
|
-
*/
|
|
39
|
-
export declare function normalizeHeaderForLink(header: string): string;
|
|
40
|
-
/** Render a DateTime in a minimal format to save space. */
|
|
41
|
-
export declare function renderMinimalDate(time: DateTime, settings: QuerySettings, locale: string): string;
|
|
42
|
-
/** Render a duration in a minimal format to save space. */
|
|
43
|
-
export declare function renderMinimalDuration(dur: Duration): string;
|
|
44
|
-
/** Determine if two sets are equal in contents. */
|
|
45
|
-
export declare function setsEqual<T>(first: Set<T>, second: Set<T>): boolean;
|