obsidian-dev-utils 16.3.0 → 16.4.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.
- package/CHANGELOG.md +12 -0
- package/README.md +21 -2
- package/dist/bin/cli.cjs +1 -1
- package/dist/dprint.json +22 -0
- package/dist/lib/@types/debug.d.ts +1 -1
- package/dist/lib/Async.cjs +10 -5
- package/dist/lib/Debug.cjs +4 -2
- package/dist/lib/Library.cjs +1 -1
- package/dist/lib/Object.cjs +1 -1
- package/dist/lib/Object.d.ts +1 -1
- package/dist/lib/Path.cjs +1 -1
- package/dist/lib/Path.d.ts +5 -5
- package/dist/lib/obsidian/@types/Dataview/api/data-array.d.ts +116 -114
- package/dist/lib/obsidian/@types/Dataview/api/extensions.d.ts +8 -8
- package/dist/lib/obsidian/@types/Dataview/api/inline-api.d.ts +172 -151
- package/dist/lib/obsidian/@types/Dataview/api/plugin-api.d.ts +183 -166
- package/dist/lib/obsidian/@types/Dataview/api/result.d.ts +28 -28
- package/dist/lib/obsidian/@types/Dataview/data-import/csv.d.ts +1 -1
- package/dist/lib/obsidian/@types/Dataview/data-import/inline-field.d.ts +15 -15
- package/dist/lib/obsidian/@types/Dataview/data-import/markdown-file.d.ts +23 -7
- package/dist/lib/obsidian/@types/Dataview/data-import/persister.d.ts +25 -25
- package/dist/lib/obsidian/@types/Dataview/data-import/web-worker/import-impl.d.ts +5 -2
- package/dist/lib/obsidian/@types/Dataview/data-import/web-worker/import-manager.d.ts +30 -25
- package/dist/lib/obsidian/@types/Dataview/data-index/index.d.ts +156 -149
- package/dist/lib/obsidian/@types/Dataview/data-index/resolver.d.ts +9 -6
- package/dist/lib/obsidian/@types/Dataview/data-index/source.d.ts +43 -43
- package/dist/lib/obsidian/@types/Dataview/data-model/markdown.d.ts +105 -99
- package/dist/lib/obsidian/@types/Dataview/data-model/serialized/markdown.d.ts +92 -89
- package/dist/lib/obsidian/@types/Dataview/data-model/transferable.d.ts +4 -4
- package/dist/lib/obsidian/@types/Dataview/data-model/value.d.ts +139 -112
- package/dist/lib/obsidian/@types/Dataview/expression/binaryop.d.ts +31 -17
- package/dist/lib/obsidian/@types/Dataview/expression/context.d.ts +39 -33
- package/dist/lib/obsidian/@types/Dataview/expression/field.d.ts +46 -46
- package/dist/lib/obsidian/@types/Dataview/expression/functions.d.ts +120 -108
- package/dist/lib/obsidian/@types/Dataview/expression/parse.d.ts +135 -115
- package/dist/lib/obsidian/@types/Dataview/index.d.ts +48 -14
- package/dist/lib/obsidian/@types/Dataview/main.d.ts +50 -42
- package/dist/lib/obsidian/@types/Dataview/query/engine.d.ts +60 -44
- package/dist/lib/obsidian/@types/Dataview/query/parse.d.ts +31 -18
- package/dist/lib/obsidian/@types/Dataview/query/query.d.ts +45 -45
- package/dist/lib/obsidian/@types/Dataview/settings.d.ts +50 -50
- package/dist/lib/obsidian/@types/Dataview/typings/obsidian-ex.d.ts +16 -16
- package/dist/lib/obsidian/@types/Dataview/typings/workers.d.ts +3 -3
- package/dist/lib/obsidian/@types/Dataview/ui/export/markdown.d.ts +9 -3
- package/dist/lib/obsidian/@types/Dataview/ui/lp-render.d.ts +34 -21
- package/dist/lib/obsidian/@types/Dataview/ui/markdown.d.ts +49 -36
- package/dist/lib/obsidian/@types/Dataview/ui/refreshable-view.d.ts +15 -12
- package/dist/lib/obsidian/@types/Dataview/ui/render.d.ts +27 -6
- package/dist/lib/obsidian/@types/Dataview/ui/views/calendar-view.d.ts +15 -15
- package/dist/lib/obsidian/@types/Dataview/ui/views/inline-field-live-preview.d.ts +30 -17
- package/dist/lib/obsidian/@types/Dataview/ui/views/inline-view.d.ts +25 -16
- package/dist/lib/obsidian/@types/Dataview/ui/views/js-view.d.ts +18 -18
- package/dist/lib/obsidian/@types/Dataview/ui/views/list-view.d.ts +14 -14
- package/dist/lib/obsidian/@types/Dataview/ui/views/table-view.d.ts +17 -17
- package/dist/lib/obsidian/@types/Dataview/ui/views/task-view.d.ts +26 -14
- package/dist/lib/obsidian/@types/Dataview/util/media.d.ts +1 -1
- package/dist/lib/obsidian/@types/Dataview/util/normalize.d.ts +6 -3
- package/dist/lib/obsidian/App.cjs +1 -1
- package/dist/lib/obsidian/AttachmentPath.cjs +1 -1
- package/dist/lib/obsidian/Dataview.cjs +26 -17
- package/dist/lib/obsidian/FileChange.cjs +1 -1
- package/dist/lib/obsidian/FileChange.d.ts +4 -4
- package/dist/lib/obsidian/FileManager.cjs +2 -2
- package/dist/lib/obsidian/Link.cjs +1 -1
- package/dist/lib/obsidian/Link.d.ts +4 -4
- package/dist/lib/obsidian/Markdown.cjs +17 -1
- package/dist/lib/obsidian/Markdown.d.ts +11 -1
- package/dist/lib/obsidian/MarkdownCodeBlockProcessor.cjs +1 -1
- package/dist/lib/obsidian/MetadataCache.cjs +7 -3
- package/dist/lib/obsidian/Plugin/PluginSettingsTabBase.cjs +1 -1
- package/dist/lib/obsidian/Reference.cjs +1 -1
- package/dist/lib/obsidian/Reference.d.ts +6 -6
- package/dist/lib/obsidian/RenameDeleteHandler.cjs +7 -3
- package/dist/lib/obsidian/RenameDeleteHandler.d.ts +2 -2
- package/dist/lib/obsidian/Vault.cjs +1 -1
- package/dist/lib/obsidian/VaultEx.cjs +1 -1
- package/dist/lib/scripts/ESLint/ESLint.cjs +4 -2
- package/dist/lib/scripts/ESLint/eslint.config.cjs +5 -2
- package/dist/lib/scripts/Fs.cjs +1 -1
- package/dist/lib/scripts/JSON.cjs +1 -1
- package/dist/lib/scripts/Npm.cjs +1 -1
- package/dist/lib/scripts/ObsidianDevUtilsRepoPaths.cjs +2 -1
- package/dist/lib/scripts/ObsidianDevUtilsRepoPaths.d.ts +2 -0
- package/dist/lib/scripts/Root.cjs +3 -3
- package/dist/lib/scripts/Root.d.ts +2 -1
- package/dist/lib/scripts/cli.cjs +23 -18
- package/dist/lib/scripts/esbuild/ObsidianPluginBuilder.cjs +5 -3
- package/dist/lib/scripts/esbuild/fixSourceMapsPlugin.cjs +1 -1
- package/dist/lib/scripts/esbuild/preprocessPlugin.cjs +1 -1
- package/dist/lib/scripts/format.cjs +70 -0
- package/dist/lib/scripts/format.d.ts +10 -0
- package/dist/lib/scripts/index.cjs +4 -1
- package/dist/lib/scripts/index.d.ts +1 -0
- package/dist/lib/scripts/version.cjs +18 -6
- package/package.json +13 -10
- package/dist/obsidian-dev-utils-16.3.0.tgz +0 -0
@@ -1,7 +1,10 @@
|
|
1
1
|
/** Default function implementations for the expression evaluator. */
|
2
|
-
import type { Literal } from
|
3
|
-
import type {
|
4
|
-
|
2
|
+
import type { Literal } from '../data-model/value.d.ts';
|
3
|
+
import type {
|
4
|
+
LiteralReprAll,
|
5
|
+
LiteralTypeOrAll
|
6
|
+
} from './binaryop.d.ts';
|
7
|
+
import type { Context } from './context.d.ts';
|
5
8
|
/**
|
6
9
|
* A function implementation which takes in a function context and a variable number of arguments. Throws an error if an
|
7
10
|
* invalid number/type of arguments are passed.
|
@@ -11,126 +14,135 @@ export type FunctionImpl = (context: Context, ...rest: Literal[]) => Literal;
|
|
11
14
|
export type BoundFunctionImpl = (...args: Literal[]) => Literal;
|
12
15
|
/** A function variant used in the function builder which holds the argument types. */
|
13
16
|
interface FunctionVariant {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
args: LiteralTypeOrAll[];
|
18
|
+
varargs: boolean;
|
19
|
+
/** The implementing function for this specific variant. */
|
20
|
+
impl: FunctionImpl;
|
18
21
|
}
|
19
22
|
/**
|
20
23
|
* Allows for the creation of functions that check the number and type of their arguments, and dispatch
|
21
24
|
* to different implementations based on the types of the inputs.
|
22
25
|
*/
|
23
26
|
export declare class FunctionBuilder {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
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;
|
40
52
|
}
|
41
53
|
/** Utilities for managing function implementations. */
|
42
54
|
export declare namespace Functions {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
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>;
|
47
59
|
}
|
48
60
|
/**
|
49
61
|
* Collection of all defined functions; defined here so that they can be called from within dataview,
|
50
62
|
* and test code.
|
51
63
|
*/
|
52
64
|
export declare namespace DefaultFunctions {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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;
|
134
146
|
}
|
135
147
|
/** Default function implementations for the expression evaluator. */
|
136
148
|
export declare const DEFAULT_FUNCTIONS: Record<string, FunctionImpl>;
|
@@ -1,61 +1,81 @@
|
|
1
|
-
import type {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import
|
6
|
-
import type { Result } from
|
1
|
+
import type {
|
2
|
+
DateTime,
|
3
|
+
Duration
|
4
|
+
} from 'luxon';
|
5
|
+
import * as P from 'parsimmon';
|
6
|
+
import type { Result } from '../api/result.d.ts';
|
7
|
+
import type {
|
8
|
+
CsvSource,
|
9
|
+
FolderSource,
|
10
|
+
NegatedSource,
|
11
|
+
Source,
|
12
|
+
TagSource
|
13
|
+
} from '../data-index/source.d.ts';
|
14
|
+
import type {
|
15
|
+
Link,
|
16
|
+
Literal
|
17
|
+
} from '../data-model/value.d.ts';
|
18
|
+
import type {
|
19
|
+
BinaryOp,
|
20
|
+
Field,
|
21
|
+
LambdaField,
|
22
|
+
ListField,
|
23
|
+
LiteralField,
|
24
|
+
ObjectField,
|
25
|
+
VariableField
|
26
|
+
} from './field.d.ts';
|
7
27
|
/** Provides a lookup table for unit durations of the given type. */
|
8
28
|
export declare const DURATION_TYPES: {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
29
|
+
year: Duration;
|
30
|
+
years: Duration;
|
31
|
+
yr: Duration;
|
32
|
+
yrs: Duration;
|
33
|
+
month: Duration;
|
34
|
+
months: Duration;
|
35
|
+
mo: Duration;
|
36
|
+
mos: Duration;
|
37
|
+
week: Duration;
|
38
|
+
weeks: Duration;
|
39
|
+
wk: Duration;
|
40
|
+
wks: Duration;
|
41
|
+
w: Duration;
|
42
|
+
day: Duration;
|
43
|
+
days: Duration;
|
44
|
+
d: Duration;
|
45
|
+
hour: Duration;
|
46
|
+
hours: Duration;
|
47
|
+
hr: Duration;
|
48
|
+
hrs: Duration;
|
49
|
+
h: Duration;
|
50
|
+
minute: Duration;
|
51
|
+
minutes: Duration;
|
52
|
+
min: Duration;
|
53
|
+
mins: Duration;
|
54
|
+
m: Duration;
|
55
|
+
second: Duration;
|
56
|
+
seconds: Duration;
|
57
|
+
sec: Duration;
|
58
|
+
secs: Duration;
|
59
|
+
s: Duration;
|
40
60
|
};
|
41
61
|
/** Shorthand for common dates (relative to right now). */
|
42
62
|
export declare const DATE_SHORTHANDS: {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
63
|
+
now: () => DateTime;
|
64
|
+
today: () => DateTime;
|
65
|
+
yesterday: () => DateTime;
|
66
|
+
tomorrow: () => DateTime;
|
67
|
+
sow: () => DateTime;
|
68
|
+
'start-of-week': () => DateTime;
|
69
|
+
eow: () => DateTime;
|
70
|
+
'end-of-week': () => DateTime;
|
71
|
+
soy: () => DateTime;
|
72
|
+
'start-of-year': () => DateTime;
|
73
|
+
eoy: () => DateTime;
|
74
|
+
'end-of-year': () => DateTime;
|
75
|
+
som: () => DateTime;
|
76
|
+
'start-of-month': () => DateTime;
|
77
|
+
eom: () => DateTime;
|
78
|
+
'end-of-month': () => DateTime;
|
59
79
|
};
|
60
80
|
/**
|
61
81
|
* Keywords which cannot be used as variables directly. Use `row.<thing>` if it is a variable you have defined and want
|
@@ -68,72 +88,72 @@ export declare function parseInnerLink(rawlink: string): Link;
|
|
68
88
|
export declare function createBinaryParser<T, U>(child: P.Parser<T>, sep: P.Parser<U>, combine: (a: T, b: U, c: T) => T): P.Parser<T>;
|
69
89
|
export declare function chainOpt<T>(base: P.Parser<T>, ...funcs: ((r: T) => P.Parser<T>)[]): P.Parser<T>;
|
70
90
|
export type PostfixFragment = {
|
71
|
-
|
72
|
-
|
91
|
+
type: 'dot';
|
92
|
+
field: string;
|
73
93
|
} | {
|
74
|
-
|
75
|
-
|
94
|
+
type: 'index';
|
95
|
+
field: Field;
|
76
96
|
} | {
|
77
|
-
|
78
|
-
|
97
|
+
type: 'function';
|
98
|
+
fields: Field[];
|
79
99
|
};
|
80
100
|
export interface ExpressionLanguage {
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
101
|
+
number: number;
|
102
|
+
string: string;
|
103
|
+
escapeCharacter: string;
|
104
|
+
bool: boolean;
|
105
|
+
tag: string;
|
106
|
+
identifier: string;
|
107
|
+
link: Link;
|
108
|
+
embedLink: Link;
|
109
|
+
rootDate: DateTime;
|
110
|
+
dateShorthand: keyof typeof DATE_SHORTHANDS;
|
111
|
+
date: DateTime;
|
112
|
+
datePlus: DateTime;
|
113
|
+
durationType: keyof typeof DURATION_TYPES;
|
114
|
+
duration: Duration;
|
115
|
+
rawNull: string;
|
116
|
+
binaryPlusMinus: BinaryOp;
|
117
|
+
binaryMulDiv: BinaryOp;
|
118
|
+
binaryCompareOp: BinaryOp;
|
119
|
+
binaryBooleanOp: BinaryOp;
|
120
|
+
tagSource: TagSource;
|
121
|
+
csvSource: CsvSource;
|
122
|
+
folderSource: FolderSource;
|
123
|
+
parensSource: Source;
|
124
|
+
atomSource: Source;
|
125
|
+
linkIncomingSource: Source;
|
126
|
+
linkOutgoingSource: Source;
|
127
|
+
negateSource: NegatedSource;
|
128
|
+
binaryOpSource: Source;
|
129
|
+
source: Source;
|
130
|
+
variableField: VariableField;
|
131
|
+
numberField: LiteralField;
|
132
|
+
boolField: LiteralField;
|
133
|
+
stringField: LiteralField;
|
134
|
+
dateField: LiteralField;
|
135
|
+
durationField: LiteralField;
|
136
|
+
linkField: LiteralField;
|
137
|
+
nullField: LiteralField;
|
138
|
+
listField: ListField;
|
139
|
+
objectField: ObjectField;
|
140
|
+
atomInlineField: Literal;
|
141
|
+
inlineFieldList: Literal[];
|
142
|
+
inlineField: Literal;
|
143
|
+
negatedField: Field;
|
144
|
+
atomField: Field;
|
145
|
+
indexField: Field;
|
146
|
+
lambdaField: LambdaField;
|
147
|
+
dotPostfix: PostfixFragment;
|
148
|
+
indexPostfix: PostfixFragment;
|
149
|
+
functionPostfix: PostfixFragment;
|
150
|
+
binaryMulDivField: Field;
|
151
|
+
binaryPlusMinusField: Field;
|
152
|
+
binaryCompareField: Field;
|
153
|
+
binaryBooleanField: Field;
|
154
|
+
binaryOpField: Field;
|
155
|
+
parensField: Field;
|
156
|
+
field: Field;
|
137
157
|
}
|
138
158
|
export declare const EXPRESSION: P.TypedLanguage<ExpressionLanguage>;
|
139
159
|
/**
|
@@ -1,17 +1,51 @@
|
|
1
|
-
export type {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export type { DataArray } from
|
6
|
-
export type {
|
7
|
-
export type {
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
export type {
|
2
|
+
DateTime,
|
3
|
+
Duration
|
4
|
+
} from 'luxon';
|
5
|
+
export type { DataArray } from './api/data-array.d.ts';
|
6
|
+
export type { DataviewApi } from './api/plugin-api.d.ts';
|
7
|
+
export type {
|
8
|
+
Failure,
|
9
|
+
Result,
|
10
|
+
Success
|
11
|
+
} from './api/result.d.ts';
|
12
|
+
export type {
|
13
|
+
FullIndex,
|
14
|
+
IndexMap,
|
15
|
+
PrefixIndex
|
16
|
+
} from './data-index/index.d.ts';
|
17
|
+
export type {
|
18
|
+
ListItem,
|
19
|
+
PageMetadata
|
20
|
+
} from './data-model/markdown.d.ts';
|
21
|
+
export type {
|
22
|
+
SListEntry,
|
23
|
+
SMarkdownPage,
|
24
|
+
STask
|
25
|
+
} from './data-model/serialized/markdown.d.ts';
|
26
|
+
export type {
|
27
|
+
DataObject,
|
28
|
+
Link,
|
29
|
+
Literal,
|
30
|
+
LiteralRepr,
|
31
|
+
LiteralType,
|
32
|
+
LiteralWrapper,
|
33
|
+
Widget,
|
34
|
+
WrappedLiteral
|
35
|
+
} from './data-model/value.d.ts';
|
36
|
+
export type {
|
37
|
+
DATE_SHORTHANDS,
|
38
|
+
DURATION_TYPES,
|
39
|
+
EXPRESSION,
|
40
|
+
ExpressionLanguage,
|
41
|
+
KEYWORDS,
|
42
|
+
parseField
|
43
|
+
} from './expression/parse.d.ts';
|
44
|
+
export type { QUERY_LANGUAGE } from './query/parse.d.ts';
|
45
|
+
export type { Query } from './query/query.d.ts';
|
46
|
+
import type { DataviewApi } from './api/plugin-api.d.ts';
|
47
|
+
import 'obsidian';
|
48
|
+
import type { App } from 'obsidian';
|
15
49
|
/**
|
16
50
|
* Get the current Dataview API from the app if provided; if not, it is inferred from the global API object installed
|
17
51
|
* on the window.
|