Skip to content

Commit a3639a4

Browse files
committed
view field types; named view fields
1 parent 5ddfb1c commit a3639a4

File tree

76 files changed

+2150
-1324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2150
-1324
lines changed

esbuild.dev.config.mjs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ if you want to view the source, please visit the github repository of this plugi
1111
*/
1212
`;
1313

14-
esbuild
15-
.build({
14+
const context = await esbuild
15+
.context({
1616
banner: {
1717
js: banner,
1818
},
@@ -45,28 +45,31 @@ esbuild
4545
...builtins,
4646
],
4747
format: 'cjs',
48-
watch: true,
4948
target: 'es2016',
5049
logLevel: 'info',
5150
sourcemap: 'inline',
5251
treeShaking: true,
5352
outdir: 'exampleVault/.obsidian/plugins/obsidian-meta-bind-plugin/',
5453
outbase: 'src',
5554
plugins: [
56-
copy([
57-
{
58-
from: './styles.css',
59-
to: '',
60-
},
61-
{
62-
from: './manifest.json',
63-
to: '',
64-
},
65-
]),
55+
copy({
56+
paths: [
57+
{
58+
from: './styles.css',
59+
to: '',
60+
},
61+
{
62+
from: './manifest.json',
63+
to: '',
64+
},
65+
],
66+
}),
6667
esbuildSvelte({
6768
compilerOptions: { css: true },
6869
preprocess: sveltePreprocess(),
6970
}),
7071
],
7172
})
7273
.catch(() => process.exit(1));
74+
75+
await context.watch();

exampleVault/Input Fields/Toggle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
toggle2: 14
2+
toggle2: 1
33
toggle1: false
44
---
55

exampleVault/View Fields/View Field.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
number1: 13
2+
number1: 12
33
number2: 200
44
unit: km
5-
distance: 5
5+
distance: 12534
6+
computed: "**12534**"
67
---
78

89
`INPUT[number:number1]`
@@ -20,8 +21,17 @@ Combined: `VIEW[{number1} * {number2}]` cm equals `VIEW[{number2} * {number1} cm
2021

2122
`VIEW[{Other Note#text}]`
2223

23-
## Distance example
24+
## Distance Example
2425

2526
Distance: `INPUT[number:distance]` km
2627
Distance in freedom units: `VIEW[number({distance} km, miles)]` miles
27-
Distance in freedom units: `VIEW[round(number({distance} km, miles), 2)]` miles
28+
Distance in freedom units: `VIEW[round(number({distance} km, miles), 2)]` miles
29+
30+
## Text Example
31+
32+
Text: `VIEW[**{distance}**][text]`
33+
Markdown: `VIEW[**{distance}**][text(renderMarkdown)]`
34+
Hidden: `VIEW[**{distance}**][text(hidden):computed]`
35+
Display Computed: `VIEW[{computed}][text()]`
36+
Display Computed as Markdown: `VIEW[{computed}][text(renderMarkdown)]`
37+
Loop Error: `VIEW[**{computed}**][text():distance]`

exampleVault/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Slept: 00:00
99
select: option c
1010
toggle: false
1111
nested:
12-
object: asdasddfs
12+
object: asdasdasd
1313
inlineSelect: 0
1414
---
1515

0 commit comments

Comments
 (0)