@tutti-os/workbench-surface 0.0.44 → 0.0.46
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/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/styles/workbench.css +49 -50
- package/dist/styles/workbenchStyle.test.ts +41 -0
- package/package.json +5 -5
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.workbench-surface {
|
|
17
|
+
--workbench-chrome-active-foreground: var(--foreground);
|
|
17
18
|
--workbench-chrome-inset-x: 0px;
|
|
18
19
|
--workbench-chrome-inset-y: 0px;
|
|
19
20
|
--workbench-mission-control-ease: cubic-bezier(0.22, 1, 0.36, 1);
|
|
@@ -34,6 +35,13 @@
|
|
|
34
35
|
isolation: isolate;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
.workbench-surface[data-mission-control-phase="entering"],
|
|
39
|
+
.workbench-surface[data-mission-control-phase="open"],
|
|
40
|
+
.workbench-surface[data-presentation-mode="mission-control"] {
|
|
41
|
+
--workbench-chrome-active-foreground: var(--white-stationary);
|
|
42
|
+
--workbench-chrome-foreground: var(--white-stationary);
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
.workbench-surface__wallpaper {
|
|
38
46
|
position: absolute;
|
|
39
47
|
inset: 0;
|
|
@@ -273,24 +281,51 @@
|
|
|
273
281
|
transition: background-color 160ms ease;
|
|
274
282
|
}
|
|
275
283
|
|
|
276
|
-
.workbench-window-traffic-
|
|
277
|
-
|
|
284
|
+
.workbench-window-traffic-light__icon {
|
|
285
|
+
position: absolute;
|
|
286
|
+
z-index: 1;
|
|
287
|
+
inset: 5px;
|
|
288
|
+
width: 10px;
|
|
289
|
+
height: 10px;
|
|
290
|
+
color: color-mix(in srgb, #000 68%, transparent);
|
|
291
|
+
opacity: 0;
|
|
292
|
+
pointer-events: none;
|
|
293
|
+
transition: opacity 120ms ease;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.workbench-window-traffic-lights:hover .workbench-window-traffic-light,
|
|
297
|
+
.workbench-window-traffic-lights:focus-within .workbench-window-traffic-light {
|
|
278
298
|
opacity: 1;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.workbench-window-traffic-light:focus-visible {
|
|
279
302
|
outline: none;
|
|
280
303
|
}
|
|
281
304
|
|
|
282
|
-
.workbench-window-traffic-
|
|
283
|
-
.workbench-window-traffic-
|
|
305
|
+
.workbench-window-traffic-lights:hover .workbench-window-traffic-light__icon,
|
|
306
|
+
.workbench-window-traffic-lights:focus-within
|
|
307
|
+
.workbench-window-traffic-light__icon {
|
|
308
|
+
opacity: 1;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.workbench-window-traffic-lights:hover
|
|
312
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="close"]::before,
|
|
313
|
+
.workbench-window-traffic-lights:focus-within
|
|
314
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="close"]::before {
|
|
284
315
|
background-color: #ff5f57;
|
|
285
316
|
}
|
|
286
317
|
|
|
287
|
-
.workbench-window-traffic-
|
|
288
|
-
.workbench-window-traffic-light[data-workbench-traffic-light="minimize"]
|
|
318
|
+
.workbench-window-traffic-lights:hover
|
|
319
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="minimize"]::before,
|
|
320
|
+
.workbench-window-traffic-lights:focus-within
|
|
321
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="minimize"]::before {
|
|
289
322
|
background-color: #ffbd2e;
|
|
290
323
|
}
|
|
291
324
|
|
|
292
|
-
.workbench-window-traffic-
|
|
293
|
-
.workbench-window-traffic-light[data-workbench-traffic-light="maximize"]
|
|
325
|
+
.workbench-window-traffic-lights:hover
|
|
326
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="maximize"]::before,
|
|
327
|
+
.workbench-window-traffic-lights:focus-within
|
|
328
|
+
.workbench-window-traffic-light[data-workbench-traffic-light="maximize"]::before {
|
|
294
329
|
background-color: #28c840;
|
|
295
330
|
}
|
|
296
331
|
|
|
@@ -470,60 +505,24 @@
|
|
|
470
505
|
transform var(--workbench-mission-control-scale-duration)
|
|
471
506
|
var(--workbench-mission-control-ease);
|
|
472
507
|
will-change: opacity, transform;
|
|
473
|
-
background:
|
|
474
|
-
|
|
475
|
-
110% 92% at 50% -4%,
|
|
476
|
-
rgb(255 255 255 / 0.14) 0%,
|
|
477
|
-
transparent 56%
|
|
478
|
-
),
|
|
479
|
-
linear-gradient(
|
|
480
|
-
180deg,
|
|
481
|
-
color-mix(
|
|
482
|
-
in srgb,
|
|
483
|
-
var(--workbench-surface-background) 54%,
|
|
484
|
-
rgb(255 255 255 / 10%)
|
|
485
|
-
)
|
|
486
|
-
0%,
|
|
487
|
-
color-mix(in srgb, var(--workbench-window-bg) 82%, var(--workbench-panel))
|
|
488
|
-
100%
|
|
489
|
-
);
|
|
490
|
-
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
|
|
508
|
+
background: rgb(0 0 0 / 60%);
|
|
509
|
+
box-shadow: none;
|
|
491
510
|
}
|
|
492
511
|
|
|
493
512
|
.workbench-mission-control-backdrop::before {
|
|
494
513
|
position: absolute;
|
|
495
514
|
inset: 0;
|
|
496
|
-
background:
|
|
497
|
-
linear-gradient(135deg, rgb(255 255 255 / 0.06), transparent 34%),
|
|
498
|
-
radial-gradient(
|
|
499
|
-
92% 84% at 18% 18%,
|
|
500
|
-
color-mix(in srgb, var(--workbench-panel) 22%, transparent) 0%,
|
|
501
|
-
transparent 48%
|
|
502
|
-
),
|
|
503
|
-
radial-gradient(
|
|
504
|
-
68% 54% at 82% 10%,
|
|
505
|
-
rgb(255 255 255 / 0.07),
|
|
506
|
-
transparent 44%
|
|
507
|
-
),
|
|
508
|
-
repeating-linear-gradient(
|
|
509
|
-
180deg,
|
|
510
|
-
rgb(255 255 255 / 0.018) 0,
|
|
511
|
-
rgb(255 255 255 / 0.018) 1px,
|
|
512
|
-
transparent 1px,
|
|
513
|
-
transparent 4px
|
|
514
|
-
);
|
|
515
|
+
background: none;
|
|
515
516
|
content: "";
|
|
516
|
-
opacity: 0
|
|
517
|
+
opacity: 0;
|
|
517
518
|
}
|
|
518
519
|
|
|
519
520
|
.workbench-mission-control-backdrop::after {
|
|
520
521
|
position: absolute;
|
|
521
522
|
inset: 0;
|
|
522
|
-
background:
|
|
523
|
-
linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent 26%),
|
|
524
|
-
linear-gradient(0deg, rgb(255 255 255 / 0.025), transparent 36%);
|
|
523
|
+
background: none;
|
|
525
524
|
content: "";
|
|
526
|
-
opacity: 0
|
|
525
|
+
opacity: 0;
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
.workbench-mission-control-backdrop[data-phase="entering"],
|
|
@@ -23,6 +23,18 @@ test("traffic lights keep visual layout while expanding the pointer hit area", (
|
|
|
23
23
|
css,
|
|
24
24
|
/\.workbench-window-traffic-light::before\s*{[^}]*inset:\s*4px;[^}]*content:\s*"";[^}]*transition:\s*background-color 160ms ease;/s
|
|
25
25
|
);
|
|
26
|
+
assert.match(
|
|
27
|
+
css,
|
|
28
|
+
/\.workbench-window-traffic-light__icon\s*{[^}]*inset:\s*5px;[^}]*width:\s*10px;[^}]*height:\s*10px;[^}]*opacity:\s*0;[^}]*transition:\s*opacity 120ms ease;/s
|
|
29
|
+
);
|
|
30
|
+
assert.match(
|
|
31
|
+
css,
|
|
32
|
+
/\.workbench-window-traffic-lights:hover\s+\.workbench-window-traffic-light__icon,\s*\.workbench-window-traffic-lights:focus-within\s+\.workbench-window-traffic-light__icon\s*{[^}]*opacity:\s*1;/s
|
|
33
|
+
);
|
|
34
|
+
assert.match(
|
|
35
|
+
css,
|
|
36
|
+
/\.workbench-window-traffic-lights:hover\s+\.workbench-window-traffic-light\[data-workbench-traffic-light="close"\]::before,\s*\.workbench-window-traffic-lights:focus-within\s+\.workbench-window-traffic-light\[data-workbench-traffic-light="close"\]::before\s*{[^}]*background-color:\s*#ff5f57;/s
|
|
37
|
+
);
|
|
26
38
|
});
|
|
27
39
|
|
|
28
40
|
test("floating window corner resize handles do not intrude further than the edge handles", () => {
|
|
@@ -75,6 +87,35 @@ test("mission control overlay lets layout controls sit above dialog overlays", (
|
|
|
75
87
|
);
|
|
76
88
|
});
|
|
77
89
|
|
|
90
|
+
test("mission control backdrop uses the shared dark scrim value", () => {
|
|
91
|
+
const css = readFileSync(resolve("src/styles/workbench.css"), "utf8");
|
|
92
|
+
|
|
93
|
+
assert.match(
|
|
94
|
+
css,
|
|
95
|
+
/\.workbench-surface\s*{[^}]*--workbench-chrome-active-foreground:\s*var\(--foreground\);/s
|
|
96
|
+
);
|
|
97
|
+
assert.match(
|
|
98
|
+
css,
|
|
99
|
+
/\.workbench-surface\[data-mission-control-phase="entering"\],[\s\S]*?\.workbench-surface\[data-presentation-mode="mission-control"\]\s*{[^}]*--workbench-chrome-active-foreground:\s*var\(--white-stationary\);[^}]*--workbench-chrome-foreground:\s*var\(--white-stationary\);/s
|
|
100
|
+
);
|
|
101
|
+
assert.match(
|
|
102
|
+
css,
|
|
103
|
+
/\.workbench-mission-control-backdrop\s*{[^}]*background:\s*rgb\(0 0 0 \/ 60%\);[^}]*box-shadow:\s*none;/s
|
|
104
|
+
);
|
|
105
|
+
assert.match(
|
|
106
|
+
css,
|
|
107
|
+
/\.workbench-mission-control-backdrop::before\s*{[^}]*background:\s*none;[^}]*opacity:\s*0;/s
|
|
108
|
+
);
|
|
109
|
+
assert.match(
|
|
110
|
+
css,
|
|
111
|
+
/\.workbench-mission-control-backdrop::after\s*{[^}]*background:\s*none;[^}]*opacity:\s*0;/s
|
|
112
|
+
);
|
|
113
|
+
assert.doesNotMatch(
|
|
114
|
+
css,
|
|
115
|
+
/\.workbench-mission-control-backdrop\s*{[^}]*var\(--workbench-surface-background\)/s
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
|
|
78
119
|
test("dialog popover node layer sits above dialog overlays and remains clickable", () => {
|
|
79
120
|
const css = readFileSync(resolve("src/styles/workbench.css"), "utf8");
|
|
80
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutti-os/workbench-surface",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@tutti-os/config-tsconfig": "0.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tutti-os/ui-i18n-runtime": "0.0.
|
|
38
|
-
"@tutti-os/ui-react-hooks": "0.0.
|
|
39
|
-
"@tutti-os/workbench-snapshot": "0.0.
|
|
40
|
-
"@tutti-os/ui-system": "0.0.
|
|
37
|
+
"@tutti-os/ui-i18n-runtime": "0.0.46",
|
|
38
|
+
"@tutti-os/ui-react-hooks": "0.0.46",
|
|
39
|
+
"@tutti-os/workbench-snapshot": "0.0.46",
|
|
40
|
+
"@tutti-os/ui-system": "0.0.46"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^19.1.0",
|