@blario/react-native 0.1.2 → 0.1.3

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.
@@ -2,13 +2,9 @@ import { childrenOf, propsOf } from '../fiber/reader.ts';
2
2
  import type { Fiber } from '../fiber/types.ts';
3
3
  import { AGENT_OVERLAY_TEST_ID, isOpenModal } from './collect.ts';
4
4
 
5
- const NATIVE_SCREEN = 'RNSScreen';
6
-
7
- // A native-stack screen presented as a modal or sheet is a UIKit presentation too, which covers the agent layer.
8
- function isPresentedScreen(fiber: Fiber): boolean {
9
- const presentation = propsOf(fiber).stackPresentation;
10
- return fiber.type === NATIVE_SCREEN && typeof presentation === 'string' && presentation !== 'push';
11
- }
5
+ // react-native-screens renders an iOS screen presented as a modal or sheet as RNSModalScreen: a UIKit presentation
6
+ // too, which covers the agent layer.
7
+ const PRESENTED_SCREEN = 'RNSModalScreen';
12
8
 
13
9
  export function countOpenModals(fiber: Fiber): number {
14
10
  const pending = [fiber];
@@ -18,7 +14,7 @@ export function countOpenModals(fiber: Fiber): number {
18
14
  if (current === undefined || propsOf(current).testID === AGENT_OVERLAY_TEST_ID) {
19
15
  continue;
20
16
  }
21
- if (isOpenModal(current) || isPresentedScreen(current)) {
17
+ if (isOpenModal(current) || current.type === PRESENTED_SCREEN) {
22
18
  count += 1;
23
19
  }
24
20
  for (const child of childrenOf(current)) {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const SDK_VERSION = '0.1.2';
1
+ export const SDK_VERSION = '0.1.3';