@joewinke/jatui 0.11.0 → 0.13.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 +627 -8
- package/dist/components/VideoPlayer.svelte.d.ts +84 -1
- package/dist/index.d.ts +1 -1
- package/dist/video/README.md +5 -4
- package/dist/video/audio/graph.d.ts +115 -0
- package/dist/video/audio/graph.js +400 -0
- package/dist/video/audio/rider.d.ts +134 -0
- package/dist/video/audio/rider.js +187 -0
- package/dist/video/audio.d.ts +30 -19
- package/dist/video/audio.js +30 -19
- package/dist/video/keys.d.ts +4 -4
- package/dist/video/keys.js +4 -3
- package/dist/video/night/clock.d.ts +31 -0
- package/dist/video/night/clock.js +58 -0
- package/dist/video/night/levels.d.ts +78 -0
- package/dist/video/night/levels.js +117 -0
- package/dist/video/night/meter.d.ts +53 -0
- package/dist/video/night/meter.js +115 -0
- package/dist/video/night/track.d.ts +105 -0
- package/dist/video/night/track.js +138 -0
- package/dist/video/night.d.ts +25 -20
- package/dist/video/night.js +25 -20
- package/dist/video/settings.js +18 -2
- package/package.json +1 -1
package/dist/video/night.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Night module
|
|
3
|
-
*
|
|
2
|
+
* Night module (mos-5lzns.33) — night dimming, bias light, predictive
|
|
3
|
+
* dimming (the luma track), strobe guard. Ported from extension-library
|
|
4
|
+
* FEATURES.md §Night dimming, §Bias light, §The light track.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
* §The light track), as ADVISORS + paint helpers:
|
|
6
|
+
* Layout (every file pure and node-testable — `npm run test:unit`):
|
|
7
7
|
*
|
|
8
|
-
* · night
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
8
|
+
* · night/meter.ts — 32×18 frame bytes → Rec.709 luma (+ blown-out share),
|
|
9
|
+
* asymmetric smoothing (attack 0.5, release 0.12), and the 3×3 bias-light
|
|
10
|
+
* cells read from the SAME bytes.
|
|
11
|
+
* · night/levels.ts — luma → brightness / saturation / warmth / vignette off
|
|
12
|
+
* NIGHT_FLOOR 0.34; the blind fixed level; the surround level that re-tunes
|
|
13
|
+
* night for LIGHT themes.
|
|
14
|
+
* · night/clock.ts — what arms it: local clock (prefers-color-scheme dark only
|
|
15
|
+
* widens the window) + the manual auto/on/off cycle (`N`). No hyprsunset.
|
|
16
|
+
* · night/track.ts — prediction (can only ADD dimming), flash intervals, and
|
|
17
|
+
* `composeNight`, the one-tick decision: darker lands at once, brighter is
|
|
18
|
+
* released per tick, so nothing ever brightens in a jump.
|
|
19
19
|
*
|
|
20
|
-
* The
|
|
21
|
-
* <video>,
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* The advisor rule (README): nothing here reads a setting, touches the
|
|
21
|
+
* <video>, or draws. The component samples the frame (crossorigin="anonymous"
|
|
22
|
+
* is the host's call), escalates a tainted canvas via `onNightBlind`, and
|
|
23
|
+
* applies the numbers as CSS variables that exist only while night acts — off
|
|
24
|
+
* leaves no trace. prefers-reduced-motion drops the ramps, never the
|
|
25
|
+
* correction: the dimming is the feature, the ramp is only how it arrives.
|
|
25
26
|
*/
|
|
26
27
|
export const NIGHT_NEUTRAL = 1;
|
|
28
|
+
export * from './night/meter';
|
|
29
|
+
export * from './night/levels';
|
|
30
|
+
export * from './night/clock';
|
|
31
|
+
export * from './night/track';
|
package/dist/video/settings.js
CHANGED
|
@@ -32,9 +32,25 @@
|
|
|
32
32
|
export const VIDEO_SETTINGS = [
|
|
33
33
|
// Read by VideoPlayer's `oneAxis` prop → video/band/axis.ts resolveAxis().
|
|
34
34
|
{ id: 'player.oneAxis', type: 'bool', default: true, owner: 'mos-5lzns.30', wired: true },
|
|
35
|
-
//
|
|
35
|
+
// Read by VideoPlayer's `loudness` / `loudnessTarget` / `quietListening` /
|
|
36
|
+
// `limiter` props → video/audio/* (graph.createAudioSession, rider.*). As with
|
|
37
|
+
// night, the DEFAULT is the host's opt-in: an absent prop means nothing is
|
|
38
|
+
// ever routed through WebAudio on that player.
|
|
39
|
+
{ id: 'audio.level', type: 'bool', default: true, owner: 'mos-5lzns.31', wired: true },
|
|
40
|
+
{ id: 'audio.target', type: 'range', default: -20, min: -30, max: -12, step: 2, owner: 'mos-5lzns.31', wired: true },
|
|
41
|
+
{ id: 'audio.quiet', type: 'bool', default: true, owner: 'mos-5lzns.31', wired: true },
|
|
42
|
+
{ id: 'audio.limiter', type: 'bool', default: true, owner: 'mos-5lzns.31', wired: true },
|
|
36
43
|
// { id: 'player.speakerRate', type: 'bool', default: false, owner: 'mos-5lzns.32' },
|
|
37
|
-
//
|
|
44
|
+
// Read by VideoPlayer's `night` / `nightDepth` / `biasLight` / `predictive` /
|
|
45
|
+
// `strobeGuard` props → video/night/* (clock.nightArmed, levels.nightLevels,
|
|
46
|
+
// meter.biasCells, track.lumaAhead / inFlash / composeNight). Unlike the
|
|
47
|
+
// extension, night.mode's DEFAULT here is the host's opt-in: an absent `night`
|
|
48
|
+
// prop means the feature does not exist on that player.
|
|
49
|
+
{ id: 'night.mode', type: 'enum', default: 'auto', options: ['auto', 'on', 'off'], owner: 'mos-5lzns.33', wired: true },
|
|
50
|
+
{ id: 'night.depth', type: 'range', default: 0.7, min: 0.2, max: 1, step: 0.1, owner: 'mos-5lzns.33', wired: true },
|
|
51
|
+
{ id: 'night.bias', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
52
|
+
{ id: 'player.predictive', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
53
|
+
{ id: 'player.strobeGuard', type: 'bool', default: true, owner: 'mos-5lzns.33', wired: true },
|
|
38
54
|
// { id: 'sleep.enabled', type: 'bool', default: true, owner: 'mos-5lzns.34' },
|
|
39
55
|
];
|
|
40
56
|
/** Coerce a raw stored value against a spec — never throws, never returns junk. */
|