@hanzo/ui 8.27.3 → 8.27.4

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.
Files changed (59) hide show
  1. package/dist/backdrop/Backdrop.cjs +420 -0
  2. package/dist/backdrop/Backdrop.d.ts +53 -0
  3. package/dist/backdrop/Backdrop.d.ts.map +1 -0
  4. package/dist/backdrop/Backdrop.js +418 -0
  5. package/dist/backdrop/Backdrop.js.map +1 -0
  6. package/dist/backdrop/index.cjs +50 -0
  7. package/dist/backdrop/index.d.ts +29 -0
  8. package/dist/backdrop/index.d.ts.map +1 -0
  9. package/dist/backdrop/index.js +29 -0
  10. package/dist/backdrop/index.js.map +1 -0
  11. package/dist/backdrop/scene.cjs +439 -0
  12. package/dist/backdrop/scene.d.ts +235 -0
  13. package/dist/backdrop/scene.d.ts.map +1 -0
  14. package/dist/backdrop/scene.js +423 -0
  15. package/dist/backdrop/scene.js.map +1 -0
  16. package/dist/chat/Chat.cjs +23 -1
  17. package/dist/chat/Chat.d.ts +6 -3
  18. package/dist/chat/Chat.d.ts.map +1 -1
  19. package/dist/chat/Chat.js +23 -1
  20. package/dist/chat/Chat.js.map +1 -1
  21. package/dist/chat/Inspector.cjs +51 -0
  22. package/dist/chat/Inspector.d.ts +49 -0
  23. package/dist/chat/Inspector.d.ts.map +1 -0
  24. package/dist/chat/Inspector.js +49 -0
  25. package/dist/chat/Inspector.js.map +1 -0
  26. package/dist/chat/Message.cjs +3 -1
  27. package/dist/chat/Message.d.ts +3 -1
  28. package/dist/chat/Message.d.ts.map +1 -1
  29. package/dist/chat/Message.js +3 -1
  30. package/dist/chat/Message.js.map +1 -1
  31. package/dist/chat/Parts.cjs +159 -0
  32. package/dist/chat/Parts.d.ts +186 -0
  33. package/dist/chat/Parts.d.ts.map +1 -0
  34. package/dist/chat/Parts.js +153 -0
  35. package/dist/chat/Parts.js.map +1 -0
  36. package/dist/chat/Persona.cjs +34 -0
  37. package/dist/chat/Persona.d.ts +37 -0
  38. package/dist/chat/Persona.d.ts.map +1 -0
  39. package/dist/chat/Persona.js +30 -0
  40. package/dist/chat/Persona.js.map +1 -0
  41. package/dist/chat/Preview.cjs +42 -0
  42. package/dist/chat/Preview.d.ts +36 -0
  43. package/dist/chat/Preview.d.ts.map +1 -0
  44. package/dist/chat/Preview.js +40 -0
  45. package/dist/chat/Preview.js.map +1 -0
  46. package/dist/chat/directive.cjs +272 -0
  47. package/dist/chat/directive.d.ts +167 -0
  48. package/dist/chat/directive.d.ts.map +1 -0
  49. package/dist/chat/directive.js +266 -0
  50. package/dist/chat/directive.js.map +1 -0
  51. package/dist/chat/index.cjs +59 -4
  52. package/dist/chat/index.d.ts +31 -3
  53. package/dist/chat/index.d.ts.map +1 -1
  54. package/dist/chat/index.js +31 -3
  55. package/dist/chat/index.js.map +1 -1
  56. package/dist/gallery.html +4 -4
  57. package/dist/styles.css +3 -3
  58. package/dist/theme.css +3 -3
  59. package/package.json +7 -1
@@ -0,0 +1,418 @@
1
+ 'use client';
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Backdrop — a still image, one muted video, a list of them, or our own clips,
5
+ * painted behind whatever a surface renders on top of it.
6
+ *
7
+ * The layer takes no pointer and is `aria-hidden`, so nothing about the controls
8
+ * above it, the focus order or the screen-reader surface changes: it is scenery,
9
+ * not UI. That is also why nothing here is clickable — a backdrop that could
10
+ * take a click would be a trap sitting under the conversation.
11
+ *
12
+ * NOTHING IS REVEALED UNTIL IT IS ACTUALLY THERE. A video appears only once the
13
+ * player reports footage rolling, an image only once it has decoded. A video the
14
+ * provider refuses — taken down, region-blocked, embed throttled — and an image
15
+ * URL that 404s both simply stay invisible, instead of showing the provider's
16
+ * error card through the canvas.
17
+ *
18
+ * Provider chrome (title, watermark, suggestions) is kept out of frame two ways:
19
+ * players are built with every control off, and the frame is centre-cropped well
20
+ * past the viewport (16:9 cover, then overscan), so the strips providers reserve
21
+ * at the top and bottom land offscreen. The scrim keeps text legible over bright
22
+ * footage.
23
+ *
24
+ * WEB ONLY, and it ships at its own subpath for that reason. A YouTube embed is
25
+ * an `<iframe>` and a clip is a `<video>`; neither exists off the web, and the
26
+ * cover crop is written in `vh`/`vw`. `Grid` is off the barrel on the same rule.
27
+ *
28
+ * Configuration arrives as PROPS. There is no store here and no context: a
29
+ * surface holds the scene (in whatever it already uses) and passes it, which is
30
+ * what lets the same component serve a settings panel, a `/bg` command and a
31
+ * persona's emotion with one implementation and no adapter between them.
32
+ */
33
+ import { YStack } from '@hanzo/gui';
34
+ import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
35
+ import { slot } from '../backends/gui/slot.js';
36
+ import { DWELL, HOSTS, files, knobs, media, playable, twitch, videoId, youtube, } from './scene.js';
37
+ const ORIGIN = 'https://www.youtube.com';
38
+ /**
39
+ * Send the origin, never the path.
40
+ *
41
+ * The address of a conversation is `/c/<id>`, and a `Referer` carrying it would
42
+ * hand that id to YouTube, to Twitch, and to whatever host serves a photo
43
+ * somebody pasted — on every load, to a party with no reason to know which
44
+ * thread is open. Origin alone is all these embeds need: Twitch checks the
45
+ * `parent` parameter and YouTube the `origin` one, both passed deliberately.
46
+ * Chrome's default already stops at the origin; Safari and older engines do not,
47
+ * which is why this is stated rather than assumed.
48
+ */
49
+ const REFERRER = 'strict-origin-when-cross-origin';
50
+ /** How long the adaptive ramp is given before anything is revealed: quality
51
+ * cannot be forced (embeds have ignored every quality API since 2019), so the
52
+ * low-res opening plays out hidden. */
53
+ const RAMP = 4000;
54
+ /** The cover-crop: deliberately larger than the container, and told so twice
55
+ * because a page's own `img, iframe, video { max-width: 100% }` reset would
56
+ * otherwise clamp the formula and letterbox the footage on a narrow screen. */
57
+ const COVER = {
58
+ position: 'absolute',
59
+ left: '50%',
60
+ top: '50%',
61
+ width: 'max(177.78vh, 100vw)',
62
+ height: 'max(56.25vw, 100vh)',
63
+ maxWidth: 'none',
64
+ maxHeight: 'none',
65
+ border: 0,
66
+ };
67
+ /** The cover-crop at a brand's zoom, or the house 1.4. A larger scale pushes a
68
+ * corner watermark off-frame. */
69
+ const cover = (zoom) => ({
70
+ ...COVER,
71
+ transform: `translate(-50%, -50%) scale(${zoom && zoom > 0 ? zoom : 1.4})`,
72
+ });
73
+ const fade = (shown) => ({
74
+ opacity: shown ? 1 : 0,
75
+ transition: 'opacity 1.2s ease',
76
+ });
77
+ /**
78
+ * Ask a YouTube player to start, through its API. Muted playback started by
79
+ * script is always allowed, and the API path sidesteps the viewability heuristic
80
+ * that can leave the autoplay param unhonoured for a player sitting under the
81
+ * content layer. Repeated because the player ignores commands sent before its
82
+ * own scripts finish booting.
83
+ */
84
+ function start(event, rate) {
85
+ const frame = event.currentTarget;
86
+ const post = (message) => frame.contentWindow?.postMessage(JSON.stringify(message), ORIGIN);
87
+ const kick = () => {
88
+ // The listening handshake makes the player report state back — the reveal
89
+ // below waits for a real "playing" signal.
90
+ post({ event: 'listening', id: 'backdrop', channel: 'widget' });
91
+ // Quality cannot be forced (see the note above); this only skips the low
92
+ // first rung. Ask for the top one so a 4K display is offered the 2160p
93
+ // rendition when the source and the bandwidth allow — the size-based auto
94
+ // picker caps at the viewport otherwise.
95
+ post({ event: 'command', func: 'setPlaybackQuality', args: ['hd2160'] });
96
+ // A brand's chosen speed. YouTube quantises to its allowed steps, so an
97
+ // off-grid value plays at the nearest; sent with the other kicks because a
98
+ // command before the player boots is dropped.
99
+ if (rate && rate > 0)
100
+ post({ event: 'command', func: 'setPlaybackRate', args: [rate] });
101
+ post({ event: 'command', func: 'playVideo', args: [] });
102
+ };
103
+ kick();
104
+ setTimeout(kick, 1500);
105
+ setTimeout(kick, RAMP);
106
+ }
107
+ /**
108
+ * The BROWSER's transport controls, disowned.
109
+ *
110
+ * A page that plays media gets a system play/pause/skip overlay — Safari draws
111
+ * it over the middle of the conversation — and `controls=0` never reaches it,
112
+ * because that overlay belongs to the user agent, not to the player.
113
+ * `mediaSession` is where a page says whose media this is: cleared metadata, no
114
+ * playback state, no handlers, nothing to present.
115
+ *
116
+ * This is scenery. It is muted, it loops, and the only controls that mean
117
+ * anything for it belong to the surface. System skip buttons put furniture over
118
+ * the page and wire it to nothing.
119
+ */
120
+ function disown() {
121
+ try {
122
+ const ms = navigator.mediaSession;
123
+ if (!ms)
124
+ return;
125
+ ms.metadata = null;
126
+ ms.playbackState = 'none';
127
+ const actions = [
128
+ 'play',
129
+ 'pause',
130
+ 'previoustrack',
131
+ 'nexttrack',
132
+ 'seekbackward',
133
+ 'seekforward',
134
+ 'stop',
135
+ ];
136
+ for (const action of actions) {
137
+ try {
138
+ ms.setActionHandler(action, null);
139
+ }
140
+ catch {
141
+ /* an action this agent does not know */
142
+ }
143
+ }
144
+ }
145
+ catch {
146
+ /* no mediaSession here */
147
+ }
148
+ }
149
+ /** A YouTube player. Revealed on a real `playing` report; calls `onEnd` when the
150
+ * player says the video finished, which is how a mixed list advances. */
151
+ function Video({ src, onEnd, rate, zoom, sound = false, }) {
152
+ const [playing, setPlaying] = useState(false);
153
+ const [ramped, setRamped] = useState(false);
154
+ const frame = useRef(null);
155
+ useEffect(() => {
156
+ const hear = (event) => {
157
+ if (event.origin !== ORIGIN)
158
+ return;
159
+ try {
160
+ const state = JSON.parse(event.data)?.info?.playerState;
161
+ if (state === 1) {
162
+ setPlaying(true);
163
+ disown();
164
+ }
165
+ else if (state === 0) {
166
+ onEnd?.();
167
+ }
168
+ }
169
+ catch {
170
+ /* not the player */
171
+ }
172
+ };
173
+ window.addEventListener('message', hear);
174
+ const ramp = setTimeout(() => setRamped(true), RAMP);
175
+ return () => {
176
+ window.removeEventListener('message', hear);
177
+ clearTimeout(ramp);
178
+ };
179
+ }, [onEnd]);
180
+ /**
181
+ * Sound is turned on AFTER the player is playing, never in the URL.
182
+ *
183
+ * `mute=1` is what lets the embed start at all — autoplay with sound is
184
+ * refused by every current browser — so unmuting is a command, and it is only
185
+ * worth sending once the player has said it is running: commands sent before
186
+ * its scripts boot are dropped, which is the same reason `start` kicks three
187
+ * times. Gating on `playing` rides that report instead of racing it.
188
+ *
189
+ * It follows the setting both ways while the video is on screen, so turning
190
+ * the sound back off silences it now rather than at the next reload — the one
191
+ * direction a person is likely to be in a hurry about.
192
+ */
193
+ useEffect(() => {
194
+ if (!playing)
195
+ return;
196
+ const post = (message) => frame.current?.contentWindow?.postMessage(JSON.stringify(message), ORIGIN);
197
+ post({ event: 'command', func: sound ? 'unMute' : 'mute', args: [] });
198
+ // Wallpaper, not a concert. Loud enough to hear under a conversation.
199
+ if (sound)
200
+ post({ event: 'command', func: 'setVolume', args: [35] });
201
+ }, [playing, sound]);
202
+ return (_jsx("iframe", { ref: frame, src: src, title: "", tabIndex: -1, allow: "autoplay; encrypted-media", referrerPolicy: REFERRER, onLoad: (e) => start(e, rate), style: { ...cover(zoom), ...fade(playing && ramped) } }));
203
+ }
204
+ /**
205
+ * A Twitch player.
206
+ *
207
+ * Twitch publishes no state channel for a bare iframe the way YouTube does —
208
+ * reading playback state means loading their embed script, a third party we
209
+ * would have to let run — so this reveals on load rather than on a playing
210
+ * report. The honest consequence: an offline channel shows Twitch's own idle
211
+ * screen rather than staying hidden. A live stream also never ends, so its turn
212
+ * in a list is ended by the clock instead of by the player.
213
+ */
214
+ function Stream({ src, onEnd }) {
215
+ const [loaded, setLoaded] = useState(false);
216
+ useEffect(() => {
217
+ if (!onEnd)
218
+ return;
219
+ const turn = setTimeout(onEnd, DWELL);
220
+ return () => clearTimeout(turn);
221
+ }, [onEnd]);
222
+ return (_jsx("iframe", { src: src, title: "", tabIndex: -1, allow: "autoplay; encrypted-media", referrerPolicy: REFERRER, onLoad: () => setLoaded(true), style: { ...cover(), ...fade(loaded) } }));
223
+ }
224
+ /** A still image, revealed once it has decoded — a URL that 404s never fires
225
+ * `load`, so it stays invisible for the same reason a refused video does. */
226
+ function Photo({ url }) {
227
+ const [loaded, setLoaded] = useState(false);
228
+ return (_jsx("img", { src: url, alt: "", referrerPolicy: REFERRER, onLoad: () => setLoaded(true), style: {
229
+ position: 'absolute',
230
+ inset: 0,
231
+ width: '100%',
232
+ height: '100%',
233
+ maxWidth: 'none',
234
+ maxHeight: 'none',
235
+ objectFit: 'cover',
236
+ ...fade(loaded),
237
+ } }));
238
+ }
239
+ /**
240
+ * One entry of a list, dispatched to the player its provider needs.
241
+ *
242
+ * Twitch is told the bare hostname it is being framed by — it refuses to load
243
+ * for a `parent` it was not given — while YouTube's API handshake is keyed to
244
+ * the full origin. Two different values, from the same page, for two different
245
+ * reasons.
246
+ */
247
+ function Entry({ entry, onEnd, at }) {
248
+ if (entry.provider === 'twitch') {
249
+ return _jsx(Stream, { src: twitch(entry.url, at.host), onEnd: onEnd });
250
+ }
251
+ if (entry.provider === 'youtube') {
252
+ // No loop on a single entry: the list, not the video, decides what repeats.
253
+ return _jsx(Video, { src: youtube([videoId(entry.url)], false, at.origin), onEnd: onEnd });
254
+ }
255
+ // Named, not defaulted. Callers filter by `playable` before they get here, so
256
+ // this branch should be unreachable — but a dispatch whose LAST case is a
257
+ // fall-through hands every future provider to whichever player happens to be
258
+ // written last, and here that would ask YouTube to embed a netflix.com link. A
259
+ // player has to be chosen on purpose; nothing else gets one.
260
+ return null;
261
+ }
262
+ /** The list, one entry at a time: a video hands over when it ends, a stream when
263
+ * its dwell is up. Runs only when the list is NOT all YouTube — that case is
264
+ * handed to YouTube's own playlist player instead. */
265
+ function Rotation({ links, loop, at }) {
266
+ const [index, setIndex] = useState(0);
267
+ const [done, setDone] = useState(false);
268
+ // A changed list is a new rotation, not a continuation of the old one.
269
+ useEffect(() => {
270
+ setIndex(0);
271
+ setDone(false);
272
+ }, [links]);
273
+ const advance = useCallback(() => {
274
+ setIndex((current) => {
275
+ const next = current + 1;
276
+ if (next < links.length)
277
+ return next;
278
+ if (loop)
279
+ return 0;
280
+ setDone(true);
281
+ return current;
282
+ });
283
+ }, [links.length, loop]);
284
+ const entry = links[index];
285
+ if (done || !entry)
286
+ return null;
287
+ // Keyed by URL so a handover resets the next player's reveal state rather than
288
+ // inheriting the last one's.
289
+ return _jsx(Entry, { entry: entry, onEnd: advance, at: at }, entry.url);
290
+ }
291
+ /**
292
+ * Direct video clips, ours to serve, played as a preloaded crossfade.
293
+ *
294
+ * Two stacked `<video>`s take turns: the shown one plays while the hidden one
295
+ * loads the next clip, and they swap only once the next has reported it is
296
+ * actually playing — so the canvas crosses one live frame over another and never
297
+ * flashes black between them. That is the same "nothing is revealed until it is
298
+ * real" rule the YouTube scene keeps, met with the element's own `playing` event
299
+ * instead of a postMessage handshake. A clip a host refuses (404, decode error)
300
+ * fires `error`, not `playing`, so it never appears and hands the turn on.
301
+ *
302
+ * A single clip loops itself; a list lets each clip END and advances on it — an
303
+ * unhurried idle cycle. `preload="auto"` is what makes the handoff seamless: the
304
+ * next file is already buffered when its turn comes.
305
+ *
306
+ * The FIRST clip goes into the hidden slot and is revealed by the same flip
307
+ * every later clip uses, so there is one reveal path and no black first frame.
308
+ */
309
+ function Clips({ urls, loop, zoom }) {
310
+ const [showA, setShowA] = useState(true);
311
+ const [srcA, setSrcA] = useState(undefined);
312
+ const [srcB, setSrcB] = useState(undefined);
313
+ const [lit, setLit] = useState(false);
314
+ const shown = useRef(true);
315
+ shown.current = showA;
316
+ const at = useRef(0);
317
+ // Load `url` into whichever slot is hidden right now; its `playing` event then
318
+ // flips which slot is shown, crossing the new frame in over the old. A ref for
319
+ // `showA` because this is called from timers and event handlers that must read
320
+ // the current slot, not the one captured when they were created.
321
+ const cue = useCallback((url) => {
322
+ if (shown.current)
323
+ setSrcB(url);
324
+ else
325
+ setSrcA(url);
326
+ }, []);
327
+ const advance = useCallback(() => {
328
+ if (urls.length < 2)
329
+ return;
330
+ at.current = (at.current + 1) % urls.length;
331
+ cue(urls[at.current]);
332
+ }, [urls, cue]);
333
+ // Head of the list on mount and whenever the list changes (a brand's own
334
+ // footage arriving, or a persona changing mood). The first clip is cued into
335
+ // the hidden slot so the reveal below is the only path that ever shows one.
336
+ useEffect(() => {
337
+ at.current = 0;
338
+ setShowA(true);
339
+ setSrcA(undefined);
340
+ setSrcB(undefined);
341
+ setLit(false);
342
+ if (urls.length)
343
+ cue(urls[0]);
344
+ }, [urls, cue]);
345
+ if (!urls.length)
346
+ return null;
347
+ // Only the HIDDEN slot reaching `playing` is a handover — so the flip is
348
+ // "show whoever just started", never a toggle. The SHOWN slot fires `playing`
349
+ // again after any stall or seek, and toggling on that would swap a live frame
350
+ // for a stale one for no reason.
351
+ const reveal = (isA) => {
352
+ if (lit && isA === shown.current)
353
+ return;
354
+ setLit(true);
355
+ setShowA(isA);
356
+ };
357
+ const slotStyle = (isA) => ({
358
+ ...cover(zoom),
359
+ objectFit: 'cover',
360
+ opacity: lit && isA === showA ? 1 : 0,
361
+ transition: 'opacity 1.2s ease',
362
+ });
363
+ const one = (isA, src) => (_jsx("video", { src: src, autoPlay: true, muted: true, playsInline: true,
364
+ // A lone clip repeats itself; a member of a list must be allowed to END so
365
+ // the next can cross in — looping one would freeze the cycle on it.
366
+ loop: urls.length < 2 && loop, preload: "auto", onPlaying: () => reveal(isA), onEnded: urls.length > 1 ? advance : undefined, onError: advance, tabIndex: -1, "aria-hidden": true, style: slotStyle(isA) }, isA ? 'a' : 'b'));
367
+ return (_jsxs(_Fragment, { children: [one(true, srcA), one(false, srcB)] }));
368
+ }
369
+ /** What the scene asks to be painted, or null when that is nothing. */
370
+ function Canvas({ scene, at, zoom }) {
371
+ const links = useMemo(() => scene.playlist.filter(playable), [scene.playlist]);
372
+ if (scene.mode === 'clips') {
373
+ return scene.clips.length ? (_jsx(Clips, { urls: scene.clips, loop: scene.loop, zoom: knobs(scene.clips[0]).zoom ?? zoom })) : null;
374
+ }
375
+ if (scene.mode === 'photo')
376
+ return scene.photo ? _jsx(Photo, { url: scene.photo }) : null;
377
+ if (scene.mode === 'video') {
378
+ const id = videoId(scene.video);
379
+ // start / rate / zoom ride the same URL, so a brand tunes all of them from
380
+ // one configuration value with no rebuild.
381
+ const k = knobs(scene.video);
382
+ return id ? (_jsx(Video, { src: youtube([id], scene.loop, at.origin, k.start), rate: k.rate, zoom: k.zoom ?? zoom, sound: scene.sound })) : null;
383
+ }
384
+ if (links.length === 0)
385
+ return null;
386
+ // An all-YouTube list is handed to YouTube's own playlist player: it holds the
387
+ // queue in one frame, so there is no handover gap between videos and no second
388
+ // player to reveal.
389
+ if (links.every((entry) => entry.provider === 'youtube')) {
390
+ return (_jsx(Video, { src: youtube(links.map((entry) => videoId(entry.url)), scene.loop, at.origin), sound: scene.sound }));
391
+ }
392
+ return _jsx(Rotation, { links: links, loop: scene.loop, at: at });
393
+ }
394
+ export function Backdrop({ mode = 'off', photo = '', video = '', playlist = [], clips = [], loop = true, sound = false, scrim = 0.5, zoom, hosts = HOSTS, ...props }) {
395
+ const [at, setAt] = useState(null);
396
+ useEffect(() => {
397
+ setAt({ origin: window.location.origin, host: window.location.hostname });
398
+ }, []);
399
+ // The gate again, at the render boundary. `merge` guards what a surface STORES;
400
+ // this guards what actually reaches a `src`, so a caller that builds props by
401
+ // hand cannot point an element at a host the media policy would refuse.
402
+ const scene = useMemo(() => ({
403
+ mode,
404
+ photo: media(photo, hosts),
405
+ video,
406
+ playlist,
407
+ clips: files(clips, hosts),
408
+ loop,
409
+ sound,
410
+ }), [mode, photo, video, playlist, clips, loop, sound, hosts]);
411
+ // Off means ABSENT, not hidden: these are third-party frames that autoplay
412
+ // video, so leaving one mounted at opacity 0 would keep it streaming behind a
413
+ // setting that says it is off.
414
+ if (mode === 'off' || !at)
415
+ return null;
416
+ return (_jsxs(YStack, { ...slot('backdrop'), "data-mode": mode, fullscreen: true, overflow: "hidden", pointerEvents: "none", "aria-hidden": true, ...props, children: [_jsx(Canvas, { scene: scene, at: at, zoom: zoom }), _jsx(YStack, { fullscreen: true, bg: "$background", opacity: scrim })] }));
417
+ }
418
+ //# sourceMappingURL=Backdrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Backdrop.js","sourceRoot":"","sources":["../../src/backdrop/Backdrop.tsx"],"names":[],"mappings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,gFAAgF;IAChF,8EAA8E;IAC9E,wEAAwE;IACxE,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC;QACL,IAAI;QACJ,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,KAAK;QACL,QAAQ;QACR,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,IAAI;QACJ,KAAK;KACN,CAAC,EACF,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAC1D,CAAA;IAED,2EAA2E;IAC3E,8EAA8E;IAC9E,+BAA+B;IAC/B,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAA;IAEtC,OAAO,CACL,MAAC,MAAM,OACD,IAAI,CAAC,UAAU,CAAC,eACT,IAAI,EACf,UAAU,QACV,QAAQ,EAAC,QAAQ,EACjB,aAAa,EAAC,MAAM,0BAEhB,KAAK,aAET,KAAC,MAAM,IAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,EAC5C,KAAC,MAAM,IAAC,UAAU,QAAC,EAAE,EAAC,aAAa,EAAC,OAAO,EAAE,KAAK,GAAI,IAC/C,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.youtube = exports.web = exports.videoId = exports.twitch = exports.scene = exports.provider = exports.playable = exports.merge = exports.media = exports.link = exports.knobs = exports.files = exports.command = exports.channel = exports.PRESETS = exports.HOSTS = exports.DWELL = exports.BLANK = exports.Backdrop = void 0;
4
+ /**
5
+ * @hanzo/ui/backdrop — ambient scenery behind a surface, on @hanzo/gui.
6
+ *
7
+ * `Backdrop` paints it and `scene.ts` decides what may be painted. The split is
8
+ * the point: every rule about what can play, what a link means and what a typed
9
+ * command does is decidable from data alone, so a surface answers a `/bg` line,
10
+ * validates what came back out of storage and seeds a settings panel by CALLING
11
+ * a function — nothing mounted, nothing measured — and the suite holds all of it
12
+ * to account without rendering anything.
13
+ *
14
+ * Props-in, no store: a surface holds the `Scene` in whatever state it already
15
+ * has and passes it. `merge` is the ONE gate a change goes through, and
16
+ * `Backdrop` re-applies the media rule at the render boundary, so a scene that
17
+ * arrives from storage, from a model's suggestion or from hand-written props is
18
+ * held to the same rule in every direction.
19
+ *
20
+ * WEB ONLY, and off the main barrel for that reason — an embed is an `<iframe>`,
21
+ * a clip is a `<video>`, and the cover crop is written in `vh`/`vw`. `Grid` sits
22
+ * at its own subpath on the same rule.
23
+ *
24
+ * The rules live in `scene.ts` rather than a `backdrop.ts` beside `Backdrop.tsx`
25
+ * because the two would emit `backdrop.js` and `Backdrop.js` into one directory,
26
+ * which is ONE file on macOS. `dist.test.ts` holds that line for the whole
27
+ * package now; the convention it enforces is the one already here — lowercase
28
+ * for a module of rules, capitalised for a component.
29
+ */
30
+ var Backdrop_1 = require("./Backdrop.cjs");
31
+ Object.defineProperty(exports, "Backdrop", { enumerable: true, get: function () { return Backdrop_1.Backdrop; } });
32
+ var scene_1 = require("./scene.cjs");
33
+ Object.defineProperty(exports, "BLANK", { enumerable: true, get: function () { return scene_1.BLANK; } });
34
+ Object.defineProperty(exports, "DWELL", { enumerable: true, get: function () { return scene_1.DWELL; } });
35
+ Object.defineProperty(exports, "HOSTS", { enumerable: true, get: function () { return scene_1.HOSTS; } });
36
+ Object.defineProperty(exports, "PRESETS", { enumerable: true, get: function () { return scene_1.PRESETS; } });
37
+ Object.defineProperty(exports, "channel", { enumerable: true, get: function () { return scene_1.channel; } });
38
+ Object.defineProperty(exports, "command", { enumerable: true, get: function () { return scene_1.command; } });
39
+ Object.defineProperty(exports, "files", { enumerable: true, get: function () { return scene_1.files; } });
40
+ Object.defineProperty(exports, "knobs", { enumerable: true, get: function () { return scene_1.knobs; } });
41
+ Object.defineProperty(exports, "link", { enumerable: true, get: function () { return scene_1.link; } });
42
+ Object.defineProperty(exports, "media", { enumerable: true, get: function () { return scene_1.media; } });
43
+ Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return scene_1.merge; } });
44
+ Object.defineProperty(exports, "playable", { enumerable: true, get: function () { return scene_1.playable; } });
45
+ Object.defineProperty(exports, "provider", { enumerable: true, get: function () { return scene_1.provider; } });
46
+ Object.defineProperty(exports, "scene", { enumerable: true, get: function () { return scene_1.scene; } });
47
+ Object.defineProperty(exports, "twitch", { enumerable: true, get: function () { return scene_1.twitch; } });
48
+ Object.defineProperty(exports, "videoId", { enumerable: true, get: function () { return scene_1.videoId; } });
49
+ Object.defineProperty(exports, "web", { enumerable: true, get: function () { return scene_1.web; } });
50
+ Object.defineProperty(exports, "youtube", { enumerable: true, get: function () { return scene_1.youtube; } });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @hanzo/ui/backdrop — ambient scenery behind a surface, on @hanzo/gui.
3
+ *
4
+ * `Backdrop` paints it and `scene.ts` decides what may be painted. The split is
5
+ * the point: every rule about what can play, what a link means and what a typed
6
+ * command does is decidable from data alone, so a surface answers a `/bg` line,
7
+ * validates what came back out of storage and seeds a settings panel by CALLING
8
+ * a function — nothing mounted, nothing measured — and the suite holds all of it
9
+ * to account without rendering anything.
10
+ *
11
+ * Props-in, no store: a surface holds the `Scene` in whatever state it already
12
+ * has and passes it. `merge` is the ONE gate a change goes through, and
13
+ * `Backdrop` re-applies the media rule at the render boundary, so a scene that
14
+ * arrives from storage, from a model's suggestion or from hand-written props is
15
+ * held to the same rule in every direction.
16
+ *
17
+ * WEB ONLY, and off the main barrel for that reason — an embed is an `<iframe>`,
18
+ * a clip is a `<video>`, and the cover crop is written in `vh`/`vw`. `Grid` sits
19
+ * at its own subpath on the same rule.
20
+ *
21
+ * The rules live in `scene.ts` rather than a `backdrop.ts` beside `Backdrop.tsx`
22
+ * because the two would emit `backdrop.js` and `Backdrop.js` into one directory,
23
+ * which is ONE file on macOS. `dist.test.ts` holds that line for the whole
24
+ * package now; the convention it enforces is the one already here — lowercase
25
+ * for a module of rules, capitalised for a component.
26
+ */
27
+ export { Backdrop, type BackdropProps } from './Backdrop.js';
28
+ export { BLANK, DWELL, HOSTS, PRESETS, channel, command, files, knobs, link, media, merge, playable, provider, scene, twitch, videoId, web, youtube, type Link, type Mode, type Preset, type Provider, type Scene, } from './scene.js';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backdrop/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAEzD,OAAO,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,GAAG,EACH,OAAO,EACP,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,KAAK,GACX,MAAM,SAAS,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @hanzo/ui/backdrop — ambient scenery behind a surface, on @hanzo/gui.
3
+ *
4
+ * `Backdrop` paints it and `scene.ts` decides what may be painted. The split is
5
+ * the point: every rule about what can play, what a link means and what a typed
6
+ * command does is decidable from data alone, so a surface answers a `/bg` line,
7
+ * validates what came back out of storage and seeds a settings panel by CALLING
8
+ * a function — nothing mounted, nothing measured — and the suite holds all of it
9
+ * to account without rendering anything.
10
+ *
11
+ * Props-in, no store: a surface holds the `Scene` in whatever state it already
12
+ * has and passes it. `merge` is the ONE gate a change goes through, and
13
+ * `Backdrop` re-applies the media rule at the render boundary, so a scene that
14
+ * arrives from storage, from a model's suggestion or from hand-written props is
15
+ * held to the same rule in every direction.
16
+ *
17
+ * WEB ONLY, and off the main barrel for that reason — an embed is an `<iframe>`,
18
+ * a clip is a `<video>`, and the cover crop is written in `vh`/`vw`. `Grid` sits
19
+ * at its own subpath on the same rule.
20
+ *
21
+ * The rules live in `scene.ts` rather than a `backdrop.ts` beside `Backdrop.tsx`
22
+ * because the two would emit `backdrop.js` and `Backdrop.js` into one directory,
23
+ * which is ONE file on macOS. `dist.test.ts` holds that line for the whole
24
+ * package now; the convention it enforces is the one already here — lowercase
25
+ * for a module of rules, capitalised for a component.
26
+ */
27
+ export { Backdrop } from './Backdrop.js';
28
+ export { BLANK, DWELL, HOSTS, PRESETS, channel, command, files, knobs, link, media, merge, playable, provider, scene, twitch, videoId, web, youtube, } from './scene.js';
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/backdrop/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA;AAEzD,OAAO,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,GAAG,EACH,OAAO,GAMR,MAAM,SAAS,CAAA"}