@nil-/doc 0.2.17 → 0.2.19

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,17 @@
1
1
  # @nil-/doc
2
2
 
3
+ ## 0.2.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 1dad00f: [doc][fix] removed external css. inlined css even duplicating some of them.
8
+
9
+ ## 0.2.18
10
+
11
+ ### Patch Changes
12
+
13
+ - a63dd42: [doc][fix] added tooltip for range
14
+
3
15
  ## 0.2.17
4
16
 
5
17
  ### Patch Changes
@@ -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,38 @@
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
+ padding: 0px;
35
+ margin: 0px;
36
+ }
37
+
38
+ /* scrollable */
39
+ .scrollable {
40
+ overflow: scroll;
41
+ scrollbar-width: none; /* Firefox */
42
+ -ms-overflow-style: none; /* IE and Edge */
43
+ }
44
+
45
+ .scrollable::-webkit-scrollbar {
46
+ display: none;
47
+ }
19
48
  </style>
20
49
 
21
50
  <script>import Container from "./etc/Container.svelte";
@@ -27,10 +56,10 @@ export let sorter = null;
27
56
  export let renamer = null;
28
57
  const r = inRoot();
29
58
  </script>
30
- <div class="layout" class:nil-doc-reset={r}>
59
+ <div class="layout" class:reset={r}>
31
60
  <Container offset={250} padding={250} vertical secondary>
32
61
  <svelte:fragment slot="primary">
33
- <div class="content nil-doc-scrollable">
62
+ <div class="content scrollable">
34
63
  <Nav
35
64
  info={data}
36
65
  selected={current ?? ""}
@@ -43,7 +72,7 @@ const r = inRoot();
43
72
  </div>
44
73
  </svelte:fragment>
45
74
  <svelte:fragment slot="secondary">
46
- <div class="content nil-doc-scrollable">
75
+ <div class="content scrollable">
47
76
  {#key current}
48
77
  <slot name="content" />
49
78
  {/key}
@@ -8,17 +8,36 @@ 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
+ padding: 0px;
35
+ margin: 0px;
36
+ }
18
37
  </style>
19
38
 
20
39
 
21
- <div class:nil-doc-reset={r}>
40
+ <div class:reset={r}>
22
41
  <slot />
23
42
  </div>
24
43
 
@@ -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 nil-doc-scrollable">
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 nil-doc-scrollable">
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 nil-doc-scrollable" transition:slide|local>
108
+ <div class="misc scrollable" transition:slide|local>
100
109
  <Controls infos={$controls} bind:values={param.values} />
101
110
  </div>
102
111
  {/if}
@@ -3,17 +3,33 @@
3
3
  width: 100%;
4
4
  display: grid;
5
5
  grid-template-columns: 40px 1fr;
6
+ gap: 5px;
7
+ position: relative;
6
8
  }
7
9
 
8
10
  .input > div {
9
11
  width: 100%;
10
12
  height: 100%;
11
13
  display: grid;
12
- text-align: center;
14
+ text-align: right;
13
15
  align-items: center;
14
16
  font-size: 0.8rem;
17
+ user-select: none;
15
18
  margin: auto;
16
19
  }
20
+
21
+ .tooltip {
22
+ width: 100%;
23
+ height: 100%;
24
+ /* top: -100%; */
25
+ left: -100%;
26
+ position: absolute;
27
+ visibility: hidden;
28
+ }
29
+
30
+ .input:hover > .tooltip {
31
+ visibility: visible;
32
+ }
17
33
  </style>
18
34
 
19
35
  <script>import { getDefault } from "./misc/defaulter";
@@ -28,7 +44,10 @@ $: value = enabled && !disabled ? ivalue : undefined;
28
44
  <div>
29
45
  <div style:padding-left={`${depth}px`}>- {info.name}</div>
30
46
  <div class="input">
31
- <div>{ivalue}</div>
47
+ <div class="tooltip">
48
+ Current Value: {ivalue}
49
+ </div>
50
+ <div>{ivalue.toFixed(2)}</div>
32
51
  <input
33
52
  type="range"
34
53
  bind:value={ivalue}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nil-/doc",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "author": {
5
5
  "email": "njaldea@gmail.com",
6
6
  "name": "Neil Aldea"
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
- }
@@ -1,9 +0,0 @@
1
- .nil-doc-scrollable {
2
- overflow: scroll;
3
- scrollbar-width: none; /* Firefox */
4
- -ms-overflow-style: none; /* IE and Edge */
5
- }
6
-
7
- .nil-doc-scrollable::-webkit-scrollbar {
8
- display: none;
9
- }