expo-router 7.0.0-canary-20260114-d8e19f5 → 7.0.0-canary-20260120-bb71700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -2
- package/build/ExpoRoot.d.ts.map +1 -1
- package/build/ExpoRoot.js +2 -0
- package/build/ExpoRoot.js.map +1 -1
- package/build/global-state/routing.d.ts.map +1 -1
- package/build/global-state/routing.js +7 -2
- package/build/global-state/routing.js.map +1 -1
- package/build/global.d.ts +29 -0
- package/build/global.d.ts.map +1 -0
- package/build/global.js +3 -0
- package/build/global.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/layouts/Stack.d.ts.map +1 -1
- package/build/layouts/Stack.js +3 -0
- package/build/layouts/Stack.js.map +1 -1
- package/build/layouts/Stack.web.js +1 -0
- package/build/layouts/Stack.web.js.map +1 -1
- package/build/layouts/StackClient.d.ts +13 -14
- package/build/layouts/StackClient.d.ts.map +1 -1
- package/build/layouts/StackClient.js +3 -2
- package/build/layouts/StackClient.js.map +1 -1
- package/build/layouts/stack-utils/StackHeaderComponent.d.ts +12 -23
- package/build/layouts/stack-utils/StackHeaderComponent.d.ts.map +1 -1
- package/build/layouts/stack-utils/StackHeaderComponent.js +15 -55
- package/build/layouts/stack-utils/StackHeaderComponent.js.map +1 -1
- package/build/layouts/stack-utils/StackScreen.d.ts +5 -0
- package/build/layouts/stack-utils/StackScreen.d.ts.map +1 -1
- package/build/layouts/stack-utils/StackScreen.js +34 -7
- package/build/layouts/stack-utils/StackScreen.js.map +1 -1
- package/build/layouts/stack-utils/StackSearchBar.d.ts +28 -0
- package/build/layouts/stack-utils/StackSearchBar.d.ts.map +1 -1
- package/build/layouts/stack-utils/StackSearchBar.js +29 -0
- package/build/layouts/stack-utils/StackSearchBar.js.map +1 -1
- package/build/layouts/stack-utils/common-primitives.d.ts +6 -6
- package/build/layouts/stack-utils/common-primitives.d.ts.map +1 -1
- package/build/layouts/stack-utils/common-primitives.js +4 -4
- package/build/layouts/stack-utils/common-primitives.js.map +1 -1
- package/build/layouts/stack-utils/index.d.ts +4 -23
- package/build/layouts/stack-utils/index.d.ts.map +1 -1
- package/build/layouts/stack-utils/index.js +18 -35
- package/build/layouts/stack-utils/index.js.map +1 -1
- package/build/layouts/stack-utils/screen/StackScreenBackButton.d.ts +68 -0
- package/build/layouts/stack-utils/screen/StackScreenBackButton.d.ts.map +1 -0
- package/build/layouts/stack-utils/screen/StackScreenBackButton.js +58 -0
- package/build/layouts/stack-utils/screen/StackScreenBackButton.js.map +1 -0
- package/build/layouts/stack-utils/screen/StackScreenTitle.d.ts +58 -0
- package/build/layouts/stack-utils/screen/StackScreenTitle.d.ts.map +1 -0
- package/build/layouts/stack-utils/screen/StackScreenTitle.js +75 -0
- package/build/layouts/stack-utils/screen/StackScreenTitle.js.map +1 -0
- package/build/layouts/stack-utils/screen/index.d.ts +3 -0
- package/build/layouts/stack-utils/screen/index.d.ts.map +1 -0
- package/build/layouts/stack-utils/screen/index.js +10 -0
- package/build/layouts/stack-utils/screen/index.js.map +1 -0
- package/build/layouts/stack-utils/shared.js +3 -3
- package/build/layouts/stack-utils/shared.js.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbar.d.ts +3 -0
- package/build/layouts/stack-utils/toolbar/StackToolbar.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbar.js +24 -0
- package/build/layouts/stack-utils/toolbar/StackToolbar.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarButton.d.ts +144 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarButton.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarButton.js +68 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarButton.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarClient.d.ts +104 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarClient.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarClient.js +214 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarClient.js.map +1 -0
- package/build/layouts/stack-utils/{StackHeaderMenu.d.ts → toolbar/StackToolbarMenu.d.ts} +58 -106
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu.js +190 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSearchBarSlot.d.ts +48 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSearchBarSlot.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSearchBarSlot.js +44 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSearchBarSlot.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.d.ts +80 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.js +77 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.js.map +1 -0
- package/build/layouts/stack-utils/{StackHeaderView.d.ts → toolbar/StackToolbarView.d.ts} +21 -17
- package/build/layouts/stack-utils/toolbar/StackToolbarView.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarView.js +61 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarView.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/bottom-toolbar-native-elements.d.ts +93 -0
- package/build/layouts/stack-utils/toolbar/bottom-toolbar-native-elements.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/bottom-toolbar-native-elements.js +89 -0
- package/build/layouts/stack-utils/toolbar/bottom-toolbar-native-elements.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/context.d.ts +9 -0
- package/build/layouts/stack-utils/toolbar/context.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/context.js +16 -0
- package/build/layouts/stack-utils/toolbar/context.js.map +1 -0
- package/build/layouts/stack-utils/toolbar/index.d.ts +10 -0
- package/build/layouts/stack-utils/toolbar/index.d.ts.map +1 -0
- package/build/layouts/stack-utils/toolbar/index.js +23 -0
- package/build/layouts/stack-utils/toolbar/index.js.map +1 -0
- package/build/link/LinkWithPreview.d.ts.map +1 -1
- package/build/link/LinkWithPreview.js +8 -5
- package/build/link/LinkWithPreview.js.map +1 -1
- package/build/link/NativeMenuContext.d.ts +5 -0
- package/build/link/NativeMenuContext.d.ts.map +1 -0
- package/build/link/NativeMenuContext.js +9 -0
- package/build/link/NativeMenuContext.js.map +1 -0
- package/build/link/elements.d.ts +41 -0
- package/build/link/elements.d.ts.map +1 -1
- package/build/link/elements.js +3 -2
- package/build/link/elements.js.map +1 -1
- package/build/link/preview/native.d.ts +2 -0
- package/build/link/preview/native.d.ts.map +1 -1
- package/build/link/preview/native.js +3 -1
- package/build/link/preview/native.js.map +1 -1
- package/build/loaders/utils.d.ts +5 -2
- package/build/loaders/utils.d.ts.map +1 -1
- package/build/loaders/utils.js +8 -5
- package/build/loaders/utils.js.map +1 -1
- package/build/native-tabs/NativeBottomTabsNavigator.d.ts +1 -1
- package/build/native-tabs/NativeBottomTabsNavigator.d.ts.map +1 -1
- package/build/native-tabs/NativeBottomTabsNavigator.js +2 -1
- package/build/native-tabs/NativeBottomTabsNavigator.js.map +1 -1
- package/build/native-tabs/NativeTabTrigger.d.ts.map +1 -1
- package/build/native-tabs/NativeTabTrigger.js +6 -4
- package/build/native-tabs/NativeTabTrigger.js.map +1 -1
- package/build/native-tabs/NativeTabsView.d.ts.map +1 -1
- package/build/native-tabs/NativeTabsView.js +6 -9
- package/build/native-tabs/NativeTabsView.js.map +1 -1
- package/build/native-tabs/appearance.d.ts +7 -7
- package/build/native-tabs/appearance.d.ts.map +1 -1
- package/build/native-tabs/appearance.js.map +1 -1
- package/build/native-tabs/common/elements.d.ts +10 -0
- package/build/native-tabs/common/elements.d.ts.map +1 -1
- package/build/native-tabs/common/elements.js.map +1 -1
- package/build/native-tabs/types.d.ts +9 -3
- package/build/native-tabs/types.d.ts.map +1 -1
- package/build/native-tabs/types.js.map +1 -1
- package/build/native-tabs/utils/bottomAccessory.d.ts +2 -2
- package/build/native-tabs/utils/bottomAccessory.d.ts.map +1 -1
- package/build/native-tabs/utils/bottomAccessory.js.map +1 -1
- package/build/native-tabs/utils/icon.d.ts +4 -2
- package/build/native-tabs/utils/icon.d.ts.map +1 -1
- package/build/native-tabs/utils/icon.js +3 -0
- package/build/native-tabs/utils/icon.js.map +1 -1
- package/build/navigationEvents/index.d.ts +7 -24
- package/build/navigationEvents/index.d.ts.map +1 -1
- package/build/navigationEvents/index.js +47 -12
- package/build/navigationEvents/index.js.map +1 -1
- package/build/navigationEvents/types.d.ts +23 -0
- package/build/navigationEvents/types.d.ts.map +1 -0
- package/build/navigationEvents/types.js +3 -0
- package/build/navigationEvents/types.js.map +1 -0
- package/build/navigationEvents/utils.d.ts +9 -0
- package/build/navigationEvents/utils.d.ts.map +1 -0
- package/build/navigationEvents/utils.js +25 -0
- package/build/navigationEvents/utils.js.map +1 -0
- package/build/primitives/types.d.ts +6 -6
- package/build/primitives/types.d.ts.map +1 -1
- package/build/primitives/types.js.map +1 -1
- package/build/screensFeatureFlags.d.ts +2 -0
- package/build/screensFeatureFlags.d.ts.map +1 -0
- package/build/screensFeatureFlags.js +20 -0
- package/build/screensFeatureFlags.js.map +1 -0
- package/build/split-view/elements.js +3 -3
- package/build/split-view/elements.js.map +1 -1
- package/build/split-view/index.d.ts +1 -1
- package/build/split-view/index.d.ts.map +1 -1
- package/build/split-view/index.js.map +1 -1
- package/build/split-view/split-view.d.ts +3 -3
- package/build/split-view/split-view.d.ts.map +1 -1
- package/build/split-view/split-view.js +4 -4
- package/build/split-view/split-view.js.map +1 -1
- package/build/toolbar/native.types.d.ts +0 -14
- package/build/toolbar/native.types.d.ts.map +1 -1
- package/build/toolbar/native.types.js.map +1 -1
- package/build/ui/TabRouter.d.ts +14 -2
- package/build/ui/TabRouter.d.ts.map +1 -1
- package/build/ui/TabRouter.js +34 -4
- package/build/ui/TabRouter.js.map +1 -1
- package/build/useScreens.d.ts.map +1 -1
- package/build/useScreens.js +30 -15
- package/build/useScreens.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/LinkPreview/LinkPreviewNativeActionView.swift +18 -2
- package/ios/LinkPreview/LinkPreviewNativeModule.swift +3 -0
- package/ios/LinkPreview/LinkPreviewNativeNavigation.swift +2 -2
- package/ios/LinkPreview/LinkZoomTransition.swift +2 -2
- package/ios/Toolbar/RouterToolbarHostView.swift +68 -43
- package/ios/Toolbar/RouterToolbarItemView.swift +89 -21
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.module → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.pom → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
- package/package.json +11 -13
- package/plugin/build/index.js +1 -1
- package/plugin/options.json +5 -0
- package/plugin/src/index.ts +1 -1
- package/build/layouts/stack-utils/StackHeaderBackButton.d.ts +0 -14
- package/build/layouts/stack-utils/StackHeaderBackButton.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderBackButton.js +0 -19
- package/build/layouts/stack-utils/StackHeaderBackButton.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderButton.d.ts +0 -114
- package/build/layouts/stack-utils/StackHeaderButton.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderButton.js +0 -49
- package/build/layouts/stack-utils/StackHeaderButton.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderLeftRight.d.ts +0 -119
- package/build/layouts/stack-utils/StackHeaderLeftRight.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderLeftRight.js +0 -206
- package/build/layouts/stack-utils/StackHeaderLeftRight.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderMenu.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderMenu.js +0 -214
- package/build/layouts/stack-utils/StackHeaderMenu.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderSpacer.d.ts +0 -46
- package/build/layouts/stack-utils/StackHeaderSpacer.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderSpacer.js +0 -44
- package/build/layouts/stack-utils/StackHeaderSpacer.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderTitle.d.ts +0 -22
- package/build/layouts/stack-utils/StackHeaderTitle.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderTitle.js +0 -36
- package/build/layouts/stack-utils/StackHeaderTitle.js.map +0 -1
- package/build/layouts/stack-utils/StackHeaderView.d.ts.map +0 -1
- package/build/layouts/stack-utils/StackHeaderView.js +0 -56
- package/build/layouts/stack-utils/StackHeaderView.js.map +0 -1
- package/build/toolbar/elements.d.ts +0 -417
- package/build/toolbar/elements.d.ts.map +0 -1
- package/build/toolbar/elements.js +0 -188
- package/build/toolbar/elements.js.map +0 -1
- package/build/toolbar/index.d.ts +0 -42
- package/build/toolbar/index.d.ts.map +0 -1
- package/build/toolbar/index.js +0 -49
- package/build/toolbar/index.js.map +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.pom.sha512 +0 -1
- package/unstable-toolbar.d.ts +0 -1
- package/unstable-toolbar.js +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5-sources.jar → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5-sources.jar.md5 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5-sources.jar.sha1 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5-sources.jar.sha256 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5-sources.jar.sha512 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.aar → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.aar.md5 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.aar.sha1 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.aar.sha256 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260114-d8e19f5/expo.modules.router-7.0.0-canary-20260114-d8e19f5.aar.sha512 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha512} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
|
2
|
-
import React, { type ReactNode } from 'react';
|
|
3
|
-
export interface StackHeaderLeftProps {
|
|
4
|
-
/**
|
|
5
|
-
* Child elements to compose the left area of the header. Can include Stack.Header.Button,
|
|
6
|
-
* Stack.Header.Menu, Stack.Header.Item, and Stack.Header.Spacer components.
|
|
7
|
-
*/
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* When `true`, renders children as a custom component in the header left area,
|
|
11
|
-
* replacing the default header left layout.
|
|
12
|
-
*
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
asChild?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface StackHeaderRightProps {
|
|
18
|
-
/**
|
|
19
|
-
* Child elements to compose the right area of the header. Can include Stack.Header.Button,
|
|
20
|
-
* Stack.Header.Menu, Stack.Header.Item, and Stack.Header.Spacer components.
|
|
21
|
-
*/
|
|
22
|
-
children?: ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* When `true`, renders children as a custom component in the header right area,
|
|
25
|
-
* replacing the default header right layout.
|
|
26
|
-
*
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
asChild?: boolean;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* The component used to configure the left area of the stack header.
|
|
33
|
-
*
|
|
34
|
-
* When used inside a screen, it allows you to customize the left side of the header dynamically.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```tsx
|
|
38
|
-
* import { Stack } from 'expo-router';
|
|
39
|
-
*
|
|
40
|
-
* export default function Page() {
|
|
41
|
-
* return (
|
|
42
|
-
* <>
|
|
43
|
-
* <Stack.Header.Left>
|
|
44
|
-
* <Stack.Header.Button onPress={() => alert('Left button pressed!')} />
|
|
45
|
-
* </Stack.Header.Left>
|
|
46
|
-
* <ScreenContent />
|
|
47
|
-
* </>
|
|
48
|
-
* );
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* import { Stack } from 'expo-router';
|
|
57
|
-
*
|
|
58
|
-
* export default function Layout() {
|
|
59
|
-
* return (
|
|
60
|
-
* <Stack>
|
|
61
|
-
* <Stack.Screen name="index">
|
|
62
|
-
* <Stack.Header>
|
|
63
|
-
* <Stack.Header.Left>
|
|
64
|
-
* <Stack.Header.Button onPress={() => alert('Left button pressed!')} />
|
|
65
|
-
* </Stack.Header.Left>
|
|
66
|
-
* </Stack.Header>
|
|
67
|
-
* </Stack.Screen>
|
|
68
|
-
* </Stack>
|
|
69
|
-
* );
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
export declare const StackHeaderLeft: React.FC<StackHeaderLeftProps>;
|
|
74
|
-
/**
|
|
75
|
-
* The component used to configure the right area of the stack header.
|
|
76
|
-
*
|
|
77
|
-
* When used inside a screen, it allows you to customize the right side of the header dynamically.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```tsx
|
|
81
|
-
* import { Stack } from 'expo-router';
|
|
82
|
-
*
|
|
83
|
-
* export default function Page() {
|
|
84
|
-
* return (
|
|
85
|
-
* <>
|
|
86
|
-
* <Stack.Header.Right>
|
|
87
|
-
* <Stack.Header.Button onPress={() => alert('Right button pressed!')} />
|
|
88
|
-
* </Stack.Header.Right>
|
|
89
|
-
* <ScreenContent />
|
|
90
|
-
* </>
|
|
91
|
-
* );
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```tsx
|
|
99
|
-
* import { Stack } from 'expo-router';
|
|
100
|
-
*
|
|
101
|
-
* export default function Layout() {
|
|
102
|
-
* return (
|
|
103
|
-
* <Stack>
|
|
104
|
-
* <Stack.Screen name="index">
|
|
105
|
-
* <Stack.Header>
|
|
106
|
-
* <Stack.Header.Right>
|
|
107
|
-
* <Stack.Header.Button onPress={() => alert('Right button pressed!')} />
|
|
108
|
-
* </Stack.Header.Right>
|
|
109
|
-
* </Stack.Header>
|
|
110
|
-
* </Stack.Screen>
|
|
111
|
-
* </Stack>
|
|
112
|
-
* );
|
|
113
|
-
* }
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
export declare const StackHeaderRight: React.FC<StackHeaderRightProps>;
|
|
117
|
-
export declare function appendStackHeaderRightPropsToOptions(options: NativeStackNavigationOptions, props: StackHeaderRightProps): NativeStackNavigationOptions;
|
|
118
|
-
export declare function appendStackHeaderLeftPropsToOptions(options: NativeStackNavigationOptions, props: StackHeaderLeftProps): NativeStackNavigationOptions;
|
|
119
|
-
//# sourceMappingURL=StackHeaderLeftRight.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackHeaderLeftRight.d.ts","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackHeaderLeftRight.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBxE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAK1D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAK5D,CAAC;AAiDF,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,4BAA4B,EACrC,KAAK,EAAE,qBAAqB,GAC3B,4BAA4B,CAe9B;AAED,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,4BAA4B,EACrC,KAAK,EAAE,oBAAoB,GAC1B,4BAA4B,CAW9B"}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.StackHeaderRight = exports.StackHeaderLeft = void 0;
|
|
37
|
-
exports.appendStackHeaderRightPropsToOptions = appendStackHeaderRightPropsToOptions;
|
|
38
|
-
exports.appendStackHeaderLeftPropsToOptions = appendStackHeaderLeftPropsToOptions;
|
|
39
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
-
const react_2 = require("react");
|
|
41
|
-
const StackHeaderButton_1 = require("./StackHeaderButton");
|
|
42
|
-
const StackHeaderMenu_1 = require("./StackHeaderMenu");
|
|
43
|
-
const StackHeaderSpacer_1 = require("./StackHeaderSpacer");
|
|
44
|
-
const StackHeaderView_1 = require("./StackHeaderView");
|
|
45
|
-
const children_1 = require("../../utils/children");
|
|
46
|
-
const Screen_1 = require("../../views/Screen");
|
|
47
|
-
/**
|
|
48
|
-
* The component used to configure the left area of the stack header.
|
|
49
|
-
*
|
|
50
|
-
* When used inside a screen, it allows you to customize the left side of the header dynamically.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```tsx
|
|
54
|
-
* import { Stack } from 'expo-router';
|
|
55
|
-
*
|
|
56
|
-
* export default function Page() {
|
|
57
|
-
* return (
|
|
58
|
-
* <>
|
|
59
|
-
* <Stack.Header.Left>
|
|
60
|
-
* <Stack.Header.Button onPress={() => alert('Left button pressed!')} />
|
|
61
|
-
* </Stack.Header.Left>
|
|
62
|
-
* <ScreenContent />
|
|
63
|
-
* </>
|
|
64
|
-
* );
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```tsx
|
|
72
|
-
* import { Stack } from 'expo-router';
|
|
73
|
-
*
|
|
74
|
-
* export default function Layout() {
|
|
75
|
-
* return (
|
|
76
|
-
* <Stack>
|
|
77
|
-
* <Stack.Screen name="index">
|
|
78
|
-
* <Stack.Header>
|
|
79
|
-
* <Stack.Header.Left>
|
|
80
|
-
* <Stack.Header.Button onPress={() => alert('Left button pressed!')} />
|
|
81
|
-
* </Stack.Header.Left>
|
|
82
|
-
* </Stack.Header>
|
|
83
|
-
* </Stack.Screen>
|
|
84
|
-
* </Stack>
|
|
85
|
-
* );
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
const StackHeaderLeft = (props) => {
|
|
90
|
-
// This component will only render when used inside a page
|
|
91
|
-
// but only if it is not wrapped in Stack.Screen.Header
|
|
92
|
-
const updatedOptions = (0, react_2.useMemo)(() => appendStackHeaderLeftPropsToOptions({}, props), [props]);
|
|
93
|
-
return <Screen_1.Screen options={updatedOptions}/>;
|
|
94
|
-
};
|
|
95
|
-
exports.StackHeaderLeft = StackHeaderLeft;
|
|
96
|
-
/**
|
|
97
|
-
* The component used to configure the right area of the stack header.
|
|
98
|
-
*
|
|
99
|
-
* When used inside a screen, it allows you to customize the right side of the header dynamically.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```tsx
|
|
103
|
-
* import { Stack } from 'expo-router';
|
|
104
|
-
*
|
|
105
|
-
* export default function Page() {
|
|
106
|
-
* return (
|
|
107
|
-
* <>
|
|
108
|
-
* <Stack.Header.Right>
|
|
109
|
-
* <Stack.Header.Button onPress={() => alert('Right button pressed!')} />
|
|
110
|
-
* </Stack.Header.Right>
|
|
111
|
-
* <ScreenContent />
|
|
112
|
-
* </>
|
|
113
|
-
* );
|
|
114
|
-
* }
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```tsx
|
|
121
|
-
* import { Stack } from 'expo-router';
|
|
122
|
-
*
|
|
123
|
-
* export default function Layout() {
|
|
124
|
-
* return (
|
|
125
|
-
* <Stack>
|
|
126
|
-
* <Stack.Screen name="index">
|
|
127
|
-
* <Stack.Header>
|
|
128
|
-
* <Stack.Header.Right>
|
|
129
|
-
* <Stack.Header.Button onPress={() => alert('Right button pressed!')} />
|
|
130
|
-
* </Stack.Header.Right>
|
|
131
|
-
* </Stack.Header>
|
|
132
|
-
* </Stack.Screen>
|
|
133
|
-
* </Stack>
|
|
134
|
-
* );
|
|
135
|
-
* }
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
const StackHeaderRight = (props) => {
|
|
139
|
-
// This component will only render when used inside a page
|
|
140
|
-
// but only if it is not wrapped in Stack.Screen.Header
|
|
141
|
-
const updatedOptions = (0, react_2.useMemo)(() => appendStackHeaderRightPropsToOptions({}, props), [props]);
|
|
142
|
-
return <Screen_1.Screen options={updatedOptions}/>;
|
|
143
|
-
};
|
|
144
|
-
exports.StackHeaderRight = StackHeaderRight;
|
|
145
|
-
function convertHeaderRightLeftChildrenToUnstableItems(children, side) {
|
|
146
|
-
const allChildren = react_1.default.Children.toArray(children);
|
|
147
|
-
const actions = allChildren.filter((child) => (0, children_1.isChildOfType)(child, StackHeaderButton_1.StackHeaderButton) ||
|
|
148
|
-
(0, children_1.isChildOfType)(child, StackHeaderMenu_1.StackHeaderMenu) ||
|
|
149
|
-
(0, children_1.isChildOfType)(child, StackHeaderSpacer_1.StackHeaderSpacer) ||
|
|
150
|
-
(0, children_1.isChildOfType)(child, StackHeaderView_1.StackHeaderView));
|
|
151
|
-
if (actions.length !== allChildren.length && process.env.NODE_ENV !== 'production') {
|
|
152
|
-
const otherElements = allChildren
|
|
153
|
-
.filter((child) => !actions.some((action) => action === child))
|
|
154
|
-
.map((e) => {
|
|
155
|
-
if ((0, react_1.isValidElement)(e)) {
|
|
156
|
-
if (e.type === react_1.Fragment) {
|
|
157
|
-
return '<Fragment>';
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
return e.type?.name ?? e.type;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return String(e);
|
|
164
|
-
});
|
|
165
|
-
console.warn(`Stack.Header.${side} only accepts <Stack.Header.Button>, <Stack.Header.Menu>, <Menu>, and <Stack.Header.Item> as children. Found invalid children: ${otherElements.join(', ')}`);
|
|
166
|
-
}
|
|
167
|
-
return () => actions
|
|
168
|
-
.map((action) => {
|
|
169
|
-
if ((0, children_1.isChildOfType)(action, StackHeaderButton_1.StackHeaderButton)) {
|
|
170
|
-
return (0, StackHeaderButton_1.convertStackHeaderButtonPropsToRNHeaderItem)(action.props);
|
|
171
|
-
}
|
|
172
|
-
else if ((0, children_1.isChildOfType)(action, StackHeaderMenu_1.StackHeaderMenu)) {
|
|
173
|
-
return (0, StackHeaderMenu_1.convertStackHeaderMenuPropsToRNHeaderItem)(action.props);
|
|
174
|
-
}
|
|
175
|
-
else if ((0, children_1.isChildOfType)(action, StackHeaderSpacer_1.StackHeaderSpacer)) {
|
|
176
|
-
return (0, StackHeaderSpacer_1.convertStackHeaderSpacerPropsToRNHeaderItem)(action.props);
|
|
177
|
-
}
|
|
178
|
-
return (0, StackHeaderView_1.convertStackHeaderViewPropsToRNHeaderItem)(action.props);
|
|
179
|
-
})
|
|
180
|
-
.filter((item) => !!item);
|
|
181
|
-
}
|
|
182
|
-
function appendStackHeaderRightPropsToOptions(options, props) {
|
|
183
|
-
if (props.asChild) {
|
|
184
|
-
return {
|
|
185
|
-
...options,
|
|
186
|
-
headerRight: () => props.children,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
...options,
|
|
191
|
-
unstable_headerRightItems: convertHeaderRightLeftChildrenToUnstableItems(props.children, 'Right'),
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
function appendStackHeaderLeftPropsToOptions(options, props) {
|
|
195
|
-
if (props.asChild) {
|
|
196
|
-
return {
|
|
197
|
-
...options,
|
|
198
|
-
headerLeft: () => props.children,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
return {
|
|
202
|
-
...options,
|
|
203
|
-
unstable_headerLeftItems: convertHeaderRightLeftChildrenToUnstableItems(props.children, 'Left'),
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
//# sourceMappingURL=StackHeaderLeftRight.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackHeaderLeftRight.js","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackHeaderLeftRight.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgMA,oFAkBC;AAED,kFAcC;AAjOD,+CAAwE;AACxE,iCAAgC;AAEhC,2DAG6B;AAC7B,uDAA+F;AAC/F,2DAG6B;AAC7B,uDAA+F;AAC/F,mDAAqD;AACrD,+CAA4C;AAgC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACI,MAAM,eAAe,GAAmC,CAAC,KAAK,EAAE,EAAE;IACvE,0DAA0D;IAC1D,uDAAuD;IACvD,MAAM,cAAc,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9F,OAAO,CAAC,eAAM,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,EAAG,CAAC;AAC7C,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACI,MAAM,gBAAgB,GAAoC,CAAC,KAAK,EAAE,EAAE;IACzE,0DAA0D;IAC1D,uDAAuD;IACvD,MAAM,cAAc,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/F,OAAO,CAAC,eAAM,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,EAAG,CAAC;AAC7C,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B;AAEF,SAAS,6CAA6C,CACpD,QAAyB,EACzB,IAAsB;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NativeStackNavigationOptions } from '@react-navigation/native-stack';\nimport React, { Fragment, isValidElement, type ReactNode } from 'react';\nimport { useMemo } from 'react';\n\nimport {\n convertStackHeaderButtonPropsToRNHeaderItem,\n StackHeaderButton,\n} from './StackHeaderButton';\nimport { convertStackHeaderMenuPropsToRNHeaderItem, StackHeaderMenu } from './StackHeaderMenu';\nimport {\n convertStackHeaderSpacerPropsToRNHeaderItem,\n StackHeaderSpacer,\n} from './StackHeaderSpacer';\nimport { convertStackHeaderViewPropsToRNHeaderItem, StackHeaderView } from './StackHeaderView';\nimport { isChildOfType } from '../../utils/children';\nimport { Screen } from '../../views/Screen';\n\nexport interface StackHeaderLeftProps {\n /**\n * Child elements to compose the left area of the header. Can include Stack.Header.Button,\n * Stack.Header.Menu, Stack.Header.Item, and Stack.Header.Spacer components.\n */\n children?: ReactNode;\n /**\n * When `true`, renders children as a custom component in the header left area,\n * replacing the default header left layout.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport interface StackHeaderRightProps {\n /**\n * Child elements to compose the right area of the header. Can include Stack.Header.Button,\n * Stack.Header.Menu, Stack.Header.Item, and Stack.Header.Spacer components.\n */\n children?: ReactNode;\n /**\n * When `true`, renders children as a custom component in the header right area,\n * replacing the default header right layout.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * The component used to configure the left area of the stack header.\n *\n * When used inside a screen, it allows you to customize the left side of the header dynamically.\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * export default function Page() {\n * return (\n * <>\n * <Stack.Header.Left>\n * <Stack.Header.Button onPress={() => alert('Left button pressed!')} />\n * </Stack.Header.Left>\n * <ScreenContent />\n * </>\n * );\n * }\n * ```\n *\n * When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * export default function Layout() {\n * return (\n * <Stack>\n * <Stack.Screen name=\"index\">\n * <Stack.Header>\n * <Stack.Header.Left>\n * <Stack.Header.Button onPress={() => alert('Left button pressed!')} />\n * </Stack.Header.Left>\n * </Stack.Header>\n * </Stack.Screen>\n * </Stack>\n * );\n * }\n * ```\n */\nexport const StackHeaderLeft: React.FC<StackHeaderLeftProps> = (props) => {\n // This component will only render when used inside a page\n // but only if it is not wrapped in Stack.Screen.Header\n const updatedOptions = useMemo(() => appendStackHeaderLeftPropsToOptions({}, props), [props]);\n return <Screen options={updatedOptions} />;\n};\n\n/**\n * The component used to configure the right area of the stack header.\n *\n * When used inside a screen, it allows you to customize the right side of the header dynamically.\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * export default function Page() {\n * return (\n * <>\n * <Stack.Header.Right>\n * <Stack.Header.Button onPress={() => alert('Right button pressed!')} />\n * </Stack.Header.Right>\n * <ScreenContent />\n * </>\n * );\n * }\n * ```\n *\n * When used inside the layout, it needs to be wrapped in `Stack.Header` to take effect.\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * export default function Layout() {\n * return (\n * <Stack>\n * <Stack.Screen name=\"index\">\n * <Stack.Header>\n * <Stack.Header.Right>\n * <Stack.Header.Button onPress={() => alert('Right button pressed!')} />\n * </Stack.Header.Right>\n * </Stack.Header>\n * </Stack.Screen>\n * </Stack>\n * );\n * }\n * ```\n */\nexport const StackHeaderRight: React.FC<StackHeaderRightProps> = (props) => {\n // This component will only render when used inside a page\n // but only if it is not wrapped in Stack.Screen.Header\n const updatedOptions = useMemo(() => appendStackHeaderRightPropsToOptions({}, props), [props]);\n return <Screen options={updatedOptions} />;\n};\n\nfunction convertHeaderRightLeftChildrenToUnstableItems(\n children: React.ReactNode,\n side: 'Left' | 'Right'\n):\n | NativeStackNavigationOptions['unstable_headerRightItems']\n | NativeStackNavigationOptions['unstable_headerLeftItems'] {\n const allChildren = React.Children.toArray(children);\n const actions = allChildren.filter(\n (child) =>\n isChildOfType(child, StackHeaderButton) ||\n isChildOfType(child, StackHeaderMenu) ||\n isChildOfType(child, StackHeaderSpacer) ||\n isChildOfType(child, StackHeaderView)\n );\n if (actions.length !== allChildren.length && process.env.NODE_ENV !== 'production') {\n const otherElements = allChildren\n .filter((child) => !actions.some((action) => action === child))\n .map((e) => {\n if (isValidElement(e)) {\n if (e.type === Fragment) {\n return '<Fragment>';\n } else {\n return (e.type as { name: string })?.name ?? e.type;\n }\n }\n\n return String(e);\n });\n console.warn(\n `Stack.Header.${side} only accepts <Stack.Header.Button>, <Stack.Header.Menu>, <Menu>, and <Stack.Header.Item> as children. Found invalid children: ${otherElements.join(', ')}`\n );\n }\n return () =>\n actions\n .map((action) => {\n if (isChildOfType(action, StackHeaderButton)) {\n return convertStackHeaderButtonPropsToRNHeaderItem(action.props);\n } else if (isChildOfType(action, StackHeaderMenu)) {\n return convertStackHeaderMenuPropsToRNHeaderItem(action.props);\n } else if (isChildOfType(action, StackHeaderSpacer)) {\n return convertStackHeaderSpacerPropsToRNHeaderItem(action.props);\n }\n return convertStackHeaderViewPropsToRNHeaderItem(action.props);\n })\n .filter((item) => !!item);\n}\n\nexport function appendStackHeaderRightPropsToOptions(\n options: NativeStackNavigationOptions,\n props: StackHeaderRightProps\n): NativeStackNavigationOptions {\n if (props.asChild) {\n return {\n ...options,\n headerRight: () => props.children,\n };\n }\n\n return {\n ...options,\n unstable_headerRightItems: convertHeaderRightLeftChildrenToUnstableItems(\n props.children,\n 'Right'\n ),\n };\n}\n\nexport function appendStackHeaderLeftPropsToOptions(\n options: NativeStackNavigationOptions,\n props: StackHeaderLeftProps\n): NativeStackNavigationOptions {\n if (props.asChild) {\n return {\n ...options,\n headerLeft: () => props.children,\n };\n }\n return {\n ...options,\n unstable_headerLeftItems: convertHeaderRightLeftChildrenToUnstableItems(props.children, 'Left'),\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackHeaderMenu.d.ts","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackHeaderMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAC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;;;GAyEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAQ,CAAC;AAEpE,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,oBAAoB,GAC1B,yBAAyB,GAAG,SAAS,CA2BvC;AAuDD,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,mBAAmB,CAAC;IACtC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAAc,CAAC;AAEtF,wBAAgB,+CAA+C,CAC7D,KAAK,EAAE,0BAA0B,GAChC,+BAA+B,CAwBjC"}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StackHeaderMenuAction = exports.StackHeaderMenu = void 0;
|
|
4
|
-
exports.convertStackHeaderMenuPropsToRNHeaderItem = convertStackHeaderMenuPropsToRNHeaderItem;
|
|
5
|
-
exports.convertStackHeaderMenuActionPropsToRNHeaderItem = convertStackHeaderMenuActionPropsToRNHeaderItem;
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const shared_1 = require("./shared");
|
|
8
|
-
const primitives_1 = require("../../primitives");
|
|
9
|
-
const children_1 = require("../../utils/children");
|
|
10
|
-
/**
|
|
11
|
-
* Component representing menu for `Stack.Header.Right` or `Stack.Header.Left`.
|
|
12
|
-
*
|
|
13
|
-
* Use as `Stack.Header.Menu` to provide top-level menus on iOS header bars.
|
|
14
|
-
* It accepts `Stack.Header.MenuAction` and nested `Stack.Header.Menu`
|
|
15
|
-
* elements. Menu can be configured using both component props and child
|
|
16
|
-
* elements.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* import { Stack } from 'expo-router';
|
|
21
|
-
* import { Alert } from 'react-native';
|
|
22
|
-
*
|
|
23
|
-
* export default function Screen() {
|
|
24
|
-
* return (
|
|
25
|
-
* <>
|
|
26
|
-
* <ScreenContent />
|
|
27
|
-
* <Stack.Screen>
|
|
28
|
-
* <Stack.Header>
|
|
29
|
-
* <Stack.Header.Right>
|
|
30
|
-
* <Stack.Header.Menu>
|
|
31
|
-
* <Stack.Header.Label>Menu</Stack.Header.Label>
|
|
32
|
-
* <Stack.Header.Icon sf="ellipsis.circle" />
|
|
33
|
-
* <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>
|
|
34
|
-
* Action 1
|
|
35
|
-
* </Stack.Header.MenuAction>
|
|
36
|
-
* <Stack.Header.MenuAction isOn icon="star.fill">
|
|
37
|
-
* Action 2
|
|
38
|
-
* </Stack.Header.MenuAction>
|
|
39
|
-
* <Stack.Header.Menu inline>
|
|
40
|
-
* <Stack.Header.MenuAction isOn>Sub Action</Stack.Header.MenuAction>
|
|
41
|
-
* </Stack.Header.Menu>
|
|
42
|
-
* </Stack.Header.Menu>
|
|
43
|
-
* </Stack.Header.Right>
|
|
44
|
-
* </Stack.Header>
|
|
45
|
-
* </Stack.Screen>
|
|
46
|
-
* </>
|
|
47
|
-
* );
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```tsx
|
|
53
|
-
* import { Stack } from 'expo-router';
|
|
54
|
-
* import { Text } from 'react-native';
|
|
55
|
-
*
|
|
56
|
-
* export default function Screen() {
|
|
57
|
-
* return (
|
|
58
|
-
* <>
|
|
59
|
-
* <ScreenContent />
|
|
60
|
-
* <Stack.Screen>
|
|
61
|
-
* <Stack.Header>
|
|
62
|
-
* <Stack.Header.Left>
|
|
63
|
-
* <Stack.Header.Menu>
|
|
64
|
-
* <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>
|
|
65
|
-
* Action 1
|
|
66
|
-
* </Stack.Header.MenuAction>
|
|
67
|
-
* <Stack.Header.Menu inline palette title="Icons">
|
|
68
|
-
* <Stack.Header.MenuAction isOn icon="star.fill" />
|
|
69
|
-
* <Stack.Header.MenuAction icon="heart.fill" />
|
|
70
|
-
* </Stack.Header.Menu>
|
|
71
|
-
* </Stack.Header.Menu>
|
|
72
|
-
* </Stack.Header.Left>
|
|
73
|
-
* </Stack.Header>
|
|
74
|
-
* </Stack.Screen>
|
|
75
|
-
* </>
|
|
76
|
-
* );
|
|
77
|
-
* }
|
|
78
|
-
* ```
|
|
79
|
-
*
|
|
80
|
-
* @see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/menus) for more information about menus on iOS.
|
|
81
|
-
*
|
|
82
|
-
* @platform ios
|
|
83
|
-
*/
|
|
84
|
-
exports.StackHeaderMenu = primitives_1.Menu;
|
|
85
|
-
function convertStackHeaderMenuPropsToRNHeaderItem(props) {
|
|
86
|
-
if (props.hidden) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
const { title, ...rest } = props;
|
|
90
|
-
const actions = react_1.Children.toArray(props.children).filter((child) => (0, children_1.isChildOfType)(child, exports.StackHeaderMenuAction) || (0, children_1.isChildOfType)(child, exports.StackHeaderMenu));
|
|
91
|
-
const item = {
|
|
92
|
-
...(0, shared_1.convertStackHeaderSharedPropsToRNSharedHeaderItem)(rest),
|
|
93
|
-
type: 'menu',
|
|
94
|
-
menu: {
|
|
95
|
-
items: actions
|
|
96
|
-
.map((action) => {
|
|
97
|
-
if ((0, children_1.isChildOfType)(action, exports.StackHeaderMenu)) {
|
|
98
|
-
return convertStackHeaderSubmenuMenuPropsToRNHeaderItem(action.props);
|
|
99
|
-
}
|
|
100
|
-
return convertStackHeaderMenuActionPropsToRNHeaderItem(action.props);
|
|
101
|
-
})
|
|
102
|
-
.filter((i) => !!i),
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
if (title) {
|
|
106
|
-
item.menu.title = title;
|
|
107
|
-
}
|
|
108
|
-
return item;
|
|
109
|
-
}
|
|
110
|
-
function convertStackHeaderSubmenuMenuPropsToRNHeaderItem(props) {
|
|
111
|
-
if (props.hidden) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
// Removing children. Otherwise the buttons will be broken
|
|
115
|
-
const sharedProps = (0, shared_1.convertStackHeaderSharedPropsToRNSharedHeaderItem)(props);
|
|
116
|
-
const actions = react_1.Children.toArray(props.children).filter((child) => (0, children_1.isChildOfType)(child, exports.StackHeaderMenuAction) || (0, children_1.isChildOfType)(child, exports.StackHeaderMenu));
|
|
117
|
-
// TODO: Remove Pick<HeaderBarButtonItemSubmenu> when this PR is merged and released in react-navigation:
|
|
118
|
-
// https://github.com/react-navigation/react-navigation/pull/12895
|
|
119
|
-
const item = {
|
|
120
|
-
type: 'submenu',
|
|
121
|
-
items: actions
|
|
122
|
-
.map((action) => {
|
|
123
|
-
if ((0, children_1.isChildOfType)(action, exports.StackHeaderMenu)) {
|
|
124
|
-
return convertStackHeaderSubmenuMenuPropsToRNHeaderItem(action.props);
|
|
125
|
-
}
|
|
126
|
-
return convertStackHeaderMenuActionPropsToRNHeaderItem(action.props);
|
|
127
|
-
})
|
|
128
|
-
.filter((i) => !!i),
|
|
129
|
-
label: sharedProps.label || props.title || '',
|
|
130
|
-
};
|
|
131
|
-
if (props.inline !== undefined) {
|
|
132
|
-
item.displayInline = props.inline;
|
|
133
|
-
}
|
|
134
|
-
if (props.palette !== undefined) {
|
|
135
|
-
item.displayAsPalette = props.palette;
|
|
136
|
-
}
|
|
137
|
-
if (props.destructive !== undefined) {
|
|
138
|
-
item.destructive = props.destructive;
|
|
139
|
-
}
|
|
140
|
-
// TODO: Add elementSize to react-native-screens
|
|
141
|
-
if (sharedProps.icon) {
|
|
142
|
-
// Only SF Symbols are supported in submenu icons
|
|
143
|
-
if (sharedProps.icon.type === 'sfSymbol') {
|
|
144
|
-
item.icon = sharedProps.icon;
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
console.warn('When Icon is used inside Stack.Header.Menu used as a submenu, only sfSymbol icons are supported. This is a limitation of React Native Screens.');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return item;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* An action item for a `Stack.Header.Menu`.
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* ```tsx
|
|
157
|
-
* import React from 'react';
|
|
158
|
-
* import { Alert } from 'react-native';
|
|
159
|
-
* import { Stack, Label, Icon } from 'expo-router';
|
|
160
|
-
*
|
|
161
|
-
* export default function ExampleScreen() {
|
|
162
|
-
* return (
|
|
163
|
-
* <>
|
|
164
|
-
* <ScreenContent />
|
|
165
|
-
* <Stack.Screen>
|
|
166
|
-
* <Stack.Header>
|
|
167
|
-
* <Stack.Header.Right>
|
|
168
|
-
* <Stack.Header.Menu icon="ellipsis.circle">
|
|
169
|
-
* <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>
|
|
170
|
-
* Action 1
|
|
171
|
-
* </Stack.Header.MenuAction>
|
|
172
|
-
* <Stack.Header.MenuAction isOn onPress={() => Alert.alert('Action 2 pressed!')}>
|
|
173
|
-
* <Label>Action 2</Label>
|
|
174
|
-
* <Icon sf="star.fill" />
|
|
175
|
-
* </Stack.Header.MenuAction>
|
|
176
|
-
* </Stack.Header.Menu>
|
|
177
|
-
* </Stack.Header.Right>
|
|
178
|
-
* </Stack.Header>
|
|
179
|
-
* </Stack.Screen>
|
|
180
|
-
* </>
|
|
181
|
-
* );
|
|
182
|
-
* }
|
|
183
|
-
* ```
|
|
184
|
-
*
|
|
185
|
-
* @see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/menus) for more information about menus on iOS.
|
|
186
|
-
*
|
|
187
|
-
* @platform ios
|
|
188
|
-
*/
|
|
189
|
-
exports.StackHeaderMenuAction = primitives_1.MenuAction;
|
|
190
|
-
function convertStackHeaderMenuActionPropsToRNHeaderItem(props) {
|
|
191
|
-
const { children, isOn, unstable_keepPresented, icon, ...rest } = props;
|
|
192
|
-
const sharedProps = (0, shared_1.convertStackHeaderSharedPropsToRNSharedHeaderItem)(props);
|
|
193
|
-
const item = {
|
|
194
|
-
...rest,
|
|
195
|
-
type: 'action',
|
|
196
|
-
label: sharedProps.label,
|
|
197
|
-
state: isOn ? 'on' : 'off',
|
|
198
|
-
onPress: props.onPress ?? (() => { }),
|
|
199
|
-
};
|
|
200
|
-
if (unstable_keepPresented !== undefined) {
|
|
201
|
-
item.keepsMenuPresented = unstable_keepPresented;
|
|
202
|
-
}
|
|
203
|
-
if (sharedProps.icon) {
|
|
204
|
-
// Only SF Symbols are supported in action icons
|
|
205
|
-
if (sharedProps.icon.type === 'sfSymbol') {
|
|
206
|
-
item.icon = sharedProps.icon;
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
console.warn('When Icon is used inside Stack.Header.Menu.Action, only sfSymbol icons are supported. This is a limitation of React Native Screens.');
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
return item;
|
|
213
|
-
}
|
|
214
|
-
//# sourceMappingURL=StackHeaderMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackHeaderMenu.js","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackHeaderMenu.tsx"],"names":[],"mappings":";;;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G,WAAW,CAAC,IAAI,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CACV,qIAAqI,CACtI,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type {\n NativeStackHeaderItemMenu,\n NativeStackHeaderItemMenuAction,\n NativeStackHeaderItemMenuSubmenu,\n} from '@react-navigation/native-stack';\nimport { Children, type ReactNode } from 'react';\nimport type { ImageSourcePropType } from 'react-native';\nimport type { HeaderBarButtonItemSubmenu } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport {\n convertStackHeaderSharedPropsToRNSharedHeaderItem,\n type StackHeaderItemSharedProps,\n} from './shared';\nimport { Menu, MenuAction } from '../../primitives';\nimport { isChildOfType } from '../../utils/children';\n\nexport interface StackHeaderMenuProps {\n accessibilityLabel?: string;\n accessibilityHint?: string;\n /**\n * There are two ways to specify the content of the menu header item - using props or child components:\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * ...\n * <Stack.Header.Menu icon=\"star.fill\" title=\"As props\">\n * <Stack.Header.MenuAction>Action 1</Stack.Header.MenuAction>\n * </Stack.Header.Menu>\n * ```\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n *\n * ...\n * <Stack.Header.Menu>\n * <Stack.Header.Icon sf=\"star.fill\" />\n * <Stack.Header.Label>As components</Stack.Header.Label>\n * <Stack.Header.Badge>3</Stack.Header.Badge>\n * <Stack.Header.MenuAction>Action 1</Stack.Header.MenuAction>\n * </Stack.Header.Menu>\n * ```\n *\n * **Note**: When icon is used, the label will not be shown and will be used for accessibility purposes only.\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 disabled?: boolean;\n /**\n * Whether to hide the shared background.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground) for more information.\n *\n * @platform iOS 26+\n */\n hidesSharedBackground?: boolean;\n /**\n * Whether the menu should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n /**\n * Icon for the menu item.\n *\n * Can be an SF Symbol name or an image source.\n */\n icon?: StackHeaderItemSharedProps['icon'];\n /**\n * If `true`, the menu will be displayed inline.\n * This means that the menu will not be collapsed\n *\n * > **Note*: Inline menus are only supported in submenus.\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 * If `true`, the menu will be displayed as a palette.\n * This means that the menu will be displayed as one row\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 * Whether to separate the background of this item from other header items.\n *\n * @default false\n */\n separateBackground?: boolean;\n /**\n * Style for the label of the header item.\n */\n style?: StackHeaderItemSharedProps['style'];\n /**\n * The tint color to apply to the button item\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/tintcolor) for more information.\n */\n tintColor?: StackHeaderItemSharedProps['tintColor'];\n /**\n * Optional title to show on top of the menu.\n */\n title?: string;\n /**\n * @default 'plain'\n */\n variant?: StackHeaderItemSharedProps['variant'];\n}\n\n/**\n * Component representing menu for `Stack.Header.Right` or `Stack.Header.Left`.\n *\n * Use as `Stack.Header.Menu` to provide top-level menus on iOS header bars.\n * It accepts `Stack.Header.MenuAction` and nested `Stack.Header.Menu`\n * elements. Menu can be configured using both component props and child\n * elements.\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n * import { Alert } from 'react-native';\n *\n * export default function Screen() {\n * return (\n * <>\n * <ScreenContent />\n * <Stack.Screen>\n * <Stack.Header>\n * <Stack.Header.Right>\n * <Stack.Header.Menu>\n * <Stack.Header.Label>Menu</Stack.Header.Label>\n * <Stack.Header.Icon sf=\"ellipsis.circle\" />\n * <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>\n * Action 1\n * </Stack.Header.MenuAction>\n * <Stack.Header.MenuAction isOn icon=\"star.fill\">\n * Action 2\n * </Stack.Header.MenuAction>\n * <Stack.Header.Menu inline>\n * <Stack.Header.MenuAction isOn>Sub Action</Stack.Header.MenuAction>\n * </Stack.Header.Menu>\n * </Stack.Header.Menu>\n * </Stack.Header.Right>\n * </Stack.Header>\n * </Stack.Screen>\n * </>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * import { Stack } from 'expo-router';\n * import { Text } from 'react-native';\n *\n * export default function Screen() {\n * return (\n * <>\n * <ScreenContent />\n * <Stack.Screen>\n * <Stack.Header>\n * <Stack.Header.Left>\n * <Stack.Header.Menu>\n * <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>\n * Action 1\n * </Stack.Header.MenuAction>\n * <Stack.Header.Menu inline palette title=\"Icons\">\n * <Stack.Header.MenuAction isOn icon=\"star.fill\" />\n * <Stack.Header.MenuAction icon=\"heart.fill\" />\n * </Stack.Header.Menu>\n * </Stack.Header.Menu>\n * </Stack.Header.Left>\n * </Stack.Header>\n * </Stack.Screen>\n * </>\n * );\n * }\n * ```\n *\n * @see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/menus) for more information about menus on iOS.\n *\n * @platform ios\n */\nexport const StackHeaderMenu: React.FC<StackHeaderMenuProps> = Menu;\n\nexport function convertStackHeaderMenuPropsToRNHeaderItem(\n props: StackHeaderMenuProps\n): NativeStackHeaderItemMenu | undefined {\n if (props.hidden) {\n return undefined;\n }\n const { title, ...rest } = props;\n const actions = Children.toArray(props.children).filter(\n (child) => isChildOfType(child, StackHeaderMenuAction) || isChildOfType(child, StackHeaderMenu)\n );\n const item: NativeStackHeaderItemMenu = {\n ...convertStackHeaderSharedPropsToRNSharedHeaderItem(rest),\n type: 'menu',\n menu: {\n items: actions\n .map((action) => {\n if (isChildOfType(action, StackHeaderMenu)) {\n return convertStackHeaderSubmenuMenuPropsToRNHeaderItem(action.props);\n }\n return convertStackHeaderMenuActionPropsToRNHeaderItem(action.props);\n })\n .filter((i) => !!i),\n },\n };\n if (title) {\n item.menu.title = title;\n }\n\n return item;\n}\n\nfunction convertStackHeaderSubmenuMenuPropsToRNHeaderItem(\n props: StackHeaderMenuProps\n): NativeStackHeaderItemMenuSubmenu | undefined {\n if (props.hidden) {\n return undefined;\n }\n // Removing children. Otherwise the buttons will be broken\n const sharedProps = convertStackHeaderSharedPropsToRNSharedHeaderItem(props);\n const actions = Children.toArray(props.children).filter(\n (child) => isChildOfType(child, StackHeaderMenuAction) || isChildOfType(child, StackHeaderMenu)\n );\n\n // TODO: Remove Pick<HeaderBarButtonItemSubmenu> when this PR is merged and released in react-navigation:\n // https://github.com/react-navigation/react-navigation/pull/12895\n const item: NativeStackHeaderItemMenuSubmenu &\n Pick<HeaderBarButtonItemSubmenu, 'displayAsPalette' | 'displayInline' | 'destructive'> = {\n type: 'submenu',\n items: actions\n .map((action) => {\n if (isChildOfType(action, StackHeaderMenu)) {\n return convertStackHeaderSubmenuMenuPropsToRNHeaderItem(action.props);\n }\n return convertStackHeaderMenuActionPropsToRNHeaderItem(action.props);\n })\n .filter((i) => !!i),\n label: sharedProps.label || props.title || '',\n };\n\n if (props.inline !== undefined) {\n item.displayInline = props.inline;\n }\n if (props.palette !== undefined) {\n item.displayAsPalette = props.palette;\n }\n if (props.destructive !== undefined) {\n item.destructive = props.destructive;\n }\n // TODO: Add elementSize to react-native-screens\n\n if (sharedProps.icon) {\n // Only SF Symbols are supported in submenu icons\n if (sharedProps.icon.type === 'sfSymbol') {\n item.icon = sharedProps.icon;\n } else {\n console.warn(\n 'When Icon is used inside Stack.Header.Menu used as a submenu, only sfSymbol icons are supported. This is a limitation of React Native Screens.'\n );\n }\n }\n\n return item;\n}\n\nexport interface StackHeaderMenuActionProps {\n /**\n * Can be an Icon, Label or string title.\n */\n children?: ReactNode;\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 icon?: SFSymbol | ImageSourcePropType;\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 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 * If `true`, the menu item will be displayed as selected.\n */\n isOn?: boolean;\n onPress?: () => void;\n /**\n * An elaborated title that explains the purpose of the action.\n */\n discoverabilityLabel?: string;\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 hidden?: boolean;\n}\n\n/**\n * An action item for a `Stack.Header.Menu`.\n *\n * @example\n * ```tsx\n * import React from 'react';\n * import { Alert } from 'react-native';\n * import { Stack, Label, Icon } from 'expo-router';\n *\n * export default function ExampleScreen() {\n * return (\n * <>\n * <ScreenContent />\n * <Stack.Screen>\n * <Stack.Header>\n * <Stack.Header.Right>\n * <Stack.Header.Menu icon=\"ellipsis.circle\">\n * <Stack.Header.MenuAction onPress={() => Alert.alert('Action 1 pressed!')}>\n * Action 1\n * </Stack.Header.MenuAction>\n * <Stack.Header.MenuAction isOn onPress={() => Alert.alert('Action 2 pressed!')}>\n * <Label>Action 2</Label>\n * <Icon sf=\"star.fill\" />\n * </Stack.Header.MenuAction>\n * </Stack.Header.Menu>\n * </Stack.Header.Right>\n * </Stack.Header>\n * </Stack.Screen>\n * </>\n * );\n * }\n * ```\n *\n * @see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/menus) for more information about menus on iOS.\n *\n * @platform ios\n */\nexport const StackHeaderMenuAction: React.FC<StackHeaderMenuActionProps> = MenuAction;\n\nexport function convertStackHeaderMenuActionPropsToRNHeaderItem(\n props: StackHeaderMenuActionProps\n): NativeStackHeaderItemMenuAction {\n const { children, isOn, unstable_keepPresented, icon, ...rest } = props;\n const sharedProps = convertStackHeaderSharedPropsToRNSharedHeaderItem(props);\n const item: NativeStackHeaderItemMenuAction = {\n ...rest,\n type: 'action',\n label: sharedProps.label,\n state: isOn ? 'on' : 'off',\n onPress: props.onPress ?? (() => {}),\n };\n if (unstable_keepPresented !== undefined) {\n item.keepsMenuPresented = unstable_keepPresented;\n }\n if (sharedProps.icon) {\n // Only SF Symbols are supported in action icons\n if (sharedProps.icon.type === 'sfSymbol') {\n item.icon = sharedProps.icon;\n } else {\n console.warn(\n 'When Icon is used inside Stack.Header.Menu.Action, only sfSymbol icons are supported. This is a limitation of React Native Screens.'\n );\n }\n }\n return item;\n}\n"]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { NativeStackHeaderItemSpacing } from '@react-navigation/native-stack';
|
|
2
|
-
export interface StackHeaderSpacerProps {
|
|
3
|
-
/**
|
|
4
|
-
* Whether the spacer should be hidden.
|
|
5
|
-
*
|
|
6
|
-
* @default false
|
|
7
|
-
*/
|
|
8
|
-
hidden?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* The width of the spacing element.
|
|
11
|
-
*
|
|
12
|
-
* This is typically used to create space between header elements.
|
|
13
|
-
*/
|
|
14
|
-
width: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A spacing helper used inside `Stack.Header.Left` or `Stack.Header.Right` to create
|
|
18
|
-
* empty space between header items.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* import { Stack } from 'expo-router';
|
|
23
|
-
*
|
|
24
|
-
* export default function Screen() {
|
|
25
|
-
* return (
|
|
26
|
-
* <>
|
|
27
|
-
* <ScreenContent />
|
|
28
|
-
* <Stack.Screen>
|
|
29
|
-
* <Stack.Header>
|
|
30
|
-
* <Stack.Header.Left>
|
|
31
|
-
* <Stack.Header.Button icon="arrow.left" />
|
|
32
|
-
* <Stack.Header.Spacer width={8} />
|
|
33
|
-
* <Stack.Header.Button icon="arrow.right" />
|
|
34
|
-
* </Stack.Header.Left>
|
|
35
|
-
* </Stack.Header>
|
|
36
|
-
* </Stack.Screen>
|
|
37
|
-
* </>
|
|
38
|
-
* );
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @platform ios
|
|
43
|
-
*/
|
|
44
|
-
export declare const StackHeaderSpacer: React.FC<StackHeaderSpacerProps>;
|
|
45
|
-
export declare function convertStackHeaderSpacerPropsToRNHeaderItem({ hidden, width, }: StackHeaderSpacerProps): NativeStackHeaderItemSpacing | undefined;
|
|
46
|
-
//# sourceMappingURL=StackHeaderSpacer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StackHeaderSpacer.d.ts","sourceRoot":"","sources":["../../../src/layouts/stack-utils/StackHeaderSpacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CAIf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAc,CAAC;AAE9E,wBAAgB,2CAA2C,CAAC,EAC1D,MAAM,EACN,KAAK,GACN,EAAE,sBAAsB,GAAG,4BAA4B,GAAG,SAAS,CAQnE"}
|