@f8team/reel-core 1.0.5 → 1.1.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/CHANGELOG.md +19 -0
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @f8team/reel-core
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fe0431b: Fix controls that never auto-hide in fullscreen.
|
|
8
|
+
|
|
9
|
+
Entering fullscreen is only possible by hitting the fullscreen control, and the
|
|
10
|
+
pointer focus it leaves behind kept `:focus-within` matching forever, so the
|
|
11
|
+
themes held the controls bar and the mobile transport at full opacity for the
|
|
12
|
+
rest of the session. Reported on Android Chrome and Safari.
|
|
13
|
+
|
|
14
|
+
The idle timer now releases that pointer focus instead of only dropping
|
|
15
|
+
`data-reel-controls-visible`. Keyboard focus and open control menus still keep
|
|
16
|
+
the chrome on screen - the timer re-arms rather than hiding.
|
|
17
|
+
|
|
18
|
+
`@f8team/reel-core` gains `blurFocusInside` and `shouldKeepControlsVisible` so
|
|
19
|
+
the Lit element, the React adapter and app-level players share one auto-hide
|
|
20
|
+
focus contract; `@f8team/reel-react` re-exports both.
|
|
21
|
+
|
|
3
22
|
## 1.0.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2394,6 +2394,27 @@ function createFocusTrap(container) {
|
|
|
2394
2394
|
return { activate, deactivate };
|
|
2395
2395
|
}
|
|
2396
2396
|
|
|
2397
|
+
// src/a11y/controlsFocus.ts
|
|
2398
|
+
var OPEN_MENU_SELECTOR = "[data-reel-menu-open]";
|
|
2399
|
+
function activeElementInside(container) {
|
|
2400
|
+
const active = (container.ownerDocument ?? document).activeElement;
|
|
2401
|
+
if (!(active instanceof HTMLElement)) return null;
|
|
2402
|
+
return container.contains(active) ? active : null;
|
|
2403
|
+
}
|
|
2404
|
+
function blurFocusInside(container) {
|
|
2405
|
+
activeElementInside(container)?.blur();
|
|
2406
|
+
}
|
|
2407
|
+
function shouldKeepControlsVisible(container) {
|
|
2408
|
+
if (container.querySelector(OPEN_MENU_SELECTOR) !== null) return true;
|
|
2409
|
+
const active = activeElementInside(container);
|
|
2410
|
+
if (!active) return false;
|
|
2411
|
+
try {
|
|
2412
|
+
return active.matches(":focus-visible");
|
|
2413
|
+
} catch {
|
|
2414
|
+
return false;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2397
2418
|
// src/util/time.ts
|
|
2398
2419
|
var TIME_RE = /^(?:(\d+):)?(\d{1,2}):(\d{1,2})(?:\.(\d+))?$/;
|
|
2399
2420
|
function parseTime(input) {
|
|
@@ -2433,6 +2454,7 @@ exports.TOKEN_TO_CSS_VAR = TOKEN_TO_CSS_VAR;
|
|
|
2433
2454
|
exports.announce = announce;
|
|
2434
2455
|
exports.applyTheme = applyTheme;
|
|
2435
2456
|
exports.areSourceDescriptorsEquivalent = areSourceDescriptorsEquivalent;
|
|
2457
|
+
exports.blurFocusInside = blurFocusInside;
|
|
2436
2458
|
exports.createFocusTrap = createFocusTrap;
|
|
2437
2459
|
exports.createPlayer = createPlayer;
|
|
2438
2460
|
exports.definePlugin = definePlugin;
|
|
@@ -2444,6 +2466,7 @@ exports.looksLikeProgressive = looksLikeProgressive;
|
|
|
2444
2466
|
exports.looksLikeYouTube = looksLikeYouTube;
|
|
2445
2467
|
exports.parseTime = parseTime;
|
|
2446
2468
|
exports.resolveTokens = resolveTokens;
|
|
2469
|
+
exports.shouldKeepControlsVisible = shouldKeepControlsVisible;
|
|
2447
2470
|
exports.toSeconds = toSeconds;
|
|
2448
2471
|
//# sourceMappingURL=index.cjs.map
|
|
2449
2472
|
//# sourceMappingURL=index.cjs.map
|