@jolly-pixel/ui 1.0.1 → 2.0.0

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.
Files changed (117) hide show
  1. package/LICENSE +44 -44
  2. package/NOTICE +9 -0
  3. package/README.md +194 -194
  4. package/dist/containers/Dialog.js +11 -11
  5. package/dist/containers/Dialog.styles.js +48 -48
  6. package/dist/containers/Dock.js +11 -11
  7. package/dist/containers/Dock.styles.js +351 -351
  8. package/dist/containers/DockLayout.js +4 -4
  9. package/dist/containers/Floating.js +23 -23
  10. package/dist/containers/Floating.styles.js +116 -116
  11. package/dist/containers/Folder.js +28 -28
  12. package/dist/containers/Folder.styles.js +221 -221
  13. package/dist/containers/Pane.js +50 -50
  14. package/dist/containers/Pane.styles.js +186 -186
  15. package/dist/containers/Rail.js +18 -18
  16. package/dist/containers/Tab.js +10 -10
  17. package/dist/containers/Tabs.js +26 -26
  18. package/dist/containers/Tabs.styles.js +93 -93
  19. package/dist/containers/Toolbar.js +25 -25
  20. package/dist/containers/resize.js +5 -5
  21. package/dist/controls/Button.js +9 -9
  22. package/dist/controls/Button.styles.js +79 -79
  23. package/dist/controls/ButtonGroup.js +28 -28
  24. package/dist/controls/ButtonGroup.styles.js +98 -98
  25. package/dist/controls/Checkbox.js +14 -14
  26. package/dist/controls/Checkbox.styles.js +111 -111
  27. package/dist/controls/Color.js +51 -51
  28. package/dist/controls/Color.styles.js +83 -83
  29. package/dist/controls/ColorPicker.js +104 -104
  30. package/dist/controls/ColorPicker.styles.js +296 -296
  31. package/dist/controls/Control.js +33 -33
  32. package/dist/controls/Control.styles.js +102 -102
  33. package/dist/controls/Controls.js +11 -11
  34. package/dist/controls/Controls.styles.js +98 -98
  35. package/dist/controls/Flags.js +18 -18
  36. package/dist/controls/Flags.styles.js +59 -59
  37. package/dist/controls/Number.js +21 -21
  38. package/dist/controls/Number.styles.js +44 -44
  39. package/dist/controls/PropertyRow.js +13 -13
  40. package/dist/controls/PropertyRow.styles.js +105 -105
  41. package/dist/controls/Range.js +24 -24
  42. package/dist/controls/Range.styles.js +25 -25
  43. package/dist/controls/Select.js +23 -23
  44. package/dist/controls/Select.styles.js +47 -47
  45. package/dist/controls/Separator.js +11 -11
  46. package/dist/controls/Separator.styles.js +45 -45
  47. package/dist/controls/Slider.js +36 -36
  48. package/dist/controls/Slider.styles.js +161 -161
  49. package/dist/controls/Text.js +17 -17
  50. package/dist/data/Tree.d.ts +0 -14
  51. package/dist/data/Tree.d.ts.map +1 -1
  52. package/dist/data/Tree.js +90 -120
  53. package/dist/data/Tree.js.map +1 -1
  54. package/dist/data/Tree.styles.d.ts.map +1 -1
  55. package/dist/data/Tree.styles.js +220 -237
  56. package/dist/data/Tree.styles.js.map +1 -1
  57. package/dist/data/dropZone.d.ts +0 -10
  58. package/dist/data/dropZone.d.ts.map +1 -1
  59. package/dist/data/dropZone.js +0 -10
  60. package/dist/data/dropZone.js.map +1 -1
  61. package/dist/data/resolveRename.d.ts +0 -3
  62. package/dist/data/resolveRename.d.ts.map +1 -1
  63. package/dist/data/resolveRename.js +0 -3
  64. package/dist/data/resolveRename.js.map +1 -1
  65. package/dist/data/resolveReparent.d.ts +0 -7
  66. package/dist/data/resolveReparent.d.ts.map +1 -1
  67. package/dist/data/resolveReparent.js +0 -6
  68. package/dist/data/resolveReparent.js.map +1 -1
  69. package/dist/data/rowDragSession.d.ts +0 -8
  70. package/dist/data/rowDragSession.d.ts.map +1 -1
  71. package/dist/data/rowDragSession.js +0 -6
  72. package/dist/data/rowDragSession.js.map +1 -1
  73. package/dist/data/treeNodes.d.ts +0 -6
  74. package/dist/data/treeNodes.d.ts.map +1 -1
  75. package/dist/data/treeNodes.js +2 -7
  76. package/dist/data/treeNodes.js.map +1 -1
  77. package/dist/feedback/JollyPixelLogo.js +84 -84
  78. package/dist/feedback/Loading.js +29 -29
  79. package/dist/feedback/Loading.styles.js +230 -230
  80. package/dist/feedback/Log.js +8 -8
  81. package/dist/feedback/Log.styles.js +61 -61
  82. package/dist/feedback/Progress.js +17 -17
  83. package/dist/feedback/Progress.styles.js +146 -146
  84. package/dist/field/JollyField.js +51 -51
  85. package/dist/field/JollyField.styles.js +429 -429
  86. package/dist/icon/Icon.js +24 -24
  87. package/dist/icon/builtins.js +126 -126
  88. package/dist/interaction/drag/DragSession.js +6 -6
  89. package/dist/interaction/scrub/ScrubController.js +6 -6
  90. package/dist/math/AxisController.js +22 -22
  91. package/dist/math/Point2d.js +12 -12
  92. package/dist/math/Point2d.styles.js +49 -49
  93. package/dist/math/Quaternion.js +4 -4
  94. package/dist/math/Transform.js +40 -40
  95. package/dist/math/Transform.styles.js +17 -17
  96. package/dist/math/VectorField.js +4 -4
  97. package/dist/math/VectorField.styles.js +102 -102
  98. package/dist/monitors/Graph.js +8 -8
  99. package/dist/monitors/Graph.styles.js +42 -42
  100. package/dist/monitors/Monitor.js +5 -5
  101. package/dist/monitors/Monitor.styles.js +31 -31
  102. package/dist/peer/Presence.js +33 -33
  103. package/dist/peer/Presence.styles.js +82 -82
  104. package/dist/stats/Stats.js +6 -6
  105. package/dist/stats/Stats.styles.js +54 -54
  106. package/dist/theme/components/DensityControl.js +16 -16
  107. package/dist/theme/components/ThemeControl.js +16 -16
  108. package/dist/theme/components/ThemePreferences.js +18 -18
  109. package/dist/theme/font.js +9 -9
  110. package/dist/theme/styles/hiddenStyles.js +4 -4
  111. package/dist/theme/styles/mixins.js +16 -16
  112. package/dist/theme/styles/themeStyles.js +4 -4
  113. package/dist/theme/tokens/density.js +19 -19
  114. package/dist/theme/tokens/ramps.js +40 -40
  115. package/dist/theme/tokens/scales.js +56 -56
  116. package/dist/theme/tokens/semantic.js +184 -184
  117. package/package.json +6 -5
@@ -3,356 +3,356 @@ import { css } from "lit";
3
3
  // Import Internal Dependencies
4
4
  import { kFallback } from "../theme/styles/fallbacks.js";
5
5
  import { focusRing } from "../theme/styles/mixins.js";
6
- export const dockStyles = css `
7
- :host {
8
- position: relative;
9
- display: block;
10
- box-sizing: border-box;
11
- width: var(--jolly-dock-size, 240px);
12
- height: 100%;
13
- min-width: 0;
14
- min-height: 0;
15
- border-radius: 0;
16
- background: var(--jolly-surface, ${kFallback.controlBg});
17
- }
18
-
19
- /*
20
- * "align" here packs panes along the main axis, but it is also a legacy HTML
21
- * presentational attribute that the UA maps straight onto text-align, on
22
- * custom elements too. Declaring the inherited value back neutralizes that
23
- * hint, so align="end" stops right-aligning every word inside the dock. An
24
- * author setting text-align on the dock from the outside still wins.
25
- */
26
- :host([align]) {
27
- text-align: inherit;
28
- }
29
-
30
- :host([side="top"]),
31
- :host([side="bottom"]) {
32
- width: 100%;
33
- height: var(--jolly-dock-size, 240px);
34
- }
35
-
36
- /*
37
- * An emptied dock keeps its place in the tree but gives its space back.
38
- */
39
- :host([empty]:not([overlay])) {
40
- background: none;
41
- }
42
-
43
- /*
44
- * An overlay dock is a layout mode, not a paint mode: it leaves the flow
45
- * entirely so its panes read as floating, and lets pointer events through
46
- * the gaps between them down to whatever it covers.
47
- */
48
- :host([overlay]) {
49
- position: fixed;
50
- width: var(--jolly-dock-size, 240px);
51
- height: auto;
52
- background: none;
53
- pointer-events: none;
54
- }
55
-
56
- :host([overlay][side="left"]),
57
- :host([overlay][side="right"]) {
58
- inset-block: 0;
59
- }
60
-
61
- :host([overlay][side="top"]),
62
- :host([overlay][side="bottom"]) {
63
- inset-inline: 0;
64
- width: auto;
65
- }
66
-
67
- :host([overlay][side="left"]) {
68
- inset-inline-start: 0;
69
- }
70
-
71
- :host([overlay][side="right"]) {
72
- inset-inline-end: 0;
73
- }
74
-
75
- :host([overlay][side="top"]) {
76
- inset-block-start: 0;
77
- }
78
-
79
- :host([overlay][side="bottom"]) {
80
- inset-block-end: 0;
81
- }
82
-
83
- /*
84
- * Border-box, because an overlay dock pads this element: content-box would
85
- * add that padding to the 100% and push the panes out past the dock.
86
- */
87
- .content {
88
- display: flex;
89
- flex-direction: column;
90
- box-sizing: border-box;
91
- width: 100%;
92
- height: 100%;
93
- overflow: hidden;
94
- scrollbar-color: var(--jolly-groove) transparent;
95
- scrollbar-width: thin;
96
- }
97
-
98
- .content::-webkit-scrollbar {
99
- width: 8px;
100
- height: 8px;
101
- }
102
-
103
- .content::-webkit-scrollbar-thumb {
104
- border: 2px solid transparent;
105
- border-radius: 4px;
106
- background: var(--jolly-groove);
107
- background-clip: padding-box;
108
- }
109
-
110
- /*
111
- * An aligned dock sizes its panes to their content and lets none of them
112
- * shrink, so a stack taller than the dock had nowhere to put the excess:
113
- * it was clipped, and the last pane went with it, along with every way of
114
- * reaching that pane again. Scrolling is where the excess goes, being the
115
- * one place that does not undo the packing the mode exists for.
116
- *
117
- * Only along the axis the panes stack on, and not on an overlay dock, which
118
- * is sized by its content rather than by the edge it sits on and passes
119
- * pointer events through the gaps between its panes.
120
- *
121
- * The gutter past the last pane is what tells a stack scrolled to its end
122
- * from one cut off by the edge of the dock. It costs nothing while the panes
123
- * still fit, since the slack they leave sits in the same place.
124
- */
125
- :host([align][side="left"]:not([overlay])) .content,
126
- :host([align][side="right"]:not([overlay])) .content {
127
- overflow-y: auto;
128
- padding-block-end: var(--jolly-dock-scroll-gutter, 8px);
129
- }
130
-
131
- :host([align][side="top"]:not([overlay])) .content,
132
- :host([align][side="bottom"]:not([overlay])) .content {
133
- overflow-x: auto;
134
- padding-inline-end: var(--jolly-dock-scroll-gutter, 8px);
135
- }
136
-
137
- :host([side="top"]) .content,
138
- :host([side="bottom"]) .content {
139
- flex-direction: row;
140
- }
141
-
142
- /*
143
- * Visible, because an overlay pane casts a shadow and this box ends a gap
144
- * away from it: clipped here, the shadow stopped dead along a straight edge
145
- * that reads as the dock having a surface, which is the one thing an overlay
146
- * dock does not have. There is nothing to contain either, the dock being
147
- * sized by its panes and passing pointer events between them.
148
- */
149
- :host([overlay]) .content {
150
- overflow: visible;
151
- gap: var(--jolly-dock-gap, 8px);
152
- padding: var(--jolly-dock-gap, 8px);
153
- }
154
-
155
- /*
156
- * An overlay has no painted dock surface, but its inward edge remains a
157
- * resize target. Keeping the handle transparent avoids creating one.
158
- */
159
- :host([overlay]) .resize-handle {
160
- background: transparent;
161
- pointer-events: auto;
162
- }
163
-
164
- :host([overlay]) .resize-handle::after {
165
- display: none;
166
- }
167
-
168
- :host([overlay]) .resize-handle:hover,
169
- :host([overlay]) .resize-handle:active,
170
- :host([overlay]) .resize-handle:focus-visible {
171
- background: transparent;
172
- }
173
-
174
- /*
175
- * An aligned overlay dock stacks content-sized panes rather than one pane
176
- * filling it, so a tall stack can still exceed the viewport's inset-block
177
- * bounds. Scrolling here trades the rule above's shadow-clipping avoidance
178
- * for staying reachable, which a pane wider than it is tall never risked
179
- * anyway.
180
- */
181
- :host([overlay][align][side="left"]) .content,
182
- :host([overlay][align][side="right"]) .content {
183
- overflow-y: auto;
184
- }
185
-
186
- :host([align="start"]) .content {
187
- justify-content: flex-start;
188
- }
189
-
190
- :host([align="end"]) .content {
191
- justify-content: flex-end;
192
- }
193
-
194
- /*
195
- * The dock is the plane here, so a pane inside it paints nothing of its own.
196
- */
197
- ::slotted(jolly-pane) {
198
- width: 100%;
199
- height: 100%;
200
- border: 0;
201
- border-radius: 0;
202
- background: transparent;
203
- box-shadow: none;
204
- }
205
-
206
- /*
207
- * Without "align" the panes share the axis, so a lone pane still fills the
208
- * dock exactly as it did before multi-pane docks existed. With it they are
209
- * content-sized, which is what makes a folded pane visibly shrink, and
210
- * "grow" opts a single pane back into filling the leftover space.
211
- */
212
- /*
213
- * "min-height: 0" undoes a flex item's default "auto", which sizes it to
214
- * its content and blocks "flex-shrink" from ever taking it below that —
215
- * exactly the shrinking these two rules mean to allow.
216
- */
217
- :host(:not([align])) ::slotted(jolly-pane) {
218
- flex: 1 1 auto;
219
- min-height: 0;
220
- }
221
-
222
- :host([align]) ::slotted(jolly-pane) {
223
- flex: 0 0 auto;
224
- height: auto;
225
- }
226
-
227
- :host([align][side="top"]) ::slotted(jolly-pane),
228
- :host([align][side="bottom"]) ::slotted(jolly-pane) {
229
- width: auto;
230
- height: 100%;
231
- }
232
-
233
- :host([align]) ::slotted(jolly-pane[grow]) {
234
- flex: 1 1 auto;
235
- min-height: 0;
236
- }
237
-
238
- /*
239
- * An overlay pane is detached, so it paints its own raised surface. The
240
- * shorter elevation, not the one a window gets: these sit a gap apart in a
241
- * column, near enough that a window's shadow would pool between them and
242
- * read as one smudged block rather than as two panes.
243
- */
244
- :host([overlay]) ::slotted(jolly-pane) {
245
- height: auto;
246
- border-radius: var(--jolly-radius-md, 6px);
247
- background: var(--jolly-surface-raised, ${kFallback.controlBg});
248
- box-shadow: var(--jolly-shadow-overlay, 0 2px 8px rgb(0 0 0 / 0.3));
249
- pointer-events: auto;
250
- }
251
-
252
- :host([collapsed]) .content {
253
- visibility: hidden;
254
- }
255
-
256
- .resize-handle {
257
- position: absolute;
258
- z-index: 1;
259
- border: 0;
260
- background: var(
261
- --jolly-dock-resize-bg,
262
- color-mix(in oklab, ${kFallback.focusRing} 12%, transparent)
263
- );
264
- touch-action: none;
265
- transition: background-color var(--jolly-duration-base, 160ms)
266
- var(--jolly-easing, ease);
267
- }
268
-
269
- .resize-handle::after {
270
- position: absolute;
271
- background-image: radial-gradient(
272
- circle,
273
- var(--jolly-groove) 1.1px,
274
- transparent 1.3px
275
- );
276
- content: "";
277
- pointer-events: none;
278
- }
279
-
280
- .resize-handle:hover::after,
281
- .resize-handle:active::after,
282
- .resize-handle:focus-visible::after {
283
- background-image: radial-gradient(
284
- circle,
285
- var(--jolly-accent-text, ${kFallback.focusRing}) 1.1px,
286
- transparent 1.3px
287
- );
288
- }
289
-
290
- .resize-handle:hover,
291
- .resize-handle:active,
292
- .resize-handle:focus-visible {
293
- background: var(
294
- --jolly-dock-resize-bg-hover,
295
- color-mix(in oklab, ${kFallback.focusRing} 18%, transparent)
296
- );
297
- }
298
-
299
- :host([side="left"]) .resize-handle,
300
- :host([side="right"]) .resize-handle {
301
- top: 0;
302
- bottom: 0;
303
- width: 4px;
304
- cursor: ew-resize;
305
- }
306
-
307
- :host([side="left"]) .resize-handle {
308
- right: -4px;
309
- }
310
-
311
- :host([side="right"]) .resize-handle {
312
- left: -4px;
313
- }
314
-
315
- :host([side="left"]) .resize-handle::after,
316
- :host([side="right"]) .resize-handle::after {
317
- top: 50%;
318
- left: 50%;
319
- width: 3px;
320
- height: 22px;
321
- background-repeat: repeat-y;
322
- background-size: 100% 7px;
323
- transform: translate(-50%, -50%);
324
- }
325
-
326
- :host([side="top"]) .resize-handle,
327
- :host([side="bottom"]) .resize-handle {
328
- right: 0;
329
- left: 0;
330
- height: 4px;
331
- cursor: ns-resize;
332
- }
333
-
334
- :host([side="top"]) .resize-handle {
335
- bottom: -4px;
336
- }
337
-
338
- :host([side="bottom"]) .resize-handle {
339
- top: -4px;
340
- }
341
-
342
- :host([side="top"]) .resize-handle::after,
343
- :host([side="bottom"]) .resize-handle::after {
344
- top: 50%;
345
- left: 50%;
346
- width: 22px;
347
- height: 3px;
348
- background-repeat: repeat-x;
349
- background-size: 7px 100%;
350
- transform: translate(-50%, -50%);
351
- }
352
-
353
- .resize-handle:focus-visible {
354
- ${focusRing}
355
- outline-offset: -3px;
356
- }
6
+ export const dockStyles = css `
7
+ :host {
8
+ position: relative;
9
+ display: block;
10
+ box-sizing: border-box;
11
+ width: var(--jolly-dock-size, 240px);
12
+ height: 100%;
13
+ min-width: 0;
14
+ min-height: 0;
15
+ border-radius: 0;
16
+ background: var(--jolly-surface, ${kFallback.controlBg});
17
+ }
18
+
19
+ /*
20
+ * "align" here packs panes along the main axis, but it is also a legacy HTML
21
+ * presentational attribute that the UA maps straight onto text-align, on
22
+ * custom elements too. Declaring the inherited value back neutralizes that
23
+ * hint, so align="end" stops right-aligning every word inside the dock. An
24
+ * author setting text-align on the dock from the outside still wins.
25
+ */
26
+ :host([align]) {
27
+ text-align: inherit;
28
+ }
29
+
30
+ :host([side="top"]),
31
+ :host([side="bottom"]) {
32
+ width: 100%;
33
+ height: var(--jolly-dock-size, 240px);
34
+ }
35
+
36
+ /*
37
+ * An emptied dock keeps its place in the tree but gives its space back.
38
+ */
39
+ :host([empty]:not([overlay])) {
40
+ background: none;
41
+ }
42
+
43
+ /*
44
+ * An overlay dock is a layout mode, not a paint mode: it leaves the flow
45
+ * entirely so its panes read as floating, and lets pointer events through
46
+ * the gaps between them down to whatever it covers.
47
+ */
48
+ :host([overlay]) {
49
+ position: fixed;
50
+ width: var(--jolly-dock-size, 240px);
51
+ height: auto;
52
+ background: none;
53
+ pointer-events: none;
54
+ }
55
+
56
+ :host([overlay][side="left"]),
57
+ :host([overlay][side="right"]) {
58
+ inset-block: 0;
59
+ }
60
+
61
+ :host([overlay][side="top"]),
62
+ :host([overlay][side="bottom"]) {
63
+ inset-inline: 0;
64
+ width: auto;
65
+ }
66
+
67
+ :host([overlay][side="left"]) {
68
+ inset-inline-start: 0;
69
+ }
70
+
71
+ :host([overlay][side="right"]) {
72
+ inset-inline-end: 0;
73
+ }
74
+
75
+ :host([overlay][side="top"]) {
76
+ inset-block-start: 0;
77
+ }
78
+
79
+ :host([overlay][side="bottom"]) {
80
+ inset-block-end: 0;
81
+ }
82
+
83
+ /*
84
+ * Border-box, because an overlay dock pads this element: content-box would
85
+ * add that padding to the 100% and push the panes out past the dock.
86
+ */
87
+ .content {
88
+ display: flex;
89
+ flex-direction: column;
90
+ box-sizing: border-box;
91
+ width: 100%;
92
+ height: 100%;
93
+ overflow: hidden;
94
+ scrollbar-color: var(--jolly-groove) transparent;
95
+ scrollbar-width: thin;
96
+ }
97
+
98
+ .content::-webkit-scrollbar {
99
+ width: 8px;
100
+ height: 8px;
101
+ }
102
+
103
+ .content::-webkit-scrollbar-thumb {
104
+ border: 2px solid transparent;
105
+ border-radius: 4px;
106
+ background: var(--jolly-groove);
107
+ background-clip: padding-box;
108
+ }
109
+
110
+ /*
111
+ * An aligned dock sizes its panes to their content and lets none of them
112
+ * shrink, so a stack taller than the dock had nowhere to put the excess:
113
+ * it was clipped, and the last pane went with it, along with every way of
114
+ * reaching that pane again. Scrolling is where the excess goes, being the
115
+ * one place that does not undo the packing the mode exists for.
116
+ *
117
+ * Only along the axis the panes stack on, and not on an overlay dock, which
118
+ * is sized by its content rather than by the edge it sits on and passes
119
+ * pointer events through the gaps between its panes.
120
+ *
121
+ * The gutter past the last pane is what tells a stack scrolled to its end
122
+ * from one cut off by the edge of the dock. It costs nothing while the panes
123
+ * still fit, since the slack they leave sits in the same place.
124
+ */
125
+ :host([align][side="left"]:not([overlay])) .content,
126
+ :host([align][side="right"]:not([overlay])) .content {
127
+ overflow-y: auto;
128
+ padding-block-end: var(--jolly-dock-scroll-gutter, 8px);
129
+ }
130
+
131
+ :host([align][side="top"]:not([overlay])) .content,
132
+ :host([align][side="bottom"]:not([overlay])) .content {
133
+ overflow-x: auto;
134
+ padding-inline-end: var(--jolly-dock-scroll-gutter, 8px);
135
+ }
136
+
137
+ :host([side="top"]) .content,
138
+ :host([side="bottom"]) .content {
139
+ flex-direction: row;
140
+ }
141
+
142
+ /*
143
+ * Visible, because an overlay pane casts a shadow and this box ends a gap
144
+ * away from it: clipped here, the shadow stopped dead along a straight edge
145
+ * that reads as the dock having a surface, which is the one thing an overlay
146
+ * dock does not have. There is nothing to contain either, the dock being
147
+ * sized by its panes and passing pointer events between them.
148
+ */
149
+ :host([overlay]) .content {
150
+ overflow: visible;
151
+ gap: var(--jolly-dock-gap, 8px);
152
+ padding: var(--jolly-dock-gap, 8px);
153
+ }
154
+
155
+ /*
156
+ * An overlay has no painted dock surface, but its inward edge remains a
157
+ * resize target. Keeping the handle transparent avoids creating one.
158
+ */
159
+ :host([overlay]) .resize-handle {
160
+ background: transparent;
161
+ pointer-events: auto;
162
+ }
163
+
164
+ :host([overlay]) .resize-handle::after {
165
+ display: none;
166
+ }
167
+
168
+ :host([overlay]) .resize-handle:hover,
169
+ :host([overlay]) .resize-handle:active,
170
+ :host([overlay]) .resize-handle:focus-visible {
171
+ background: transparent;
172
+ }
173
+
174
+ /*
175
+ * An aligned overlay dock stacks content-sized panes rather than one pane
176
+ * filling it, so a tall stack can still exceed the viewport's inset-block
177
+ * bounds. Scrolling here trades the rule above's shadow-clipping avoidance
178
+ * for staying reachable, which a pane wider than it is tall never risked
179
+ * anyway.
180
+ */
181
+ :host([overlay][align][side="left"]) .content,
182
+ :host([overlay][align][side="right"]) .content {
183
+ overflow-y: auto;
184
+ }
185
+
186
+ :host([align="start"]) .content {
187
+ justify-content: flex-start;
188
+ }
189
+
190
+ :host([align="end"]) .content {
191
+ justify-content: flex-end;
192
+ }
193
+
194
+ /*
195
+ * The dock is the plane here, so a pane inside it paints nothing of its own.
196
+ */
197
+ ::slotted(jolly-pane) {
198
+ width: 100%;
199
+ height: 100%;
200
+ border: 0;
201
+ border-radius: 0;
202
+ background: transparent;
203
+ box-shadow: none;
204
+ }
205
+
206
+ /*
207
+ * Without "align" the panes share the axis, so a lone pane still fills the
208
+ * dock exactly as it did before multi-pane docks existed. With it they are
209
+ * content-sized, which is what makes a folded pane visibly shrink, and
210
+ * "grow" opts a single pane back into filling the leftover space.
211
+ */
212
+ /*
213
+ * "min-height: 0" undoes a flex item's default "auto", which sizes it to
214
+ * its content and blocks "flex-shrink" from ever taking it below that —
215
+ * exactly the shrinking these two rules mean to allow.
216
+ */
217
+ :host(:not([align])) ::slotted(jolly-pane) {
218
+ flex: 1 1 auto;
219
+ min-height: 0;
220
+ }
221
+
222
+ :host([align]) ::slotted(jolly-pane) {
223
+ flex: 0 0 auto;
224
+ height: auto;
225
+ }
226
+
227
+ :host([align][side="top"]) ::slotted(jolly-pane),
228
+ :host([align][side="bottom"]) ::slotted(jolly-pane) {
229
+ width: auto;
230
+ height: 100%;
231
+ }
232
+
233
+ :host([align]) ::slotted(jolly-pane[grow]) {
234
+ flex: 1 1 auto;
235
+ min-height: 0;
236
+ }
237
+
238
+ /*
239
+ * An overlay pane is detached, so it paints its own raised surface. The
240
+ * shorter elevation, not the one a window gets: these sit a gap apart in a
241
+ * column, near enough that a window's shadow would pool between them and
242
+ * read as one smudged block rather than as two panes.
243
+ */
244
+ :host([overlay]) ::slotted(jolly-pane) {
245
+ height: auto;
246
+ border-radius: var(--jolly-radius-md, 6px);
247
+ background: var(--jolly-surface-raised, ${kFallback.controlBg});
248
+ box-shadow: var(--jolly-shadow-overlay, 0 2px 8px rgb(0 0 0 / 0.3));
249
+ pointer-events: auto;
250
+ }
251
+
252
+ :host([collapsed]) .content {
253
+ visibility: hidden;
254
+ }
255
+
256
+ .resize-handle {
257
+ position: absolute;
258
+ z-index: 1;
259
+ border: 0;
260
+ background: var(
261
+ --jolly-dock-resize-bg,
262
+ color-mix(in oklab, ${kFallback.focusRing} 12%, transparent)
263
+ );
264
+ touch-action: none;
265
+ transition: background-color var(--jolly-duration-base, 160ms)
266
+ var(--jolly-easing, ease);
267
+ }
268
+
269
+ .resize-handle::after {
270
+ position: absolute;
271
+ background-image: radial-gradient(
272
+ circle,
273
+ var(--jolly-groove) 1.1px,
274
+ transparent 1.3px
275
+ );
276
+ content: "";
277
+ pointer-events: none;
278
+ }
279
+
280
+ .resize-handle:hover::after,
281
+ .resize-handle:active::after,
282
+ .resize-handle:focus-visible::after {
283
+ background-image: radial-gradient(
284
+ circle,
285
+ var(--jolly-accent-text, ${kFallback.focusRing}) 1.1px,
286
+ transparent 1.3px
287
+ );
288
+ }
289
+
290
+ .resize-handle:hover,
291
+ .resize-handle:active,
292
+ .resize-handle:focus-visible {
293
+ background: var(
294
+ --jolly-dock-resize-bg-hover,
295
+ color-mix(in oklab, ${kFallback.focusRing} 18%, transparent)
296
+ );
297
+ }
298
+
299
+ :host([side="left"]) .resize-handle,
300
+ :host([side="right"]) .resize-handle {
301
+ top: 0;
302
+ bottom: 0;
303
+ width: 4px;
304
+ cursor: ew-resize;
305
+ }
306
+
307
+ :host([side="left"]) .resize-handle {
308
+ right: -4px;
309
+ }
310
+
311
+ :host([side="right"]) .resize-handle {
312
+ left: -4px;
313
+ }
314
+
315
+ :host([side="left"]) .resize-handle::after,
316
+ :host([side="right"]) .resize-handle::after {
317
+ top: 50%;
318
+ left: 50%;
319
+ width: 3px;
320
+ height: 22px;
321
+ background-repeat: repeat-y;
322
+ background-size: 100% 7px;
323
+ transform: translate(-50%, -50%);
324
+ }
325
+
326
+ :host([side="top"]) .resize-handle,
327
+ :host([side="bottom"]) .resize-handle {
328
+ right: 0;
329
+ left: 0;
330
+ height: 4px;
331
+ cursor: ns-resize;
332
+ }
333
+
334
+ :host([side="top"]) .resize-handle {
335
+ bottom: -4px;
336
+ }
337
+
338
+ :host([side="bottom"]) .resize-handle {
339
+ top: -4px;
340
+ }
341
+
342
+ :host([side="top"]) .resize-handle::after,
343
+ :host([side="bottom"]) .resize-handle::after {
344
+ top: 50%;
345
+ left: 50%;
346
+ width: 22px;
347
+ height: 3px;
348
+ background-repeat: repeat-x;
349
+ background-size: 7px 100%;
350
+ transform: translate(-50%, -50%);
351
+ }
352
+
353
+ .resize-handle:focus-visible {
354
+ ${focusRing}
355
+ outline-offset: -3px;
356
+ }
357
357
  `;
358
358
  //# sourceMappingURL=Dock.styles.js.map