@nil-/doc 0.2.49 → 0.2.50
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 +7 -0
- package/components/Layout.svelte +78 -81
- package/components/Layout.svelte.d.ts +1 -0
- package/components/block/Block.svelte +29 -28
- package/components/block/Controls.svelte +1 -1
- package/components/block/Instance.svelte +73 -72
- package/components/block/Params.svelte +1 -1
- package/components/block/Template.svelte +2 -1
- package/components/block/controls/events/Events.svelte +9 -9
- package/components/block/controls/events/misc/Styler.svelte +18 -19
- package/components/block/controls/props/Component.svelte +1 -1
- package/components/block/controls/props/Number.svelte +1 -1
- package/components/block/controls/props/Object.svelte +2 -1
- package/components/block/controls/props/Props.svelte +1 -1
- package/components/block/controls/props/Range.svelte +35 -35
- package/components/block/controls/props/Select.svelte +6 -6
- package/components/block/controls/props/Switch.svelte +1 -1
- package/components/block/controls/props/Text.svelte +1 -1
- package/components/block/controls/props/Tuple.svelte +2 -1
- package/components/block/controls/props/misc/GroupHeader.svelte +6 -6
- package/components/block/controls/props/misc/Name.svelte +14 -14
- package/components/block/controls/props/misc/Styler.svelte +20 -21
- package/components/etc/Container.svelte +92 -92
- package/components/{etc/NilIcon.svelte → icons/NilDoc.svelte} +17 -16
- package/components/icons/NilDoc.svelte.d.ts +14 -0
- package/components/{etc/ThemeIcon.svelte → icons/Theme.svelte} +34 -31
- package/components/icons/Theme.svelte.d.ts +17 -0
- package/components/navigation/Nav.svelte +31 -30
- package/components/navigation/Node.svelte +47 -47
- package/components/navigation/Tree.svelte +1 -1
- package/components/title/Icon.svelte +19 -0
- package/components/title/Icon.svelte.d.ts +21 -0
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +1 -1
- package/components/etc/NilIcon.svelte.d.ts +0 -14
- package/components/etc/ThemeIcon.svelte.d.ts +0 -16
package/CHANGELOG.md
CHANGED
package/components/Layout.svelte
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
<script context="module">const defaultSorter = (l, r) => l.localeCompare(r);
|
|
2
|
+
const defaultRenamer = (s) => s;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script>import Container from "./etc/Container.svelte";
|
|
6
|
+
import Nav from "./navigation/Nav.svelte";
|
|
7
|
+
import Icon from "./title/Icon.svelte";
|
|
8
|
+
import { getTheme, initTheme } from "./context";
|
|
9
|
+
import ThemeIcon from "./icons/Theme.svelte";
|
|
10
|
+
export let data;
|
|
11
|
+
export let current = null;
|
|
12
|
+
export let sorter = null;
|
|
13
|
+
export let renamer = null;
|
|
14
|
+
export let theme = void 0;
|
|
15
|
+
const parentTheme = getTheme();
|
|
16
|
+
const dark = initTheme();
|
|
17
|
+
$:
|
|
18
|
+
$dark = theme === void 0 ? $parentTheme : "dark" === theme;
|
|
19
|
+
const toggle = () => {
|
|
20
|
+
if (theme !== void 0) {
|
|
21
|
+
theme = $dark ? "light" : "dark";
|
|
22
|
+
} else {
|
|
23
|
+
$dark = !$dark;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<!--
|
|
29
|
+
@component
|
|
30
|
+
See [documentation](https://mono-doc.vercel.app/3-Components/1-Layout) for more details.
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
<div class="layout" class:dark={$dark}>
|
|
34
|
+
<div class="top">
|
|
35
|
+
<div class="title">
|
|
36
|
+
<slot name="title" />
|
|
37
|
+
</div>
|
|
38
|
+
<slot name="title-misc">
|
|
39
|
+
<Icon on:click={toggle}>
|
|
40
|
+
<ThemeIcon {theme} />
|
|
41
|
+
</Icon>
|
|
42
|
+
</slot>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="main">
|
|
45
|
+
<Container offset={250} vertical b>
|
|
46
|
+
<svelte:fragment slot="A">
|
|
47
|
+
<div class="content scrollable">
|
|
48
|
+
<Nav
|
|
49
|
+
info={data}
|
|
50
|
+
selected={current ?? ""}
|
|
51
|
+
sorter={sorter ?? defaultSorter}
|
|
52
|
+
renamer={renamer ?? defaultRenamer}
|
|
53
|
+
on:navigate
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</svelte:fragment>
|
|
57
|
+
<svelte:fragment slot="B">
|
|
58
|
+
<div class="content page">
|
|
59
|
+
{#key current}
|
|
60
|
+
<slot />
|
|
61
|
+
{/key}
|
|
62
|
+
</div>
|
|
63
|
+
</svelte:fragment>
|
|
64
|
+
</Container>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
1
68
|
<style>
|
|
2
69
|
@import url("https://fonts.googleapis.com/css?family=Fira%20Code");
|
|
3
70
|
|
|
@@ -13,7 +80,9 @@
|
|
|
13
80
|
|
|
14
81
|
.top {
|
|
15
82
|
display: grid;
|
|
16
|
-
grid-
|
|
83
|
+
grid-auto-flow: column;
|
|
84
|
+
grid-auto-columns: 40px;
|
|
85
|
+
grid-template-columns: 1fr;
|
|
17
86
|
align-items: center;
|
|
18
87
|
padding-left: 10px;
|
|
19
88
|
padding-right: 10px;
|
|
@@ -23,20 +92,17 @@
|
|
|
23
92
|
user-select: none;
|
|
24
93
|
}
|
|
25
94
|
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
95
|
+
.title {
|
|
96
|
+
display: grid;
|
|
97
|
+
grid-auto-flow: column;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: left;
|
|
100
|
+
gap: 5px;
|
|
29
101
|
}
|
|
30
102
|
|
|
31
|
-
.
|
|
32
|
-
width: 100%;
|
|
103
|
+
.main {
|
|
33
104
|
height: 100%;
|
|
34
|
-
|
|
35
|
-
transition: transform 350ms;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.icon:hover {
|
|
39
|
-
transform: scale(1.5);
|
|
105
|
+
overflow: hidden;
|
|
40
106
|
}
|
|
41
107
|
|
|
42
108
|
.content {
|
|
@@ -83,72 +149,3 @@
|
|
|
83
149
|
border-bottom-color: hsl(0, 2%, 40%);
|
|
84
150
|
}
|
|
85
151
|
</style>
|
|
86
|
-
|
|
87
|
-
<script context="module">const defaultSorter = (l, r) => l.localeCompare(r);
|
|
88
|
-
const defaultRenamer = (s) => s;
|
|
89
|
-
</script>
|
|
90
|
-
<script>import Container from "./etc/Container.svelte";
|
|
91
|
-
import Nav from "./navigation/Nav.svelte";
|
|
92
|
-
import { getTheme, initTheme } from "./context";
|
|
93
|
-
import ThemeIcon from "./etc/ThemeIcon.svelte";
|
|
94
|
-
import NilIcon from "./etc/NilIcon.svelte";
|
|
95
|
-
export let data;
|
|
96
|
-
export let current = null;
|
|
97
|
-
export let sorter = null;
|
|
98
|
-
export let renamer = null;
|
|
99
|
-
export let theme = void 0;
|
|
100
|
-
const parentTheme = getTheme();
|
|
101
|
-
const dark = initTheme();
|
|
102
|
-
$:
|
|
103
|
-
$dark = theme === void 0 ? $parentTheme : "dark" === theme;
|
|
104
|
-
const toggle = () => {
|
|
105
|
-
if (theme !== void 0) {
|
|
106
|
-
theme = $dark ? "light" : "dark";
|
|
107
|
-
} else {
|
|
108
|
-
$dark = !$dark;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
<!--
|
|
113
|
-
@component
|
|
114
|
-
See [documentation](https://mono-doc.vercel.app/3-Components/1-Layout) for more details.
|
|
115
|
-
-->
|
|
116
|
-
<div class="layout" class:dark={$dark}>
|
|
117
|
-
<div class="top">
|
|
118
|
-
<slot name="title"><span>@nil-/doc</span></slot>
|
|
119
|
-
<div class="icon" on:click={toggle} on:keypress={null}>
|
|
120
|
-
<ThemeIcon bind:dark={$dark} />
|
|
121
|
-
</div>
|
|
122
|
-
<div
|
|
123
|
-
class="icon"
|
|
124
|
-
title="Open @nil-/mono repo: https://github.com/njaldea/mono"
|
|
125
|
-
on:click={() => window.open("https://github.com/njaldea/mono", "_blank")}
|
|
126
|
-
on:keypress={null}
|
|
127
|
-
>
|
|
128
|
-
<NilIcon />
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="main">
|
|
132
|
-
<Container offset={250} vertical b>
|
|
133
|
-
<svelte:fragment slot="A">
|
|
134
|
-
<div class="content scrollable">
|
|
135
|
-
<Nav
|
|
136
|
-
info={data}
|
|
137
|
-
selected={current ?? ""}
|
|
138
|
-
sorter={sorter ?? defaultSorter}
|
|
139
|
-
renamer={renamer ?? defaultRenamer}
|
|
140
|
-
on:navigate
|
|
141
|
-
/>
|
|
142
|
-
</div>
|
|
143
|
-
</svelte:fragment>
|
|
144
|
-
<svelte:fragment slot="B">
|
|
145
|
-
<div class="content page">
|
|
146
|
-
{#key current}
|
|
147
|
-
<slot />
|
|
148
|
-
{/key}
|
|
149
|
-
</div>
|
|
150
|
-
</svelte:fragment>
|
|
151
|
-
</Container>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
<script>import {
|
|
2
|
+
initParams,
|
|
3
|
+
initDefaults,
|
|
4
|
+
initControls,
|
|
5
|
+
initControlsState,
|
|
6
|
+
initOrientation
|
|
7
|
+
} from "./context";
|
|
8
|
+
import { getTheme, initTheme } from "../context";
|
|
9
|
+
initParams();
|
|
10
|
+
initDefaults();
|
|
11
|
+
initControls();
|
|
12
|
+
initControlsState();
|
|
13
|
+
const columns = initOrientation();
|
|
14
|
+
export let theme = void 0;
|
|
15
|
+
const parentTheme = getTheme();
|
|
16
|
+
const dark = initTheme();
|
|
17
|
+
$:
|
|
18
|
+
$dark = theme === void 0 ? $parentTheme : "dark" === theme;
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!--
|
|
22
|
+
@component
|
|
23
|
+
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block) for more details.
|
|
24
|
+
-->
|
|
25
|
+
|
|
26
|
+
<div class:columns={$columns} class:dark={$dark}>
|
|
27
|
+
<slot />
|
|
28
|
+
</div>
|
|
29
|
+
|
|
1
30
|
<style>
|
|
2
31
|
@import url("https://fonts.googleapis.com/css?family=Fira%20Code");
|
|
3
32
|
|
|
@@ -34,31 +63,3 @@
|
|
|
34
63
|
background-color: hsl(0, 2%, 40%);
|
|
35
64
|
}
|
|
36
65
|
</style>
|
|
37
|
-
|
|
38
|
-
<script>import {
|
|
39
|
-
initParams,
|
|
40
|
-
initDefaults,
|
|
41
|
-
initControls,
|
|
42
|
-
initControlsState,
|
|
43
|
-
initOrientation
|
|
44
|
-
} from "./context";
|
|
45
|
-
import { getTheme, initTheme } from "../context";
|
|
46
|
-
initParams();
|
|
47
|
-
initDefaults();
|
|
48
|
-
initControls();
|
|
49
|
-
initControlsState();
|
|
50
|
-
const columns = initOrientation();
|
|
51
|
-
export let theme = void 0;
|
|
52
|
-
const parentTheme = getTheme();
|
|
53
|
-
const dark = initTheme();
|
|
54
|
-
$:
|
|
55
|
-
$dark = theme === void 0 ? $parentTheme : "dark" === theme;
|
|
56
|
-
</script>
|
|
57
|
-
<!--
|
|
58
|
-
@component
|
|
59
|
-
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block) for more details.
|
|
60
|
-
-->
|
|
61
|
-
<div class:columns={$columns} class:dark={$dark}>
|
|
62
|
-
<slot />
|
|
63
|
-
</div>
|
|
64
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import { getControls, getControlsState } from "./context";
|
|
3
2
|
export let props = [];
|
|
4
3
|
export let events = [];
|
|
@@ -13,6 +12,7 @@ $:
|
|
|
13
12
|
$:
|
|
14
13
|
$state.position = position;
|
|
15
14
|
</script>
|
|
15
|
+
|
|
16
16
|
<!--
|
|
17
17
|
@component
|
|
18
18
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block/2-Controls) for more details.
|
|
@@ -1,75 +1,3 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
div {
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.instance {
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.instance.scale {
|
|
11
|
-
transition: transform 350ms;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.instance.scale:hover {
|
|
15
|
-
transform: scale(1.015);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.cside {
|
|
19
|
-
display: grid;
|
|
20
|
-
grid-template-columns: 1fr 550px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.content {
|
|
24
|
-
min-height: 100px;
|
|
25
|
-
border-radius: 5px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
div:not(.cside) > .misc {
|
|
29
|
-
border-bottom-left-radius: 5px;
|
|
30
|
-
border-bottom-right-radius: 5px;
|
|
31
|
-
user-select: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.cside > .misc {
|
|
35
|
-
border-top-right-radius: 5px;
|
|
36
|
-
border-bottom-right-radius: 5px;
|
|
37
|
-
user-select: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.content,
|
|
41
|
-
.misc {
|
|
42
|
-
border-style: solid;
|
|
43
|
-
border-width: 1px;
|
|
44
|
-
padding: 2px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* scrollable */
|
|
48
|
-
.scrollable {
|
|
49
|
-
overflow: scroll;
|
|
50
|
-
scrollbar-width: none; /* Firefox */
|
|
51
|
-
-ms-overflow-style: none; /* IE and Edge */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.scrollable::-webkit-scrollbar {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* colors */
|
|
59
|
-
.content,
|
|
60
|
-
.misc {
|
|
61
|
-
border-color: hsl(0, 2%, 60%);
|
|
62
|
-
background-color: hsl(0, 0%, 100%);
|
|
63
|
-
transition: border-color 350ms, background-color 350ms;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.dark.content,
|
|
67
|
-
.dark.misc {
|
|
68
|
-
border-color: hsl(0, 2%, 40%);
|
|
69
|
-
background-color: hsl(200, 4%, 14%);
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
72
|
-
|
|
73
1
|
<script>import { beforeUpdate } from "svelte";
|
|
74
2
|
import { cquery } from "./action";
|
|
75
3
|
import { getControls, getControlsState } from "./context";
|
|
@@ -107,10 +35,12 @@ $:
|
|
|
107
35
|
updateBound(defaults);
|
|
108
36
|
let handlers;
|
|
109
37
|
</script>
|
|
38
|
+
|
|
110
39
|
<!--
|
|
111
40
|
@component
|
|
112
41
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block/1-Content/1-Instance) for more details.
|
|
113
42
|
-->
|
|
43
|
+
|
|
114
44
|
<div
|
|
115
45
|
class="instance"
|
|
116
46
|
class:scale
|
|
@@ -154,3 +84,74 @@ let handlers;
|
|
|
154
84
|
{/if}
|
|
155
85
|
</div>
|
|
156
86
|
|
|
87
|
+
<style>
|
|
88
|
+
div {
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.instance {
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.instance.scale {
|
|
97
|
+
transition: transform 350ms;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.instance.scale:hover {
|
|
101
|
+
transform: scale(1.015);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cside {
|
|
105
|
+
display: grid;
|
|
106
|
+
grid-template-columns: 1fr 550px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.content {
|
|
110
|
+
min-height: 100px;
|
|
111
|
+
border-radius: 5px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
div:not(.cside) > .misc {
|
|
115
|
+
border-bottom-left-radius: 5px;
|
|
116
|
+
border-bottom-right-radius: 5px;
|
|
117
|
+
user-select: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.cside > .misc {
|
|
121
|
+
border-top-right-radius: 5px;
|
|
122
|
+
border-bottom-right-radius: 5px;
|
|
123
|
+
user-select: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.content,
|
|
127
|
+
.misc {
|
|
128
|
+
border-style: solid;
|
|
129
|
+
border-width: 1px;
|
|
130
|
+
padding: 2px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* scrollable */
|
|
134
|
+
.scrollable {
|
|
135
|
+
overflow: scroll;
|
|
136
|
+
scrollbar-width: none; /* Firefox */
|
|
137
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.scrollable::-webkit-scrollbar {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* colors */
|
|
145
|
+
.content,
|
|
146
|
+
.misc {
|
|
147
|
+
border-color: hsl(0, 2%, 60%);
|
|
148
|
+
background-color: hsl(0, 0%, 100%);
|
|
149
|
+
transition: border-color 350ms, background-color 350ms;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dark.content,
|
|
153
|
+
.dark.misc {
|
|
154
|
+
border-color: hsl(0, 2%, 40%);
|
|
155
|
+
background-color: hsl(200, 4%, 14%);
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import { getParams } from "./context";
|
|
3
2
|
import { resolve } from "./utils";
|
|
4
3
|
export let tag = void 0;
|
|
@@ -15,6 +14,7 @@ $:
|
|
|
15
14
|
$:
|
|
16
15
|
$params[id].values = resolve(props, {});
|
|
17
16
|
</script>
|
|
17
|
+
|
|
18
18
|
<!--
|
|
19
19
|
@component
|
|
20
20
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block/1-Content/2-Template/1-Params) for more details.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import { beforeUpdate } from "svelte";
|
|
3
2
|
import { getDefaults, getParams, getOrientation } from "./context";
|
|
4
3
|
import { resolve } from "./utils";
|
|
@@ -19,10 +18,12 @@ beforeUpdate(() => key = !key);
|
|
|
19
18
|
const resolveArgs = resolve;
|
|
20
19
|
const cast = (t) => t;
|
|
21
20
|
</script>
|
|
21
|
+
|
|
22
22
|
<!--
|
|
23
23
|
@component
|
|
24
24
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block/1-Content/2-Template) for more details.
|
|
25
25
|
-->
|
|
26
|
+
|
|
26
27
|
{#each $params as param (param.id)}
|
|
27
28
|
<Instance
|
|
28
29
|
defaults={resolveArgs($defaultsStore, param.values)}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
.count {
|
|
3
|
-
display: grid;
|
|
4
|
-
place-items: center;
|
|
5
|
-
text-align: center;
|
|
6
|
-
font-size: 0.8rem;
|
|
7
|
-
}
|
|
8
|
-
</style>
|
|
9
|
-
|
|
10
1
|
<script>import Styler from "./misc/Styler.svelte";
|
|
11
2
|
export let visible;
|
|
12
3
|
export let events;
|
|
@@ -48,6 +39,7 @@ const wrap = (ext) => {
|
|
|
48
39
|
$:
|
|
49
40
|
handlers = wrap(events);
|
|
50
41
|
</script>
|
|
42
|
+
|
|
51
43
|
{#if visible}
|
|
52
44
|
<Styler>
|
|
53
45
|
<slot />
|
|
@@ -67,3 +59,11 @@ $:
|
|
|
67
59
|
</Styler>
|
|
68
60
|
{/if}
|
|
69
61
|
|
|
62
|
+
<style>
|
|
63
|
+
.count {
|
|
64
|
+
display: grid;
|
|
65
|
+
place-items: center;
|
|
66
|
+
text-align: center;
|
|
67
|
+
font-size: 0.8rem;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
<script>import { getTheme } from "../../../../context";
|
|
2
2
|
const dark = getTheme();
|
|
3
3
|
</script>
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
<div> this component
|
|
7
|
+
<div> Header
|
|
8
|
+
<div></div>
|
|
9
|
+
<div></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div> Controls
|
|
12
|
+
<div></div>
|
|
13
|
+
<div></div>
|
|
14
|
+
</div>
|
|
15
|
+
...
|
|
16
|
+
</div>
|
|
17
|
+
-->
|
|
18
|
+
<div class:dark={$dark}>
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
21
|
+
|
|
4
22
|
<style>
|
|
5
23
|
div {
|
|
6
24
|
width: 100%;
|
|
@@ -62,22 +80,3 @@ const dark = getTheme();
|
|
|
62
80
|
background-color: var(--hover-color);
|
|
63
81
|
}
|
|
64
82
|
</style>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<!--
|
|
68
|
-
<div> this component
|
|
69
|
-
<div> Header
|
|
70
|
-
<div></div>
|
|
71
|
-
<div></div>
|
|
72
|
-
</div>
|
|
73
|
-
<div> Controls
|
|
74
|
-
<div></div>
|
|
75
|
-
<div></div>
|
|
76
|
-
</div>
|
|
77
|
-
...
|
|
78
|
-
</div>
|
|
79
|
-
-->
|
|
80
|
-
<div class:dark={$dark}>
|
|
81
|
-
<slot />
|
|
82
|
-
</div>
|
|
83
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import Text from "./Text.svelte";
|
|
3
2
|
import Number from "./Number.svelte";
|
|
4
3
|
import Range from "./Range.svelte";
|
|
@@ -12,6 +11,7 @@ export let depth;
|
|
|
12
11
|
export let disabled = false;
|
|
13
12
|
export let visible = false;
|
|
14
13
|
</script>
|
|
14
|
+
|
|
15
15
|
{#if info instanceof Array}
|
|
16
16
|
{@const type = info[1]}
|
|
17
17
|
{#if "object" === type}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import { getDefault } from "./misc/defaulter";
|
|
3
2
|
import NameHeader from "./misc/Name.svelte";
|
|
4
3
|
export let value;
|
|
@@ -13,6 +12,7 @@ $:
|
|
|
13
12
|
$:
|
|
14
13
|
name = info instanceof Array ? info[0] : info.name;
|
|
15
14
|
</script>
|
|
15
|
+
|
|
16
16
|
{#if visible}
|
|
17
17
|
<div>
|
|
18
18
|
<NameHeader {name} {depth} />
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
<script>import Component from "./Component.svelte";
|
|
3
2
|
import Header from "./misc/GroupHeader.svelte";
|
|
4
3
|
import { getDefault } from "./misc/defaulter";
|
|
@@ -17,7 +16,9 @@ $:
|
|
|
17
16
|
$:
|
|
18
17
|
name = info instanceof Array ? info[0] : info.name;
|
|
19
18
|
</script>
|
|
19
|
+
|
|
20
20
|
<Header {name} bind:expand bind:checked={enabled} {depth} {disabled} {visible} />
|
|
21
|
+
|
|
21
22
|
{#each values as info, i (i)}
|
|
22
23
|
<Component
|
|
23
24
|
{info}
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
.input {
|
|
3
|
-
width: 100%;
|
|
4
|
-
display: grid;
|
|
5
|
-
grid-template-columns: 65px 1fr;
|
|
6
|
-
gap: 5px;
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.input > div {
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
display: grid;
|
|
14
|
-
text-align: left;
|
|
15
|
-
align-items: center;
|
|
16
|
-
font-size: 0.8rem;
|
|
17
|
-
user-select: none;
|
|
18
|
-
margin: auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.tooltip {
|
|
22
|
-
left: -110%;
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 100%;
|
|
25
|
-
display: grid;
|
|
26
|
-
visibility: hidden;
|
|
27
|
-
position: absolute;
|
|
28
|
-
place-items: center;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.input:hover > .tooltip:not(.disabled) {
|
|
32
|
-
visibility: visible;
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
35
|
-
|
|
36
1
|
<script>import { getDefault } from "./misc/defaulter";
|
|
37
2
|
import NameHeader from "./misc/Name.svelte";
|
|
38
3
|
import { nformat } from "./misc/nformat";
|
|
@@ -58,6 +23,7 @@ $:
|
|
|
58
23
|
step: info.step
|
|
59
24
|
};
|
|
60
25
|
</script>
|
|
26
|
+
|
|
61
27
|
{#if visible}
|
|
62
28
|
<div>
|
|
63
29
|
<NameHeader name={i.name} {depth} />
|
|
@@ -79,3 +45,37 @@ $:
|
|
|
79
45
|
</div>
|
|
80
46
|
{/if}
|
|
81
47
|
|
|
48
|
+
<style>
|
|
49
|
+
.input {
|
|
50
|
+
width: 100%;
|
|
51
|
+
display: grid;
|
|
52
|
+
grid-template-columns: 65px 1fr;
|
|
53
|
+
gap: 5px;
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.input > div {
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
display: grid;
|
|
61
|
+
text-align: left;
|
|
62
|
+
align-items: center;
|
|
63
|
+
font-size: 0.8rem;
|
|
64
|
+
user-select: none;
|
|
65
|
+
margin: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tooltip {
|
|
69
|
+
left: -110%;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
display: grid;
|
|
73
|
+
visibility: hidden;
|
|
74
|
+
position: absolute;
|
|
75
|
+
place-items: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.input:hover > .tooltip:not(.disabled) {
|
|
79
|
+
visibility: visible;
|
|
80
|
+
}
|
|
81
|
+
</style>
|