@onekeyfe/react-native-native-overlay 3.0.162-alpha.272 → 6.7.0-12

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 (40) hide show
  1. package/android/src/main/java/com/onekey/nativeoverlay/NativeOverlayAnimation.kt +5 -10
  2. package/android/src/main/java/com/onekey/nativeoverlay/NativeOverlayEntryRootView.kt +23 -2
  3. package/android/src/main/java/com/onekey/nativeoverlay/NativeOverlayHost.kt +17 -12
  4. package/android/src/main/java/com/onekey/nativeoverlay/NativeOverlayView.kt +3 -1
  5. package/android/src/test/java/com/onekey/nativeoverlay/NativeOverlayBackTest.kt +295 -0
  6. package/android/src/test/java/com/onekey/nativeoverlay/NativeOverlayMotionTest.kt +101 -0
  7. package/docs/SPEC.md +171 -30
  8. package/ios/NativeOverlayContainerView.swift +20 -7
  9. package/ios/NativeOverlaySheetController.swift +37 -1
  10. package/lib/module/OverlayStore.js +13 -1
  11. package/lib/module/OverlayStore.js.map +1 -1
  12. package/lib/module/OverlayView.web.js +104 -25
  13. package/lib/module/OverlayView.web.js.map +1 -1
  14. package/lib/module/useOverlayController.js +11 -3
  15. package/lib/module/useOverlayController.js.map +1 -1
  16. package/lib/module/web/animateTransition.js +20 -12
  17. package/lib/module/web/animateTransition.js.map +1 -1
  18. package/lib/module/web/overlayLayers.js +16 -0
  19. package/lib/module/web/overlayLayers.js.map +1 -1
  20. package/lib/module/web/useKeyboardShift.js +1 -1
  21. package/lib/module/web/useKeyboardShift.js.map +1 -1
  22. package/lib/module/web/useSheetDrag.js +22 -2
  23. package/lib/module/web/useSheetDrag.js.map +1 -1
  24. package/lib/typescript/src/OverlayStore.d.ts +2 -0
  25. package/lib/typescript/src/OverlayStore.d.ts.map +1 -1
  26. package/lib/typescript/src/OverlayView.web.d.ts.map +1 -1
  27. package/lib/typescript/src/useOverlayController.d.ts.map +1 -1
  28. package/lib/typescript/src/web/animateTransition.d.ts +2 -2
  29. package/lib/typescript/src/web/animateTransition.d.ts.map +1 -1
  30. package/lib/typescript/src/web/overlayLayers.d.ts +1 -0
  31. package/lib/typescript/src/web/overlayLayers.d.ts.map +1 -1
  32. package/lib/typescript/src/web/useSheetDrag.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/src/OverlayStore.ts +13 -1
  35. package/src/OverlayView.web.tsx +193 -56
  36. package/src/useOverlayController.ts +11 -4
  37. package/src/web/animateTransition.ts +30 -11
  38. package/src/web/overlayLayers.ts +20 -0
  39. package/src/web/useKeyboardShift.ts +1 -1
  40. package/src/web/useSheetDrag.ts +23 -2
package/docs/SPEC.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # react-native-native-overlay SPEC
2
2
 
3
3
  Status: Implemented through the P5 caller migration in app-monorepo. Android
4
- and Web runtime checks passed there; iOS runtime, physical-device and iPad
5
- acceptance remain unverified. Packaging in app-modules is validated separately.
4
+ and Web runtime checks passed there; focused iOS 26.5 simulator and Android 16
5
+ emulator checks are recorded below. Broader iOS runtime, physical-device and
6
+ iPad acceptance remain unverified. Packaging in app-modules is validated
7
+ separately.
6
8
 
7
9
  The implementation is migrated from app-monorepo commit
8
10
  `376633bd9f1c410dbccb01fb6a0492be9a5c3f38`, package
@@ -28,19 +30,25 @@ TypeScript declarations; React Native generates the Fabric bindings at app
28
30
  build time. Publish `common/cpp`, `src`, `lib`, Android/iOS sources, podspec and
29
31
  autolinking configuration. Web consumers additionally provide `react-dom`.
30
32
 
31
- `react-native-native-sheet` remains separately published for existing consumers;
32
- its compatibility shim/deprecation is a subsequent migration step, not a
33
- silent API change in this release. Sheet behavior derived from that package
34
- retains its original implementation attribution in source comments.
33
+ `react-native-native-sheet` is retired from this repository after the App
34
+ consumer migration. Its source workspace, example dependency, and dedicated
35
+ tests are removed; sheet presentation is owned by this package and has no
36
+ dependency on the retired package. The old `NativeSheet` API is not retained as
37
+ a compatibility shim. Previously published npm versions remain unchanged, and
38
+ this repository cleanup does not publish or change package versions. Sheet
39
+ behavior derived from that package retains its original implementation
40
+ attribution in source comments.
35
41
 
36
42
  ### Release boundary
37
43
 
38
- This branch aligns all 42 publishable workspaces to `3.0.162-alpha.272`.
39
- Publish with the existing `package-publish` workflow dispatch, `npm_dist_tag=next`
40
- and an empty `only_workspace`, which publishes and registry-verifies all 42.
41
- Do not merge either repository PR or change the `latest` tag. The app-monorepo
42
- workspace copy is removed only after this release succeeds and every target
43
- version and tarball is available. Versions already published on npm are immutable.
44
+ The `6.7.0-11` batch adds the Catalyst compile-time sheet background guard
45
+ and restores the npm-packaged Gopenpgp framework links. The incomplete
46
+ `6.7.0-10` candidate is superseded.
47
+ All 43 publishable workspace manifests and exact internal pins use the same
48
+ version, as required by the release validator. Publish the synchronized batch
49
+ through `package-publish` with `npm_dist_tag=latest`, verify the registry
50
+ versions, and refresh the App dependency and native locks before acceptance.
51
+ The source PR remains open for review.
44
52
 
45
53
  ## 5.1 Purpose, scope, and non-goals
46
54
 
@@ -85,6 +93,9 @@ Ownership:
85
93
  queues, page visibility, and back/Escape resolution.
86
94
  - **Native hosts** own drawing, hit testing, animation, keyboard, and back-key
87
95
  capture, and report lifecycle back to the store.
96
+ - Android's static host lookup holds weak Activity keys and weak host values;
97
+ an active overlay or installed back callback owns its host. The lookup does
98
+ not itself extend the lifetime of an Activity.
88
99
  - **Content** is the caller's React subtree. The overlay view stays where the
89
100
  caller rendered it. Native code reparents its content into the host, so React
90
101
  context is preserved; there is no root-siblings portal.
@@ -108,6 +119,14 @@ come only from props.
108
119
  - `dismiss(id, reason)` moves an entry to `closing`. `finalize(id)` removes it
109
120
  after the native exit animation. A closing entry that is never finalized is
110
121
  removed after 5 s.
122
+ - `reopen(id)` restores a closing entry to active, cancels its fallback timer,
123
+ and keeps its ordering, content and removal handler. A declarative
124
+ false-to-true change before exit completion uses this path; it does not
125
+ report a completed close. Hosts retarget the in-flight animation, including
126
+ cancelling the host-requested UIKit sheet dismissal when still running.
127
+ - Removing a queued entry detaches its removal handler before notifying store
128
+ subscribers or scheduling its callback. Same-tick reuse of that ID owns a
129
+ separate handler; the old removal cannot invoke or delete the new handler.
111
130
  - `dismissAll({ scope, belowLevel, reason })`, `setPageVisible(ownerKey,
112
131
  visible)`, `removePage(ownerKey)`.
113
132
  - `resolveBack(focusedHostKey?)` returns `dismiss(id)`, `block`, or `pass`.
@@ -136,6 +155,11 @@ visible)`, `removePage(ownerKey)`.
136
155
 
137
156
  - `usePageOverlayHost()` resolves `hostKey` and `ownerKey` from navigation
138
157
  context.
158
+ - A declarative page overlay keeps `scope: 'page'` while either key is
159
+ unavailable. It does not request or present an entry until both keys are
160
+ available; becoming ready while visible requests it in the page lane.
161
+ Hiding or unmounting before readiness creates no entry or close callback.
162
+ Direct store requests still throw for missing page keys.
139
163
  - `useInPageDialog`, `useInModalDialog`, and `useInTabDialog` become aliases of
140
164
  page scope. Tab scope is removed.
141
165
 
@@ -147,8 +171,20 @@ visible)`, `removePage(ownerKey)`.
147
171
  - `motion` is a preset name or a concrete `{ type: 'spring', spring: { mass, stiffness, damping, overshootClamping } }`
148
172
  or `{ type: 'timing', timing: { durationMs, easing: cubicBezier } }`.
149
173
  - Presets are resolved per platform:
150
- - Native mirrors the Reanimated driver: `quick` is a spring with m 0.1,
151
- k 100, c 20 (damping ratio ≈ 3.16).
174
+ - Native `quick` supplies spring m 0.1, k 100, c 20. The iOS sheet's
175
+ measured position and dimming response use the critically damped curve
176
+ at angular frequency `sqrt(k/m)`; UIKit reports an animator duration near
177
+ 292 ms. Android caps an overdamped spring's effective damping ratio at 1
178
+ while preserving m and k; underdamped and timing motions retain their
179
+ existing response. This rule
180
+ also applies to custom overdamped springs as a platform compatibility
181
+ inference; only the default `quick` sheet path has been measured on iOS.
182
+ Android's implementation is covered by native tests. In the consumer
183
+ shells, the default `quick` Dialog and ActionList sheet enter/exit motion
184
+ and dimming were compared over three cycles per direction on Android 16
185
+ and iOS 26.5; their normalized visible curves met the recorded parity
186
+ tolerance. This does not verify custom springs, exact cross-device
187
+ rectangles, or callback timing.
152
188
  - Web mirrors the CSS driver: `quick` is 150 ms `cubic-bezier(.25,.1,.25,1)`.
153
189
  - Converting native springs for web is opt-in (`springToCssLinear`), because
154
190
  it would slow web overlays down 4–9×.
@@ -162,6 +198,13 @@ visible)`, `removePage(ownerKey)`.
162
198
  | fullscreen | fade, `quick` | none |
163
199
  | anchored | scale 0.95 + fade from the resolved anchor placement, `popoverQuick` | fade |
164
200
 
201
+ - **Android sheet transform ownership (Implemented; Android 16 consumer-shell runtime verified):**
202
+ the overlay's enter/exit transform belongs to the sheet's CoordinatorLayout
203
+ parent. Material's IME insets callback owns the child sheet's `translationY`,
204
+ and the keyboard layer owns the IME avoidance lift. These transforms compose
205
+ while the child sheet remains the BottomSheetBehavior drag target. The
206
+ overlay must not animate the child sheet's `translationY` during IME motion.
207
+
165
208
  - Special cases the callers set explicitly:
166
209
  - App lock: `enter: none`, `exit: fade lockFade`. The web tamper check reloads
167
210
  the page if the lock fades in from opacity 0.
@@ -195,6 +238,22 @@ request ─► queued ─► active ─► (enter anim) presented
195
238
  its current value. It does not restart.
196
239
  - `onRemoved` fires exactly once per entry, even when a finalize and the
197
240
  timeout race.
241
+ - **Android exit ownership (Implemented; blocking page/global touch and global
242
+ Back runtime verified on Android 16; accessibility native-test verified,
243
+ TalkBack device verification pending):** A
244
+ blocking entry keeps ownership of touch, Back, and accessibility isolation
245
+ until its exit animation completes and the native host detaches it. During
246
+ exit, the entry consumes touches and Back without forwarding them to its
247
+ closing React content or requesting a
248
+ second dismissal. Its content is hidden from TalkBack while lower content
249
+ remains isolated. A reopen during exit restores content input and
250
+ accessibility without briefly exposing the page below. Closing non-blocking
251
+ entries pass through touch and Back to the entry below.
252
+ Consumer-shell recordings verify that page and global blocking entries keep
253
+ lower touch targets inert during their visible exit, then release them, and
254
+ that Back does not navigate beneath a closing global entry. Native tests
255
+ cover closing non-blocking entries and same-entry reopen; those paths and
256
+ TalkBack reading during exit have not been verified on device.
198
257
  - Page entries:
199
258
  - They are suspended (hidden but kept) while the owner page is covered or
200
259
  detached.
@@ -208,6 +267,30 @@ request ─► queued ─► active ─► (enter anim) presented
208
267
  - Threads: store mutations happen on the JS thread. Native animation and layout
209
268
  run on the UI thread. Events are delivered as direct events.
210
269
 
270
+ ### Web presentation updates (OK-50653)
271
+
272
+ For an open Web overlay that keeps its portal host, changing `presentation`
273
+ between sheet and a non-sheet frame MUST preserve the mounted content subtree.
274
+ Its props and React context continue to update normally. Changing the optional
275
+ sheet handle MUST NOT move the content into a different React child slot.
276
+ Closing without `keepContentMounted` still unmounts content after exit; reopening
277
+ creates a fresh content lifecycle. Business entity changes and draft resets
278
+ remain caller-owned; the overlay does not cache or persist form values.
279
+
280
+ The stable sheet shell must not change non-sheet animation origins or keyboard
281
+ avoidance geometry. Switching away from a sheet clears any pan offset and its
282
+ backdrop opacity override, and releases an active pointer capture.
283
+
284
+ Conformance: `src/__tests__/draftRetention.web.test.ts` exercises the real Web
285
+ host, portal and store for presentation changes, live props/context/callbacks,
286
+ close/reopen, animation origins, keyboard geometry and an interrupted pan.
287
+ Chrome extension side-panel and ordinary-tab checks use synthetic content;
288
+ this correction does not claim new iOS/Android runtime verification.
289
+
290
+ These source changes require a new published package version before the app
291
+ can consume them from npm. This fix leaves package versions and lockfiles at
292
+ their existing values and does not publish a release.
293
+
211
294
  ## 5.5 Data, cache, and identity
212
295
 
213
296
  - Identity is the entry `id`: caller-provided, otherwise `overlay-<seq>`.
@@ -216,6 +299,30 @@ request ─► queued ─► active ─► (enter anim) presented
216
299
 
217
300
  ## 5.6 Platform contract
218
301
 
302
+ ### Mac Catalyst sheet background
303
+
304
+ Implemented; Catalyst build and runtime verification pending. Global sheets
305
+ retain their configured surface color on Mac Catalyst and MUST NOT call
306
+ `UISheetPresentationController.backgroundEffect` or the matching detent API,
307
+ which are unavailable there. iOS 26.1 and later retain their existing color
308
+ effect. Presentation, sizing, motion, and lifecycle contracts are unchanged.
309
+
310
+ ### Web keyboard focus containment
311
+
312
+ The topmost active, unsuspended blocking Web entry MUST contain sequential
313
+ keyboard focus. Tab from its last tabbable child wraps to the first;
314
+ Shift+Tab from its first wraps to the last. From the entry root, focus enters
315
+ the first/last child respectively. With no tabbable children, focus stays on
316
+ the entry root. Disabled, negative-tabindex, hidden and inert subtrees are
317
+ excluded. Positive tabindex values precede ordinary DOM-order tab stops.
318
+ Non-blocking, lower, closing, suspended and parked entries MUST NOT run a
319
+ focus loop. Existing focus entry/restore and Escape policies are unchanged.
320
+
321
+ A Web backdrop with `dismissOnPress: true` MUST receive pointer events even
322
+ when its entry is non-blocking. This permits a transparent outside-click
323
+ shield without modal focus or accessibility isolation. A passive backdrop on
324
+ a non-blocking entry remains pointer-transparent.
325
+
219
326
  | Concern | iOS | Android | Web |
220
327
  | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
221
328
  | Global level host | One passthrough `UIWindow` per active level per `UIWindowScene`, ordered by `windowLevel`. `lock` sits above RN Alert (2001). | One `OverlayHost` FrameLayout in `android.R.id.content` above the ReactRootView, with one child container per level. | Sibling `div[data-onekey-layer]` roots under `body`, one z-index band per level (`OVERLAY_WEB_Z_INDEX_BASE`). |
@@ -224,7 +331,7 @@ request ─► queued ─► active ─► (enter anim) presented
224
331
  | Page host | Fabric `PageOverlayHost` as the last child of the root-route screen. Custom-drawn sheet, because UIKit sheets cannot be page-scoped. | The same host inside the root-route screen. The ReactRootView already dispatches touches, so no nested RootView. | `position: absolute` host inside the root-route card. |
225
332
  | Header / tab bar coverage (page) | Covered: the host is above the tab controller and navigation bars. | Covered. | Covered. |
226
333
  | Touch passthrough (toast, debug, box-none) | `hitTest` returns nil on the window or root view. | A non-blocking entry hit-tests its React content with `TouchTargetHelper` (honoring `box-none`) and falls through to the FrameLayout sibling on a miss. | `pointer-events: none` root, `auto` per entry. |
227
- | Back / Escape | Escape via `accessibilityPerformEscape`. The interactive pop gesture is disabled while a blocking page overlay is shown. | A `Window.Callback` wrapper consumes `KEYCODE_BACK` while a blocking overlay is shown. `ReactActivity.onBackPressed` hands back to JS BackHandler (react-navigation) before the `OnBackPressedDispatcher`, and the app opts out of predictive back, so a dispatcher callback alone never runs first. The dispatcher callback is kept for the predictive-back path. The IME still gets back first to close the keyboard. | Capture-phase `keydown` that ignores IME composition. |
334
+ | Back / Escape | Escape via `accessibilityPerformEscape`. The interactive pop gesture is disabled while a blocking page overlay is shown. | A `Window.Callback` wrapper consumes `KEYCODE_BACK` for the topmost input-ready blocking or dismissible overlay. `ReactActivity.onBackPressed` hands back to JS BackHandler (react-navigation) before the `OnBackPressedDispatcher`, and the app opts out of predictive back, so a dispatcher callback alone never runs first. The dispatcher callback is kept for the predictive-back path. The IME still gets back first to close the keyboard. | Capture-phase `keydown` that ignores IME composition. |
228
335
  | Modality / accessibility | `accessibilityViewIsModal` on the blocking level window; `.screenChanged` posted on present. | `IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS` on the content below. | `inert` on the app root and lower layers, `role=dialog`, `aria-modal`, focus trap and restore. |
229
336
  | Keyboard | System sheet avoidance; `keyboardLayoutGuide` for custom presentations. The main window regains key status on dismiss. | `WindowInsetsAnimationCompat` per sheet (the app uses `adjustPan`). | `visualViewport`. |
230
337
  | Animation engine | `UIViewPropertyAnimator` + `UISpringTimingParameters(mass:stiffness:damping:)`, which maps 1:1 and supports damping ratio > 1. | `SpringAnimation` with `stiffness = k/m` and `dampingRatio`; `PathInterpolator` for timing curves. | WAAPI `element.animate`. Timing presets use `cubic-bezier`; custom springs use `linear()`. |
@@ -296,6 +403,17 @@ navigation remains a separate runtime acceptance item.
296
403
 
297
404
  Automated (P0):
298
405
 
406
+ - `src/__tests__/focusTrap.web.test.ts` mounts real Web overlays and checks
407
+ both Tab boundaries, root/empty fallback, inaccessible children, positive
408
+ tabindex order, top-entry precedence, page scope, suspension and parking.
409
+ - `src/__tests__/useOverlayController.test.ts` exercises the actual hook and
410
+ page scope providers: missing/empty keys, delayed readiness, one request,
411
+ page suspension/removal, hiding/unmounting before readiness and global scope.
412
+ - `NativeOverlayBackTest` exercises the Android host's key interceptor and
413
+ Back dispatcher with actual entry/page views: dismissible non-blockers,
414
+ blockers, input readiness, canceled key-up, global/page precedence,
415
+ suspension and blocking-only accessibility isolation. It also checks live
416
+ host reuse, Activity isolation and rebuilding after a cleared weak value.
299
417
  - `src/__tests__/pageIsolation.web.test.ts` mounts a real React portal in a
300
418
  DOM host and verifies late suspension, level ordering and restoration after
301
419
  the blocking entry is removed.
@@ -331,7 +449,10 @@ Runtime matrix, required per platform before migrating callers (P1–P3):
331
449
  - switch tab and come back: it restores;
332
450
  - remove the page: it closes with `page-removed`;
333
451
  - the native header and tab bar are covered.
334
- 5. Back/Escape reaches the topmost blocking overlay; the lock swallows it.
452
+ 5. Back/Escape reaches the topmost input-ready overlay that is blocking or
453
+ explicitly dismissible, global before page. A non-dismissible blocker
454
+ consumes Back without closing; a passive non-blocking entry passes through.
455
+ Accessibility isolation remains blocking-only. The lock swallows Back.
335
456
  6. Keyboard: an input in a global sheet, a page sheet and a secure dialog.
336
457
  7. iOS: a system picker opened from an overlay appears above it.
337
458
  8. Split view: page overlays stay in their own pane.
@@ -362,8 +483,12 @@ P3 page scope notes:
362
483
  their global sheet implementation inside the page host.
363
484
  - Android back also resolves page entries: global overlays first, then the
364
485
  topmost visible page overlay.
365
- - A page request without a resolvable host or owner falls back to global
366
- scope.
486
+ - A declarative page overlay waits for a resolvable host and owner; it never
487
+ falls back to global scope. Direct store requests require both keys.
488
+ - On Web, a page overlay also waits for its registered DOM host while closed
489
+ with `keepContentMounted`. Registration mounts parked content in that host;
490
+ close/reopen retains the same DOM and state. Unregistration never moves page
491
+ content into a global layer.
367
492
 
368
493
  P2 sheet notes:
369
494
 
@@ -378,7 +503,11 @@ P2 sheet notes:
378
503
  overlay motion; dragging fades the backdrop; a drag to hidden reports
379
504
  `pan`.
380
505
  - Web renders a bottom surface with pointer drag (40% distance or 0.5 px/ms
381
- flick dismisses, never from scrolled content).
506
+ flick dismisses, never from scrolled content). Reopening kept content after
507
+ a pan dismissal clears the sheet transform, transition and backdrop opacity;
508
+ the next dismissal follows the normal exit path and restores focus.
509
+ Cancelling a tracked pointer resets its drag offset, transition and backdrop
510
+ without dismissing the sheet or swallowing a later click.
382
511
  - A fitted sheet measures its content with `onLayout` before presenting.
383
512
  Hidden content stays mounted inside the zero-width host (clipped on iOS,
384
513
  INVISIBLE on Android), and the host height stays auto: a fixed 0 height
@@ -475,8 +604,10 @@ P4e lock screen notes:
475
604
  interactive (OK-62416).
476
605
  - Android back is swallowed on the lock screen (blocking, not dismissible);
477
606
  it no longer reaches navigation behind the lock.
478
- - The web lock tamper check and the lock screen's body-level inert pass are
479
- unchanged; the lock layer root is a `document.body` child.
607
+ - The web lock tamper check is retained. The body-level inert pass starts
608
+ when the lock node actually mounts, covers later body portals, and restores
609
+ each node's previous inert state on unlock. The lock layer root is a
610
+ `document.body` child.
480
611
 
481
612
  P5a native popover notes:
482
613
 
@@ -484,14 +615,18 @@ P5a native popover notes:
484
615
  (`NativeSheetPresentation`); the Tamagui Popover sheet (`TMPopover.Adapt`),
485
616
  its external backdrop, z-index and back handler are gone, and
486
617
  the removed `nativeSheet` option throws. iPad / wide windows keep the 400–480 pt centered
487
- frame inside the sheet. `usingSheet={false}` still renders no panel on
488
- native (web / desktop floating panels).
618
+ frame inside the sheet. Native keeps this supported sheet presentation
619
+ even when a cross-platform caller sets `usingSheet={false}` for its web panel.
489
620
  - The native popover renders inline in the caller's tree (its contexts
490
621
  apply) instead of through the full-window portal. Every popover remains
491
622
  mounted until the exit callback (1 s fallback); content then unmounts
492
623
  unless `keepChildrenMounted`. Reopening cancels pending teardown.
493
624
  - `closePopover()` waits for exit completion; repeated requests share the
494
625
  same completion promise, and completion or unmount clears its timer.
626
+ - Percent sheet snap points set the viewport height on native and web; fit
627
+ mode keeps content measurement. Both keep the header and bottom spacing
628
+ inside the bounded surface. Native Popover and custom Toast also retain
629
+ their deferred-guide blocker while open.
495
630
  - Sheet options are package-owned. Unsupported legacy `sheetProps` keys
496
631
  and floating-panel `zIndex` / `portalProps` throw instead of being ignored.
497
632
 
@@ -501,16 +636,22 @@ P5b web popover notes:
501
636
  level; the Tamagui Popover and `PopoverContent` are gone.
502
637
  - Below `md` with `usingSheet` (the default): an overlay sheet with a
503
638
  header and a dismissing backdrop.
504
- - Otherwise: `presentation="anchored"`, non-blocking and without a backdrop.
639
+ - Otherwise: `presentation="anchored"`, non-blocking, with a transparent
640
+ dismissing backdrop for press-triggered panels. Hover panels have no backdrop.
505
641
  Floating UI (`@floating-ui/dom`) places the panel: offset, flip, shift,
506
642
  and a max height from the available space. `autoUpdate` follows scroll
507
643
  and resize.
508
- - The enter animation scales an ancestor of the panel, so the panel measures
509
- smaller while it runs. The panel is positioned again on `onPresented`.
510
- - Anchored panels close on an outside press. Presses on the trigger, on the
511
- panel, or inside an overlay ranked above it do not close it, so a nested
512
- Select or a Dialog opened from the panel keeps it open. They also close on
513
- Escape, unless `hoverable`.
644
+ - For a single positioned child, Web anchored scale/fade runs on that content,
645
+ with a local transform origin. Its full-window positioning ancestors remain
646
+ untransformed, so Floating UI uses the same coordinate space during and after
647
+ the animation. Completion positioning must not correct coordinates distorted
648
+ by the enter scale. Multi-child roots retain their shared full-window motion.
649
+ - Press-triggered anchored panels close on a backdrop press without activating
650
+ the page underneath. Presses on the panel or inside an overlay ranked above
651
+ it do not close it, so a nested Select or a Dialog opened from the panel
652
+ keeps it open. They also close on Escape, unless `hoverable`.
653
+ - Press-triggered anchored panels own a focus scope and forward caller
654
+ open/close autofocus callbacks. Hover panels never move or trap focus.
514
655
  - `hoverable` opens and closes on mouse enter / leave of the trigger and
515
656
  panel. The default close delay is 100 ms, so the pointer can cross the gap.
516
657
  - `keepChildrenMounted` maps to `keepContentMounted`. On web a closed entry
@@ -323,8 +323,17 @@ final class NativeOverlayEntryView: UIView {
323
323
  }
324
324
  if visible {
325
325
  cycleOpen = true
326
- // A sheet that is still animating out is re-presented after it finishes.
327
- if phase == .hidden || (phase == .exiting && !usesSystemSheet) {
326
+ if phase == .exiting, usesSystemSheet, let controller = sheetController,
327
+ controller.cancelHostDismissal(completion: { [weak self, weak controller] in
328
+ DispatchQueue.main.async {
329
+ guard let self, self.sheetController === controller, self.phase == .entering else { return }
330
+ self.phase = .shown
331
+ self.didPresent()
332
+ if !self.visible { self.dismissSheet() }
333
+ }
334
+ }) {
335
+ phase = .entering
336
+ } else if phase == .hidden || (phase == .exiting && !usesSystemSheet) {
328
337
  present()
329
338
  }
330
339
  } else if cycleOpen {
@@ -473,13 +482,13 @@ final class NativeOverlayEntryView: UIView {
473
482
  reportContentOffset()
474
483
  NativeOverlayWindowManager.shared.entryRemoved(from: hostWindow)
475
484
  guard let reason, cycleOpen else { return }
476
- cycleOpen = visible
477
- onDismissed?(["reason": reason])
478
- // Reopened while the exit animation ran; UIKit-initiated dismissals
479
- // ("system") are left for JS to settle instead.
485
+ // A reopen at UIKit's completion boundary keeps the same JS entry.
480
486
  if reason == "programmatic", visible, window != nil {
481
487
  present()
488
+ return
482
489
  }
490
+ cycleOpen = visible
491
+ onDismissed?(["reason": reason])
483
492
  }
484
493
 
485
494
  private func didPresent() {
@@ -568,12 +577,16 @@ final class NativeOverlayEntryView: UIView {
568
577
  finishDismiss(reason: "programmatic")
569
578
  return
570
579
  }
580
+ if controller.resumeHostDismissal() {
581
+ phase = .exiting
582
+ return
583
+ }
571
584
  // Closing mid-presentation is handled by the present completion.
572
585
  guard !controller.isBeingPresented, phase != .exiting else { return }
573
586
  phase = .exiting
574
587
  controller.dismissRequestedByHost = true
575
588
  controller.dismiss(animated: true) { [weak self, weak controller] in
576
- guard let self, self.sheetController === controller else { return }
589
+ guard let self, self.sheetController === controller, self.phase == .exiting else { return }
577
590
  self.finishDismiss(reason: "programmatic")
578
591
  }
579
592
  }
@@ -31,6 +31,7 @@ private final class NativeOverlaySheetTransitionAnimator: NSObject,
31
31
  private let presenting: Bool
32
32
  private let motion: NativeOverlayMotion
33
33
  private var animator: UIViewPropertyAnimator?
34
+ private var cancellationCompletion: (() -> Void)?
34
35
 
35
36
  init(presenting: Bool, motion: NativeOverlayMotion) {
36
37
  self.presenting = presenting
@@ -90,15 +91,32 @@ private final class NativeOverlaySheetTransitionAnimator: NSObject,
90
91
  animator.addCompletion { position in
91
92
  let completed = position == .end && !transitionContext.transitionWasCancelled
92
93
  if !completed {
94
+ sheetView.alpha = self.presenting && reduceMotion ? 0 : 1
93
95
  sheetView.transform = self.presenting ? offscreen : .identity
94
96
  sheetController.setDimmingAlpha(self.presenting ? 0 : 1)
95
97
  }
96
98
  transitionContext.completeTransition(completed)
99
+ if position == .start { self.cancellationCompletion?() }
100
+ self.cancellationCompletion = nil
97
101
  }
98
102
  self.animator = animator
99
103
  return animator
100
104
  }
101
105
 
106
+ func reverseDismissal(completion: @escaping () -> Void) -> Bool {
107
+ guard !presenting, let animator, animator.isRunning, !animator.isReversed else { return false }
108
+ cancellationCompletion = completion
109
+ animator.isReversed = true
110
+ return true
111
+ }
112
+
113
+ func resumeDismissal() -> Bool {
114
+ guard !presenting, let animator, animator.isRunning, animator.isReversed else { return false }
115
+ cancellationCompletion = nil
116
+ animator.isReversed = false
117
+ return true
118
+ }
119
+
102
120
  func animationEnded(_ transitionCompleted: Bool) {
103
121
  animator = nil
104
122
  }
@@ -119,6 +137,7 @@ final class NativeOverlaySheetController: UIViewController,
119
137
  private var dimmingView: UIView?
120
138
  private var backdropTap: UITapGestureRecognizer?
121
139
  private var heightAnimator: UIViewPropertyAnimator?
140
+ private var dismissalAnimator: NativeOverlaySheetTransitionAnimator?
122
141
  private var shadowSuppressionDisplayLink: CADisplayLink?
123
142
  /// Set while the host itself asked UIKit to dismiss.
124
143
  var dismissRequestedByHost = false
@@ -164,11 +183,13 @@ final class NativeOverlaySheetController: UIViewController,
164
183
  ) { [weak self] context in
165
184
  min(max(self?.style.height ?? 1, 1), context.maximumDetentValue)
166
185
  }
186
+ #if !targetEnvironment(macCatalyst)
167
187
  if #available(iOS 26.1, *) {
168
188
  let effect = UIColorEffect(color: style.backgroundColor)
169
189
  sheet.backgroundEffect = effect
170
190
  detent.backgroundEffect = effect
171
191
  }
192
+ #endif
172
193
  sheet.detents = [detent]
173
194
  sheet.selectedDetentIdentifier = detentIdentifier
174
195
  sheet.largestUndimmedDetentIdentifier = detentIdentifier
@@ -230,7 +251,22 @@ final class NativeOverlaySheetController: UIViewController,
230
251
  func animationController(
231
252
  forDismissed dismissed: UIViewController
232
253
  ) -> UIViewControllerAnimatedTransitioning? {
233
- NativeOverlaySheetTransitionAnimator(presenting: false, motion: style.exitMotion)
254
+ let animator = NativeOverlaySheetTransitionAnimator(presenting: false, motion: style.exitMotion)
255
+ dismissalAnimator = animator
256
+ return animator
257
+ }
258
+
259
+ func cancelHostDismissal(completion: @escaping () -> Void) -> Bool {
260
+ guard dismissRequestedByHost,
261
+ dismissalAnimator?.reverseDismissal(completion: completion) == true else { return false }
262
+ dismissRequestedByHost = false
263
+ return true
264
+ }
265
+
266
+ func resumeHostDismissal() -> Bool {
267
+ guard dismissalAnimator?.resumeDismissal() == true else { return false }
268
+ dismissRequestedByHost = true
269
+ return true
234
270
  }
235
271
 
236
272
  override func viewWillAppear(_ animated: Bool) {
@@ -97,6 +97,16 @@ export class OverlayStore {
97
97
  }
98
98
  }
99
99
 
100
+ /** Reverses an unfinished close without creating a new presentation cycle. */
101
+ reopen(id) {
102
+ const entry = this.shown.get(id);
103
+ if (!entry || entry.phase !== 'closing') return;
104
+ this.clearClosingTimer(id);
105
+ entry.phase = 'active';
106
+ entry.dismissReason = undefined;
107
+ this.emit();
108
+ }
109
+
100
110
  /** Removes a closing (or active) entry once its exit animation finished. */
101
111
  finalize(id) {
102
112
  const entry = this.shown.get(id);
@@ -207,7 +217,9 @@ export class OverlayStore {
207
217
  if (queuedIndex !== -1) {
208
218
  this.queued = this.queued.filter(e => e.id !== id);
209
219
  // Queued entries never rendered, so they leave without an exit animation.
210
- queueMicrotask(() => this.notifyRemoved(id, reason));
220
+ const handlers = this.handlers.get(id);
221
+ this.handlers.delete(id);
222
+ queueMicrotask(() => handlers?.onRemoved?.(reason));
211
223
  return true;
212
224
  }
213
225
  const entry = this.shown.get(id);
@@ -1 +1 @@
1
- {"version":3,"names":["OverlayRequestError","OVERLAY_LEVEL_ORDER","isBlockingLevel","DEFAULT_CLOSING_TIMEOUT_MS","laneKeyOf","entry","scope","level","hostKey","compareRenderOrder","a","b","levelDiff","seq","compareQueueOrder","priority","OverlayStore","shown","Map","queued","handlers","closingTimers","pageVisibility","listeners","Set","snapshot","entries","constructor","options","closingTimeoutMs","subscribe","listener","add","delete","getSnapshot","getEntry","id","get","find","e","request","existing","ownerKey","blocking","strategy","replaceKey","undefined","dismissible","statusBarStyle","phase","suspended","dismissReason","isOwnerHidden","set","replaceIn","canPromote","toSorted","emit","dismiss","reason","dismissWithoutEmit","finalize","clearClosingTimer","promoteQueued","notifyRemoved","dismissAll","filter","matches","belowLevel","dropped","changed","length","values","forEach","setPageVisible","visible","removePage","resolveBack","focusedHostKey","candidates","top","kind","getStatusBarOwner","findStatusBarOwner","getBlockingTop","i","queuedIndex","findIndex","queueMicrotask","setTimeout","laneKey","sameLane","targets","slice","promotedLanes","remaining","has","push","timer","clearTimeout","onRemoved","map","overlayStore"],"sourceRoot":"../../src","sources":["OverlayStore.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,oBAAiB;AAwBtE,MAAMC,0BAA0B,GAAG,IAAI;AAEvC,SAASC,SAASA,CAACC,KAAoB,EAAU;EAC/C,OAAOA,KAAK,CAACC,KAAK,KAAK,QAAQ,GAC3B,UAAUD,KAAK,CAACE,KAAK,EAAE,GACvB,QAAQF,KAAK,CAACG,OAAO,IAAI,EAAE,IAAIH,KAAK,CAACE,KAAK,EAAE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AS,CAACkD,OAAO,CAAE1C,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;EAClD;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASoD,kBAAkBA,CAChC1D,QAA0B,EACC;EAC3B,MAAM;IAAEC;EAAQ,CAAC,GAAGD,QAAQ;EAC5B,KAAK,IAAI4D,CAAC,GAAG3D,OAAO,CAAC6C,MAAM,GAAG,CAAC,EAAEc,CAAC,IAAI,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAE;IAC/C,MAAMhF,KAAK,GAAGqB,OAAO,CAAC2D,CAAC,CAAC;IACxB,IACEhF,KAAK,IACLA,KAAK,CAAC2C,cAAc,IACpB3C,KAAK,CAAC4C,KAAK,KAAK,QAAQ,IACxB,CAAC5C,KAAK,CAAC6C,SAAS,EAChB;MACA,OAAO7C,KAAK;IACd;EACF;EACA,OAAOyC,SAAS;AAClB;AAEA,OAAO,MAAMwD,YAAY,GAAG,IAAItF,YAAY,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["OverlayRequestError","OVERLAY_LEVEL_ORDER","isBlockingLevel","DEFAULT_CLOSING_TIMEOUT_MS","laneKeyOf","entry","scope","level","hostKey","compareRenderOrder","a","b","levelDiff","seq","compareQueueOrder","priority","OverlayStore","shown","Map","queued","handlers","closingTimers","pageVisibility","listeners","Set","snapshot","entries","constructor","options","closingTimeoutMs","subscribe","listener","add","delete","getSnapshot","getEntry","id","get","find","e","request","existing","ownerKey","blocking","strategy","replaceKey","undefined","dismissible","statusBarStyle","phase","suspended","dismissReason","isOwnerHidden","set","replaceIn","canPromote","toSorted","emit","dismiss","reason","dismissWithoutEmit","reopen","clearClosingTimer","finalize","promoteQueued","notifyRemoved","dismissAll","filter","matches","belowLevel","dropped","changed","length","values","forEach","setPageVisible","visible","removePage","resolveBack","focusedHostKey","candidates","top","kind","getStatusBarOwner","findStatusBarOwner","getBlockingTop","i","queuedIndex","findIndex","queueMicrotask","onRemoved","setTimeout","laneKey","sameLane","targets","slice","promotedLanes","remaining","has","push","timer","clearTimeout","map","overlayStore"],"sourceRoot":"../../src","sources":["OverlayStore.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,oBAAiB;AAwBtE,MAAMC,0BAA0B,GAAG,IAAI;AAEvC,SAASC,SAASA,CAACC,KAAoB,EAAU;EAC/C,OAAOA,KAAK,CAACC,KAAK,KAAK,QAAQ,GAC3B,UAAUD,KAAK,CAACE,KAAK,EAAE,GACvB,QAAQF,KAAK,CAACG,OAAO,IAAI,EAAE,IAAIH,KAAK,CAACE,KAAK,EAAE;AAClD;AAEA,SAASE,kBAAkBA,CAACC,CAAgB,EAAEC,CAAgB,EAAU;EACtE,IAAID,CAAC,CAACJ,KAAK,KAAKK,CAAC,CAACL,KAAK,EAAE;IACvB,OAAOI,CAAC,CAACJ,KAAK,KAAK,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC;EACpC;EACA,IAAII,CAAC,CAACJ,KAAK,KAAK,MAAM,IAAII,CAAC,CAACF,OAAO,KAAKG,CAAC,CAACH,OAAO,EAAE;IACjD,OAAO,CAACE,CAAC,CAACF,OAAO,IAAI,EAAE,KAAKG,CAAC,CAACH,OAAO,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;EACvD;EACA,MAAMI,SAAS,GAAGX,mBAAmB,CAACS,CAAC,CAACH,KAAK,CAAC,GAAGN,mBAAmB,CAACU,CAAC,CAACJ,KAAK,CAAC;EAC7E,OAAOK,SAAS,KAAK,CAAC,GAAGA,SAAS,GAAGF,CAAC,CAACG,GAAG,GAAGF,CAAC,CAACE,GAAG;AACpD;AAEA,SAASC,iBAAiBA,CAACJ,CAAgB,EAAEC,CAAgB,EAAU;EACrE,OAAOA,CAAC,CAACI,QAAQ,KAAKL,CAAC,CAACK,QAAQ,GAAGJ,CAAC,CAACI,QAAQ,GAAGL,CAAC,CAACK,QAAQ,GAA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