@nil-/doc 0.2.20 → 0.2.21

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,13 @@
1
1
  # @nil-/doc
2
2
 
3
+ ## 0.2.21
4
+
5
+ ### Patch Changes
6
+
7
+ - 0398a72: [doc][fix] remove dependency on box-sizing
8
+ [doc][fix] control min width
9
+ [doc][feature] made template configurable by column prop
10
+
3
11
  ## 0.2.20
4
12
 
5
13
  ### Patch Changes
@@ -12,6 +12,7 @@
12
12
  padding: 5px;
13
13
  display: flex;
14
14
  flex-direction: column;
15
+ box-sizing: border-box;
15
16
  }
16
17
 
17
18
  /* reset block */
@@ -27,12 +28,6 @@
27
28
  font-family: "Fira Code", "Courier New", Courier, monospace;
28
29
  }
29
30
 
30
- .reset :global(*),
31
- .reset :global(*::before),
32
- .reset :global(*::after) {
33
- box-sizing: inherit;
34
- }
35
-
36
31
  /* scrollable */
37
32
  .scrollable {
38
33
  overflow: scroll;
@@ -26,12 +26,6 @@ const r = inRoot();
26
26
  box-sizing: border-box;
27
27
  font-family: "Fira Code", "Courier New", Courier, monospace;
28
28
  }
29
-
30
- .reset :global(*),
31
- .reset :global(*::before),
32
- .reset :global(*::after) {
33
- box-sizing: inherit;
34
- }
35
29
  </style>
36
30
 
37
31
 
@@ -1,20 +1,24 @@
1
1
  <style>
2
2
  .template {
3
- display: flex;
4
- flex-direction: column;
5
- font-family: "Fira Code", "Courier New", Courier, monospace;
6
- gap: 20px;
3
+ display: grid;
4
+ gap: 5px;
7
5
  padding-bottom: 10px;
8
6
  padding-top: 10px;
9
7
  }
10
8
 
11
- .instance {
12
- display: flex;
13
- flex-direction: column;
9
+ .template:not(.column) {
10
+ grid-auto-rows: 1fr;
11
+ grid-auto-columns: auto;
12
+ grid-auto-flow: row;
13
+ }
14
+
15
+ .template.columns {
16
+ grid-auto-rows: auto;
17
+ grid-auto-columns: 1fr;
18
+ grid-auto-flow: column;
14
19
  }
15
20
 
16
21
  .content {
17
- padding: 3px;
18
22
  min-height: 100px;
19
23
  border-radius: 5px 5px 5px 5px;
20
24
  border: rgb(100, 96, 96) solid 1px;
@@ -22,13 +26,16 @@
22
26
  }
23
27
 
24
28
  .misc {
25
- margin-top: 2px;
26
29
  outline: rgb(100, 96, 96) solid 1px;
27
30
  border-bottom-left-radius: 5px;
28
31
  border-bottom-right-radius: 5px;
29
32
  user-select: none;
30
33
  }
31
34
 
35
+ .template > div > div {
36
+ margin: 3px;
37
+ }
38
+
32
39
  /* scrollable */
33
40
  .scrollable {
34
41
  overflow: scroll;
@@ -55,6 +62,7 @@ const controlsState = getControlsState();
55
62
  const defaultsStore = getDefaults();
56
63
  export let defaults = undefined;
57
64
  export let noreset = false;
65
+ export let columns = false;
58
66
  function reset() {
59
67
  $params = [];
60
68
  $defaultsStore = defaults;
@@ -76,10 +84,10 @@ let key = false;
76
84
  beforeUpdate(() => (key = !key));
77
85
  const resolveArgs = (resolve);
78
86
  </script>
79
- <div class="template">
87
+ <div class="template" class:columns>
80
88
  {#each $params as param (param.id)}
81
89
  <div
82
- class="instance"
90
+ class="scrollable"
83
91
  on:click|stopPropagation={() => ($current = param.id)}
84
92
  on:mouseenter={() => (hovered = param.id)}
85
93
  on:mouseleave={() => (hovered = null)}
@@ -3,6 +3,7 @@ declare class __sveltets_Render<Args> {
3
3
  props(): {
4
4
  defaults?: Args | undefined;
5
5
  noreset?: boolean | undefined;
6
+ columns?: boolean | undefined;
6
7
  };
7
8
  events(): {} & {
8
9
  [evt: string]: CustomEvent<any>;
@@ -19,10 +19,10 @@
19
19
  }
20
20
 
21
21
  .tooltip {
22
+ padding-right: 10px;
22
23
  width: 100%;
23
24
  height: 100%;
24
- /* top: -100%; */
25
- left: -100%;
25
+ left: -110%;
26
26
  position: absolute;
27
27
  visibility: hidden;
28
28
  }
@@ -1,15 +1,22 @@
1
1
  <style>
2
2
  div {
3
3
  width: 100%;
4
+ min-width: 500px;
5
+ overflow: hidden;
4
6
  display: grid;
5
7
  grid-auto-rows: 30px;
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ div :global(*) {
12
+ box-sizing: inherit;
6
13
  }
7
14
 
8
15
  div > :global(div) {
9
16
  width: 100%;
10
17
  display: grid;
11
18
  padding: 2px 0px;
12
- grid-template-columns: 1fr 200px 75px;
19
+ grid-template-columns: minmax(250px, 1fr) 200px 40px;
13
20
  background-color: hsl(205, 50%, 5%);
14
21
  }
15
22
 
@@ -17,8 +24,9 @@
17
24
  background-color: hsl(205, 15%, 15%);
18
25
  }
19
26
 
20
- div > :global(div:hover) {
21
- background-color: rgba(2, 156, 253, 0.07);
27
+ div > :global(div:hover .tooltip),
28
+ div > :global(div:nth-child(n + 2):hover) {
29
+ background-color: hsl(203, 100%, 15%);
22
30
  }
23
31
 
24
32
  div > :global(div > div) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nil-/doc",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "author": {
5
5
  "email": "njaldea@gmail.com",
6
6
  "name": "Neil Aldea"