macbetter 0.0.0-stage → 0.1.0-beta.2
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/LICENSE +201 -0
- package/README.md +92 -2
- package/dist/components/accessory-tile.d.ts +50 -0
- package/dist/components/accessory-tile.js +46 -0
- package/dist/components/activity-indicator.d.ts +15 -0
- package/dist/components/activity-indicator.js +15 -0
- package/dist/components/alert.d.ts +29 -0
- package/dist/components/alert.js +30 -0
- package/dist/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/artwork.d.ts +44 -0
- package/dist/components/artwork.js +935 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/automation-row.d.ts +24 -0
- package/dist/components/automation-row.js +12 -0
- package/dist/components/avatar.d.ts +33 -0
- package/dist/components/avatar.js +45 -0
- package/dist/components/badge.d.ts +24 -0
- package/dist/components/badge.js +19 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.js +10 -0
- package/dist/components/calendar.d.ts +30 -0
- package/dist/components/calendar.js +47 -0
- package/dist/components/camera-view.d.ts +40 -0
- package/dist/components/camera-view.js +44 -0
- package/dist/components/card.d.ts +14 -0
- package/dist/components/card.js +21 -0
- package/dist/components/carousel.d.ts +18 -0
- package/dist/components/carousel.js +33 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.js +16 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -0
- package/dist/components/code-field.d.ts +16 -0
- package/dist/components/code-field.js +29 -0
- package/dist/components/color-well.d.ts +23 -0
- package/dist/components/color-well.js +27 -0
- package/dist/components/combo-box.d.ts +42 -0
- package/dist/components/combo-box.js +102 -0
- package/dist/components/command-palette.d.ts +33 -0
- package/dist/components/command-palette.js +55 -0
- package/dist/components/confirmation.d.ts +24 -0
- package/dist/components/confirmation.js +50 -0
- package/dist/components/content-unavailable.d.ts +19 -0
- package/dist/components/content-unavailable.js +21 -0
- package/dist/components/context-menu.d.ts +9 -0
- package/dist/components/context-menu.js +15 -0
- package/dist/components/date-picker.d.ts +53 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/device-frame.d.ts +18 -0
- package/dist/components/device-frame.js +16 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/disclosure.d.ts +32 -0
- package/dist/components/disclosure.js +35 -0
- package/dist/components/dock.d.ts +28 -0
- package/dist/components/dock.js +80 -0
- package/dist/components/door-control.d.ts +20 -0
- package/dist/components/door-control.js +43 -0
- package/dist/components/energy-readout.d.ts +32 -0
- package/dist/components/energy-readout.js +27 -0
- package/dist/components/field.d.ts +28 -0
- package/dist/components/field.js +32 -0
- package/dist/components/gauge.d.ts +25 -0
- package/dist/components/gauge.js +42 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/glass.d.ts +34 -0
- package/dist/components/glass.js +31 -0
- package/dist/components/home-backdrop.d.ts +23 -0
- package/dist/components/home-backdrop.js +12 -0
- package/dist/components/home-section.d.ts +19 -0
- package/dist/components/home-section.js +21 -0
- package/dist/components/home-status.d.ts +24 -0
- package/dist/components/home-status.js +14 -0
- package/dist/components/hover-card.d.ts +14 -0
- package/dist/components/hover-card.js +16 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -0
- package/dist/components/level-control.d.ts +19 -0
- package/dist/components/level-control.js +13 -0
- package/dist/components/light-color-picker.d.ts +33 -0
- package/dist/components/light-color-picker.js +56 -0
- package/dist/components/list.d.ts +42 -0
- package/dist/components/list.js +42 -0
- package/dist/components/listbox.d.ts +16 -0
- package/dist/components/listbox.js +28 -0
- package/dist/components/lock-control.d.ts +20 -0
- package/dist/components/lock-control.js +35 -0
- package/dist/components/menu-bar.d.ts +14 -0
- package/dist/components/menu-bar.js +16 -0
- package/dist/components/menu.d.ts +40 -0
- package/dist/components/menu.js +54 -0
- package/dist/components/message.d.ts +65 -0
- package/dist/components/message.js +69 -0
- package/dist/components/model-picker.d.ts +61 -0
- package/dist/components/model-picker.js +59 -0
- package/dist/components/navigation-bar.d.ts +24 -0
- package/dist/components/navigation-bar.js +54 -0
- package/dist/components/outline.d.ts +21 -0
- package/dist/components/outline.js +40 -0
- package/dist/components/page-control.d.ts +10 -0
- package/dist/components/page-control.js +8 -0
- package/dist/components/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +27 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.js +13 -0
- package/dist/components/rating.d.ts +10 -0
- package/dist/components/rating.js +12 -0
- package/dist/components/reasoning.d.ts +28 -0
- package/dist/components/reasoning.js +52 -0
- package/dist/components/response.d.ts +14 -0
- package/dist/components/response.js +14 -0
- package/dist/components/scene-tile.d.ts +22 -0
- package/dist/components/scene-tile.js +13 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/scroll-view.js +13 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.js +12 -0
- package/dist/components/secure-field.d.ts +23 -0
- package/dist/components/secure-field.js +21 -0
- package/dist/components/segmented-control.d.ts +12 -0
- package/dist/components/segmented-control.js +10 -0
- package/dist/components/select.d.ts +45 -0
- package/dist/components/select.js +79 -0
- package/dist/components/sensor-readout.d.ts +29 -0
- package/dist/components/sensor-readout.js +12 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +11 -0
- package/dist/components/setup-code.d.ts +29 -0
- package/dist/components/setup-code.js +47 -0
- package/dist/components/sheet.d.ts +31 -0
- package/dist/components/sheet.js +51 -0
- package/dist/components/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sidebar.d.ts +30 -0
- package/dist/components/sidebar.js +26 -0
- package/dist/components/slider.d.ts +27 -0
- package/dist/components/slider.js +43 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/split-view.d.ts +11 -0
- package/dist/components/split-view.js +13 -0
- package/dist/components/squircle.d.ts +41 -0
- package/dist/components/squircle.js +63 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +28 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/switch.d.ts +10 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/tab-bar.d.ts +20 -0
- package/dist/components/tab-bar.js +17 -0
- package/dist/components/table.d.ts +49 -0
- package/dist/components/table.js +179 -0
- package/dist/components/tabs.d.ts +16 -0
- package/dist/components/tabs.js +19 -0
- package/dist/components/text-area.d.ts +14 -0
- package/dist/components/text-area.js +9 -0
- package/dist/components/text-field.d.ts +26 -0
- package/dist/components/text-field.js +23 -0
- package/dist/components/thermostat-control.d.ts +30 -0
- package/dist/components/thermostat-control.js +139 -0
- package/dist/components/toast.d.ts +30 -0
- package/dist/components/toast.js +114 -0
- package/dist/components/toggle.d.ts +21 -0
- package/dist/components/toggle.js +19 -0
- package/dist/components/token-field.d.ts +31 -0
- package/dist/components/token-field.js +78 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/components/toolbar.d.ts +27 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/window.d.ts +56 -0
- package/dist/components/window.js +61 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +98 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/lib/cx.d.ts +9 -0
- package/dist/lib/cx.js +14 -0
- package/dist/lib/derive.d.ts +53 -0
- package/dist/lib/derive.js +255 -0
- package/dist/lib/field-glyphs.d.ts +13 -0
- package/dist/lib/field-glyphs.js +28 -0
- package/dist/lib/menu-glyphs.d.ts +6 -0
- package/dist/lib/menu-glyphs.js +15 -0
- package/dist/lib/platform.d.ts +18 -0
- package/dist/lib/platform.js +17 -0
- package/dist/lib/squircle.d.ts +23 -0
- package/dist/lib/squircle.js +69 -0
- package/dist/lib/theme.d.ts +42 -0
- package/dist/lib/theme.js +62 -0
- package/dist/styles/base.css +115 -0
- package/dist/styles/components/accessory-tile.css +461 -0
- package/dist/styles/components/activity-indicator.css +63 -0
- package/dist/styles/components/alert.css +433 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/artwork.css +380 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/automation-row.css +52 -0
- package/dist/styles/components/avatar.css +230 -0
- package/dist/styles/components/badge.css +204 -0
- package/dist/styles/components/button.css +298 -0
- package/dist/styles/components/calendar.css +287 -0
- package/dist/styles/components/camera-view.css +239 -0
- package/dist/styles/components/card.css +100 -0
- package/dist/styles/components/carousel.css +210 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/checkbox.css +212 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/code-field.css +163 -0
- package/dist/styles/components/color-well.css +452 -0
- package/dist/styles/components/combo-box.css +222 -0
- package/dist/styles/components/command-palette.css +379 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/context-menu.css +43 -0
- package/dist/styles/components/date-picker.css +356 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +202 -0
- package/dist/styles/components/dialog.css +366 -0
- package/dist/styles/components/disclosure.css +197 -0
- package/dist/styles/components/dock.css +404 -0
- package/dist/styles/components/door-control.css +187 -0
- package/dist/styles/components/energy-readout.css +161 -0
- package/dist/styles/components/field.css +175 -0
- package/dist/styles/components/gauge.css +239 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/glass.css +113 -0
- package/dist/styles/components/home-backdrop.css +81 -0
- package/dist/styles/components/home-section.css +100 -0
- package/dist/styles/components/home-status.css +215 -0
- package/dist/styles/components/hover-card.css +145 -0
- package/dist/styles/components/index.css +94 -0
- package/dist/styles/components/inspector.css +236 -0
- package/dist/styles/components/level-control.css +247 -0
- package/dist/styles/components/light-color-picker.css +94 -0
- package/dist/styles/components/list.css +411 -0
- package/dist/styles/components/listbox.css +168 -0
- package/dist/styles/components/lock-control.css +164 -0
- package/dist/styles/components/menu-bar.css +94 -0
- package/dist/styles/components/menu.css +454 -0
- package/dist/styles/components/message.css +236 -0
- package/dist/styles/components/model-picker.css +64 -0
- package/dist/styles/components/navigation-bar.css +249 -0
- package/dist/styles/components/outline.css +248 -0
- package/dist/styles/components/page-control.css +127 -0
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/popover.css +186 -0
- package/dist/styles/components/progress.css +228 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/radio.css +281 -0
- package/dist/styles/components/rating.css +122 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/scene-tile.css +295 -0
- package/dist/styles/components/scroll-view.css +195 -0
- package/dist/styles/components/search-field.css +128 -0
- package/dist/styles/components/secure-field.css +189 -0
- package/dist/styles/components/segmented-control.css +183 -0
- package/dist/styles/components/select.css +290 -0
- package/dist/styles/components/sensor-readout.css +231 -0
- package/dist/styles/components/separator.css +62 -0
- package/dist/styles/components/setup-code.css +138 -0
- package/dist/styles/components/sheet.css +345 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sidebar.css +261 -0
- package/dist/styles/components/slider.css +208 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/split-view.css +75 -0
- package/dist/styles/components/squircle.css +44 -0
- package/dist/styles/components/stepper.css +278 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/switch.css +115 -0
- package/dist/styles/components/tab-bar.css +223 -0
- package/dist/styles/components/table.css +313 -0
- package/dist/styles/components/tabs.css +262 -0
- package/dist/styles/components/text-area.css +94 -0
- package/dist/styles/components/text-field.css +294 -0
- package/dist/styles/components/thermostat-control.css +214 -0
- package/dist/styles/components/toast.css +418 -0
- package/dist/styles/components/toggle.css +312 -0
- package/dist/styles/components/token-field.css +193 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/dist/styles/components/toolbar.css +370 -0
- package/dist/styles/components/tooltip.css +69 -0
- package/dist/styles/components/window.css +428 -0
- package/dist/styles/index.css +17 -0
- package/dist/styles/materials.css +263 -0
- package/dist/styles/platforms.css +214 -0
- package/dist/styles/themes/ember.css +24 -0
- package/dist/styles/themes/graphite.css +16 -0
- package/dist/styles/themes/nebula.css +16 -0
- package/dist/styles/themes/system.css +28 -0
- package/dist/styles/tokens.css +299 -0
- package/package.json +82 -3
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/* Inspector — a trailing panel with details about the selected content, as SwiftUI's .inspector draws it. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-inspector-width: 264px;
|
|
5
|
+
--mb-inspector-padding: 16px;
|
|
6
|
+
--mb-inspector-header-height: 44px;
|
|
7
|
+
--mb-inspector-title-font: var(--mb-text-headline);
|
|
8
|
+
--mb-inspector-section-title-font: var(--mb-text-headline);
|
|
9
|
+
--mb-inspector-section-gap: var(--mb-space-4);
|
|
10
|
+
--mb-inspector-section-padding-block: 12px;
|
|
11
|
+
--mb-inspector-floating-inset: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where([data-platform="ipados"]) {
|
|
15
|
+
--mb-inspector-width: 320px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where([data-platform="ios"]) {
|
|
19
|
+
/* On iPhone the inspector is a sheet's content, so it takes the sheet's width. */
|
|
20
|
+
--mb-inspector-width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
24
|
+
--mb-inspector-padding: 20px;
|
|
25
|
+
--mb-inspector-header-height: 56px;
|
|
26
|
+
--mb-inspector-title-font: var(--mb-text-title-3);
|
|
27
|
+
--mb-inspector-section-title-font: var(--mb-text-title-3);
|
|
28
|
+
--mb-inspector-section-gap: var(--mb-space-4);
|
|
29
|
+
--mb-inspector-section-padding-block: 16px;
|
|
30
|
+
--mb-inspector-floating-inset: 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mb-inspector {
|
|
34
|
+
--mb-inspector-bg: var(--mb-bg);
|
|
35
|
+
|
|
36
|
+
position: relative;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
width: var(--mb-inspector-width);
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
min-height: 0;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
background: var(--mb-inspector-bg);
|
|
45
|
+
color: var(--mb-label);
|
|
46
|
+
font: var(--mb-text-body);
|
|
47
|
+
letter-spacing: var(--mb-tracking-body);
|
|
48
|
+
text-align: start;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mb-window > .mb-inspector[data-variant="edge"] {
|
|
52
|
+
box-shadow: inset var(--mb-hairline) 0 0 var(--mb-separator);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([dir="rtl"]) .mb-window > .mb-inspector[data-variant="edge"] {
|
|
56
|
+
box-shadow: inset calc(-1 * var(--mb-hairline)) 0 0 var(--mb-separator);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Floating: a pane of material over the content, inset from the window's edges. */
|
|
60
|
+
.mb-inspector[data-variant="floating"] {
|
|
61
|
+
--mb-inspector-radius: calc(var(--mb-radius-xl) - var(--mb-inspector-floating-inset) / 2);
|
|
62
|
+
--mb-inspector-bg: var(--mb-material-regular);
|
|
63
|
+
border-radius: var(--mb-inspector-radius);
|
|
64
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
65
|
+
backdrop-filter: var(--mb-material-filter);
|
|
66
|
+
box-shadow:
|
|
67
|
+
var(--mb-glass-rim),
|
|
68
|
+
0 0 0 var(--mb-hairline) var(--mb-glass-border),
|
|
69
|
+
var(--mb-shadow-3);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@supports (corner-shape: squircle) {
|
|
73
|
+
.mb-inspector[data-variant="floating"] {
|
|
74
|
+
corner-shape: var(--mb-corner-shape);
|
|
75
|
+
border-radius: calc(var(--mb-inspector-radius) * var(--mb-corner-factor));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Inside a Window. Edge: a third column beside the body, below the title bar, which runs over it
|
|
81
|
+
* as a unified toolbar does. Floating: the body keeps the full width and the pane sits over it.
|
|
82
|
+
* The extra attribute outweighs window.css, which places every non-sidebar child in column 2.
|
|
83
|
+
*/
|
|
84
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) {
|
|
85
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) {
|
|
89
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) > .mb-window-titlebar {
|
|
93
|
+
grid-column: 1 / -1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) > .mb-window-titlebar {
|
|
97
|
+
grid-column: 2 / -1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mb-window:has(> .mb-inspector) > .mb-window-body {
|
|
101
|
+
grid-row: 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) > .mb-window-body {
|
|
105
|
+
grid-column: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Floating: the body and the pane share the last column, the pane on top. */
|
|
109
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) > .mb-window-body {
|
|
110
|
+
grid-column: 2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.mb-window:has(> .mb-inspector[data-variant="floating"]) > .mb-window-body {
|
|
114
|
+
grid-column: -2 / -1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mb-window:has(> .mb-inspector) > .mb-inspector[data-variant] {
|
|
118
|
+
grid-row: 2;
|
|
119
|
+
grid-column: -2 / -1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.mb-window > .mb-inspector[data-variant="floating"] {
|
|
123
|
+
z-index: 2;
|
|
124
|
+
justify-self: end;
|
|
125
|
+
margin: var(--mb-inspector-floating-inset);
|
|
126
|
+
margin-block-start: calc(var(--mb-inspector-floating-inset) / 2);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Header */
|
|
130
|
+
.mb-inspector-header {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex: none;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: var(--mb-space-4);
|
|
135
|
+
min-width: 0;
|
|
136
|
+
min-height: var(--mb-inspector-header-height);
|
|
137
|
+
padding-inline: var(--mb-inspector-padding) calc(var(--mb-inspector-padding) - var(--mb-space-3));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.mb-inspector-title {
|
|
141
|
+
flex: 1 1 auto;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
margin: 0;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
color: var(--mb-label);
|
|
146
|
+
font: var(--mb-inspector-title-font);
|
|
147
|
+
letter-spacing: var(--mb-tracking-title);
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mb-inspector-header > .mb-inspector-close {
|
|
153
|
+
margin-inline-start: auto;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Body */
|
|
157
|
+
.mb-inspector-body {
|
|
158
|
+
flex: 1 1 auto;
|
|
159
|
+
min-height: 0;
|
|
160
|
+
overflow-y: auto;
|
|
161
|
+
overscroll-behavior: contain;
|
|
162
|
+
padding-block-end: var(--mb-space-4);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mb-inspector:not(:has(> .mb-inspector-header)) > .mb-inspector-body {
|
|
166
|
+
padding-block-start: var(--mb-space-2);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Sections: a title row, then their content, with a hairline between them. */
|
|
170
|
+
.mb-inspector-section {
|
|
171
|
+
position: relative;
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
gap: var(--mb-inspector-section-gap);
|
|
175
|
+
min-width: 0;
|
|
176
|
+
padding: var(--mb-inspector-section-padding-block) var(--mb-inspector-padding);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* The divider is inset to the content, as AppKit draws it between inspector sections. */
|
|
180
|
+
.mb-inspector-section + .mb-inspector-section::before {
|
|
181
|
+
content: "";
|
|
182
|
+
position: absolute;
|
|
183
|
+
inset-block-start: 0;
|
|
184
|
+
inset-inline: var(--mb-inspector-padding);
|
|
185
|
+
border-block-start: var(--mb-hairline) solid var(--mb-separator);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mb-inspector-section-header {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: var(--mb-space-4);
|
|
192
|
+
min-width: 0;
|
|
193
|
+
min-height: var(--mb-control-height-sm);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.mb-inspector-section-title {
|
|
197
|
+
flex: 1 1 auto;
|
|
198
|
+
min-width: 0;
|
|
199
|
+
margin: 0;
|
|
200
|
+
color: var(--mb-label);
|
|
201
|
+
font: var(--mb-inspector-section-title-font);
|
|
202
|
+
letter-spacing: var(--mb-tracking-body);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mb-inspector-section-action {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex: none;
|
|
208
|
+
align-items: center;
|
|
209
|
+
gap: var(--mb-space-2);
|
|
210
|
+
margin-inline-end: calc(-1 * var(--mb-space-3));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Rows and plain buttons bleed into the padding, so their text lines up with the section title. */
|
|
214
|
+
.mb-inspector-section > .mb-attachments[data-layout="column"],
|
|
215
|
+
.mb-inspector-section > .mb-attachment[data-variant="row"] {
|
|
216
|
+
margin-inline: calc(-1 * var(--mb-attachment-row-padding));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mb-inspector-section > .mb-button[data-variant="plain"] {
|
|
220
|
+
align-self: flex-start;
|
|
221
|
+
margin-inline-start: calc(-1 * var(--mb-button-padding));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Touch: the inspector is a sheet's content, so it drops its own fill and lets the sheet's show. */
|
|
225
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
226
|
+
/* Outside a window it's a sheet's content: the sheet already pads it. */
|
|
227
|
+
.mb-inspector[data-variant="edge"] {
|
|
228
|
+
--mb-inspector-bg: transparent;
|
|
229
|
+
--mb-inspector-padding: 0px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.mb-window > .mb-inspector[data-variant="edge"] {
|
|
233
|
+
--mb-inspector-bg: var(--mb-bg);
|
|
234
|
+
--mb-inspector-padding: 20px;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* Level control — the Home app's fat slider for brightness, shade position, fan speed and volume.
|
|
2
|
+
The fill is the control: there's no knob. Drag anywhere on the fill's edge, or press the track to jump. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-level-control-thickness-lg: 88px;
|
|
6
|
+
--mb-level-control-length-lg: 224px;
|
|
7
|
+
--mb-level-control-radius-lg: 22px;
|
|
8
|
+
--mb-level-control-thickness-md: 56px;
|
|
9
|
+
--mb-level-control-length-md: 160px;
|
|
10
|
+
--mb-level-control-radius-md: 15px;
|
|
11
|
+
--mb-level-control-icon: 22px;
|
|
12
|
+
--mb-level-control-grab: 24px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
16
|
+
--mb-level-control-thickness-lg: 124px;
|
|
17
|
+
--mb-level-control-length-lg: 300px;
|
|
18
|
+
--mb-level-control-radius-lg: 34px;
|
|
19
|
+
--mb-level-control-thickness-md: 72px;
|
|
20
|
+
--mb-level-control-length-md: 200px;
|
|
21
|
+
--mb-level-control-radius-md: 22px;
|
|
22
|
+
--mb-level-control-icon: 28px;
|
|
23
|
+
--mb-level-control-grab: var(--mb-hit-target);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mb-level-control {
|
|
27
|
+
--mb-level-control-thickness: var(--mb-level-control-thickness-lg);
|
|
28
|
+
--mb-level-control-length: var(--mb-level-control-length-lg);
|
|
29
|
+
--mb-level-control-radius: var(--mb-level-control-radius-lg);
|
|
30
|
+
/* The empty track is dark in both schemes, so a white or pale fill holds 3:1 against it. */
|
|
31
|
+
--mb-level-control-track: light-dark(
|
|
32
|
+
color-mix(in oklch, var(--mb-ink) 58%, transparent),
|
|
33
|
+
color-mix(in oklch, var(--mb-ink) 20%, transparent)
|
|
34
|
+
);
|
|
35
|
+
--mb-level-control-fill: var(--mb-accent);
|
|
36
|
+
--mb-level-control-icon-off: light-dark(rgb(255 255 255 / 0.92), rgb(255 255 255 / 0.72));
|
|
37
|
+
--mb-level-control-icon-on: var(--mb-on-accent);
|
|
38
|
+
--mb-level-control-divider: rgb(0 0 0 / 0.16);
|
|
39
|
+
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--mb-space-3);
|
|
44
|
+
color: var(--mb-label);
|
|
45
|
+
font: var(--mb-text-body);
|
|
46
|
+
letter-spacing: var(--mb-tracking-body);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mb-level-control[data-size="md"] {
|
|
50
|
+
--mb-level-control-thickness: var(--mb-level-control-thickness-md);
|
|
51
|
+
--mb-level-control-length: var(--mb-level-control-length-md);
|
|
52
|
+
--mb-level-control-radius: var(--mb-level-control-radius-md);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mb-level-control[data-orientation="horizontal"] {
|
|
56
|
+
display: flex;
|
|
57
|
+
width: 100%;
|
|
58
|
+
min-width: 200px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mb-level-control[data-tone="light"] {
|
|
62
|
+
--mb-level-control-fill: color-mix(in oklch, var(--mb-yellow) 42%, white);
|
|
63
|
+
--mb-level-control-icon-on: rgb(0 0 0 / 0.6);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mb-level-control[data-tone="neutral"] {
|
|
67
|
+
--mb-level-control-fill: #ffffff;
|
|
68
|
+
--mb-level-control-icon-on: rgb(0 0 0 / 0.6);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* An accent fill reads against a pale track, not a dark one. */
|
|
72
|
+
.mb-level-control[data-tone="accent"] {
|
|
73
|
+
--mb-level-control-track: color-mix(in oklch, var(--mb-ink) 10%, transparent);
|
|
74
|
+
--mb-level-control-icon-off: var(--mb-label-secondary);
|
|
75
|
+
--mb-level-control-divider: rgb(255 255 255 / 0.22);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.mb-level-control-control {
|
|
79
|
+
display: flex;
|
|
80
|
+
touch-action: none;
|
|
81
|
+
-webkit-tap-highlight-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mb-level-control-track {
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
width: var(--mb-level-control-thickness);
|
|
87
|
+
height: var(--mb-level-control-length);
|
|
88
|
+
border-radius: var(--mb-level-control-radius);
|
|
89
|
+
background: var(--mb-level-control-track);
|
|
90
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
91
|
+
backdrop-filter: var(--mb-material-filter);
|
|
92
|
+
box-shadow: var(--mb-glass-rim);
|
|
93
|
+
cursor: default;
|
|
94
|
+
transition: scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-control,
|
|
98
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-track {
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-track {
|
|
103
|
+
height: var(--mb-level-control-thickness);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mb-level-control-fill {
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
background: var(--mb-level-control-fill);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Glides to a pressed point; follows the finger 1:1 while dragging. */
|
|
112
|
+
.mb-level-control:not([data-dragging]) .mb-level-control-fill {
|
|
113
|
+
transition:
|
|
114
|
+
height var(--mb-spring-snappy-duration) var(--mb-spring-snappy),
|
|
115
|
+
width var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Both copies of the icon sit at the same spot of the track; the fill clips its own copy. */
|
|
119
|
+
.mb-level-control-icon {
|
|
120
|
+
position: absolute;
|
|
121
|
+
inset-block-end: calc((var(--mb-level-control-thickness) - var(--mb-level-control-icon)) / 2);
|
|
122
|
+
inset-inline-start: calc((var(--mb-level-control-thickness) - var(--mb-level-control-icon)) / 2);
|
|
123
|
+
display: grid;
|
|
124
|
+
place-items: center;
|
|
125
|
+
width: var(--mb-level-control-icon);
|
|
126
|
+
height: var(--mb-level-control-icon);
|
|
127
|
+
color: var(--mb-level-control-icon-off);
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mb-level-control-icon[data-on-fill] {
|
|
132
|
+
color: var(--mb-level-control-icon-on);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mb-level-control-icon :where(svg) {
|
|
136
|
+
width: 100%;
|
|
137
|
+
height: 100%;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-icon {
|
|
141
|
+
inset-block-end: auto;
|
|
142
|
+
inset-block-start: calc((var(--mb-level-control-thickness) - var(--mb-level-control-icon)) / 2);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.mb-level-control-steps {
|
|
146
|
+
position: absolute;
|
|
147
|
+
inset: 0;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mb-level-control-step {
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset-inline: 0;
|
|
154
|
+
bottom: calc(100% * var(--mb-level-control-step) / var(--mb-level-control-segments));
|
|
155
|
+
height: 1px;
|
|
156
|
+
background: var(--mb-level-control-divider);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-step {
|
|
160
|
+
inset-block: 0;
|
|
161
|
+
inset-inline: auto;
|
|
162
|
+
inset-inline-start: calc(100% * var(--mb-level-control-step) / var(--mb-level-control-segments));
|
|
163
|
+
bottom: 0;
|
|
164
|
+
width: 1px;
|
|
165
|
+
height: auto;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* The thumb is invisible: a band across the fill's edge that takes focus and starts a drag. */
|
|
169
|
+
.mb-level-control-thumb {
|
|
170
|
+
width: 100%;
|
|
171
|
+
height: var(--mb-level-control-grab);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mb-level-control[data-orientation="horizontal"] .mb-level-control-thumb {
|
|
175
|
+
width: var(--mb-level-control-grab);
|
|
176
|
+
height: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.mb-level-control-track:has(:focus-visible) {
|
|
180
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
181
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.mb-level-control-value {
|
|
185
|
+
font: var(--mb-text-headline);
|
|
186
|
+
font-variant-numeric: tabular-nums;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.mb-level-control[data-disabled] {
|
|
190
|
+
opacity: 0.45;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
194
|
+
/* Under the finger the control swells a little, as Control Center's sliders do. */
|
|
195
|
+
.mb-level-control[data-dragging] .mb-level-control-track {
|
|
196
|
+
scale: 1.03;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@supports (corner-shape: squircle) {
|
|
201
|
+
.mb-level-control-track {
|
|
202
|
+
corner-shape: var(--mb-corner-shape);
|
|
203
|
+
border-radius: calc(var(--mb-level-control-radius) * var(--mb-corner-factor));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (prefers-contrast: more) {
|
|
208
|
+
.mb-level-control {
|
|
209
|
+
--mb-level-control-track: light-dark(
|
|
210
|
+
color-mix(in oklch, var(--mb-ink) 68%, transparent),
|
|
211
|
+
color-mix(in oklch, var(--mb-ink) 28%, transparent)
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.mb-level-control-track {
|
|
216
|
+
-webkit-backdrop-filter: none;
|
|
217
|
+
backdrop-filter: none;
|
|
218
|
+
box-shadow: 0 0 0 var(--mb-hairline) var(--mb-control-border);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
223
|
+
:where(:root:not([data-transparency="full"])) {
|
|
224
|
+
.mb-level-control {
|
|
225
|
+
--mb-level-control-track: light-dark(
|
|
226
|
+
color-mix(in oklch, var(--mb-ink) 58%, var(--mb-bg)),
|
|
227
|
+
color-mix(in oklch, var(--mb-ink) 20%, var(--mb-bg))
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.mb-level-control-track {
|
|
232
|
+
-webkit-backdrop-filter: none;
|
|
233
|
+
backdrop-filter: none;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (forced-colors: active) {
|
|
239
|
+
.mb-level-control-track {
|
|
240
|
+
border: 1px solid CanvasText;
|
|
241
|
+
background: Canvas;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.mb-level-control-fill {
|
|
245
|
+
background: Highlight;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Light color picker — the row of color and white presets under a light's brightness control.
|
|
2
|
+
A selected swatch gets a ring with a gap, like the Home app; whites come first, then colors. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-light-color-picker-size: 28px;
|
|
6
|
+
--mb-light-color-picker-gap: 10px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
10
|
+
--mb-light-color-picker-size: 44px;
|
|
11
|
+
--mb-light-color-picker-gap: 14px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mb-light-color-picker {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
gap: var(--mb-light-color-picker-gap);
|
|
20
|
+
max-width: calc(var(--mb-light-color-picker-size) * 5 + var(--mb-light-color-picker-gap) * 4);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mb-light-color-picker-swatch {
|
|
24
|
+
position: relative;
|
|
25
|
+
flex: none;
|
|
26
|
+
width: var(--mb-light-color-picker-size);
|
|
27
|
+
height: var(--mb-light-color-picker-size);
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
border: 0;
|
|
31
|
+
border-radius: var(--mb-radius-full);
|
|
32
|
+
background: var(--mb-light-swatch);
|
|
33
|
+
/* A hairline keeps pale whites visible on a light sheet. */
|
|
34
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) light-dark(rgb(0 0 0 / 0.18), rgb(255 255 255 / 0.12));
|
|
35
|
+
cursor: default;
|
|
36
|
+
-webkit-tap-highlight-color: transparent;
|
|
37
|
+
transition: scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* The ring sits outside the swatch with a gap the size of the page behind it. */
|
|
41
|
+
.mb-light-color-picker-swatch::before {
|
|
42
|
+
content: "";
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: -5px;
|
|
45
|
+
border: 2.5px solid var(--mb-label);
|
|
46
|
+
border-radius: var(--mb-radius-full);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
scale: 0.85;
|
|
49
|
+
transition:
|
|
50
|
+
opacity var(--mb-duration-fast) var(--mb-ease-out),
|
|
51
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mb-light-color-picker-swatch[data-checked]::before {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
scale: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mb-light-color-picker-swatch:active {
|
|
60
|
+
scale: 0.92;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mb-light-color-picker-swatch:focus-visible {
|
|
64
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
65
|
+
outline-offset: 7px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mb-light-color-picker-swatch[data-disabled] {
|
|
69
|
+
opacity: 0.4;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (hover: hover) and (pointer: fine) {
|
|
73
|
+
.mb-light-color-picker-swatch:not([data-checked]):hover::before {
|
|
74
|
+
opacity: 0.35;
|
|
75
|
+
scale: 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@media (forced-colors: active) {
|
|
80
|
+
.mb-light-color-picker-swatch {
|
|
81
|
+
forced-color-adjust: none;
|
|
82
|
+
border: 1px solid CanvasText;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mb-light-color-picker-swatch::before {
|
|
86
|
+
border-color: Highlight;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* A Color Well at the end of the row takes the swatches' size. */
|
|
91
|
+
.mb-light-color-picker > :where(.mb-color-well) {
|
|
92
|
+
--mb-color-well-w: var(--mb-light-color-picker-size);
|
|
93
|
+
--mb-color-well-h: var(--mb-light-color-picker-size);
|
|
94
|
+
}
|