@a2f0/agent-tool 0.1.31 → 0.1.32
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/README.md +4 -2
- package/package.json +10 -2
- package/src/cli.ts +17 -0
- package/src/config.ts +4 -0
- package/src/images/build.ts +2 -45
- package/src/images/png.ts +10 -0
- package/src/permissions/catalog.ts +1 -1
- package/src/screenshots/build.ts +271 -0
- package/src/screenshots/config.ts +94 -0
- package/src/screenshots/gallery.css +528 -0
- package/src/screenshots/gallery.ts +713 -0
- package/src/screenshots/manifest.ts +176 -0
- package/src/system/files.ts +46 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Styles for <screenshot-gallery> and <screenshot-carousel>
|
|
3
|
+
* (@a2f0/agent-tool/screenshots/gallery.css). Every rule sits in :where(), so
|
|
4
|
+
* any site selector overrides it; restyle through the --shots-* custom
|
|
5
|
+
* properties first, set on the elements or any ancestor. Defaults, which
|
|
6
|
+
* follow prefers-color-scheme, live in the internal --_shots-* properties.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
:where(screenshot-gallery, screenshot-carousel) {
|
|
10
|
+
--_shots-font: var(--shots-font, system-ui, -apple-system, "Segoe UI", sans-serif);
|
|
11
|
+
--_shots-ink: var(--shots-ink, #1d1d1f);
|
|
12
|
+
--_shots-ink-muted: var(--shots-ink-muted, #6e6e73);
|
|
13
|
+
--_shots-surface: var(--shots-surface, #ffffff);
|
|
14
|
+
--_shots-surface-raised: var(--shots-surface-raised, #f5f5f7);
|
|
15
|
+
--_shots-border: var(--shots-border, #d2d2d7);
|
|
16
|
+
--_shots-accent: var(--shots-accent, #1d1d1f);
|
|
17
|
+
--_shots-accent-ink: var(--shots-accent-ink, #ffffff);
|
|
18
|
+
--_shots-focus: var(--shots-focus, #0071e3);
|
|
19
|
+
--_shots-radius: var(--shots-radius, 12px);
|
|
20
|
+
--_shots-button-size: var(--shots-button-size, 2.25rem);
|
|
21
|
+
--_shots-bezel: var(--shots-bezel, #1c1c1e);
|
|
22
|
+
--_shots-bezel-edge: var(--shots-bezel-edge, #3a3a3c);
|
|
23
|
+
--_shots-shadow: var(--shots-shadow, 0 12px 32px rgb(0 0 0 / 0.18));
|
|
24
|
+
--_shots-stage-height: var(--shots-stage-height, min(60vh, 44rem));
|
|
25
|
+
--_shots-stage-padding: var(--shots-stage-padding, 1rem);
|
|
26
|
+
--_shots-thumb-height: var(--shots-thumb-height, 5.5rem);
|
|
27
|
+
--_shots-thumb-max-width: var(--shots-thumb-max-width, 9rem);
|
|
28
|
+
--_shots-backdrop: var(--shots-backdrop, rgb(0 0 0 / 0.82));
|
|
29
|
+
--_shots-expanded-z: var(--shots-expanded-z, 1000);
|
|
30
|
+
--_shots-carousel-slide-width: var(--shots-carousel-slide-width, clamp(11rem, 58vw, 15rem));
|
|
31
|
+
--_shots-carousel-gap: var(--shots-carousel-gap, 1.5rem);
|
|
32
|
+
--_shots-carousel-padding: var(--shots-carousel-padding, 1rem);
|
|
33
|
+
display: block;
|
|
34
|
+
color: var(--_shots-ink);
|
|
35
|
+
font-family: var(--_shots-font);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(screenshot-gallery[hidden], screenshot-carousel[hidden]) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (prefers-color-scheme: dark) {
|
|
43
|
+
:where(screenshot-gallery, screenshot-carousel) {
|
|
44
|
+
--_shots-ink: var(--shots-ink, #f5f5f7);
|
|
45
|
+
--_shots-ink-muted: var(--shots-ink-muted, #a1a1a6);
|
|
46
|
+
--_shots-surface: var(--shots-surface, #161617);
|
|
47
|
+
--_shots-surface-raised: var(--shots-surface-raised, #232325);
|
|
48
|
+
--_shots-border: var(--shots-border, #3a3a3c);
|
|
49
|
+
--_shots-accent: var(--shots-accent, #f5f5f7);
|
|
50
|
+
--_shots-accent-ink: var(--shots-accent-ink, #161617);
|
|
51
|
+
--_shots-focus: var(--shots-focus, #2997ff);
|
|
52
|
+
--_shots-bezel: var(--shots-bezel, #0b0b0c);
|
|
53
|
+
--_shots-bezel-edge: var(--shots-bezel-edge, #48484a);
|
|
54
|
+
--_shots-shadow: var(--shots-shadow, 0 12px 32px rgb(0 0 0 / 0.5));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where(.shots-host) :where(button) {
|
|
59
|
+
font: inherit;
|
|
60
|
+
color: inherit;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(.shots-host) :where(button:focus-visible, a:focus-visible, [tabindex]:focus-visible) {
|
|
64
|
+
outline: 2px solid var(--_shots-focus);
|
|
65
|
+
outline-offset: 2px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.shots-icon) {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
width: 1.25rem;
|
|
71
|
+
height: 1.25rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:where(.shots-icon svg) {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* --- States --- */
|
|
80
|
+
|
|
81
|
+
:where(.shots-status) {
|
|
82
|
+
display: grid;
|
|
83
|
+
place-items: center;
|
|
84
|
+
padding: 2rem 1rem;
|
|
85
|
+
border: 1px solid var(--_shots-border);
|
|
86
|
+
border-radius: var(--_shots-radius);
|
|
87
|
+
background: var(--_shots-surface);
|
|
88
|
+
color: var(--_shots-ink-muted);
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Loading reserves the gallery's height so the page does not jump when it arrives. */
|
|
93
|
+
:where(screenshot-gallery) :where(.shots-status[data-state="loading"]) {
|
|
94
|
+
min-height: calc(var(--_shots-stage-height) + var(--_shots-thumb-height) + 7rem);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* --- Gallery --- */
|
|
98
|
+
|
|
99
|
+
:where(.shots-gallery) {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
border: 1px solid var(--_shots-border);
|
|
103
|
+
border-radius: var(--_shots-radius);
|
|
104
|
+
background: var(--_shots-surface);
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where(.shots-gallery[data-expanded]) {
|
|
109
|
+
position: fixed;
|
|
110
|
+
inset: 0;
|
|
111
|
+
z-index: var(--_shots-expanded-z);
|
|
112
|
+
border: 0;
|
|
113
|
+
border-radius: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(.shots-toolbar) {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-wrap: wrap;
|
|
119
|
+
align-items: center;
|
|
120
|
+
gap: 0.5rem 0.75rem;
|
|
121
|
+
padding: 0.75rem 1rem;
|
|
122
|
+
border-bottom: 1px solid var(--_shots-border);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(.shots-title) {
|
|
126
|
+
flex: 1 1 10rem;
|
|
127
|
+
margin: 0;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
text-overflow: ellipsis;
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(.shots-toggle) {
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
padding: 2px;
|
|
137
|
+
border: 1px solid var(--_shots-border);
|
|
138
|
+
border-radius: 999px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:where(.shots-toggle-button) {
|
|
142
|
+
display: inline-flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 0.375rem;
|
|
145
|
+
padding: 0.375rem 0.75rem;
|
|
146
|
+
border: 0;
|
|
147
|
+
border-radius: 999px;
|
|
148
|
+
background: none;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:where(.shots-toggle-button[aria-pressed="true"]) {
|
|
153
|
+
background: var(--_shots-accent);
|
|
154
|
+
color: var(--_shots-accent-ink);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:where(.shots-actions) {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
gap: 0.25rem;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:where(.shots-icon-button) {
|
|
163
|
+
display: inline-grid;
|
|
164
|
+
place-items: center;
|
|
165
|
+
width: var(--_shots-button-size);
|
|
166
|
+
height: var(--_shots-button-size);
|
|
167
|
+
padding: 0;
|
|
168
|
+
border: 1px solid var(--_shots-border);
|
|
169
|
+
border-radius: 999px;
|
|
170
|
+
background: var(--_shots-surface);
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(.shots-icon-button:disabled) {
|
|
175
|
+
opacity: 0.4;
|
|
176
|
+
cursor: default;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where(.shots-body) {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex: 1 1 auto;
|
|
182
|
+
flex-direction: column;
|
|
183
|
+
min-height: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* The main panel: one screen per page of a horizontal scroll-snap track. */
|
|
187
|
+
:where(.shots-track) {
|
|
188
|
+
position: relative;
|
|
189
|
+
display: flex;
|
|
190
|
+
height: var(--_shots-stage-height);
|
|
191
|
+
overflow-x: auto;
|
|
192
|
+
overflow-y: hidden;
|
|
193
|
+
overscroll-behavior-x: contain;
|
|
194
|
+
scroll-snap-type: x mandatory;
|
|
195
|
+
scrollbar-width: none;
|
|
196
|
+
background: var(--_shots-surface-raised);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:where(.shots-gallery[data-expanded]) :where(.shots-track) {
|
|
200
|
+
flex: 1 1 auto;
|
|
201
|
+
height: auto;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:where(.shots-track)::-webkit-scrollbar {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:where(.shots-slide) {
|
|
209
|
+
display: flex;
|
|
210
|
+
flex: 0 0 100%;
|
|
211
|
+
align-items: center;
|
|
212
|
+
justify-content: center;
|
|
213
|
+
box-sizing: border-box;
|
|
214
|
+
height: 100%;
|
|
215
|
+
padding: var(--_shots-stage-padding);
|
|
216
|
+
scroll-snap-align: start;
|
|
217
|
+
scroll-snap-stop: always;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:where(.shots-frame) {
|
|
221
|
+
display: block;
|
|
222
|
+
box-sizing: content-box;
|
|
223
|
+
max-width: 100%;
|
|
224
|
+
padding: 0;
|
|
225
|
+
border: 1px solid var(--_shots-border);
|
|
226
|
+
border-radius: calc(var(--_shots-radius) / 2);
|
|
227
|
+
background: var(--_shots-surface);
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
cursor: zoom-in;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:where(.shots-image) {
|
|
233
|
+
display: block;
|
|
234
|
+
max-width: 100%;
|
|
235
|
+
height: auto;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Phone and tablet captures sit in a device bezel sized from the capture (fitFrame). */
|
|
239
|
+
:where(.shots-gallery[data-frame="phone"], .shots-gallery[data-frame="tablet"]) :where(.shots-frame:not(.shots-missing)) {
|
|
240
|
+
padding: var(--shots-frame-pad, 0.6rem);
|
|
241
|
+
border: 0;
|
|
242
|
+
border-radius: calc(var(--shots-frame-radius, 1.5rem) + var(--shots-frame-pad, 0.6rem));
|
|
243
|
+
background: var(--_shots-bezel);
|
|
244
|
+
box-shadow: inset 0 0 0 1px var(--_shots-bezel-edge), var(--_shots-shadow);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:where(.shots-gallery[data-frame="phone"], .shots-gallery[data-frame="tablet"]) :where(.shots-frame:not(.shots-missing) .shots-image) {
|
|
248
|
+
border-radius: var(--shots-frame-radius, 1.5rem);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:where(.shots-missing) {
|
|
252
|
+
display: grid;
|
|
253
|
+
place-items: center;
|
|
254
|
+
max-width: 24rem;
|
|
255
|
+
padding: 1.5rem;
|
|
256
|
+
color: var(--_shots-ink-muted);
|
|
257
|
+
text-align: center;
|
|
258
|
+
cursor: default;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:where(.shots-navrow) {
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
gap: 1rem;
|
|
266
|
+
padding: 0.5rem;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:where(.shots-counter) {
|
|
270
|
+
min-width: 4.5rem;
|
|
271
|
+
margin: 0;
|
|
272
|
+
color: var(--_shots-ink-muted);
|
|
273
|
+
font-variant-numeric: tabular-nums;
|
|
274
|
+
text-align: center;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:where(.shots-filmstrip) {
|
|
278
|
+
position: relative;
|
|
279
|
+
display: flex;
|
|
280
|
+
gap: 0.5rem;
|
|
281
|
+
padding: 0.25rem 1rem 1rem;
|
|
282
|
+
overflow-x: auto;
|
|
283
|
+
overscroll-behavior-x: contain;
|
|
284
|
+
scroll-snap-type: x proximity;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
:where(.shots-thumb) {
|
|
288
|
+
display: flex;
|
|
289
|
+
flex: 0 0 auto;
|
|
290
|
+
flex-direction: column;
|
|
291
|
+
gap: 0.25rem;
|
|
292
|
+
max-width: var(--_shots-thumb-max-width);
|
|
293
|
+
padding: 0.25rem;
|
|
294
|
+
border: 1px solid transparent;
|
|
295
|
+
border-radius: calc(var(--_shots-radius) / 2);
|
|
296
|
+
background: none;
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
scroll-snap-align: start;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
:where(.shots-thumb[aria-current="true"]) {
|
|
302
|
+
border-color: var(--_shots-accent);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* The image keeps its capture's aspect ratio at a fixed height, cropped from the top only when wider than the cap. */
|
|
306
|
+
:where(.shots-thumb-image) {
|
|
307
|
+
display: block;
|
|
308
|
+
height: var(--_shots-thumb-height);
|
|
309
|
+
min-width: 4.5rem;
|
|
310
|
+
max-width: calc(var(--_shots-thumb-max-width) - 0.5rem);
|
|
311
|
+
aspect-ratio: 3 / 4;
|
|
312
|
+
border-radius: 4px;
|
|
313
|
+
background: var(--_shots-surface-raised);
|
|
314
|
+
overflow: hidden;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
:where(.shots-thumb-image img) {
|
|
318
|
+
display: block;
|
|
319
|
+
width: 100%;
|
|
320
|
+
height: 100%;
|
|
321
|
+
object-fit: cover;
|
|
322
|
+
object-position: top;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
:where(.shots-thumb-label) {
|
|
326
|
+
max-width: calc(var(--_shots-thumb-max-width) - 0.5rem);
|
|
327
|
+
overflow: hidden;
|
|
328
|
+
color: var(--_shots-ink-muted);
|
|
329
|
+
font-size: 0.75rem;
|
|
330
|
+
text-align: left;
|
|
331
|
+
text-overflow: ellipsis;
|
|
332
|
+
white-space: nowrap;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
:where(.shots-thumb[aria-current="true"]) :where(.shots-thumb-label) {
|
|
336
|
+
color: var(--_shots-ink);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
:where(.shots-lightbox) {
|
|
340
|
+
max-width: 100vw;
|
|
341
|
+
max-height: 100vh;
|
|
342
|
+
padding: 0;
|
|
343
|
+
border: 0;
|
|
344
|
+
background: none;
|
|
345
|
+
overflow: visible;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:where(.shots-lightbox)::backdrop {
|
|
349
|
+
background: var(--_shots-backdrop);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
:where(.shots-lightbox-backdrop) {
|
|
353
|
+
position: fixed;
|
|
354
|
+
inset: 0;
|
|
355
|
+
border: 0;
|
|
356
|
+
background: none;
|
|
357
|
+
cursor: zoom-out;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
:where(.shots-lightbox-frame) {
|
|
361
|
+
position: relative;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
:where(.shots-lightbox-image) {
|
|
365
|
+
display: block;
|
|
366
|
+
width: auto;
|
|
367
|
+
height: auto;
|
|
368
|
+
max-width: 94vw;
|
|
369
|
+
max-height: 92vh;
|
|
370
|
+
border-radius: var(--shots-lightbox-radius, 8px);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
:where(.shots-lightbox[data-frame="phone"], .shots-lightbox[data-frame="tablet"]) :where(.shots-lightbox-frame) {
|
|
374
|
+
padding: var(--shots-frame-pad, 0.75rem);
|
|
375
|
+
border-radius: calc(var(--shots-frame-radius, 2rem) + var(--shots-frame-pad, 0.75rem));
|
|
376
|
+
background: var(--_shots-bezel);
|
|
377
|
+
box-shadow: inset 0 0 0 1px var(--_shots-bezel-edge);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
:where(.shots-lightbox[data-frame="phone"], .shots-lightbox[data-frame="tablet"]) :where(.shots-lightbox-image) {
|
|
381
|
+
border-radius: var(--shots-frame-radius, 2rem);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:where(.shots-lightbox-close) {
|
|
385
|
+
position: fixed;
|
|
386
|
+
top: 1rem;
|
|
387
|
+
right: 1rem;
|
|
388
|
+
display: grid;
|
|
389
|
+
place-items: center;
|
|
390
|
+
width: var(--_shots-button-size);
|
|
391
|
+
height: var(--_shots-button-size);
|
|
392
|
+
padding: 0;
|
|
393
|
+
border: 0;
|
|
394
|
+
border-radius: 999px;
|
|
395
|
+
background: rgb(255 255 255 / 0.9);
|
|
396
|
+
color: #1d1d1f;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
:where(.shots-lightbox) :where(.shots-missing) {
|
|
401
|
+
position: relative;
|
|
402
|
+
background: var(--_shots-surface);
|
|
403
|
+
border-radius: var(--_shots-radius);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* --- Carousel --- */
|
|
407
|
+
|
|
408
|
+
:where(.shots-carousel) {
|
|
409
|
+
position: relative;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
:where(.shots-carousel-track) {
|
|
413
|
+
position: relative;
|
|
414
|
+
overflow-x: auto;
|
|
415
|
+
overscroll-behavior-x: contain;
|
|
416
|
+
padding: 0.5rem var(--_shots-carousel-padding) 2.5rem;
|
|
417
|
+
scroll-padding-inline: var(--_shots-carousel-padding);
|
|
418
|
+
scroll-snap-type: x mandatory;
|
|
419
|
+
scrollbar-width: none;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
:where(.shots-carousel-track)::-webkit-scrollbar {
|
|
423
|
+
display: none;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
:where(.shots-carousel-list) {
|
|
427
|
+
display: flex;
|
|
428
|
+
gap: var(--_shots-carousel-gap);
|
|
429
|
+
margin: 0;
|
|
430
|
+
padding: 0;
|
|
431
|
+
list-style: none;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
:where(.shots-carousel-slide) {
|
|
435
|
+
flex: 0 0 var(--_shots-carousel-slide-width);
|
|
436
|
+
scroll-snap-align: start;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
:where(.shots-carousel-slide figure) {
|
|
440
|
+
margin: 0;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
:where(.shots-carousel-slide figcaption) {
|
|
444
|
+
margin-top: 0.75rem;
|
|
445
|
+
color: var(--_shots-ink-muted);
|
|
446
|
+
font-size: 0.875rem;
|
|
447
|
+
text-align: center;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
:where(.shots-device) {
|
|
451
|
+
display: block;
|
|
452
|
+
color: inherit;
|
|
453
|
+
container-type: inline-size;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
:where(.shots-device picture) {
|
|
457
|
+
display: block;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
:where(.shots-device img) {
|
|
461
|
+
display: block;
|
|
462
|
+
width: 100%;
|
|
463
|
+
height: auto;
|
|
464
|
+
border-radius: calc(var(--_shots-radius) / 2);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/* The bezel scales with the device's width, so it keeps its proportions at every size (FRAME_METRICS). */
|
|
468
|
+
:where(.shots-carousel[data-frame="phone"], .shots-carousel[data-frame="tablet"]) :where(.shots-device picture) {
|
|
469
|
+
--shots-frame-pad: 3.5cqi;
|
|
470
|
+
--shots-frame-radius: calc((100cqi - 2 * var(--shots-frame-pad)) * 0.1214);
|
|
471
|
+
padding: var(--shots-frame-pad);
|
|
472
|
+
border-radius: calc(var(--shots-frame-radius) + var(--shots-frame-pad));
|
|
473
|
+
background: var(--_shots-bezel);
|
|
474
|
+
box-shadow: inset 0 0 0 1px var(--_shots-bezel-edge), var(--_shots-shadow);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
:where(.shots-carousel[data-frame="tablet"]) :where(.shots-device picture) {
|
|
478
|
+
--shots-frame-pad: 3cqi;
|
|
479
|
+
--shots-frame-radius: calc((100cqi - 2 * var(--shots-frame-pad)) * 0.025);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
:where(.shots-carousel[data-frame="phone"], .shots-carousel[data-frame="tablet"]) :where(.shots-device img) {
|
|
483
|
+
border-radius: var(--shots-frame-radius);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:where(a.shots-device:focus-visible) {
|
|
487
|
+
outline: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
:where(a.shots-device:focus-visible picture) {
|
|
491
|
+
outline: 2px solid var(--_shots-focus);
|
|
492
|
+
outline-offset: 3px;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
:where(.shots-carousel-controls) {
|
|
496
|
+
display: flex;
|
|
497
|
+
justify-content: flex-end;
|
|
498
|
+
gap: 0.5rem;
|
|
499
|
+
padding: 0 var(--_shots-carousel-padding);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
:where(.shots-carousel-step) {
|
|
503
|
+
display: inline-grid;
|
|
504
|
+
place-items: center;
|
|
505
|
+
width: var(--_shots-button-size);
|
|
506
|
+
height: var(--_shots-button-size);
|
|
507
|
+
padding: 0;
|
|
508
|
+
border: 1px solid var(--_shots-border);
|
|
509
|
+
border-radius: 999px;
|
|
510
|
+
background: var(--_shots-surface);
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
515
|
+
:where(.shots-track, .shots-carousel-track, .shots-filmstrip) {
|
|
516
|
+
scroll-behavior: smooth;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
:where(a.shots-device picture) {
|
|
520
|
+
transition: transform 200ms ease;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
@media (hover: hover) {
|
|
524
|
+
:where(a.shots-device:hover picture) {
|
|
525
|
+
transform: translateY(-4px);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|