@nil-/doc 0.2.9 → 0.2.11
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @nil-/doc
|
|
2
2
|
|
|
3
|
+
## 0.2.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d16322: noop
|
|
8
|
+
|
|
9
|
+
## 0.2.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c6de380: [feature] container collapsing now supported
|
|
14
|
+
[cleanup] styling of container now uses grid for easier handling
|
|
15
|
+
|
|
3
16
|
## 0.2.9
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -27,12 +40,6 @@
|
|
|
27
40
|
Updated layout documentation
|
|
28
41
|
Update dependencies
|
|
29
42
|
|
|
30
|
-
## 0.2.6
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- d8c80b6: noop
|
|
35
|
-
|
|
36
43
|
## 0.1.0
|
|
37
44
|
|
|
38
45
|
### Minor Changes
|
|
@@ -1,27 +1,53 @@
|
|
|
1
1
|
<style>
|
|
2
2
|
.container {
|
|
3
|
-
display: flex;
|
|
4
|
-
position: relative;
|
|
5
3
|
width: 100%;
|
|
6
4
|
height: 100%;
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-areas:
|
|
7
|
+
"primary"
|
|
8
|
+
"divider"
|
|
9
|
+
"secondary";
|
|
10
|
+
overflow: hidden;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
|
-
.
|
|
10
|
-
|
|
13
|
+
.container.vertical {
|
|
14
|
+
grid-template-areas: "primary divider secondary";
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
.container > div {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
outline: rgb(100, 96, 96) solid 1px;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
/* need higher specificity than above */
|
|
25
|
+
.container > .divider {
|
|
26
|
+
z-index: 10;
|
|
27
|
+
width: auto;
|
|
28
|
+
height: 0px;
|
|
29
|
+
overflow: visible;
|
|
20
30
|
user-select: none;
|
|
31
|
+
grid-area: divider;
|
|
21
32
|
}
|
|
22
33
|
|
|
23
|
-
.container >
|
|
24
|
-
|
|
34
|
+
.container > .divider.vertical {
|
|
35
|
+
width: 0px;
|
|
36
|
+
height: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.container > .divider > .overlay {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 10px;
|
|
42
|
+
cursor: row-resize;
|
|
43
|
+
translate: translateX(-50%);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.container > .divider.vertical > .overlay {
|
|
47
|
+
width: 10px;
|
|
48
|
+
height: 100%;
|
|
49
|
+
cursor: col-resize;
|
|
50
|
+
translate: translateY(-50%);
|
|
25
51
|
}
|
|
26
52
|
</style>
|
|
27
53
|
|
|
@@ -34,8 +60,6 @@ export let offset = 0;
|
|
|
34
60
|
// if true, the reference content is from slot="b"
|
|
35
61
|
// if false, the reference content is from slot="a"
|
|
36
62
|
export let reversed = false;
|
|
37
|
-
// size of the "draggable" divider
|
|
38
|
-
export let thickness = 10;
|
|
39
63
|
// min distance of divider to the edges
|
|
40
64
|
export let padding = 0;
|
|
41
65
|
let width;
|
|
@@ -43,7 +67,7 @@ let height;
|
|
|
43
67
|
let collapse = false;
|
|
44
68
|
const { position, draggable } = createDraggable(offset);
|
|
45
69
|
function update(w, h, limit, value) {
|
|
46
|
-
if (w == null || h == null) {
|
|
70
|
+
if (w == null || h == null || collapse) {
|
|
47
71
|
return;
|
|
48
72
|
}
|
|
49
73
|
const span = vertical ? w : h;
|
|
@@ -51,46 +75,29 @@ function update(w, h, limit, value) {
|
|
|
51
75
|
}
|
|
52
76
|
$: update(width, height, padding, $position);
|
|
53
77
|
$: offsetpx = collapse ? "10px" : `${offset}px`;
|
|
54
|
-
$:
|
|
78
|
+
$: style = reversed ? `auto 0px ${offsetpx}` : `${offsetpx} 0px auto`;
|
|
55
79
|
</script>
|
|
56
80
|
<div
|
|
57
81
|
class="container"
|
|
82
|
+
class:vertical
|
|
58
83
|
bind:clientHeight={height}
|
|
59
84
|
bind:clientWidth={width}
|
|
60
|
-
style:
|
|
85
|
+
style:grid-template-columns={vertical ? style : null}
|
|
61
86
|
>
|
|
62
87
|
{#if width != null && height != null}
|
|
63
|
-
<div
|
|
64
|
-
class:primary={!reversed}
|
|
65
|
-
class:secondary={reversed}
|
|
66
|
-
style:width={!reversed && vertical ? offsetpx : null}
|
|
67
|
-
style:height={!reversed && !vertical ? offsetpx : null}
|
|
68
|
-
>
|
|
88
|
+
<div style:grid-area={!reversed ? "primary" : "secondary"}>
|
|
69
89
|
{#if !collapse || reversed}
|
|
70
90
|
<slot name="a" />
|
|
71
91
|
{/if}
|
|
72
92
|
</div>
|
|
73
|
-
<div
|
|
74
|
-
class="divider"
|
|
75
|
-
style:width={vertical ? "0px" : null}
|
|
76
|
-
style:height={!vertical ? "0px" : null}
|
|
77
|
-
>
|
|
93
|
+
<div class="divider" class:vertical>
|
|
78
94
|
<div
|
|
79
95
|
class="overlay"
|
|
80
|
-
style:width={vertical ? thicknesspx : "100%"}
|
|
81
|
-
style:height={!vertical ? thicknesspx : "100%"}
|
|
82
|
-
style:cursor={vertical ? "col-resize" : "row-resize"}
|
|
83
|
-
style:transform={vertical ? "translateX(-50%)" : "translateY(-50%)"}
|
|
84
96
|
use:draggable={{ reset: () => offset, reversed, vertical }}
|
|
85
97
|
on:dblclick={() => (collapse = !collapse)}
|
|
86
98
|
/>
|
|
87
99
|
</div>
|
|
88
|
-
<div
|
|
89
|
-
class:primary={reversed}
|
|
90
|
-
class:secondary={!reversed}
|
|
91
|
-
style:width={reversed && vertical ? offsetpx : null}
|
|
92
|
-
style:height={reversed && !vertical ? offsetpx : null}
|
|
93
|
-
>
|
|
100
|
+
<div style:grid-area={reversed ? "primary" : "secondary"}>
|
|
94
101
|
{#if !collapse || !reversed}
|
|
95
102
|
<slot name="b" />
|
|
96
103
|
{/if}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} FontProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} FontEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} FontSlots */
|
|
4
|
-
export default class Font extends SvelteComponentTyped<{
|
|
4
|
+
export default class Font extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
5
7
|
[evt: string]: CustomEvent<any>;
|
|
6
8
|
}, {}> {
|
|
7
9
|
}
|
|
@@ -10,7 +12,9 @@ export type FontEvents = typeof __propDef.events;
|
|
|
10
12
|
export type FontSlots = typeof __propDef.slots;
|
|
11
13
|
import { SvelteComponentTyped } from "svelte";
|
|
12
14
|
declare const __propDef: {
|
|
13
|
-
props: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
14
18
|
events: {
|
|
15
19
|
[evt: string]: CustomEvent<any>;
|
|
16
20
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<style>
|
|
2
|
+
@import "../../styles/scrollable.css";
|
|
3
|
+
|
|
2
4
|
.nav {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
3
7
|
gap: 10px;
|
|
4
8
|
padding-top: 20px;
|
|
5
9
|
display: flex;
|
|
@@ -62,7 +66,7 @@ export let renamer;
|
|
|
62
66
|
let filter = "";
|
|
63
67
|
let states = apply(info, () => ({ expanded: false, sub: {} }), (t, path) => ({ expanded: t.expanded || selected === path, sub: t.sub }), (t) => t.sub);
|
|
64
68
|
</script>
|
|
65
|
-
<div class="nav">
|
|
69
|
+
<div class="nav nil-doc-scrollable">
|
|
66
70
|
<div class="logo"><slot /></div>
|
|
67
71
|
<div class="search-bar">
|
|
68
72
|
<input bind:value={filter} type="text" />
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nil-/doc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "njaldea@gmail.com",
|
|
6
6
|
"name": "Neil Aldea"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@sveltejs/adapter-
|
|
9
|
+
"@sveltejs/adapter-vercel": "next",
|
|
10
10
|
"@sveltejs/kit": "next",
|
|
11
11
|
"@sveltejs/package": "next",
|
|
12
12
|
"mdsvex": "^0.10.6",
|
|
13
13
|
"svelte": "^3.53.1",
|
|
14
|
-
"svelte-check": "^2.
|
|
14
|
+
"svelte-check": "^2.10.0",
|
|
15
15
|
"svelte-markdown": "^0.2.3",
|
|
16
16
|
"svelte-preprocess": "^4.10.7",
|
|
17
17
|
"tslib": "^2.4.1",
|