@ciridae/ui 2.78.1 → 2.79.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/dist/components/locale.d.ts +2 -0
- package/dist/components/locale.js +2 -0
- package/dist/components/profile-dialog.js +159 -6
- package/dist/feedback/contract.d.ts +1 -0
- package/dist/feedback/generated/types.gen.d.ts +1 -1
- package/dist/feedback/generated/zod.gen.d.ts +2 -0
- package/dist/feedback/generated/zod.gen.js +1 -0
- package/dist/preset.js +2 -0
- package/dist/styled-system/styles.css +26 -13
- package/dist/styled-system/tokens/index.mjs +4 -0
- package/dist/styled-system/tokens/tokens.d.ts +1 -1
- package/package.json +1 -1
|
@@ -159,6 +159,8 @@ export const englishLabels = {
|
|
|
159
159
|
name: "Name",
|
|
160
160
|
saveName: "Save name",
|
|
161
161
|
changePicture: "Change picture",
|
|
162
|
+
zoom: "Zoom",
|
|
163
|
+
savePicture: "Save picture",
|
|
162
164
|
nameFailed: "Name was not saved.",
|
|
163
165
|
pictureFailed: "Picture was not saved.",
|
|
164
166
|
},
|
|
@@ -1,43 +1,196 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
2
3
|
import { PlusIcon } from "@phosphor-icons/react";
|
|
3
4
|
import { useMutation } from "@tanstack/react-query";
|
|
4
5
|
import { useRef, useState } from "react";
|
|
6
|
+
import { css } from "#primitives/css";
|
|
5
7
|
import { Button, IconButton } from "./button.js";
|
|
6
8
|
import { Avatar } from "./data-display.js";
|
|
7
9
|
import { Field, FieldError, FieldLabel, Form } from "./form-layout.js";
|
|
8
10
|
import { icon, Spinner } from "./icon.js";
|
|
9
11
|
import { Input } from "./input.js";
|
|
10
|
-
import { Cluster } from "./layout.js";
|
|
12
|
+
import { Cluster, Stack } from "./layout.js";
|
|
11
13
|
import { useCiridaeLocale } from "./locale.js";
|
|
12
14
|
import { Dialog } from "./overlays.js";
|
|
13
15
|
import { errorMessage, reportedInlineMeta } from "./request-failure.js";
|
|
14
16
|
/*
|
|
15
17
|
* Edits the signed-in person's name and picture. The app saves them, so this works with any
|
|
16
18
|
* session; pass `trigger`, or `open` and `onOpenChange`. Each save settles on its own and the
|
|
17
|
-
* dialog stays open, so a new picture shows beside the name still being edited.
|
|
19
|
+
* dialog stays open, so a new picture shows beside the name still being edited. A new picture
|
|
20
|
+
* is framed first, then saved as a square of at most `SAVED_PICTURE_SIZE` pixels.
|
|
18
21
|
*/
|
|
19
22
|
const PICTURE_TYPES = "image/png,image/jpeg,image/webp";
|
|
20
23
|
const MAX_NAME_LENGTH = 256;
|
|
24
|
+
const SAVED_PICTURE_SIZE = 512;
|
|
25
|
+
const MAX_ZOOM = 4;
|
|
26
|
+
// How far an arrow key moves the picture, as a share of the circle.
|
|
27
|
+
const ARROW_KEY_STEP = 0.05;
|
|
21
28
|
export function ProfileDialog({ name, email, pictureUrl, gradientSeed, onSaveName, onSavePicture, onOpenChange, ...dialogProps }) {
|
|
22
29
|
const { labels: allLabels } = useCiridaeLocale();
|
|
23
30
|
const labels = allLabels.profileDialog;
|
|
24
31
|
const pictureInput = useRef(null);
|
|
25
32
|
const [draft, setDraft] = useState(name ?? "");
|
|
33
|
+
const [pickedPictureUrl, setPickedPictureUrl] = useState(null);
|
|
26
34
|
const trimmedDraft = draft.trim();
|
|
27
35
|
const rename = useMutation({ mutationFn: onSaveName, meta: reportedInlineMeta });
|
|
28
|
-
const picture = useMutation({
|
|
36
|
+
const picture = useMutation({
|
|
37
|
+
mutationFn: (square) => readCanvasAsFile(square).then(onSavePicture),
|
|
38
|
+
meta: reportedInlineMeta,
|
|
39
|
+
});
|
|
40
|
+
const dropPickedPicture = () => {
|
|
41
|
+
if (pickedPictureUrl)
|
|
42
|
+
URL.revokeObjectURL(pickedPictureUrl);
|
|
43
|
+
setPickedPictureUrl(null);
|
|
44
|
+
};
|
|
29
45
|
return (_jsxs(Dialog, { ...dialogProps, kind: "info", onOpenChange: (open, details) => {
|
|
30
46
|
setDraft(name ?? "");
|
|
47
|
+
dropPickedPicture();
|
|
31
48
|
rename.reset();
|
|
32
49
|
picture.reset();
|
|
33
50
|
onOpenChange?.(open, details);
|
|
34
|
-
}, pending: rename.isPending || picture.isPending, title: labels.title, children: [
|
|
51
|
+
}, pending: rename.isPending || picture.isPending, title: labels.title, children: [pickedPictureUrl ? (_jsx(PictureFrame, { onCancel: dropPickedPicture, onSave: (square) => {
|
|
52
|
+
dropPickedPicture();
|
|
53
|
+
picture.mutate(square);
|
|
54
|
+
}, src: pickedPictureUrl })) : (_jsx(Avatar, { badge: _jsx(IconButton, { "aria-busy": picture.isPending || undefined, "aria-label": labels.changePicture, disabled: picture.isPending, onClick: () => pictureInput.current?.click(), size: "compact", variant: "primary", children: picture.isPending ? (_jsx(Spinner, { "aria-hidden": "true" })) : (_jsx(PlusIcon, { className: icon({ size: "small" }) })) }), gradientSeed: gradientSeed, label: name ?? email ?? "", size: "large", src: pictureUrl })), _jsx("input", { accept: PICTURE_TYPES, hidden: true, onChange: (event) => {
|
|
35
55
|
const file = event.target.files?.[0];
|
|
36
56
|
event.target.value = "";
|
|
37
|
-
if (file)
|
|
38
|
-
picture.
|
|
57
|
+
if (file) {
|
|
58
|
+
picture.reset();
|
|
59
|
+
setPickedPictureUrl(URL.createObjectURL(file));
|
|
60
|
+
}
|
|
39
61
|
}, ref: pictureInput, type: "file" }), picture.error ? (_jsx(FieldError, { children: errorMessage(picture.error, labels.pictureFailed) })) : null, _jsxs(Form, { onSubmit: (event) => {
|
|
40
62
|
event.preventDefault();
|
|
41
63
|
rename.mutate(trimmedDraft);
|
|
42
64
|
}, children: [_jsxs(Field, { children: [_jsx(FieldLabel, { children: labels.name }), _jsx(Input, { autoComplete: "name", maxLength: MAX_NAME_LENGTH, onChange: (event) => setDraft(event.target.value), value: draft })] }), rename.error ? (_jsx(FieldError, { children: errorMessage(rename.error, labels.nameFailed) })) : null, _jsx(Cluster, { children: _jsx(Button, { disabled: !trimmedDraft || trimmedDraft === name, loading: rename.isPending, type: "submit", children: labels.saveName }) })] })] }));
|
|
43
65
|
}
|
|
66
|
+
const frame = css({
|
|
67
|
+
position: "relative",
|
|
68
|
+
width: "avatar.crop",
|
|
69
|
+
height: "avatar.crop",
|
|
70
|
+
borderRadius: "round",
|
|
71
|
+
overflow: "hidden",
|
|
72
|
+
background: "bg.avatar",
|
|
73
|
+
cursor: "grab",
|
|
74
|
+
touchAction: "none",
|
|
75
|
+
userSelect: "none",
|
|
76
|
+
_active: { cursor: "grabbing" },
|
|
77
|
+
_focusVisible: { focusRing: "outer" },
|
|
78
|
+
});
|
|
79
|
+
const framedImage = css({
|
|
80
|
+
position: "absolute",
|
|
81
|
+
maxWidth: "[none]",
|
|
82
|
+
pointerEvents: "none",
|
|
83
|
+
});
|
|
84
|
+
const zoomSlider = css({ width: "avatar.crop" });
|
|
85
|
+
const zoomControl = css({
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
height: "control.knob",
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
});
|
|
91
|
+
const zoomTrack = css({
|
|
92
|
+
width: "full",
|
|
93
|
+
height: "progress.track",
|
|
94
|
+
borderRadius: "pill",
|
|
95
|
+
background: "border.control",
|
|
96
|
+
});
|
|
97
|
+
const zoomIndicator = css({ borderRadius: "pill", background: "fg.primary" });
|
|
98
|
+
const zoomThumb = css({
|
|
99
|
+
width: "control.knob",
|
|
100
|
+
height: "control.knob",
|
|
101
|
+
borderRadius: "round",
|
|
102
|
+
background: "fg.primary",
|
|
103
|
+
"&:has(:focus-visible)": { focusRing: "outer" },
|
|
104
|
+
});
|
|
105
|
+
/*
|
|
106
|
+
* Frames a picked picture in the avatar's circle: drag or use the arrow keys to move it, and the
|
|
107
|
+
* slider to zoom. The circle always stays covered, so the saved square has no empty edge.
|
|
108
|
+
*/
|
|
109
|
+
function PictureFrame({ src, onCancel, onSave, }) {
|
|
110
|
+
const { labels } = useCiridaeLocale();
|
|
111
|
+
const frameRef = useRef(null);
|
|
112
|
+
const imageRef = useRef(null);
|
|
113
|
+
const dragFrom = useRef(null);
|
|
114
|
+
const [natural, setNatural] = useState(null);
|
|
115
|
+
const [zoom, setZoom] = useState(1);
|
|
116
|
+
// The picture's point at the circle's center, in its own pixels.
|
|
117
|
+
const [center, setCenter] = useState({ x: 0, y: 0 });
|
|
118
|
+
const side = natural ? Math.min(natural.width, natural.height) / zoom : 0;
|
|
119
|
+
const clamp = (point, nextSide = side) => natural
|
|
120
|
+
? {
|
|
121
|
+
x: Math.min(Math.max(point.x, nextSide / 2), natural.width - nextSide / 2),
|
|
122
|
+
y: Math.min(Math.max(point.y, nextSide / 2), natural.height - nextSide / 2),
|
|
123
|
+
}
|
|
124
|
+
: point;
|
|
125
|
+
// Moves the picture by a distance in screen pixels.
|
|
126
|
+
const moveBy = (dx, dy) => {
|
|
127
|
+
const frameWidth = frameRef.current?.clientWidth;
|
|
128
|
+
if (!frameWidth)
|
|
129
|
+
return;
|
|
130
|
+
const scale = side / frameWidth;
|
|
131
|
+
setCenter((current) => clamp({ x: current.x - dx * scale, y: current.y - dy * scale }));
|
|
132
|
+
};
|
|
133
|
+
const onPointerMove = (event) => {
|
|
134
|
+
if (!dragFrom.current)
|
|
135
|
+
return;
|
|
136
|
+
moveBy(event.clientX - dragFrom.current.x, event.clientY - dragFrom.current.y);
|
|
137
|
+
dragFrom.current = { x: event.clientX, y: event.clientY };
|
|
138
|
+
};
|
|
139
|
+
const onKeyDown = (event) => {
|
|
140
|
+
const step = (frameRef.current?.clientWidth ?? 0) * ARROW_KEY_STEP;
|
|
141
|
+
const moves = {
|
|
142
|
+
ArrowLeft: { x: step, y: 0 },
|
|
143
|
+
ArrowRight: { x: -step, y: 0 },
|
|
144
|
+
ArrowUp: { x: 0, y: step },
|
|
145
|
+
ArrowDown: { x: 0, y: -step },
|
|
146
|
+
};
|
|
147
|
+
const move = moves[event.key];
|
|
148
|
+
if (!move)
|
|
149
|
+
return;
|
|
150
|
+
event.preventDefault();
|
|
151
|
+
moveBy(move.x, move.y);
|
|
152
|
+
};
|
|
153
|
+
const save = () => {
|
|
154
|
+
const image = imageRef.current;
|
|
155
|
+
if (!image || !natural)
|
|
156
|
+
return;
|
|
157
|
+
const square = document.createElement("canvas");
|
|
158
|
+
square.width = square.height = Math.min(SAVED_PICTURE_SIZE, Math.round(side));
|
|
159
|
+
square
|
|
160
|
+
.getContext("2d")
|
|
161
|
+
?.drawImage(image, center.x - side / 2, center.y - side / 2, side, side, 0, 0, square.width, square.height);
|
|
162
|
+
onSave(square);
|
|
163
|
+
};
|
|
164
|
+
// The picture's placement, as shares of the circle, so it scales with the frame.
|
|
165
|
+
const placement = natural
|
|
166
|
+
? {
|
|
167
|
+
width: `${(natural.width / side) * 100}%`,
|
|
168
|
+
height: `${(natural.height / side) * 100}%`,
|
|
169
|
+
left: `${(0.5 - center.x / side) * 100}%`,
|
|
170
|
+
top: `${(0.5 - center.y / side) * 100}%`,
|
|
171
|
+
}
|
|
172
|
+
: { visibility: "hidden" };
|
|
173
|
+
return (_jsxs(Stack, { align: "center", children: [_jsx("div", { className: frame, onKeyDown: onKeyDown, onPointerCancel: () => (dragFrom.current = null), onPointerDown: (event) => {
|
|
174
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
175
|
+
dragFrom.current = { x: event.clientX, y: event.clientY };
|
|
176
|
+
}, onPointerMove: onPointerMove, onPointerUp: () => (dragFrom.current = null), ref: frameRef, tabIndex: 0, children: _jsx("img", { alt: "", className: framedImage, draggable: false, onLoad: (event) => {
|
|
177
|
+
const { naturalWidth: width, naturalHeight: height } = event.currentTarget;
|
|
178
|
+
setNatural({ width, height });
|
|
179
|
+
setCenter({ x: width / 2, y: height / 2 });
|
|
180
|
+
}, ref: imageRef, src: src, style: placement }) }), _jsx(Slider.Root, { "aria-label": labels.profileDialog.zoom, className: zoomSlider, max: MAX_ZOOM, min: 1, onValueChange: (value) => {
|
|
181
|
+
const nextZoom = typeof value === "number" ? value : (value[0] ?? 1);
|
|
182
|
+
setZoom(nextZoom);
|
|
183
|
+
if (natural) {
|
|
184
|
+
setCenter((current) => clamp(current, Math.min(natural.width, natural.height) / nextZoom));
|
|
185
|
+
}
|
|
186
|
+
}, step: 0.05, value: zoom, children: _jsx(Slider.Control, { className: zoomControl, children: _jsxs(Slider.Track, { className: zoomTrack, children: [_jsx(Slider.Indicator, { className: zoomIndicator }), _jsx(Slider.Thumb, { className: zoomThumb })] }) }) }), _jsxs(Cluster, { children: [_jsx(Button, { onClick: onCancel, variant: "ghost", children: labels.common.cancel }), _jsx(Button, { disabled: !natural, onClick: save, children: labels.profileDialog.savePicture })] })] }));
|
|
187
|
+
}
|
|
188
|
+
// WebP where the browser can encode it; a browser that cannot hands back PNG instead.
|
|
189
|
+
function readCanvasAsFile(canvas) {
|
|
190
|
+
return new Promise((resolve, reject) => canvas.toBlob((blob) => {
|
|
191
|
+
if (!blob)
|
|
192
|
+
return reject(new Error("The picture could not be encoded."));
|
|
193
|
+
const extension = blob.type === "image/webp" ? "webp" : "png";
|
|
194
|
+
resolve(new File([blob], `picture.${extension}`, { type: blob.type }));
|
|
195
|
+
}, "image/webp", 0.9));
|
|
196
|
+
}
|
|
@@ -6,6 +6,7 @@ declare const feedbackErrorResponseSchema: z.ZodObject<{
|
|
|
6
6
|
feedback_access_denied: "feedback_access_denied";
|
|
7
7
|
feedback_auth_unavailable: "feedback_auth_unavailable";
|
|
8
8
|
feedback_invalid_token: "feedback_invalid_token";
|
|
9
|
+
feedback_label_creation_refused: "feedback_label_creation_refused";
|
|
9
10
|
feedback_not_editable: "feedback_not_editable";
|
|
10
11
|
feedback_not_found: "feedback_not_found";
|
|
11
12
|
feedback_not_replyable: "feedback_not_replyable";
|
|
@@ -371,7 +371,7 @@ export type FeedbackErrorDetail = {
|
|
|
371
371
|
/**
|
|
372
372
|
* Code
|
|
373
373
|
*/
|
|
374
|
-
code: 'feedback_access_denied' | 'feedback_auth_unavailable' | 'feedback_invalid_token' | 'feedback_not_editable' | 'feedback_not_found' | 'feedback_not_replyable' | 'feedback_scope_not_found' | 'feedback_unavailable';
|
|
374
|
+
code: 'feedback_access_denied' | 'feedback_auth_unavailable' | 'feedback_invalid_token' | 'feedback_label_creation_refused' | 'feedback_not_editable' | 'feedback_not_found' | 'feedback_not_replyable' | 'feedback_scope_not_found' | 'feedback_unavailable';
|
|
375
375
|
/**
|
|
376
376
|
* Detail
|
|
377
377
|
*/
|
|
@@ -109,6 +109,7 @@ export declare const zFeedbackErrorDetail: z.ZodObject<{
|
|
|
109
109
|
feedback_access_denied: "feedback_access_denied";
|
|
110
110
|
feedback_auth_unavailable: "feedback_auth_unavailable";
|
|
111
111
|
feedback_invalid_token: "feedback_invalid_token";
|
|
112
|
+
feedback_label_creation_refused: "feedback_label_creation_refused";
|
|
112
113
|
feedback_not_editable: "feedback_not_editable";
|
|
113
114
|
feedback_not_found: "feedback_not_found";
|
|
114
115
|
feedback_not_replyable: "feedback_not_replyable";
|
|
@@ -128,6 +129,7 @@ export declare const zFeedbackErrorResponse: z.ZodObject<{
|
|
|
128
129
|
feedback_access_denied: "feedback_access_denied";
|
|
129
130
|
feedback_auth_unavailable: "feedback_auth_unavailable";
|
|
130
131
|
feedback_invalid_token: "feedback_invalid_token";
|
|
132
|
+
feedback_label_creation_refused: "feedback_label_creation_refused";
|
|
131
133
|
feedback_not_editable: "feedback_not_editable";
|
|
132
134
|
feedback_not_found: "feedback_not_found";
|
|
133
135
|
feedback_not_replyable: "feedback_not_replyable";
|
|
@@ -107,6 +107,7 @@ export const zFeedbackErrorDetail = z.object({
|
|
|
107
107
|
'feedback_access_denied',
|
|
108
108
|
'feedback_auth_unavailable',
|
|
109
109
|
'feedback_invalid_token',
|
|
110
|
+
'feedback_label_creation_refused',
|
|
110
111
|
'feedback_not_editable',
|
|
111
112
|
'feedback_not_found',
|
|
112
113
|
'feedback_not_replyable',
|
package/dist/preset.js
CHANGED
|
@@ -311,6 +311,8 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
311
311
|
"avatar.large": { value: "44px" },
|
|
312
312
|
// A chat's face at the head of its info panel.
|
|
313
313
|
"avatar.info": { value: "72px" },
|
|
314
|
+
// The circle a new picture is framed in before it is saved.
|
|
315
|
+
"avatar.crop": { value: "240px" },
|
|
314
316
|
// A mark set inline beside a name -- an icon, a provider logo, a project tile -- so
|
|
315
317
|
// every kind lines up in one column and indents can count on its width.
|
|
316
318
|
"mark.inline": { value: "{fontSizes.icon.small}" },
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
--sizes-avatar\.author: 28px;
|
|
157
157
|
--sizes-avatar\.large: 44px;
|
|
158
158
|
--sizes-avatar\.info: 72px;
|
|
159
|
+
--sizes-avatar\.crop: 240px;
|
|
159
160
|
--sizes-mark\.inline: var(--font-sizes-icon\.small);
|
|
160
161
|
--sizes-progress\.track: 6px;
|
|
161
162
|
--sizes-progress\.segment: 3px;
|
|
@@ -1458,6 +1459,10 @@
|
|
|
1458
1459
|
background: var(--gradients-panel);
|
|
1459
1460
|
}
|
|
1460
1461
|
|
|
1462
|
+
.bg_bg\.avatar {
|
|
1463
|
+
background: var(--colors-bg\.avatar);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1461
1466
|
.bg_border\.control {
|
|
1462
1467
|
background: var(--colors-border\.control);
|
|
1463
1468
|
}
|
|
@@ -1526,10 +1531,6 @@
|
|
|
1526
1531
|
animation: livePulse 2s ease-in-out infinite;
|
|
1527
1532
|
}
|
|
1528
1533
|
|
|
1529
|
-
.bg_bg\.avatar {
|
|
1530
|
-
background: var(--colors-bg\.avatar);
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
1534
|
.bg_bg\.track {
|
|
1534
1535
|
background: var(--colors-bg\.track);
|
|
1535
1536
|
}
|
|
@@ -4499,10 +4500,30 @@
|
|
|
4499
4500
|
padding-bottom: var(--spacing-panel\.hairline);
|
|
4500
4501
|
}
|
|
4501
4502
|
|
|
4503
|
+
.w_avatar\.crop {
|
|
4504
|
+
width: var(--sizes-avatar\.crop);
|
|
4505
|
+
}
|
|
4506
|
+
|
|
4507
|
+
.h_avatar\.crop {
|
|
4508
|
+
height: var(--sizes-avatar\.crop);
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
.max-w_\[none\] {
|
|
4512
|
+
max-width: none;
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
.h_control\.knob {
|
|
4516
|
+
height: var(--sizes-control\.knob);
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4502
4519
|
.h_progress\.track {
|
|
4503
4520
|
height: var(--sizes-progress\.track);
|
|
4504
4521
|
}
|
|
4505
4522
|
|
|
4523
|
+
.w_control\.knob {
|
|
4524
|
+
width: var(--sizes-control\.knob);
|
|
4525
|
+
}
|
|
4526
|
+
|
|
4506
4527
|
.mt_\[calc\(\(1em_-_token\(sizes\.control\.radio\)\)_\/_2\)\] {
|
|
4507
4528
|
margin-top: calc((1em - var(--sizes-control\.radio)) / 2);
|
|
4508
4529
|
}
|
|
@@ -4615,14 +4636,6 @@
|
|
|
4615
4636
|
height: var(--sizes-avatar\.micro);
|
|
4616
4637
|
}
|
|
4617
4638
|
|
|
4618
|
-
.w_control\.knob {
|
|
4619
|
-
width: var(--sizes-control\.knob);
|
|
4620
|
-
}
|
|
4621
|
-
|
|
4622
|
-
.h_control\.knob {
|
|
4623
|
-
height: var(--sizes-control\.knob);
|
|
4624
|
-
}
|
|
4625
|
-
|
|
4626
4639
|
.w_\[calc\(var\(--step-dot-size\)_\*_0\.4375\)\] {
|
|
4627
4640
|
width: calc(var(--step-dot-size) * 0.4375);
|
|
4628
4641
|
}
|
|
@@ -11790,7 +11803,7 @@
|
|
|
11790
11803
|
translate: none;
|
|
11791
11804
|
}
|
|
11792
11805
|
|
|
11793
|
-
.\[\&\:active\]\:cursor_grabbing:active {
|
|
11806
|
+
.\[\&\:active\]\:cursor_grabbing:active,.active\:cursor_grabbing:is(:active, [data-active]) {
|
|
11794
11807
|
cursor: grabbing;
|
|
11795
11808
|
}
|
|
11796
11809
|
|
|
@@ -371,6 +371,10 @@ const tokens = {
|
|
|
371
371
|
"value": "72px",
|
|
372
372
|
"variable": "var(--sizes-avatar\\.info)"
|
|
373
373
|
},
|
|
374
|
+
"sizes.avatar.crop": {
|
|
375
|
+
"value": "240px",
|
|
376
|
+
"variable": "var(--sizes-avatar\\.crop)"
|
|
377
|
+
},
|
|
374
378
|
"sizes.mark.inline": {
|
|
375
379
|
"value": "var(--font-sizes-icon\\.small)",
|
|
376
380
|
"variable": "var(--sizes-mark\\.inline)"
|
|
@@ -7,7 +7,7 @@ export type ColorToken = "transparent" | "currentColor" | "bg.canvas" | "bg.pane
|
|
|
7
7
|
|
|
8
8
|
export type SpacingToken = "none" | "control.trackInset" | "focus.ringWidth" | "focus.ringOffset" | "focus.ringReach" | "control.iconGap" | "control.block" | "control.inline" | "control.compactBlock" | "control.compactInline" | "control.largeInline" | "control.iconInline" | "search.inline" | "field.block" | "gap.4" | "gap.6" | "gap.8" | "gap.12" | "gap.16" | "gap.20" | "gap.24" | "layout.tightGap" | "chat.messageGroupGap" | "chat.messageRunGap" | "chatIcon.ringGap" | "sidebar.groupGap" | "sidebar.footerGap" | "sidebar.inline" | "sidebar.block" | "control.tabInline" | "layout.controlGap" | "layout.contentGap" | "layout.clusterGap" | "layout.pageGap" | "layout.bannerInset" | "layout.projectListOffset" | "layout.sectionGap" | "layout.centeredCardGap" | "log.columnGap" | "log.detailIndent" | "log.detailIndentCompact" | "log.rowBlock" | "log.entryBlock" | "log.entryInline" | "log.entryCompactBlock" | "log.entryPanelBlock" | "log.entryPanelInline" | "menu.inset" | "menu.itemInline" | "sidebar.markGap" | "panel.hairline" | "panel.compact" | "panel.default" | "panel.comfortable" | "panelHeader.describedBottom" | "listRow.dividedBlock" | "panel.roomy" | "panel.card" | "tile.block" | "tile.inline" | "skeleton.tileGap" | "emptyState.pageBlock" | "emptyState.compactBlock" | "stage.connectorGap" | "list.numberGap" | "meter.rowGap" | "page.inline" | "shell.leading" | "table.cell" | "table.compactRowBlock" | "-none" | "-control.trackInset" | "-focus.ringWidth" | "-focus.ringOffset" | "-focus.ringReach" | "-control.iconGap" | "-control.block" | "-control.inline" | "-control.compactBlock" | "-control.compactInline" | "-control.largeInline" | "-control.iconInline" | "-search.inline" | "-field.block" | "-gap.4" | "-gap.6" | "-gap.8" | "-gap.12" | "-gap.16" | "-gap.20" | "-gap.24" | "-layout.tightGap" | "-chat.messageGroupGap" | "-chat.messageRunGap" | "-chatIcon.ringGap" | "-sidebar.groupGap" | "-sidebar.footerGap" | "-sidebar.inline" | "-sidebar.block" | "-control.tabInline" | "-layout.controlGap" | "-layout.contentGap" | "-layout.clusterGap" | "-layout.pageGap" | "-layout.bannerInset" | "-layout.projectListOffset" | "-layout.sectionGap" | "-layout.centeredCardGap" | "-log.columnGap" | "-log.detailIndent" | "-log.detailIndentCompact" | "-log.rowBlock" | "-log.entryBlock" | "-log.entryInline" | "-log.entryCompactBlock" | "-log.entryPanelBlock" | "-log.entryPanelInline" | "-menu.inset" | "-menu.itemInline" | "-sidebar.markGap" | "-panel.hairline" | "-panel.compact" | "-panel.default" | "-panel.comfortable" | "-panelHeader.describedBottom" | "-listRow.dividedBlock" | "-panel.roomy" | "-panel.card" | "-tile.block" | "-tile.inline" | "-skeleton.tileGap" | "-emptyState.pageBlock" | "-emptyState.compactBlock" | "-stage.connectorGap" | "-list.numberGap" | "-meter.rowGap" | "-page.inline" | "-shell.leading" | "-table.cell" | "-table.compactRowBlock"
|
|
9
9
|
|
|
10
|
-
export type SizeToken = "0" | "full" | "border.hairline" | "indicator.dot" | "indicator.live" | "indicator.badge" | "indicator.count" | "log.caretColumn" | "log.minimum" | "log.timeColumn" | "log.rawMaximum" | "widget.header" | "avatar.welcome" | "avatar.micro" | "avatar.small" | "avatar.menu" | "avatar.agent" | "avatar.row" | "avatar.author" | "avatar.large" | "avatar.info" | "mark.inline" | "progress.track" | "progress.segment" | "indicator.swatch" | "menu.item" | "code.maximum" | "brand.logo" | "indicator.radio" | "skeleton.line" | "skeleton.bar" | "skeleton.badge" | "skeleton.caption" | "skeleton.short" | "skeleton.pill" | "skeleton.textLine" | "tile.minimum" | "skeleton.card" | "skeleton.cardBody" | "skeleton.medium" | "skeleton.long" | "chart.small" | "chart.medium" | "chart.large" | "control.mark" | "file.chipName" | "file.mark" | "control.checkbox" | "control.radio" | "control.knob" | "control.toggleTrack" | "control.clear" | "control.chip" | "control.wordKeycap" | "control.send" | "control.small" | "control.restingTab" | "control.row" | "control.round" | "control.roundRail" | "control.roundSmall" | "control.sidebarSearch" | "list.number" | "tile.icon" | "partsRollup.height" | "sparkline.width" | "sparkline.height" | "sparkline.plotWidth" | "sparkline.plotHeight" | "control.shortcut" | "control.compact" | "control.default" | "control.search" | "control.searchField" | "workspace.mark" | "workspace.avatar" | "control.field" | "sidebar.projectAction" | "sidebar.railRule" | "sidebar.shortRow" | "chat.footer" | "shell.header" | "shell.collapsed" | "table.scroll" | "table.headRow" | "field.textarea" | "field.inline" | "chat.input" | "chat.inputMobile" | "chat.composerMinimum" | "overlay.menu" | "overlay.menuList" | "overlay.helpMenu" | "overlay.tray" | "overlay.trayList" | "overlay.tooltip" | "overlay.popoverNarrow" | "overlay.popover" | "overlay.popoverWide" | "search.dropdownPreview" | "emptyState.minimum" | "search.regularPreview" | "search.sidebarPreview" | "search.toolbar" | "shell.sidebar" | "overlay.dialog" | "overlay.palette" | "commandPalette.query" | "commandPalette.row" | "commandPalette.footer" | "overlay.dialogWide" | "overlay.sheet" | "valueChange.label" | "sheet.footerNote" | "overlay.sheetNarrow" | "overlay.sheetDocked" | "toast.width" | "toast.progressWidth" | "toast.progressHeight" | "chat.bubble" | "chat.messageBubble" | "chat.voiceBubble" | "chat.quoteEdge" | "chat.listColumn" | "chat.listSheet" | "chat.attachment" | "chat.imageBubbleMaxWidth" | "chat.imageBubbleMaxHeight" | "settings.column" | "card.centered" | "scroll.bar" | "card.centeredWide" | "card.centeredForm" | "steps.image" | "checklist.maximum" | "page.maximum"
|
|
10
|
+
export type SizeToken = "0" | "full" | "border.hairline" | "indicator.dot" | "indicator.live" | "indicator.badge" | "indicator.count" | "log.caretColumn" | "log.minimum" | "log.timeColumn" | "log.rawMaximum" | "widget.header" | "avatar.welcome" | "avatar.micro" | "avatar.small" | "avatar.menu" | "avatar.agent" | "avatar.row" | "avatar.author" | "avatar.large" | "avatar.info" | "avatar.crop" | "mark.inline" | "progress.track" | "progress.segment" | "indicator.swatch" | "menu.item" | "code.maximum" | "brand.logo" | "indicator.radio" | "skeleton.line" | "skeleton.bar" | "skeleton.badge" | "skeleton.caption" | "skeleton.short" | "skeleton.pill" | "skeleton.textLine" | "tile.minimum" | "skeleton.card" | "skeleton.cardBody" | "skeleton.medium" | "skeleton.long" | "chart.small" | "chart.medium" | "chart.large" | "control.mark" | "file.chipName" | "file.mark" | "control.checkbox" | "control.radio" | "control.knob" | "control.toggleTrack" | "control.clear" | "control.chip" | "control.wordKeycap" | "control.send" | "control.small" | "control.restingTab" | "control.row" | "control.round" | "control.roundRail" | "control.roundSmall" | "control.sidebarSearch" | "list.number" | "tile.icon" | "partsRollup.height" | "sparkline.width" | "sparkline.height" | "sparkline.plotWidth" | "sparkline.plotHeight" | "control.shortcut" | "control.compact" | "control.default" | "control.search" | "control.searchField" | "workspace.mark" | "workspace.avatar" | "control.field" | "sidebar.projectAction" | "sidebar.railRule" | "sidebar.shortRow" | "chat.footer" | "shell.header" | "shell.collapsed" | "table.scroll" | "table.headRow" | "field.textarea" | "field.inline" | "chat.input" | "chat.inputMobile" | "chat.composerMinimum" | "overlay.menu" | "overlay.menuList" | "overlay.helpMenu" | "overlay.tray" | "overlay.trayList" | "overlay.tooltip" | "overlay.popoverNarrow" | "overlay.popover" | "overlay.popoverWide" | "search.dropdownPreview" | "emptyState.minimum" | "search.regularPreview" | "search.sidebarPreview" | "search.toolbar" | "shell.sidebar" | "overlay.dialog" | "overlay.palette" | "commandPalette.query" | "commandPalette.row" | "commandPalette.footer" | "overlay.dialogWide" | "overlay.sheet" | "valueChange.label" | "sheet.footerNote" | "overlay.sheetNarrow" | "overlay.sheetDocked" | "toast.width" | "toast.progressWidth" | "toast.progressHeight" | "chat.bubble" | "chat.messageBubble" | "chat.voiceBubble" | "chat.quoteEdge" | "chat.listColumn" | "chat.listSheet" | "chat.attachment" | "chat.imageBubbleMaxWidth" | "chat.imageBubbleMaxHeight" | "settings.column" | "card.centered" | "scroll.bar" | "card.centeredWide" | "card.centeredForm" | "steps.image" | "checklist.maximum" | "page.maximum"
|
|
11
11
|
|
|
12
12
|
export type OpacityToken = "disabled" | "locked.step" | "locked.requirement" | "disabledRound" | "checkedHover"
|
|
13
13
|
|