@esportsplus/ui 0.66.0 → 0.67.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.
- package/README.md +2 -2
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/group/scss/index.scss +1 -1
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/search/scss/index.scss +1 -1
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +2 -2
- package/build/components/shell/index.js +108 -73
- package/build/components/shell/model.d.ts +9 -2
- package/build/components/shell/model.js +33 -4
- package/build/components/shell/scss/index.scss +1 -1
- package/build/components/sortable/index.d.ts +2 -1
- package/build/components/sortable/index.js +3 -2
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/toolbar/scss/index.scss +1 -1
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/package.json +1 -1
- package/src/components/shell/index.ts +32 -11
- package/src/components/shell/model.ts +65 -7
- package/src/components/sortable/index.ts +7 -2
- package/src/tokens/scss/color.scss +2 -2
|
@@ -13,16 +13,16 @@ import { frame, grip, resizer, sidebar, toggle } from './sidebar.js';
|
|
|
13
13
|
import subtree from './subtree.js';
|
|
14
14
|
import './scss/index.scss';
|
|
15
15
|
const template_1dhwcf35 = template_u1.template(`<!--$--><!--$-->`);
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
16
|
+
const template_1dhwcf39 = template_u1.template(`<div aria-hidden='true' data-placement='bottom'>`, true);
|
|
17
|
+
const template_1dhwcf3b = template_u1.template(`<div aria-hidden='true' data-placement='left'>`, true);
|
|
18
|
+
const template_1dhwcf3d = template_u1.template(`<div aria-hidden='true' data-placement='right'>`, true);
|
|
19
|
+
const template_1dhwcf3f = template_u1.template(`<div aria-hidden='true'>`, true);
|
|
20
|
+
const template_1dhwcf3h = template_u1.template(`<div>`, true);
|
|
21
|
+
const template_1dhwcf3k = template_u1.template(`<div></div><!--$-->`);
|
|
22
|
+
const template_1dhwcf3o = template_u1.template(`<div class='shell-frame'><!--$--><div class='shell-center'><div class='shell-main'></div></div></div><!--$-->`);
|
|
23
|
+
const template_1dhwcf3v = template_u1.template(`<!--$--><!--$--><!--$--><!--$-->`);
|
|
24
|
+
const template_1dhwcf311 = template_u1.template(`<!--$--><div>`);
|
|
25
|
+
const template_1dhwcf315 = template_u1.template(`<div><div></div><!--$--><!--$-->`, true);
|
|
26
26
|
class ReactiveObject_1dhwcf30 extends reactivity_u0.ReactiveObject {
|
|
27
27
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
28
28
|
constructor() {
|
|
@@ -157,12 +157,14 @@ function structure(node) {
|
|
|
157
157
|
}
|
|
158
158
|
return [node.id, node.direction, node.children.map(structure)];
|
|
159
159
|
}
|
|
160
|
-
function target(workspace, x, y) {
|
|
160
|
+
function target(workspace, x, y, allowed) {
|
|
161
161
|
let elements = document.elementsFromPoint(x, y).filter((element) => element.closest('.shell') === workspace), dock = elements.find((element) => element.matches('.shell-dock-target')), section = elements.find((element) => element.matches('.shell-group'));
|
|
162
162
|
if (dock) {
|
|
163
163
|
return dock;
|
|
164
164
|
}
|
|
165
|
-
if (!section ||
|
|
165
|
+
if (!section ||
|
|
166
|
+
!allowed(section.dataset.group ?? '') ||
|
|
167
|
+
y <= (section.querySelector(':scope > .shell-header')?.getBoundingClientRect().bottom ?? -Infinity)) {
|
|
166
168
|
return null;
|
|
167
169
|
}
|
|
168
170
|
let { height, left, top, width } = section.getBoundingClientRect(), across = width <= 0 ? 0.5 : (x - left) / width, down = height <= 0 ? 0.5 : (y - top) / height, side = [['left', across], ['right', 1 - across], ['top', down], ['bottom', 1 - down]]
|
|
@@ -174,7 +176,7 @@ function under(workspace, x, y) {
|
|
|
174
176
|
return found?.dataset.group;
|
|
175
177
|
}
|
|
176
178
|
const shell = component(function ({ catalog, empty, icons = false, narrow: breakpoint = NARROW, sidebars: options = {}, state, tabs = {}, ...attributes }) {
|
|
177
|
-
let adding, added = new ReactiveObject_1dhwcf30(), apple = mac(), carrying = signal(
|
|
179
|
+
let adding, added = new ReactiveObject_1dhwcf30(), apple = mac(), carrying = signal(null), controller, frames = { left: frame(), right: frame() }, hosts = new Map(), landing = null, parking, picks = signal([]), regions = {}, size = new ReactiveObject_1dhwcf31(), slots = new Map(), strips = new WeakMap(), subject = new ReactiveObject_1dhwcf32(), switching, unobserve, workspace;
|
|
178
180
|
let narrow = () => size.width > 0 && size.width <= breakpoint;
|
|
179
181
|
let edges = {
|
|
180
182
|
frames,
|
|
@@ -195,6 +197,10 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
195
197
|
state.split(surface.id, group, direction, side);
|
|
196
198
|
}
|
|
197
199
|
}
|
|
200
|
+
function shares(surface, group) {
|
|
201
|
+
let found = findGroup(state.layout.root, group);
|
|
202
|
+
return found !== null && state.shares(surface.id, found.placement);
|
|
203
|
+
}
|
|
198
204
|
function holds(group, kind) {
|
|
199
205
|
return !catalog[kind]?.multiple && !!findGroup(state.layout.root, group)?.surfaces.some((surface) => surface.kind === kind);
|
|
200
206
|
}
|
|
@@ -250,31 +256,32 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
250
256
|
picked: (group) => read(picks).includes(group),
|
|
251
257
|
scrollbar: { hidden: true, ...tabs.scrollbar, horizontal: true },
|
|
252
258
|
slot: (surface) => {
|
|
253
|
-
let
|
|
254
|
-
template_u1.onconnect(
|
|
259
|
+
let root_1dhwcf3g = template_1dhwcf3h();
|
|
260
|
+
template_u1.onconnect(root_1dhwcf3g, (element) => {
|
|
255
261
|
slots.set(surface, element);
|
|
256
262
|
attach(surface, element);
|
|
257
263
|
});
|
|
258
|
-
template_u1.ondisconnect(
|
|
264
|
+
template_u1.ondisconnect(root_1dhwcf3g, () => {
|
|
259
265
|
if (slots.get(surface)?.isConnected === false) {
|
|
260
266
|
slots.delete(surface);
|
|
261
267
|
}
|
|
262
268
|
});
|
|
263
|
-
template_u1.setClass(
|
|
264
|
-
return
|
|
269
|
+
template_u1.setClass(root_1dhwcf3g, ["shell-slot"]);
|
|
270
|
+
return root_1dhwcf3g;
|
|
265
271
|
},
|
|
266
272
|
sorting(strip, group) {
|
|
267
273
|
strips.set(strip, group);
|
|
268
274
|
return {
|
|
275
|
+
accepts: (surface) => shares(surface, strips.get(strip) ?? ''),
|
|
269
276
|
disabled: (surface) => surface.sortable === false,
|
|
270
277
|
group: edges.id,
|
|
271
278
|
onland: () => {
|
|
272
279
|
let land = landing;
|
|
273
280
|
landing = null;
|
|
274
|
-
write(carrying,
|
|
281
|
+
write(carrying, null);
|
|
275
282
|
land?.();
|
|
276
283
|
},
|
|
277
|
-
onlift: () => write(carrying,
|
|
284
|
+
onlift: (surface) => write(carrying, surface),
|
|
278
285
|
onsort: (surface, _, to, __, target) => {
|
|
279
286
|
let group = strips.get(target);
|
|
280
287
|
landing = group ? () => state.move(surface.id, group, to) : null;
|
|
@@ -288,7 +295,7 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
288
295
|
}
|
|
289
296
|
};
|
|
290
297
|
},
|
|
291
|
-
over: (
|
|
298
|
+
over: (surface, x, y) => workspace ? target(workspace, x, y, (group) => shares(surface, group)) : null
|
|
292
299
|
}
|
|
293
300
|
};
|
|
294
301
|
},
|
|
@@ -435,16 +442,16 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
435
442
|
return current.sizes;
|
|
436
443
|
}
|
|
437
444
|
{
|
|
438
|
-
let
|
|
439
|
-
template_u1.slot(
|
|
440
|
-
let
|
|
441
|
-
template_u1.slot(
|
|
442
|
-
template_u1.slot(
|
|
445
|
+
let root_1dhwcf3i = template_1dhwcf3h();
|
|
446
|
+
template_u1.slot(root_1dhwcf3i, current.children.map((child, index) => {
|
|
447
|
+
let root_1dhwcf3j = template_1dhwcf3k(), element_1dhwcf3l = root_1dhwcf3j.firstChild, element_1dhwcf3m = element_1dhwcf3l.nextSibling;
|
|
448
|
+
template_u1.slot(element_1dhwcf3l, node(child), 1);
|
|
449
|
+
template_u1.slot(element_1dhwcf3m, index < current.children.length - 1 && separator(axis, () => {
|
|
443
450
|
let from = sizes(), length = box.length;
|
|
444
451
|
return (delta) => state.resize(current.id, resized(from, index, delta, length, MIN_FRACTION), current.children.map((child) => child.id));
|
|
445
452
|
}));
|
|
446
|
-
template_u1.setClass(
|
|
447
|
-
template_u1.setStyle(
|
|
453
|
+
template_u1.setClass(element_1dhwcf3l, ["shell-pane", () => state.layout.main !== null && contains(child, state.layout.main) && 'shell-pane--current']);
|
|
454
|
+
template_u1.setStyle(element_1dhwcf3l, ["", () => {
|
|
448
455
|
let maximized = state.layout.maximized;
|
|
449
456
|
if (maximized === null || !contains(current, maximized)) {
|
|
450
457
|
return `--flex: 0 0 ${(sizes()[index] ?? 0) * 100}%;`;
|
|
@@ -453,16 +460,16 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
453
460
|
? `--flex: 0 0 calc(100% - ${(current.children.length - 1) * COLLAPSED}px);`
|
|
454
461
|
: `--flex: 0 0 ${COLLAPSED}px;`;
|
|
455
462
|
}]);
|
|
456
|
-
return
|
|
463
|
+
return root_1dhwcf3j;
|
|
457
464
|
}), 1);
|
|
458
|
-
template_u1.onconnect(
|
|
465
|
+
template_u1.onconnect(root_1dhwcf3i, (element) => {
|
|
459
466
|
unobserve = observe(element, ([entry]) => {
|
|
460
467
|
box.length = axis === 'x' ? entry.contentRect.width : entry.contentRect.height;
|
|
461
468
|
});
|
|
462
469
|
});
|
|
463
|
-
template_u1.ondisconnect(
|
|
464
|
-
template_u1.setClass(
|
|
465
|
-
return
|
|
470
|
+
template_u1.ondisconnect(root_1dhwcf3i, () => unobserve?.());
|
|
471
|
+
template_u1.setClass(root_1dhwcf3i, ["shell-split", "shell-split--" + (current.direction)]);
|
|
472
|
+
return root_1dhwcf3i;
|
|
466
473
|
}
|
|
467
474
|
}
|
|
468
475
|
function switcher(main) {
|
|
@@ -507,39 +514,67 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
507
514
|
function targets() {
|
|
508
515
|
return ['bottom', 'left', 'right']
|
|
509
516
|
.filter((placement) => placement === 'bottom' || !stationary(state.layout.root, placement))
|
|
510
|
-
.map((placement) => (placement === "bottom" ?
|
|
511
|
-
let
|
|
512
|
-
template_u1.setProperty(
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
.map((placement) => (placement === "bottom" ? (() => {
|
|
518
|
+
let root_1dhwcf38 = template_1dhwcf39();
|
|
519
|
+
template_u1.setProperty(root_1dhwcf38, 'hidden', () => {
|
|
520
|
+
let surface = read(carrying);
|
|
521
|
+
return surface !== null && !state.shares(surface.id, placement);
|
|
522
|
+
});
|
|
523
|
+
template_u1.setClass(root_1dhwcf38, ["shell-dock-target shell-dock-target--bottom"]);
|
|
524
|
+
return root_1dhwcf38;
|
|
525
|
+
})() : placement === "left" ? (() => {
|
|
526
|
+
let root_1dhwcf3a = template_1dhwcf3b();
|
|
527
|
+
template_u1.setProperty(root_1dhwcf3a, 'hidden', () => {
|
|
528
|
+
let surface = read(carrying);
|
|
529
|
+
return surface !== null && !state.shares(surface.id, placement);
|
|
530
|
+
});
|
|
531
|
+
template_u1.setClass(root_1dhwcf3a, ["shell-dock-target shell-dock-target--left"]);
|
|
532
|
+
return root_1dhwcf3a;
|
|
533
|
+
})() : placement === "right" ? (() => {
|
|
534
|
+
let root_1dhwcf3c = template_1dhwcf3d();
|
|
535
|
+
template_u1.setProperty(root_1dhwcf3c, 'hidden', () => {
|
|
536
|
+
let surface = read(carrying);
|
|
537
|
+
return surface !== null && !state.shares(surface.id, placement);
|
|
538
|
+
});
|
|
539
|
+
template_u1.setClass(root_1dhwcf3c, ["shell-dock-target shell-dock-target--right"]);
|
|
540
|
+
return root_1dhwcf3c;
|
|
541
|
+
})() : (() => {
|
|
542
|
+
let root_1dhwcf3e = template_1dhwcf3f();
|
|
543
|
+
template_u1.setProperty(root_1dhwcf3e, 'data-placement', placement);
|
|
544
|
+
template_u1.setProperty(root_1dhwcf3e, 'hidden', () => {
|
|
545
|
+
let surface = read(carrying);
|
|
546
|
+
return surface !== null && !state.shares(surface.id, placement);
|
|
547
|
+
});
|
|
548
|
+
template_u1.setClass(root_1dhwcf3e, ["shell-dock-target", "shell-dock-target--" + (placement)]);
|
|
549
|
+
return root_1dhwcf3e;
|
|
515
550
|
})()));
|
|
516
551
|
}
|
|
517
552
|
function tree() {
|
|
518
553
|
let trees = shown(state.layout);
|
|
519
554
|
{
|
|
520
|
-
let
|
|
521
|
-
template_u1.slot(
|
|
522
|
-
let
|
|
523
|
-
template_u1.slot(
|
|
524
|
-
template_u1.slot(
|
|
525
|
-
template_u1.slot(
|
|
526
|
-
template_u1.slot(
|
|
527
|
-
return
|
|
555
|
+
let root_1dhwcf3n = template_1dhwcf3o(), element_1dhwcf3p = root_1dhwcf3n.firstChild, element_1dhwcf3q = element_1dhwcf3p.firstChild, element_1dhwcf3r = element_1dhwcf3p.firstElementChild.firstElementChild, element_1dhwcf3s = element_1dhwcf3p.firstElementChild, element_1dhwcf3t = element_1dhwcf3p.nextSibling;
|
|
556
|
+
template_u1.slot(element_1dhwcf3q, ['left', 'right'].map((edge) => (trees[edge] || options[edge]) && (() => {
|
|
557
|
+
let root_1dhwcf3u = template_1dhwcf3v(), element_1dhwcf3w = root_1dhwcf3u.firstChild, element_1dhwcf3x = element_1dhwcf3w.nextSibling, element_1dhwcf3y = element_1dhwcf3x.nextSibling, element_1dhwcf3z = element_1dhwcf3y.nextSibling;
|
|
558
|
+
template_u1.slot(element_1dhwcf3w, sidebar(edges, edge, region(edge)));
|
|
559
|
+
template_u1.slot(element_1dhwcf3x, grip(edges, edge));
|
|
560
|
+
template_u1.slot(element_1dhwcf3y, options[edge]?.resizable && resizer(edges, edge));
|
|
561
|
+
template_u1.slot(element_1dhwcf3z, toggle(edges, edge));
|
|
562
|
+
return root_1dhwcf3u;
|
|
528
563
|
})()));
|
|
529
|
-
template_u1.slot(
|
|
530
|
-
template_u1.slot(
|
|
531
|
-
let
|
|
532
|
-
template_u1.slot(
|
|
564
|
+
template_u1.slot(element_1dhwcf3r, region('main'), 1);
|
|
565
|
+
template_u1.slot(element_1dhwcf3s, trees.bottom && (() => {
|
|
566
|
+
let root_1dhwcf310 = template_1dhwcf311(), element_1dhwcf312 = root_1dhwcf310.firstChild, element_1dhwcf313 = element_1dhwcf312.nextSibling;
|
|
567
|
+
template_u1.slot(element_1dhwcf312, separator('y', () => {
|
|
533
568
|
let share = bounded(state.layout.bottom.size), length = size.height;
|
|
534
569
|
return (delta) => state.resizeDock('bottom', resized([1 - share, share], 0, delta, length, MIN_FRACTION)[1]);
|
|
535
570
|
}, { hidden: () => state.layout.bottom.maximized }));
|
|
536
|
-
template_u1.slot(
|
|
537
|
-
template_u1.setClass(
|
|
538
|
-
template_u1.setStyle(
|
|
539
|
-
return
|
|
571
|
+
template_u1.slot(element_1dhwcf313, region('bottom'), 1);
|
|
572
|
+
template_u1.setClass(element_1dhwcf313, ["shell-dock", () => state.layout.bottom.maximized && 'shell-dock--maximized']);
|
|
573
|
+
template_u1.setStyle(element_1dhwcf313, ["", () => `--flex: 0 0 ${bounded(state.layout.bottom.size) * 100}%;`]);
|
|
574
|
+
return root_1dhwcf310;
|
|
540
575
|
})(), 1);
|
|
541
|
-
template_u1.slot(
|
|
542
|
-
return
|
|
576
|
+
template_u1.slot(element_1dhwcf3t, targets());
|
|
577
|
+
return root_1dhwcf3n;
|
|
543
578
|
}
|
|
544
579
|
}
|
|
545
580
|
let kind = () => findSurface(state.layout.root, subject.surface)?.kind ?? '', own = () => !!catalog[kind()]?.menu, items = [
|
|
@@ -576,8 +611,8 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
576
611
|
}
|
|
577
612
|
});
|
|
578
613
|
{
|
|
579
|
-
let
|
|
580
|
-
template_u1.slot(
|
|
614
|
+
let root_1dhwcf314 = template_1dhwcf315(), element_1dhwcf316 = root_1dhwcf314.firstElementChild, element_1dhwcf317 = root_1dhwcf314.firstChild.nextSibling, element_1dhwcf318 = element_1dhwcf317.nextSibling;
|
|
615
|
+
template_u1.slot(element_1dhwcf317, subtree(() => {
|
|
581
616
|
let layout = state.layout, trees = shown(layout), key = JSON.stringify([layout.bottom.open, layout.zoom.at(-1)?.groups ?? null, ...Object.values(trees).map((tree) => tree !== null)]), changed = key !== last;
|
|
582
617
|
if (changed) {
|
|
583
618
|
park();
|
|
@@ -586,7 +621,7 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
586
621
|
last = key;
|
|
587
622
|
return key;
|
|
588
623
|
}, tree, { class: 'shell-tree' }));
|
|
589
|
-
template_u1.slot(
|
|
624
|
+
template_u1.slot(element_1dhwcf318, tooltip.context({
|
|
590
625
|
class: 'shell-menu',
|
|
591
626
|
controller: (value) => {
|
|
592
627
|
adding = value;
|
|
@@ -600,7 +635,7 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
600
635
|
state: added,
|
|
601
636
|
[tooltip.context.panel]: { 'aria-label': 'Add panel' }
|
|
602
637
|
}, ''));
|
|
603
|
-
template_u1.slot(
|
|
638
|
+
template_u1.slot(root_1dhwcf314, tooltip.context({
|
|
604
639
|
class: 'shell-menu',
|
|
605
640
|
controller: (value) => {
|
|
606
641
|
controller = value;
|
|
@@ -608,28 +643,28 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
608
643
|
items,
|
|
609
644
|
[tooltip.context.panel]: { 'aria-label': 'Tab actions' }
|
|
610
645
|
}, ''), 1);
|
|
611
|
-
template_u1.onconnect(
|
|
646
|
+
template_u1.onconnect(element_1dhwcf316, (element) => {
|
|
612
647
|
parking = element;
|
|
613
648
|
});
|
|
614
|
-
template_u1.setClass(
|
|
615
|
-
let
|
|
616
|
-
template_u1.setProperties(
|
|
617
|
-
template_u1.onconnect(
|
|
649
|
+
template_u1.setClass(element_1dhwcf316, ["shell-parking"]);
|
|
650
|
+
let attributes_1dhwcf319 = attributes;
|
|
651
|
+
template_u1.setProperties(root_1dhwcf314, attributes_1dhwcf319, true);
|
|
652
|
+
template_u1.onconnect(root_1dhwcf314, (element) => {
|
|
618
653
|
workspace = element;
|
|
619
654
|
unobserve = observe(element, ([entry]) => {
|
|
620
655
|
size.height = entry.contentRect.height;
|
|
621
656
|
size.width = entry.contentRect.width;
|
|
622
657
|
});
|
|
623
658
|
});
|
|
624
|
-
template_u1.ondisconnect(
|
|
625
|
-
template_u1.onwindow(
|
|
626
|
-
template_u1.onwindow(
|
|
659
|
+
template_u1.ondisconnect(root_1dhwcf314, () => unobserve?.());
|
|
660
|
+
template_u1.onwindow(root_1dhwcf314, 'blur', () => write(picks, []));
|
|
661
|
+
template_u1.onwindow(root_1dhwcf314, 'keydown', (e) => {
|
|
627
662
|
if (e.key === 'Escape' && read(picks).length) {
|
|
628
663
|
e.preventDefault();
|
|
629
664
|
write(picks, []);
|
|
630
665
|
}
|
|
631
666
|
});
|
|
632
|
-
template_u1.onwindow(
|
|
667
|
+
template_u1.onwindow(root_1dhwcf314, 'keyup', (e) => {
|
|
633
668
|
let chosen = read(picks);
|
|
634
669
|
if (e.key !== (apple ? 'Meta' : 'Control') || chosen.length === 0) {
|
|
635
670
|
return;
|
|
@@ -637,14 +672,14 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
637
672
|
write(picks, []);
|
|
638
673
|
state.zoom(chosen);
|
|
639
674
|
});
|
|
640
|
-
template_u1.setClass(
|
|
641
|
-
() =>
|
|
675
|
+
template_u1.setClass(root_1dhwcf314, ["shell", attributes_1dhwcf319?.class, [
|
|
676
|
+
() => !signal.selector(carrying, null) && 'shell--dragging',
|
|
642
677
|
() => narrow() && 'shell--narrow',
|
|
643
678
|
() => (frames.left.dragging || frames.right.dragging) && 'shell--sliding',
|
|
644
679
|
() => open('left') && 'shell--left-open',
|
|
645
680
|
() => open('right') && 'shell--right-open'
|
|
646
681
|
]]);
|
|
647
|
-
template_u1.setStyle(
|
|
682
|
+
template_u1.setStyle(root_1dhwcf314, ["", attributes_1dhwcf319?.style, () => {
|
|
648
683
|
let { left, right } = state.layout;
|
|
649
684
|
return {
|
|
650
685
|
'--left': frames.left.space,
|
|
@@ -653,7 +688,7 @@ const shell = component(function ({ catalog, empty, icons = false, narrow: break
|
|
|
653
688
|
'--right-size': right.size === null ? undefined : `${right.size}px`
|
|
654
689
|
};
|
|
655
690
|
}]);
|
|
656
|
-
return
|
|
691
|
+
return root_1dhwcf314;
|
|
657
692
|
}
|
|
658
693
|
});
|
|
659
694
|
const layout = Object.assign(shell, { state });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
type Area = 'left' | 'main' | 'right';
|
|
1
2
|
type Direction = 'column' | 'row';
|
|
2
3
|
type Dock = {
|
|
3
4
|
open: boolean;
|
|
@@ -28,12 +29,17 @@ type Options = {
|
|
|
28
29
|
closing?: (surfaces: Surface[]) => boolean | Promise<boolean>;
|
|
29
30
|
open?: Partial<Record<Placement, boolean>>;
|
|
30
31
|
root?: Node | null;
|
|
32
|
+
sharing?: Sharing;
|
|
31
33
|
store?: Store;
|
|
32
34
|
};
|
|
33
35
|
type Placement = 'bottom' | 'left' | 'right';
|
|
34
36
|
type Saved = {
|
|
35
37
|
root: Node | null;
|
|
36
38
|
};
|
|
39
|
+
type Sharing = {
|
|
40
|
+
main?: 'all' | 'none';
|
|
41
|
+
sidebar?: 'all' | 'none' | 'sidebars';
|
|
42
|
+
};
|
|
37
43
|
type Side = 'after' | 'before';
|
|
38
44
|
type Split = {
|
|
39
45
|
children: Node[];
|
|
@@ -66,7 +72,7 @@ declare function findSplit(node: Node | null, id: string): Split | null;
|
|
|
66
72
|
declare function findSurfaceGroup(node: Node | null, id: string): Group | null;
|
|
67
73
|
declare function fixed(group: Group): boolean;
|
|
68
74
|
declare function stationary(root: Node | null, placement: Placement): boolean;
|
|
69
|
-
declare const state: ({ closing, open, root, store }?: Options) => {
|
|
75
|
+
declare const state: ({ closing, open, root, sharing, store }?: Options) => {
|
|
70
76
|
activate(surface: string): void;
|
|
71
77
|
back(): boolean;
|
|
72
78
|
close(surface: string): Promise<boolean>;
|
|
@@ -84,6 +90,7 @@ declare const state: ({ closing, open, root, store }?: Options) => {
|
|
|
84
90
|
replace(previous: string, surface: Surface): void;
|
|
85
91
|
resize(split: string, sizes: number[], shown?: string[]): void;
|
|
86
92
|
resizeDock(placement: Placement, size: number): void;
|
|
93
|
+
shares(surface: string, placement?: Placement): boolean;
|
|
87
94
|
split(surface: string, group: string, direction: Direction, side: Side): void;
|
|
88
95
|
toggle(placement: Placement, open?: boolean): void;
|
|
89
96
|
unzoom: () => void;
|
|
@@ -91,4 +98,4 @@ declare const state: ({ closing, open, root, store }?: Options) => {
|
|
|
91
98
|
};
|
|
92
99
|
export default state;
|
|
93
100
|
export { allGroups, bounded, contains, docked, findGroup, findSplit, findSurfaceGroup, fixed, MIN_FRACTION, stationary };
|
|
94
|
-
export type { Direction, Dock, Group, Layout, Node, Placement, Saved, Side, Split, Store, Surface, Zoom };
|
|
101
|
+
export type { Area, Direction, Dock, Group, Layout, Node, Placement, Saved, Sharing, Side, Split, Store, Surface, Zoom };
|
|
@@ -11,6 +11,9 @@ function allGroups(node) {
|
|
|
11
11
|
}
|
|
12
12
|
return node.children.flatMap(allGroups);
|
|
13
13
|
}
|
|
14
|
+
function area(placement) {
|
|
15
|
+
return placement === 'left' || placement === 'right' ? placement : 'main';
|
|
16
|
+
}
|
|
14
17
|
function bounded(size) {
|
|
15
18
|
return Math.min(1 - MIN_FRACTION, Math.max(MIN_FRACTION, size));
|
|
16
19
|
}
|
|
@@ -205,7 +208,7 @@ function zoomed(previous, next) {
|
|
|
205
208
|
}))
|
|
206
209
|
.filter((level) => level.groups.length > 0);
|
|
207
210
|
}
|
|
208
|
-
const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
211
|
+
const state = ({ closing, open = {}, root = null, sharing = {}, store } = {}) => {
|
|
209
212
|
let counter = 1, touched = false, layout = signal(normalizeLayout({
|
|
210
213
|
active: null,
|
|
211
214
|
bottom: { maximized: false, open: open.bottom ?? true, size: BOTTOM_SIZE },
|
|
@@ -230,6 +233,13 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
230
233
|
counter = Math.max(counter, Number(/-(\d+)$/.exec(group.id)?.[1] ?? 0) + 1);
|
|
231
234
|
}
|
|
232
235
|
}
|
|
236
|
+
function allows(from, to) {
|
|
237
|
+
if (from === 'main') {
|
|
238
|
+
return (sharing.main ?? 'all') === 'all';
|
|
239
|
+
}
|
|
240
|
+
let policy = sharing.sidebar ?? 'all';
|
|
241
|
+
return policy === 'all' || (policy === 'sidebars' && to !== 'main');
|
|
242
|
+
}
|
|
233
243
|
function guarded(change) {
|
|
234
244
|
let surfaces = removed(read(layout).root, change(read(layout)).root), allowed = surfaces.length && closing ? closing(surfaces) : true;
|
|
235
245
|
if (typeof allowed === 'boolean') {
|
|
@@ -248,6 +258,10 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
248
258
|
function id(prefix) {
|
|
249
259
|
return `${prefix}-${counter++}`;
|
|
250
260
|
}
|
|
261
|
+
function shared(from, to) {
|
|
262
|
+
let a = area(from.placement), b = area(to);
|
|
263
|
+
return a === b || (allows(a, b) && allows(b, a));
|
|
264
|
+
}
|
|
251
265
|
function structural(change) {
|
|
252
266
|
touched = true;
|
|
253
267
|
update((current) => change({ ...current, bottom: { ...current.bottom, maximized: false }, maximized: null }));
|
|
@@ -345,6 +359,9 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
345
359
|
dock(surface, placement = 'bottom') {
|
|
346
360
|
structural((current) => {
|
|
347
361
|
let source = findSurfaceGroup(current.root, surface), item = source?.surfaces.find((entry) => entry.id === surface);
|
|
362
|
+
if (source && !shared(source, placement)) {
|
|
363
|
+
return current;
|
|
364
|
+
}
|
|
348
365
|
if (source && fixed(source)) {
|
|
349
366
|
return source.placement === placement || allGroups(current.root).some((entry) => docked(entry, placement))
|
|
350
367
|
? current
|
|
@@ -415,7 +432,10 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
415
432
|
move(surface, group, index) {
|
|
416
433
|
structural((current) => {
|
|
417
434
|
let source = findSurfaceGroup(current.root, surface), target = findGroup(current.root, group), item = source?.surfaces.find((entry) => entry.id === surface);
|
|
418
|
-
if (!source ||
|
|
435
|
+
if (!source ||
|
|
436
|
+
!target ||
|
|
437
|
+
!item ||
|
|
438
|
+
(source.id !== target.id && (item.sortable === false || fixed(target) || !shared(source, target.placement)))) {
|
|
419
439
|
return current;
|
|
420
440
|
}
|
|
421
441
|
let root = source.id === target.id ? current.root : take(current.root, source, surface);
|
|
@@ -433,7 +453,7 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
433
453
|
open(surface, group) {
|
|
434
454
|
structural((current) => {
|
|
435
455
|
let existing = findSurfaceGroup(current.root, surface.id), target = group ? findGroup(current.root, group) : null;
|
|
436
|
-
if (existing && (!target || existing.id === target.id)) {
|
|
456
|
+
if (existing && (!target || existing.id === target.id || !shared(existing, target.placement))) {
|
|
437
457
|
return {
|
|
438
458
|
...visible(existing, current),
|
|
439
459
|
active: existing.id,
|
|
@@ -466,7 +486,11 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
466
486
|
if (!target) {
|
|
467
487
|
return current;
|
|
468
488
|
}
|
|
469
|
-
let existing = findSurfaceGroup(current.root, surface.id)
|
|
489
|
+
let existing = findSurfaceGroup(current.root, surface.id);
|
|
490
|
+
if (existing && existing.id !== target.id && !shared(existing, target.placement)) {
|
|
491
|
+
return current;
|
|
492
|
+
}
|
|
493
|
+
let root = existing ? take(current.root, existing, surface.id) : current.root;
|
|
470
494
|
return {
|
|
471
495
|
...current,
|
|
472
496
|
root: updateGroup(root, target.id, (entry) => ({
|
|
@@ -504,6 +528,10 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
504
528
|
resizeDock(placement, size) {
|
|
505
529
|
update((current) => ({ ...current, [placement]: { ...current[placement], size } }));
|
|
506
530
|
},
|
|
531
|
+
shares(surface, placement) {
|
|
532
|
+
let source = findSurfaceGroup(read(layout).root, surface);
|
|
533
|
+
return source !== null && shared(source, placement);
|
|
534
|
+
},
|
|
507
535
|
split(surface, group, direction, side) {
|
|
508
536
|
structural((current) => {
|
|
509
537
|
let source = findSurfaceGroup(current.root, surface), target = findGroup(current.root, group), item = source?.surfaces.find((entry) => entry.id === surface);
|
|
@@ -511,6 +539,7 @@ const state = ({ closing, open = {}, root = null, store } = {}) => {
|
|
|
511
539
|
!item ||
|
|
512
540
|
!target ||
|
|
513
541
|
item.sortable === false ||
|
|
542
|
+
!shared(source, target.placement) ||
|
|
514
543
|
(source.id === group && source.surfaces.length === 1) ||
|
|
515
544
|
(target.placement !== undefined && stationary(current.root, target.placement))) {
|
|
516
545
|
return current;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.shell-expand{color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;padding:0}@supports (text-box:trim-both cap alphabetic){.shell-tab-label{text-box:trim-both cap alphabetic}}@supports not (text-box:trim-both cap alphabetic){.shell-tab-label:after{margin-bottom:calc(.618em - .618lh)}.shell-tab-label:after,.shell-tab-label:before{content:"";width:100%;height:0;display:block}.shell-tab-label:before{margin-top:calc(.618em - .618lh)}}.shell-tab-label{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.shell-handle{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.shell-handle{--background:var(--background-active)}.shell-handle:not(.--active):is(:hover,.--hover){--background:var(--background-hover)}.shell-handle:not(.--active):is(:active,.--pressed){--background:var(--background-pressed)}.shell-action.button,.shell-add.button,.shell-launcher-card,.shell-tab,.shell-tab-close{--color-active:var(--color-text-300);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}:where([data-theme=dark]) .shell-action.button,:where([data-theme=dark]) .shell-add.button,:where([data-theme=dark]) .shell-launcher-card,:where([data-theme=dark]) .shell-tab,:where([data-theme=dark]) .shell-tab-close{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-500);--color-pressed:var(--color-text-300)}:where([data-theme=light]) .shell-action.button,:where([data-theme=light]) .shell-add.button,:where([data-theme=light]) .shell-launcher-card,:where([data-theme=light]) .shell-tab,:where([data-theme=light]) .shell-tab-close{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}.shell-handle{--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .036) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .036) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .036) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .036) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1) calc(c * (1 - clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) calc(c * clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h))}@container style(--surface-level:-2){.shell-handle{--surface-level:-3}}@container style(--surface-level:-1){.shell-handle{--surface-level:-2}}@container style(--surface-level:0){.shell-handle{--surface-level:-1}}@container style(--surface-level:1){.shell-handle{--surface-level:0}}@container style(--surface-level:2){.shell-handle{--surface-level:1}}@container style(--surface-level:3){.shell-handle{--surface-level:2}}@container style(--surface-level:4){.shell-handle{--surface-level:3}}@container style(--surface-level:5){.shell-handle{--surface-level:4}}@container style(--surface-level:6){.shell-handle{--surface-level:5}}.shell{--drop-background:oklch(from var(--color-primary-400) l c h / .12);--drop-ring:oklch(from var(--color-primary-400) l c h / .5);--header-height:36px;--left:0px;--left-width:clamp(var(--sidebar-min-width), var(--left-size,var(--space)), min(var(--sidebar-max-width), 100% - var(--main-min-width) - var(--right-claim)));--main-min-width:320px;--right:0px;--right-claim:0px;--right-width:clamp(var(--sidebar-min-width), var(--right-size,var(--space)), min(var(--sidebar-max-width), 100% - var(--main-min-width) - var(--left)));--sidebar-max-width:calc(100% - 88px);--sidebar-min-width:200px;--slide-duration:.3s;--slide-timing-function:cubic-bezier(.32, .72, 0, 1);--space:280px;--toggle-left:var(--size-100);--toggle-right:var(--size-100);--toggle-size:28px;--toggle-top:calc((var(--header-height) - var(--toggle-size)) / 2)}@media (prefers-reduced-motion:reduce){.shell{--slide-duration:0s}}.shell--left-open{--left:var(--left-width)}.shell--narrow{--main-min-width:0px}.shell--right-open{--right:var(--right-width);--right-claim:clamp(var(--sidebar-min-width), var(--right-size,var(--space)), var(--sidebar-max-width))}.shell-action.button,.shell-add.button{--background-default:transparent;--border-radius:var(--border-radius-300);--padding-horizontal:0px;--padding-vertical:0px}.shell-action.button{--background-active:var(--surface-background-active);--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed);--size:28px}.shell-add.button{--background-active:var(--surface-background-active);--background-hover:transparent;--background-pressed:transparent;--size:24px}.shell-body{--min-width:200px;--scrollbar-behavior:auto}.shell-body .--scrollbar{--scrollbar-behavior:smooth}.shell-dock{--background:var(--surface-background-default);--min-height:80px;--z-index:3}.shell-dock-target,.shell-edge,.shell-group--picked{--background:var(--drop-background);--ring-color:var(--drop-ring);--ring-width:var(--border-width-500)}.shell-dock-target{--size:48px;--z-index:45}.shell-edge,.shell-expand{--z-index:2}.shell-edge-grip{--width:24px;--z-index:30}.shell-edge-grip:is(:active,:hover) .shell-edge-handle{--color:var(--color-primary-400);--inset:3px}.shell-edge-handle{--border-radius:var(--border-radius-200);--color:var(--surface-border-hover);--height:10svh;--inset:calc(var(--width) * -1);--width:3px}.shell-handle{--background-default:var(--surface-border-default);--background-hover:var(--surface-border-hover);--background-pressed:var(--surface-border-pressed);--line-width:1px;--size:8px;--z-index:1}.shell-handle:is(:active,:hover) .shell-handle-pill{--opacity:1;--scale:1}.shell-handle-pill{--border-radius:var(--border-radius-200);--color:var(--surface-border-pressed);--length:10svh;--opacity:0;--scale:.8;--thickness:3px}.shell-header{--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4);--height:var(--header-height);--left:calc(var(--toggle-left) * 1.5 + var(--toggle-size));--padding-horizontal:calc(var(--size-300) / 2);--right:calc(var(--toggle-right) * 1.5 + var(--toggle-size))}.shell-launcher{--padding-horizontal:var(--size-600);--padding-vertical:var(--size-600)}.shell-launcher-card{--background-active:var(--surface-background-hover);--background-default:transparent;--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed);--border-color-default:var(--surface-border-default);--border-radius:var(--border-radius-400);--border-width:var(--border-width-400);--gap-vertical:calc(var(--size-100) / 2);--padding-horizontal:var(--size-400);--padding-vertical:var(--size-400)}.shell-launcher-card-description{--color:var(--color-text-300);--font-size:var(--font-size-300);--line-height:1.5}.shell-launcher-card-icon.icon{--size:16px}.shell-launcher-card-key{--inset:var(--size-300)}.shell-launcher-card-title{--font-size:var(--font-size-300);--gap-horizontal:var(--size-200);--gap-vertical:0px;--padding-end:var(--size-700)}.shell-launcher-cards{--column-width:180px;--gap-horizontal:var(--size-200);--gap-vertical:var(--size-200)}.shell-launcher-content{--max-width:512px}.shell-launcher-description{--color:var(--color-text-300);--font-size:var(--font-size-300)}.shell-launcher-header{--gap-horizontal:0px;--gap-vertical:calc(var(--size-100) / 2);--spacer:var(--size-500)}.shell-launcher-title{--font-size:var(--font-size-300)}.shell-sidebar{--background:var(--surface-background-default);--z-index:31}.shell-sidebar-resize{--line-width:0px;--size:12px;--z-index:32}.shell-tab{--background-active:transparent;--background-default:transparent;--background-hover:transparent;--background-pressed:transparent;--border-radius:var(--border-radius-300);--font-size:var(--font-size-300);--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4);--height:24px;--max-width:144px;--padding-horizontal:calc(var(--size-300) / 2);--padding-vertical:0px}.shell-tab-close{--border-radius:var(--border-radius-300);--padding-horizontal:0px;--padding-vertical:0px;--size:16px}.shell-tab-close .icon{--size:12px}.shell-tab-close.button{--background-default:transparent;--box-shadow-default:none}.shell-tab-icon.icon{--size:12px}.shell-tab-label{--padding-vertical:.25em}.shell-tabs{--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4)}.shell-tabs-highlight{--background-active:var(--surface-background-active);--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed)}.shell-toggle{--background-default:transparent;--border-radius:var(--border-radius-400);--color-default:var(--color-text-400);--color-hover:var(--color-text-400);--color-pressed:var(--color-text-500);--left:var(--toggle-left);--padding-horizontal:0px;--padding-vertical:0px;--right:var(--toggle-right);--size:var(--toggle-size);--top:var(--toggle-top);--z-index:40}@property --slide-translate{syntax:"*";inherits:false}.shell{contain:inline-size;flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;display:flex;position:relative}.shell--dragging .shell-dock-target,.shell--dragging .shell-edge{pointer-events:auto}.shell--left-open>.shell-tree>.shell-frame>.shell-edge-grip--left{visibility:hidden;transition-delay:0s}.shell--left-open:not(.shell--narrow)>.shell-tree>.shell-frame>.shell-sidebar-resize--left,.shell:not(.shell--narrow)>.shell-tree>.shell-frame:has(>.shell-sidebar--left.--peek)>.shell-sidebar-resize--left{display:block}.shell--right-open>.shell-tree>.shell-frame>.shell-edge-grip--right{visibility:hidden;transition-delay:0s}.shell--right-open:not(.shell--narrow)>.shell-tree>.shell-frame>.shell-sidebar-resize--right,.shell:not(.shell--narrow)>.shell-tree>.shell-frame:has(>.shell-sidebar--right.--peek)>.shell-sidebar-resize--right{display:block}.shell--narrow>.shell-tree>.shell-frame{grid-template-columns:var(--left) 100% 0px}.shell--narrow>.shell-tree>.shell-frame>.shell-center{translate:calc(var(--right) * -1) 0}.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-handle,.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-pane{display:none}.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-pane--current{flex:100%;display:flex}.shell--sliding>.shell-tree>.shell-frame,.shell--sliding>.shell-tree>.shell-frame>.shell-center{transition:none}.shell-action,.shell-add{height:var(--size);width:var(--size);flex:none}.shell-add[hidden]{display:none}.shell-body{min-height:0;min-width:var(--min-width);flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.shell-center{min-width:0;min-height:0;transition:translate var(--slide-duration) var(--slide-timing-function);flex-direction:column;grid-column:2;display:flex;position:relative}.shell-dock{flex:var(--flex);min-height:var(--min-height);min-width:0;display:flex;overflow:hidden}.shell-dock--maximized{background:var(--background);z-index:var(--z-index);position:absolute;inset:0}.shell-dock-target,.shell-edge{pointer-events:none;z-index:var(--z-index);position:absolute}.shell-dock-target--bottom{height:var(--size);bottom:0;left:var(--left);right:var(--right)}.shell-dock-target--left{width:var(--size);left:0;inset-block:0}.shell-dock-target--right{width:var(--size);right:0;inset-block:0}.shell-dock-target.--over,.shell-edge.--over,.shell-group--picked{background:var(--background);box-shadow:inset 0 0 0 var(--ring-width) var(--ring-color)}.shell-edge--bottom{bottom:0;height:50%;inset-inline:0}.shell-edge--left{left:0;width:50%;inset-block:0}.shell-edge--right{right:0;width:50%;inset-block:0}.shell-edge--top{top:0;height:50%;inset-inline:0}.shell-edge-grip{touch-action:none;transition:visibility 0s var(--slide-duration);-webkit-user-select:none;user-select:none;width:var(--width);z-index:var(--z-index);position:absolute;inset-block:0}.shell-edge-grip--left{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' stroke='white' stroke-width='5'/%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 12 12,e-resize;left:0}.shell-edge-grip--right{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H5M11 6l-6 6 6 6' stroke='white' stroke-width='5'/%3E%3Cpath d='M20 12H5M11 6l-6 6 6 6' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 12 12,w-resize;right:0}.shell-edge-grip--left .shell-edge-handle{left:var(--inset)}.shell-edge-grip--right .shell-edge-handle{right:var(--inset)}.shell-edge-grip:active{cursor:grabbing}.shell-edge-handle{background:var(--color);border-radius:var(--border-radius);height:var(--height);transition:background var(--transition-duration) var(--transition-timing-function), left var(--slide-duration) var(--slide-timing-function), right var(--slide-duration) var(--slide-timing-function);translate:0 calc(var(--offset,0px) - 50%);width:var(--width);position:absolute;top:50%}.shell-expand{z-index:var(--z-index);position:absolute;inset:0}.shell-frame{grid-template-columns:var(--left) minmax(0, 1fr) var(--right);min-height:0;transition:grid-template-columns var(--slide-duration) var(--slide-timing-function);flex:1;grid-template-rows:minmax(0,1fr);display:grid;position:relative;overflow:clip}.shell-group{flex-flow:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.shell-group--inset-left>.shell-header{padding-inline-start:var(--left)}.shell-group--inset-right>.shell-header{padding-inline-end:var(--right)}.shell-handle{touch-action:none;-webkit-user-select:none;user-select:none;z-index:var(--z-index);flex-shrink:0;position:relative}.shell-handle:after{background:var(--background);content:"";pointer-events:none;transition:background var(--transition-duration) var(--transition-timing-function);position:absolute}.shell-handle--x{cursor:col-resize;height:100%;margin-inline:calc(var(--size) / -2);width:var(--size)}.shell-handle--x:after{width:var(--line-width);inset-block:0;left:50%;translate:-50%}.shell-handle--x .shell-handle-pill{height:var(--length);scale:1 var(--scale);translate:-50% calc(var(--offset,0px) - 50%);width:var(--thickness)}.shell-handle--y{cursor:row-resize;height:var(--size);margin-block:calc(var(--size) / -2);width:100%}.shell-handle--y:after{height:var(--line-width);inset-inline:0;top:50%;translate:0 -50%}.shell-handle--y .shell-handle-pill{height:var(--thickness);scale:var(--scale) 1;translate:calc(var(--offset,0px) - 50%) -50%;width:var(--length)}.shell-handle-pill{background:var(--color);border-radius:var(--border-radius);opacity:var(--opacity);pointer-events:none;transition-duration:var(--transition-duration);transition-property:opacity,scale;transition-timing-function:var(--transition-timing-function);position:absolute;top:50%;left:50%}.shell-handle[hidden]{display:none}.shell-header{align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);height:var(--height);padding-inline:var(--padding-horizontal);flex-shrink:0;display:flex}.shell-host,.shell-slot,.shell-subtree{display:contents}.shell-launcher{min-height:0;padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal);outline:none;flex:1;justify-content:center;align-items:center;display:flex;overflow-y:auto}.shell-launcher-card{border:var(--border-width) solid var(--border-color);align-items:flex-start;gap:var(--gap-vertical) var(--gap-horizontal);text-align:start;white-space:normal;flex-direction:column;justify-content:flex-start;width:100%;position:relative}.shell-launcher-card-description{color:var(--color);font-size:var(--font-size);line-height:var(--line-height)}.shell-launcher-card-key{position:absolute;inset-block-start:var(--inset);inset-inline-end:var(--inset)}.shell-launcher-card-title{font-size:var(--font-size);font-weight:var(--font-weight-500);align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);padding-inline-end:var(--padding-end);display:flex}.shell-launcher-cards{gap:var(--gap-vertical) var(--gap-horizontal);grid-template-columns:repeat(auto-fill, minmax(var(--column-width), 1fr));display:grid}.shell-launcher-content{max-width:var(--max-width);width:100%}.shell-launcher-description{color:var(--color);font-size:var(--font-size)}.shell-launcher-header{gap:var(--gap-vertical) var(--gap-horizontal);text-align:center;flex-direction:column;margin-block-end:var(--spacer);display:flex}.shell-launcher-title{font-size:var(--font-size);font-weight:var(--font-weight-500)}.shell-main{flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.shell-menu{width:0;height:0;position:absolute;top:0;left:0}.shell-pane{flex:var(--flex);min-width:0;min-height:0;display:flex;overflow:hidden}.shell-parking{display:none}.shell-sidebar{background-color:var(--background);touch-action:pan-y;transition:translate var(--slide-duration) var(--slide-timing-function), visibility 0s var(--slide-duration);visibility:hidden;z-index:var(--z-index);flex-direction:column;display:flex;position:absolute;inset-block:0;overflow:hidden}.shell-sidebar--dragging{cursor:grabbing;visibility:visible;transition:none}.shell-sidebar--left{translate:var(--slide-translate,-100% 0);width:min(var(--left-width), 100%);left:0}.shell-sidebar--right{translate:var(--slide-translate,100% 0);width:min(var(--right-width), 100%);right:0}.shell-sidebar-resize{display:none;position:absolute;inset-block:0}.shell-sidebar-resize--left{left:var(--left-width)}.shell-sidebar-resize--right{right:var(--right-width)}.shell-sidebar.--peek,.shell-sidebar.--active{translate:var(--slide-translate,0 0);visibility:visible;transition-delay:0s}.shell-split{width:100%;min-width:0;height:100%;min-height:0;display:flex}.shell-split--column{flex-direction:column}.shell-tab{gap:var(--gap-vertical) var(--gap-horizontal);height:var(--height);max-width:var(--max-width);-webkit-user-select:none;user-select:none;flex:none;padding-inline-end:calc(var(--padding-horizontal) / 2)}.shell-tab--icon.button{width:var(--height);justify-content:center;padding-inline:0}.shell-tab-close.button{height:var(--size);width:var(--size);flex:none}.shell-tab-icon{flex:none}.shell-tab-label{min-width:0;padding-block:var(--padding-vertical);flex:1}.shell-tabs{align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);flex:1;min-width:0;height:100%;display:flex;position:relative;overflow:auto hidden}.shell-toggle{height:var(--size);top:var(--top);width:var(--size);z-index:var(--z-index);display:flex;position:absolute}.shell-toggle--left{left:var(--left)}.shell-toggle--right{right:var(--right)}.shell-toggle:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.shell:not(.shell--narrow) .shell-switch{display:none}:root.shell-resizing,:root.shell-resizing *{-webkit-user-select:none;user-select:none}:root.shell-resizing--x,:root.shell-resizing--x *{cursor:col-resize}:root.shell-resizing--y,:root.shell-resizing--y *{cursor:row-resize}:root.shell-resizing .shell-frame{transition:none}:root.shell-sweeping,:root.shell-sweeping *{-webkit-user-select:none;user-select:none}}
|
|
1
|
+
@layer components{.shell-expand{color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;padding:0}@supports (text-box:trim-both cap alphabetic){.shell-tab-label{text-box:trim-both cap alphabetic}}@supports not (text-box:trim-both cap alphabetic){.shell-tab-label:after{margin-bottom:calc(.618em - .618lh)}.shell-tab-label:after,.shell-tab-label:before{content:"";width:100%;height:0;display:block}.shell-tab-label:before{margin-top:calc(.618em - .618lh)}}.shell-tab-label{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.shell-handle{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.shell-handle{--background:var(--background-active)}.shell-handle:not(.--active):is(:hover,.--hover){--background:var(--background-hover)}.shell-handle:not(.--active):is(:active,.--pressed){--background:var(--background-pressed)}.shell-action.button,.shell-add.button,.shell-launcher-card,.shell-tab,.shell-tab-close{--color-active:var(--color-text-300);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}:where([data-theme=dark]) .shell-action.button,:where([data-theme=dark]) .shell-add.button,:where([data-theme=dark]) .shell-launcher-card,:where([data-theme=dark]) .shell-tab,:where([data-theme=dark]) .shell-tab-close{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-500);--color-pressed:var(--color-text-300)}:where([data-theme=light]) .shell-action.button,:where([data-theme=light]) .shell-add.button,:where([data-theme=light]) .shell-launcher-card,:where([data-theme=light]) .shell-tab,:where([data-theme=light]) .shell-tab-close{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}.shell-handle{--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .048) c h),oklch(from var(--surface-background-active) min(1, l + .048) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .048) c h),oklch(from var(--surface-background-default) min(1, l + .048) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .048) c h),oklch(from var(--surface-background-hover) min(1, l + .048) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .048) c h),oklch(from var(--surface-background-pressed) min(1, l + .048) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1) calc(c * (1 - clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) calc(c * clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h))}@container style(--surface-level:-2){.shell-handle{--surface-level:-3}}@container style(--surface-level:-1){.shell-handle{--surface-level:-2}}@container style(--surface-level:0){.shell-handle{--surface-level:-1}}@container style(--surface-level:1){.shell-handle{--surface-level:0}}@container style(--surface-level:2){.shell-handle{--surface-level:1}}@container style(--surface-level:3){.shell-handle{--surface-level:2}}@container style(--surface-level:4){.shell-handle{--surface-level:3}}@container style(--surface-level:5){.shell-handle{--surface-level:4}}@container style(--surface-level:6){.shell-handle{--surface-level:5}}.shell{--drop-background:oklch(from var(--color-primary-400) l c h / .12);--drop-ring:oklch(from var(--color-primary-400) l c h / .5);--header-height:36px;--left:0px;--left-width:clamp(var(--sidebar-min-width), var(--left-size,var(--space)), min(var(--sidebar-max-width), 100% - var(--main-min-width) - var(--right-claim)));--main-min-width:320px;--right:0px;--right-claim:0px;--right-width:clamp(var(--sidebar-min-width), var(--right-size,var(--space)), min(var(--sidebar-max-width), 100% - var(--main-min-width) - var(--left)));--sidebar-max-width:calc(100% - 88px);--sidebar-min-width:200px;--slide-duration:.3s;--slide-timing-function:cubic-bezier(.32, .72, 0, 1);--space:280px;--toggle-left:var(--size-100);--toggle-right:var(--size-100);--toggle-size:28px;--toggle-top:calc((var(--header-height) - var(--toggle-size)) / 2)}@media (prefers-reduced-motion:reduce){.shell{--slide-duration:0s}}.shell--left-open{--left:var(--left-width)}.shell--narrow{--main-min-width:0px}.shell--right-open{--right:var(--right-width);--right-claim:clamp(var(--sidebar-min-width), var(--right-size,var(--space)), var(--sidebar-max-width))}.shell-action.button,.shell-add.button{--background-default:transparent;--border-radius:var(--border-radius-300);--padding-horizontal:0px;--padding-vertical:0px}.shell-action.button{--background-active:var(--surface-background-active);--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed);--size:28px}.shell-add.button{--background-active:var(--surface-background-active);--background-hover:transparent;--background-pressed:transparent;--size:24px}.shell-body{--min-width:200px;--scrollbar-behavior:auto}.shell-body .--scrollbar{--scrollbar-behavior:smooth}.shell-dock{--background:var(--surface-background-default);--min-height:80px;--z-index:3}.shell-dock-target,.shell-edge,.shell-group--picked{--background:var(--drop-background);--ring-color:var(--drop-ring);--ring-width:var(--border-width-500)}.shell-dock-target{--size:48px;--z-index:45}.shell-edge,.shell-expand{--z-index:2}.shell-edge-grip{--width:24px;--z-index:30}.shell-edge-grip:is(:active,:hover) .shell-edge-handle{--color:var(--color-primary-400);--inset:3px}.shell-edge-handle{--border-radius:var(--border-radius-200);--color:var(--surface-border-hover);--height:10svh;--inset:calc(var(--width) * -1);--width:3px}.shell-handle{--background-default:var(--surface-border-default);--background-hover:var(--surface-border-hover);--background-pressed:var(--surface-border-pressed);--line-width:1px;--size:8px;--z-index:1}.shell-handle:is(:active,:hover) .shell-handle-pill{--opacity:1;--scale:1}.shell-handle-pill{--border-radius:var(--border-radius-200);--color:var(--surface-border-pressed);--length:10svh;--opacity:0;--scale:.8;--thickness:3px}.shell-header{--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4);--height:var(--header-height);--left:calc(var(--toggle-left) * 1.5 + var(--toggle-size));--padding-horizontal:calc(var(--size-300) / 2);--right:calc(var(--toggle-right) * 1.5 + var(--toggle-size))}.shell-launcher{--padding-horizontal:var(--size-600);--padding-vertical:var(--size-600)}.shell-launcher-card{--background-active:var(--surface-background-hover);--background-default:transparent;--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed);--border-color-default:var(--surface-border-default);--border-radius:var(--border-radius-400);--border-width:var(--border-width-400);--gap-vertical:calc(var(--size-100) / 2);--padding-horizontal:var(--size-400);--padding-vertical:var(--size-400)}.shell-launcher-card-description{--color:var(--color-text-300);--font-size:var(--font-size-300);--line-height:1.5}.shell-launcher-card-icon.icon{--size:16px}.shell-launcher-card-key{--inset:var(--size-300)}.shell-launcher-card-title{--font-size:var(--font-size-300);--gap-horizontal:var(--size-200);--gap-vertical:0px;--padding-end:var(--size-700)}.shell-launcher-cards{--column-width:180px;--gap-horizontal:var(--size-200);--gap-vertical:var(--size-200)}.shell-launcher-content{--max-width:512px}.shell-launcher-description{--color:var(--color-text-300);--font-size:var(--font-size-300)}.shell-launcher-header{--gap-horizontal:0px;--gap-vertical:calc(var(--size-100) / 2);--spacer:var(--size-500)}.shell-launcher-title{--font-size:var(--font-size-300)}.shell-sidebar{--background:var(--surface-background-default);--z-index:31}.shell-sidebar-resize{--line-width:0px;--size:12px;--z-index:32}.shell-tab{--background-active:transparent;--background-default:transparent;--background-hover:transparent;--background-pressed:transparent;--border-radius:var(--border-radius-300);--font-size:var(--font-size-300);--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4);--height:24px;--max-width:144px;--padding-horizontal:calc(var(--size-300) / 2);--padding-vertical:0px}.shell-tab-close{--border-radius:var(--border-radius-300);--padding-horizontal:0px;--padding-vertical:0px;--size:16px}.shell-tab-close .icon{--size:12px}.shell-tab-close.button{--background-default:transparent;--box-shadow-default:none}.shell-tab-icon.icon{--size:12px}.shell-tab-label{--padding-vertical:.25em}.shell-tabs{--gap-horizontal:calc(var(--size-300) / 4);--gap-vertical:calc(var(--size-300) / 4)}.shell-tabs-highlight{--background-active:var(--surface-background-active);--background-hover:var(--surface-background-hover);--background-pressed:var(--surface-background-pressed)}.shell-toggle{--background-default:transparent;--border-radius:var(--border-radius-400);--color-default:var(--color-text-400);--color-hover:var(--color-text-400);--color-pressed:var(--color-text-500);--left:var(--toggle-left);--padding-horizontal:0px;--padding-vertical:0px;--right:var(--toggle-right);--size:var(--toggle-size);--top:var(--toggle-top);--z-index:40}@property --slide-translate{syntax:"*";inherits:false}.shell{contain:inline-size;flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;display:flex;position:relative}.shell--dragging .shell-dock-target,.shell--dragging .shell-edge{pointer-events:auto}.shell--left-open>.shell-tree>.shell-frame>.shell-edge-grip--left{visibility:hidden;transition-delay:0s}.shell--left-open:not(.shell--narrow)>.shell-tree>.shell-frame>.shell-sidebar-resize--left,.shell:not(.shell--narrow)>.shell-tree>.shell-frame:has(>.shell-sidebar--left.--peek)>.shell-sidebar-resize--left{display:block}.shell--right-open>.shell-tree>.shell-frame>.shell-edge-grip--right{visibility:hidden;transition-delay:0s}.shell--right-open:not(.shell--narrow)>.shell-tree>.shell-frame>.shell-sidebar-resize--right,.shell:not(.shell--narrow)>.shell-tree>.shell-frame:has(>.shell-sidebar--right.--peek)>.shell-sidebar-resize--right{display:block}.shell--narrow>.shell-tree>.shell-frame{grid-template-columns:var(--left) 100% 0px}.shell--narrow>.shell-tree>.shell-frame>.shell-center{translate:calc(var(--right) * -1) 0}.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-handle,.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-pane{display:none}.shell--narrow>.shell-tree>.shell-frame>.shell-center>.shell-main .shell-pane--current{flex:100%;display:flex}.shell--sliding>.shell-tree>.shell-frame,.shell--sliding>.shell-tree>.shell-frame>.shell-center{transition:none}.shell-action,.shell-add{height:var(--size);width:var(--size);flex:none}.shell-add[hidden]{display:none}.shell-body{min-height:0;min-width:var(--min-width);flex-direction:column;flex:1;display:flex;position:relative;overflow:hidden}.shell-center{min-width:0;min-height:0;transition:translate var(--slide-duration) var(--slide-timing-function);flex-direction:column;grid-column:2;display:flex;position:relative}.shell-dock{flex:var(--flex);min-height:var(--min-height);min-width:0;display:flex;overflow:hidden}.shell-dock--maximized{background:var(--background);z-index:var(--z-index);position:absolute;inset:0}.shell-dock-target,.shell-edge{pointer-events:none;z-index:var(--z-index);position:absolute}.shell-dock-target--bottom{height:var(--size);bottom:0;left:var(--left);right:var(--right)}.shell-dock-target--left{width:var(--size);left:0;inset-block:0}.shell-dock-target--right{width:var(--size);right:0;inset-block:0}.shell-dock-target.--over,.shell-edge.--over,.shell-group--picked{background:var(--background);box-shadow:inset 0 0 0 var(--ring-width) var(--ring-color)}.shell-edge--bottom{bottom:0;height:50%;inset-inline:0}.shell-edge--left{left:0;width:50%;inset-block:0}.shell-edge--right{right:0;width:50%;inset-block:0}.shell-edge--top{top:0;height:50%;inset-inline:0}.shell-edge-grip{touch-action:none;transition:visibility 0s var(--slide-duration);-webkit-user-select:none;user-select:none;width:var(--width);z-index:var(--z-index);position:absolute;inset-block:0}.shell-edge-grip--left{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' stroke='white' stroke-width='5'/%3E%3Cpath d='M4 12h15M13 6l6 6-6 6' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 12 12,e-resize;left:0}.shell-edge-grip--right{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H5M11 6l-6 6 6 6' stroke='white' stroke-width='5'/%3E%3Cpath d='M20 12H5M11 6l-6 6 6 6' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 12 12,w-resize;right:0}.shell-edge-grip--left .shell-edge-handle{left:var(--inset)}.shell-edge-grip--right .shell-edge-handle{right:var(--inset)}.shell-edge-grip:active{cursor:grabbing}.shell-edge-handle{background:var(--color);border-radius:var(--border-radius);height:var(--height);transition:background var(--transition-duration) var(--transition-timing-function), left var(--slide-duration) var(--slide-timing-function), right var(--slide-duration) var(--slide-timing-function);translate:0 calc(var(--offset,0px) - 50%);width:var(--width);position:absolute;top:50%}.shell-expand{z-index:var(--z-index);position:absolute;inset:0}.shell-frame{grid-template-columns:var(--left) minmax(0, 1fr) var(--right);min-height:0;transition:grid-template-columns var(--slide-duration) var(--slide-timing-function);flex:1;grid-template-rows:minmax(0,1fr);display:grid;position:relative;overflow:clip}.shell-group{flex-flow:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.shell-group--inset-left>.shell-header{padding-inline-start:var(--left)}.shell-group--inset-right>.shell-header{padding-inline-end:var(--right)}.shell-handle{touch-action:none;-webkit-user-select:none;user-select:none;z-index:var(--z-index);flex-shrink:0;position:relative}.shell-handle:after{background:var(--background);content:"";pointer-events:none;transition:background var(--transition-duration) var(--transition-timing-function);position:absolute}.shell-handle--x{cursor:col-resize;height:100%;margin-inline:calc(var(--size) / -2);width:var(--size)}.shell-handle--x:after{width:var(--line-width);inset-block:0;left:50%;translate:-50%}.shell-handle--x .shell-handle-pill{height:var(--length);scale:1 var(--scale);translate:-50% calc(var(--offset,0px) - 50%);width:var(--thickness)}.shell-handle--y{cursor:row-resize;height:var(--size);margin-block:calc(var(--size) / -2);width:100%}.shell-handle--y:after{height:var(--line-width);inset-inline:0;top:50%;translate:0 -50%}.shell-handle--y .shell-handle-pill{height:var(--thickness);scale:var(--scale) 1;translate:calc(var(--offset,0px) - 50%) -50%;width:var(--length)}.shell-handle-pill{background:var(--color);border-radius:var(--border-radius);opacity:var(--opacity);pointer-events:none;transition-duration:var(--transition-duration);transition-property:opacity,scale;transition-timing-function:var(--transition-timing-function);position:absolute;top:50%;left:50%}.shell-handle[hidden]{display:none}.shell-header{align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);height:var(--height);padding-inline:var(--padding-horizontal);flex-shrink:0;display:flex}.shell-host,.shell-slot,.shell-subtree{display:contents}.shell-launcher{min-height:0;padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal);outline:none;flex:1;justify-content:center;align-items:center;display:flex;overflow-y:auto}.shell-launcher-card{border:var(--border-width) solid var(--border-color);align-items:flex-start;gap:var(--gap-vertical) var(--gap-horizontal);text-align:start;white-space:normal;flex-direction:column;justify-content:flex-start;width:100%;position:relative}.shell-launcher-card-description{color:var(--color);font-size:var(--font-size);line-height:var(--line-height)}.shell-launcher-card-key{position:absolute;inset-block-start:var(--inset);inset-inline-end:var(--inset)}.shell-launcher-card-title{font-size:var(--font-size);font-weight:var(--font-weight-500);align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);padding-inline-end:var(--padding-end);display:flex}.shell-launcher-cards{gap:var(--gap-vertical) var(--gap-horizontal);grid-template-columns:repeat(auto-fill, minmax(var(--column-width), 1fr));display:grid}.shell-launcher-content{max-width:var(--max-width);width:100%}.shell-launcher-description{color:var(--color);font-size:var(--font-size)}.shell-launcher-header{gap:var(--gap-vertical) var(--gap-horizontal);text-align:center;flex-direction:column;margin-block-end:var(--spacer);display:flex}.shell-launcher-title{font-size:var(--font-size);font-weight:var(--font-weight-500)}.shell-main{flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.shell-menu{width:0;height:0;position:absolute;top:0;left:0}.shell-pane{flex:var(--flex);min-width:0;min-height:0;display:flex;overflow:hidden}.shell-parking{display:none}.shell-sidebar{background-color:var(--background);touch-action:pan-y;transition:translate var(--slide-duration) var(--slide-timing-function), visibility 0s var(--slide-duration);visibility:hidden;z-index:var(--z-index);flex-direction:column;display:flex;position:absolute;inset-block:0;overflow:hidden}.shell-sidebar--dragging{cursor:grabbing;visibility:visible;transition:none}.shell-sidebar--left{translate:var(--slide-translate,-100% 0);width:min(var(--left-width), 100%);left:0}.shell-sidebar--right{translate:var(--slide-translate,100% 0);width:min(var(--right-width), 100%);right:0}.shell-sidebar-resize{display:none;position:absolute;inset-block:0}.shell-sidebar-resize--left{left:var(--left-width)}.shell-sidebar-resize--right{right:var(--right-width)}.shell-sidebar.--peek,.shell-sidebar.--active{translate:var(--slide-translate,0 0);visibility:visible;transition-delay:0s}.shell-split{width:100%;min-width:0;height:100%;min-height:0;display:flex}.shell-split--column{flex-direction:column}.shell-tab{gap:var(--gap-vertical) var(--gap-horizontal);height:var(--height);max-width:var(--max-width);-webkit-user-select:none;user-select:none;flex:none;padding-inline-end:calc(var(--padding-horizontal) / 2)}.shell-tab--icon.button{width:var(--height);justify-content:center;padding-inline:0}.shell-tab-close.button{height:var(--size);width:var(--size);flex:none}.shell-tab-icon{flex:none}.shell-tab-label{min-width:0;padding-block:var(--padding-vertical);flex:1}.shell-tabs{align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);flex:1;min-width:0;height:100%;display:flex;position:relative;overflow:auto hidden}.shell-toggle{height:var(--size);top:var(--top);width:var(--size);z-index:var(--z-index);display:flex;position:absolute}.shell-toggle--left{left:var(--left)}.shell-toggle--right{right:var(--right)}.shell-toggle:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.shell:not(.shell--narrow) .shell-switch{display:none}:root.shell-resizing,:root.shell-resizing *{-webkit-user-select:none;user-select:none}:root.shell-resizing--x,:root.shell-resizing--x *{cursor:col-resize}:root.shell-resizing--y,:root.shell-resizing--y *{cursor:row-resize}:root.shell-resizing .shell-frame{transition:none}:root.shell-sweeping,:root.shell-sweeping *{-webkit-user-select:none;user-select:none}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -6,6 +6,7 @@ type Combine<T> = {
|
|
|
6
6
|
oncombine: (item: T, target: HTMLElement, items: ReactiveArray<T>, from: number, source: ReactiveArray<T>) => void;
|
|
7
7
|
};
|
|
8
8
|
type Options<T> = {
|
|
9
|
+
accepts?: (item: T) => boolean;
|
|
9
10
|
combine?: Combine<T>;
|
|
10
11
|
disabled?: (item: T) => boolean;
|
|
11
12
|
drag?: (item: T) => Renderable<unknown>;
|
|
@@ -22,7 +23,7 @@ type Outside<T> = {
|
|
|
22
23
|
over: (item: T, x: number, y: number) => HTMLElement | null;
|
|
23
24
|
};
|
|
24
25
|
export default _default;
|
|
25
|
-
declare function _default<T>(items: ReactiveArray<T>, template: (item: T, attributes: Attributes) => Renderable<unknown>, { combine, disabled, drag: copy, group, handle, onland, onlift, onsort, onthrow, outside }?: Options<T>): {
|
|
26
|
+
declare function _default<T>(items: ReactiveArray<T>, template: (item: T, attributes: Attributes) => Renderable<unknown>, { accepts, combine, disabled, drag: copy, group, handle, onland, onlift, onsort, onthrow, outside }?: Options<T>): {
|
|
26
27
|
attributes: Attributes[];
|
|
27
28
|
render: () => DocumentFragment | Element | Text;
|
|
28
29
|
};
|