expo-router 7.0.0-canary-20251230-fc48ddc → 7.0.0-canary-20260105-6b962e6
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/internal/utils.d.ts +1 -1
- package/build/internal/utils.d.ts.map +1 -1
- package/build/internal/utils.js +2 -2
- package/build/internal/utils.js.map +1 -1
- package/build/layouts/stack-utils/StackHeaderMenu.d.ts.map +1 -1
- package/build/layouts/stack-utils/StackHeaderMenu.js +1 -0
- package/build/layouts/stack-utils/StackHeaderMenu.js.map +1 -1
- package/build/link/elements.d.ts +13 -1
- package/build/link/elements.d.ts.map +1 -1
- package/build/link/elements.js +1 -1
- package/build/link/elements.js.map +1 -1
- package/build/link/preview/native.d.ts +1 -0
- package/build/link/preview/native.d.ts.map +1 -1
- package/build/link/preview/native.js.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.d.ts +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.d.ts.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.js +4 -7
- package/build/link/zoom/ZoomTransitionEnabler.ios.js.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.js +2 -2
- package/build/link/zoom/ZoomTransitionEnabler.js.map +1 -1
- package/build/native-tabs/NativeTabsView.d.ts.map +1 -1
- package/build/native-tabs/NativeTabsView.js +21 -2
- package/build/native-tabs/NativeTabsView.js.map +1 -1
- package/build/native-tabs/common/elements.d.ts +8 -0
- package/build/native-tabs/common/elements.d.ts.map +1 -1
- package/build/native-tabs/common/elements.js.map +1 -1
- package/build/toolbar/elements.d.ts +13 -3
- package/build/toolbar/elements.d.ts.map +1 -1
- package/build/toolbar/elements.js +4 -4
- package/build/toolbar/elements.js.map +1 -1
- package/build/toolbar/index.d.ts +2 -2
- package/build/toolbar/index.js +2 -2
- package/build/toolbar/index.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/LinkPreview/LinkPreviewNativeActionView.swift +7 -0
- package/ios/LinkPreview/LinkPreviewNativeModule.swift +28 -1
- 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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.module.sha512 +1 -0
- 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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.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 +10 -10
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar.md5} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar.sha1} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar.sha256} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar.sha512} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.aar} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.aar.md5} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.aar.sha1} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.aar.sha256} +0 -0
- /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-20260105-6b962e6/expo.modules.router-7.0.0-canary-20260105-6b962e6.aar.sha512} +0 -0
|
@@ -78,7 +78,15 @@ export interface DrawableIcon {
|
|
|
78
78
|
*/
|
|
79
79
|
drawable?: string;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Material icon name for Android native tabs.
|
|
83
|
+
*
|
|
84
|
+
* @platform android
|
|
85
|
+
*/
|
|
81
86
|
export interface MaterialIcon {
|
|
87
|
+
/**
|
|
88
|
+
* Material icon glyph name. See the [Material icons for the complete catalog](https://fonts.google.com/icons).
|
|
89
|
+
*/
|
|
82
90
|
md: AndroidSymbol;
|
|
83
91
|
}
|
|
84
92
|
export type BaseNativeTabsTriggerIconProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAsB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAA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AQ,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,mBAAa,CAAC;AAEtD,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,4BAA4B,GACvC,OAAO,iCAAiC,SAGzC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB,CAAC,EAAE,UAAU,CAAC;CACtC;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAS,CAAC;AAEnF,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAE9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":";;;AAIA,iDAAkE;AAgBrD,QAAA,sBAAsB,GAA0C,kBAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":";;;AAIA,iDAAkE;AAgBrD,QAAA,sBAAsB,GAA0C,kBAAK,CAAC;AA2FnF;;;;;;;;;;;;;GAaG;AACU,QAAA,qBAAqB,GAAyC,iBAAI,CAAC;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,2BAA2B,GAAG,uBAAU,CAAC;AAM/C,MAAM,4BAA4B,GAAG,SAAS,4BAA4B,CAC/E,KAAwC;IAExC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAJW,QAAA,4BAA4B,gCAIvC;AAiBW,QAAA,sBAAsB,GAA0C,kBAAK,CAAC;AAMnF;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,yBAAyB,GAA6C,GAAG,EAAE;IACtF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAFW,QAAA,yBAAyB,6BAEpC","sourcesContent":["import type { AndroidSymbol } from 'expo-symbols';\nimport type { ColorValue, ImageSourcePropType, StyleProp } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { Label, Icon, Badge, VectorIcon } from '../../primitives';\nimport type { NativeTabsLabelStyle } from '../types';\n\nexport interface NativeTabsTriggerLabelProps {\n /**\n * The text to display as the label for the tab.\n */\n children?: string;\n selectedStyle?: StyleProp<NativeTabsLabelStyle>;\n /**\n * If true, the label will be hidden.\n * @default false\n */\n hidden?: boolean;\n}\n\nexport const NativeTabsTriggerLabel: React.FC<NativeTabsTriggerLabelProps> = Label;\n\nexport interface SrcIcon {\n /**\n * The image source to use as an icon.\n *\n * When `sf` prop is used it will override this prop on iOS.\n *\n * When `drawable` or `material` prop is used it will override this prop on Android.\n *\n * The value can be provided in two ways:\n * - As an image source\n * - As an object specifying the default and selected states\n *\n * @example\n * ```tsx\n * <Icon src={require('./path/to/icon.png')} />\n * ```\n *\n * @example\n * ```tsx\n * <Icon src={{ default: require('./path/to/icon.png'), selected: require('./path/to/icon-selected.png') }} />\n * ```\n *\n * @platform Android\n * @platform iOS\n */\n src?:\n | ImageSourcePropType\n | React.ReactElement\n | {\n default?: ImageSourcePropType | React.ReactElement;\n selected: ImageSourcePropType | React.ReactElement;\n };\n}\n\nexport interface SFSymbolIcon {\n /**\n * The name of the SF Symbol to use as an icon.\n *\n * The value can be provided in two ways:\n * - As a string with the SF Symbol name\n * - As an object specifying the default and selected states\n *\n * @example\n * ```tsx\n * <Icon sf=\"magnifyingglass\" />\n * ```\n *\n * @example\n * ```tsx\n * <Icon sf={{ default: \"house\", selected: \"house.fill\" }} />\n * ```\n *\n * @platform iOS\n */\n sf?: SFSymbol | { default?: SFSymbol; selected: SFSymbol };\n}\n\nexport interface DrawableIcon {\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n}\n\n/**\n * Material icon name for Android native tabs.\n *\n * @platform android\n */\nexport interface MaterialIcon {\n /**\n * Material icon glyph name. See the [Material icons for the complete catalog](https://fonts.google.com/icons).\n */\n md: AndroidSymbol;\n}\n\nexport type BaseNativeTabsTriggerIconProps = { selectedColor?: ColorValue };\n\nexport type NativeTabsTriggerIconProps = BaseNativeTabsTriggerIconProps &\n (\n | (SFSymbolIcon & DrawableIcon)\n | (SFSymbolIcon & MaterialIcon)\n | (SFSymbolIcon & SrcIcon)\n | (MaterialIcon & SrcIcon)\n | (DrawableIcon & SrcIcon)\n | SrcIcon\n );\n\n/**\n * Renders an icon for the tab.\n *\n * Accepts various icon sources such as SF Symbols, drawable resources, material icons, or image sources.\n *\n * Acceptable props combinations:\n * - `sf` and `drawable` - `sf` will be used for iOS icon, `drawable` for Android icon\n * - `sf` and `src` - `sf` will be used for iOS icon, `src` for Android icon\n * - `src` and `drawable` - `src` will be used for iOS icon, `drawable` for Android icon\n * - `src` only - `src` will be used for both iOS and Android icons\n *\n * @platform ios\n * @platform android\n */\nexport const NativeTabsTriggerIcon: React.FC<NativeTabsTriggerIconProps> = Icon;\n\n/**\n * Helper component which can be used to load vector icons for `NativeTabs`.\n *\n * @example\n * ```tsx\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';\n *\n * export default Layout(){\n * return (\n * <NativeTabs>\n * <NativeTabs.Trigger name=\"index\">\n * <NativeTabs.Trigger.Icon src={<NativeTabs.Trigger.VectorIcon family={MaterialCommunityIcons} name=\"home\" />} />\n * </NativeTabs.Trigger>\n * </NativeTabs>\n * );\n * }\n * ```\n */\nexport const NativeTabsTriggerVectorIcon = VectorIcon;\n\nexport interface NativeTabsTriggerPromiseIconProps {\n loader: () => Promise<ImageSourcePropType | null>;\n}\n\nexport const NativeTabsTriggerPromiseIcon = function NativeTabsTriggerPromiseIcon(\n props: NativeTabsTriggerPromiseIconProps\n) {\n return null;\n};\n\nexport interface NativeTabsTriggerBadgeProps {\n /**\n * The text to display as the badge for the tab.\n * If not provided, the badge will not be displayed.\n */\n children?: string;\n\n /**\n * If true, the badge will be hidden.\n * @default false\n */\n hidden?: boolean;\n selectedBackgroundColor?: ColorValue;\n}\n\nexport const NativeTabsTriggerBadge: React.FC<NativeTabsTriggerBadgeProps> = Badge;\n\nexport interface NativeTabsBottomAccessoryProps {\n children?: React.ReactNode;\n}\n\n/**\n * A [bottom accessory](https://developer.apple.com/documentation/uikit/uitabbarcontroller/bottomaccessory) for `NativeTabs` on iOS 26 and above.\n *\n * @example\n * ```tsx\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default Layout(){\n * return (\n * <NativeTabs>\n * <NativeTabs.BottomAccessory>\n * <YourAccessoryComponent />\n * </NativeTabs.BottomAccessory>\n * <NativeTabs.Trigger name=\"index\" />\n * </NativeTabs>\n * );\n * }\n * ```\n *\n * @platform iOS 26+\n */\nexport const NativeTabsBottomAccessory: React.FC<NativeTabsBottomAccessoryProps> = () => {\n return null;\n};\n"]}
|
|
@@ -46,7 +46,8 @@ export interface ToolbarMenuProps {
|
|
|
46
46
|
inline?: boolean;
|
|
47
47
|
/**
|
|
48
48
|
* If `true`, the menu will be displayed as a palette.
|
|
49
|
-
* This means that the menu will be displayed as one row
|
|
49
|
+
* This means that the menu will be displayed as one row.
|
|
50
|
+
* 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.
|
|
50
51
|
*
|
|
51
52
|
* > **Note**: Palette menus are only supported in submenus.
|
|
52
53
|
*
|
|
@@ -85,6 +86,15 @@ export interface ToolbarMenuProps {
|
|
|
85
86
|
* @default 'plain'
|
|
86
87
|
*/
|
|
87
88
|
variant?: 'plain' | 'done' | 'prominent';
|
|
89
|
+
/**
|
|
90
|
+
* The preferred size of the menu elements.
|
|
91
|
+
* `elementSize` property is ignored when `palette` is used.
|
|
92
|
+
*
|
|
93
|
+
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/preferredelementsize) for more information.
|
|
94
|
+
*
|
|
95
|
+
* @platform iOS 16.0+
|
|
96
|
+
*/
|
|
97
|
+
elementSize?: 'auto' | 'small' | 'medium' | 'large';
|
|
88
98
|
}
|
|
89
99
|
/**
|
|
90
100
|
* Adds a context menu for to a toolbar.
|
|
@@ -321,8 +331,8 @@ export interface ToolbarViewProps {
|
|
|
321
331
|
* placeholderTextColor={Color.ios.placeholderText}
|
|
322
332
|
* />
|
|
323
333
|
* </Toolbar.View>
|
|
324
|
-
* <Toolbar.View separateBackground
|
|
325
|
-
* <Pressable onPress={handlePress}>
|
|
334
|
+
* <Toolbar.View separateBackground>
|
|
335
|
+
* <Pressable style={{ width: 32, height: 32 }} onPress={handlePress}>
|
|
326
336
|
* <SymbolView name="plus" size={22} />
|
|
327
337
|
* </Pressable>
|
|
328
338
|
* </Toolbar.View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/toolbar/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,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I,OAAO,YAAY,gCAO9C,CAAC"}
|
|
@@ -24,7 +24,7 @@ const children_1 = require("../utils/children");
|
|
|
24
24
|
*
|
|
25
25
|
* @platform ios
|
|
26
26
|
*/
|
|
27
|
-
const ToolbarMenu = ({ accessibilityHint, accessibilityLabel, separateBackground, hidesSharedBackground, palette, inline, hidden, subtitle, title, destructive, children, icon, tintColor, variant, style, }) => {
|
|
27
|
+
const ToolbarMenu = ({ accessibilityHint, accessibilityLabel, separateBackground, hidesSharedBackground, palette, inline, hidden, subtitle, title, destructive, children, icon, tintColor, variant, style, elementSize, }) => {
|
|
28
28
|
const identifier = (0, react_1.useId)();
|
|
29
29
|
const validChildren = react_1.Children.toArray(children).filter((child) => (0, react_1.isValidElement)(child) && (child.type === exports.ToolbarMenuAction || child.type === exports.ToolbarMenu));
|
|
30
30
|
const label = (0, children_1.getFirstChildOfType)(children, primitives_1.Label);
|
|
@@ -34,7 +34,7 @@ const ToolbarMenu = ({ accessibilityHint, accessibilityLabel, separateBackground
|
|
|
34
34
|
(iconComponent?.props && 'sf' in iconComponent.props ? iconComponent.props.sf : undefined);
|
|
35
35
|
const sf = typeof computedIcon === 'string' ? computedIcon : undefined;
|
|
36
36
|
const titleStyle = react_native_1.StyleSheet.flatten(style);
|
|
37
|
-
return (<native_2.NativeLinkPreviewAction sharesBackground={!separateBackground} hidesSharedBackground={hidesSharedBackground} hidden={hidden} icon={sf} destructive={destructive} subtitle={subtitle} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} displayAsPalette={palette} displayInline={inline} tintColor={tintColor} titleStyle={titleStyle} barButtonItemStyle={variant === 'done' ? 'prominent' : variant} title={computedTitle} onSelected={() => { }} children={validChildren} identifier={identifier}/>);
|
|
37
|
+
return (<native_2.NativeLinkPreviewAction sharesBackground={!separateBackground} hidesSharedBackground={hidesSharedBackground} hidden={hidden} icon={sf} destructive={destructive} subtitle={subtitle} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} displayAsPalette={palette} displayInline={inline} preferredElementSize={elementSize} tintColor={tintColor} titleStyle={titleStyle} barButtonItemStyle={variant === 'done' ? 'prominent' : variant} title={computedTitle} onSelected={() => { }} children={validChildren} identifier={identifier}/>);
|
|
38
38
|
};
|
|
39
39
|
exports.ToolbarMenu = ToolbarMenu;
|
|
40
40
|
/**
|
|
@@ -127,8 +127,8 @@ exports.ToolbarSpacer = ToolbarSpacer;
|
|
|
127
127
|
* placeholderTextColor={Color.ios.placeholderText}
|
|
128
128
|
* />
|
|
129
129
|
* </Toolbar.View>
|
|
130
|
-
* <Toolbar.View separateBackground
|
|
131
|
-
* <Pressable onPress={handlePress}>
|
|
130
|
+
* <Toolbar.View separateBackground>
|
|
131
|
+
* <Pressable style={{ width: 32, height: 32 }} onPress={handlePress}>
|
|
132
132
|
* <SymbolView name="plus" size={22} />
|
|
133
133
|
* </Pressable>
|
|
134
134
|
* </Toolbar.View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/toolbar/elements.tsx"],"names":[],"mappings":";;;AAAA,iCAAwE;AACxE,+CAA2E;AAG3E,qCAAgE;AAChE,mFAAgF;AAChF,+CAA4E;AAC5E,mDAAiE;AACjE,8CAA4C;AAC5C,gDAAwD;AAyFxD;;;;;;;;;;;;;;GAcG;AACI,MAAM,WAAW,GAA+B,CAAC,EACtD,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,OAAO,EACP,KAAK,GACN,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,IAAA,aAAK,GAAE,CAAC;IAC3B,MAAM,aAAa,GAAG,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CACrD,CAAC,KAAK,EAAE,EAAE,CACR,IAAA,sBAAc,EAAC,KAAK,CAAC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AAE,CAAC,CACf,gBAAgB,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CACzC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAClD,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnB,CACH,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,aAAa,iBAYxB;AAwCF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,MAAM,WAAW,GAAG,CAAC,EAC1B,QAAQ,EACR,MAAM,EACN,qBAAqB,EACrB,kBAAkB,GACD,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAAA,aAAK,GAAE,CAAC;IACnB,OAAO,CACL,CAAC,0BAAiB,CAChB,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,CAC7C,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,UAAU,CAAC,CAAC,EAAE,CAAC,CACf,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CACtC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,0BAAiB,CAAC,CACrB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB;AAMK,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAE,EAAE;IACjD,uEAAuE;IACvE,OAAO,CACL,CAAC,uDAA0B,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE;MAAA,CAAC,0BAAiB,CAAC,IAAI,KAAK,CAAC,EAC/B;IAAA,EAAE,uDAA0B,CAAC,CAC9B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,WAAW,eAOtB","sourcesContent":["import { Children, isValidElement, useId, type ReactNode } from 'react';\nimport { StyleSheet, type ColorValue, type StyleProp } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { RouterToolbarHost, RouterToolbarItem } from './native';\nimport { InternalLinkPreviewContext } from '../link/InternalLinkPreviewContext';\nimport { LinkMenuAction, type LinkMenuActionProps } from '../link/elements';\nimport { NativeLinkPreviewAction } from '../link/preview/native';\nimport { Icon, Label } from '../primitives';\nimport { getFirstChildOfType } from '../utils/children';\nimport type { BasicTextStyle } from '../utils/font';\n\nexport interface ToolbarMenuProps {\n accessibilityLabel?: string;\n accessibilityHint?: string;\n children?: React.ReactNode;\n /**\n * An optional subtitle for the menu. 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 * 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 disabled?: boolean;\n hidden?: boolean;\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\n *\n * Only available for root level menus.\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 * Optional SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\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 * > **Note**: Text buttons cannot share the background.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n /**\n * Style for the label of the header item.\n */\n style?: StyleProp<BasicTextStyle>;\n /**\n * The title of the menu item\n */\n title?: string;\n\n /**\n * Tint color for the menu icon and text.\n */\n tintColor?: ColorValue;\n\n /**\n * Controls the visual style of the menu when represented as a bar button.\n *\n * @default 'plain'\n */\n variant?: 'plain' | 'done' | 'prominent';\n}\n\n/**\n * Adds a context menu for to a toolbar.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Menu title=\"Options\">\n * <Toolbar.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Toolbar.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Toolbar.Menu>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarMenu: React.FC<ToolbarMenuProps> = ({\n accessibilityHint,\n accessibilityLabel,\n separateBackground,\n hidesSharedBackground,\n palette,\n inline,\n hidden,\n subtitle,\n title,\n destructive,\n children,\n icon,\n tintColor,\n variant,\n style,\n}) => {\n const identifier = useId();\n const validChildren = Children.toArray(children).filter(\n (child) =>\n isValidElement(child) && (child.type === ToolbarMenuAction || child.type === ToolbarMenu)\n );\n const label = getFirstChildOfType(children, Label);\n const iconComponent = getFirstChildOfType(children, Icon);\n\n const computedTitle = title ?? label?.props.children ?? '';\n const computedIcon =\n icon ??\n (iconComponent?.props && 'sf' in iconComponent.props ? iconComponent.props.sf : undefined);\n const sf = typeof computedIcon === 'string' ? computedIcon : undefined;\n const titleStyle = StyleSheet.flatten(style);\n return (\n <NativeLinkPreviewAction\n sharesBackground={!separateBackground}\n hidesSharedBackground={hidesSharedBackground}\n hidden={hidden}\n icon={sf}\n destructive={destructive}\n subtitle={subtitle}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n displayAsPalette={palette}\n displayInline={inline}\n tintColor={tintColor}\n titleStyle={titleStyle}\n barButtonItemStyle={variant === 'done' ? 'prominent' : variant}\n title={computedTitle}\n onSelected={() => {}}\n children={validChildren}\n identifier={identifier}\n />\n );\n};\n\nexport type ToolbarMenuActionProps = LinkMenuActionProps;\n\n/**\n * A single action item within a toolbar menu.\n *\n * For available props, see [`LinkMenuActionProps`](./router/#linkmenuactionprops).\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Menu title=\"Options\">\n * <Toolbar.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Toolbar.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Toolbar.Menu>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarMenuAction = LinkMenuAction;\n\nexport interface ToolbarButtonProps {\n accessibilityLabel?: string;\n accessibilityHint?: string;\n /**\n * The text label for the button.\n *\n * > **Note**: When icon is used, the label will not be shown and will be used for accessibility purposes only.\n *\n * @example\n * ```tsx\n * import { Toolbar } from 'expo-router/unstable-toolbar';\n *\n * ...\n * <Toolbar.Button>This is button label</Toolbar.Button>\n * ```\n */\n children?: ReactNode;\n disabled?: boolean;\n\n /**\n * Whether the button should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n\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 // TODO: support ImageSourcePropType icons in addition to SFSymbols\n /**\n * The name of the SF Symbol to display as the button icon.\n * For a list of available symbols, see [SF Symbols](https://developer.apple.com/sf-symbols/).\n */\n icon?: SFSymbol;\n\n /**\n * Callback function when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/possibletitles) for more information.\n */\n possibleTitles?: string[];\n\n /**\n * Whether the button is in a selected state\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected) for more information.\n */\n selected?: boolean;\n\n /**\n * Whether to separate the background of this item from other header items.\n *\n * > **Note**: Text buttons cannot share the background.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n\n /**\n * Style for the label of the header item.\n */\n style?: StyleProp<BasicTextStyle>;\n\n /**\n * Tint color for the button icon and text.\n */\n tintColor?: ColorValue;\n\n /**\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.enum) for more information.\n *\n * @default 'plain'\n */\n variant?: 'plain' | 'done' | 'prominent';\n}\n\n// As noted in https://sebvidal.com/blog/whats-new-in-uikit-26/?utm_source=chatgpt.com#:~:text=It%27s%20worth%20noting%20that%2C%20at%20the%20time%20of%20writing%2C%20bar%20button%20badges%20are%20only%20supported%20in%20navigation%20bars%20%2D%20not%20tool%20bars.\n// currently badges are not supported in toolbars, and only in navigation bars.\n// Therefore, there is no badge support in ToolbarButton\n/**\n * A button component for use in the toolbar.\n * It should only be used as a child of `Toolbar`.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Button icon=\"magnifyingglass\" tintColor={Color.ios.placeholderText} />\n * <Toolbar.Button>Text Button</Toolbar.Button>\n * <Toolbar.Button hidden={!isSearchFocused} icon=\"xmark\" onPress={handleClear} />\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarButton = (props: ToolbarButtonProps) => {\n const id = useId();\n const areChildrenString = typeof props.children === 'string';\n const label = areChildrenString\n ? (props.children as string)\n : getFirstChildOfType(props.children, Label)?.props.children;\n const iconComponent =\n !props.icon && !areChildrenString ? getFirstChildOfType(props.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 <RouterToolbarItem\n accessibilityHint={props.accessibilityHint}\n accessibilityLabel={props.accessibilityLabel}\n barButtonItemStyle={props.variant === 'done' ? 'prominent' : props.variant}\n disabled={props.disabled}\n hidden={props.hidden}\n hidesSharedBackground={props.hidesSharedBackground}\n identifier={id}\n onSelected={props.onPress}\n possibleTitles={props.possibleTitles}\n selected={props.selected}\n sharesBackground={!props.separateBackground}\n systemImageName={sf}\n title={label}\n tintColor={props.tintColor}\n titleStyle={StyleSheet.flatten(props.style)}\n />\n );\n};\n\nexport type ToolbarSpacerProps = {\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\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 spacer should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n /**\n * Whether the spacer shares the background with adjacent toolbar items.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @platform iOS 26+\n * @default false\n */\n sharesBackground?: boolean;\n /**\n * By default, the spacer is flexible and expands to fill available space.\n * If a width is provided, it creates a [fixed-width spacer](https://developer.apple.com/documentation/uikit/uibarbuttonitem/fixedspace(_:)).\n */\n width?: number;\n};\n\n/**\n * A spacer component for the toolbar.\n * Without a width, it creates a flexible spacer that expands to fill available space.\n * With a width, it creates a fixed-width spacer.\n * It should only be used as a child of `Toolbar`.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.Button icon=\"magnifyingglass\" />\n * <Toolbar.Spacer width={20} />\n * <Toolbar.Button icon=\"mic\" />\n * <Toolbar.Spacer />\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarSpacer = (props: ToolbarSpacerProps) => {\n const id = useId();\n return (\n <RouterToolbarItem\n hidesSharedBackground={props.hidesSharedBackground}\n hidden={props.hidden}\n identifier={id}\n sharesBackground={props.sharesBackground}\n type={props.width ? 'fixedSpacer' : 'fluidSpacer'}\n width={props.width}\n />\n );\n};\n\n/**\n * Props for the ToolbarView component.\n *\n * @platform ios\n */\nexport interface ToolbarViewProps {\n /**\n * React elements to render inside the toolbar view.\n */\n children: React.ReactNode;\n /**\n * Whether the view should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground) for more information.\n *\n * @platform iOS 18+\n */\n hidesSharedBackground?: boolean;\n /**\n * Whether to separate the background of this item from other header items.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n}\n\n/**\n * A custom view component for the toolbar that can contain any React elements.\n * Useful for embedding custom components.\n * It should only be used as a child of `Toolbar`.\n *\n * The items within the view will be absolutely positioned, so flexbox styles will not work as expected.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.View>\n * <TextInput\n * placeholder=\"Search\"\n * placeholderTextColor={Color.ios.placeholderText}\n * />\n * </Toolbar.View>\n * <Toolbar.View separateBackground style={{ width: 32, height: 32 }}>\n * <Pressable onPress={handlePress}>\n * <SymbolView name=\"plus\" size={22} />\n * </Pressable>\n * </Toolbar.View>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarView = ({\n children,\n hidden,\n hidesSharedBackground,\n separateBackground,\n}: ToolbarViewProps) => {\n const id = useId();\n return (\n <RouterToolbarItem\n hidesSharedBackground={hidesSharedBackground}\n hidden={hidden}\n identifier={id}\n sharesBackground={!separateBackground}>\n {children}\n </RouterToolbarItem>\n );\n};\n\nexport interface ToolbarProps {\n children?: React.ReactNode;\n}\n\nexport const ToolbarHost = (props: ToolbarProps) => {\n // TODO: Replace InternalLinkPreviewContext with a more generic context\n return (\n <InternalLinkPreviewContext value={{ isVisible: false, href: '' }}>\n <RouterToolbarHost {...props} />\n </InternalLinkPreviewContext>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/toolbar/elements.tsx"],"names":[],"mappings":";;;AAAA,iCAAwE;AACxE,+CAA2E;AAG3E,qCAAgE;AAChE,mFAAgF;AAChF,+CAA4E;AAC5E,mDAAiE;AACjE,8CAA4C;AAC5C,gDAAwD;AAmGxD;;;;;;;;;;;;;;GAcG;AACI,MAAM,WAAW,GAA+B,CAAC,EACtD,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,OAAO,EACP,KAAK,EACL,WAAW,GACZ,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,IAAA,aAAK,GAAE,CAAC;IAC3B,MAAM,aAAa,GAAG,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CACrD,CAAC,KAAK,EAAE,EAAE,CACR,IAAA,sBAAc,EAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,yBAAiB,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAW,CAAC,CAC5F,CAAC;IACF,MAAM,KAAK,GAAG,IAAA,8BAAmB,EAAC,QAAQ,EAAE,kBAAK,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,IAAA,8BAAmB,EAAC,QAAQ,EAAE,iBAAI,CAAC,CAAC;IAE1D,MAAM,aAAa,GAAG,KAAK,IAAI,KAAK,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;IAC3D,MAAM,YAAY,GAChB,IAAI;QACJ,CAAC,aAAa,EAAE,KAAK,IAAI,IAAI,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS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,CACL,CAAC,0BAAiB,CAChB,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,CAC7C,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,UAAU,CAAC,CAAC,EAAE,CAAC,CACf,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CACtC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,0BAAiB,CAAC,CACrB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB;AAMK,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAE,EAAE;IACjD,uEAAuE;IACvE,OAAO,CACL,CAAC,uDAA0B,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE;MAAA,CAAC,0BAAiB,CAAC,IAAI,KAAK,CAAC,EAC/B;IAAA,EAAE,uDAA0B,CAAC,CAC9B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,WAAW,eAOtB","sourcesContent":["import { Children, isValidElement, useId, type ReactNode } from 'react';\nimport { StyleSheet, type ColorValue, type StyleProp } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { RouterToolbarHost, RouterToolbarItem } from './native';\nimport { InternalLinkPreviewContext } from '../link/InternalLinkPreviewContext';\nimport { LinkMenuAction, type LinkMenuActionProps } from '../link/elements';\nimport { NativeLinkPreviewAction } from '../link/preview/native';\nimport { Icon, Label } from '../primitives';\nimport { getFirstChildOfType } from '../utils/children';\nimport type { BasicTextStyle } from '../utils/font';\n\nexport interface ToolbarMenuProps {\n accessibilityLabel?: string;\n accessibilityHint?: string;\n children?: React.ReactNode;\n /**\n * An optional subtitle for the menu. 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 * 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 disabled?: boolean;\n hidden?: boolean;\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\n *\n * Only available for root level menus.\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 * Optional SF Symbol displayed alongside the menu item.\n */\n icon?: SFSymbol;\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 * 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 * Whether to separate the background of this item from other header items.\n *\n * > **Note**: Text buttons cannot share the background.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n /**\n * Style for the label of the header item.\n */\n style?: StyleProp<BasicTextStyle>;\n /**\n * The title of the menu item\n */\n title?: string;\n\n /**\n * Tint color for the menu icon and text.\n */\n tintColor?: ColorValue;\n\n /**\n * Controls the visual style of the menu when represented as a bar button.\n *\n * @default 'plain'\n */\n variant?: 'plain' | 'done' | 'prominent';\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?: 'auto' | 'small' | 'medium' | 'large';\n}\n\n/**\n * Adds a context menu for to a toolbar.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Menu title=\"Options\">\n * <Toolbar.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Toolbar.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Toolbar.Menu>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarMenu: React.FC<ToolbarMenuProps> = ({\n accessibilityHint,\n accessibilityLabel,\n separateBackground,\n hidesSharedBackground,\n palette,\n inline,\n hidden,\n subtitle,\n title,\n destructive,\n children,\n icon,\n tintColor,\n variant,\n style,\n elementSize,\n}) => {\n const identifier = useId();\n const validChildren = Children.toArray(children).filter(\n (child) =>\n isValidElement(child) && (child.type === ToolbarMenuAction || child.type === ToolbarMenu)\n );\n const label = getFirstChildOfType(children, Label);\n const iconComponent = getFirstChildOfType(children, Icon);\n\n const computedTitle = title ?? label?.props.children ?? '';\n const computedIcon =\n icon ??\n (iconComponent?.props && 'sf' in iconComponent.props ? iconComponent.props.sf : undefined);\n const sf = typeof computedIcon === 'string' ? computedIcon : undefined;\n const titleStyle = StyleSheet.flatten(style);\n return (\n <NativeLinkPreviewAction\n sharesBackground={!separateBackground}\n hidesSharedBackground={hidesSharedBackground}\n hidden={hidden}\n icon={sf}\n destructive={destructive}\n subtitle={subtitle}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n displayAsPalette={palette}\n displayInline={inline}\n preferredElementSize={elementSize}\n tintColor={tintColor}\n titleStyle={titleStyle}\n barButtonItemStyle={variant === 'done' ? 'prominent' : variant}\n title={computedTitle}\n onSelected={() => {}}\n children={validChildren}\n identifier={identifier}\n />\n );\n};\n\nexport type ToolbarMenuActionProps = LinkMenuActionProps;\n\n/**\n * A single action item within a toolbar menu.\n *\n * For available props, see [`LinkMenuActionProps`](./router/#linkmenuactionprops).\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Menu title=\"Options\">\n * <Toolbar.MenuAction title=\"Action 1\" onPress={() => {}} />\n * <Toolbar.MenuAction title=\"Action 2\" onPress={() => {}} />\n * </Toolbar.Menu>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarMenuAction = LinkMenuAction;\n\nexport interface ToolbarButtonProps {\n accessibilityLabel?: string;\n accessibilityHint?: string;\n /**\n * The text label for the button.\n *\n * > **Note**: When icon is used, the label will not be shown and will be used for accessibility purposes only.\n *\n * @example\n * ```tsx\n * import { Toolbar } from 'expo-router/unstable-toolbar';\n *\n * ...\n * <Toolbar.Button>This is button label</Toolbar.Button>\n * ```\n */\n children?: ReactNode;\n disabled?: boolean;\n\n /**\n * Whether the button should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n\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 // TODO: support ImageSourcePropType icons in addition to SFSymbols\n /**\n * The name of the SF Symbol to display as the button icon.\n * For a list of available symbols, see [SF Symbols](https://developer.apple.com/sf-symbols/).\n */\n icon?: SFSymbol;\n\n /**\n * Callback function when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/possibletitles) for more information.\n */\n possibleTitles?: string[];\n\n /**\n * Whether the button is in a selected state\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected) for more information.\n */\n selected?: boolean;\n\n /**\n * Whether to separate the background of this item from other header items.\n *\n * > **Note**: Text buttons cannot share the background.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n\n /**\n * Style for the label of the header item.\n */\n style?: StyleProp<BasicTextStyle>;\n\n /**\n * Tint color for the button icon and text.\n */\n tintColor?: ColorValue;\n\n /**\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.enum) for more information.\n *\n * @default 'plain'\n */\n variant?: 'plain' | 'done' | 'prominent';\n}\n\n// As noted in https://sebvidal.com/blog/whats-new-in-uikit-26/?utm_source=chatgpt.com#:~:text=It%27s%20worth%20noting%20that%2C%20at%20the%20time%20of%20writing%2C%20bar%20button%20badges%20are%20only%20supported%20in%20navigation%20bars%20%2D%20not%20tool%20bars.\n// currently badges are not supported in toolbars, and only in navigation bars.\n// Therefore, there is no badge support in ToolbarButton\n/**\n * A button component for use in the toolbar.\n * It should only be used as a child of `Toolbar`.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Button icon=\"magnifyingglass\" tintColor={Color.ios.placeholderText} />\n * <Toolbar.Button>Text Button</Toolbar.Button>\n * <Toolbar.Button hidden={!isSearchFocused} icon=\"xmark\" onPress={handleClear} />\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarButton = (props: ToolbarButtonProps) => {\n const id = useId();\n const areChildrenString = typeof props.children === 'string';\n const label = areChildrenString\n ? (props.children as string)\n : getFirstChildOfType(props.children, Label)?.props.children;\n const iconComponent =\n !props.icon && !areChildrenString ? getFirstChildOfType(props.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 <RouterToolbarItem\n accessibilityHint={props.accessibilityHint}\n accessibilityLabel={props.accessibilityLabel}\n barButtonItemStyle={props.variant === 'done' ? 'prominent' : props.variant}\n disabled={props.disabled}\n hidden={props.hidden}\n hidesSharedBackground={props.hidesSharedBackground}\n identifier={id}\n onSelected={props.onPress}\n possibleTitles={props.possibleTitles}\n selected={props.selected}\n sharesBackground={!props.separateBackground}\n systemImageName={sf}\n title={label}\n tintColor={props.tintColor}\n titleStyle={StyleSheet.flatten(props.style)}\n />\n );\n};\n\nexport type ToolbarSpacerProps = {\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\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 spacer should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n /**\n * Whether the spacer shares the background with adjacent toolbar items.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @platform iOS 26+\n * @default false\n */\n sharesBackground?: boolean;\n /**\n * By default, the spacer is flexible and expands to fill available space.\n * If a width is provided, it creates a [fixed-width spacer](https://developer.apple.com/documentation/uikit/uibarbuttonitem/fixedspace(_:)).\n */\n width?: number;\n};\n\n/**\n * A spacer component for the toolbar.\n * Without a width, it creates a flexible spacer that expands to fill available space.\n * With a width, it creates a fixed-width spacer.\n * It should only be used as a child of `Toolbar`.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.Button icon=\"magnifyingglass\" />\n * <Toolbar.Spacer width={20} />\n * <Toolbar.Button icon=\"mic\" />\n * <Toolbar.Spacer />\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarSpacer = (props: ToolbarSpacerProps) => {\n const id = useId();\n return (\n <RouterToolbarItem\n hidesSharedBackground={props.hidesSharedBackground}\n hidden={props.hidden}\n identifier={id}\n sharesBackground={props.sharesBackground}\n type={props.width ? 'fixedSpacer' : 'fluidSpacer'}\n width={props.width}\n />\n );\n};\n\n/**\n * Props for the ToolbarView component.\n *\n * @platform ios\n */\nexport interface ToolbarViewProps {\n /**\n * React elements to render inside the toolbar view.\n */\n children: React.ReactNode;\n /**\n * Whether the view should be hidden.\n *\n * @default false\n */\n hidden?: boolean;\n /**\n * Whether to hide the shared background when `sharesBackground` is enabled.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground) for more information.\n *\n * @platform iOS 18+\n */\n hidesSharedBackground?: boolean;\n /**\n * Whether to separate the background of this item from other header items.\n *\n * This prop reverses the native behavior of `sharesBackground`.\n *\n * @see [Official Apple documentation](https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground) for more information.\n *\n * @default false\n *\n * @platform iOS 26+\n */\n separateBackground?: boolean;\n}\n\n/**\n * A custom view component for the toolbar that can contain any React elements.\n * Useful for embedding custom components.\n * It should only be used as a child of `Toolbar`.\n *\n * The items within the view will be absolutely positioned, so flexbox styles will not work as expected.\n *\n * @example\n * ```tsx\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.View>\n * <TextInput\n * placeholder=\"Search\"\n * placeholderTextColor={Color.ios.placeholderText}\n * />\n * </Toolbar.View>\n * <Toolbar.View separateBackground>\n * <Pressable style={{ width: 32, height: 32 }} onPress={handlePress}>\n * <SymbolView name=\"plus\" size={22} />\n * </Pressable>\n * </Toolbar.View>\n * </Toolbar>\n * ```\n *\n * @platform ios\n */\nexport const ToolbarView = ({\n children,\n hidden,\n hidesSharedBackground,\n separateBackground,\n}: ToolbarViewProps) => {\n const id = useId();\n return (\n <RouterToolbarItem\n hidesSharedBackground={hidesSharedBackground}\n hidden={hidden}\n identifier={id}\n sharesBackground={!separateBackground}>\n {children}\n </RouterToolbarItem>\n );\n};\n\nexport interface ToolbarProps {\n children?: React.ReactNode;\n}\n\nexport const ToolbarHost = (props: ToolbarProps) => {\n // TODO: Replace InternalLinkPreviewContext with a more generic context\n return (\n <InternalLinkPreviewContext value={{ isVisible: false, href: '' }}>\n <RouterToolbarHost {...props} />\n </InternalLinkPreviewContext>\n );\n};\n"]}
|
package/build/toolbar/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import { ToolbarMenu, ToolbarMenuAction, ToolbarButton, ToolbarSpacer, ToolbarVi
|
|
|
13
13
|
* <Toolbar>
|
|
14
14
|
* <Toolbar.Spacer />
|
|
15
15
|
* <Toolbar.Button icon="magnifyingglass" tintColor={Color.ios.placeholderText} />
|
|
16
|
-
* <Toolbar.View
|
|
17
|
-
* <TextInput placeholder="Search" />
|
|
16
|
+
* <Toolbar.View>
|
|
17
|
+
* <TextInput style={{ width: 200 }} placeholder="Search" />
|
|
18
18
|
* </Toolbar.View>
|
|
19
19
|
* <Toolbar.Menu icon="ellipsis">
|
|
20
20
|
* <Toolbar.MenuAction icon="mail" title="Send email" onPress={() => {}} />
|
package/build/toolbar/index.js
CHANGED
|
@@ -21,8 +21,8 @@ Object.defineProperty(exports, "ToolbarView", { enumerable: true, get: function
|
|
|
21
21
|
* <Toolbar>
|
|
22
22
|
* <Toolbar.Spacer />
|
|
23
23
|
* <Toolbar.Button icon="magnifyingglass" tintColor={Color.ios.placeholderText} />
|
|
24
|
-
* <Toolbar.View
|
|
25
|
-
* <TextInput placeholder="Search" />
|
|
24
|
+
* <Toolbar.View>
|
|
25
|
+
* <TextInput style={{ width: 200 }} placeholder="Search" />
|
|
26
26
|
* </Toolbar.View>
|
|
27
27
|
* <Toolbar.Menu icon="ellipsis">
|
|
28
28
|
* <Toolbar.MenuAction icon="mail" title="Send email" onPress={() => {}} />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/toolbar/index.ts"],"names":[],"mappings":";;;AAAA,yCAOoB;AAwCX,4FA7CP,sBAAW,OA6CO;AAAE,kGA5CpB,4BAAiB,OA4CoB;AAAE,8FA3CvC,wBAAa,OA2CuC;AAAE,8FA1CtD,wBAAa,OA0CsD;AAAE,4FAzCrE,sBAAW,OAyCqE;AAtClF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACU,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAW,EAAE;IAChD,IAAI,EAAE,sBAAW;IACjB,UAAU,EAAE,4BAAiB;IAC7B,MAAM,EAAE,wBAAa;IACrB,MAAM,EAAE,wBAAa;IACrB,IAAI,EAAE,sBAAW;CAClB,CAAC,CAAC","sourcesContent":["import {\n ToolbarHost,\n ToolbarMenu,\n ToolbarMenuAction,\n ToolbarButton,\n ToolbarSpacer,\n ToolbarView,\n} from './elements';\n\n/**\n * A component that provides a [bottom toolbar](https://developer.apple.com/design/human-interface-guidelines/toolbars).\n *\n * @example\n * ```tsx\n * import { Toolbar } from \"expo-router\";\n *\n * export default function MyScreen() {\n * return (\n * <>\n * <YourScreenContent />\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.Button icon=\"magnifyingglass\" tintColor={Color.ios.placeholderText} />\n * <Toolbar.View style={{ width: 200 }}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/toolbar/index.ts"],"names":[],"mappings":";;;AAAA,yCAOoB;AAwCX,4FA7CP,sBAAW,OA6CO;AAAE,kGA5CpB,4BAAiB,OA4CoB;AAAE,8FA3CvC,wBAAa,OA2CuC;AAAE,8FA1CtD,wBAAa,OA0CsD;AAAE,4FAzCrE,sBAAW,OAyCqE;AAtClF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACU,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAW,EAAE;IAChD,IAAI,EAAE,sBAAW;IACjB,UAAU,EAAE,4BAAiB;IAC7B,MAAM,EAAE,wBAAa;IACrB,MAAM,EAAE,wBAAa;IACrB,IAAI,EAAE,sBAAW;CAClB,CAAC,CAAC","sourcesContent":["import {\n ToolbarHost,\n ToolbarMenu,\n ToolbarMenuAction,\n ToolbarButton,\n ToolbarSpacer,\n ToolbarView,\n} from './elements';\n\n/**\n * A component that provides a [bottom toolbar](https://developer.apple.com/design/human-interface-guidelines/toolbars).\n *\n * @example\n * ```tsx\n * import { Toolbar } from \"expo-router\";\n *\n * export default function MyScreen() {\n * return (\n * <>\n * <YourScreenContent />\n * <Toolbar>\n * <Toolbar.Spacer />\n * <Toolbar.Button icon=\"magnifyingglass\" tintColor={Color.ios.placeholderText} />\n * <Toolbar.View>\n * <TextInput style={{ width: 200 }} placeholder=\"Search\" />\n * </Toolbar.View>\n * <Toolbar.Menu icon=\"ellipsis\">\n * <Toolbar.MenuAction icon=\"mail\" title=\"Send email\" onPress={() => {}} />\n * <Toolbar.MenuAction icon=\"trash\" title=\"Delete\" destructive onPress={() => {}} />\n * </Toolbar.Menu>\n * <Toolbar.Spacer />\n * </Toolbar>\n * </>\n * );\n * }\n * ```\n *\n * @platform ios\n */\nexport const Toolbar = Object.assign(ToolbarHost, {\n Menu: ToolbarMenu,\n MenuAction: ToolbarMenuAction,\n Button: ToolbarButton,\n Spacer: ToolbarSpacer,\n View: ToolbarView,\n});\n\nexport { ToolbarMenu, ToolbarMenuAction, ToolbarButton, ToolbarSpacer, ToolbarView };\n\nexport type {\n ToolbarProps,\n ToolbarMenuProps,\n ToolbarMenuActionProps,\n ToolbarButtonProps,\n ToolbarSpacerProps,\n ToolbarViewProps as ToolbarCustomViewProps,\n} from './elements';\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -18,6 +18,7 @@ class LinkPreviewNativeActionView: RouterViewWithLogger, LinkPreviewMenuUpdatabl
|
|
|
18
18
|
@NativeActionProp(updateMenu: true) var singleSelection: Bool = false
|
|
19
19
|
@NativeActionProp(updateMenu: true) var displayAsPalette: Bool = false
|
|
20
20
|
@NativeActionProp(updateMenu: true) var displayInline: Bool = false
|
|
21
|
+
@NativeActionProp(updateMenu: true) var preferredElementSize: MenuElementSize?
|
|
21
22
|
|
|
22
23
|
// MARK: - UIBarButtonItem props
|
|
23
24
|
@NativeActionProp(updateAction: true, updateMenu: true) var routerHidden: Bool = false
|
|
@@ -86,6 +87,12 @@ class LinkPreviewNativeActionView: RouterViewWithLogger, LinkPreviewMenuUpdatabl
|
|
|
86
87
|
menuAction.subtitle = subtitle
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
if #available(iOS 16.0, *) {
|
|
91
|
+
if let preferredElementSize = preferredElementSize {
|
|
92
|
+
menuAction.preferredElementSize = preferredElementSize.toUIMenuElementSize()
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
89
96
|
parentMenuUpdatable?.updateMenu()
|
|
90
97
|
}
|
|
91
98
|
|
|
@@ -106,7 +106,9 @@ public class LinkPreviewNativeModule: Module {
|
|
|
106
106
|
Prop("barButtonItemStyle") { (view: LinkPreviewNativeActionView, style: BarItemStyle?) in
|
|
107
107
|
view.barButtonItemStyle = style?.toUIBarButtonItemStyle()
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
Prop("preferredElementSize") { (view: LinkPreviewNativeActionView, preferredElementSize: MenuElementSize?) in
|
|
110
|
+
view.preferredElementSize = preferredElementSize
|
|
111
|
+
}
|
|
110
112
|
Events("onSelected")
|
|
111
113
|
}
|
|
112
114
|
|
|
@@ -175,3 +177,28 @@ struct LinkSourceAlignmentRect: Record {
|
|
|
175
177
|
@Field var width: Double
|
|
176
178
|
@Field var height: Double
|
|
177
179
|
}
|
|
180
|
+
|
|
181
|
+
enum MenuElementSize: String, Enumerable {
|
|
182
|
+
case small
|
|
183
|
+
case medium
|
|
184
|
+
case large
|
|
185
|
+
case auto
|
|
186
|
+
|
|
187
|
+
@available(iOS 16.0, *)
|
|
188
|
+
func toUIMenuElementSize() -> UIMenu.ElementSize {
|
|
189
|
+
switch self {
|
|
190
|
+
case .small:
|
|
191
|
+
return .small
|
|
192
|
+
case .medium:
|
|
193
|
+
return .medium
|
|
194
|
+
case .large:
|
|
195
|
+
return .large
|
|
196
|
+
case .auto:
|
|
197
|
+
if #available(iOS 17.0, *) {
|
|
198
|
+
return .automatic
|
|
199
|
+
} else {
|
|
200
|
+
return .medium
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.router",
|
|
5
5
|
"module": "expo.modules.router",
|
|
6
|
-
"version": "7.0.0-canary-
|
|
6
|
+
"version": "7.0.0-canary-20260105-6b962e6",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
28
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
27
|
+
"name": "expo.modules.router-7.0.0-canary-20260105-6b962e6.aar",
|
|
28
|
+
"url": "expo.modules.router-7.0.0-canary-20260105-6b962e6.aar",
|
|
29
29
|
"size": 13665,
|
|
30
30
|
"sha512": "0c996832cda246cbf02acf875f7c3add8610a0e5e7c466bbe5fa2f073a6a644933eec90d1bff2a7fac7fd3c0c5bdae8a695373cebdec4f9853ce116658960554",
|
|
31
31
|
"sha256": "054876f9b960d2ed5b7762c66b32c7e994f942c05013456f5e41e1fe6c71ee54",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
],
|
|
61
61
|
"files": [
|
|
62
62
|
{
|
|
63
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
64
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
63
|
+
"name": "expo.modules.router-7.0.0-canary-20260105-6b962e6.aar",
|
|
64
|
+
"url": "expo.modules.router-7.0.0-canary-20260105-6b962e6.aar",
|
|
65
65
|
"size": 13665,
|
|
66
66
|
"sha512": "0c996832cda246cbf02acf875f7c3add8610a0e5e7c466bbe5fa2f073a6a644933eec90d1bff2a7fac7fd3c0c5bdae8a695373cebdec4f9853ce116658960554",
|
|
67
67
|
"sha256": "054876f9b960d2ed5b7762c66b32c7e994f942c05013456f5e41e1fe6c71ee54",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
{
|
|
83
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
84
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
83
|
+
"name": "expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar",
|
|
84
|
+
"url": "expo.modules.router-7.0.0-canary-20260105-6b962e6-sources.jar",
|
|
85
85
|
"size": 2318,
|
|
86
86
|
"sha512": "9864add8e93e3c0a9a9c930aaed67016b15054c3fafd59a0bd3a5402d7cdc5827be84c22c2c137f3e5acb4e39270d9bfb9ca3fe11234458d4f2e0d4c78747f48",
|
|
87
87
|
"sha256": "d5dff6259e86de721fc0f07fe740a5e18088e19b76738719b0a6f94caef06224",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
90abec401d62a4819a7dc940d1f9df4e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2ce2049be651bc461a3460cf4f3099357b4fc2b7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
59fd00e72c4b1472fd699bb7b0e007cbe31febb1cf415c8e55ef6f2870a7c3a6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bcfb2a5502996bb33373e7ae422e47d2f80220da0f7bc5166d0b45e9265569ec14d0e0d54fd4aefb52851036864bd85ced4c7f467a0f33fe5d62843cec7bd681
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.router</groupId>
|
|
11
11
|
<artifactId>expo.modules.router</artifactId>
|
|
12
|
-
<version>7.0.0-canary-
|
|
12
|
+
<version>7.0.0-canary-20260105-6b962e6</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.router</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
78fdca262e645cfb1da978f7de568b42
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a0bc7b4fb1ac9948c7c80566fea158a9f99c577a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5597fc545d4d1a5363b7be7c7b5e48ce55c54c8d632ee768c613bcb4ccdc465a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
95b58814ac6ee513134a4c54e96dcc8fc2f8ea566f863b6b0add06fb1141102a5f478767cba6a10b24e3a6a64873e109cbb82ea8f2f9b3dd58726ce8092ef0c8
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>7.0.0-canary-
|
|
7
|
-
<release>7.0.0-canary-
|
|
6
|
+
<latest>7.0.0-canary-20260105-6b962e6</latest>
|
|
7
|
+
<release>7.0.0-canary-20260105-6b962e6</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>7.0.0-canary-
|
|
9
|
+
<version>7.0.0-canary-20260105-6b962e6</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260105102046</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e829e60362210f4398ff5e2a24b272e5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6798dc4e485b5fac54acaeb62447b135bfdd7167
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c5e374f93c69a59a05cf52d8cb10f6d10ae9d9f1d33216b4a4362ab3db436478
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d74864c99af9ea1c792690f5eacf35a903c13a7681541885c11faeead20be944f38564b2f5d86b6d530ace66b561ba3e131283e38c9a461ba471f77ecb19278d
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "7.0.0-canary-
|
|
3
|
+
"version": "7.0.0-canary-20260105-6b962e6",
|
|
4
4
|
"description": "Expo Router is a file-based router for React Native and web applications.",
|
|
5
5
|
"author": "650 Industries, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"expo"
|
|
84
84
|
],
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
87
|
-
"@expo/log-box": "0.0.13-canary-
|
|
86
|
+
"@expo/metro-runtime": "6.2.0-canary-20260105-6b962e6",
|
|
87
|
+
"@expo/log-box": "0.0.13-canary-20260105-6b962e6",
|
|
88
88
|
"@react-navigation/drawer": "^7.7.2",
|
|
89
89
|
"@testing-library/react-native": ">= 12.0.0",
|
|
90
|
-
"expo": "55.0.0-canary-
|
|
91
|
-
"expo-constants": "18.1.0-canary-
|
|
92
|
-
"expo-linking": "8.0.12-canary-
|
|
90
|
+
"expo": "55.0.0-canary-20260105-6b962e6",
|
|
91
|
+
"expo-constants": "18.1.0-canary-20260105-6b962e6",
|
|
92
|
+
"expo-linking": "8.0.12-canary-20260105-6b962e6",
|
|
93
93
|
"react": "*",
|
|
94
94
|
"react-dom": "*",
|
|
95
95
|
"react-native": "*",
|
|
@@ -134,8 +134,8 @@
|
|
|
134
134
|
"react-server-dom-webpack": "~19.0.3"
|
|
135
135
|
},
|
|
136
136
|
"dependencies": {
|
|
137
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
138
|
-
"@expo/schema-utils": "0.1.9-canary-
|
|
137
|
+
"@expo/metro-runtime": "6.2.0-canary-20260105-6b962e6",
|
|
138
|
+
"@expo/schema-utils": "0.1.9-canary-20260105-6b962e6",
|
|
139
139
|
"@radix-ui/react-slot": "1.2.0",
|
|
140
140
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
141
141
|
"@react-navigation/bottom-tabs": "^7.7.3",
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
"client-only": "^0.0.1",
|
|
145
145
|
"debug": "^4.3.4",
|
|
146
146
|
"escape-string-regexp": "^4.0.0",
|
|
147
|
-
"expo-server": "1.0.6-canary-
|
|
148
|
-
"expo-symbols": "1.1.0-canary-
|
|
147
|
+
"expo-server": "1.0.6-canary-20260105-6b962e6",
|
|
148
|
+
"expo-symbols": "1.1.0-canary-20260105-6b962e6",
|
|
149
149
|
"fast-deep-equal": "^3.1.3",
|
|
150
150
|
"invariant": "^2.2.4",
|
|
151
151
|
"nanoid": "^3.3.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
11c996e0086d03ca14d4ccd2d79a5932
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0a6153e63184ae156d6115f29c5c21d9b23f60ae
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fd284ea1d06dde5db65eb8b40970efe3ffea09cc59155a6197e891b741efabd2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8274b2e37eadf93844e0d6628ae2f7fe2ae027e3089dd4cbe7b55762eaa35fb1769c006fe666d9698c203a4093e5edbd9a85616de6963dbe5f66f7dcaa979d02
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
337ea7d2f5ba3b9410d50320e3980501
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
747d42dd0c68b329f915a00292681d8f6ee27a9a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a909f2adaa521343694f1e43904528fc3d3d6a574cee43f3c59330d5a5749d88
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2a9151431d99f24cdecf35833e6abad110ca57c39e3702db6ed69bfbafbd159dd0a5c17a0e4f53fccbc38e8fee3055a2f30d2974620fa24cebffe108320c237c
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|