macbetter 0.1.0-beta.1 → 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/dist/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -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/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -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/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -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/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +8 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/index.css +19 -0
- package/dist/styles/components/inspector.css +236 -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 +2 -1
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from "./components/accessory-tile.js";
|
|
2
2
|
export * from "./components/activity-indicator.js";
|
|
3
3
|
export * from "./components/alert.js";
|
|
4
|
+
export * from "./components/artifact-card.js";
|
|
4
5
|
export * from "./components/artwork.js";
|
|
6
|
+
export * from "./components/attachment.js";
|
|
5
7
|
export * from "./components/automation-row.js";
|
|
6
8
|
export * from "./components/avatar.js";
|
|
7
9
|
export * from "./components/badge.js";
|
|
@@ -10,13 +12,18 @@ export * from "./components/calendar.js";
|
|
|
10
12
|
export * from "./components/camera-view.js";
|
|
11
13
|
export * from "./components/card.js";
|
|
12
14
|
export * from "./components/carousel.js";
|
|
15
|
+
export * from "./components/chat.js";
|
|
13
16
|
export * from "./components/checkbox.js";
|
|
17
|
+
export * from "./components/code-block.js";
|
|
14
18
|
export * from "./components/code-field.js";
|
|
15
19
|
export * from "./components/color-well.js";
|
|
16
20
|
export * from "./components/combo-box.js";
|
|
17
21
|
export * from "./components/command-palette.js";
|
|
22
|
+
export * from "./components/confirmation.js";
|
|
23
|
+
export * from "./components/content-unavailable.js";
|
|
18
24
|
export * from "./components/context-menu.js";
|
|
19
25
|
export * from "./components/date-picker.js";
|
|
26
|
+
export * from "./components/description-list.js";
|
|
20
27
|
export * from "./components/device-frame.js";
|
|
21
28
|
export * from "./components/dialog.js";
|
|
22
29
|
export * from "./components/disclosure.js";
|
|
@@ -25,11 +32,13 @@ export * from "./components/door-control.js";
|
|
|
25
32
|
export * from "./components/energy-readout.js";
|
|
26
33
|
export * from "./components/field.js";
|
|
27
34
|
export * from "./components/gauge.js";
|
|
35
|
+
export * from "./components/generated-image.js";
|
|
28
36
|
export * from "./components/glass.js";
|
|
29
37
|
export * from "./components/home-backdrop.js";
|
|
30
38
|
export * from "./components/home-section.js";
|
|
31
39
|
export * from "./components/home-status.js";
|
|
32
40
|
export * from "./components/hover-card.js";
|
|
41
|
+
export * from "./components/inspector.js";
|
|
33
42
|
export * from "./components/level-control.js";
|
|
34
43
|
export * from "./components/light-color-picker.js";
|
|
35
44
|
export * from "./components/list.js";
|
|
@@ -37,13 +46,19 @@ export * from "./components/listbox.js";
|
|
|
37
46
|
export * from "./components/lock-control.js";
|
|
38
47
|
export * from "./components/menu.js";
|
|
39
48
|
export * from "./components/menu-bar.js";
|
|
49
|
+
export * from "./components/message.js";
|
|
50
|
+
export * from "./components/model-picker.js";
|
|
40
51
|
export * from "./components/navigation-bar.js";
|
|
41
52
|
export * from "./components/outline.js";
|
|
42
53
|
export * from "./components/page-control.js";
|
|
54
|
+
export * from "./components/plan.js";
|
|
43
55
|
export * from "./components/popover.js";
|
|
44
56
|
export * from "./components/progress.js";
|
|
57
|
+
export * from "./components/prompt-input.js";
|
|
45
58
|
export * from "./components/radio.js";
|
|
46
59
|
export * from "./components/rating.js";
|
|
60
|
+
export * from "./components/reasoning.js";
|
|
61
|
+
export * from "./components/response.js";
|
|
47
62
|
export * from "./components/scene-tile.js";
|
|
48
63
|
export * from "./components/scroll-view.js";
|
|
49
64
|
export * from "./components/search-field.js";
|
|
@@ -54,11 +69,14 @@ export * from "./components/sensor-readout.js";
|
|
|
54
69
|
export * from "./components/separator.js";
|
|
55
70
|
export * from "./components/setup-code.js";
|
|
56
71
|
export * from "./components/sheet.js";
|
|
72
|
+
export * from "./components/shimmer.js";
|
|
57
73
|
export * from "./components/sidebar.js";
|
|
58
74
|
export * from "./components/slider.js";
|
|
75
|
+
export * from "./components/sources.js";
|
|
59
76
|
export * from "./components/split-view.js";
|
|
60
77
|
export * from "./components/squircle.js";
|
|
61
78
|
export * from "./components/stepper.js";
|
|
79
|
+
export * from "./components/suggestion.js";
|
|
62
80
|
export * from "./components/switch.js";
|
|
63
81
|
export * from "./components/tab-bar.js";
|
|
64
82
|
export * from "./components/table.js";
|
|
@@ -69,6 +87,7 @@ export * from "./components/thermostat-control.js";
|
|
|
69
87
|
export * from "./components/toast.js";
|
|
70
88
|
export * from "./components/toggle.js";
|
|
71
89
|
export * from "./components/token-field.js";
|
|
90
|
+
export * from "./components/tool-call.js";
|
|
72
91
|
export * from "./components/toolbar.js";
|
|
73
92
|
export * from "./components/tooltip.js";
|
|
74
93
|
export * from "./components/window.js";
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
export * from "./components/accessory-tile.js";
|
|
3
3
|
export * from "./components/activity-indicator.js";
|
|
4
4
|
export * from "./components/alert.js";
|
|
5
|
+
export * from "./components/artifact-card.js";
|
|
5
6
|
export * from "./components/artwork.js";
|
|
7
|
+
export * from "./components/attachment.js";
|
|
6
8
|
export * from "./components/automation-row.js";
|
|
7
9
|
export * from "./components/avatar.js";
|
|
8
10
|
export * from "./components/badge.js";
|
|
@@ -11,13 +13,18 @@ export * from "./components/calendar.js";
|
|
|
11
13
|
export * from "./components/camera-view.js";
|
|
12
14
|
export * from "./components/card.js";
|
|
13
15
|
export * from "./components/carousel.js";
|
|
16
|
+
export * from "./components/chat.js";
|
|
14
17
|
export * from "./components/checkbox.js";
|
|
18
|
+
export * from "./components/code-block.js";
|
|
15
19
|
export * from "./components/code-field.js";
|
|
16
20
|
export * from "./components/color-well.js";
|
|
17
21
|
export * from "./components/combo-box.js";
|
|
18
22
|
export * from "./components/command-palette.js";
|
|
23
|
+
export * from "./components/confirmation.js";
|
|
24
|
+
export * from "./components/content-unavailable.js";
|
|
19
25
|
export * from "./components/context-menu.js";
|
|
20
26
|
export * from "./components/date-picker.js";
|
|
27
|
+
export * from "./components/description-list.js";
|
|
21
28
|
export * from "./components/device-frame.js";
|
|
22
29
|
export * from "./components/dialog.js";
|
|
23
30
|
export * from "./components/disclosure.js";
|
|
@@ -26,11 +33,13 @@ export * from "./components/door-control.js";
|
|
|
26
33
|
export * from "./components/energy-readout.js";
|
|
27
34
|
export * from "./components/field.js";
|
|
28
35
|
export * from "./components/gauge.js";
|
|
36
|
+
export * from "./components/generated-image.js";
|
|
29
37
|
export * from "./components/glass.js";
|
|
30
38
|
export * from "./components/home-backdrop.js";
|
|
31
39
|
export * from "./components/home-section.js";
|
|
32
40
|
export * from "./components/home-status.js";
|
|
33
41
|
export * from "./components/hover-card.js";
|
|
42
|
+
export * from "./components/inspector.js";
|
|
34
43
|
export * from "./components/level-control.js";
|
|
35
44
|
export * from "./components/light-color-picker.js";
|
|
36
45
|
export * from "./components/list.js";
|
|
@@ -38,13 +47,19 @@ export * from "./components/listbox.js";
|
|
|
38
47
|
export * from "./components/lock-control.js";
|
|
39
48
|
export * from "./components/menu.js";
|
|
40
49
|
export * from "./components/menu-bar.js";
|
|
50
|
+
export * from "./components/message.js";
|
|
51
|
+
export * from "./components/model-picker.js";
|
|
41
52
|
export * from "./components/navigation-bar.js";
|
|
42
53
|
export * from "./components/outline.js";
|
|
43
54
|
export * from "./components/page-control.js";
|
|
55
|
+
export * from "./components/plan.js";
|
|
44
56
|
export * from "./components/popover.js";
|
|
45
57
|
export * from "./components/progress.js";
|
|
58
|
+
export * from "./components/prompt-input.js";
|
|
46
59
|
export * from "./components/radio.js";
|
|
47
60
|
export * from "./components/rating.js";
|
|
61
|
+
export * from "./components/reasoning.js";
|
|
62
|
+
export * from "./components/response.js";
|
|
48
63
|
export * from "./components/scene-tile.js";
|
|
49
64
|
export * from "./components/scroll-view.js";
|
|
50
65
|
export * from "./components/search-field.js";
|
|
@@ -55,11 +70,14 @@ export * from "./components/sensor-readout.js";
|
|
|
55
70
|
export * from "./components/separator.js";
|
|
56
71
|
export * from "./components/setup-code.js";
|
|
57
72
|
export * from "./components/sheet.js";
|
|
73
|
+
export * from "./components/shimmer.js";
|
|
58
74
|
export * from "./components/sidebar.js";
|
|
59
75
|
export * from "./components/slider.js";
|
|
76
|
+
export * from "./components/sources.js";
|
|
60
77
|
export * from "./components/split-view.js";
|
|
61
78
|
export * from "./components/squircle.js";
|
|
62
79
|
export * from "./components/stepper.js";
|
|
80
|
+
export * from "./components/suggestion.js";
|
|
63
81
|
export * from "./components/switch.js";
|
|
64
82
|
export * from "./components/tab-bar.js";
|
|
65
83
|
export * from "./components/table.js";
|
|
@@ -70,6 +88,7 @@ export * from "./components/thermostat-control.js";
|
|
|
70
88
|
export * from "./components/toast.js";
|
|
71
89
|
export * from "./components/toggle.js";
|
|
72
90
|
export * from "./components/token-field.js";
|
|
91
|
+
export * from "./components/tool-call.js";
|
|
73
92
|
export * from "./components/toolbar.js";
|
|
74
93
|
export * from "./components/tooltip.js";
|
|
75
94
|
export * from "./components/window.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type GlyphProps = React.ComponentProps<"svg">;
|
|
3
|
+
/** A small chevron that points to the inline end; the stylesheet turns it down when open. */
|
|
4
|
+
declare function DisclosureChevron(props: GlyphProps): React.JSX.Element;
|
|
5
|
+
declare function CheckGlyph(props: GlyphProps): React.JSX.Element;
|
|
6
|
+
declare function CrossGlyph(props: GlyphProps): React.JSX.Element;
|
|
7
|
+
declare function DashGlyph(props: GlyphProps): React.JSX.Element;
|
|
8
|
+
/** An exclamation mark; the stylesheet draws the filled circle behind it. */
|
|
9
|
+
declare function AlertGlyph(props: GlyphProps): React.JSX.Element;
|
|
10
|
+
export { AlertGlyph, CheckGlyph, CrossGlyph, DashGlyph, DisclosureChevron };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** A small chevron that points to the inline end; the stylesheet turns it down when open. */
|
|
3
|
+
function DisclosureChevron(props) {
|
|
4
|
+
return (_jsx("svg", { viewBox: "0 0 8 14", "aria-hidden": "true", focusable: "false", ...props, children: _jsx("path", { d: "M1.75 1.75 6.25 7l-4.5 5.25" }) }));
|
|
5
|
+
}
|
|
6
|
+
function CheckGlyph(props) {
|
|
7
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", ...props, children: _jsx("path", { d: "m4 8.4 2.7 2.7L12 5.4" }) }));
|
|
8
|
+
}
|
|
9
|
+
function CrossGlyph(props) {
|
|
10
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", ...props, children: _jsx("path", { d: "m5 5 6 6m0-6-6 6" }) }));
|
|
11
|
+
}
|
|
12
|
+
function DashGlyph(props) {
|
|
13
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", ...props, children: _jsx("path", { d: "M5 8h6" }) }));
|
|
14
|
+
}
|
|
15
|
+
/** An exclamation mark; the stylesheet draws the filled circle behind it. */
|
|
16
|
+
function AlertGlyph(props) {
|
|
17
|
+
return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", ...props, children: [_jsx("circle", { cx: "8", cy: "8", r: "7", "data-fill": "" }), _jsx("path", { d: "M8 4.6v4.1" }), _jsx("circle", { cx: "8", cy: "11.3", r: "0.55", "data-dot": "" })] }));
|
|
18
|
+
}
|
|
19
|
+
export { AlertGlyph, CheckGlyph, CrossGlyph, DashGlyph, DisclosureChevron };
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/* Artifact card — a row for a file or document the assistant made: an icon tile, a title, a meta line. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-artifact-card-max-width: 420px;
|
|
5
|
+
--mb-artifact-card-padding: 10px;
|
|
6
|
+
--mb-artifact-card-gap: 10px;
|
|
7
|
+
--mb-artifact-card-radius: var(--mb-radius-lg);
|
|
8
|
+
--mb-artifact-card-icon-size: 36px;
|
|
9
|
+
--mb-artifact-card-icon-radius: 8px;
|
|
10
|
+
--mb-artifact-card-glyph-size: 18px;
|
|
11
|
+
--mb-artifact-card-title-font: 500 13px/16px var(--mb-font);
|
|
12
|
+
--mb-artifact-card-meta-font: 400 11px/14px var(--mb-font);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
16
|
+
--mb-artifact-card-max-width: none;
|
|
17
|
+
--mb-artifact-card-padding: 12px;
|
|
18
|
+
--mb-artifact-card-gap: 12px;
|
|
19
|
+
--mb-artifact-card-radius: var(--mb-group-radius);
|
|
20
|
+
--mb-artifact-card-icon-size: 44px;
|
|
21
|
+
--mb-artifact-card-icon-radius: 10px;
|
|
22
|
+
--mb-artifact-card-glyph-size: 22px;
|
|
23
|
+
--mb-artifact-card-title-font: 600 15px/20px var(--mb-font);
|
|
24
|
+
--mb-artifact-card-meta-font: 400 13px/18px var(--mb-font);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mb-artifact-card {
|
|
28
|
+
--mb-artifact-card-bg: var(--mb-fill-quaternary);
|
|
29
|
+
|
|
30
|
+
position: relative;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
34
|
+
grid-template-rows: auto auto;
|
|
35
|
+
align-items: center;
|
|
36
|
+
column-gap: var(--mb-artifact-card-gap);
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: var(--mb-artifact-card-max-width);
|
|
39
|
+
min-width: 0;
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: var(--mb-artifact-card-padding);
|
|
42
|
+
padding-inline-end: calc(var(--mb-artifact-card-padding) + var(--mb-space-2));
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: var(--mb-artifact-card-radius);
|
|
45
|
+
background: var(--mb-artifact-card-bg);
|
|
46
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
|
|
47
|
+
color: var(--mb-label);
|
|
48
|
+
font: var(--mb-artifact-card-title-font);
|
|
49
|
+
letter-spacing: var(--mb-tracking-body);
|
|
50
|
+
text-align: start;
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
-webkit-tap-highlight-color: transparent;
|
|
53
|
+
transition: background-color var(--mb-duration-fast) var(--mb-ease-out);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@supports (corner-shape: squircle) {
|
|
57
|
+
.mb-artifact-card,
|
|
58
|
+
.mb-artifact-card-icon,
|
|
59
|
+
.mb-artifact-card-title[data-interactive]::after {
|
|
60
|
+
corner-shape: var(--mb-corner-shape);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mb-artifact-card {
|
|
64
|
+
border-radius: calc(var(--mb-artifact-card-radius) * var(--mb-corner-factor));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mb-artifact-card-icon {
|
|
68
|
+
border-radius: calc(var(--mb-artifact-card-icon-radius) * var(--mb-corner-factor));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:is(a, button).mb-artifact-card {
|
|
73
|
+
cursor: default;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ── Icon tile ───────────────────────────────────────────────── */
|
|
77
|
+
|
|
78
|
+
.mb-artifact-card-icon {
|
|
79
|
+
--mb-artifact-card-tint: var(--mb-accent);
|
|
80
|
+
|
|
81
|
+
position: relative;
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-row: 1 / span 2;
|
|
84
|
+
grid-column: 1;
|
|
85
|
+
place-items: center;
|
|
86
|
+
width: var(--mb-artifact-card-icon-size);
|
|
87
|
+
height: var(--mb-artifact-card-icon-size);
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
border-radius: var(--mb-artifact-card-icon-radius);
|
|
90
|
+
background: var(--mb-artifact-card-tint);
|
|
91
|
+
color: white;
|
|
92
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) rgb(0 0 0 / 0.08);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.mb-artifact-card-icon > * {
|
|
96
|
+
grid-area: 1 / 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.mb-artifact-card-glyph {
|
|
100
|
+
display: grid;
|
|
101
|
+
place-items: center;
|
|
102
|
+
place-self: stretch;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mb-artifact-card-glyph > svg {
|
|
106
|
+
width: var(--mb-artifact-card-glyph-size);
|
|
107
|
+
height: var(--mb-artifact-card-glyph-size);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mb-artifact-card-glyph > :where(img, .mb-artwork) {
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: 100%;
|
|
113
|
+
object-fit: cover;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Generating: the tile veils and a ring turns over it. */
|
|
117
|
+
.mb-artifact-card-progress {
|
|
118
|
+
display: grid;
|
|
119
|
+
place-self: stretch;
|
|
120
|
+
place-items: center;
|
|
121
|
+
background: color-mix(in oklch, var(--mb-bg) 55%, transparent);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mb-artifact-card-ring {
|
|
125
|
+
--mb-progress-track-color: var(--mb-fill);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mb-artifact-card[data-state="generating"] .mb-artifact-card-glyph {
|
|
129
|
+
opacity: 0.7;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Text ────────────────────────────────────────────────────── */
|
|
133
|
+
|
|
134
|
+
.mb-artifact-card-title {
|
|
135
|
+
grid-row: 1;
|
|
136
|
+
grid-column: 2;
|
|
137
|
+
align-self: end;
|
|
138
|
+
min-width: 0;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
color: var(--mb-label);
|
|
141
|
+
font: var(--mb-artifact-card-title-font);
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
text-overflow: ellipsis;
|
|
144
|
+
text-decoration: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mb-artifact-card-meta {
|
|
148
|
+
grid-row: 2;
|
|
149
|
+
grid-column: 2;
|
|
150
|
+
align-self: start;
|
|
151
|
+
min-width: 0;
|
|
152
|
+
margin-block-start: 1px;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
font: var(--mb-artifact-card-meta-font);
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
text-overflow: ellipsis;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mb-artifact-card:not(:has(> .mb-artifact-card-meta)) > .mb-artifact-card-title {
|
|
160
|
+
grid-row: 1 / span 2;
|
|
161
|
+
align-self: center;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* A title that's a link or button stretches its hit area over the whole card. */
|
|
165
|
+
:is(a, button).mb-artifact-card-title {
|
|
166
|
+
margin: 0;
|
|
167
|
+
padding: 0;
|
|
168
|
+
border: 0;
|
|
169
|
+
background: none;
|
|
170
|
+
text-align: start;
|
|
171
|
+
cursor: default;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:is(a, button).mb-artifact-card-title::after {
|
|
175
|
+
content: "";
|
|
176
|
+
position: absolute;
|
|
177
|
+
inset: 0;
|
|
178
|
+
border-radius: var(--mb-artifact-card-radius);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@supports (corner-shape: squircle) {
|
|
182
|
+
:is(a, button).mb-artifact-card-title::after {
|
|
183
|
+
border-radius: calc(var(--mb-artifact-card-radius) * var(--mb-corner-factor));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:is(a, button).mb-artifact-card-title:focus-visible {
|
|
188
|
+
outline: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:is(a, button).mb-artifact-card-title:focus-visible::after,
|
|
192
|
+
.mb-artifact-card[data-interactive]:focus-visible {
|
|
193
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
194
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* ── Actions ─────────────────────────────────────────────────── */
|
|
198
|
+
|
|
199
|
+
.mb-artifact-card-actions {
|
|
200
|
+
position: relative;
|
|
201
|
+
z-index: 1;
|
|
202
|
+
display: flex;
|
|
203
|
+
grid-row: 1 / span 2;
|
|
204
|
+
grid-column: 3;
|
|
205
|
+
align-items: center;
|
|
206
|
+
gap: var(--mb-space-1);
|
|
207
|
+
margin-inline-end: calc(var(--mb-space-2) * -1);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Quieter than the title: the card's own action is opening it. */
|
|
211
|
+
.mb-artifact-card-actions > .mb-artifact-card-action[data-variant] {
|
|
212
|
+
--mb-button-fg: var(--mb-label-secondary);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* ── States ──────────────────────────────────────────────────── */
|
|
216
|
+
|
|
217
|
+
@media (hover: hover) and (pointer: fine) {
|
|
218
|
+
.mb-artifact-card[data-interactive]:hover,
|
|
219
|
+
.mb-artifact-card:has(> :is(a, button).mb-artifact-card-title:hover) {
|
|
220
|
+
--mb-artifact-card-bg: var(--mb-fill-tertiary);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mb-artifact-card-actions > .mb-artifact-card-action[data-variant]:hover {
|
|
224
|
+
--mb-button-fg: var(--mb-label);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.mb-artifact-card[data-interactive]:active,
|
|
229
|
+
.mb-artifact-card:has(> :is(a, button).mb-artifact-card-title:active) {
|
|
230
|
+
--mb-artifact-card-bg: var(--mb-fill-secondary);
|
|
231
|
+
transition-duration: 0ms;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@media (forced-colors: active) {
|
|
235
|
+
.mb-artifact-card {
|
|
236
|
+
border: 1px solid CanvasText;
|
|
237
|
+
}
|
|
238
|
+
}
|