@nil-/doc 0.2.18 → 0.2.20
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 +13 -0
- package/components/Layout.svelte +33 -6
- package/components/block/Block.svelte +20 -3
- package/components/block/Template.svelte +14 -5
- package/package.json +1 -1
- package/styles/reset.css +0 -19
- package/styles/scrollable.css +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @nil-/doc
|
|
2
2
|
|
|
3
|
+
## 0.2.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3eee0ce: [doc][fix] removed setting of margin/padding
|
|
8
|
+
[doc][fix] only propagate box-sizing (inherit)
|
|
9
|
+
|
|
10
|
+
## 0.2.19
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 1dad00f: [doc][fix] removed external css. inlined css even duplicating some of them.
|
|
15
|
+
|
|
3
16
|
## 0.2.18
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/components/Layout.svelte
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
<style>
|
|
2
|
-
@import "../styles/reset.css";
|
|
3
|
-
@import "../styles/scrollable.css";
|
|
4
|
-
|
|
5
2
|
.layout {
|
|
6
3
|
width: 100%;
|
|
7
4
|
height: 100%;
|
|
@@ -16,6 +13,36 @@
|
|
|
16
13
|
display: flex;
|
|
17
14
|
flex-direction: column;
|
|
18
15
|
}
|
|
16
|
+
|
|
17
|
+
/* reset block */
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: "Fira Code";
|
|
20
|
+
src: url("https://fonts.googleapis.com/css?family=Fira Code");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.reset {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
font-family: "Fira Code", "Courier New", Courier, monospace;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.reset :global(*),
|
|
31
|
+
.reset :global(*::before),
|
|
32
|
+
.reset :global(*::after) {
|
|
33
|
+
box-sizing: inherit;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* scrollable */
|
|
37
|
+
.scrollable {
|
|
38
|
+
overflow: scroll;
|
|
39
|
+
scrollbar-width: none; /* Firefox */
|
|
40
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.scrollable::-webkit-scrollbar {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
19
46
|
</style>
|
|
20
47
|
|
|
21
48
|
<script>import Container from "./etc/Container.svelte";
|
|
@@ -27,10 +54,10 @@ export let sorter = null;
|
|
|
27
54
|
export let renamer = null;
|
|
28
55
|
const r = inRoot();
|
|
29
56
|
</script>
|
|
30
|
-
<div class="layout" class:
|
|
57
|
+
<div class="layout" class:reset={r}>
|
|
31
58
|
<Container offset={250} padding={250} vertical secondary>
|
|
32
59
|
<svelte:fragment slot="primary">
|
|
33
|
-
<div class="content
|
|
60
|
+
<div class="content scrollable">
|
|
34
61
|
<Nav
|
|
35
62
|
info={data}
|
|
36
63
|
selected={current ?? ""}
|
|
@@ -43,7 +70,7 @@ const r = inRoot();
|
|
|
43
70
|
</div>
|
|
44
71
|
</svelte:fragment>
|
|
45
72
|
<svelte:fragment slot="secondary">
|
|
46
|
-
<div class="content
|
|
73
|
+
<div class="content scrollable">
|
|
47
74
|
{#key current}
|
|
48
75
|
<slot name="content" />
|
|
49
76
|
{/key}
|
|
@@ -8,17 +8,34 @@ initControlsState();
|
|
|
8
8
|
const r = inRoot();
|
|
9
9
|
</script>
|
|
10
10
|
<style>
|
|
11
|
-
@import "../../styles/reset.css";
|
|
12
|
-
|
|
13
11
|
div {
|
|
14
12
|
display: flex;
|
|
15
13
|
flex-direction: column;
|
|
16
14
|
font-family: "Fira Code", "Courier New", Courier, monospace;
|
|
17
15
|
}
|
|
16
|
+
|
|
17
|
+
/* reset block */
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: "Fira Code";
|
|
20
|
+
src: url("https://fonts.googleapis.com/css?family=Fira Code");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.reset {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
font-family: "Fira Code", "Courier New", Courier, monospace;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.reset :global(*),
|
|
31
|
+
.reset :global(*::before),
|
|
32
|
+
.reset :global(*::after) {
|
|
33
|
+
box-sizing: inherit;
|
|
34
|
+
}
|
|
18
35
|
</style>
|
|
19
36
|
|
|
20
37
|
|
|
21
|
-
<div class:
|
|
38
|
+
<div class:reset={r}>
|
|
22
39
|
<slot />
|
|
23
40
|
</div>
|
|
24
41
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<style>
|
|
2
|
-
@import "../../styles/scrollable.css";
|
|
3
|
-
|
|
4
2
|
.template {
|
|
5
3
|
display: flex;
|
|
6
4
|
flex-direction: column;
|
|
@@ -30,6 +28,17 @@
|
|
|
30
28
|
border-bottom-right-radius: 5px;
|
|
31
29
|
user-select: none;
|
|
32
30
|
}
|
|
31
|
+
|
|
32
|
+
/* scrollable */
|
|
33
|
+
.scrollable {
|
|
34
|
+
overflow: scroll;
|
|
35
|
+
scrollbar-width: none; /* Firefox */
|
|
36
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.scrollable::-webkit-scrollbar {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
33
42
|
</style>
|
|
34
43
|
<svelte:window on:click={() => ($current = null)} />
|
|
35
44
|
|
|
@@ -77,7 +86,7 @@ const resolveArgs = (resolve);
|
|
|
77
86
|
on:keypress={null}
|
|
78
87
|
>
|
|
79
88
|
{#if noreset}
|
|
80
|
-
<div class="content
|
|
89
|
+
<div class="content scrollable">
|
|
81
90
|
<slot
|
|
82
91
|
id={param.id}
|
|
83
92
|
tag={param.tag}
|
|
@@ -86,7 +95,7 @@ const resolveArgs = (resolve);
|
|
|
86
95
|
</div>
|
|
87
96
|
{:else}
|
|
88
97
|
{#key key}
|
|
89
|
-
<div class="content
|
|
98
|
+
<div class="content scrollable">
|
|
90
99
|
<slot
|
|
91
100
|
id={param.id}
|
|
92
101
|
tag={param.tag}
|
|
@@ -96,7 +105,7 @@ const resolveArgs = (resolve);
|
|
|
96
105
|
{/key}
|
|
97
106
|
{/if}
|
|
98
107
|
{#if $controls.length > 0 && ($controlsState.expand || $current === param.id || hovered === param.id)}
|
|
99
|
-
<div class="misc
|
|
108
|
+
<div class="misc scrollable" transition:slide|local>
|
|
100
109
|
<Controls infos={$controls} bind:values={param.values} />
|
|
101
110
|
</div>
|
|
102
111
|
{/if}
|
package/package.json
CHANGED
package/styles/reset.css
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: "Fira Code";
|
|
3
|
-
src: url("https://fonts.googleapis.com/css?family=Fira Code");
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.nil-doc-reset {
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
font-family: "Fira Code", "Courier New", Courier, monospace;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.nil-doc-reset *,
|
|
14
|
-
.nil-doc-reset *::before,
|
|
15
|
-
.nil-doc-reset *::after {
|
|
16
|
-
box-sizing: inherit;
|
|
17
|
-
padding: 0px;
|
|
18
|
-
margin: 0px;
|
|
19
|
-
}
|