@motion-proto/live-tokens 0.100.0 → 0.101.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.101.1 — Lightbox focus outline
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Holding Space in the zoom lightbox draws no focus outline.** With
|
|
8
|
+
`extended`, a click on the image gives the stage focus, and Space then woke
|
|
9
|
+
the browser's focus ring around the image. The stage now draws no outline;
|
|
10
|
+
the close button and thumbnails keep theirs.
|
|
11
|
+
|
|
12
|
+
## 0.101.0 — Video lightbox controls
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **VideoLightbox takes `controls`.** With `controls`, the open clip carries
|
|
17
|
+
the native video controls, which show while paused and hide during
|
|
18
|
+
playback, and a click on the clip pauses and resumes it instead of closing
|
|
19
|
+
the lightbox. A click on the scrim, the close button and Escape still close
|
|
20
|
+
it. Without `controls` the lightbox behaves as before.
|
|
21
|
+
|
|
3
22
|
## 0.100.0 — Lightbox zoom and hand tools
|
|
4
23
|
|
|
5
24
|
### Changed
|
package/package.json
CHANGED
|
@@ -1058,6 +1058,12 @@
|
|
|
1058
1058
|
border-radius: var(--imagelightbox-tile-radius);
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
|
+
/* The stage takes focus only to hold it inside the dialog. Space toggles the
|
|
1062
|
+
hand tool, which would otherwise wake :focus-visible around the image. */
|
|
1063
|
+
.image-lightbox-stage:focus {
|
|
1064
|
+
outline: none;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1061
1067
|
.image-lightbox-clip {
|
|
1062
1068
|
position: absolute;
|
|
1063
1069
|
inset: 0;
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
'`badge` lays a play badge over the thumbnail, so a still reads as a clip. `none` shows the still alone.',
|
|
16
16
|
inline: 'true renders the open lightbox in flow, without the thumbnail. The editor preview uses it.',
|
|
17
17
|
loop: 'true repeats the clip.',
|
|
18
|
+
controls:
|
|
19
|
+
'true gives the open clip the native video controls, which show while paused and hide during playback. A click on the clip then pauses and resumes it, and only the scrim, the close button and Escape close the lightbox. false leaves the clip bare, and a click on it closes the lightbox.',
|
|
18
20
|
hoverPlay:
|
|
19
21
|
'true plays the thumbnail muted under the pointer, and rewinds it on the way out. A reader who asked for less motion keeps the still.',
|
|
20
22
|
stretch:
|
|
@@ -42,6 +44,8 @@
|
|
|
42
44
|
width?: number;
|
|
43
45
|
height?: number;
|
|
44
46
|
loop?: boolean;
|
|
47
|
+
/** Native controls on the open clip; a click on the clip then toggles play instead of closing. */
|
|
48
|
+
controls?: boolean;
|
|
45
49
|
/** "badge" lays a play badge over the thumbnail. */
|
|
46
50
|
chrome?: 'badge' | 'none';
|
|
47
51
|
/** Renders the open lightbox in flow, without the thumbnail. Used by the editor preview. */
|
|
@@ -67,6 +71,7 @@
|
|
|
67
71
|
width = undefined,
|
|
68
72
|
height = undefined,
|
|
69
73
|
loop = false,
|
|
74
|
+
controls = false,
|
|
70
75
|
chrome = 'none',
|
|
71
76
|
inline = false,
|
|
72
77
|
hoverPlay = false,
|
|
@@ -209,8 +214,8 @@
|
|
|
209
214
|
</div>
|
|
210
215
|
|
|
211
216
|
{#if mounted}
|
|
212
|
-
<!--
|
|
213
|
-
|
|
217
|
+
<!-- A click closes it, as do the close button and Escape. With
|
|
218
|
+
`controls`, the clip keeps its own clicks for the native controls. -->
|
|
214
219
|
<div
|
|
215
220
|
bind:this={modalEl}
|
|
216
221
|
class="videolightbox-modal"
|
|
@@ -226,8 +231,19 @@
|
|
|
226
231
|
onkeydown={onModalKey}
|
|
227
232
|
>
|
|
228
233
|
<!-- No caption track ships with the source footage. -->
|
|
229
|
-
<!-- svelte-ignore a11y_media_has_caption -->
|
|
230
|
-
<video
|
|
234
|
+
<!-- svelte-ignore a11y_media_has_caption, a11y_click_events_have_key_events, a11y_no_noninteractive_element_interactions -->
|
|
235
|
+
<video
|
|
236
|
+
bind:this={videoEl}
|
|
237
|
+
class="videolightbox-video"
|
|
238
|
+
{src}
|
|
239
|
+
{poster}
|
|
240
|
+
{loop}
|
|
241
|
+
{controls}
|
|
242
|
+
controlslist={controls ? 'nodownload' : undefined}
|
|
243
|
+
playsinline
|
|
244
|
+
class:has-controls={controls}
|
|
245
|
+
onclick={controls ? (e) => e.stopPropagation() : undefined}
|
|
246
|
+
></video>
|
|
231
247
|
<button
|
|
232
248
|
bind:this={closeBtnEl}
|
|
233
249
|
type="button"
|
|
@@ -445,6 +461,10 @@
|
|
|
445
461
|
}
|
|
446
462
|
}
|
|
447
463
|
|
|
464
|
+
.videolightbox-video.has-controls {
|
|
465
|
+
cursor: default;
|
|
466
|
+
}
|
|
467
|
+
|
|
448
468
|
/* The clip plays at its own pixel size and shrinks only to fit the screen. */
|
|
449
469
|
.videolightbox-video {
|
|
450
470
|
display: block;
|