@joewinke/jatui 0.14.0 → 0.15.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/VideoPlayer.svelte +570 -8
- package/dist/components/VideoPlayer.svelte.d.ts +74 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -0
- package/dist/video/README.md +1 -1
- package/dist/video/presence/flip.d.ts +145 -0
- package/dist/video/presence/flip.js +253 -0
- package/dist/video/presence/idle.d.ts +82 -0
- package/dist/video/presence/idle.js +145 -0
- package/dist/video/presence/resume.d.ts +76 -0
- package/dist/video/presence/resume.js +139 -0
- package/dist/video/presence/winddown.d.ts +106 -0
- package/dist/video/presence/winddown.js +104 -0
- package/dist/video/presence.d.ts +25 -21
- package/dist/video/presence.js +25 -21
- package/dist/video/settings.js +17 -1
- package/package.json +1 -1
package/dist/video/presence.js
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Presence
|
|
3
|
-
*
|
|
2
|
+
* Presence (mos-5lzns.34) — the barrel. Three behaviours about whether you
|
|
3
|
+
* are there and where you were, each an OPTIONAL VideoPlayer prop that is
|
|
4
|
+
* inert when absent (extension-library FEATURES.md §Wind-down, §Resume at a
|
|
5
|
+
* sentence, §Open like an object):
|
|
4
6
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* · `presence/winddown.ts` — pure: the begin decision, fade levels, hint.
|
|
8
|
+
* The desktop says nobody is there → picture and sound fade over 20s and
|
|
9
|
+
* the video pauses. The fade IS the prompt; any input cancels it.
|
|
10
|
+
* · `presence/idle.ts` — the desktop signal: Chromium's Idle Detection API,
|
|
11
|
+
* feature-detected, never prompting unless the host opted in (and then
|
|
12
|
+
* only from a gesture). Elsewhere the player falls back to page presence,
|
|
13
|
+
* reported as `source: 'page'` so the host can label it.
|
|
14
|
+
* · `presence/resume.ts` — resume-at-sentence glue around .27's
|
|
15
|
+
* `advisors/resume-point` (the snapping is NOT duplicated here): the
|
|
16
|
+
* host-supplied store (localStorage default), the data mapping, and the
|
|
17
|
+
* two integration rules — snap when the boundaries land, stand down once
|
|
18
|
+
* the user has taken the wheel.
|
|
19
|
+
* · `presence/flip.ts` — FLIP open/close over WAAPI with the poster painted
|
|
20
|
+
* on every path; a no-op under prefers-reduced-motion except the poster.
|
|
7
21
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* · resume-at-sentence — snap a resume point back to the nearest sentence /
|
|
12
|
-
* speaker turn / chapter within 15s (CLOSEST wins, not most-specific);
|
|
13
|
-
* quote the line, never paraphrase; stand down if the user has taken the
|
|
14
|
-
* wheel (>2.5s from the stored point). Runs when the transcript lands, not
|
|
15
|
-
* at open.
|
|
16
|
-
* · FLIP open — the clicked card's rectangle → the player shell, WAAPI, two
|
|
17
|
-
* keyframes, transform-origin top-left, poster painted under the video on
|
|
18
|
-
* EVERY path (a black rectangle is a bug at any motion setting); no-op
|
|
19
|
-
* under prefers-reduced-motion except the poster.
|
|
20
|
-
*
|
|
21
|
-
* All three are advisors/mechanics: they read no settings, touch no
|
|
22
|
-
* <video> outside the callbacks the component passes, and fail toward doing
|
|
23
|
-
* nothing.
|
|
22
|
+
* Advisors and mechanics: they read no settings and touch no <video>; the
|
|
23
|
+
* component passes knobs in and applies what comes back, and every one of
|
|
24
|
+
* them fails toward doing nothing.
|
|
24
25
|
*/
|
|
25
|
-
export
|
|
26
|
+
export { WIND_DOWN_FADE_MS, WIND_DOWN_DEPTH, WIND_DOWN_AFTER_DEFAULT, WIND_DOWN_AFTER_MIN, WIND_DOWN_AFTER_MAX, WIND_DOWN_PROBE_MS, windDownAfterMs, shouldBeginWindDown, desktopPresent, windDownProgress, windDownLevels, windDownHint } from './presence/winddown';
|
|
27
|
+
export { IDLE_THRESHOLD_MIN_MS, idleDetectionSupported, idleDetectionPermission, requestIdleDetection, startDesktopWatch, toDesktopSignal } from './presence/idle';
|
|
28
|
+
export { RESUME_WHEEL_SEC, RESUME_MAX_BACK, RESUME_SAVE_MS, RESUME_FLOOR_SEC, RESUME_TAIL_SEC, localResumeStore, coerceResumeSec, resumeToSave, toResumeCtx, hasBoundaries, planResumeSnap } from './presence/resume';
|
|
29
|
+
export { FLIP_EASE, FLIP_OPEN_MS, FLIP_CLOSE_MS, FLIP_FADE_WITH_POSTER, FLIP_FADE_BARE, FLIP_POSTER_CLASS, flipOpen, flipClose, clearPoster, posterBackground, rectOf, onScreen, flipGeometry, awayFrame, homeFrame } from './presence/flip';
|
package/dist/video/settings.js
CHANGED
|
@@ -58,7 +58,23 @@ export const VIDEO_SETTINGS = [
|
|
|
58
58
|
{ id: 'night.bias', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
59
59
|
{ id: 'player.predictive', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
60
60
|
{ id: 'player.strobeGuard', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
61
|
-
//
|
|
61
|
+
// Read by VideoPlayer's `windDown` / `windDownAfter` / `windDownNightOnly` /
|
|
62
|
+
// `idleDetection` props → video/presence/winddown.ts (shouldBeginWindDown,
|
|
63
|
+
// windDownAfterMs) + presence/idle.ts (startDesktopWatch). As with night,
|
|
64
|
+
// the DEFAULT is the host's opt-in: an absent `windDown` prop means the
|
|
65
|
+
// feature does not exist on that player. `sleep.desktopIdle` defaults OFF
|
|
66
|
+
// because turning it on is what asks the browser for a permission — the
|
|
67
|
+
// host calls `requestIdleDetection()` from the click that turns it on.
|
|
68
|
+
{ id: 'sleep.enabled', type: 'bool', default: true, owner: 'mos-5lzns.34', wired: true },
|
|
69
|
+
{ id: 'sleep.after', type: 'range', default: 30, min: 10, max: 90, step: 5, owner: 'mos-5lzns.34', wired: true },
|
|
70
|
+
{ id: 'sleep.nightOnly', type: 'bool', default: true, owner: 'mos-5lzns.34', wired: true },
|
|
71
|
+
{ id: 'sleep.desktopIdle', type: 'bool', default: false, owner: 'mos-5lzns.34', wired: true },
|
|
72
|
+
// Read by VideoPlayer's `resumeSnap` prop (with `resumeKey` present) →
|
|
73
|
+
// video/presence/resume.ts planResumeSnap → advisors/resume-point snapResume.
|
|
74
|
+
{ id: 'player.resumeSnap', type: 'bool', default: true, owner: 'mos-5lzns.34', wired: true },
|
|
75
|
+
// Read by VideoPlayer's `openMotion` prop (with `openFrom` present) →
|
|
76
|
+
// video/presence/flip.ts flipOpen. Off ⇒ the poster still paints.
|
|
77
|
+
{ id: 'player.openMotion', type: 'bool', default: true, owner: 'mos-5lzns.34', wired: true },
|
|
62
78
|
];
|
|
63
79
|
/** Coerce a raw stored value against a spec — never throws, never returns junk. */
|
|
64
80
|
export function coerce(spec, raw) {
|