@cloudgrid-io/ui 0.63.0 → 0.65.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/blocks/add-tile.d.ts +16 -1
- package/dist/blocks/add-tile.d.ts.map +1 -1
- package/dist/blocks/add-tile.js +20 -3
- package/dist/blocks/add-tile.js.map +1 -1
- package/dist/blocks/avatar-picker.d.ts +19 -1
- package/dist/blocks/avatar-picker.d.ts.map +1 -1
- package/dist/blocks/avatar-picker.js +16 -3
- package/dist/blocks/avatar-picker.js.map +1 -1
- package/dist/blocks/bento-card-hint.d.ts +16 -0
- package/dist/blocks/bento-card-hint.d.ts.map +1 -0
- package/dist/blocks/bento-card-hint.js +23 -0
- package/dist/blocks/bento-card-hint.js.map +1 -0
- package/dist/blocks/bento-card.d.ts +59 -0
- package/dist/blocks/bento-card.d.ts.map +1 -0
- package/dist/blocks/bento-card.js +59 -0
- package/dist/blocks/bento-card.js.map +1 -0
- package/dist/blocks/coming-soon-hint.d.ts.map +1 -1
- package/dist/blocks/coming-soon-hint.js +110 -7
- package/dist/blocks/coming-soon-hint.js.map +1 -1
- package/dist/blocks/creation-search.d.ts +147 -0
- package/dist/blocks/creation-search.d.ts.map +1 -0
- package/dist/blocks/creation-search.js +239 -0
- package/dist/blocks/creation-search.js.map +1 -0
- package/dist/blocks/entity-card.d.ts +80 -2
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +162 -17
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/from-your-grid.d.ts +66 -0
- package/dist/blocks/from-your-grid.d.ts.map +1 -0
- package/dist/blocks/from-your-grid.js +63 -0
- package/dist/blocks/from-your-grid.js.map +1 -0
- package/dist/blocks/grid-profile.d.ts +17 -1
- package/dist/blocks/grid-profile.d.ts.map +1 -1
- package/dist/blocks/grid-profile.js +66 -5
- package/dist/blocks/grid-profile.js.map +1 -1
- package/dist/blocks/home-bento.d.ts +86 -0
- package/dist/blocks/home-bento.d.ts.map +1 -0
- package/dist/blocks/home-bento.js +87 -0
- package/dist/blocks/home-bento.js.map +1 -0
- package/dist/blocks/home-empty-illustrations.d.ts +37 -0
- package/dist/blocks/home-empty-illustrations.d.ts.map +1 -0
- package/dist/blocks/home-empty-illustrations.js +47 -0
- package/dist/blocks/home-empty-illustrations.js.map +1 -0
- package/dist/blocks/home-pinned.d.ts +120 -0
- package/dist/blocks/home-pinned.d.ts.map +1 -0
- package/dist/blocks/home-pinned.js +58 -0
- package/dist/blocks/home-pinned.js.map +1 -0
- package/dist/blocks/icons.d.ts +39 -0
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +39 -0
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/image-adjust-dialog.d.ts +171 -0
- package/dist/blocks/image-adjust-dialog.d.ts.map +1 -0
- package/dist/blocks/image-adjust-dialog.js +396 -0
- package/dist/blocks/image-adjust-dialog.js.map +1 -0
- package/dist/blocks/inspiration-cards.d.ts +241 -0
- package/dist/blocks/inspiration-cards.d.ts.map +1 -0
- package/dist/blocks/inspiration-cards.js +234 -0
- package/dist/blocks/inspiration-cards.js.map +1 -0
- package/dist/blocks/liquid-glass.d.ts +106 -0
- package/dist/blocks/liquid-glass.d.ts.map +1 -0
- package/dist/blocks/liquid-glass.js +283 -0
- package/dist/blocks/liquid-glass.js.map +1 -0
- package/dist/blocks/meter.d.ts +5 -2
- package/dist/blocks/meter.d.ts.map +1 -1
- package/dist/blocks/meter.js +4 -0
- package/dist/blocks/meter.js.map +1 -1
- package/dist/blocks/motion.d.ts +46 -0
- package/dist/blocks/motion.d.ts.map +1 -0
- package/dist/blocks/motion.js +144 -0
- package/dist/blocks/motion.js.map +1 -0
- package/dist/blocks/needs-attention.d.ts +78 -0
- package/dist/blocks/needs-attention.d.ts.map +1 -0
- package/dist/blocks/needs-attention.js +29 -0
- package/dist/blocks/needs-attention.js.map +1 -0
- package/dist/blocks/phosphor-marks.d.ts +16 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +24 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/blocks/ranked-list.d.ts +7 -1
- package/dist/blocks/ranked-list.d.ts.map +1 -1
- package/dist/blocks/ranked-list.js +8 -6
- package/dist/blocks/ranked-list.js.map +1 -1
- package/dist/blocks/recent-plugs.d.ts +66 -0
- package/dist/blocks/recent-plugs.d.ts.map +1 -0
- package/dist/blocks/recent-plugs.js +20 -0
- package/dist/blocks/recent-plugs.js.map +1 -0
- package/dist/blocks/shared-grid-illustration.d.ts +55 -0
- package/dist/blocks/shared-grid-illustration.d.ts.map +1 -0
- package/dist/blocks/shared-grid-illustration.js +81 -0
- package/dist/blocks/shared-grid-illustration.js.map +1 -0
- package/dist/blocks/shelf-strip.d.ts +36 -0
- package/dist/blocks/shelf-strip.d.ts.map +1 -0
- package/dist/blocks/shelf-strip.js +32 -0
- package/dist/blocks/shelf-strip.js.map +1 -0
- package/dist/blocks/stat-tile.d.ts +17 -1
- package/dist/blocks/stat-tile.d.ts.map +1 -1
- package/dist/blocks/stat-tile.js +4 -1
- package/dist/blocks/stat-tile.js.map +1 -1
- package/dist/blocks/top-creations.d.ts +76 -0
- package/dist/blocks/top-creations.d.ts.map +1 -0
- package/dist/blocks/top-creations.js +54 -0
- package/dist/blocks/top-creations.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/fit.d.ts +39 -0
- package/dist/lib/fit.d.ts.map +1 -0
- package/dist/lib/fit.js +92 -0
- package/dist/lib/fit.js.map +1 -0
- package/dist/lib/motion.d.ts +126 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +132 -0
- package/dist/lib/motion.js.map +1 -0
- package/dist/ui/dialog.d.ts +7 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +2 -2
- package/dist/ui/dialog.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
5
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
6
|
+
import { Button } from "../ui/button.js";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "../ui/dialog.js";
|
|
8
|
+
import { ZoomInIcon, ZoomOutIcon } from "./icons.js";
|
|
9
|
+
/**
|
|
10
|
+
* THE ADJUST STEP (ui#527): move and zoom a picture inside the shape it will be
|
|
11
|
+
* shown in, then save exactly that. Asaf approved it from a sketch on
|
|
12
|
+
* 2026-11-20, for a Grid logo and a profile picture.
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* .------------------------------------------------.
|
|
16
|
+
* | Adjust logo |
|
|
17
|
+
* | Drag to move it. Zoom to fit what you want |
|
|
18
|
+
* | inside the square. |
|
|
19
|
+
* | .------------------------------------------. |
|
|
20
|
+
* | | (the picture, dimmed outside) | |
|
|
21
|
+
* | | .------------. | |
|
|
22
|
+
* | | | the frame | 240 | |
|
|
23
|
+
* | | '------------' | |
|
|
24
|
+
* | '------------------------------------------' |
|
|
25
|
+
* | (-) ------------o-------------------- (+) 140% |
|
|
26
|
+
* | [Save] [Cancel] |
|
|
27
|
+
* '------------------------------------------------'
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Named `ImageAdjustDialog`: it ADJUSTS (moves and zooms) rather than crops by
|
|
31
|
+
* hand, and it is a dialog, like `ConfirmDeleteDialog` and `PluggedDialog`.
|
|
32
|
+
* The cut is a consequence of where the picture sits, never a box the person
|
|
33
|
+
* draws.
|
|
34
|
+
*
|
|
35
|
+
* ## The frame
|
|
36
|
+
*
|
|
37
|
+
* `shape="rounded-square"` is the Grid logo's tile: its corner is 25% of the
|
|
38
|
+
* side, the 20 (`--cg-radius-container`) of the 80px tile, at any size.
|
|
39
|
+
* `shape="circle"` is the avatar's circle. The picture is drawn under a mask
|
|
40
|
+
* cut to that shape: inside it clear, outside it dimmed, so the person sees
|
|
41
|
+
* what will be kept and what will not.
|
|
42
|
+
*
|
|
43
|
+
* ## The maths: `imageAdjustLayout`
|
|
44
|
+
*
|
|
45
|
+
* One pure function decides everything the frame draws and the output cuts,
|
|
46
|
+
* so the two cannot disagree. The view is `{ zoom, x, y }`: the zoom, from 1
|
|
47
|
+
* (the picture just covers the frame, "100%") to `IMAGE_ADJUST_MAX_ZOOM` (3),
|
|
48
|
+
* and the point of the picture at the frame's centre, as a fraction of the
|
|
49
|
+
* picture's width and height. Because the view is the CENTRE point, zooming is
|
|
50
|
+
* around the frame's centre by construction: a new zoom keeps the point and
|
|
51
|
+
* only the clamp may move it.
|
|
52
|
+
*
|
|
53
|
+
* The clamp keeps the picture covering the whole frame, so an edge can never
|
|
54
|
+
* leave a gap: at 100% a tall picture moves only up and down and a wide one
|
|
55
|
+
* only left and right; zoomed in, both move in all four directions.
|
|
56
|
+
*
|
|
57
|
+
* ## The input
|
|
58
|
+
*
|
|
59
|
+
* - Drag (mouse, pen or one finger) anywhere on the stage, in every direction.
|
|
60
|
+
* - Zoom: the slider (100% to 300%, with the zoom-out and zoom-in glasses and
|
|
61
|
+
* the percentage), a pinch of two fingers, and the wheel or a trackpad
|
|
62
|
+
* pinch. All of them zoom around the frame's centre.
|
|
63
|
+
* - Keyboard: the dialog opens focused on the frame, a `slider` named "Picture
|
|
64
|
+
* position" whose value says the zoom and where the picture sits. The arrow
|
|
65
|
+
* keys move the picture (2% of the frame, 10% with Shift), and plus and
|
|
66
|
+
* minus zoom by 10 points. The frame's ring is `focus-line`'s (1px, --ring,
|
|
67
|
+
* 2px out), keyboard only, never on a click.
|
|
68
|
+
* - Save (the default button) then Cancel (`outline-cyan`, the outline twin of
|
|
69
|
+
* the default, ui#515), in that order. Escape and the scrim cancel.
|
|
70
|
+
*
|
|
71
|
+
* ## The output
|
|
72
|
+
*
|
|
73
|
+
* `onSave(file)` hands back a square `File` of `outputSize` pixels (512 by
|
|
74
|
+
* default), cut exactly to the frame: the circle frame still outputs a
|
|
75
|
+
* square, the circle is only how it shows. It is written as WebP, or as PNG
|
|
76
|
+
* where the browser cannot write WebP, the rule the Console's logo squaring
|
|
77
|
+
* (`logoSquare.ts`) already follows; both keep transparency and the platform
|
|
78
|
+
* takes both. At 512 even an uncompressed PNG is about 1 MB.
|
|
79
|
+
*
|
|
80
|
+
* A picture the browser cannot open, or cannot write back, says so under the
|
|
81
|
+
* frame and leaves the choice to the person: Cancel, or Save again. Nothing
|
|
82
|
+
* falls back to the uncut file behind their back.
|
|
83
|
+
*
|
|
84
|
+
* The block makes no network call. It opens with the picture centred at 100%.
|
|
85
|
+
*/
|
|
86
|
+
/** The furthest zoom: three times the size that just covers the frame. */
|
|
87
|
+
export const IMAGE_ADJUST_MAX_ZOOM = 3;
|
|
88
|
+
/** The output's side, in pixels, when the caller does not set one. */
|
|
89
|
+
export const IMAGE_ADJUST_OUTPUT_SIZE = 512;
|
|
90
|
+
const clamp = (n, lo, hi) => Math.min(hi, Math.max(lo, n));
|
|
91
|
+
const finite = (n, fallback) => (typeof n === "number" && Number.isFinite(n) ? n : fallback);
|
|
92
|
+
/**
|
|
93
|
+
* The cover and the clamp: everything the frame draws and the output cuts,
|
|
94
|
+
* for a picture of `image.width` by `image.height` pixels.
|
|
95
|
+
*/
|
|
96
|
+
export function imageAdjustLayout(image, view = {}) {
|
|
97
|
+
const zoom = clamp(finite(view.zoom, 1), 1, IMAGE_ADJUST_MAX_ZOOM);
|
|
98
|
+
// Cover: the shorter side meets the frame at 100%.
|
|
99
|
+
const cover = 1 / Math.min(image.width, image.height);
|
|
100
|
+
const width = image.width * cover * zoom;
|
|
101
|
+
const height = image.height * cover * zoom;
|
|
102
|
+
// Half the frame, as a fraction of the picture: how near an edge the centre may go.
|
|
103
|
+
const roomX = 0.5 / width;
|
|
104
|
+
const roomY = 0.5 / height;
|
|
105
|
+
const x = clamp(finite(view.x, 0.5), roomX, 1 - roomX);
|
|
106
|
+
const y = clamp(finite(view.y, 0.5), roomY, 1 - roomY);
|
|
107
|
+
const size = image.width / width;
|
|
108
|
+
return {
|
|
109
|
+
view: { zoom, x, y },
|
|
110
|
+
width,
|
|
111
|
+
height,
|
|
112
|
+
left: 0.5 - x * width,
|
|
113
|
+
top: 0.5 - y * height,
|
|
114
|
+
crop: { x: x * image.width - size / 2, y: y * image.height - size / 2, size },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The view after the picture is moved `dx` and `dy` frame sides (right and
|
|
119
|
+
* down are positive), clamped so it still covers the frame.
|
|
120
|
+
*/
|
|
121
|
+
export function moveImageAdjustView(image, view, dx, dy) {
|
|
122
|
+
const { width, height } = imageAdjustLayout(image, view);
|
|
123
|
+
return imageAdjustLayout(image, { ...view, x: view.x - dx / width, y: view.y - dy / height }).view;
|
|
124
|
+
}
|
|
125
|
+
/** What the frame's value says: the zoom, and how far the picture has moved. */
|
|
126
|
+
function positionText(layout) {
|
|
127
|
+
const zoom = `${Math.round(layout.view.zoom * 100)}% zoom`;
|
|
128
|
+
// The picture's centre from the frame's, in percent of the frame.
|
|
129
|
+
const across = Math.round((layout.left + layout.width / 2 - 0.5) * 100);
|
|
130
|
+
const down = Math.round((layout.top + layout.height / 2 - 0.5) * 100);
|
|
131
|
+
const moves = [
|
|
132
|
+
across ? `${Math.abs(across)}% ${across > 0 ? "right" : "left"}` : "",
|
|
133
|
+
down ? `${Math.abs(down)}% ${down > 0 ? "down" : "up"}` : "",
|
|
134
|
+
].filter(Boolean);
|
|
135
|
+
return moves.length ? `${zoom}, moved ${moves.join(" and ")}` : `${zoom}, centred`;
|
|
136
|
+
}
|
|
137
|
+
/** `me.jpg` written as WebP is `me.webp`. */
|
|
138
|
+
function outputName(name, type) {
|
|
139
|
+
const ext = type === "image/png" ? "png" : "webp";
|
|
140
|
+
const base = name ? name.replace(/\.[^./]*$/, "") : "";
|
|
141
|
+
return `${base || "image"}.${ext}`;
|
|
142
|
+
}
|
|
143
|
+
function encode(canvas, type) {
|
|
144
|
+
return new Promise((resolve) => {
|
|
145
|
+
try {
|
|
146
|
+
canvas.toBlob(resolve, type, 0.92);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
resolve(null);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/** The frame's square, drawn at `size` and written as WebP, else PNG. `null` when the browser will not. */
|
|
154
|
+
async function cut(image, crop, size, name) {
|
|
155
|
+
try {
|
|
156
|
+
const canvas = document.createElement("canvas");
|
|
157
|
+
canvas.width = size;
|
|
158
|
+
canvas.height = size;
|
|
159
|
+
const context = canvas.getContext("2d");
|
|
160
|
+
if (!context)
|
|
161
|
+
return null;
|
|
162
|
+
context.imageSmoothingQuality = "high";
|
|
163
|
+
context.drawImage(image, crop.x, crop.y, crop.size, crop.size, 0, 0, size, size);
|
|
164
|
+
let blob = await encode(canvas, "image/webp");
|
|
165
|
+
// A browser that cannot write WebP hands back a PNG, or nothing.
|
|
166
|
+
if (!blob || blob.type !== "image/webp")
|
|
167
|
+
blob = blob?.type === "image/png" ? blob : await encode(canvas, "image/png");
|
|
168
|
+
if (!blob || (blob.type !== "image/webp" && blob.type !== "image/png"))
|
|
169
|
+
return null;
|
|
170
|
+
return new File([blob], outputName(name, blob.type), { type: blob.type });
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/** The arrow keys' step, in frame sides, and with Shift. */
|
|
177
|
+
const STEP = 0.02;
|
|
178
|
+
const STEP_LARGE = 0.1;
|
|
179
|
+
/** Plus and minus: ten points of zoom. */
|
|
180
|
+
const ZOOM_STEP = 0.1;
|
|
181
|
+
/** Wheel pixels to zoom: a notch (about 100) is about a fifth; a trackpad pinch (ctrl) is finer-grained, so faster. */
|
|
182
|
+
const WHEEL = 0.002;
|
|
183
|
+
const WHEEL_PINCH = 0.01;
|
|
184
|
+
const COPY = {
|
|
185
|
+
"rounded-square": {
|
|
186
|
+
title: "Adjust logo",
|
|
187
|
+
description: "Drag to move it. Zoom to fit what you want inside the square.",
|
|
188
|
+
},
|
|
189
|
+
circle: {
|
|
190
|
+
title: "Adjust photo",
|
|
191
|
+
description: "Drag to move it. Zoom to fit what you want inside the circle.",
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
/** The open dialog's inside. Mounted while open, so every opening starts centred at 100%. */
|
|
195
|
+
function ImageAdjustBody({ file, src, shape, title, outputSize, onSave, onCancel, frameRef, }) {
|
|
196
|
+
const copy = COPY[shape];
|
|
197
|
+
const hintId = React.useId();
|
|
198
|
+
const stage = React.useRef(null);
|
|
199
|
+
const picture = React.useRef(null);
|
|
200
|
+
const [url, setUrl] = React.useState(file ? undefined : src);
|
|
201
|
+
const [natural, setNatural] = React.useState(null);
|
|
202
|
+
const [view, setView] = React.useState({ zoom: 1, x: 0.5, y: 0.5 });
|
|
203
|
+
const [problem, setProblem] = React.useState(null);
|
|
204
|
+
const [saving, setSaving] = React.useState(false);
|
|
205
|
+
const alive = React.useRef(true);
|
|
206
|
+
React.useEffect(() => {
|
|
207
|
+
alive.current = true;
|
|
208
|
+
return () => {
|
|
209
|
+
alive.current = false;
|
|
210
|
+
};
|
|
211
|
+
}, []);
|
|
212
|
+
// A file is shown through an object URL, revoked when it is replaced or the dialog closes.
|
|
213
|
+
React.useEffect(() => {
|
|
214
|
+
if (!file) {
|
|
215
|
+
setUrl(src);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const next = URL.createObjectURL(file);
|
|
219
|
+
setUrl(next);
|
|
220
|
+
return () => URL.revokeObjectURL(next);
|
|
221
|
+
}, [file, src]);
|
|
222
|
+
const layout = natural ? imageAdjustLayout(natural, view) : null;
|
|
223
|
+
// The latest view and size, for the pointer and wheel handlers between renders.
|
|
224
|
+
const latest = React.useRef({ natural, view });
|
|
225
|
+
latest.current = { natural, view };
|
|
226
|
+
const update = React.useCallback((next) => {
|
|
227
|
+
const { natural: size, view: current } = latest.current;
|
|
228
|
+
if (!size)
|
|
229
|
+
return;
|
|
230
|
+
const v = next(size, current);
|
|
231
|
+
latest.current = { natural: size, view: v };
|
|
232
|
+
setView(v);
|
|
233
|
+
}, []);
|
|
234
|
+
const zoomTo = React.useCallback((zoom) => update((size, v) => imageAdjustLayout(size, { ...v, zoom: zoom(v.zoom) }).view), [update]);
|
|
235
|
+
// The wheel, and a trackpad pinch (which arrives as a wheel with ctrl). A
|
|
236
|
+
// native listener, because React's is passive and the page must not scroll.
|
|
237
|
+
React.useEffect(() => {
|
|
238
|
+
const el = stage.current;
|
|
239
|
+
if (!el)
|
|
240
|
+
return;
|
|
241
|
+
const onWheel = (e) => {
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
const pixels = e.deltaMode === 1 ? e.deltaY * 16 : e.deltaMode === 2 ? e.deltaY * 400 : e.deltaY;
|
|
244
|
+
zoomTo((z) => z * Math.exp(-pixels * (e.ctrlKey ? WHEEL_PINCH : WHEEL)));
|
|
245
|
+
};
|
|
246
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
247
|
+
return () => el.removeEventListener("wheel", onWheel);
|
|
248
|
+
}, [zoomTo]);
|
|
249
|
+
// Every pointer on the stage. One moves the picture; two pinch the zoom.
|
|
250
|
+
const pointers = React.useRef(new Map());
|
|
251
|
+
const pinch = React.useRef(null);
|
|
252
|
+
const distance = () => {
|
|
253
|
+
const [a, b] = [...pointers.current.values()];
|
|
254
|
+
return Math.hypot(a.x - b.x, a.y - b.y);
|
|
255
|
+
};
|
|
256
|
+
const regroup = () => {
|
|
257
|
+
pinch.current = pointers.current.size === 2 ? { distance: distance(), zoom: latest.current.view.zoom } : null;
|
|
258
|
+
};
|
|
259
|
+
const release = (e) => {
|
|
260
|
+
if (!pointers.current.delete(e.pointerId))
|
|
261
|
+
return;
|
|
262
|
+
regroup();
|
|
263
|
+
};
|
|
264
|
+
async function save() {
|
|
265
|
+
const image = picture.current;
|
|
266
|
+
if (!image || !layout || saving)
|
|
267
|
+
return;
|
|
268
|
+
setSaving(true);
|
|
269
|
+
setProblem(null);
|
|
270
|
+
const out = await cut(image, layout.crop, outputSize, file && "name" in file ? file.name : undefined);
|
|
271
|
+
if (!alive.current)
|
|
272
|
+
return;
|
|
273
|
+
setSaving(false);
|
|
274
|
+
if (out)
|
|
275
|
+
onSave(out);
|
|
276
|
+
else
|
|
277
|
+
setProblem("save");
|
|
278
|
+
}
|
|
279
|
+
const zoomPercent = Math.round((layout?.view.zoom ?? 1) * 100);
|
|
280
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DialogHeader, { className: "pr-0", children: [_jsx(DialogTitle, { children: title ?? copy.title }), _jsx(DialogDescription, { children: copy.description })] }), _jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { ref: stage, "data-slot": "image-adjust-stage", className: "relative grid h-72 cursor-grab touch-none place-items-center overflow-hidden rounded-md bg-muted select-none active:cursor-grabbing", onPointerDown: (e) => {
|
|
281
|
+
if (e.pointerType === "mouse" && e.button !== 0)
|
|
282
|
+
return;
|
|
283
|
+
try {
|
|
284
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
285
|
+
}
|
|
286
|
+
catch {
|
|
287
|
+
// A pointer the browser does not track (a synthetic one) still moves the picture.
|
|
288
|
+
}
|
|
289
|
+
pointers.current.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
|
290
|
+
regroup();
|
|
291
|
+
// A press anywhere on the stage keeps the keys on the frame. After a
|
|
292
|
+
// pointer, the focus line stays off.
|
|
293
|
+
frameRef.current?.focus({ preventScroll: true });
|
|
294
|
+
}, onPointerMove: (e) => {
|
|
295
|
+
const last = pointers.current.get(e.pointerId);
|
|
296
|
+
if (!last)
|
|
297
|
+
return;
|
|
298
|
+
pointers.current.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
|
299
|
+
if (pinch.current) {
|
|
300
|
+
const { distance: start, zoom } = pinch.current;
|
|
301
|
+
const now = distance();
|
|
302
|
+
if (start > 0)
|
|
303
|
+
zoomTo(() => (zoom * now) / start);
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const side = frameRef.current?.getBoundingClientRect().width;
|
|
307
|
+
if (!side)
|
|
308
|
+
return;
|
|
309
|
+
const dx = (e.clientX - last.x) / side;
|
|
310
|
+
const dy = (e.clientY - last.y) / side;
|
|
311
|
+
update((size, v) => moveImageAdjustView(size, v, dx, dy));
|
|
312
|
+
}, onPointerUp: release, onPointerCancel: release, onLostPointerCapture: release, children: [_jsxs("div", { ref: frameRef, "data-slot": "image-adjust-frame", "data-shape": shape, role: "slider", tabIndex: 0, "aria-label": "Picture position", "aria-describedby": hintId, "aria-valuemin": 100, "aria-valuemax": IMAGE_ADJUST_MAX_ZOOM * 100, "aria-valuenow": zoomPercent, "aria-valuetext": layout ? positionText(layout) : undefined, onKeyDown: (e) => {
|
|
313
|
+
const step = e.shiftKey ? STEP_LARGE : STEP;
|
|
314
|
+
const moves = {
|
|
315
|
+
ArrowLeft: [-step, 0],
|
|
316
|
+
ArrowRight: [step, 0],
|
|
317
|
+
ArrowUp: [0, -step],
|
|
318
|
+
ArrowDown: [0, step],
|
|
319
|
+
};
|
|
320
|
+
const move = moves[e.key];
|
|
321
|
+
if (move) {
|
|
322
|
+
e.preventDefault();
|
|
323
|
+
update((size, v) => moveImageAdjustView(size, v, move[0], move[1]));
|
|
324
|
+
}
|
|
325
|
+
else if (e.key === "+" || e.key === "=") {
|
|
326
|
+
e.preventDefault();
|
|
327
|
+
zoomTo((z) => z + ZOOM_STEP);
|
|
328
|
+
}
|
|
329
|
+
else if (e.key === "-" || e.key === "_") {
|
|
330
|
+
e.preventDefault();
|
|
331
|
+
zoomTo((z) => z - ZOOM_STEP);
|
|
332
|
+
}
|
|
333
|
+
}, className: cn("group/adjust-frame relative size-60 shrink-0 outline-none", shape === "circle" ? "rounded-pill" : "rounded-[25%]"), children: [url ? (_jsx("img", { ref: picture, src: url, alt: "", draggable: false, "data-slot": "image-adjust-picture", crossOrigin: file ? undefined : "anonymous", onLoad: (e) => {
|
|
334
|
+
const { naturalWidth: width, naturalHeight: height } = e.currentTarget;
|
|
335
|
+
if (width > 0 && height > 0) {
|
|
336
|
+
setNatural({ width, height });
|
|
337
|
+
setProblem(null);
|
|
338
|
+
}
|
|
339
|
+
else
|
|
340
|
+
setProblem("open");
|
|
341
|
+
}, onError: () => setProblem("open"), className: cn("pointer-events-none absolute max-w-none select-none", layout ? "" : "invisible"), style: layout
|
|
342
|
+
? {
|
|
343
|
+
left: `${layout.left * 100}%`,
|
|
344
|
+
top: `${layout.top * 100}%`,
|
|
345
|
+
width: `${layout.width * 100}%`,
|
|
346
|
+
height: `${layout.height * 100}%`,
|
|
347
|
+
}
|
|
348
|
+
: undefined })) : null, _jsx("span", { "aria-hidden": "true", "data-slot": "image-adjust-mask", className: "pointer-events-none absolute inset-0 rounded-[inherit] shadow-[0_0_0_100vmax_color-mix(in_srgb,var(--cg-scrim-strong)_70%,transparent)] group-focus-key/adjust-frame:outline group-focus-key/adjust-frame:outline-offset-2 group-focus-key/adjust-frame:outline-ring" })] }), _jsx("span", { id: hintId, className: "sr-only", children: "Use the arrow keys to move it, and plus and minus to zoom." })] }), _jsxs(SliderPrimitive.Root, { "data-slot": "image-adjust-zoom", value: zoomPercent, min: 100, max: IMAGE_ADJUST_MAX_ZOOM * 100, step: 1, disabled: !layout, onValueChange: (value) => zoomTo(() => (Array.isArray(value) ? value[0] : value) / 100), className: "flex items-center gap-3 text-body", children: [_jsx(ZoomOutIcon, { className: "size-5 shrink-0" }), _jsx(SliderPrimitive.Control, { className: "flex h-6 min-w-0 flex-1 cursor-pointer touch-none items-center select-none", children: _jsxs(SliderPrimitive.Track, { className: "relative h-1 w-full rounded-pill bg-line", children: [_jsx(SliderPrimitive.Indicator, { className: "rounded-pill bg-brand" }), _jsx(SliderPrimitive.Thumb, { "aria-label": "Zoom", getAriaValueText: (_formatted, value) => `${value}%`, className: "size-4 rounded-pill bg-card shadow-sm ring-[1.5px] ring-brand has-focus-key:outline has-focus-key:outline-offset-2 has-focus-key:outline-ring" })] }) }), _jsx(ZoomInIcon, { className: "size-5 shrink-0" }), _jsxs("span", { "data-slot": "image-adjust-percent", "aria-hidden": "true", className: "w-11 shrink-0 text-right text-body-sm text-ink tabular-nums", children: [zoomPercent, "%"] })] }), problem ? (_jsx("p", { role: "alert", className: "m-0 text-caption text-danger-strong", children: problem === "open"
|
|
349
|
+
? "This picture could not be opened. Cancel and choose another one."
|
|
350
|
+
: "The picture could not be saved in this browser. Try Save again, or cancel and choose another one." })) : null] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", "data-slot": "image-adjust-save", disabled: !layout || saving, "aria-busy": saving || undefined, onClick: () => void save(), children: "Save" }), _jsx(Button, { type: "button", variant: "outline-cyan", "data-slot": "image-adjust-cancel", onClick: onCancel, children: "Cancel" })] })] }));
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Move and zoom a picture inside its frame, then save exactly that. A modal
|
|
354
|
+
* dialog the caller holds open: `onSave` gets the adjusted square, `onCancel`
|
|
355
|
+
* is Cancel, Escape or the scrim.
|
|
356
|
+
*/
|
|
357
|
+
function ImageAdjustDialog({ open, file, src, shape, title, outputSize = IMAGE_ADJUST_OUTPUT_SIZE, onSave, onCancel, }) {
|
|
358
|
+
const frame = React.useRef(null);
|
|
359
|
+
const side = Math.max(1, Math.round(finite(outputSize, IMAGE_ADJUST_OUTPUT_SIZE)));
|
|
360
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (next) => {
|
|
361
|
+
if (!next)
|
|
362
|
+
onCancel();
|
|
363
|
+
}, children: _jsx(DialogContent, { "data-slot": "image-adjust-dialog", showCloseButton: false, initialFocus: frame, children: _jsx(ImageAdjustBody, { file: file, src: src, shape: shape, title: title, outputSize: side, onSave: onSave, onCancel: onCancel, frameRef: frame }) }) }));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* The opt-in adjust step for a picker (ui#527): `AvatarPicker`'s `adjust` and
|
|
367
|
+
* `GridProfile`'s `logoAdjust`, and any caller with a picker of its own.
|
|
368
|
+
*
|
|
369
|
+
* `pick` is where a good file goes, after the caller's own type and size
|
|
370
|
+
* checks. Without `adjust` it is `onSelectFile` itself. With it, the file
|
|
371
|
+
* opens the dialog in `shape`; Save closes it and calls `onSelectFile` with
|
|
372
|
+
* the adjusted square, and Cancel closes it and calls nothing. Render
|
|
373
|
+
* `dialog` anywhere in the picker: it is `null` until a file is picked, so a
|
|
374
|
+
* picker's markup does not change.
|
|
375
|
+
*/
|
|
376
|
+
export function useImageAdjustStep(adjust, shape, onSelectFile) {
|
|
377
|
+
const [file, setFile] = React.useState(null);
|
|
378
|
+
const [open, setOpen] = React.useState(false);
|
|
379
|
+
const options = typeof adjust === "object" ? adjust : {};
|
|
380
|
+
return {
|
|
381
|
+
pick: (picked) => {
|
|
382
|
+
if (!adjust) {
|
|
383
|
+
onSelectFile?.(picked);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
setFile(picked);
|
|
387
|
+
setOpen(true);
|
|
388
|
+
},
|
|
389
|
+
dialog: adjust && file ? (_jsx(ImageAdjustDialog, { open: open, file: file, shape: shape, title: options.title, outputSize: options.outputSize, onSave: (adjusted) => {
|
|
390
|
+
setOpen(false);
|
|
391
|
+
onSelectFile?.(adjusted);
|
|
392
|
+
}, onCancel: () => setOpen(false) })) : null,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
export { ImageAdjustDialog };
|
|
396
|
+
//# sourceMappingURL=image-adjust-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-adjust-dialog.js","sourceRoot":"","sources":["../../src/blocks/image-adjust-dialog.tsx"],"names":[],"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