@liberation-data/desk 0.41.0 → 0.43.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 +152 -9
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/scheme.d.ts +12 -0
- package/dist/core/scheme.d.ts.map +1 -0
- package/dist/core/scheme.js +15 -0
- package/dist/core/scheme.js.map +1 -0
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/css/apps.css +149 -0
- package/dist/css/controls.css +21 -2
- package/dist/css/dock.css +1 -1
- package/dist/css/looks.css +50 -4
- package/dist/css/overlays.css +6 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css/windows.css +173 -5
- package/dist/desk.css +401 -12
- package/dist/react/Desktop.d.ts +12 -3
- package/dist/react/Desktop.d.ts.map +1 -1
- package/dist/react/Desktop.js +29 -9
- package/dist/react/Desktop.js.map +1 -1
- package/dist/react/Dock.d.ts +6 -1
- package/dist/react/Dock.d.ts.map +1 -1
- package/dist/react/Dock.js +9 -1
- package/dist/react/Dock.js.map +1 -1
- package/dist/react/MenuBar.d.ts +8 -1
- package/dist/react/MenuBar.d.ts.map +1 -1
- package/dist/react/MenuBar.js +34 -5
- package/dist/react/MenuBar.js.map +1 -1
- package/dist/react/app.d.ts +174 -0
- package/dist/react/app.d.ts.map +1 -0
- package/dist/react/app.js +146 -0
- package/dist/react/app.js.map +1 -0
- package/dist/react/appPanels.d.ts +22 -0
- package/dist/react/appPanels.d.ts.map +1 -0
- package/dist/react/appPanels.js +114 -0
- package/dist/react/appPanels.js.map +1 -0
- package/dist/react/appearance.d.ts +55 -0
- package/dist/react/appearance.d.ts.map +1 -0
- package/dist/react/appearance.js +140 -0
- package/dist/react/appearance.js.map +1 -0
- package/dist/react/arrange.d.ts +6 -0
- package/dist/react/arrange.d.ts.map +1 -1
- package/dist/react/arrange.js +21 -0
- package/dist/react/arrange.js.map +1 -1
- package/dist/react/codeBlock.d.ts.map +1 -1
- package/dist/react/codeBlock.js +6 -60
- package/dist/react/codeBlock.js.map +1 -1
- package/dist/react/context.d.ts +9 -1
- package/dist/react/context.d.ts.map +1 -1
- package/dist/react/context.js +47 -3
- package/dist/react/context.js.map +1 -1
- package/dist/react/copy.d.ts +22 -0
- package/dist/react/copy.d.ts.map +1 -0
- package/dist/react/copy.js +68 -0
- package/dist/react/copy.js.map +1 -0
- package/dist/react/documentTitle.d.ts.map +1 -1
- package/dist/react/documentTitle.js +4 -1
- package/dist/react/documentTitle.js.map +1 -1
- package/dist/react/index.d.ts +10 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +7 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/layers.d.ts.map +1 -1
- package/dist/react/layers.js +7 -2
- package/dist/react/layers.js.map +1 -1
- package/dist/react/overlays.d.ts.map +1 -1
- package/dist/react/overlays.js +29 -12
- package/dist/react/overlays.js.map +1 -1
- package/dist/react/shell.d.ts +4 -1
- package/dist/react/shell.d.ts.map +1 -1
- package/dist/react/shell.js +2 -2
- package/dist/react/shell.js.map +1 -1
- package/dist/react/tabs.d.ts +7 -1
- package/dist/react/tabs.d.ts.map +1 -1
- package/dist/react/tabs.js +13 -8
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/widgets.d.ts +33 -0
- package/dist/react/widgets.d.ts.map +1 -0
- package/dist/react/widgets.js +213 -0
- package/dist/react/widgets.js.map +1 -0
- package/llms.txt +75 -8
- package/package.json +1 -1
- package/src/core/index.ts +2 -0
- package/src/core/scheme.ts +21 -0
- package/src/core/types.ts +6 -0
- package/src/css/apps.css +149 -0
- package/src/css/controls.css +21 -2
- package/src/css/dock.css +1 -1
- package/src/css/looks.css +50 -4
- package/src/css/overlays.css +6 -0
- package/src/css/tokens.css +1 -0
- package/src/css/windows.css +173 -5
- package/src/react/Desktop.tsx +50 -12
- package/src/react/Dock.tsx +11 -1
- package/src/react/MenuBar.tsx +38 -5
- package/src/react/app.tsx +284 -0
- package/src/react/appPanels.tsx +197 -0
- package/src/react/appearance.tsx +204 -0
- package/src/react/arrange.ts +23 -0
- package/src/react/codeBlock.tsx +7 -65
- package/src/react/context.tsx +55 -3
- package/src/react/copy.ts +81 -0
- package/src/react/documentTitle.ts +4 -1
- package/src/react/index.ts +30 -1
- package/src/react/layers.ts +7 -2
- package/src/react/overlays.tsx +30 -12
- package/src/react/shell.tsx +5 -2
- package/src/react/tabs.tsx +23 -10
- package/src/react/widgets.tsx +265 -0
package/dist/css/windows.css
CHANGED
|
@@ -186,16 +186,18 @@
|
|
|
186
186
|
color: var(--desk-muted);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
/* The note gives up the spare room; the (i) keeps its place at the end of the bar. */
|
|
190
189
|
/*
|
|
191
|
-
* The (i) is the bar's
|
|
192
|
-
*
|
|
190
|
+
* The (i) is on the bar's far edge, opposite the controls: here, on a Mac, it is the bar's last word, after
|
|
191
|
+
* the note and the actions. Whatever comes before it takes the spare room, and it follows. It sits in its
|
|
192
|
+
* popover's anchor, so the anchor is what the bar lays out: a margin on the button inside it would move
|
|
193
|
+
* nothing. The other looks put it first, and say so in looks.css.
|
|
193
194
|
*/
|
|
194
195
|
.desk-titlebar > .desk-popover-anchor:has(> .desk-window-info) {
|
|
195
196
|
margin-left: auto;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
.desk-window-note ~ .desk-popover-anchor:has(> .desk-window-info)
|
|
199
|
+
.desk-window-note ~ .desk-popover-anchor:has(> .desk-window-info),
|
|
200
|
+
.desk-window-actions ~ .desk-popover-anchor:has(> .desk-window-info) {
|
|
199
201
|
margin-left: var(--desk-space-2);
|
|
200
202
|
}
|
|
201
203
|
|
|
@@ -244,6 +246,12 @@
|
|
|
244
246
|
margin-left: var(--desk-space-3);
|
|
245
247
|
}
|
|
246
248
|
|
|
249
|
+
/* The count has taken the spare room, so what follows it keeps to it rather than splitting the room. */
|
|
250
|
+
.desk-window-progress ~ .desk-window-actions,
|
|
251
|
+
.desk-window-progress ~ .desk-popover-anchor:has(> .desk-window-info) {
|
|
252
|
+
margin-left: var(--desk-space-2);
|
|
253
|
+
}
|
|
254
|
+
|
|
247
255
|
.desk-titlebar[data-progress] .desk-title,
|
|
248
256
|
.desk-titlebar[data-progress] .desk-window-note {
|
|
249
257
|
max-width: none;
|
|
@@ -271,7 +279,13 @@
|
|
|
271
279
|
.desk-window-progress-fill { transition: none; }
|
|
272
280
|
}
|
|
273
281
|
|
|
274
|
-
|
|
282
|
+
/* Narrower still, the count keeps its words and lets the track go, so the bar's far edge stays on the bar. */
|
|
283
|
+
@container (max-width: 400px) {
|
|
284
|
+
.desk-window-progress-track {
|
|
285
|
+
display: none;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
275
289
|
.desk-window-note + .desk-window-actions {
|
|
276
290
|
margin-left: var(--desk-space-1);
|
|
277
291
|
}
|
|
@@ -412,6 +426,139 @@
|
|
|
412
426
|
right: var(--desk-padding);
|
|
413
427
|
}
|
|
414
428
|
|
|
429
|
+
/* ── Widgets: glances in a corner of the stage, behind the windows unless the person keeps one in front ── */
|
|
430
|
+
|
|
431
|
+
/* As big as the stage, to ask its size. No z-index, so each widget stands behind or in front on its own. */
|
|
432
|
+
.desk-widgets {
|
|
433
|
+
container: desk-widgets / size;
|
|
434
|
+
position: absolute;
|
|
435
|
+
inset: 0;
|
|
436
|
+
pointer-events: none;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/*
|
|
440
|
+
* A margin of padding for the focus ring, which a list that scrolls would clip. Too many for the desk, and it
|
|
441
|
+
* scrolls: it takes the pointer, as a scroller without it is passed over by the wheel, a finger and its scrollbar.
|
|
442
|
+
*/
|
|
443
|
+
.desk-widget-list {
|
|
444
|
+
position: absolute;
|
|
445
|
+
pointer-events: auto;
|
|
446
|
+
box-sizing: border-box;
|
|
447
|
+
width: calc(var(--desk-widget-width) + 2 * var(--desk-space-1));
|
|
448
|
+
max-height: calc(100% - 2 * (var(--desk-padding) - var(--desk-space-1)) - var(--desk-inset-bottom));
|
|
449
|
+
padding: var(--desk-space-1);
|
|
450
|
+
display: flex;
|
|
451
|
+
flex-direction: column;
|
|
452
|
+
gap: var(--desk-space-2);
|
|
453
|
+
overflow: hidden auto;
|
|
454
|
+
scrollbar-width: thin;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.desk-widgets[data-corner^="top"] > .desk-widget-list {
|
|
458
|
+
top: calc(var(--desk-padding) - var(--desk-space-1));
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.desk-widgets[data-corner^="bottom"] > .desk-widget-list {
|
|
462
|
+
bottom: calc(var(--desk-padding) - var(--desk-space-1) + var(--desk-inset-bottom));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.desk-widgets[data-corner$="left"] > .desk-widget-list {
|
|
466
|
+
left: calc(var(--desk-padding) - var(--desk-space-1));
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.desk-widgets[data-corner$="right"] > .desk-widget-list {
|
|
470
|
+
right: calc(var(--desk-padding) - var(--desk-space-1));
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* Behind: on the desk surface, over what the app draws on an empty desk; windows start at 10. */
|
|
474
|
+
.desk-widget {
|
|
475
|
+
flex: none;
|
|
476
|
+
box-sizing: border-box;
|
|
477
|
+
position: relative;
|
|
478
|
+
z-index: 1;
|
|
479
|
+
min-height: 44px;
|
|
480
|
+
padding: 0;
|
|
481
|
+
border: 1px solid var(--desk-rule);
|
|
482
|
+
border-radius: var(--desk-radius);
|
|
483
|
+
background: var(--desk-surface);
|
|
484
|
+
color: var(--desk-ink);
|
|
485
|
+
font-family: var(--desk-font);
|
|
486
|
+
font-size: var(--desk-text-body);
|
|
487
|
+
text-align: start;
|
|
488
|
+
overflow: clip;
|
|
489
|
+
overflow-wrap: anywhere;
|
|
490
|
+
user-select: none;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* Its words, on an opaque surface. */
|
|
494
|
+
.desk-widget-surface {
|
|
495
|
+
display: block;
|
|
496
|
+
box-sizing: border-box;
|
|
497
|
+
min-height: 42px;
|
|
498
|
+
padding: var(--desk-space-2) var(--desk-space-3);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* In front, by choice: a frame of the dock's glass round that surface, as a stack's panel. No shadow: the list clips it. */
|
|
502
|
+
.desk-widget[data-front] {
|
|
503
|
+
z-index: 800;
|
|
504
|
+
padding: var(--desk-space-1);
|
|
505
|
+
background: var(--desk-dock-glass);
|
|
506
|
+
backdrop-filter: blur(28px) saturate(170%);
|
|
507
|
+
-webkit-backdrop-filter: blur(28px) saturate(170%);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.desk-widget[data-front] > .desk-widget-surface {
|
|
511
|
+
/* The frame comes out of the padding: ticking one keeps its size. */
|
|
512
|
+
min-height: calc(42px - 2 * var(--desk-space-1));
|
|
513
|
+
padding: calc(var(--desk-space-2) - var(--desk-space-1)) calc(var(--desk-space-3) - var(--desk-space-1));
|
|
514
|
+
border-radius: max(0px, calc(var(--desk-radius) - var(--desk-space-1)));
|
|
515
|
+
background: var(--desk-surface);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
button.desk-widget {
|
|
519
|
+
cursor: pointer;
|
|
520
|
+
transition: border-color .12s var(--desk-ease);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
button.desk-widget:hover {
|
|
524
|
+
border-color: color-mix(in srgb, var(--desk-accent) 45%, var(--desk-rule));
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.desk-widget:focus-visible {
|
|
528
|
+
outline: 2px solid var(--desk-accent);
|
|
529
|
+
outline-offset: 2px;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* A tour pointing at them moves nothing, and its ring fits in that margin too. */
|
|
533
|
+
.desk-widget-list[data-desk-tour-pointed] {
|
|
534
|
+
position: absolute;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.desk-widget[data-desk-tour-pointed] {
|
|
538
|
+
outline-offset: 2px;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.desk-widget-unseen {
|
|
542
|
+
position: absolute;
|
|
543
|
+
width: 1px;
|
|
544
|
+
height: 1px;
|
|
545
|
+
overflow: hidden;
|
|
546
|
+
clip-path: inset(50%);
|
|
547
|
+
white-space: nowrap;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* A desk this small belongs to the windows. */
|
|
551
|
+
@container desk-widgets (max-width: 640px) or (max-height: 400px) {
|
|
552
|
+
.desk-widget-list,
|
|
553
|
+
.desk-widgets > .desk-widget-unseen {
|
|
554
|
+
display: none;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@media (forced-colors: active) {
|
|
559
|
+
button.desk-widget:hover { border-color: Highlight; }
|
|
560
|
+
}
|
|
561
|
+
|
|
415
562
|
/* ── The inside of a window: controls that stay, content that scrolls ── */
|
|
416
563
|
|
|
417
564
|
/* Two panels in one window, and the edge between them that moves. */
|
|
@@ -600,6 +747,27 @@
|
|
|
600
747
|
overflow: hidden;
|
|
601
748
|
}
|
|
602
749
|
|
|
750
|
+
/*
|
|
751
|
+
* A centred window that fits its content (`fitContent`) is as tall as what is in it, up to its max-height.
|
|
752
|
+
* Its height comes from its content rather than the content from its height, so a pane in it is not 100% of
|
|
753
|
+
* anything: it takes its own height and gives way, with the middle scrolling, once the window is at its cap.
|
|
754
|
+
*/
|
|
755
|
+
.desk-window[data-fit] {
|
|
756
|
+
height: fit-content;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.desk-window[data-fit] > .desk-body {
|
|
760
|
+
flex: 0 1 auto;
|
|
761
|
+
display: flex;
|
|
762
|
+
flex-direction: column;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.desk-window[data-fit] > .desk-body > * {
|
|
766
|
+
flex: 0 1 auto;
|
|
767
|
+
height: auto;
|
|
768
|
+
min-height: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
603
771
|
.desk-toolbar {
|
|
604
772
|
display: flex;
|
|
605
773
|
align-items: center;
|