@nil-/doc 0.2.50 → 0.2.52
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 +29 -0
- package/components/Base.svelte +65 -0
- package/components/Base.svelte.d.ts +19 -0
- package/components/block/Block.svelte +71 -24
- package/components/block/Controls.svelte +3 -5
- package/components/block/Controls.svelte.d.ts +2 -2
- package/components/block/Instance.svelte +39 -89
- package/components/block/context.d.ts +2 -2
- package/components/block/context.js +2 -1
- package/components/block/controls/events/Events.svelte +14 -5
- package/components/block/controls/events/misc/Styler.svelte +16 -46
- package/components/block/controls/events/misc/Styler.svelte.d.ts +17 -6
- package/components/block/controls/props/Color.svelte +86 -0
- package/components/block/controls/props/Color.svelte.d.ts +21 -0
- package/components/block/controls/props/Component.svelte +5 -0
- package/components/block/controls/props/Number.svelte +4 -5
- package/components/block/controls/props/Object.svelte +9 -12
- package/components/block/controls/props/Props.svelte +2 -5
- package/components/block/controls/props/Range.svelte +5 -4
- package/components/block/controls/props/Select.svelte +5 -8
- package/components/block/controls/props/Switch.svelte +4 -5
- package/components/block/controls/props/Text.svelte +8 -9
- package/components/block/controls/props/Tuple.svelte +13 -26
- package/components/block/controls/props/misc/Name.svelte +6 -7
- package/components/block/controls/props/misc/Styler.svelte +22 -34
- package/components/block/controls/props/misc/Styler.svelte.d.ts +17 -6
- package/components/block/controls/props/misc/defaulter.d.ts +9 -8
- package/components/block/controls/props/misc/defaulter.js +28 -48
- package/components/block/controls/props/misc/utils.d.ts +12 -0
- package/components/block/controls/props/misc/utils.js +37 -0
- package/components/block/controls/types.d.ts +12 -2
- package/components/block/icons/Button.svelte +30 -0
- package/components/block/icons/Button.svelte.d.ts +35 -0
- package/components/block/icons/ControlView.svelte +30 -0
- package/components/block/icons/ControlView.svelte.d.ts +16 -0
- package/components/block/icons/Position.svelte +29 -0
- package/components/block/icons/Position.svelte.d.ts +16 -0
- package/components/{etc → layout}/Container.svelte +24 -37
- package/components/{etc → layout}/Container.svelte.d.ts +0 -0
- package/components/layout/Content.svelte +23 -0
- package/components/layout/Content.svelte.d.ts +27 -0
- package/components/layout/Layout.svelte +124 -0
- package/components/{Layout.svelte.d.ts → layout/Layout.svelte.d.ts} +3 -2
- package/components/layout/Scrollable.svelte +20 -0
- package/components/layout/Scrollable.svelte.d.ts +27 -0
- package/components/layout/VerticalPanel.svelte +12 -0
- package/components/layout/VerticalPanel.svelte.d.ts +27 -0
- package/components/{etc → layout}/action.d.ts +0 -0
- package/components/{etc → layout}/action.js +0 -0
- package/components/{title → layout/icons}/Icon.svelte +3 -3
- package/components/{title → layout/icons}/Icon.svelte.d.ts +0 -0
- package/components/{icons/NilDoc.svelte → layout/icons/Nil.svelte} +3 -3
- package/components/layout/icons/Nil.svelte.d.ts +14 -0
- package/components/{icons → layout/icons}/Theme.svelte +41 -28
- package/components/{icons → layout/icons}/Theme.svelte.d.ts +1 -1
- package/components/navigation/Nav.svelte +6 -10
- package/components/navigation/Node.svelte +19 -11
- package/index.d.ts +4 -4
- package/index.js +4 -4
- package/package.json +8 -5
- package/sveltekit/index.d.ts +7 -1
- package/sveltekit/index.js +9 -5
- package/components/Layout.svelte +0 -151
- package/components/icons/NilDoc.svelte.d.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @nil-/doc
|
|
2
2
|
|
|
3
|
+
## 0.2.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [doc][fix] fix layout scrollable sections ([#90](https://github.com/njaldea/mono/pull/90))
|
|
8
|
+
|
|
9
|
+
- [doc][patch] restructure code ([#90](https://github.com/njaldea/mono/pull/90))
|
|
10
|
+
|
|
11
|
+
- [doc][patch] use vannilla-color library for color picker ([#90](https://github.com/njaldea/mono/pull/90))
|
|
12
|
+
[doc][fix] removed position relative and overflow scroll for misc (controls)
|
|
13
|
+
|
|
14
|
+
- [doc][fix] content fill width/height ([#90](https://github.com/njaldea/mono/pull/90))
|
|
15
|
+
|
|
16
|
+
- [doc][new] added offset Layout.svelte and sveltekit for keeping state ([#90](https://github.com/njaldea/mono/pull/90))
|
|
17
|
+
|
|
18
|
+
## 0.2.51
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [doc][fix] components now rely on root font-size ([#88](https://github.com/njaldea/mono/pull/88))
|
|
23
|
+
|
|
24
|
+
- [doc][fix] fix object prop control ([#88](https://github.com/njaldea/mono/pull/88))
|
|
25
|
+
|
|
26
|
+
- [doc][new] block button controls ([#88](https://github.com/njaldea/mono/pull/88))
|
|
27
|
+
[doc][new] centralized custom css
|
|
28
|
+
|
|
29
|
+
- [doc][misc] change styling ([#88](https://github.com/njaldea/mono/pull/88))
|
|
30
|
+
[doc][fix] scrolling content of container
|
|
31
|
+
|
|
3
32
|
## 0.2.50
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script>export let dark = false;
|
|
2
|
+
export let fill = false;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class:dark class:fill>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<!-- prettier-ignore -->
|
|
10
|
+
<style>
|
|
11
|
+
@import url("https://fonts.googleapis.com/css?family=Fira%20Code");
|
|
12
|
+
|
|
13
|
+
div {
|
|
14
|
+
font-family: "Fira Code", "Courier New", Courier, monospace;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fill {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
div {
|
|
23
|
+
--i-nil-doc-color: var(--nil-doc-color, hsl(0, 0%, 0%));
|
|
24
|
+
--i-nil-doc-color-scheme: var(--nil-doc-color-scheme, light);
|
|
25
|
+
|
|
26
|
+
--i-nil-doc-bg-color: var(--nil-doc-bg-color, hsl(0, 0%, 98%));
|
|
27
|
+
--i-nil-doc-content-outline-color: var(--nil-doc-content-outline-color, hsla(0, 0%, 0%, 0.3));
|
|
28
|
+
|
|
29
|
+
--i-nil-doc-block-bg-color: var(--nil-doc-block-bg-color, hsla(0, 0%, 98%, 0.3));
|
|
30
|
+
--i-nil-doc-block-outline-color: var(--nil-doc-block-outline-color, hsla(0, 0%, 0%, 0.3));
|
|
31
|
+
|
|
32
|
+
--i-nil-doc-container-p: var(--nil-doc-container-p, hsl(0, 2%, 70%));
|
|
33
|
+
--i-nil-doc-container-s: var(--nil-doc-container-s, hsl(0, 0%, 0%));
|
|
34
|
+
|
|
35
|
+
--i-nil-doc-controls-p: var(--nil-doc-controls-p, hsl(0, 0%, 100%));
|
|
36
|
+
--i-nil-doc-controls-s: var(--nil-doc-controls-s, hsl(210, 29%, 97%));
|
|
37
|
+
--i-nil-doc-controls-hover: var(--nil-doc-controls-hover, hsl(210, 100%, 90%));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
div.dark {
|
|
41
|
+
--i-nil-doc-color: var(--nil-doc-color, hsl(0, 0%, 80%));
|
|
42
|
+
--i-nil-doc-color-scheme: var(--nil-doc-color-scheme, dark);
|
|
43
|
+
|
|
44
|
+
--i-nil-doc-bg-color: var(--nil-doc-bg-color, hsl(210, 6%, 7%));
|
|
45
|
+
--i-nil-doc-content-outline-color: var(--nil-doc-content-outline-color, hsla(0, 0%, 100%, 0.3));
|
|
46
|
+
|
|
47
|
+
--i-nil-doc-block-bg-color: var(--nil-doc-block-bg-color, hsla(200, 4%, 7%, 0.3));
|
|
48
|
+
--i-nil-doc-block-outline-color: var(--nil-doc-block-outline-color, hsla(0, 0%, 1000%, 0.3));
|
|
49
|
+
|
|
50
|
+
--i-nil-doc-container-p: var(--nil-doc-container-p, hsl(0, 2%, 40%));
|
|
51
|
+
--i-nil-doc-container-s: var(--nil-doc-container-s, hsl(0, 0%, 100%));
|
|
52
|
+
|
|
53
|
+
--i-nil-doc-controls-p: var(--nil-doc-controls-p, hsl(213, 26%, 7%));
|
|
54
|
+
--i-nil-doc-controls-s: var(--nil-doc-controls-s, hsl(213, 26%, 11%));
|
|
55
|
+
--i-nil-doc-controls-hover: var(--nil-doc-controls-hover, hsl(203, 100%, 15%));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
div {
|
|
59
|
+
--i-nil-doc-nav-hovered: var(--nil-doc-nav-hovered, hsla(203, 98%, 50%, 0.1));
|
|
60
|
+
--i-nil-doc-nav-page-hovered: var(--nil-doc-nav-page-hovered, hsla(203, 98%, 50%, 0.5));
|
|
61
|
+
--i-nil-doc-nav-selected: var(--nil-doc-nav-selected, hsla(203, 98%, 50%, 0.85));
|
|
62
|
+
|
|
63
|
+
--i-nil-doc-transition-time: var(--nil-doc-transition-time, 350ms);
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
dark?: boolean | undefined;
|
|
5
|
+
fill?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type BaseProps = typeof __propDef.props;
|
|
15
|
+
export type BaseEvents = typeof __propDef.events;
|
|
16
|
+
export type BaseSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Base extends SvelteComponentTyped<BaseProps, BaseEvents, BaseSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -5,17 +5,44 @@
|
|
|
5
5
|
initControlsState,
|
|
6
6
|
initOrientation
|
|
7
7
|
} from "./context";
|
|
8
|
+
import Base from "../Base.svelte";
|
|
8
9
|
import { getTheme, initTheme } from "../context";
|
|
10
|
+
import Button from "./icons/Button.svelte";
|
|
11
|
+
import Position from "./icons/Position.svelte";
|
|
12
|
+
import ControlView from "./icons/ControlView.svelte";
|
|
9
13
|
initParams();
|
|
10
14
|
initDefaults();
|
|
11
15
|
initControls();
|
|
12
|
-
initControlsState();
|
|
16
|
+
const state = initControlsState();
|
|
13
17
|
const columns = initOrientation();
|
|
14
18
|
export let theme = void 0;
|
|
15
19
|
const parentTheme = getTheme();
|
|
16
20
|
const dark = initTheme();
|
|
17
21
|
$:
|
|
18
22
|
$dark = theme === void 0 ? $parentTheme : "dark" === theme;
|
|
23
|
+
const cyclePosition = () => {
|
|
24
|
+
switch ($state.position) {
|
|
25
|
+
case "hidden":
|
|
26
|
+
$state.position = "bottom";
|
|
27
|
+
break;
|
|
28
|
+
case "bottom":
|
|
29
|
+
$state.position = "right";
|
|
30
|
+
break;
|
|
31
|
+
case "right":
|
|
32
|
+
$state.position = "hidden";
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const cycleMode = () => {
|
|
37
|
+
switch ($state.mode) {
|
|
38
|
+
case "event":
|
|
39
|
+
$state.mode = "prop";
|
|
40
|
+
break;
|
|
41
|
+
case "prop":
|
|
42
|
+
$state.mode = "event";
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
19
46
|
</script>
|
|
20
47
|
|
|
21
48
|
<!--
|
|
@@ -23,43 +50,63 @@ $:
|
|
|
23
50
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block) for more details.
|
|
24
51
|
-->
|
|
25
52
|
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
|
|
53
|
+
<Base dark={$dark}>
|
|
54
|
+
<div class="relative">
|
|
55
|
+
<div class="buttons">
|
|
56
|
+
<Button scale on:click={cycleMode} title={$state.mode}>
|
|
57
|
+
<ControlView mode={$state.mode} />
|
|
58
|
+
</Button>
|
|
59
|
+
<Button scale on:click={cyclePosition} title={$state.position}>
|
|
60
|
+
<Position position={$state.position} />
|
|
61
|
+
</Button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="block" class:columns={$columns} class:dark={$dark}>
|
|
65
|
+
<slot />
|
|
66
|
+
</div>
|
|
67
|
+
</Base>
|
|
29
68
|
|
|
30
69
|
<style>
|
|
31
|
-
|
|
70
|
+
.relative {
|
|
71
|
+
z-index: 10;
|
|
72
|
+
position: relative;
|
|
73
|
+
}
|
|
32
74
|
|
|
33
|
-
|
|
75
|
+
.block {
|
|
34
76
|
display: grid;
|
|
35
|
-
border-radius:
|
|
77
|
+
border-radius: 0.5rem;
|
|
36
78
|
grid-auto-rows: 1fr;
|
|
37
79
|
grid-auto-columns: auto;
|
|
38
80
|
grid-auto-flow: row;
|
|
39
81
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
padding:
|
|
43
|
-
|
|
82
|
+
min-width: 10rem;
|
|
83
|
+
|
|
84
|
+
padding: 1.75rem 0.2rem 0.5rem 0.2rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.buttons {
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 3.5rem;
|
|
90
|
+
height: 1.75rem;
|
|
91
|
+
right: 1rem;
|
|
92
|
+
top: 0rem;
|
|
93
|
+
display: flex;
|
|
94
|
+
cursor: pointer;
|
|
44
95
|
}
|
|
45
96
|
|
|
46
|
-
|
|
97
|
+
.block.columns {
|
|
47
98
|
grid-auto-rows: auto;
|
|
48
99
|
grid-auto-columns: 1fr;
|
|
49
100
|
grid-auto-flow: column;
|
|
50
101
|
}
|
|
51
102
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
color-scheme:
|
|
55
|
-
color:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
div.dark {
|
|
61
|
-
color-scheme: dark;
|
|
62
|
-
color: hsl(0, 0%, 80%);
|
|
63
|
-
background-color: hsl(0, 2%, 40%);
|
|
103
|
+
.block {
|
|
104
|
+
color: var(--i-nil-doc-color);
|
|
105
|
+
color-scheme: var(--i-nil-doc-color-scheme);
|
|
106
|
+
background-color: var(--i-nil-doc-block-bg-color);
|
|
107
|
+
box-shadow: 0 0 0.5rem 0 var(--i-nil-doc-block-outline-color);
|
|
108
|
+
outline: 1px solid var(--i-nil-doc-block-outline-color);
|
|
109
|
+
transition: color var(--i-nil-doc-transition-time),
|
|
110
|
+
background-color var(--i-nil-doc-transition-time);
|
|
64
111
|
}
|
|
65
112
|
</style>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script>import { getControls, getControlsState } from "./context";
|
|
2
2
|
export let props = [];
|
|
3
3
|
export let events = [];
|
|
4
|
-
export let
|
|
5
|
-
export let
|
|
4
|
+
export let position = "bottom";
|
|
5
|
+
export let mode = "prop";
|
|
6
6
|
const controls = getControls();
|
|
7
7
|
$:
|
|
8
8
|
$controls = { props, events };
|
|
9
9
|
const state = getControlsState();
|
|
10
10
|
$:
|
|
11
|
-
$state
|
|
12
|
-
$:
|
|
13
|
-
$state.position = position;
|
|
11
|
+
$state = { position, mode };
|
|
14
12
|
</script>
|
|
15
13
|
|
|
16
14
|
<!--
|
|
@@ -4,8 +4,8 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
props?: Prop[] | undefined;
|
|
6
6
|
events?: string[] | undefined;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
position?: "bottom" | "right" | "hidden" | undefined;
|
|
8
|
+
mode?: "prop" | "event" | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
<script>import { beforeUpdate } from "svelte";
|
|
2
|
-
import { cquery } from "./action";
|
|
3
2
|
import { getControls, getControlsState } from "./context";
|
|
4
|
-
import { getTheme } from "../context";
|
|
5
3
|
import Props from "./controls/props/Props.svelte";
|
|
6
4
|
import Events from "./controls/events/Events.svelte";
|
|
7
5
|
import { resolve } from "./utils";
|
|
8
6
|
const controls = getControls();
|
|
9
7
|
const controlsState = getControlsState();
|
|
10
|
-
const dark = getTheme();
|
|
11
8
|
$:
|
|
12
|
-
|
|
13
|
-
$:
|
|
14
|
-
hasEvents = $controls.events.length > 0;
|
|
15
|
-
let cvisible = null;
|
|
16
|
-
$:
|
|
17
|
-
if (cvisible == null && hasProps) {
|
|
18
|
-
cvisible = "props";
|
|
19
|
-
} else if (cvisible == null && hasEvents) {
|
|
20
|
-
cvisible = "events";
|
|
21
|
-
} else if (!hasProps && !hasEvents) {
|
|
22
|
-
cvisible = null;
|
|
23
|
-
}
|
|
24
|
-
$:
|
|
25
|
-
expanded = !$controlsState.hide && cvisible != null;
|
|
9
|
+
expanded = $controlsState.position !== "hidden";
|
|
26
10
|
export let defaults = void 0;
|
|
27
11
|
export let noreset = false;
|
|
28
12
|
export let scale = false;
|
|
@@ -33,7 +17,7 @@ let bound = {};
|
|
|
33
17
|
const updateBound = (d) => bound = resolve(d ?? {}, {});
|
|
34
18
|
$:
|
|
35
19
|
updateBound(defaults);
|
|
36
|
-
let handlers;
|
|
20
|
+
let handlers = {};
|
|
37
21
|
</script>
|
|
38
22
|
|
|
39
23
|
<!--
|
|
@@ -41,60 +25,46 @@ let handlers;
|
|
|
41
25
|
See [documentation](https://mono-doc.vercel.app/3-Components/2-Block/1-Content/1-Instance) for more details.
|
|
42
26
|
-->
|
|
43
27
|
|
|
44
|
-
<div
|
|
45
|
-
class="
|
|
46
|
-
|
|
47
|
-
class:cside={expanded && "right" === $controlsState.position}
|
|
48
|
-
use:cquery={{
|
|
49
|
-
class: "cside",
|
|
50
|
-
min: 1000,
|
|
51
|
-
w: true,
|
|
52
|
-
enabled: expanded && $controlsState.position === undefined
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
{#if noreset}
|
|
56
|
-
<div class="content scrollable" class:dark={$dark}>
|
|
28
|
+
<div class="instance" class:scale class:cside={expanded && "right" === $controlsState.position}>
|
|
29
|
+
<div class="content scrollable">
|
|
30
|
+
{#if noreset}
|
|
57
31
|
<slot props={resolveArgs(defaults ?? {}, bound)} events={handlers} {key} />
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{#key key}
|
|
61
|
-
<div class="content scrollable" class:dark={$dark}>
|
|
32
|
+
{:else}
|
|
33
|
+
{#key key}
|
|
62
34
|
<slot props={resolveArgs(defaults ?? {}, bound)} events={handlers} {key} />
|
|
63
|
-
|
|
64
|
-
{/
|
|
65
|
-
|
|
35
|
+
{/key}
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
66
38
|
{#if expanded}
|
|
67
|
-
<div class="misc
|
|
68
|
-
<Props
|
|
69
|
-
|
|
39
|
+
<div class="misc">
|
|
40
|
+
<Props
|
|
41
|
+
infos={$controls.props}
|
|
42
|
+
bind:values={bound}
|
|
43
|
+
visible={$controlsState.mode === "prop"}
|
|
44
|
+
>
|
|
45
|
+
<div>
|
|
70
46
|
<div>Properties</div>
|
|
71
47
|
<div>Value</div>
|
|
72
48
|
<div>Use</div>
|
|
73
49
|
</div>
|
|
74
50
|
</Props>
|
|
75
|
-
<Events
|
|
76
|
-
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
51
|
+
<Events
|
|
52
|
+
events={$controls.events}
|
|
53
|
+
bind:handlers
|
|
54
|
+
visible={$controlsState.mode === "event"}
|
|
55
|
+
>
|
|
56
|
+
<div>
|
|
57
|
+
<div>Events</div>
|
|
58
|
+
<div>Detail</div>
|
|
59
|
+
</div>
|
|
82
60
|
</Events>
|
|
83
61
|
</div>
|
|
84
62
|
{/if}
|
|
85
63
|
</div>
|
|
86
64
|
|
|
87
65
|
<style>
|
|
88
|
-
div {
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.instance {
|
|
93
|
-
overflow: hidden;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
66
|
.instance.scale {
|
|
97
|
-
transition: transform
|
|
67
|
+
transition: transform var(--i-nil-doc-transition-time);
|
|
98
68
|
}
|
|
99
69
|
|
|
100
70
|
.instance.scale:hover {
|
|
@@ -103,55 +73,35 @@ let handlers;
|
|
|
103
73
|
|
|
104
74
|
.cside {
|
|
105
75
|
display: grid;
|
|
106
|
-
grid-template-columns: 1fr
|
|
76
|
+
grid-template-columns: 1fr 35rem;
|
|
107
77
|
}
|
|
108
78
|
|
|
109
79
|
.content {
|
|
110
|
-
min-height:
|
|
111
|
-
border-radius:
|
|
80
|
+
min-height: 6.25rem;
|
|
81
|
+
border-radius: 0.5rem;
|
|
112
82
|
}
|
|
113
83
|
|
|
114
84
|
div:not(.cside) > .misc {
|
|
115
|
-
border-bottom-left-radius:
|
|
116
|
-
border-bottom-right-radius:
|
|
85
|
+
border-bottom-left-radius: 0.5rem;
|
|
86
|
+
border-bottom-right-radius: 0.5rem;
|
|
117
87
|
user-select: none;
|
|
118
88
|
}
|
|
119
89
|
|
|
120
90
|
.cside > .misc {
|
|
121
|
-
border-top-right-radius:
|
|
122
|
-
border-bottom-right-radius:
|
|
91
|
+
border-top-right-radius: 0.5rem;
|
|
92
|
+
border-bottom-right-radius: 0.5rem;
|
|
123
93
|
user-select: none;
|
|
124
94
|
}
|
|
125
95
|
|
|
126
96
|
.content,
|
|
127
97
|
.misc {
|
|
128
|
-
border
|
|
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;
|
|
98
|
+
border: 1px solid var(--i-nil-doc-block-outline-color);
|
|
142
99
|
}
|
|
143
100
|
|
|
144
101
|
/* colors */
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
background-color:
|
|
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%);
|
|
102
|
+
.instance {
|
|
103
|
+
transition: background-color 350ms;
|
|
104
|
+
color: var(--i-nil-doc-color);
|
|
105
|
+
background-color: var(--i-nil-doc-bg-color);
|
|
156
106
|
}
|
|
157
107
|
</style>
|
|
@@ -7,8 +7,8 @@ export type Params = {
|
|
|
7
7
|
values: Record<string, ValueType>;
|
|
8
8
|
};
|
|
9
9
|
export type ControlState = {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
position: "bottom" | "right" | "hidden";
|
|
11
|
+
mode: "prop" | "event";
|
|
12
12
|
};
|
|
13
13
|
export declare const initParams: () => Writable<Params[]>, getParams: () => Writable<Params[]>;
|
|
14
14
|
type Controls = {
|
|
@@ -14,6 +14,7 @@ export const { init: initControls, get: getControls } = create(() => ({
|
|
|
14
14
|
}));
|
|
15
15
|
export const { init: initDefaults, get: getDefaults } = create(() => ({}));
|
|
16
16
|
export const { init: initControlsState, get: getControlsState } = create(() => ({
|
|
17
|
-
|
|
17
|
+
position: "hidden",
|
|
18
|
+
mode: "prop"
|
|
18
19
|
}));
|
|
19
20
|
export const { init: initOrientation, get: getOrientation } = create(() => false);
|
|
@@ -45,13 +45,13 @@ $:
|
|
|
45
45
|
<slot />
|
|
46
46
|
{#each history as { count, detail, name }, i (i)}
|
|
47
47
|
<div>
|
|
48
|
-
<div>
|
|
48
|
+
<div class="name">
|
|
49
49
|
<div>{name}</div>
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
{#if count > 1}
|
|
51
|
+
<div class="count">
|
|
52
52
|
[{count.toString().padStart(2, "0")}]
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
</div>
|
|
54
|
+
{/if}
|
|
55
55
|
</div>
|
|
56
56
|
<div>{detail}</div>
|
|
57
57
|
</div>
|
|
@@ -60,6 +60,15 @@ $:
|
|
|
60
60
|
{/if}
|
|
61
61
|
|
|
62
62
|
<style>
|
|
63
|
+
.name {
|
|
64
|
+
padding: 0rem 0.5rem;
|
|
65
|
+
display: grid;
|
|
66
|
+
place-content: center;
|
|
67
|
+
grid-auto-flow: column;
|
|
68
|
+
grid-auto-columns: 1.875rem;
|
|
69
|
+
grid-template-columns: 1fr;
|
|
70
|
+
}
|
|
71
|
+
|
|
63
72
|
.count {
|
|
64
73
|
display: grid;
|
|
65
74
|
place-items: center;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<script>import { getTheme } from "../../../../context";
|
|
2
|
-
const dark = getTheme();
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
1
|
<!--
|
|
6
2
|
<div> this component
|
|
7
3
|
<div> Header
|
|
@@ -15,68 +11,42 @@ const dark = getTheme();
|
|
|
15
11
|
...
|
|
16
12
|
</div>
|
|
17
13
|
-->
|
|
18
|
-
<div
|
|
14
|
+
<div>
|
|
19
15
|
<slot />
|
|
20
16
|
</div>
|
|
21
17
|
|
|
22
18
|
<style>
|
|
23
19
|
div {
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 330px;
|
|
26
|
-
min-width: 500px;
|
|
27
|
-
overflow: hidden;
|
|
28
20
|
display: grid;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
div :global(*),
|
|
34
|
-
div :global(*::before),
|
|
35
|
-
div :global(*::after) {
|
|
36
|
-
box-sizing: inherit;
|
|
21
|
+
height: 22rem;
|
|
22
|
+
min-width: 31.25rem;
|
|
23
|
+
grid-auto-rows: 2rem;
|
|
37
24
|
}
|
|
38
25
|
|
|
39
26
|
div > :global(div) {
|
|
40
27
|
display: grid;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
grid-template-columns: 1fr 2fr;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
div > :global(div > div) {
|
|
47
|
-
padding: 0px 10px;
|
|
28
|
+
grid-template-columns: 2fr 3fr;
|
|
29
|
+
align-items: center;
|
|
48
30
|
}
|
|
49
31
|
|
|
50
32
|
div > :global(div:first-child) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
div > :global(div:not(:first-child) > div:first-child) {
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-columns: 1fr 30px;
|
|
33
|
+
font-weight: bold;
|
|
34
|
+
justify-items: center;
|
|
57
35
|
}
|
|
58
36
|
|
|
59
37
|
/* colors */
|
|
60
38
|
div {
|
|
61
|
-
|
|
62
|
-
--sec-color: hsl(210, 29%, 97%);
|
|
63
|
-
--hover-color: hsl(210, 100%, 90%);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
div.dark {
|
|
67
|
-
--pri-color: hsl(213, 26%, 7%);
|
|
68
|
-
--sec-color: hsl(213, 26%, 11%);
|
|
69
|
-
--hover-color: hsl(203, 100%, 15%);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
div {
|
|
73
|
-
transition: background-color 150ms;
|
|
39
|
+
transition: background-color var(--i-nil-doc-transition-time);
|
|
74
40
|
background-repeat: repeat;
|
|
75
|
-
background-size: 100%
|
|
76
|
-
background-image: linear-gradient(
|
|
41
|
+
background-size: 100% 4rem;
|
|
42
|
+
background-image: linear-gradient(
|
|
43
|
+
to bottom,
|
|
44
|
+
var(--i-nil-doc-controls-p) 2rem,
|
|
45
|
+
var(--i-nil-doc-controls-s) 2rem
|
|
46
|
+
);
|
|
77
47
|
}
|
|
78
48
|
|
|
79
49
|
div > :global(div:nth-child(n + 2):hover) {
|
|
80
|
-
background-color: var(--hover
|
|
50
|
+
background-color: var(--i-nil-doc-controls-hover);
|
|
81
51
|
}
|
|
82
52
|
</style>
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} StylerProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} StylerEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} StylerSlots */
|
|
4
|
+
export default class Styler extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type StylerProps = typeof __propDef.props;
|
|
13
|
+
export type StylerEvents = typeof __propDef.events;
|
|
14
|
+
export type StylerSlots = typeof __propDef.slots;
|
|
1
15
|
import { SvelteComponentTyped } from "svelte";
|
|
2
16
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
17
|
+
props: {
|
|
18
|
+
[x: string]: never;
|
|
19
|
+
};
|
|
4
20
|
events: {
|
|
5
21
|
[evt: string]: CustomEvent<any>;
|
|
6
22
|
};
|
|
@@ -8,9 +24,4 @@ declare const __propDef: {
|
|
|
8
24
|
default: {};
|
|
9
25
|
};
|
|
10
26
|
};
|
|
11
|
-
export type StylerProps = typeof __propDef.props;
|
|
12
|
-
export type StylerEvents = typeof __propDef.events;
|
|
13
|
-
export type StylerSlots = typeof __propDef.slots;
|
|
14
|
-
export default class Styler extends SvelteComponentTyped<StylerProps, StylerEvents, StylerSlots> {
|
|
15
|
-
}
|
|
16
27
|
export {};
|