expo-router 7.0.0-canary-20251230-fc48ddc → 7.0.0-canary-20260113-0ce2b9c

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 (151) hide show
  1. package/android/build.gradle +2 -2
  2. package/build/Route.d.ts +3 -5
  3. package/build/Route.d.ts.map +1 -1
  4. package/build/Route.js +2 -2
  5. package/build/Route.js.map +1 -1
  6. package/build/exports.d.ts +3 -0
  7. package/build/exports.d.ts.map +1 -1
  8. package/build/exports.js +3 -1
  9. package/build/exports.js.map +1 -1
  10. package/build/fork/native-stack/createNativeStackNavigator.d.ts.map +1 -1
  11. package/build/fork/native-stack/createNativeStackNavigator.js +9 -0
  12. package/build/fork/native-stack/createNativeStackNavigator.js.map +1 -1
  13. package/build/getRoutesCore.d.ts +2 -0
  14. package/build/getRoutesCore.d.ts.map +1 -1
  15. package/build/getRoutesCore.js.map +1 -1
  16. package/build/internal/utils.d.ts +1 -1
  17. package/build/internal/utils.d.ts.map +1 -1
  18. package/build/internal/utils.js +2 -2
  19. package/build/internal/utils.js.map +1 -1
  20. package/build/layouts/StackClient.d.ts +2 -2
  21. package/build/layouts/StackClient.d.ts.map +1 -1
  22. package/build/layouts/StackClient.js +1 -0
  23. package/build/layouts/StackClient.js.map +1 -1
  24. package/build/layouts/stack-utils/StackHeaderComponent.d.ts.map +1 -1
  25. package/build/layouts/stack-utils/StackHeaderComponent.js +3 -3
  26. package/build/layouts/stack-utils/StackHeaderComponent.js.map +1 -1
  27. package/build/layouts/stack-utils/StackHeaderMenu.d.ts.map +1 -1
  28. package/build/layouts/stack-utils/StackHeaderMenu.js +1 -0
  29. package/build/layouts/stack-utils/StackHeaderMenu.js.map +1 -1
  30. package/build/layouts/stack-utils/StackSearchBar.d.ts +7 -0
  31. package/build/layouts/stack-utils/StackSearchBar.d.ts.map +1 -0
  32. package/build/layouts/stack-utils/StackSearchBar.js +19 -0
  33. package/build/layouts/stack-utils/StackSearchBar.js.map +1 -0
  34. package/build/layouts/stack-utils/index.d.ts +2 -3
  35. package/build/layouts/stack-utils/index.d.ts.map +1 -1
  36. package/build/layouts/stack-utils/index.js +3 -4
  37. package/build/layouts/stack-utils/index.js.map +1 -1
  38. package/build/link/elements.d.ts +13 -1
  39. package/build/link/elements.d.ts.map +1 -1
  40. package/build/link/elements.js +1 -1
  41. package/build/link/elements.js.map +1 -1
  42. package/build/link/preview/native.d.ts +8 -1
  43. package/build/link/preview/native.d.ts.map +1 -1
  44. package/build/link/preview/native.js +0 -2
  45. package/build/link/preview/native.js.map +1 -1
  46. package/build/link/zoom/ZoomTransitionEnabler.d.ts +1 -1
  47. package/build/link/zoom/ZoomTransitionEnabler.d.ts.map +1 -1
  48. package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts +1 -1
  49. package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts.map +1 -1
  50. package/build/link/zoom/ZoomTransitionEnabler.ios.js +9 -12
  51. package/build/link/zoom/ZoomTransitionEnabler.ios.js.map +1 -1
  52. package/build/link/zoom/ZoomTransitionEnabler.js +2 -2
  53. package/build/link/zoom/ZoomTransitionEnabler.js.map +1 -1
  54. package/build/link/zoom/usePreventZoomTransitionDismissal.d.ts +36 -0
  55. package/build/link/zoom/usePreventZoomTransitionDismissal.d.ts.map +1 -0
  56. package/build/link/zoom/usePreventZoomTransitionDismissal.ios.d.ts +3 -0
  57. package/build/link/zoom/usePreventZoomTransitionDismissal.ios.d.ts.map +1 -0
  58. package/build/link/zoom/usePreventZoomTransitionDismissal.ios.js +60 -0
  59. package/build/link/zoom/usePreventZoomTransitionDismissal.ios.js.map +1 -0
  60. package/build/link/zoom/usePreventZoomTransitionDismissal.js +41 -0
  61. package/build/link/zoom/usePreventZoomTransitionDismissal.js.map +1 -0
  62. package/build/link/zoom/usePreventZoomTransitionDismissal.types.d.ts +14 -0
  63. package/build/link/zoom/usePreventZoomTransitionDismissal.types.d.ts.map +1 -0
  64. package/build/link/zoom/usePreventZoomTransitionDismissal.types.js +3 -0
  65. package/build/link/zoom/usePreventZoomTransitionDismissal.types.js.map +1 -0
  66. package/build/link/zoom/zoom-transition-context-providers.ios.d.ts.map +1 -1
  67. package/build/link/zoom/zoom-transition-context-providers.ios.js +6 -1
  68. package/build/link/zoom/zoom-transition-context-providers.ios.js.map +1 -1
  69. package/build/link/zoom/zoom-transition-context.d.ts +25 -0
  70. package/build/link/zoom/zoom-transition-context.d.ts.map +1 -1
  71. package/build/link/zoom/zoom-transition-context.js +1 -0
  72. package/build/link/zoom/zoom-transition-context.js.map +1 -1
  73. package/build/native-tabs/NativeTabsView.d.ts.map +1 -1
  74. package/build/native-tabs/NativeTabsView.js +21 -2
  75. package/build/native-tabs/NativeTabsView.js.map +1 -1
  76. package/build/native-tabs/common/elements.d.ts +8 -0
  77. package/build/native-tabs/common/elements.d.ts.map +1 -1
  78. package/build/native-tabs/common/elements.js.map +1 -1
  79. package/build/navigationParams.d.ts +20 -0
  80. package/build/navigationParams.d.ts.map +1 -1
  81. package/build/navigationParams.js +10 -1
  82. package/build/navigationParams.js.map +1 -1
  83. package/build/toolbar/elements.d.ts +81 -3
  84. package/build/toolbar/elements.d.ts.map +1 -1
  85. package/build/toolbar/elements.js +40 -6
  86. package/build/toolbar/elements.js.map +1 -1
  87. package/build/toolbar/index.d.ts +6 -5
  88. package/build/toolbar/index.d.ts.map +1 -1
  89. package/build/toolbar/index.js +5 -3
  90. package/build/toolbar/index.js.map +1 -1
  91. package/build/toolbar/native.ios.d.ts.map +1 -1
  92. package/build/toolbar/native.ios.js +3 -1
  93. package/build/toolbar/native.ios.js.map +1 -1
  94. package/build/toolbar/native.types.d.ts +17 -1
  95. package/build/toolbar/native.types.d.ts.map +1 -1
  96. package/build/toolbar/native.types.js.map +1 -1
  97. package/build/ui/Slot.d.ts.map +1 -1
  98. package/build/ui/Slot.js +44 -1
  99. package/build/ui/Slot.js.map +1 -1
  100. package/build/useScreens.d.ts +9 -2
  101. package/build/useScreens.d.ts.map +1 -1
  102. package/build/useScreens.js +7 -5
  103. package/build/useScreens.js.map +1 -1
  104. package/expo-module.config.json +1 -1
  105. package/ios/LinkPreview/LinkPreviewNativeActionView.swift +7 -0
  106. package/ios/LinkPreview/LinkPreviewNativeModule.swift +37 -3
  107. package/ios/LinkPreview/LinkZoomTransition.swift +13 -3
  108. package/ios/Toolbar/RouterToolbarHostView.swift +1 -1
  109. package/ios/Toolbar/RouterToolbarItemView.swift +35 -4
  110. package/ios/Toolbar/RouterToolbarModule.swift +4 -0
  111. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.module → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.module} +7 -7
  112. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.module.md5 +1 -0
  113. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.module.sha1 +1 -0
  114. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.module.sha256 +1 -0
  115. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.module.sha512 +1 -0
  116. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.pom → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.pom} +1 -1
  117. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.pom.md5 +1 -0
  118. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.pom.sha1 +1 -0
  119. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.pom.sha256 +1 -0
  120. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.pom.sha512 +1 -0
  121. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
  122. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
  123. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
  124. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
  125. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
  126. package/package.json +11 -10
  127. package/plugin/build/index.d.ts +2 -0
  128. package/plugin/options.json +5 -0
  129. package/plugin/src/index.ts +2 -0
  130. package/build/layouts/stack-utils/StackHeaderSearchBar.d.ts +0 -7
  131. package/build/layouts/stack-utils/StackHeaderSearchBar.d.ts.map +0 -1
  132. package/build/layouts/stack-utils/StackHeaderSearchBar.js +0 -16
  133. package/build/layouts/stack-utils/StackHeaderSearchBar.js.map +0 -1
  134. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.module.md5 +0 -1
  135. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.module.sha1 +0 -1
  136. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.module.sha256 +0 -1
  137. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.module.sha512 +0 -1
  138. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.pom.md5 +0 -1
  139. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.pom.sha1 +0 -1
  140. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.pom.sha256 +0 -1
  141. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.pom.sha512 +0 -1
  142. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc-sources.jar → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c-sources.jar} +0 -0
  143. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc-sources.jar.md5 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c-sources.jar.md5} +0 -0
  144. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc-sources.jar.sha1 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c-sources.jar.sha1} +0 -0
  145. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc-sources.jar.sha256 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c-sources.jar.sha256} +0 -0
  146. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc-sources.jar.sha512 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c-sources.jar.sha512} +0 -0
  147. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.aar → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.aar} +0 -0
  148. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.aar.md5 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.aar.md5} +0 -0
  149. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.aar.sha1 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.aar.sha1} +0 -0
  150. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.aar.sha256 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.aar.sha256} +0 -0
  151. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251230-fc48ddc/expo.modules.router-7.0.0-canary-20251230-fc48ddc.aar.sha512 → 7.0.0-canary-20260113-0ce2b9c/expo.modules.router-7.0.0-canary-20260113-0ce2b9c.aar.sha512} +0 -0
@@ -86,7 +86,10 @@ export interface LinkMenuProps {
86
86
  icon?: SFSymbol;
87
87
  /**
88
88
  * If `true`, the menu will be displayed as a palette.
89
- * This means that the menu will be displayed as one row
89
+ * This means that the menu will be displayed as one row.
90
+ * The `elementSize` property is ignored when palette is used, all items will be `elementSize="small"`. Use `elementSize="medium"` instead of `palette` to display actions with titles horizontally.
91
+ *
92
+ * > **Note**: Palette menus are only supported in submenus.
90
93
  *
91
94
  * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette) for more information.
92
95
  */
@@ -112,6 +115,15 @@ export interface LinkMenuProps {
112
115
  * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/destructive) for more information.
113
116
  */
114
117
  destructive?: boolean;
118
+ /**
119
+ * The preferred size of the menu elements.
120
+ * `elementSize` property is ignored when `palette` is used.
121
+ *
122
+ * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/preferredelementsize) for more information.
123
+ *
124
+ * @platform iOS 16.0+
125
+ */
126
+ elementSize?: 'small' | 'medium' | 'large' | 'auto';
115
127
  children?: React.ReactNode;
116
128
  }
117
129
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/link/elements.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA8B,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAWtD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE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CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,mSAgBxE"}
@@ -97,7 +97,7 @@ const LinkMenu = (props) => {
97
97
  const children = react_1.default.Children.toArray(props.children).filter((child) => (0, react_1.isValidElement)(child) && (child.type === LinkMenuAction || child.type === exports.LinkMenu));
98
98
  const displayAsPalette = props.palette ?? props.displayAsPalette;
99
99
  const displayInline = props.inline ?? props.displayInline;
100
- return (<native_1.NativeLinkPreviewAction {...props} displayAsPalette={displayAsPalette} displayInline={displayInline} title={props.title ?? ''} onSelected={() => { }} children={children} identifier={identifier}/>);
100
+ return (<native_1.NativeLinkPreviewAction {...props} displayAsPalette={displayAsPalette} displayInline={displayInline} preferredElementSize={props.elementSize} title={props.title ?? ''} onSelected={() => { }} children={children} identifier={identifier}/>);
101
101
  };
102
102
  exports.LinkMenu = LinkMenu;
103
103
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/link/elements.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFb,wCA0BC;AAkJD,kCAwBC;AAkCD,kCAgBC;AAxUD,+CAAkG;AAIlG,6EAA0E;AAC1E,8CAA4C;AAC5C,uDAAoD;AACpD,uEAA6D;AAC7D,6CAAqF;AACrF,qCAAkC;AAClC,4DAAuD;AACvD,gDAAwD;AA+DxD;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,UAAU,GAAG,IAAA,aAAK,GAAE,CAAC;IAC3B,IAAI,IAAA,kCAAY,GAAE,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC,IAAA,WAAG,EAAC,uDAA0B,CAAC,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,M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gH,CACjH,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,WAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;IACpC,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CAAC,+BAAa,CAAC,CAAC,OAAO,CAAC,EAAE,+BAAa,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["'use client';\n\nimport React, { isValidElement, use, useId, type PropsWithChildren, type ReactNode } from 'react';\nimport type { ViewStyle } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { InternalLinkPreviewContext } from './InternalLinkPreviewContext';\nimport { Icon, Label } from '../primitives';\nimport { HrefPreview } from './preview/HrefPreview';\nimport { useIsPreview } from './preview/PreviewRouteContext';\nimport { NativeLinkPreviewAction, NativeLinkPreviewContent } from './preview/native';\nimport { Slot } from '../ui/Slot';\nimport { LinkAppleZoom } from './zoom/link-apple-zoom';\nimport { getFirstChildOfType } from '../utils/children';\n\nexport interface LinkMenuActionProps {\n /**\n * The title of the menu item.\n */\n children?: ReactNode;\n /**\n * If `true`, the menu item will be displayed as destructive.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive) for more information.\n */\n destructive?: boolean;\n /**\n * If `true`, the menu item will be disabled and not selectable.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled) for more information.\n */\n disabled?: boolean;\n /**\n * An elaborated title that explains the purpose of the action.\n */\n discoverabilityLabel?: string;\n /**\n * Whether the menu element should be hidden.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden) for more information.\n *\n * @default false\n */\n hidden?: boolean;\n // TODO: support ImageSourcePropType icons in addition to SFSymbols\n /**\n * SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\n /**\n * If `true`, the menu item will be displayed as selected.\n */\n isOn?: boolean;\n onPress?: () => void;\n /**\n * An optional subtitle for the menu item.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/subtitle) for more information.\n */\n subtitle?: string;\n /**\n * The title of the menu item.\n * @deprecated Use `children` prop instead.\n */\n title?: string;\n /**\n * If `true`, the menu will be kept presented after the action is selected.\n *\n * This is marked as unstable, because when action is selected it will recreate the menu,\n * which will close all opened submenus and reset the scroll position.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented) for more information.\n */\n unstable_keepPresented?: boolean;\n}\n\n/**\n * This component renders a context menu action for a link.\n * It should only be used as a child of `Link.Menu` or `LinkMenu`.\n *\n * > **Note**: You can use the alias `Link.MenuAction` for this component.\n *\n * @platform ios\n */\nexport function LinkMenuAction(props: LinkMenuActionProps) {\n const identifier = useId();\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {\n return null;\n }\n const { unstable_keepPresented, onPress, children, title, ...rest } = props;\n const areChildrenString = typeof children === 'string';\n const label = areChildrenString\n ? (children as string)\n : getFirstChildOfType(children, Label)?.props.children;\n const iconComponent =\n !props.icon && !areChildrenString ? getFirstChildOfType(children, Icon) : undefined;\n const icon =\n props.icon ??\n (iconComponent?.props && 'sf' in iconComponent.props ? iconComponent.props.sf : undefined);\n const sf = typeof icon === 'string' ? icon : undefined;\n return (\n <NativeLinkPreviewAction\n {...rest}\n identifier={identifier}\n icon={sf}\n title={label ?? title ?? ''}\n keepPresented={unstable_keepPresented}\n onSelected={() => onPress?.()}\n />\n );\n}\n\nexport interface LinkMenuProps {\n /**\n * The title of the menu item\n */\n title?: string;\n /**\n * An optional subtitle for the submenu. Does not appear on `inline` menus.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/subtitle) for more information.\n */\n subtitle?: string;\n /**\n * Optional SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\n /**\n * If `true`, the menu will be displayed as a palette.\n * This means that the menu will be displayed as one row\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette) for more information.\n */\n palette?: boolean;\n /**\n * @deprecated Use `palette` prop instead.\n */\n displayAsPalette?: boolean;\n /**\n * If `true`, the menu will be displayed inline.\n * This means that the menu will not be collapsed\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline) for more information.\n */\n inline?: boolean;\n /**\n * @deprecated Use `inline` prop instead.\n */\n displayInline?: boolean;\n /**\n * If `true`, the menu item will be displayed as destructive.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/destructive) for more information.\n */\n destructive?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * Groups context menu actions for a link.\n *\n * If multiple `Link.Menu` components are used within a single `Link`, only the first will be rendered.\n * Only `Link.MenuAction` and `LinkMenuAction` components are allowed as children.\n *\n * @example\n * ```tsx\n * <Link.Menu>\n * <Link.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Link.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Link.Menu>\n * ```\n *\n * > **Note**: You can use the alias `Link.Menu` for this component.\n *\n * @platform ios\n */\nexport const LinkMenu: React.FC<LinkMenuProps> = (props) => {\n const identifier = useId();\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {\n return null;\n }\n const children = React.Children.toArray(props.children).filter(\n (child) => isValidElement(child) && (child.type === LinkMenuAction || child.type === LinkMenu)\n );\n const displayAsPalette = props.palette ?? props.displayAsPalette;\n const displayInline = props.inline ?? props.displayInline;\n return (\n <NativeLinkPreviewAction\n {...props}\n displayAsPalette={displayAsPalette}\n displayInline={displayInline}\n title={props.title ?? ''}\n onSelected={() => {}}\n children={children}\n identifier={identifier}\n />\n );\n};\n\nexport type LinkPreviewStyle = Omit<ViewStyle, 'position' | 'width' | 'height'> & {\n /**\n * Sets the preferred width of the preview.\n * If not set, full width of the screen will be used.\n *\n * This is only **preferred** width, the actual width may be different\n */\n width?: number;\n\n /**\n * Sets the preferred height of the preview.\n * If not set, full height of the screen will be used.\n *\n * This is only **preferred** height, the actual height may be different\n */\n height?: number;\n};\n\nexport interface LinkPreviewProps {\n children?: React.ReactNode;\n /**\n * Custom styles for the preview container.\n *\n * Note that some styles may not work, as they are limited or reset by the native view\n */\n style?: LinkPreviewStyle;\n}\n\n/**\n * A component used to render and customize the link preview.\n *\n * If `Link.Preview` is used without any props, it will render a preview of the `href` passed to the `Link`.\n *\n * If multiple `Link.Preview` components are used within a single `Link`, only the first one will be rendered.\n *\n * To customize the preview, you can pass custom content as children.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Preview>\n * <Text>Custom Preview Content</Text>\n * </Link.Preview>\n * </Link>\n * ```\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Preview />\n * </Link>\n * ```\n *\n * > **Note**: You can use the alias `Link.Preview` for this component.\n *\n * @platform ios\n */\nexport function LinkPreview(props: LinkPreviewProps) {\n const { children, style } = props;\n const internalPreviewContext = use(InternalLinkPreviewContext);\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !internalPreviewContext) {\n return null;\n }\n const { isVisible, href } = internalPreviewContext;\n const { width, height, ...restOfStyle } = style ?? {};\n const contentSize = {\n width: width ?? 0,\n height: height ?? 0,\n };\n let content: React.ReactNode;\n if (children) {\n content = isVisible ? children : null;\n } else {\n content = isVisible ? <HrefPreview href={href} /> : null;\n }\n\n return (\n <NativeLinkPreviewContent style={restOfStyle} preferredContentSize={contentSize}>\n {content}\n </NativeLinkPreviewContent>\n );\n}\n\nexport interface LinkTriggerProps extends PropsWithChildren {\n /**\n * A shorthand for enabling the Apple Zoom Transition on this link trigger.\n *\n * When set to `true`, the trigger will be wrapped with `Link.AppleZoom`.\n * If another `Link.AppleZoom` is already used inside `Link.Trigger`, an error\n * will be thrown.\n *\n * @platform ios 18+\n */\n withAppleZoom?: boolean;\n}\n\n/**\n * Serves as the trigger for a link.\n * The content inside this component will be rendered as part of the base link.\n *\n * If multiple `Link.Trigger` components are used within a single `Link`, only the first will be rendered.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Trigger>\n * Trigger\n * </Link.Trigger>\n * </Link>\n * ```\n *\n * > **Note**: You can use the alias `Link.Trigger` for this component.\n *\n * @platform ios\n */\nexport function LinkTrigger({ withAppleZoom, ...props }: LinkTriggerProps) {\n if (React.Children.count(props.children) > 1 || !isValidElement(props.children)) {\n // If onPress is passed, this means that Link passed props to this component.\n // We can assume that asChild is used, so we throw an error, because link will not work in this case.\n if (props && typeof props === 'object' && 'onPress' in props) {\n throw new Error(\n 'When using Link.Trigger in an asChild Link, you must pass a single child element that will emit onPress event.'\n );\n }\n return props.children;\n }\n const content = <Slot {...props} />;\n if (withAppleZoom) {\n return <LinkAppleZoom>{content}</LinkAppleZoom>;\n }\n return content;\n}\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/link/elements.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFb,wCA0BC;AA+JD,kCAwBC;AAkCD,kCAgBC;AArVD,+CAAkG;AAIlG,6EAA0E;AAC1E,8CAA4C;AAC5C,uDAAoD;AACpD,uEAA6D;AAC7D,6CAAqF;AACrF,qCAAkC;AAClC,4DAAuD;AACvD,gDAAwD;AA+DxD;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,UAAU,GAAG,IAAA,aAAK,GAAE,CAAC;IAC3B,IAAI,IAAA,kCAAY,GAAE,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC,IAAA,WAAG,EAAC,uDAA0B,CAAC,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,Q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AK,CACb,gHAAgH,CACjH,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,WAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;IACpC,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CAAC,+BAAa,CAAC,CAAC,OAAO,CAAC,EAAE,+BAAa,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["'use client';\n\nimport React, { isValidElement, use, useId, type PropsWithChildren, type ReactNode } from 'react';\nimport type { ViewStyle } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { InternalLinkPreviewContext } from './InternalLinkPreviewContext';\nimport { Icon, Label } from '../primitives';\nimport { HrefPreview } from './preview/HrefPreview';\nimport { useIsPreview } from './preview/PreviewRouteContext';\nimport { NativeLinkPreviewAction, NativeLinkPreviewContent } from './preview/native';\nimport { Slot } from '../ui/Slot';\nimport { LinkAppleZoom } from './zoom/link-apple-zoom';\nimport { getFirstChildOfType } from '../utils/children';\n\nexport interface LinkMenuActionProps {\n /**\n * The title of the menu item.\n */\n children?: ReactNode;\n /**\n * If `true`, the menu item will be displayed as destructive.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive) for more information.\n */\n destructive?: boolean;\n /**\n * If `true`, the menu item will be disabled and not selectable.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled) for more information.\n */\n disabled?: boolean;\n /**\n * An elaborated title that explains the purpose of the action.\n */\n discoverabilityLabel?: string;\n /**\n * Whether the menu element should be hidden.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden) for more information.\n *\n * @default false\n */\n hidden?: boolean;\n // TODO: support ImageSourcePropType icons in addition to SFSymbols\n /**\n * SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\n /**\n * If `true`, the menu item will be displayed as selected.\n */\n isOn?: boolean;\n onPress?: () => void;\n /**\n * An optional subtitle for the menu item.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/subtitle) for more information.\n */\n subtitle?: string;\n /**\n * The title of the menu item.\n * @deprecated Use `children` prop instead.\n */\n title?: string;\n /**\n * If `true`, the menu will be kept presented after the action is selected.\n *\n * This is marked as unstable, because when action is selected it will recreate the menu,\n * which will close all opened submenus and reset the scroll position.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented) for more information.\n */\n unstable_keepPresented?: boolean;\n}\n\n/**\n * This component renders a context menu action for a link.\n * It should only be used as a child of `Link.Menu` or `LinkMenu`.\n *\n * > **Note**: You can use the alias `Link.MenuAction` for this component.\n *\n * @platform ios\n */\nexport function LinkMenuAction(props: LinkMenuActionProps) {\n const identifier = useId();\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {\n return null;\n }\n const { unstable_keepPresented, onPress, children, title, ...rest } = props;\n const areChildrenString = typeof children === 'string';\n const label = areChildrenString\n ? (children as string)\n : getFirstChildOfType(children, Label)?.props.children;\n const iconComponent =\n !props.icon && !areChildrenString ? getFirstChildOfType(children, Icon) : undefined;\n const icon =\n props.icon ??\n (iconComponent?.props && 'sf' in iconComponent.props ? iconComponent.props.sf : undefined);\n const sf = typeof icon === 'string' ? icon : undefined;\n return (\n <NativeLinkPreviewAction\n {...rest}\n identifier={identifier}\n icon={sf}\n title={label ?? title ?? ''}\n keepPresented={unstable_keepPresented}\n onSelected={() => onPress?.()}\n />\n );\n}\n\nexport interface LinkMenuProps {\n /**\n * The title of the menu item\n */\n title?: string;\n /**\n * An optional subtitle for the submenu. Does not appear on `inline` menus.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/subtitle) for more information.\n */\n subtitle?: string;\n /**\n * Optional SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\n /**\n * If `true`, the menu will be displayed as a palette.\n * This means that the menu will be displayed as one row.\n * The `elementSize` property is ignored when palette is used, all items will be `elementSize=\"small\"`. Use `elementSize=\"medium\"` instead of `palette` to display actions with titles horizontally.\n *\n * > **Note**: Palette menus are only supported in submenus.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette) for more information.\n */\n palette?: boolean;\n /**\n * @deprecated Use `palette` prop instead.\n */\n displayAsPalette?: boolean;\n /**\n * If `true`, the menu will be displayed inline.\n * This means that the menu will not be collapsed\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline) for more information.\n */\n inline?: boolean;\n /**\n * @deprecated Use `inline` prop instead.\n */\n displayInline?: boolean;\n /**\n * If `true`, the menu item will be displayed as destructive.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/destructive) for more information.\n */\n destructive?: boolean;\n /**\n * The preferred size of the menu elements.\n * `elementSize` property is ignored when `palette` is used.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/preferredelementsize) for more information.\n *\n * @platform iOS 16.0+\n */\n elementSize?: 'small' | 'medium' | 'large' | 'auto';\n children?: React.ReactNode;\n}\n\n/**\n * Groups context menu actions for a link.\n *\n * If multiple `Link.Menu` components are used within a single `Link`, only the first will be rendered.\n * Only `Link.MenuAction` and `LinkMenuAction` components are allowed as children.\n *\n * @example\n * ```tsx\n * <Link.Menu>\n * <Link.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Link.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Link.Menu>\n * ```\n *\n * > **Note**: You can use the alias `Link.Menu` for this component.\n *\n * @platform ios\n */\nexport const LinkMenu: React.FC<LinkMenuProps> = (props) => {\n const identifier = useId();\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {\n return null;\n }\n const children = React.Children.toArray(props.children).filter(\n (child) => isValidElement(child) && (child.type === LinkMenuAction || child.type === LinkMenu)\n );\n const displayAsPalette = props.palette ?? props.displayAsPalette;\n const displayInline = props.inline ?? props.displayInline;\n return (\n <NativeLinkPreviewAction\n {...props}\n displayAsPalette={displayAsPalette}\n displayInline={displayInline}\n preferredElementSize={props.elementSize}\n title={props.title ?? ''}\n onSelected={() => {}}\n children={children}\n identifier={identifier}\n />\n );\n};\n\nexport type LinkPreviewStyle = Omit<ViewStyle, 'position' | 'width' | 'height'> & {\n /**\n * Sets the preferred width of the preview.\n * If not set, full width of the screen will be used.\n *\n * This is only **preferred** width, the actual width may be different\n */\n width?: number;\n\n /**\n * Sets the preferred height of the preview.\n * If not set, full height of the screen will be used.\n *\n * This is only **preferred** height, the actual height may be different\n */\n height?: number;\n};\n\nexport interface LinkPreviewProps {\n children?: React.ReactNode;\n /**\n * Custom styles for the preview container.\n *\n * Note that some styles may not work, as they are limited or reset by the native view\n */\n style?: LinkPreviewStyle;\n}\n\n/**\n * A component used to render and customize the link preview.\n *\n * If `Link.Preview` is used without any props, it will render a preview of the `href` passed to the `Link`.\n *\n * If multiple `Link.Preview` components are used within a single `Link`, only the first one will be rendered.\n *\n * To customize the preview, you can pass custom content as children.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Preview>\n * <Text>Custom Preview Content</Text>\n * </Link.Preview>\n * </Link>\n * ```\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Preview />\n * </Link>\n * ```\n *\n * > **Note**: You can use the alias `Link.Preview` for this component.\n *\n * @platform ios\n */\nexport function LinkPreview(props: LinkPreviewProps) {\n const { children, style } = props;\n const internalPreviewContext = use(InternalLinkPreviewContext);\n if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !internalPreviewContext) {\n return null;\n }\n const { isVisible, href } = internalPreviewContext;\n const { width, height, ...restOfStyle } = style ?? {};\n const contentSize = {\n width: width ?? 0,\n height: height ?? 0,\n };\n let content: React.ReactNode;\n if (children) {\n content = isVisible ? children : null;\n } else {\n content = isVisible ? <HrefPreview href={href} /> : null;\n }\n\n return (\n <NativeLinkPreviewContent style={restOfStyle} preferredContentSize={contentSize}>\n {content}\n </NativeLinkPreviewContent>\n );\n}\n\nexport interface LinkTriggerProps extends PropsWithChildren {\n /**\n * A shorthand for enabling the Apple Zoom Transition on this link trigger.\n *\n * When set to `true`, the trigger will be wrapped with `Link.AppleZoom`.\n * If another `Link.AppleZoom` is already used inside `Link.Trigger`, an error\n * will be thrown.\n *\n * @platform ios 18+\n */\n withAppleZoom?: boolean;\n}\n\n/**\n * Serves as the trigger for a link.\n * The content inside this component will be rendered as part of the base link.\n *\n * If multiple `Link.Trigger` components are used within a single `Link`, only the first will be rendered.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\">\n * <Link.Trigger>\n * Trigger\n * </Link.Trigger>\n * </Link>\n * ```\n *\n * > **Note**: You can use the alias `Link.Trigger` for this component.\n *\n * @platform ios\n */\nexport function LinkTrigger({ withAppleZoom, ...props }: LinkTriggerProps) {\n if (React.Children.count(props.children) > 1 || !isValidElement(props.children)) {\n // If onPress is passed, this means that Link passed props to this component.\n // We can assume that asChild is used, so we throw an error, because link will not work in this case.\n if (props && typeof props === 'object' && 'onPress' in props) {\n throw new Error(\n 'When using Link.Trigger in an asChild Link, you must pass a single child element that will emit onPress event.'\n );\n }\n return props.children;\n }\n const content = <Slot {...props} />;\n if (withAppleZoom) {\n return <LinkAppleZoom>{content}</LinkAppleZoom>;\n }\n return content;\n}\n"]}
@@ -14,6 +14,7 @@ export interface NativeLinkPreviewActionProps {
14
14
  accessibilityHint?: string;
15
15
  displayAsPalette?: boolean;
16
16
  displayInline?: boolean;
17
+ preferredElementSize?: 'auto' | 'small' | 'medium' | 'large';
17
18
  isOn?: boolean;
18
19
  keepPresented?: boolean;
19
20
  hidden?: boolean;
@@ -51,9 +52,15 @@ export interface NativeLinkPreviewContentProps extends ViewProps {
51
52
  };
52
53
  }
53
54
  export declare function NativeLinkPreviewContent(props: NativeLinkPreviewContentProps): import("react").JSX.Element | null;
55
+ interface DismissalBoundsRect {
56
+ minX?: number;
57
+ maxX?: number;
58
+ minY?: number;
59
+ maxY?: number;
60
+ }
54
61
  export declare function LinkZoomTransitionEnabler(props: {
55
62
  zoomTransitionSourceIdentifier: string;
56
- preventInteractiveDismissal?: boolean;
63
+ dismissalBoundsRect?: DismissalBoundsRect | null;
57
64
  }): import("react").JSX.Element | null;
58
65
  interface LinkSourceAlignmentRect {
59
66
  x: number;
@@ -1 +1 @@
1
- {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/link/preview/native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMvD,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAI3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IAKf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,G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,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D;AAMD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,sCAa5E;AAID,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,8BAA8B,EAAE,MAAM,CAAC;IACvC,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAClD,sCAWA;AAID,UAAU,uBAAuB;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,6BAA8B,SAAQ,iBAAiB;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAUD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,sCAa5E;AASD,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,sCAaA"}
@@ -46,8 +46,6 @@ function NativeLinkPreviewContent(props) {
46
46
  ]);
47
47
  return <NativeLinkPreviewContentView {...props} style={style}/>;
48
48
  }
49
- // #endregion
50
- // #region Zoom transition enabler
51
49
  const LinkZoomTransitionEnablerNativeView = areNativeViewsAvailable
52
50
  ? (0, expo_1.requireNativeView)('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionEnabler')
53
51
  : null;
@@ -1 +1 @@
1
- {"version":3,"file":"native.js","sourceRoot":"","sources":["../../../src/link/preview/native.tsx"],"names":[],"mappings":";AAA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,CAAC;IAC7F,CAAC,CAAC,gBAAQ,CAAC;AACb,SAAgB,uCAAuC,CAAC,KAGvD;IACC,IAAI,CAAC,6CAA6C,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,CAAC,6CAA6C,CAC5C,IAAI,KAAK,CAAC,CACV,mBAAmB,CACnB,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,mBAAmB,CAAC,CAAC,KAAK,CAAC,CAC3B,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC;AACD,aAAa","sourcesContent":["'use client';\n\nimport { requireNativeView } from 'expo';\nimport { Fragment, type PropsWithChildren } from 'react';\nimport { Platform, StyleSheet, type ViewProps, type ColorValue } from 'react-native';\n\nimport type { BasicTextStyle } from '../../utils/font';\n\nconst areNativeViewsAvailable =\n process.env.EXPO_OS === 'ios' && !Platform.isTV && global.RN$Bridgeless === true;\n\n// #region Action View\nexport interface NativeLinkPreviewActionProps {\n identifier: string;\n title: string;\n icon?: string;\n children?: React.ReactNode;\n disabled?: boolean;\n destructive?: boolean;\n discoverabilityLabel?: string;\n subtitle?: string;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n // This may lead to race conditions, when two menu actions are on at the same time.\n // The logic should be enforced in the JS code, rather than in the native code.\n // singleSelection?: boolean;\n displayAsPalette?: boolean;\n displayInline?: boolean;\n isOn?: boolean;\n // There are issues with menu state updates when keep presented is set to true.\n // When updating the context menu state, it will either not update or it will recreate the menu. The latter is a problem,\n // because it will close all opened submenus and reset the scroll position.\n // TODO: (@ubax) find a way to fix this.\n keepPresented?: boolean;\n hidden?: boolean;\n tintColor?: ColorValue;\n barButtonItemStyle?: 'plain' | 'prominent';\n\n // These properties are for UIBarButtonItem compatibility but don't apply to context menus.\n // They're included for API consistency with toolbar items.\n sharesBackground?: boolean;\n hidesSharedBackground?: boolean;\n onSelected: () => void;\n titleStyle?: BasicTextStyle;\n}\nconst LinkPreviewNativeActionView: React.ComponentType<NativeLinkPreviewActionProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkPreviewNativeActionView')\n : null;\nexport function NativeLinkPreviewAction(props: NativeLinkPreviewActionProps) {\n if (!LinkPreviewNativeActionView) {\n return null;\n }\n return <LinkPreviewNativeActionView {...props} />;\n}\n// #endregion\n\n// #region Preview View\nexport interface TabPath {\n oldTabKey: string;\n newTabKey: string;\n}\nexport interface NativeLinkPreviewProps extends ViewProps {\n nextScreenId: string | undefined;\n tabPath:\n | {\n path: TabPath[];\n }\n | undefined;\n disableForceFlatten?: boolean;\n onWillPreviewOpen?: () => void;\n onDidPreviewOpen?: () => void;\n onPreviewWillClose?: () => void;\n onPreviewDidClose?: () => void;\n onPreviewTapped?: () => void;\n onPreviewTappedAnimationCompleted?: () => void;\n children: React.ReactNode;\n}\nconst NativeLinkPreviewView: React.ComponentType<NativeLinkPreviewProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'NativeLinkPreviewView')\n : null;\nexport function NativeLinkPreview(props: NativeLinkPreviewProps) {\n if (!NativeLinkPreviewView) {\n return null;\n }\n return <NativeLinkPreviewView {...props} />;\n}\n// #endregion\n\n// #region Preview Content View\nexport interface NativeLinkPreviewContentProps extends ViewProps {\n preferredContentSize?: { width: number; height: number };\n}\nconst NativeLinkPreviewContentView: React.ComponentType<NativeLinkPreviewContentProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'NativeLinkPreviewContentView')\n : null;\n\nexport function NativeLinkPreviewContent(props: NativeLinkPreviewContentProps) {\n if (!NativeLinkPreviewContentView) {\n return null;\n }\n const style = StyleSheet.flatten([\n props.style,\n {\n position: 'absolute',\n top: 0,\n left: 0,\n } as const,\n ]);\n return <NativeLinkPreviewContentView {...props} style={style} />;\n}\n// #endregion\n\n// #region Zoom transition enabler\nconst LinkZoomTransitionEnablerNativeView: React.ComponentType<\n ViewProps & { zoomTransitionSourceIdentifier: string; disableForceFlatten?: boolean }\n> | null = areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionEnabler')\n : null;\nexport function LinkZoomTransitionEnabler(props: {\n zoomTransitionSourceIdentifier: string;\n preventInteractiveDismissal?: boolean;\n}) {\n if (!LinkZoomTransitionEnablerNativeView) {\n return null;\n }\n return (\n <LinkZoomTransitionEnablerNativeView\n {...props}\n disableForceFlatten\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n\n// #region Zoom transition source\ninterface LinkSourceAlignmentRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\ninterface LinkZoomTransitionSourceProps extends PropsWithChildren {\n identifier: string;\n alignment?: LinkSourceAlignmentRect;\n animateAspectRatioChange?: boolean;\n}\n\ninterface LinkZoomTransitionSourceNativeProps extends ViewProps, LinkZoomTransitionSourceProps {\n disableForceFlatten?: boolean;\n}\n\nconst LinkZoomTransitionSourceNativeView: React.ComponentType<LinkZoomTransitionSourceNativeProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionSource')\n : null;\nexport function LinkZoomTransitionSource(props: LinkZoomTransitionSourceProps) {\n if (!LinkZoomTransitionSourceNativeView) {\n return null;\n }\n return (\n <LinkZoomTransitionSourceNativeView\n {...props}\n disableForceFlatten\n collapsable={false}\n collapsableChildren={false}\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n\n// #region Zoom transition rect detector\nconst LinkZoomTransitionAlignmentRectDetectorNative: React.ComponentType<\n ViewProps & { identifier: string; disableForceFlatten?: boolean; children?: React.ReactNode }\n> | null = areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionAlignmentRectDetector')\n : Fragment;\nexport function LinkZoomTransitionAlignmentRectDetector(props: {\n identifier: string;\n children: React.ReactNode;\n}) {\n if (!LinkZoomTransitionAlignmentRectDetectorNative) {\n return null;\n }\n return (\n <LinkZoomTransitionAlignmentRectDetectorNative\n {...props}\n disableForceFlatten\n collapsable={false}\n collapsableChildren={false}\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n"]}
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../../../src/link/preview/native.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAkDb,0DAKC;AA4BD,8CAKC;AAYD,4DAaC;AAeD,8DAcC;AAyBD,4DAaC;AASD,0FAgBC;AA3MD,+BAAyC;AACzC,iCAAyD;AACzD,+CAAqF;AAIrF,MAAM,uBAAuB,GAC3B,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC,uBAAQ,CAAC,IAAI,IAAI,MAAM,CAAC,aAAa,KAAK,IAAI,CAAC;AAqCnF,MAAM,2BAA2B,GAC/B,uBAAuB;IACrB,CAAC,CAAC,IAAA,wBAAiB,EAAC,6BAA6B,EAAE,6BAA6B,CAAC;IACjF,CAAC,CAAC,IAAI,CAAC;AACX,SAAgB,uBAAuB,CAAC,KAAmC;IACzE,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,2BAA2B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACpD,CAAC;AAwBD,MAAM,qBAAqB,GACzB,uBAAuB;IACrB,CAAC,CAAC,IAAA,wBAAiB,EAAC,6BAA6B,EAAE,uBAAuB,CAAC;IAC3E,CAAC,CAAC,IAAI,CAAC;AACX,SAAgB,iBAAiB,CAAC,KAA6B;IAC7D,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CAAC,qBAAqB,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC9C,CAAC;AAOD,MAAM,4BAA4B,GAChC,uBAAuB;IACrB,CAAC,CAAC,IAAA,wBAAiB,EAAC,6BAA6B,EAAE,8BA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,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC;AACD,aAAa;AAEb,wCAAwC;AACxC,MAAM,6CAA6C,GAExC,uBAAuB;IAChC,CAAC,CAAC,IAAA,wBAAiB,EAAC,6BAA6B,EAAE,yCAAyC,CAAC;IAC7F,CAAC,CAAC,gBAAQ,CAAC;AACb,SAAgB,uCAAuC,CAAC,KAGvD;IACC,IAAI,CAAC,6CAA6C,EAAE,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,CAAC,6CAA6C,CAC5C,IAAI,KAAK,CAAC,CACV,mBAAmB,CACnB,WAAW,CAAC,CAAC,KAAK,CAAC,CACnB,mBAAmB,CAAC,CAAC,KAAK,CAAC,CAC3B,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAC/B,CACH,CAAC;AACJ,CAAC;AACD,aAAa","sourcesContent":["'use client';\n\nimport { requireNativeView } from 'expo';\nimport { Fragment, type PropsWithChildren } from 'react';\nimport { Platform, StyleSheet, type ViewProps, type ColorValue } from 'react-native';\n\nimport type { BasicTextStyle } from '../../utils/font';\n\nconst areNativeViewsAvailable =\n process.env.EXPO_OS === 'ios' && !Platform.isTV && global.RN$Bridgeless === true;\n\n// #region Action View\nexport interface NativeLinkPreviewActionProps {\n identifier: string;\n title: string;\n icon?: string;\n children?: React.ReactNode;\n disabled?: boolean;\n destructive?: boolean;\n discoverabilityLabel?: string;\n subtitle?: string;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n // This may lead to race conditions, when two menu actions are on at the same time.\n // The logic should be enforced in the JS code, rather than in the native code.\n // singleSelection?: boolean;\n displayAsPalette?: boolean;\n displayInline?: boolean;\n preferredElementSize?: 'auto' | 'small' | 'medium' | 'large';\n isOn?: boolean;\n // There are issues with menu state updates when keep presented is set to true.\n // When updating the context menu state, it will either not update or it will recreate the menu. The latter is a problem,\n // because it will close all opened submenus and reset the scroll position.\n // TODO: (@ubax) find a way to fix this.\n keepPresented?: boolean;\n hidden?: boolean;\n tintColor?: ColorValue;\n barButtonItemStyle?: 'plain' | 'prominent';\n\n // These properties are for UIBarButtonItem compatibility but don't apply to context menus.\n // They're included for API consistency with toolbar items.\n sharesBackground?: boolean;\n hidesSharedBackground?: boolean;\n onSelected: () => void;\n titleStyle?: BasicTextStyle;\n}\nconst LinkPreviewNativeActionView: React.ComponentType<NativeLinkPreviewActionProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkPreviewNativeActionView')\n : null;\nexport function NativeLinkPreviewAction(props: NativeLinkPreviewActionProps) {\n if (!LinkPreviewNativeActionView) {\n return null;\n }\n return <LinkPreviewNativeActionView {...props} />;\n}\n// #endregion\n\n// #region Preview View\nexport interface TabPath {\n oldTabKey: string;\n newTabKey: string;\n}\nexport interface NativeLinkPreviewProps extends ViewProps {\n nextScreenId: string | undefined;\n tabPath:\n | {\n path: TabPath[];\n }\n | undefined;\n disableForceFlatten?: boolean;\n onWillPreviewOpen?: () => void;\n onDidPreviewOpen?: () => void;\n onPreviewWillClose?: () => void;\n onPreviewDidClose?: () => void;\n onPreviewTapped?: () => void;\n onPreviewTappedAnimationCompleted?: () => void;\n children: React.ReactNode;\n}\nconst NativeLinkPreviewView: React.ComponentType<NativeLinkPreviewProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'NativeLinkPreviewView')\n : null;\nexport function NativeLinkPreview(props: NativeLinkPreviewProps) {\n if (!NativeLinkPreviewView) {\n return null;\n }\n return <NativeLinkPreviewView {...props} />;\n}\n// #endregion\n\n// #region Preview Content View\nexport interface NativeLinkPreviewContentProps extends ViewProps {\n preferredContentSize?: { width: number; height: number };\n}\nconst NativeLinkPreviewContentView: React.ComponentType<NativeLinkPreviewContentProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'NativeLinkPreviewContentView')\n : null;\n\nexport function NativeLinkPreviewContent(props: NativeLinkPreviewContentProps) {\n if (!NativeLinkPreviewContentView) {\n return null;\n }\n const style = StyleSheet.flatten([\n props.style,\n {\n position: 'absolute',\n top: 0,\n left: 0,\n } as const,\n ]);\n return <NativeLinkPreviewContentView {...props} style={style} />;\n}\n// #endregion\n\n// #region Zoom transition enabler\ninterface DismissalBoundsRect {\n minX?: number;\n maxX?: number;\n minY?: number;\n maxY?: number;\n}\nconst LinkZoomTransitionEnablerNativeView: React.ComponentType<\n ViewProps & { zoomTransitionSourceIdentifier: string; disableForceFlatten?: boolean }\n> | null = areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionEnabler')\n : null;\nexport function LinkZoomTransitionEnabler(props: {\n zoomTransitionSourceIdentifier: string;\n dismissalBoundsRect?: DismissalBoundsRect | null;\n}) {\n if (!LinkZoomTransitionEnablerNativeView) {\n return null;\n }\n return (\n <LinkZoomTransitionEnablerNativeView\n {...props}\n disableForceFlatten\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n\n// #region Zoom transition source\ninterface LinkSourceAlignmentRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\ninterface LinkZoomTransitionSourceProps extends PropsWithChildren {\n identifier: string;\n alignment?: LinkSourceAlignmentRect;\n animateAspectRatioChange?: boolean;\n}\n\ninterface LinkZoomTransitionSourceNativeProps extends ViewProps, LinkZoomTransitionSourceProps {\n disableForceFlatten?: boolean;\n}\n\nconst LinkZoomTransitionSourceNativeView: React.ComponentType<LinkZoomTransitionSourceNativeProps> | null =\n areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionSource')\n : null;\nexport function LinkZoomTransitionSource(props: LinkZoomTransitionSourceProps) {\n if (!LinkZoomTransitionSourceNativeView) {\n return null;\n }\n return (\n <LinkZoomTransitionSourceNativeView\n {...props}\n disableForceFlatten\n collapsable={false}\n collapsableChildren={false}\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n\n// #region Zoom transition rect detector\nconst LinkZoomTransitionAlignmentRectDetectorNative: React.ComponentType<\n ViewProps & { identifier: string; disableForceFlatten?: boolean; children?: React.ReactNode }\n> | null = areNativeViewsAvailable\n ? requireNativeView('ExpoRouterNativeLinkPreview', 'LinkZoomTransitionAlignmentRectDetector')\n : Fragment;\nexport function LinkZoomTransitionAlignmentRectDetector(props: {\n identifier: string;\n children: React.ReactNode;\n}) {\n if (!LinkZoomTransitionAlignmentRectDetectorNative) {\n return null;\n }\n return (\n <LinkZoomTransitionAlignmentRectDetectorNative\n {...props}\n disableForceFlatten\n collapsable={false}\n collapsableChildren={false}\n style={{ display: 'contents' }}\n />\n );\n}\n// #endregion\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';
2
- export declare function enableZoomTransition(): void;
2
+ export declare function disableZoomTransition(): void;
3
3
  export declare function isZoomTransitionEnabled(): boolean;
4
4
  export declare function ZoomTransitionEnabler(props: ZoomTransitionEnablerProps): null;
5
5
  //# sourceMappingURL=ZoomTransitionEnabler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZoomTransitionEnabler.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,wBAAgB,oBAAoB,SAAK;AAEzC,wBAAgB,uBAAuB,YAEtC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,QAEtE"}
1
+ {"version":3,"file":"ZoomTransitionEnabler.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,wBAAgB,qBAAqB,SAAK;AAE1C,wBAAgB,uBAAuB,YAEtC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,QAEtE"}
@@ -1,5 +1,5 @@
1
1
  import type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';
2
- export declare function enableZoomTransition(): void;
2
+ export declare function disableZoomTransition(): void;
3
3
  export declare function isZoomTransitionEnabled(): boolean;
4
4
  export declare function ZoomTransitionEnabler({ route }: ZoomTransitionEnablerProps): import("react").JSX.Element | null;
5
5
  //# sourceMappingURL=ZoomTransitionEnabler.ios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZoomTransitionEnabler.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAahF,wBAAgB,oBAAoB,SAKnC;AAED,wBAAgB,uBAAuB,YAEtC;AAED,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,sCAmC1E"}
1
+ {"version":3,"file":"ZoomTransitionEnabler.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAahF,wBAAgB,qBAAqB,SAEpC;AAED,wBAAgB,uBAAuB,YAEtC;AAED,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,sCAoC1E"}
@@ -1,19 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enableZoomTransition = enableZoomTransition;
3
+ exports.disableZoomTransition = disableZoomTransition;
4
4
  exports.isZoomTransitionEnabled = isZoomTransitionEnabled;
5
5
  exports.ZoomTransitionEnabler = ZoomTransitionEnabler;
6
6
  const react_1 = require("react");
7
- const descriptors_context_1 = require("../../fork/native-stack/descriptors-context");
7
+ const zoom_transition_context_1 = require("./zoom-transition-context");
8
8
  const navigationParams_1 = require("../../navigationParams");
9
9
  const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
10
10
  const native_1 = require("../preview/native");
11
- let _isZoomTransitionEnabled = false;
12
- function enableZoomTransition() {
13
- if (process.env.EXPO_OS === 'ios') {
14
- console.warn('[expo-router] Zoom transition is an experimental feature. Use at your own risk.');
15
- _isZoomTransitionEnabled = true;
16
- }
11
+ let _isZoomTransitionEnabled = process.env.EXPO_OS === 'ios';
12
+ function disableZoomTransition() {
13
+ _isZoomTransitionEnabled = false;
17
14
  }
18
15
  function isZoomTransitionEnabled() {
19
16
  return _isZoomTransitionEnabled;
@@ -35,10 +32,10 @@ function ZoomTransitionEnabler({ route }) {
35
32
  const isLinkPreviewNavigation = !!internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME];
36
33
  const hasZoomTransition = !!zoomTransitionId && zoomTransitionScreenId === route.key && !isLinkPreviewNavigation;
37
34
  if (hasZoomTransition && typeof zoomTransitionId === 'string') {
38
- const descriptorsMap = (0, react_1.use)(descriptors_context_1.DescriptorsContext);
39
- const currentDescriptor = descriptorsMap[route.key];
40
- const preventInteractiveDismissal = currentDescriptor?.options?.gestureEnabled === false;
41
- return (<native_1.LinkZoomTransitionEnabler zoomTransitionSourceIdentifier={zoomTransitionId} preventInteractiveDismissal={preventInteractiveDismissal}/>);
35
+ // Read dismissalBoundsRect from context
36
+ const targetContext = (0, react_1.use)(zoom_transition_context_1.ZoomTransitionTargetContext);
37
+ const dismissalBoundsRect = targetContext.dismissalBoundsRect;
38
+ return (<native_1.LinkZoomTransitionEnabler zoomTransitionSourceIdentifier={zoomTransitionId} dismissalBoundsRect={dismissalBoundsRect}/>);
42
39
  }
43
40
  }
44
41
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ZoomTransitionEnabler.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":";;AAeA,oDAKC;AAED,0DA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,IAAA,WAAG,EAAC,wCAAkB,CAAC,CAAC;YAC/C,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACpD,MAAM,2BAA2B,GAAG,iBAAiB,EAAE,OAAO,EAAE,cAAc,KAAK,KAAK,CAAC;YACzF,OAAO,CACL,CAAC,kCAAyB,CACxB,8BAA8B,CAAC,CAAC,gBAAgB,CAAC,CACjD,2BAA2B,CAAC,CAAC,2BAA2B,CAAC,EACzD,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { use } from 'react';\n\nimport type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';\nimport { DescriptorsContext } from '../../fork/native-stack/descriptors-context';\nimport {\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME,\n} from '../../navigationParams';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\nimport { LinkZoomTransitionEnabler } from '../preview/native';\n\nlet _isZoomTransitionEnabled = false;\n\nexport function enableZoomTransition() {\n if (process.env.EXPO_OS === 'ios') {\n console.warn('[expo-router] Zoom transition is an experimental feature. Use at your own risk.');\n _isZoomTransitionEnabled = true;\n }\n}\n\nexport function isZoomTransitionEnabled() {\n return _isZoomTransitionEnabled;\n}\n\nexport function ZoomTransitionEnabler({ route }: ZoomTransitionEnablerProps) {\n const isPreview = useIsPreview();\n if (\n isZoomTransitionEnabled() &&\n !isPreview &&\n route &&\n typeof route === 'object' &&\n 'params' in route &&\n typeof route.params === 'object' &&\n 'key' in route &&\n typeof route.key === 'string'\n ) {\n const params = route.params ?? {};\n const internalParams = getInternalExpoRouterParams(params);\n const zoomTransitionId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];\n const zoomTransitionScreenId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];\n const isLinkPreviewNavigation =\n !!internalParams[INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME];\n const hasZoomTransition =\n !!zoomTransitionId && zoomTransitionScreenId === route.key && !isLinkPreviewNavigation;\n if (hasZoomTransition && typeof zoomTransitionId === 'string') {\n const descriptorsMap = use(DescriptorsContext);\n const currentDescriptor = descriptorsMap[route.key];\n const preventInteractiveDismissal = currentDescriptor?.options?.gestureEnabled === false;\n return (\n <LinkZoomTransitionEnabler\n zoomTransitionSourceIdentifier={zoomTransitionId}\n preventInteractiveDismissal={preventInteractiveDismissal}\n />\n );\n }\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"ZoomTransitionEnabler.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":";;AAeA,sDAEC;AAED,0DAEC;AAED,sDAoCC;AA3DD,iCAA4B;AAG5B,uEAAwE;AACxE,6DAKgC;AAChC,wEAA8D;AAC9D,8CAA8D;AAE9D,IAAI,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,CAAC;AAE7D,SAAgB,qBAAqB;IACnC,wBAAwB,GAAG,KAAK,CAAC;AACnC,CAAC;AAED,SAAgB,uBAAuB;IACrC,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED,SAAgB,qBAAqB,CAAC,EAAE,KAAK,EAA8B;IACzE,MAAM,SAAS,GAAG,IAAA,kCAAY,GAAE,CAAC;IACjC,IACE,uBAAuB,EAAE;QACzB,CAAC,SAAS;QACV,KAAK;QACL,OAAO,KAAK,KAAK,QAAQ;QACzB,QAAQ,IAAI,KAAK;QACjB,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;QAChC,KAAK,IAAI,KAAK;QACd,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,EAC7B,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAClC,MAAM,cAAc,GAAG,IAAA,8CAA2B,EAAC,MAAM,CAAC,CAAC;QAC3D,MAAM,gBAAgB,GACpB,cAAc,CAAC,4EAAyD,CAAC,CAAC;QAC5E,MAAM,sBAAsB,GAC1B,cAAc,CAAC,4EAAyD,CAAC,CAAC;QAC5E,MAAM,uBAAuB,GAC3B,CAAC,CAAC,cAAc,CAAC,wEAAqD,CAAC,CAAC;QAC1E,MAAM,iBAAiB,GACrB,CAAC,CAAC,gBAAgB,IAAI,sBAAsB,KAAK,KAAK,CAAC,GAAG,IAAI,CAAC,uBAAuB,CAAC;QACzF,IAAI,iBAAiB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE,CAAC;YAC9D,wCAAwC;YACxC,MAAM,aAAa,GAAG,IAAA,WAAG,EAAC,qDAA2B,CAAC,CAAC;YACvD,MAAM,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC;YAE9D,OAAO,CACL,CAAC,kCAAyB,CACxB,8BAA8B,CAAC,CAAC,gBAAgB,CAAC,CACjD,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,EACzC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { use } from 'react';\n\nimport type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';\nimport { ZoomTransitionTargetContext } from './zoom-transition-context';\nimport {\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME,\n} from '../../navigationParams';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\nimport { LinkZoomTransitionEnabler } from '../preview/native';\n\nlet _isZoomTransitionEnabled = process.env.EXPO_OS === 'ios';\n\nexport function disableZoomTransition() {\n _isZoomTransitionEnabled = false;\n}\n\nexport function isZoomTransitionEnabled() {\n return _isZoomTransitionEnabled;\n}\n\nexport function ZoomTransitionEnabler({ route }: ZoomTransitionEnablerProps) {\n const isPreview = useIsPreview();\n if (\n isZoomTransitionEnabled() &&\n !isPreview &&\n route &&\n typeof route === 'object' &&\n 'params' in route &&\n typeof route.params === 'object' &&\n 'key' in route &&\n typeof route.key === 'string'\n ) {\n const params = route.params ?? {};\n const internalParams = getInternalExpoRouterParams(params);\n const zoomTransitionId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];\n const zoomTransitionScreenId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];\n const isLinkPreviewNavigation =\n !!internalParams[INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME];\n const hasZoomTransition =\n !!zoomTransitionId && zoomTransitionScreenId === route.key && !isLinkPreviewNavigation;\n if (hasZoomTransition && typeof zoomTransitionId === 'string') {\n // Read dismissalBoundsRect from context\n const targetContext = use(ZoomTransitionTargetContext);\n const dismissalBoundsRect = targetContext.dismissalBoundsRect;\n\n return (\n <LinkZoomTransitionEnabler\n zoomTransitionSourceIdentifier={zoomTransitionId}\n dismissalBoundsRect={dismissalBoundsRect}\n />\n );\n }\n }\n return null;\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enableZoomTransition = enableZoomTransition;
3
+ exports.disableZoomTransition = disableZoomTransition;
4
4
  exports.isZoomTransitionEnabled = isZoomTransitionEnabled;
5
5
  exports.ZoomTransitionEnabler = ZoomTransitionEnabler;
6
- function enableZoomTransition() { }
6
+ function disableZoomTransition() { }
7
7
  function isZoomTransitionEnabled() {
8
8
  return false;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ZoomTransitionEnabler.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.tsx"],"names":[],"mappings":";;AAEA,oDAAyC;AAEzC,0DAEC;AAED,sDAEC;AARD,SAAgB,oBAAoB,KAAI,CAAC;AAEzC,SAAgB,uBAAuB;IACrC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,qBAAqB,CAAC,KAAiC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';\n\nexport function enableZoomTransition() {}\n\nexport function isZoomTransitionEnabled() {\n return false;\n}\n\nexport function ZoomTransitionEnabler(props: ZoomTransitionEnablerProps) {\n return null;\n}\n"]}
1
+ {"version":3,"file":"ZoomTransitionEnabler.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.tsx"],"names":[],"mappings":";;AAEA,sDAA0C;AAE1C,0DAEC;AAED,sDAEC;AARD,SAAgB,qBAAqB,KAAI,CAAC;AAE1C,SAAgB,uBAAuB;IACrC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,qBAAqB,CAAC,KAAiC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';\n\nexport function disableZoomTransition() {}\n\nexport function isZoomTransitionEnabled() {\n return false;\n}\n\nexport function ZoomTransitionEnabler(props: ZoomTransitionEnablerProps) {\n return null;\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import type { UsePreventZoomTransitionDismissalOptions } from './usePreventZoomTransitionDismissal.types';
2
+ /**
3
+ * Limits the screen area where interactive dismissal gestures are allowed for zoom transitions.
4
+ *
5
+ * This hook must be called from the destination screen of a zoom transition (the screen you navigate to, not the source).
6
+ * It restricts where app users can start swipe gestures to dismiss the screen and return to the previous screen.
7
+ *
8
+ * When a dismissal gesture starts inside the bounds, the screen can be dismissed. When a dismissal gesture starts outside
9
+ * the bounds, dismissal is blocked completely. Undefined coordinates place no restriction on that dimension.
10
+ *
11
+ * > **Note**: Only one instance of this hook should be used per screen. If multiple instances exist, the last one to render will take effect.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * // In your destination screen (e.g., app/image.tsx)
16
+ * import { usePreventZoomTransitionDismissal } from 'expo-router';
17
+ * import { useWindowDimensions } from 'react-native';
18
+ * import { Image } from 'expo-image';
19
+ *
20
+ * export default function ImageScreen() {
21
+ * const dimensions = useWindowDimensions();
22
+ * // Only allow dismissal from the bottom 200px of the screen
23
+ * usePreventZoomTransitionDismissal({
24
+ * unstable_dismissalBoundsRect: {
25
+ * minY: dimensions.height - 200
26
+ * }
27
+ * });
28
+ *
29
+ * return <Image source={...} style={{ flex: 1 }} />;
30
+ * }
31
+ * ```
32
+ *
33
+ * @platform ios
34
+ */
35
+ export declare function usePreventZoomTransitionDismissal(_options?: UsePreventZoomTransitionDismissalOptions): void;
36
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,2CAA2C,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,CAAC,EAAE,wCAAwC,QAGpD"}
@@ -0,0 +1,3 @@
1
+ import type { UsePreventZoomTransitionDismissalOptions } from './usePreventZoomTransitionDismissal.types';
2
+ export declare function usePreventZoomTransitionDismissal(options?: UsePreventZoomTransitionDismissalOptions): void;
3
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.ios.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,2CAA2C,CAAC;AAM1G,wBAAgB,iCAAiC,CAC/C,OAAO,CAAC,EAAE,wCAAwC,QAyDnD"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.usePreventZoomTransitionDismissal = usePreventZoomTransitionDismissal;
5
+ const native_1 = require("@react-navigation/native");
6
+ const react_1 = require("react");
7
+ const zoom_transition_context_1 = require("./zoom-transition-context");
8
+ const descriptors_context_1 = require("../../fork/native-stack/descriptors-context");
9
+ const navigationParams_1 = require("../../navigationParams");
10
+ const useNavigation_1 = require("../../useNavigation");
11
+ function usePreventZoomTransitionDismissal(options) {
12
+ const context = (0, react_1.use)(zoom_transition_context_1.ZoomTransitionTargetContext);
13
+ const route = (0, native_1.useRoute)();
14
+ const navigation = (0, useNavigation_1.useNavigation)();
15
+ const descriptorsMap = (0, react_1.use)(descriptors_context_1.DescriptorsContext);
16
+ const currentDescriptor = descriptorsMap[route.key];
17
+ const gestureEnabled = currentDescriptor?.options?.gestureEnabled;
18
+ (0, react_1.useEffect)(() => {
19
+ const rect = options?.unstable_dismissalBoundsRect;
20
+ // Validate rect if provided
21
+ if (rect) {
22
+ const { minX, maxX, minY, maxY } = rect;
23
+ // Validate that max > min when both are defined
24
+ if (minX !== undefined && maxX !== undefined && minX >= maxX) {
25
+ console.warn('[expo-router] unstable_dismissalBoundsRect: minX must be less than maxX');
26
+ return;
27
+ }
28
+ if (minY !== undefined && maxY !== undefined && minY >= maxY) {
29
+ console.warn('[expo-router] unstable_dismissalBoundsRect: minY must be less than maxY');
30
+ return;
31
+ }
32
+ }
33
+ // Determine the final rect to use for dismissal bounds:
34
+ // 1. If user provided a rect, use it
35
+ // 2. If user disabled gestures entirely (gestureEnabled={false}), block the whole screen
36
+ // by setting impossible bounds { maxX: 0, maxY: 0 }
37
+ // 3. Otherwise, allow normal dismissal (null rect)
38
+ const computedRect = rect ?? (gestureEnabled === false ? { maxX: 0, maxY: 0 } : null);
39
+ context.setDismissalBoundsRect?.(computedRect);
40
+ // Disable React Navigation's gesture handler when we have custom bounds to prevent conflicts.
41
+ // The native zoom transition's interactiveDismissShouldBegin callback handles dismissal instead.
42
+ // We use the internal option to preserve the user's gestureEnabled setting.
43
+ navigation.setOptions({
44
+ [navigationParams_1.INTERNAL_EXPO_ROUTER_GESTURE_ENABLED_OPTION_NAME]: computedRect ? false : undefined,
45
+ });
46
+ // Cleanup on unmount
47
+ return () => {
48
+ context.setDismissalBoundsRect?.(null);
49
+ };
50
+ }, [
51
+ options?.unstable_dismissalBoundsRect?.minX,
52
+ options?.unstable_dismissalBoundsRect?.maxX,
53
+ options?.unstable_dismissalBoundsRect?.minY,
54
+ options?.unstable_dismissalBoundsRect?.maxY,
55
+ context.setDismissalBoundsRect,
56
+ gestureEnabled,
57
+ navigation,
58
+ ]);
59
+ }
60
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.ios.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAWb,8EA0DC;AAnED,qDAAoD;AACpD,iCAAuC;AAGvC,uEAAwE;AACxE,qFAAiF;AACjF,6DAA0F;AAC1F,uDAAoD;AAEpD,SAAgB,iCAAiC,CAC/C,OAAkD;IAElD,MAAM,OAAO,GAAG,IAAA,WAAG,EAAC,qDAA2B,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,6BAAa,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,IAAA,WAAG,EAAC,wCAAkB,CAAC,CAAC;IAC/C,MAAM,iBAAiB,GAAG,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C,IAAI,CAAC,CAAC;QACzC,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,OAAO,EAAE,4BAA4B,EAAE,IAAI;QAC3C,OAAO,EAAE,4BAA4B,EAAE,IAAI;QAC3C,OAAO,EAAE,4BAA4B,EAAE,IAAI;QAC3C,OAAO,EAAE,4BAA4B,EAAE,IAAI;QAC3C,OAAO,CAAC,sBAAsB;QAC9B,cAAc;QACd,UAAU;KACX,CAAC,CAAC;AACL,CAAC","sourcesContent":["'use client';\n\nimport { useRoute } from '@react-navigation/native';\nimport { use, useEffect } from 'react';\n\nimport type { UsePreventZoomTransitionDismissalOptions } from './usePreventZoomTransitionDismissal.types';\nimport { ZoomTransitionTargetContext } from './zoom-transition-context';\nimport { DescriptorsContext } from '../../fork/native-stack/descriptors-context';\nimport { INTERNAL_EXPO_ROUTER_GESTURE_ENABLED_OPTION_NAME } from '../../navigationParams';\nimport { useNavigation } from '../../useNavigation';\n\nexport function usePreventZoomTransitionDismissal(\n options?: UsePreventZoomTransitionDismissalOptions\n) {\n const context = use(ZoomTransitionTargetContext);\n const route = useRoute();\n const navigation = useNavigation();\n\n const descriptorsMap = use(DescriptorsContext);\n const currentDescriptor = descriptorsMap[route.key];\n const gestureEnabled = currentDescriptor?.options?.gestureEnabled;\n\n useEffect(() => {\n const rect = options?.unstable_dismissalBoundsRect;\n\n // Validate rect if provided\n if (rect) {\n const { minX, maxX, minY, maxY } = rect;\n\n // Validate that max > min when both are defined\n if (minX !== undefined && maxX !== undefined && minX >= maxX) {\n console.warn('[expo-router] unstable_dismissalBoundsRect: minX must be less than maxX');\n return;\n }\n if (minY !== undefined && maxY !== undefined && minY >= maxY) {\n console.warn('[expo-router] unstable_dismissalBoundsRect: minY must be less than maxY');\n return;\n }\n }\n\n // Determine the final rect to use for dismissal bounds:\n // 1. If user provided a rect, use it\n // 2. If user disabled gestures entirely (gestureEnabled={false}), block the whole screen\n // by setting impossible bounds { maxX: 0, maxY: 0 }\n // 3. Otherwise, allow normal dismissal (null rect)\n const computedRect = rect ?? (gestureEnabled === false ? { maxX: 0, maxY: 0 } : null);\n\n context.setDismissalBoundsRect?.(computedRect);\n\n // Disable React Navigation's gesture handler when we have custom bounds to prevent conflicts.\n // The native zoom transition's interactiveDismissShouldBegin callback handles dismissal instead.\n // We use the internal option to preserve the user's gestureEnabled setting.\n navigation.setOptions({\n [INTERNAL_EXPO_ROUTER_GESTURE_ENABLED_OPTION_NAME]: computedRect ? false : undefined,\n });\n\n // Cleanup on unmount\n return () => {\n context.setDismissalBoundsRect?.(null);\n };\n }, [\n options?.unstable_dismissalBoundsRect?.minX,\n options?.unstable_dismissalBoundsRect?.maxX,\n options?.unstable_dismissalBoundsRect?.minY,\n options?.unstable_dismissalBoundsRect?.maxY,\n context.setDismissalBoundsRect,\n gestureEnabled,\n navigation,\n ]);\n}\n"]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.usePreventZoomTransitionDismissal = usePreventZoomTransitionDismissal;
5
+ /**
6
+ * Limits the screen area where interactive dismissal gestures are allowed for zoom transitions.
7
+ *
8
+ * This hook must be called from the destination screen of a zoom transition (the screen you navigate to, not the source).
9
+ * It restricts where app users can start swipe gestures to dismiss the screen and return to the previous screen.
10
+ *
11
+ * When a dismissal gesture starts inside the bounds, the screen can be dismissed. When a dismissal gesture starts outside
12
+ * the bounds, dismissal is blocked completely. Undefined coordinates place no restriction on that dimension.
13
+ *
14
+ * > **Note**: Only one instance of this hook should be used per screen. If multiple instances exist, the last one to render will take effect.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // In your destination screen (e.g., app/image.tsx)
19
+ * import { usePreventZoomTransitionDismissal } from 'expo-router';
20
+ * import { useWindowDimensions } from 'react-native';
21
+ * import { Image } from 'expo-image';
22
+ *
23
+ * export default function ImageScreen() {
24
+ * const dimensions = useWindowDimensions();
25
+ * // Only allow dismissal from the bottom 200px of the screen
26
+ * usePreventZoomTransitionDismissal({
27
+ * unstable_dismissalBoundsRect: {
28
+ * minY: dimensions.height - 200
29
+ * }
30
+ * });
31
+ *
32
+ * return <Image source={...} style={{ flex: 1 }} />;
33
+ * }
34
+ * ```
35
+ *
36
+ * @platform ios
37
+ */
38
+ function usePreventZoomTransitionDismissal(_options) {
39
+ // No-op on non-iOS platforms
40
+ }
41
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.js","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAqCb,8EAIC;AArCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,SAAgB,iCAAiC,CAC/C,QAAmD;IAEnD,6BAA6B;AAC/B,CAAC","sourcesContent":["'use client';\n\nimport type { UsePreventZoomTransitionDismissalOptions } from './usePreventZoomTransitionDismissal.types';\n\n/**\n * Limits the screen area where interactive dismissal gestures are allowed for zoom transitions.\n *\n * This hook must be called from the destination screen of a zoom transition (the screen you navigate to, not the source).\n * It restricts where app users can start swipe gestures to dismiss the screen and return to the previous screen.\n *\n * When a dismissal gesture starts inside the bounds, the screen can be dismissed. When a dismissal gesture starts outside\n * the bounds, dismissal is blocked completely. Undefined coordinates place no restriction on that dimension.\n *\n * > **Note**: Only one instance of this hook should be used per screen. If multiple instances exist, the last one to render will take effect.\n *\n * @example\n * ```tsx\n * // In your destination screen (e.g., app/image.tsx)\n * import { usePreventZoomTransitionDismissal } from 'expo-router';\n * import { useWindowDimensions } from 'react-native';\n * import { Image } from 'expo-image';\n *\n * export default function ImageScreen() {\n * const dimensions = useWindowDimensions();\n * // Only allow dismissal from the bottom 200px of the screen\n * usePreventZoomTransitionDismissal({\n * unstable_dismissalBoundsRect: {\n * minY: dimensions.height - 200\n * }\n * });\n *\n * return <Image source={...} style={{ flex: 1 }} />;\n * }\n * ```\n *\n * @platform ios\n */\nexport function usePreventZoomTransitionDismissal(\n _options?: UsePreventZoomTransitionDismissalOptions\n) {\n // No-op on non-iOS platforms\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { DismissalBoundsRect } from './zoom-transition-context';
2
+ export interface UsePreventZoomTransitionDismissalOptions {
3
+ /**
4
+ * Defines the screen bounds where interactive dismissal gestures are allowed.
5
+ *
6
+ * Each coordinate is optional. Undefined coordinates place no restriction on that dimension.
7
+ * For example, if only `minY` and `maxY` are defined, horizontal gestures are unrestricted
8
+ * while vertical gestures must stay within the Y bounds.
9
+ *
10
+ * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiviewcontroller/transition/zoomoptions/interactivedismissshouldbegin) for more information.
11
+ */
12
+ unstable_dismissalBoundsRect?: DismissalBoundsRect;
13
+ }
14
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.types.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,MAAM,WAAW,wCAAwC;IACvD;;;;;;;;OAQG;IACH,4BAA4B,CAAC,EAAE,mBAAmB,CAAC;CACpD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=usePreventZoomTransitionDismissal.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventZoomTransitionDismissal.types.js","sourceRoot":"","sources":["../../../src/link/zoom/usePreventZoomTransitionDismissal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DismissalBoundsRect } from './zoom-transition-context';\n\nexport interface UsePreventZoomTransitionDismissalOptions {\n /**\n * Defines the screen bounds where interactive dismissal gestures are allowed.\n *\n * Each coordinate is optional. Undefined coordinates place no restriction on that dimension.\n * For example, if only `minY` and `maxY` are defined, horizontal gestures are unrestricted\n * while vertical gestures must stay within the Y bounds.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiviewcontroller/transition/zoomoptions/interactivedismissshouldbegin) for more information.\n */\n unstable_dismissalBoundsRect?: DismissalBoundsRect;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"zoom-transition-context-providers.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.ios.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACzC,MAAM,2CAA2C,CAAC;AASnD,wBAAgB,mCAAmC,CAAC,EAClD,QAAQ,EACR,SAAS,GACV,EAAE,wCAAwC,+BAgD1C;AAED,wBAAgB,mCAAmC,CAAC,EAClD,KAAK,EACL,QAAQ,GACT,EAAE,wCAAwC,+VA4B1C"}
1
+ {"version":3,"file":"zoom-transition-context-providers.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.ios.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACzC,MAAM,2CAA2C,CAAC;AASnD,wBAAgB,mCAAmC,CAAC,EAClD,QAAQ,EACR,SAAS,GACV,EAAE,wCAAwC,+BAgD1C;AAED,wBAAgB,mCAAmC,CAAC,EAClD,KAAK,EACL,QAAQ,GACT,EAAE,wCAAwC,+VAkC1C"}
@@ -46,6 +46,7 @@ function ZoomTransitionSourceContextProvider({ children, linkProps, }) {
46
46
  return <zoom_transition_context_1.ZoomTransitionSourceContext value={value}>{children}</zoom_transition_context_1.ZoomTransitionSourceContext>;
47
47
  }
48
48
  function ZoomTransitionTargetContextProvider({ route, children, }) {
49
+ const [dismissalBoundsRect, setDismissalBoundsRect] = (0, react_1.useState)(null);
49
50
  const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
50
51
  if ((0, ZoomTransitionEnabler_ios_1.isZoomTransitionEnabled)() &&
51
52
  !isPreview &&
@@ -61,7 +62,11 @@ function ZoomTransitionTargetContextProvider({ route, children, }) {
61
62
  const zoomTransitionScreenId = internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];
62
63
  const hasZoomTransition = !!zoomTransitionId && zoomTransitionScreenId === route.key;
63
64
  if (hasZoomTransition && typeof zoomTransitionId === 'string') {
64
- return (<zoom_transition_context_1.ZoomTransitionTargetContext value={{ identifier: zoomTransitionId }}>
65
+ return (<zoom_transition_context_1.ZoomTransitionTargetContext value={{
66
+ identifier: zoomTransitionId,
67
+ dismissalBoundsRect,
68
+ setDismissalBoundsRect,
69
+ }}>
65
70
  {children}
66
71
  </zoom_transition_context_1.ZoomTransitionTargetContext>);
67
72
  }