@oxyhq/bloom 1.6.0 → 1.7.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/NOTICE +46 -0
- package/docs/media-flight.mdx +151 -3
- package/lib/commonjs/media-flight/MediaFlightLayer.js +4 -5
- package/lib/commonjs/media-flight/MediaFlightLayer.js.map +1 -1
- package/lib/commonjs/media-flight/media-node.web.js +37 -1
- package/lib/commonjs/media-flight/media-node.web.js.map +1 -1
- package/lib/module/media-flight/MediaFlightLayer.js +4 -5
- package/lib/module/media-flight/MediaFlightLayer.js.map +1 -1
- package/lib/module/media-flight/media-node.web.js +37 -1
- package/lib/module/media-flight/media-node.web.js.map +1 -1
- package/lib/typescript/commonjs/media-flight/MediaFlightLayer.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-flight/media-node.web.d.ts.map +1 -1
- package/lib/typescript/module/media-flight/MediaFlightLayer.d.ts.map +1 -1
- package/lib/typescript/module/media-flight/media-node.web.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/media-flight/MediaFlightLayer.tsx +4 -5
- package/src/media-flight/media-node.web.ts +42 -1
package/NOTICE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@oxyhq/bloom — third-party notices
|
|
2
|
+
=================================
|
|
3
|
+
|
|
4
|
+
Bloom includes code derived from other open-source projects. Each derived file
|
|
5
|
+
carries a header naming its source, the version it was taken from, and what was
|
|
6
|
+
changed; this file carries the licences those sources require, in full.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
react-native-teleport
|
|
10
|
+
---------------------
|
|
11
|
+
|
|
12
|
+
https://github.com/kirillzyusko/react-native-teleport — by Kiryl Ziusko.
|
|
13
|
+
|
|
14
|
+
Bloom's media-flight layer moves one media element between hosts instead of
|
|
15
|
+
rebuilding it at each end. Bloom arrived at the web technique independently and
|
|
16
|
+
then found that react-native-teleport had solved the same problem, better in
|
|
17
|
+
places: it is the source of the `moveBefore`-with-`insertBefore`-fallback move
|
|
18
|
+
used in `src/media-flight/media-node.web.ts`, and — where noted in those files —
|
|
19
|
+
of Bloom's native re-parenting.
|
|
20
|
+
|
|
21
|
+
We are grateful for it, and for the fact that it is readable: the reasoning in
|
|
22
|
+
its source and its documentation is what let us check our own.
|
|
23
|
+
|
|
24
|
+
Taken from version 1.2.0.
|
|
25
|
+
|
|
26
|
+
MIT License
|
|
27
|
+
|
|
28
|
+
Copyright (c) 2025 Kiryl Ziusko
|
|
29
|
+
|
|
30
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
32
|
+
in the Software without restriction, including without limitation the rights
|
|
33
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
34
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
35
|
+
furnished to do so, subject to the following conditions:
|
|
36
|
+
|
|
37
|
+
The above copyright notice and this permission notice shall be included in all
|
|
38
|
+
copies or substantial portions of the Software.
|
|
39
|
+
|
|
40
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
41
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
42
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
43
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
44
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
45
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
46
|
+
SOFTWARE.
|
package/docs/media-flight.mdx
CHANGED
|
@@ -149,9 +149,67 @@ and "did `currentTime` advance monotonically?", not time-to-first-frame.
|
|
|
149
149
|
|
|
150
150
|
## Why this exists rather than `react-native-teleport`
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
**Correction, 2026-08-26.** This section used to say that `react-native-teleport`
|
|
153
|
+
requires `presentation: 'transparentModal'` and "has no web story at all". Both
|
|
154
|
+
were false, both were written here without checking, and they described someone
|
|
155
|
+
else's work wrongly in a public repository. Verified against the published
|
|
156
|
+
package (`react-native-teleport@1.2.0`), what is actually true is the opposite,
|
|
157
|
+
and it is worth reading:
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
// lib/module/views/Portal/index.js — the WEB implementation
|
|
161
|
+
if (!elRef.current) elRef.current = document.createElement("div"); // outside React
|
|
162
|
+
const supportsMoveBefore = "moveBefore" in Element.prototype;
|
|
163
|
+
parent.moveBefore(child, before); // insertBefore fallback
|
|
164
|
+
createPortal(children, elRef.current);
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Their own documentation says so plainly — "✅ Works across **iOS, Android, and
|
|
168
|
+
Web**" (`docs/docs/intro.mdx`) and "Cross-platform: Consistent on iOS, Android
|
|
169
|
+
and web" (`docs/docs/guides/portal.md`) — which is what this guide should have
|
|
170
|
+
checked before claiming otherwise.
|
|
171
|
+
|
|
172
|
+
That is **the same mechanism** described elsewhere in this guide as Bloom's:
|
|
173
|
+
a wrapper created outside React, `createPortal` into a container whose identity
|
|
174
|
+
never changes, and the wrapper moved between hosts. Down to the `moveBefore`
|
|
175
|
+
with a fallback. Bloom arrived at it independently, which is corroboration that
|
|
176
|
+
the technique is right — not grounds for having said they lacked it.
|
|
177
|
+
|
|
178
|
+
**The real reasons Bloom has its own**, both checkable:
|
|
179
|
+
|
|
180
|
+
- **Bloom needed a flight, not a portal.** The animated box, the anchor
|
|
181
|
+
registry, the rect measurement, the poster behind the media, `contentFit`, and
|
|
182
|
+
the shared-player semantics are the feature; teleporting the node is one piece
|
|
183
|
+
of it.
|
|
184
|
+
- **`react-native-teleport` ships native code** — `codegenConfig`
|
|
185
|
+
(`TeleportViewSpec`), C++ shadow nodes under `common/cpp/`, `android/build.gradle`,
|
|
186
|
+
`Teleport.podspec`. Bloom has never shipped native code, deliberately: adding
|
|
187
|
+
it would force a native rebuild on Mention, Allo, Alia, TNP, Homiio and Inbox
|
|
188
|
+
at the next bump.
|
|
189
|
+
|
|
190
|
+
### What Bloom takes from them, and where to look for more
|
|
191
|
+
|
|
192
|
+
Bloom's web move primitive is now **theirs**: `moveBefore` with an
|
|
193
|
+
`insertBefore` fallback, derived from `src/views/Portal/index.tsx` in
|
|
194
|
+
react-native-teleport 1.2.0 (MIT, Copyright (c) 2025 Kiryl Ziusko — see
|
|
195
|
+
`NOTICE` at the repository root, and the header on
|
|
196
|
+
`src/media-flight/media-node.web.ts`). `appendChild` of an attached node is a
|
|
197
|
+
remove followed by an insert; `moveBefore` does not run the removal steps at
|
|
198
|
+
all. Measured, it makes no difference to a playing `<video>` — and Bloom is not
|
|
199
|
+
only video, so the correct primitive is worth having for focus, `<iframe>`s and
|
|
200
|
+
CSS animations, where the aborted-removal reprieve does not apply.
|
|
201
|
+
|
|
202
|
+
**This is a FORK, and forks go stale.** Their fixes will not arrive here on
|
|
203
|
+
their own, and their repository is active — there is a note in their blog from
|
|
204
|
+
August 2026 about faster re-parenting on Android that Bloom does not have.
|
|
205
|
+
Anyone maintaining this in a year: the upstream is
|
|
206
|
+
https://github.com/kirillzyusko/react-native-teleport, and it is worth reading
|
|
207
|
+
before rewriting anything here.
|
|
208
|
+
|
|
209
|
+
**And what Bloom did NOT do:** their native side re-parents for real. Bloom's
|
|
210
|
+
native path does not — it keeps the origin, the flying surface and the
|
|
211
|
+
destination as three views on one player (see the section on decoders below).
|
|
212
|
+
The re-parenting here is web-only.
|
|
155
213
|
|
|
156
214
|
Under expo-router on web the origin route is **unmounted** the moment the URL
|
|
157
215
|
changes. Anything the origin was rendering — a `VideoView`, a decoded image —
|
|
@@ -398,6 +456,96 @@ i.e. visibly not the thumbnail it is replacing. `width`/`height` are
|
|
|
398
456
|
interpolated instead; the position still rides a transform, so the only layout
|
|
399
457
|
work per frame is one absolutely-positioned node resizing.
|
|
400
458
|
|
|
459
|
+
## Open: three decoders on native, and why the obvious cut is wrong
|
|
460
|
+
|
|
461
|
+
On web a flight re-parents one element, so there is exactly one video view for
|
|
462
|
+
the whole leg. **On native there is no re-parenting**, so during a flight the
|
|
463
|
+
origin host, the destination host and the layer's own flying surface are three
|
|
464
|
+
views on one player — and the flying one is a `TextureVideoView`, because a
|
|
465
|
+
`SurfaceView` composites outside the view hierarchy and would ignore the clip,
|
|
466
|
+
radius and transform that a flying box is made of.
|
|
467
|
+
|
|
468
|
+
Three concurrent decoders is not a detail on a phone. Many Android devices
|
|
469
|
+
guarantee only one or two concurrent hardware decoders; the third falls back to
|
|
470
|
+
software or fails, which on a low-end device is a black video — worse than
|
|
471
|
+
anything this transition is trying to hide.
|
|
472
|
+
|
|
473
|
+
**The obvious cut is to paint the poster on the flying surface for the ~300 ms
|
|
474
|
+
of the leg. Do not do that.** It is the same artefact this package spent a day
|
|
475
|
+
removing from the web path: a 267–282 ms frozen picture mid-flight was measured,
|
|
476
|
+
treated as the defect, and made the merge criterion. A still frame for 300 ms
|
|
477
|
+
cannot be a defect on web and an optimisation on native. And it is in fact
|
|
478
|
+
worse, because the poster is a *different image* — usually frame zero, not the
|
|
479
|
+
frame the viewer was looking at — so the sequence becomes playing at 4.28 s, a
|
|
480
|
+
jump to an unrelated still, then live again at 4.6 s. Two content jumps instead
|
|
481
|
+
of one freeze.
|
|
482
|
+
|
|
483
|
+
**If the decoder count does turn out to hurt, the cut goes the other way: the
|
|
484
|
+
ENDS paint posters and the flying surface keeps the video.** During a leg the
|
|
485
|
+
two hosts are covered by the surface that is flying; nobody is looking at them.
|
|
486
|
+
The one being watched should be the one that plays.
|
|
487
|
+
|
|
488
|
+
That costs something honest: it needs the layer to arbitrate who paints while a
|
|
489
|
+
leg is live — the rank machinery that exists on web and that native deliberately
|
|
490
|
+
does not have. It may not be worth it.
|
|
491
|
+
|
|
492
|
+
### What is measured about it, and what is not
|
|
493
|
+
|
|
494
|
+
Measured on an Android emulator (2026-08-26), with the flight isolated from the
|
|
495
|
+
route change by clearing app data and deep-linking straight into the fullscreen
|
|
496
|
+
route:
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
slot called Cannot set prop 'player'
|
|
500
|
+
cold, no flight x2 0 / 3 0 / 0
|
|
501
|
+
with a flight x2 4 / 4 2 / 2
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**The third view is real: one per flight, and it is not remounted.** With no
|
|
505
|
+
flight there is no `TextureVideoView` and no error; with one, the layer mounts
|
|
506
|
+
its own `MediaSurface` (no `renderVideo`, so `surfaceType` defaults to
|
|
507
|
+
`'textureView'`). The name in the error is the RUNTIME class of the instance —
|
|
508
|
+
`ConcreteViewProp.kt` throws `PropSetException(name, onView::class, …)` — so it
|
|
509
|
+
is not a mislabelling.
|
|
510
|
+
|
|
511
|
+
Traced on device, one flight:
|
|
512
|
+
|
|
513
|
+
```
|
|
514
|
+
01:09:41.923 MOUNT <id> ak19
|
|
515
|
+
01:09:42.846 PropSetException: Cannot set prop 'player' on view 'TextureVideoView'
|
|
516
|
+
01:09:42.868 UNMOUNT <id> ak19 same instance
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
**The exception fires at the UNBIND, not at the mount** — ~920 ms after mounting
|
|
520
|
+
and 22 ms before the surface is destroyed. That is the `player={null}` commit
|
|
521
|
+
`releaseFlight` renders on the way out: the same instruction the web path
|
|
522
|
+
depends on (it makes an element go quiet without an event) is rejected by the
|
|
523
|
+
Kotlin view, which reports being "notified of disconnection from the player
|
|
524
|
+
view, even though it's still connected". Nothing is wrong with the mount, and
|
|
525
|
+
anyone reading this looking to fix mounting would be looking in the wrong place.
|
|
526
|
+
|
|
527
|
+
One mount, one unmount, one exception, 2 flights of 2. Matching a bench
|
|
528
|
+
measurement of the same path: the layer mounts its arm ONCE per flight, and the
|
|
529
|
+
`detached` commit is a re-render rather than a remount.
|
|
530
|
+
|
|
531
|
+
**No observed consequence.** Playback continues, and picture-in-picture opens
|
|
532
|
+
with the video playing rather than black or frozen. A failed assignment onto a
|
|
533
|
+
view that is destroyed 22 ms later has nobody left to affect. Note the limit of
|
|
534
|
+
that claim: it rules out the mechanism we suspected — a remount restarting the
|
|
535
|
+
decoder, hidden by an emulator that has no real ones — rather than proving no
|
|
536
|
+
consequence exists at all.
|
|
537
|
+
|
|
538
|
+
**What is NOT measured: whether any of this costs anything on real hardware.**
|
|
539
|
+
An emulator has no real hardware decoders, so the decoder-count question — the
|
|
540
|
+
reason this section exists — cannot be answered where everything else in this
|
|
541
|
+
package was measured. It needs a physical device.
|
|
542
|
+
|
|
543
|
+
Until then this section is the decision, not the code. The upstream report is
|
|
544
|
+
written and deliberately not filed: an issue about an error with no symptom is
|
|
545
|
+
easy to archive, and it may share a root with the web-side defect already filed
|
|
546
|
+
(`expo/expo#49359` — expo-video handling several views on one player). If a real
|
|
547
|
+
device shows a consequence, it goes up with this attached.
|
|
548
|
+
|
|
401
549
|
## Android: a flight crosses a surface-type boundary
|
|
402
550
|
|
|
403
551
|
expo-video renders Android video into a `SurfaceView` by default. A flight
|
|
@@ -18,11 +18,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
18
18
|
* ## The problem it exists for
|
|
19
19
|
*
|
|
20
20
|
* A shared-element transition normally assumes the ORIGIN screen is still
|
|
21
|
-
* mounted while the element travels
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* before the first frame of the transition.
|
|
21
|
+
* mounted while the element travels. Under expo-router on web the origin route
|
|
22
|
+
* is UNMOUNTED the moment the URL changes, so anything the origin was rendering
|
|
23
|
+
* (a `VideoView`, a decoded image) is gone before the first frame of the
|
|
24
|
+
* transition.
|
|
26
25
|
*
|
|
27
26
|
* The fix is to move the surface OUT of both screens for the duration of the
|
|
28
27
|
* flight. `<MediaFlightLayer>` is mounted ONCE at the app root and renders
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_index","_portal","_MediaSurface","_store","_jsxRuntime","MediaFlightLayer","flights","useSyncExternalStore","subscribeToFlights","getFlights","length","jsx","Portal","children","OverlayRoot","map","flight","MediaFlightSurface","id","displayName","from","to","progress","content","cornerRadius","contentFit","surfaceType","unbinding","useEffect","notifySurfaceMounted","originX","x","originY","y","boxStyle","useAnimatedStyle","transform","translateX","interpolate","value","translateY","width","height","MediaSurface","detached","pointerEvents","style","styles","box","left","top","borderRadius","StyleSheet","create","position","overflow"],"sourceRoot":"../../../src","sources":["media-flight/MediaFlightLayer.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_index","_portal","_MediaSurface","_store","_jsxRuntime","MediaFlightLayer","flights","useSyncExternalStore","subscribeToFlights","getFlights","length","jsx","Portal","children","OverlayRoot","map","flight","MediaFlightSurface","id","displayName","from","to","progress","content","cornerRadius","contentFit","surfaceType","unbinding","useEffect","notifySurfaceMounted","originX","x","originY","y","boxStyle","useAnimatedStyle","transform","translateX","interpolate","value","translateY","width","height","MediaSurface","detached","pointerEvents","style","styles","box","left","top","borderRadius","StyleSheet","create","position","overflow"],"sourceRoot":"../../../src","sources":["media-flight/MediaFlightLayer.tsx"],"mappings":";;;;;;AAoCA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA+E,IAAAO,WAAA,GAAAP,OAAA;AA3C/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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kB,YAAY,EAAE3B;IAAa,CAAC,EAAEU,QAAQ;EAAE,CACtF,CAAC;AAEN;AAEA,MAAMa,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,GAAG,EAAE;IACHM,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -172,6 +172,42 @@ function pick(claims) {
|
|
|
172
172
|
return best;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
/**
|
|
176
|
+
* An element that can be MOVED rather than removed and re-inserted.
|
|
177
|
+
*
|
|
178
|
+
* `moveBefore` is newer than TypeScript's DOM library, so the capability is
|
|
179
|
+
* named here and checked at runtime rather than assumed.
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* DERIVED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`,
|
|
184
|
+
* its `moveElementTo`. MIT, Copyright (c) 2025 Kiryl Ziusko; see `NOTICE`.
|
|
185
|
+
*
|
|
186
|
+
* Changed: typed for TypeScript's DOM library, which does not know `moveBefore`
|
|
187
|
+
* yet, and reduced to the append case Bloom needs (no `before` sibling).
|
|
188
|
+
*
|
|
189
|
+
* Why it is worth taking rather than keeping `appendChild`: `appendChild` of an
|
|
190
|
+
* ATTACHED node is a remove followed by an insert, and the only reason media
|
|
191
|
+
* survives it is that HTML's removal steps await a stable state and abort if
|
|
192
|
+
* the node is back in a document by then. `moveBefore` does not run the removal
|
|
193
|
+
* steps at all — it is the state-preserving primitive, which matters for
|
|
194
|
+
* anything the abort does not cover: focus, `<iframe>`s, CSS animations.
|
|
195
|
+
*
|
|
196
|
+
* Measured for a playing `<video>` in Chrome 151: indistinguishable from
|
|
197
|
+
* `appendChild` (ct 0.60 -> 1.00, never paused, 6 frames, worst frame gap
|
|
198
|
+
* 100 ms — the clip's own cadence — under both), while a real removal pauses
|
|
199
|
+
* and freezes. So this is not a fix for a defect Bloom has; it is the correct
|
|
200
|
+
* primitive for the ones it does not have yet.
|
|
201
|
+
*/
|
|
202
|
+
function moveInto(parent, child) {
|
|
203
|
+
if (supportsMoveBefore && child.parentNode !== null) {
|
|
204
|
+
parent.moveBefore(child, null);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
parent.appendChild(child);
|
|
208
|
+
}
|
|
209
|
+
const supportsMoveBefore = typeof Element !== 'undefined' && 'moveBefore' in Element.prototype;
|
|
210
|
+
|
|
175
211
|
/**
|
|
176
212
|
* Put the wrapper where its top claim says, in ONE synchronous move.
|
|
177
213
|
*
|
|
@@ -184,7 +220,7 @@ function place(record) {
|
|
|
184
220
|
const target = topClaim(record)?.el ?? holder(reg);
|
|
185
221
|
if (target === null) return;
|
|
186
222
|
if (record.wrapper.parentElement === target) return;
|
|
187
|
-
target
|
|
223
|
+
moveInto(target, record.wrapper);
|
|
188
224
|
}
|
|
189
225
|
function sameRender(a, b) {
|
|
190
226
|
if (a.contentFit !== b.contentFit) return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_store","require","HOST_RANK","exports","FLIGHT_RANK","registry","globalThis","__oxyhq_bloom_media_nodes__","nodes","Map","listeners","Set","snapshot","holder","seq","HOLDER_ID","reg","document","isConnected","existing","getElementById","created","createElement","id","style","cssText","setAttribute","body","appendChild","makeWrapper","wrapper","recordFor","render","record","get","claims","EMPTY_RENDER","set","content","uri","contentFit","renderVideo","undefined","nativeControls","accessibilityLabel","flightId","topClaim","pick","topRender","filter","claim","best","rank","place","target","el","parentElement","sameRender","a","b","x","y","kind","player","poster","publish","next","push","previous","unchanged","length","every","view","i","candidate","listener","claimMediaNode","find","releaseMediaNode","before","hasFlight","delete","remove","hasMediaNode","subscribeToMediaNodes","add","getMediaNodes","resetMediaNodes","values","clear"],"sourceRoot":"../../../src","sources":["media-flight/media-node.web.ts"],"mappings":";;;;;;;;;;;;AA6DA,IAAAA,MAAA,GAAAC,OAAA;AA7DA;AACA;AACA;AACA;AACA;AACA;A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,CAAC;AAC5B;;AAEA;AACA,SAASa,SAASA,CAACf,MAAuB,EAAyB;EACjE,OAAOc,IAAI,CAACd,MAAM,CAACE,MAAM,CAACc,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAAClB,MAAM,KAAKU,SAAS,CAAC,CAAC;AAC1E;AAEA,SAASK,IAAIA,CAACZ,MAAiC,EAAyB;EACtE,IAAIgB,IAA2B,GAAG,IAAI;EACtC,KAAK,MAAMD,KAAK,IAAIf,MAAM,EAAE;IAC1B,IAAIgB,IAAI,KAAK,IAAI,IAAID,KAAK,CAACE,IAAI,GAAGD,IAAI,CAACC,IAAI,IAAKF,KAAK,CAACE,IAAI,KAAKD,IAAI,CAACC,IAAI,IAAIF,KAAK,CAACpC,GAAG,GAAGqC,IAAI,CAACrC,GAAI,EAAE;MACjGqC,IAAI,GAAGD,KAAK;IACd;EACF;EACA,OAAOC,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,KAAKA,
|
|
1
|
+
{"version":3,"names":["_store","require","HOST_RANK","exports","FLIGHT_RANK","registry","globalThis","__oxyhq_bloom_media_nodes__","nodes","Map","listeners","Set","snapshot","holder","seq","HOLDER_ID","reg","document","isConnected","existing","getElementById","created","createElement","id","style","cssText","setAttribute","body","appendChild","makeWrapper","wrapper","recordFor","render","record","get","claims","EMPTY_RENDER","set","content","uri","contentFit","renderVideo","undefined","nativeControls","accessibilityLabel","flightId","topClaim","pick","topRender","filter","claim","best","rank","moveInto","parent","child","supportsMoveBefore","parentNode","moveBefore","Element","prototype","place","target","el","parentElement","sameRender","a","b","x","y","kind","player","poster","publish","next","push","previous","unchanged","length","every","view","i","candidate","listener","claimMediaNode","find","releaseMediaNode","before","hasFlight","delete","remove","hasMediaNode","subscribeToMediaNodes","add","getMediaNodes","resetMediaNodes","values","clear"],"sourceRoot":"../../../src","sources":["media-flight/media-node.web.ts"],"mappings":";;;;;;;;;;;;AA6DA,IAAAA,MAAA,GAAAC,OAAA;AA7D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EACtB,KAAK,MAAM4B,MAAM,IAAIjB,GAAG,CAACR,KAAK,CAACwF,MAAM,CAAC,CAAC,EAAE/D,MAAM,CAACH,OAAO,CAAC4D,MAAM,CAAC,CAAC;EAChE1E,GAAG,CAACR,KAAK,CAACyF,KAAK,CAAC,CAAC;EACjBjF,GAAG,CAACJ,QAAQ,GAAG,EAAE;EACjB,IAAII,GAAG,CAACH,MAAM,KAAK,IAAI,EAAE;IACvBG,GAAG,CAACH,MAAM,CAAC6E,MAAM,CAAC,CAAC;IACnB1E,GAAG,CAACH,MAAM,GAAG,IAAI;EACnB;EACA,KAAK,MAAMsE,QAAQ,IAAInE,GAAG,CAACN,SAAS,EAAEyE,QAAQ,CAAC,CAAC;AAClD","ignoreList":[]}
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
* ## The problem it exists for
|
|
7
7
|
*
|
|
8
8
|
* A shared-element transition normally assumes the ORIGIN screen is still
|
|
9
|
-
* mounted while the element travels
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* before the first frame of the transition.
|
|
9
|
+
* mounted while the element travels. Under expo-router on web the origin route
|
|
10
|
+
* is UNMOUNTED the moment the URL changes, so anything the origin was rendering
|
|
11
|
+
* (a `VideoView`, a decoded image) is gone before the first frame of the
|
|
12
|
+
* transition.
|
|
14
13
|
*
|
|
15
14
|
* The fix is to move the surface OUT of both screens for the duration of the
|
|
16
15
|
* flight. `<MediaFlightLayer>` is mounted ONCE at the app root and renders
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useSyncExternalStore","StyleSheet","interpolate","useAnimatedStyle","OverlayRoot","Portal","MediaSurface","getFlights","notifySurfaceMounted","subscribeToFlights","jsx","_jsx","MediaFlightLayer","flights","length","children","map","flight","MediaFlightSurface","id","displayName","from","to","progress","content","cornerRadius","contentFit","surfaceType","unbinding","originX","x","originY","y","boxStyle","transform","translateX","value","translateY","width","height","detached","pointerEvents","style","styles","box","left","top","borderRadius","create","position","overflow"],"sourceRoot":"../../../src","sources":["media-flight/MediaFlightLayer.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["useEffect","useSyncExternalStore","StyleSheet","interpolate","useAnimatedStyle","OverlayRoot","Portal","MediaSurface","getFlights","notifySurfaceMounted","subscribeToFlights","jsx","_jsx","MediaFlightLayer","flights","length","children","map","flight","MediaFlightSurface","id","displayName","from","to","progress","content","cornerRadius","contentFit","surfaceType","unbinding","originX","x","originY","y","boxStyle","transform","translateX","value","translateY","width","height","detached","pointerEvents","style","styles","box","left","top","borderRadius","create","position","overflow"],"sourceRoot":"../../../src","sources":["media-flight/MediaFlightLayer.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,oBAAoB,QAAQ,OAAO;AACvD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;AAEvE,SAASC,WAAW,QAAQ,qBAAY;AACxC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,UAAU,EAAEC,oBAAoB,EAAEC,kBAAkB,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG/E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAA,EAAG;EACjC,MAAMC,OAAO,GAAGb,oBAAoB,CAACS,kBAAkB,EAAEF,UAAU,EA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
|
165
|
+
/**
|
|
166
|
+
* An element that can be MOVED rather than removed and re-inserted.
|
|
167
|
+
*
|
|
168
|
+
* `moveBefore` is newer than TypeScript's DOM library, so the capability is
|
|
169
|
+
* named here and checked at runtime rather than assumed.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* DERIVED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`,
|
|
174
|
+
* its `moveElementTo`. MIT, Copyright (c) 2025 Kiryl Ziusko; see `NOTICE`.
|
|
175
|
+
*
|
|
176
|
+
* Changed: typed for TypeScript's DOM library, which does not know `moveBefore`
|
|
177
|
+
* yet, and reduced to the append case Bloom needs (no `before` sibling).
|
|
178
|
+
*
|
|
179
|
+
* Why it is worth taking rather than keeping `appendChild`: `appendChild` of an
|
|
180
|
+
* ATTACHED node is a remove followed by an insert, and the only reason media
|
|
181
|
+
* survives it is that HTML's removal steps await a stable state and abort if
|
|
182
|
+
* the node is back in a document by then. `moveBefore` does not run the removal
|
|
183
|
+
* steps at all — it is the state-preserving primitive, which matters for
|
|
184
|
+
* anything the abort does not cover: focus, `<iframe>`s, CSS animations.
|
|
185
|
+
*
|
|
186
|
+
* Measured for a playing `<video>` in Chrome 151: indistinguishable from
|
|
187
|
+
* `appendChild` (ct 0.60 -> 1.00, never paused, 6 frames, worst frame gap
|
|
188
|
+
* 100 ms — the clip's own cadence — under both), while a real removal pauses
|
|
189
|
+
* and freezes. So this is not a fix for a defect Bloom has; it is the correct
|
|
190
|
+
* primitive for the ones it does not have yet.
|
|
191
|
+
*/
|
|
192
|
+
function moveInto(parent, child) {
|
|
193
|
+
if (supportsMoveBefore && child.parentNode !== null) {
|
|
194
|
+
parent.moveBefore(child, null);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
parent.appendChild(child);
|
|
198
|
+
}
|
|
199
|
+
const supportsMoveBefore = typeof Element !== 'undefined' && 'moveBefore' in Element.prototype;
|
|
200
|
+
|
|
165
201
|
/**
|
|
166
202
|
* Put the wrapper where its top claim says, in ONE synchronous move.
|
|
167
203
|
*
|
|
@@ -174,7 +210,7 @@ function place(record) {
|
|
|
174
210
|
const target = topClaim(record)?.el ?? holder(reg);
|
|
175
211
|
if (target === null) return;
|
|
176
212
|
if (record.wrapper.parentElement === target) return;
|
|
177
|
-
target
|
|
213
|
+
moveInto(target, record.wrapper);
|
|
178
214
|
}
|
|
179
215
|
function sameRender(a, b) {
|
|
180
216
|
if (a.contentFit !== b.contentFit) return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hasFlight","HOST_RANK","FLIGHT_RANK","registry","globalThis","__oxyhq_bloom_media_nodes__","nodes","Map","listeners","Set","snapshot","holder","seq","HOLDER_ID","reg","document","isConnected","existing","getElementById","created","createElement","id","style","cssText","setAttribute","body","appendChild","makeWrapper","wrapper","recordFor","render","record","get","claims","EMPTY_RENDER","set","content","uri","contentFit","renderVideo","undefined","nativeControls","accessibilityLabel","flightId","topClaim","pick","topRender","filter","claim","best","rank","place","target","el","parentElement","sameRender","a","b","x","y","kind","player","poster","publish","next","push","previous","unchanged","length","every","view","i","candidate","listener","claimMediaNode","find","releaseMediaNode","before","delete","remove","hasMediaNode","subscribeToMediaNodes","add","getMediaNodes","resetMediaNodes","values","clear"],"sourceRoot":"../../../src","sources":["media-flight/media-node.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,YAAS;;AAGnC;;AAYA;AACA,OAAO,MAAMC,SAAS,GAAG,CAAC;AAC1B,OAAO,M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GD,IAAI,CAACC,IAAI,IAAKF,KAAK,CAACE,IAAI,KAAKD,IAAI,CAACC,IAAI,IAAIF,KAAK,CAACpC,GAAG,GAAGqC,IAAI,CAACrC,GAAI,EAAE;MACjGqC,IAAI,GAAGD,KAAK;IACd;EACF;EACA,OAAOC,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,KAAKA,
|
|
1
|
+
{"version":3,"names":["hasFlight","HOST_RANK","FLIGHT_RANK","registry","globalThis","__oxyhq_bloom_media_nodes__","nodes","Map","listeners","Set","snapshot","holder","seq","HOLDER_ID","reg","document","isConnected","existing","getElementById","created","createElement","id","style","cssText","setAttribute","body","appendChild","makeWrapper","wrapper","recordFor","render","record","get","claims","EMPTY_RENDER","set","content","uri","contentFit","renderVideo","undefined","nativeControls","accessibilityLabel","flightId","topClaim","pick","topRender","filter","claim","best","rank","moveInto","parent","child","supportsMoveBefore","parentNode","moveBefore","Element","prototype","place","target","el","parentElement","sameRender","a","b","x","y","kind","player","poster","publish","next","push","previous","unchanged","length","every","view","i","candidate","listener","claimMediaNode","find","releaseMediaNode","before","delete","remove","hasMediaNode","subscribeToMediaNodes","add","getMediaNodes","resetMediaNodes","values","clear"],"sourceRoot":"../../../src","sources":["media-flight/media-node.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,YAAS;;AAGnC;;AAYA;AACA,OAAO,MAAMC,SAAS,GAAG,CAAC;AAC1B,OAAO,MAAMC,WAAW,GAAG,CAAC;;AAqC5B;;A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,GAAG,CAACN,SAAS,EAAEyE,QAAQ,CAAC,CAAC;AAClD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaFlightLayer.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/MediaFlightLayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MediaFlightLayer.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/MediaFlightLayer.tsx"],"names":[],"mappings":"AA8CA;;;;;GAKG;AACH,wBAAgB,gBAAgB,mDAkB/B;yBAlBe,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-node.web.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/media-node.web.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,iFAAiF;IACjF,WAAW,EAAE,cAAc,GAAG,SAAS,CAAC;IACxC,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,6EAA6E;AAC7E,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,UAAU,cAAc;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;CACrC;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB;;;;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3E,wBAAgB,eAAe,IAAI,IAAI,CAUtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaFlightLayer.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/MediaFlightLayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MediaFlightLayer.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/MediaFlightLayer.tsx"],"names":[],"mappings":"AA8CA;;;;;GAKG;AACH,wBAAgB,gBAAgB,mDAkB/B;yBAlBe,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-node.web.d.ts","sourceRoot":"","sources":["../../../../src/media-flight/media-node.web.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,iFAAiF;IACjF,WAAW,EAAE,cAAc,GAAG,SAAS,CAAC;IACxC,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,6EAA6E;AAC7E,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,UAAU,cAAc;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;CACrC;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB;;;;;;;;OAQG;IACH,MAAM,EAA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AAI,CAUtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/bloom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -1457,6 +1457,7 @@
|
|
|
1457
1457
|
"./package.json": "./package.json"
|
|
1458
1458
|
},
|
|
1459
1459
|
"files": [
|
|
1460
|
+
"NOTICE",
|
|
1460
1461
|
"src",
|
|
1461
1462
|
"lib",
|
|
1462
1463
|
"docs/*.mdx",
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* ## The problem it exists for
|
|
5
5
|
*
|
|
6
6
|
* A shared-element transition normally assumes the ORIGIN screen is still
|
|
7
|
-
* mounted while the element travels
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* before the first frame of the transition.
|
|
7
|
+
* mounted while the element travels. Under expo-router on web the origin route
|
|
8
|
+
* is UNMOUNTED the moment the URL changes, so anything the origin was rendering
|
|
9
|
+
* (a `VideoView`, a decoded image) is gone before the first frame of the
|
|
10
|
+
* transition.
|
|
12
11
|
*
|
|
13
12
|
* The fix is to move the surface OUT of both screens for the duration of the
|
|
14
13
|
* flight. `<MediaFlightLayer>` is mounted ONCE at the app root and renders
|
|
@@ -225,6 +225,47 @@ function pick(claims: readonly MediaNodeClaim[]): MediaNodeClaim | null {
|
|
|
225
225
|
return best;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
/**
|
|
229
|
+
* An element that can be MOVED rather than removed and re-inserted.
|
|
230
|
+
*
|
|
231
|
+
* `moveBefore` is newer than TypeScript's DOM library, so the capability is
|
|
232
|
+
* named here and checked at runtime rather than assumed.
|
|
233
|
+
*/
|
|
234
|
+
interface MovingParent {
|
|
235
|
+
moveBefore(node: Node, child: Node | null): void;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* DERIVED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`,
|
|
240
|
+
* its `moveElementTo`. MIT, Copyright (c) 2025 Kiryl Ziusko; see `NOTICE`.
|
|
241
|
+
*
|
|
242
|
+
* Changed: typed for TypeScript's DOM library, which does not know `moveBefore`
|
|
243
|
+
* yet, and reduced to the append case Bloom needs (no `before` sibling).
|
|
244
|
+
*
|
|
245
|
+
* Why it is worth taking rather than keeping `appendChild`: `appendChild` of an
|
|
246
|
+
* ATTACHED node is a remove followed by an insert, and the only reason media
|
|
247
|
+
* survives it is that HTML's removal steps await a stable state and abort if
|
|
248
|
+
* the node is back in a document by then. `moveBefore` does not run the removal
|
|
249
|
+
* steps at all — it is the state-preserving primitive, which matters for
|
|
250
|
+
* anything the abort does not cover: focus, `<iframe>`s, CSS animations.
|
|
251
|
+
*
|
|
252
|
+
* Measured for a playing `<video>` in Chrome 151: indistinguishable from
|
|
253
|
+
* `appendChild` (ct 0.60 -> 1.00, never paused, 6 frames, worst frame gap
|
|
254
|
+
* 100 ms — the clip's own cadence — under both), while a real removal pauses
|
|
255
|
+
* and freezes. So this is not a fix for a defect Bloom has; it is the correct
|
|
256
|
+
* primitive for the ones it does not have yet.
|
|
257
|
+
*/
|
|
258
|
+
function moveInto(parent: HTMLElement, child: HTMLElement): void {
|
|
259
|
+
if (supportsMoveBefore && child.parentNode !== null) {
|
|
260
|
+
(parent as unknown as MovingParent).moveBefore(child, null);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
parent.appendChild(child);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const supportsMoveBefore =
|
|
267
|
+
typeof Element !== 'undefined' && 'moveBefore' in Element.prototype;
|
|
268
|
+
|
|
228
269
|
/**
|
|
229
270
|
* Put the wrapper where its top claim says, in ONE synchronous move.
|
|
230
271
|
*
|
|
@@ -237,7 +278,7 @@ function place(record: MediaNodeRecord): void {
|
|
|
237
278
|
const target = topClaim(record)?.el ?? holder(reg);
|
|
238
279
|
if (target === null) return;
|
|
239
280
|
if (record.wrapper.parentElement === target) return;
|
|
240
|
-
target
|
|
281
|
+
moveInto(target, record.wrapper);
|
|
241
282
|
}
|
|
242
283
|
|
|
243
284
|
function sameRender(a: MediaNodeRender, b: MediaNodeRender): boolean {
|