expo-router 57.0.20 → 57.0.22
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/LocaleProvider.d.ts +7 -0
- package/build/LocaleProvider.d.ts.map +1 -0
- package/build/LocaleProvider.js +10 -0
- package/build/LocaleProvider.js.map +1 -0
- package/build/exports.d.ts +1 -0
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +3 -1
- package/build/exports.js.map +1 -1
- package/build/native-tabs/NativeTabsView.ios.d.ts.map +1 -1
- package/build/native-tabs/NativeTabsView.ios.js +18 -2
- package/build/native-tabs/NativeTabsView.ios.js.map +1 -1
- package/build/native-tabs/NativeTabsView.shared.d.ts +2 -2
- package/build/native-tabs/common/elements.d.ts +2 -2
- 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/index.d.ts +1 -1
- package/build/native-tabs/index.d.ts.map +1 -1
- package/build/native-tabs/index.js.map +1 -1
- package/build/native-tabs/types.d.ts +7 -1
- package/build/native-tabs/types.d.ts.map +1 -1
- package/build/native-tabs/types.js.map +1 -1
- package/build/native-tabs/utils/icon.d.ts +5 -5
- package/build/native-tabs/utils/icon.d.ts.map +1 -1
- package/build/native-tabs/utils/icon.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.d.ts +3 -2
- package/build/native-tabs/utils/optionsIconConverter.d.ts.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.ios.d.ts +3 -2
- package/build/native-tabs/utils/optionsIconConverter.ios.d.ts.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.ios.js +28 -11
- package/build/native-tabs/utils/optionsIconConverter.ios.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.js +5 -1
- package/build/native-tabs/utils/optionsIconConverter.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.shared.d.ts.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.shared.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.module → 57.0.22/expo.modules.router-57.0.22.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.pom → 57.0.22/expo.modules.router-57.0.22.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.22/expo.modules.router-57.0.22.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 -11
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/57.0.20/expo.modules.router-57.0.20.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20-sources.jar → 57.0.22/expo.modules.router-57.0.22-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20-sources.jar.md5 → 57.0.22/expo.modules.router-57.0.22-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20-sources.jar.sha1 → 57.0.22/expo.modules.router-57.0.22-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20-sources.jar.sha256 → 57.0.22/expo.modules.router-57.0.22-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20-sources.jar.sha512 → 57.0.22/expo.modules.router-57.0.22-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.aar → 57.0.22/expo.modules.router-57.0.22.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.aar.md5 → 57.0.22/expo.modules.router-57.0.22.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.aar.sha1 → 57.0.22/expo.modules.router-57.0.22.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.aar.sha256 → 57.0.22/expo.modules.router-57.0.22.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{57.0.20/expo.modules.router-57.0.20.aar.sha512 → 57.0.22/expo.modules.router-57.0.22.aar.sha512} +0 -0
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'expo.modules.router'
|
|
7
|
-
version = '57.0.
|
|
7
|
+
version = '57.0.22'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "57.0.
|
|
13
|
+
versionName "57.0.22"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { LocaleDirection } from './react-navigation/native/types';
|
|
3
|
+
export type LocaleProviderProps = PropsWithChildren<{
|
|
4
|
+
direction: LocaleDirection;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function LocaleProvider({ direction, children }: LocaleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=LocaleProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleProvider.d.ts","sourceRoot":"","sources":["../src/LocaleProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IAClD,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC,CAAC;AAEH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAE1E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.LocaleProvider = LocaleProvider;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const LocaleDirContext_1 = require("./react-navigation/native/LocaleDirContext");
|
|
7
|
+
function LocaleProvider({ direction, children }) {
|
|
8
|
+
return (0, jsx_runtime_1.jsx)(LocaleDirContext_1.LocaleDirContext.Provider, { value: direction, children: children });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=LocaleProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleProvider.js","sourceRoot":"","sources":["../src/LocaleProvider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAWb,wCAEC;;AATD,iFAA8E;AAO9E,SAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAuB;IACzE,OAAO,uBAAC,mCAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,SAAS,YAAG,QAAQ,GAA6B,CAAC;AAC7F,CAAC","sourcesContent":["'use client';\n\nimport type { PropsWithChildren } from 'react';\n\nimport { LocaleDirContext } from './react-navigation/native/LocaleDirContext';\nimport type { LocaleDirection } from './react-navigation/native/types';\n\nexport type LocaleProviderProps = PropsWithChildren<{\n direction: LocaleDirection;\n}>;\n\nexport function LocaleProvider({ direction, children }: LocaleProviderProps) {\n return <LocaleDirContext.Provider value={direction}>{children}</LocaleDirContext.Provider>;\n}\n"]}
|
package/build/exports.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { DarkTheme } from './react-navigation/native/theming/DarkTheme';
|
|
|
23
23
|
export { DefaultTheme } from './react-navigation/native/theming/DefaultTheme';
|
|
24
24
|
export { ThemeProvider } from './react-navigation/core/theming/ThemeProvider';
|
|
25
25
|
export { useTheme } from './react-navigation/core/theming/useTheme';
|
|
26
|
+
export { LocaleProvider, type LocaleProviderProps } from './LocaleProvider';
|
|
26
27
|
export type { Theme } from './react-navigation/native/types';
|
|
27
28
|
export { useRoutePath } from './react-navigation/native/useRoutePath';
|
|
28
29
|
export { useScrollToTop } from './react-navigation/native/useScrollToTop';
|
package/build/exports.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,WAAW,EACX,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,MAAM,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAG3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACxF,YAAY,EAA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AC1B,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,iCAAiC,CAAC"}
|
package/build/exports.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ExperimentalStack = exports.Tabs = exports.unstable_navigationEvents = exports.TabRouter = exports.StackRouter = exports.unstable_integrateWithRouter = exports.unstable_createStandardRouterNavigator = exports.VectorIcon = exports.Label = exports.Icon = exports.Badge = exports.useRoute = exports.useScrollToTop = exports.useRoutePath = exports.useTheme = exports.ThemeProvider = exports.DefaultTheme = exports.DarkTheme = exports.useIsFocused = exports.useFocusEffect = exports.useNavigation = exports.SplashScreen = exports.SuspenseFallback = exports.ErrorBoundary = exports.useSitemap = exports.Sitemap = exports.Unmatched = exports.ExpoRoot = exports.Slot = exports.Navigator = exports.withLayoutContext = exports.router = exports.useCurrentRouteInfo = exports.useLoaderData = exports.useRootNavigationState = exports.useRootNavigation = exports.useSegments = exports.useLocalSearchParams = exports.useGlobalSearchParams = exports.useNavigationContainerRef = exports.usePathname = exports.useUnstableGlobalHref = exports.useRouter = void 0;
|
|
36
|
+
exports.ExperimentalStack = exports.Tabs = exports.unstable_navigationEvents = exports.TabRouter = exports.StackRouter = exports.unstable_integrateWithRouter = exports.unstable_createStandardRouterNavigator = exports.VectorIcon = exports.Label = exports.Icon = exports.Badge = exports.useRoute = exports.useScrollToTop = exports.useRoutePath = exports.LocaleProvider = exports.useTheme = exports.ThemeProvider = exports.DefaultTheme = exports.DarkTheme = exports.useIsFocused = exports.useFocusEffect = exports.useNavigation = exports.SplashScreen = exports.SuspenseFallback = exports.ErrorBoundary = exports.useSitemap = exports.Sitemap = exports.Unmatched = exports.ExpoRoot = exports.Slot = exports.Navigator = exports.withLayoutContext = exports.router = exports.useCurrentRouteInfo = exports.useLoaderData = exports.useRootNavigationState = exports.useRootNavigation = exports.useSegments = exports.useLocalSearchParams = exports.useGlobalSearchParams = exports.useNavigationContainerRef = exports.usePathname = exports.useUnstableGlobalHref = exports.useRouter = void 0;
|
|
37
37
|
// Expo Router API
|
|
38
38
|
const Navigator_1 = require("./views/Navigator");
|
|
39
39
|
Object.defineProperty(exports, "Navigator", { enumerable: true, get: function () { return Navigator_1.Navigator; } });
|
|
@@ -87,6 +87,8 @@ var ThemeProvider_1 = require("./react-navigation/core/theming/ThemeProvider");
|
|
|
87
87
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
88
88
|
var useTheme_1 = require("./react-navigation/core/theming/useTheme");
|
|
89
89
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return useTheme_1.useTheme; } });
|
|
90
|
+
var LocaleProvider_1 = require("./LocaleProvider");
|
|
91
|
+
Object.defineProperty(exports, "LocaleProvider", { enumerable: true, get: function () { return LocaleProvider_1.LocaleProvider; } });
|
|
90
92
|
var useRoutePath_1 = require("./react-navigation/native/useRoutePath");
|
|
91
93
|
Object.defineProperty(exports, "useRoutePath", { enumerable: true, get: function () { return useRoutePath_1.useRoutePath; } });
|
|
92
94
|
var useScrollToTop_1 = require("./react-navigation/native/useScrollToTop");
|
package/build/exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,iDAAoD;AAmB3C,0FAnBA,qBAAS,OAmBA;AAAE,qFAnBA,gBAAI,OAmBA;AAjBxB,iCAYiB;AAXf,kGAAA,SAAS,OAAA;AACT,8GAAA,qBAAqB,OAAA;AACrB,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AA4B,OAAA;AAS9B,2GAA2G;AAC3G,sDAAoE;AAA3D,sGAAA,WAAW,OAAA;AAAE,oGAAA,SAAS,OAAA;AAQ/B,uDAA+D;AAAtD,6HAAA,yBAAyB,OAAA;AAUlC;;GAEG;AACH,uCAAsC;AAA7B,4FAAA,IAAI,OAAA;AAEb,mEAAiE;AAAxD,uHAAA,iBAAiB,OAAA","sourcesContent":["// Expo Router API\nimport { Navigator, Slot } from './views/Navigator';\n\nexport {\n useRouter,\n useUnstableGlobalHref,\n usePathname,\n useNavigationContainerRef,\n useGlobalSearchParams,\n useLocalSearchParams,\n useSegments,\n useRootNavigation,\n useRootNavigationState,\n useLoaderData,\n useCurrentRouteInfo,\n} from './hooks';\n\nexport { router, type ImperativeRouter } from './imperative-api';\n\nexport { withLayoutContext } from './layouts/withLayoutContext';\nexport { Navigator, Slot };\n\n// Expo Router Views\nexport { ExpoRoot } from './ExpoRoot';\nexport { Unmatched } from './views/Unmatched';\nexport { Sitemap } from './views/Sitemap';\nexport { useSitemap, type SitemapType } from './views/useSitemap';\nexport type { ErrorBoundaryProps } from './views/Try';\nexport { ErrorBoundary } from './views/ErrorBoundary';\nexport { SuspenseFallback, type SuspenseFallbackProps } from './views/SuspenseFallback';\nexport type { ScreenProps } from './useScreens';\n\n// Platform\n/**\n * @hidden\n */\nexport * as SplashScreen from './views/Splash';\n\n// React Navigation\nexport { useNavigation } from './useNavigation';\nexport { useFocusEffect, type EffectCallback } from './useFocusEffect';\nexport { useIsFocused } from './useIsFocused';\nexport type { ResultState } from './fork/getStateFromPath';\n\nexport { DarkTheme } from './react-navigation/native/theming/DarkTheme';\nexport { DefaultTheme } from './react-navigation/native/theming/DefaultTheme';\nexport { ThemeProvider } from './react-navigation/core/theming/ThemeProvider';\nexport { useTheme } from './react-navigation/core/theming/useTheme';\nexport { LocaleProvider, type LocaleProviderProps } from './LocaleProvider';\nexport type { Theme } from './react-navigation/native/types';\nexport { useRoutePath } from './react-navigation/native/useRoutePath';\nexport { useScrollToTop } from './react-navigation/native/useScrollToTop';\nexport { useRoute } from './react-navigation/core/useRoute';\n\nexport type { RedirectConfig } from './getRoutesCore';\nexport type { SingularOptions } from './useScreens';\n\nexport type * from './types';\n\nexport {\n Badge,\n type BadgeProps,\n Icon,\n type IconProps,\n Label,\n type LabelProps,\n VectorIcon,\n type VectorIconProps,\n} from './primitives';\n\nexport {\n unstable_createStandardRouterNavigator,\n unstable_integrateWithRouter,\n} from './standard-navigation';\nexport type {\n IntegrateWithRouterOptions,\n NavigatorContentProps,\n StandardNavigatorEventMapBase,\n StandardUseNavigationBuilderOptions,\n} from './standard-navigation';\n\n// Router factories for use with `unstable_createStandardRouterNavigator` / `unstable_integrateWithRouter`.\nexport { StackRouter, TabRouter } from './react-navigation/routers';\nexport type {\n StackNavigationState,\n StackRouterOptions,\n TabNavigationState,\n TabRouterOptions,\n} from './react-navigation/routers';\n\nexport { unstable_navigationEvents } from './navigationEvents';\nexport type {\n PagePreloadedEvent,\n PageFocusedEvent,\n PageBlurredEvent,\n PageRemoved,\n ActionDispatchedEvent,\n AnalyticsEvent,\n} from './navigationEvents';\n\n/**\n * @deprecated Use `import { Tabs } from 'expo-router/js-tabs'` instead.\n */\nexport { Tabs } from './layouts/Tabs';\n\nexport { ExperimentalStack } from './layouts/experimental-stack';\nexport type {\n ExperimentalStackNavigationOptions,\n ExperimentalStackNavigationEventMap,\n ExperimentalStackNavigationProp,\n ExperimentalStackScreenProps,\n} from './layouts/experimental-stack';\n\n// Copied from packages/expo-router/src/react-navigation/native-stack/index.tsx\n// Keep in sync\nexport type {\n NativeStackHeaderBackProps,\n NativeStackHeaderItem,\n NativeStackHeaderItemButton,\n NativeStackHeaderItemCustom,\n NativeStackHeaderItemMenu,\n NativeStackHeaderItemMenuAction,\n NativeStackHeaderItemMenuSubmenu,\n NativeStackHeaderItemProps,\n NativeStackHeaderItemSpacing,\n NativeStackHeaderLeftProps,\n NativeStackHeaderProps,\n NativeStackHeaderRightProps,\n NativeStackHeaderNativeProps,\n NativeStackNativeProps,\n NativeStackNavigationEventMap,\n NativeStackNavigationOptions,\n NativeStackNavigationProp,\n NativeStackNavigatorProps,\n NativeStackOptionsArgs,\n NativeStackScreenNativeProps,\n NativeStackScreenProps,\n} from './react-navigation/native-stack';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.ios.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.ios.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeTabsView.ios.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.ios.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQzF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,kDA4ExD"}
|
|
@@ -49,8 +49,24 @@ function NativeTabsView(props) {
|
|
|
49
49
|
function Screen(props) {
|
|
50
50
|
const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;
|
|
51
51
|
const shared = (0, NativeTabsView_shared_1.useSharedScreenProps)(props);
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const selectedIcon = shared.selectedIcon ?? shared.icon;
|
|
53
|
+
// React Native Screens requires `icon` and `selectedIcon` to resolve to the same icon type and
|
|
54
|
+
// throws otherwise, so both states have to share a rendering mode. The two can disagree when a
|
|
55
|
+
// color is set for only one of the states, or when `renderingMode` is set explicitly.
|
|
56
|
+
const normalRenderingMode = (0, optionsIconConverter_1.resolveIconRenderingMode)(shared.icon, standardAppearance?.stacked?.normal?.tabBarItemIconColor);
|
|
57
|
+
const selectedRenderingMode = (0, optionsIconConverter_1.resolveIconRenderingMode)(selectedIcon, standardAppearance?.stacked?.selected?.tabBarItemIconColor);
|
|
58
|
+
if (process.env.NODE_ENV !== 'production' &&
|
|
59
|
+
normalRenderingMode &&
|
|
60
|
+
selectedRenderingMode &&
|
|
61
|
+
normalRenderingMode !== selectedRenderingMode) {
|
|
62
|
+
console.warn(`NativeTabs does not currently support rendering icons in different modes, so the "${props.name}" tab renders both icons with the default icon's mode. ` +
|
|
63
|
+
'The modes disagree when an icon color applies to only one of the states — `tintColor`, `iconColor={{ selected }}`, or the `Icon` `selectedColor` prop — or when `renderingMode` is set for only one state. ' +
|
|
64
|
+
'To render both the same way, set a color for both states (for example `iconColor` rather than only `tintColor`), or set `renderingMode` on the `Icon`.');
|
|
65
|
+
}
|
|
66
|
+
// The normal state wins, so the selected icon follows the mode the tab bar shows most of the time.
|
|
67
|
+
const effectiveRenderingMode = normalRenderingMode ?? selectedRenderingMode;
|
|
68
|
+
const iosIcon = (0, optionsIconConverter_1.convertOptionsIconToScreensPropsIcon)(shared.icon, effectiveRenderingMode);
|
|
69
|
+
const iosSelectedIcon = (0, optionsIconConverter_1.convertOptionsIconToScreensPropsIcon)(selectedIcon, effectiveRenderingMode);
|
|
54
70
|
const content = (0, jsx_runtime_1.jsx)(NativeTabsView_shared_1.ScreenContent, { options: options, contentRenderer: contentRenderer });
|
|
55
71
|
const wrappedContent = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(react_native_safe_area_context_1.SafeAreaProvider, { children: content }), [content]);
|
|
56
72
|
return ((0, jsx_runtime_1.jsx)(react_native_screens_1.Tabs.Screen, { ...shared.options, pointerEvents: shared.pointerEvents, ios: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.ios.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.ios.tsx"],"names":[],"mappings":";;AAsBA,wCA4EC;;AAlGD,iCAAgC;AAChC,mFAAkE;AAClE,+DAA8F;AAE9F,mEAOiC;AACjC,6CAGsB;AACtB,gDAA8D;AAC9D,mCAAyF;AACzF,6DAA0F;AAC1F,uEAAoF;AACpF,gDAAwD;AAExD,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAA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sBAAsB,CAAC,EAAE,CAAC;YAClF,OAAO,CAAC,IAAI,CACV,iCAAiC,YAAY,CAAC,sBAAsB,2BAA2B,4CAAoC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACpL,CAAC;YACF,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,sBAAsB,EAAE,SAAS,EAAE,CAAC;QACxE,CAAC;IACH,CAAC;IAED,OAAO,uBAAC,2BAAI,CAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,YAAY,GAAI,CAAC;AACrD,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { Tabs, type TabsHostProps, type TabsScreenAppearanceIOS } from 'react-native-screens';\n\nimport {\n type InternalTabScreenProps as SharedInternalTabScreenProps,\n ScreenContent,\n useOnTabSelectedHandler,\n useOnTabSelectionPreventedHandler,\n useSelectedScreenKey,\n useSharedScreenProps,\n} from './NativeTabsView.shared';\nimport {\n createScrollEdgeAppearanceFromOptions,\n createStandardAppearanceFromOptions,\n} from './appearance';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport { SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS, type NativeTabsViewProps } from './types';\nimport { useBottomAccessoryFunctionFromBottomAccessories } from './utils/bottomAccessory';\nimport { convertOptionsIconToScreensPropsIcon } from './utils/optionsIconConverter';\nimport { getFirstChildOfType } from '../utils/children';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const { minimizeBehavior, tabs, sidebarAdaptable, nonTriggerChildren, unstable_nativeProps } =\n props;\n // `ios`/`android` are the only platform-nested keys on `TabsHostProps`. We drop the inactive\n // platform's slice so users writing universal code don't pass Android-only props to the iOS host.\n const {\n ios: rawIosProps,\n android: _ignoredRawAndroidProps,\n ...rawHostRestProps\n } = unstable_nativeProps ?? {};\n\n const { selectedScreenKey, provenance } = useSelectedScreenKey(props);\n const onTabSelected = useOnTabSelectedHandler(props.onTabChange);\n const onTabSelectionPrevented = useOnTabSelectionPreventedHandler(props.onTabChange);\n\n const iosAppearances = tabs.map((tab) => ({\n standardAppearance: createStandardAppearanceFromOptions(tab.options),\n scrollEdgeAppearance: createScrollEdgeAppearanceFromOptions(tab.options),\n }));\n\n const bottomAccessory = useMemo(\n () => getFirstChildOfType(nonTriggerChildren, NativeTabsBottomAccessory),\n [nonTriggerChildren]\n );\n\n const bottomAccessoryFn = useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n bottomAccessory &&\n rawIosProps &&\n 'bottomAccessory' in rawIosProps\n ) {\n console.warn(\n '<NativeTabs.BottomAccessory> is being overridden by `unstable_nativeProps.ios.bottomAccessory`. ' +\n 'Either remove the `<NativeTabs.BottomAccessory>` child or stop passing `ios.bottomAccessory` via `unstable_nativeProps`.'\n );\n }\n\n const children = tabs.map((tab, index) => (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={selectedScreenKey === tab.routeKey}\n standardAppearance={iosAppearances[index]!.standardAppearance}\n scrollEdgeAppearance={iosAppearances[index]!.scrollEdgeAppearance}\n contentRenderer={tab.contentRenderer}\n />\n ));\n\n if (children.length === 0) {\n return null;\n }\n\n const tabBarControllerMode: NonNullable<TabsHostProps['ios']>['tabBarControllerMode'] =\n sidebarAdaptable ? 'tabSidebar' : sidebarAdaptable === false ? 'tabBar' : 'automatic';\n\n return (\n <TabsHostWrapper\n ios={{\n tabBarTintColor: props.tintColor,\n tabBarMinimizeBehavior: minimizeBehavior,\n tabBarControllerMode,\n bottomAccessory: bottomAccessoryFn,\n ...rawIosProps,\n }}\n tabBarHidden={props.hidden}\n {...rawHostRestProps}\n navStateRequest={{ selectedScreenKey, baseProvenance: provenance }}\n onTabSelected={onTabSelected}\n onTabSelectionPrevented={onTabSelectionPrevented}>\n {children}\n </TabsHostWrapper>\n );\n}\n\ninterface InternalTabScreenProps extends SharedInternalTabScreenProps {\n standardAppearance: TabsScreenAppearanceIOS;\n scrollEdgeAppearance: TabsScreenAppearanceIOS;\n}\n\nfunction Screen(props: InternalTabScreenProps) {\n const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;\n\n const shared = useSharedScreenProps(props);\n\n const iosIcon = convertOptionsIconToScreensPropsIcon(\n shared.icon,\n standardAppearance?.stacked?.normal?.tabBarItemIconColor\n );\n const iosSelectedIcon = convertOptionsIconToScreensPropsIcon(\n shared.selectedIcon ?? shared.icon,\n standardAppearance?.stacked?.selected?.tabBarItemIconColor\n );\n\n const content = <ScreenContent options={options} contentRenderer={contentRenderer} />;\n const wrappedContent = useMemo(() => <SafeAreaProvider>{content}</SafeAreaProvider>, [content]);\n\n return (\n <Tabs.Screen\n {...shared.options}\n pointerEvents={shared.pointerEvents}\n ios={{\n icon: iosIcon,\n selectedIcon: iosSelectedIcon,\n standardAppearance,\n scrollEdgeAppearance,\n systemItem: options.role,\n overrideScrollViewContentInsetAdjustmentBehavior: !options.disableAutomaticContentInsets,\n ...shared.nativeIosOverrides,\n }}\n title={shared.title}\n preventNativeSelection={options.disabled}\n {...shared.nativeRestOverrides}\n screenKey={shared.screenKey}>\n {wrappedContent}\n </Tabs.Screen>\n );\n}\n\nconst supportedTabBarMinimizeBehaviorsSet = new Set<string>(SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);\n\nfunction TabsHostWrapper(props: TabsHostProps) {\n // TODO(@ubax): add function for validation\n let validatedIos = props.ios;\n if (validatedIos?.tabBarMinimizeBehavior) {\n if (!supportedTabBarMinimizeBehaviorsSet.has(validatedIos.tabBarMinimizeBehavior)) {\n console.warn(\n `Unsupported minimizeBehavior: ${validatedIos.tabBarMinimizeBehavior}. Supported values are: ${SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `\"${behavior}\"`).join(', ')}`\n );\n validatedIos = { ...validatedIos, tabBarMinimizeBehavior: undefined };\n }\n }\n\n return <Tabs.Host {...props} ios={validatedIos} />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NativeTabsView.ios.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.ios.tsx"],"names":[],"mappings":";;AAyBA,wCA4EC;;AArGD,iCAAgC;AAChC,mFAAkE;AAClE,+DAA8F;AAE9F,mEAOiC;AACjC,6CAGsB;AACtB,gDAA8D;AAC9D,mCAAyF;AACzF,6DAA0F;AAC1F,uEAGsC;AACtC,gDAAwD;AAExD,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAC1F,KAAK,CAAC;IACR,6FAA6F;IAC7F,kGAAkG;IAClG,MAAM,EACJ,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,uBAAuB,EAChC,GAAG,gBAAgB,EACpB,GAAG,oBAAoB,IAAI,EAAE,CAAC;IAE/B,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,IAAA,4CAAoB,EAAC,KAAK,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,IAAA,+CAAuB,EAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACjE,MAAM,uBAAuB,GAAG,IAAA,yDAAiC,EAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAErF,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACxC,kBAAkB,EAAE,IAAA,gDAAmC,EAAC,GAAG,CAAC,OAAO,CAAC;QACpE,oBAAoB,EAAE,IAAA,kDAAqC,EAAC,GAAG,CAAC,OAAO,CAAC;KACzE,CAAC,CAAC,CAAC;IAEJ,MAAM,eAAe,GAAG,IAAA,eAAO,EAC7B,GAAG,EAAE,CAAC,IAAA,8BAAmB,EAAC,kBAAkB,EAAE,oCAAyB,CAAC,EACxE,CAA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AAS,EAAE,CAAC;QACxE,CAAC;IACH,CAAC;IAED,OAAO,uBAAC,2BAAI,CAAC,IAAI,OAAK,KAAK,EAAE,GAAG,EAAE,YAAY,GAAI,CAAC;AACrD,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { Tabs, type TabsHostProps, type TabsScreenAppearanceIOS } from 'react-native-screens';\n\nimport {\n type InternalTabScreenProps as SharedInternalTabScreenProps,\n ScreenContent,\n useOnTabSelectedHandler,\n useOnTabSelectionPreventedHandler,\n useSelectedScreenKey,\n useSharedScreenProps,\n} from './NativeTabsView.shared';\nimport {\n createScrollEdgeAppearanceFromOptions,\n createStandardAppearanceFromOptions,\n} from './appearance';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport { SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS, type NativeTabsViewProps } from './types';\nimport { useBottomAccessoryFunctionFromBottomAccessories } from './utils/bottomAccessory';\nimport {\n convertOptionsIconToScreensPropsIcon,\n resolveIconRenderingMode,\n} from './utils/optionsIconConverter';\nimport { getFirstChildOfType } from '../utils/children';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const { minimizeBehavior, tabs, sidebarAdaptable, nonTriggerChildren, unstable_nativeProps } =\n props;\n // `ios`/`android` are the only platform-nested keys on `TabsHostProps`. We drop the inactive\n // platform's slice so users writing universal code don't pass Android-only props to the iOS host.\n const {\n ios: rawIosProps,\n android: _ignoredRawAndroidProps,\n ...rawHostRestProps\n } = unstable_nativeProps ?? {};\n\n const { selectedScreenKey, provenance } = useSelectedScreenKey(props);\n const onTabSelected = useOnTabSelectedHandler(props.onTabChange);\n const onTabSelectionPrevented = useOnTabSelectionPreventedHandler(props.onTabChange);\n\n const iosAppearances = tabs.map((tab) => ({\n standardAppearance: createStandardAppearanceFromOptions(tab.options),\n scrollEdgeAppearance: createScrollEdgeAppearanceFromOptions(tab.options),\n }));\n\n const bottomAccessory = useMemo(\n () => getFirstChildOfType(nonTriggerChildren, NativeTabsBottomAccessory),\n [nonTriggerChildren]\n );\n\n const bottomAccessoryFn = useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n bottomAccessory &&\n rawIosProps &&\n 'bottomAccessory' in rawIosProps\n ) {\n console.warn(\n '<NativeTabs.BottomAccessory> is being overridden by `unstable_nativeProps.ios.bottomAccessory`. ' +\n 'Either remove the `<NativeTabs.BottomAccessory>` child or stop passing `ios.bottomAccessory` via `unstable_nativeProps`.'\n );\n }\n\n const children = tabs.map((tab, index) => (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={selectedScreenKey === tab.routeKey}\n standardAppearance={iosAppearances[index]!.standardAppearance}\n scrollEdgeAppearance={iosAppearances[index]!.scrollEdgeAppearance}\n contentRenderer={tab.contentRenderer}\n />\n ));\n\n if (children.length === 0) {\n return null;\n }\n\n const tabBarControllerMode: NonNullable<TabsHostProps['ios']>['tabBarControllerMode'] =\n sidebarAdaptable ? 'tabSidebar' : sidebarAdaptable === false ? 'tabBar' : 'automatic';\n\n return (\n <TabsHostWrapper\n ios={{\n tabBarTintColor: props.tintColor,\n tabBarMinimizeBehavior: minimizeBehavior,\n tabBarControllerMode,\n bottomAccessory: bottomAccessoryFn,\n ...rawIosProps,\n }}\n tabBarHidden={props.hidden}\n {...rawHostRestProps}\n navStateRequest={{ selectedScreenKey, baseProvenance: provenance }}\n onTabSelected={onTabSelected}\n onTabSelectionPrevented={onTabSelectionPrevented}>\n {children}\n </TabsHostWrapper>\n );\n}\n\ninterface InternalTabScreenProps extends SharedInternalTabScreenProps {\n standardAppearance: TabsScreenAppearanceIOS;\n scrollEdgeAppearance: TabsScreenAppearanceIOS;\n}\n\nfunction Screen(props: InternalTabScreenProps) {\n const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;\n\n const shared = useSharedScreenProps(props);\n\n const selectedIcon = shared.selectedIcon ?? shared.icon;\n\n // React Native Screens requires `icon` and `selectedIcon` to resolve to the same icon type and\n // throws otherwise, so both states have to share a rendering mode. The two can disagree when a\n // color is set for only one of the states, or when `renderingMode` is set explicitly.\n const normalRenderingMode = resolveIconRenderingMode(\n shared.icon,\n standardAppearance?.stacked?.normal?.tabBarItemIconColor\n );\n const selectedRenderingMode = resolveIconRenderingMode(\n selectedIcon,\n standardAppearance?.stacked?.selected?.tabBarItemIconColor\n );\n\n if (\n process.env.NODE_ENV !== 'production' &&\n normalRenderingMode &&\n selectedRenderingMode &&\n normalRenderingMode !== selectedRenderingMode\n ) {\n console.warn(\n `NativeTabs does not currently support rendering icons in different modes, so the \"${props.name}\" tab renders both icons with the default icon's mode. ` +\n 'The modes disagree when an icon color applies to only one of the states — `tintColor`, `iconColor={{ selected }}`, or the `Icon` `selectedColor` prop — or when `renderingMode` is set for only one state. ' +\n 'To render both the same way, set a color for both states (for example `iconColor` rather than only `tintColor`), or set `renderingMode` on the `Icon`.'\n );\n }\n\n // The normal state wins, so the selected icon follows the mode the tab bar shows most of the time.\n const effectiveRenderingMode = normalRenderingMode ?? selectedRenderingMode;\n\n const iosIcon = convertOptionsIconToScreensPropsIcon(shared.icon, effectiveRenderingMode);\n const iosSelectedIcon = convertOptionsIconToScreensPropsIcon(\n selectedIcon,\n effectiveRenderingMode\n );\n\n const content = <ScreenContent options={options} contentRenderer={contentRenderer} />;\n const wrappedContent = useMemo(() => <SafeAreaProvider>{content}</SafeAreaProvider>, [content]);\n\n return (\n <Tabs.Screen\n {...shared.options}\n pointerEvents={shared.pointerEvents}\n ios={{\n icon: iosIcon,\n selectedIcon: iosSelectedIcon,\n standardAppearance,\n scrollEdgeAppearance,\n systemItem: options.role,\n overrideScrollViewContentInsetAdjustmentBehavior: !options.disableAutomaticContentInsets,\n ...shared.nativeIosOverrides,\n }}\n title={shared.title}\n preventNativeSelection={options.disabled}\n {...shared.nativeRestOverrides}\n screenKey={shared.screenKey}>\n {wrappedContent}\n </Tabs.Screen>\n );\n}\n\nconst supportedTabBarMinimizeBehaviorsSet = new Set<string>(SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);\n\nfunction TabsHostWrapper(props: TabsHostProps) {\n // TODO(@ubax): add function for validation\n let validatedIos = props.ios;\n if (validatedIos?.tabBarMinimizeBehavior) {\n if (!supportedTabBarMinimizeBehaviorsSet.has(validatedIos.tabBarMinimizeBehavior)) {\n console.warn(\n `Unsupported minimizeBehavior: ${validatedIos.tabBarMinimizeBehavior}. Supported values are: ${SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `\"${behavior}\"`).join(', ')}`\n );\n validatedIos = { ...validatedIos, tabBarMinimizeBehavior: undefined };\n }\n }\n\n return <Tabs.Host {...props} ios={validatedIos} />;\n}\n"]}
|
|
@@ -53,7 +53,7 @@ export declare function useSharedScreenProps(props: InternalTabScreenProps): {
|
|
|
53
53
|
drawable?: string;
|
|
54
54
|
} | {
|
|
55
55
|
src?: import("react-native").ImageSourcePropType;
|
|
56
|
-
renderingMode?: "
|
|
56
|
+
renderingMode?: import("./types").IconRenderingMode;
|
|
57
57
|
} | undefined;
|
|
58
58
|
selectedIcon: {
|
|
59
59
|
sf?: import("sf-symbols-typescript").SFSymbol;
|
|
@@ -61,7 +61,7 @@ export declare function useSharedScreenProps(props: InternalTabScreenProps): {
|
|
|
61
61
|
drawable?: string;
|
|
62
62
|
} | {
|
|
63
63
|
src?: import("react-native").ImageSourcePropType;
|
|
64
|
-
renderingMode?: "
|
|
64
|
+
renderingMode?: import("./types").IconRenderingMode;
|
|
65
65
|
} | undefined;
|
|
66
66
|
};
|
|
67
67
|
export declare function ScreenContent({ options, contentRenderer, }: {
|
|
@@ -2,7 +2,7 @@ import type { AndroidSymbol } from 'expo-symbols';
|
|
|
2
2
|
import type { ColorValue, ImageSourcePropType, StyleProp } from 'react-native';
|
|
3
3
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
4
4
|
import { VectorIcon } from '../../primitives';
|
|
5
|
-
import type { NativeTabsLabelStyle } from '../types';
|
|
5
|
+
import type { IconRenderingMode, NativeTabsLabelStyle } from '../types';
|
|
6
6
|
export interface NativeTabsTriggerLabelProps {
|
|
7
7
|
/**
|
|
8
8
|
* The text to display as the label for the tab.
|
|
@@ -59,7 +59,7 @@ export interface SrcIcon {
|
|
|
59
59
|
*
|
|
60
60
|
* @platform ios
|
|
61
61
|
*/
|
|
62
|
-
renderingMode?:
|
|
62
|
+
renderingMode?: IconRenderingMode;
|
|
63
63
|
}
|
|
64
64
|
export interface SFSymbolIcon {
|
|
65
65
|
/**
|
|
@@ -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,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
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,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,Q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AAC"}
|
|
@@ -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;AAqKnF;;;;;;;;;;;;;;;;;;;;;GAqBG;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 * Controls how the image icon is rendered on iOS.\n *\n * - `'template'`: iOS applies tint color to the icon (selected/unselected states)\n * - `'original'`: Preserves original icon colors\n *\n * **Default behavior:**\n * - If tab bar icon color is configured, defaults to `'template'`\n * - If no icon color is set, defaults to `'original'`\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiimage/renderingmode-swift.enum) for more information.\n *\n * @platform ios\n */\n renderingMode?:
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../src/native-tabs/common/elements.tsx"],"names":[],"mappings":";;;AAIA,iDAAkE;AAgBrD,QAAA,sBAAsB,GAA0C,kBAAK,CAAC;AAqKnF;;;;;;;;;;;;;;;;;;;;;GAqBG;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 { IconRenderingMode, 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 * Controls how the image icon is rendered on iOS.\n *\n * - `'template'`: iOS applies tint color to the icon (selected/unselected states)\n * - `'original'`: Preserves original icon colors\n *\n * **Default behavior:**\n * - If tab bar icon color is configured, defaults to `'template'`\n * - If no icon color is set, defaults to `'original'`\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiimage/renderingmode-swift.enum) for more information.\n *\n * @platform ios\n */\n renderingMode?: IconRenderingMode;\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 XcassetIcon {\n /**\n * The name of the iOS asset catalog image to use as an icon.\n *\n * Xcassets provide automatic multi-resolution (@1x/@2x/@3x), dark mode variants,\n * and device-specific images via `[UIImage imageNamed:]`.\n *\n * The rendering mode (template vs original) can be controlled via the `renderingMode` prop\n * on the `Icon` component. By default, icons are tinted when `iconColor` is set, and\n * rendered as original otherwise.\n *\n * The value can be provided in two ways:\n * - As a string with the asset catalog image name\n * - As an object specifying the default and selected states\n *\n * @example\n * ```tsx\n * <Icon xcasset=\"custom-icon\" />\n * ```\n *\n * @example\n * ```tsx\n * <Icon xcasset={{ default: \"home-outline\", selected: \"home-filled\" }} />\n * ```\n *\n * @platform iOS\n */\n xcasset?: string | { default?: string; selected: string };\n}\n\nexport interface DrawableIcon {\n /**\n * The name of the drawable resource to use as an icon.\n *\n * The value can be provided in two ways:\n * - As a string with the drawable resource name\n * - As an object specifying the default and selected states\n *\n * @example\n * ```tsx\n * <Icon drawable=\"ic_home\" />\n * ```\n *\n * @example\n * ```tsx\n * <Icon drawable={{ default: 'ic_home_outline', selected: 'ic_home_filled' }} />\n * ```\n *\n * @platform android\n */\n drawable?: string | { default?: string; selected: 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 * The value can be provided in two ways:\n * - As a string with the Material icon name\n * - As an object specifying the default and selected states\n *\n * @example\n * ```tsx\n * <Icon md=\"home\" />\n * ```\n *\n * @example\n * ```tsx\n * <Icon md={{ default: 'home', selected: 'home_filled' }} />\n * ```\n */\n md: AndroidSymbol | { default?: AndroidSymbol; selected: AndroidSymbol };\n}\n\nexport type NativeTabsTriggerIconProps = { selectedColor?: ColorValue } & (\n | (SFSymbolIcon & DrawableIcon)\n | (SFSymbolIcon & MaterialIcon)\n | (SFSymbolIcon & SrcIcon)\n | (XcassetIcon & DrawableIcon)\n | (XcassetIcon & MaterialIcon)\n | (XcassetIcon & 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, xcasset images, drawable resources, material icons, or image sources.\n *\n * Each icon prop (`sf`, `xcasset`, `drawable`, `md`, `src`) can be either a single value, or an object\n * with `{ default, selected }` to use a distinct icon when the tab is selected.\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 * - `xcasset` and `drawable` - `xcasset` will be used for iOS icon, `drawable` for Android icon\n * - `xcasset` and `md` - `xcasset` will be used for iOS icon, `md` for Android icon\n * - `xcasset` and `src` - `xcasset` 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 * Priority on iOS: `sf` > `xcasset` > `src`. Priority on Android: `drawable` > `md` > `src`.\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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { NativeTabsTriggerLabelProps, SrcIcon, SFSymbolIcon, XcassetIcon, DrawableIcon, MaterialIcon, NativeTabsTriggerIconProps, NativeTabsTriggerBadgeProps, NativeTabsBottomAccessoryProps, } from './common/elements';
|
|
2
|
-
export type { NativeTabsProps, NativeTabTriggerProps, NativeTabsLabelStyle, NativeTabsHostNativeProps, SymbolOrImageSource, NativeTabsTabBarItemLabelVisibilityMode, NativeTabsBlurEffect, NativeTabsTabBarMinimizeBehavior, NativeTabsTabBarItemRole, } from './types';
|
|
2
|
+
export type { IconRenderingMode, NativeTabsProps, NativeTabTriggerProps, NativeTabsLabelStyle, NativeTabsHostNativeProps, SymbolOrImageSource, NativeTabsTabBarItemLabelVisibilityMode, NativeTabsBlurEffect, NativeTabsTabBarMinimizeBehavior, NativeTabsTabBarItemRole, } from './types';
|
|
3
3
|
export { NativeTabTrigger } from './NativeTabTrigger';
|
|
4
4
|
export { NativeTabs } from './NativeTabs';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,2BAA2B,EAC3B,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,uCAAuC,EACvC,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,2BAA2B,EAC3B,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,uCAAuC,EACvC,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":";;;AAuBA,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export type {\n NativeTabsTriggerLabelProps,\n SrcIcon,\n SFSymbolIcon,\n XcassetIcon,\n DrawableIcon,\n MaterialIcon,\n NativeTabsTriggerIconProps,\n NativeTabsTriggerBadgeProps,\n NativeTabsBottomAccessoryProps,\n} from './common/elements';\nexport type {\n IconRenderingMode,\n NativeTabsProps,\n NativeTabTriggerProps,\n NativeTabsLabelStyle,\n NativeTabsHostNativeProps,\n SymbolOrImageSource,\n NativeTabsTabBarItemLabelVisibilityMode,\n NativeTabsBlurEffect,\n NativeTabsTabBarMinimizeBehavior,\n NativeTabsTabBarItemRole,\n} from './types';\nexport { NativeTabTrigger } from './NativeTabTrigger';\nexport { NativeTabs } from './NativeTabs';\n"]}
|
|
@@ -186,6 +186,12 @@ export interface NativeTabOptions extends DefaultRouterOptions {
|
|
|
186
186
|
*/
|
|
187
187
|
contentStyle?: Pick<ViewStyle, 'backgroundColor' | 'experimental_backgroundImage' | 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingEnd' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'alignContent' | 'alignItems' | 'justifyContent' | 'flexDirection' | 'gap'>;
|
|
188
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* How an image-based icon is tinted on iOS: `template` lets the tab bar recolor the icon,
|
|
191
|
+
* `original` keeps the image's own colors. SF Symbols are always tinted by the system.
|
|
192
|
+
* @platform ios
|
|
193
|
+
*/
|
|
194
|
+
export type IconRenderingMode = 'template' | 'original';
|
|
189
195
|
export type SymbolOrImageSource = {
|
|
190
196
|
/**
|
|
191
197
|
* The name of the SF Symbol to use as an icon.
|
|
@@ -212,7 +218,7 @@ export type SymbolOrImageSource = {
|
|
|
212
218
|
* @platform ios
|
|
213
219
|
* @default 'template'
|
|
214
220
|
*/
|
|
215
|
-
renderingMode?:
|
|
221
|
+
renderingMode?: IconRenderingMode;
|
|
216
222
|
};
|
|
217
223
|
export type NativeTabsLabelStyle = Pick<TextStyle, 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'>;
|
|
218
224
|
export declare const SUPPORTED_BLUR_EFFECTS: readonly ["none", "systemDefault", "extraLight", "light", "dark", "regular", "prominent", "systemUltraThinMaterial", "systemThinMaterial", "systemMaterial", "systemThickMaterial", "systemChromeMaterial", "systemUltraThinMaterialLight", "systemThinMaterialLight", "systemMaterialLight", "systemThickMaterialLight", "systemChromeMaterialLight", "systemUltraThinMaterialDark", "systemThinMaterialDark", "systemMaterialDark", "systemThickMaterialDark", "systemChromeMaterialDark"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,eAAe,EACf,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;GAGG;AACH,MAAM,MA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IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AAyPE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AA2MX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsHostProps, TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type {\n DefaultRouterOptions,\n ParamListBase,\n RouteProp,\n ScreenListeners,\n TabNavigationState,\n} from '../react-navigation/native';\nimport type { ScreenProps } from '../useScreens';\nimport type { ErrorBoundaryProps } from '../views/Try';\n\n/**\n * Event map for `NativeTabs` navigation events.\n * Only `tabPress` is currently supported.\n */\nexport type NativeTabNavigationEventMap = {\n tabPress: {\n data: {\n __internalTabsType: 'native';\n /**\n * `true` when the native side prevented the selection because the target\n * tab is `disabled`. The event is still emitted so listeners are notified,\n * but no navigation occurs.\n */\n isPrevented: boolean;\n };\n canPreventDefault: false;\n };\n};\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, 'screenKey'>>;\n\n/**\n * Props passed to the underlying tab host implementation in `react-native-screens`.\n */\nexport type NativeTabsHostNativeProps = Partial<\n Omit<TabsHostProps, 'navStateRequest' | 'onTabSelected' | 'children'>\n>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n /**\n * @platform android\n * @platform iOS\n */\n icon?: SymbolOrImageSource;\n /**\n * @platform android\n * @platform iOS\n */\n selectedIcon?: SymbolOrImageSource;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n title?: string;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n badgeValue?: string;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n selectedLabelStyle?: NativeTabsLabelStyle;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * @platform iOS\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * @platform android\n * @platform iOS\n */\n selectedIconColor?: ColorValue;\n /**\n * @platform iOS\n */\n selectedBadgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n backgroundColor?: ColorValue;\n /**\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n */\n tintColor?: ColorValue;\n /**\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * @platform iOS\n */\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n hidden?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n disabled?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n tabBarItemTestID?: string;\n /**\n * @platform android\n * @platform iOS\n */\n tabBarItemAccessibilityLabel?: string;\n /**\n * @platform iOS\n */\n specialEffects?: TabsScreenProps['specialEffects'];\n /**\n * @platform android\n * @platform iOS\n */\n nativeProps?: NativeScreenProps;\n /**\n * @platform android\n * @platform iOS\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the iOS asset catalog image to use as an icon.\n * @platform iOS\n */\n xcasset?: string;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n /** A component to render when an individual tab screen throws an error. */\n unstable_screenErrorBoundary?: React.ComponentType<ErrorBoundaryProps>;\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * When `true`, the tab bar lifts above the keyboard (input method editor, or IME) instead of being overlaid by it. By default, the keyboard overlays the tab bar.\n *\n * Requires `windowSoftInputMode=\"adjustResize\"`. Has no effect on Android API levels earlier than 30 (Android 11).\n *\n * @default false\n * @platform android\n */\n tabBarRespectsIMEInsets?: boolean;\n // #endregion android props\n /**\n * Listeners for navigation events on all tabs.\n *\n * Supported events:\n * - `tabPress` - called when a tab is pressed\n * - `focus` - called when the screen comes into focus\n * - `blur` - called when the screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs\n * screenListeners={{\n * tabPress: (e) => {\n * console.log('Any tab pressed');\n * },\n * }}\n * >\n * ...\n * </NativeTabs>\n * ```\n */\n screenListeners?:\n | ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>);\n /**\n * Props passed to the underlying native tab host implementation in `react-native-screens`.\n * Use this to configure props that are not directly exposed by Expo Router.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform ios\n */\n unstable_nativeProps?: NativeTabsHostNativeProps;\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface OnTabChangeEventPayload {\n /**\n * The route key of the tab the native side has just selected.\n */\n selectedKey: string;\n /**\n * The provenance value reported by the native side for this selection.\n *\n * The navigator echoes this back via `navStateRequest.baseProvenance` on\n * subsequent JS-driven updates so the native side can distinguish stale\n * updates from fresh ones. See `TabsHostNavStateRequest` in\n * `react-native-screens` for the full contract.\n */\n provenance: number;\n // TODO(@ubax): consider renaming this field\n isNativeAction: boolean;\n /**\n * Whether the native side prevented this selection because the target tab is\n * `disabled`. When `true`, the navigator emits `tabPress` but skips navigation.\n *\n * @default false\n */\n isPrevented?: boolean;\n}\n\nexport interface NativeTabsViewProps extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n | 'rippleColor'\n | 'disableIndicator'\n | 'labelVisibilityMode'\n> {\n focusedIndex: number;\n /**\n * Provenance counter associated with the currently rendered `focusedIndex`.\n */\n provenance: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (event: OnTabChangeEventPayload) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n *\n * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * If `true`, the tab is shown but cannot be selected by tapping it in the\n * tab bar.\n *\n * > **Note:** This only suppresses the native tap interaction. JavaScript\n * > navigation such as `router.push()` or `<Link />` still navigates to\n * > the tab. Use this for tabs that should appear visible but be temporarily inert,\n * > and gate navigation in your own code if you need to fully prevent access.\n *\n * Unlike `hidden`, the tab remains visible in the tab bar.\n *\n * @default false\n *\n * @platform android\n * @platform ios\n */\n disabled?: boolean;\n /**\n * A test identifier for the tab bar item.\n *\n * On iOS it maps to the item's accessibility identifier, which XCUITest and Maestro match.\n * On Android it maps to the item's view tag, which Espresso-based drivers like Detox read\n * but Maestro and Appium do not. Use `accessibilityLabel` to match the tab by id there.\n *\n * @platform android\n * @platform iOS\n */\n testID?: string;\n /**\n * The accessibility label of the tab bar item, announced by screen readers.\n * Defaults to the visible tab label.\n *\n * On Android, maps to the item's `contentDescription` and requires API 26 or above.\n *\n * @platform android\n * @platform iOS\n */\n accessibilityLabel?: string;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The color of the ripple effect when this tab is selected - will be visible when other tabs are pressed.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the active indicator for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform android\n */\n indicatorColor?: ColorValue;\n /**\n * When set to `true`, disables the active indicator for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @default false\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The visibility mode of the tab item label for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * Listeners for navigation events on this tab.\n *\n * Supported events:\n * - `tabPress` - called when this tab is pressed\n * - `focus` - called when this screen comes into focus\n * - `blur` - called when this screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs.Trigger\n * name=\"home\"\n * listeners={{\n * tabPress: (e) => {\n * console.log('Home tab pressed');\n * },\n * }}\n * />\n * ```\n */\n listeners?: ScreenProps<\n any,\n TabNavigationState<ParamListBase>,\n NativeTabNavigationEventMap\n >['listeners'];\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAmRa,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AAyPE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AA2MX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsHostProps, TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type {\n DefaultRouterOptions,\n ParamListBase,\n RouteProp,\n ScreenListeners,\n TabNavigationState,\n} from '../react-navigation/native';\nimport type { ScreenProps } from '../useScreens';\nimport type { ErrorBoundaryProps } from '../views/Try';\n\n/**\n * Event map for `NativeTabs` navigation events.\n * Only `tabPress` is currently supported.\n */\nexport type NativeTabNavigationEventMap = {\n tabPress: {\n data: {\n __internalTabsType: 'native';\n /**\n * `true` when the native side prevented the selection because the target\n * tab is `disabled`. The event is still emitted so listeners are notified,\n * but no navigation occurs.\n */\n isPrevented: boolean;\n };\n canPreventDefault: false;\n };\n};\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, 'screenKey'>>;\n\n/**\n * Props passed to the underlying tab host implementation in `react-native-screens`.\n */\nexport type NativeTabsHostNativeProps = Partial<\n Omit<TabsHostProps, 'navStateRequest' | 'onTabSelected' | 'children'>\n>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n /**\n * @platform android\n * @platform iOS\n */\n icon?: SymbolOrImageSource;\n /**\n * @platform android\n * @platform iOS\n */\n selectedIcon?: SymbolOrImageSource;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n title?: string;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n badgeValue?: string;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n selectedLabelStyle?: NativeTabsLabelStyle;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * @platform iOS\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * @platform android\n * @platform iOS\n */\n selectedIconColor?: ColorValue;\n /**\n * @platform iOS\n */\n selectedBadgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n backgroundColor?: ColorValue;\n /**\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @platform android\n * @platform iOS\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n */\n tintColor?: ColorValue;\n /**\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * @platform iOS\n */\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * @platform android\n * @platform iOS\n * @platform web\n */\n hidden?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n disabled?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n tabBarItemTestID?: string;\n /**\n * @platform android\n * @platform iOS\n */\n tabBarItemAccessibilityLabel?: string;\n /**\n * @platform iOS\n */\n specialEffects?: TabsScreenProps['specialEffects'];\n /**\n * @platform android\n * @platform iOS\n */\n nativeProps?: NativeScreenProps;\n /**\n * @platform android\n * @platform iOS\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * @platform android\n * @platform iOS\n */\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\n/**\n * How an image-based icon is tinted on iOS: `template` lets the tab bar recolor the icon,\n * `original` keeps the image's own colors. SF Symbols are always tinted by the system.\n * @platform ios\n */\nexport type IconRenderingMode = 'template' | 'original';\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the iOS asset catalog image to use as an icon.\n * @platform iOS\n */\n xcasset?: string;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: IconRenderingMode;\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n /** A component to render when an individual tab screen throws an error. */\n unstable_screenErrorBoundary?: React.ComponentType<ErrorBoundaryProps>;\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * When `true`, the tab bar lifts above the keyboard (input method editor, or IME) instead of being overlaid by it. By default, the keyboard overlays the tab bar.\n *\n * Requires `windowSoftInputMode=\"adjustResize\"`. Has no effect on Android API levels earlier than 30 (Android 11).\n *\n * @default false\n * @platform android\n */\n tabBarRespectsIMEInsets?: boolean;\n // #endregion android props\n /**\n * Listeners for navigation events on all tabs.\n *\n * Supported events:\n * - `tabPress` - called when a tab is pressed\n * - `focus` - called when the screen comes into focus\n * - `blur` - called when the screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs\n * screenListeners={{\n * tabPress: (e) => {\n * console.log('Any tab pressed');\n * },\n * }}\n * >\n * ...\n * </NativeTabs>\n * ```\n */\n screenListeners?:\n | ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>);\n /**\n * Props passed to the underlying native tab host implementation in `react-native-screens`.\n * Use this to configure props that are not directly exposed by Expo Router.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform ios\n */\n unstable_nativeProps?: NativeTabsHostNativeProps;\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface OnTabChangeEventPayload {\n /**\n * The route key of the tab the native side has just selected.\n */\n selectedKey: string;\n /**\n * The provenance value reported by the native side for this selection.\n *\n * The navigator echoes this back via `navStateRequest.baseProvenance` on\n * subsequent JS-driven updates so the native side can distinguish stale\n * updates from fresh ones. See `TabsHostNavStateRequest` in\n * `react-native-screens` for the full contract.\n */\n provenance: number;\n // TODO(@ubax): consider renaming this field\n isNativeAction: boolean;\n /**\n * Whether the native side prevented this selection because the target tab is\n * `disabled`. When `true`, the navigator emits `tabPress` but skips navigation.\n *\n * @default false\n */\n isPrevented?: boolean;\n}\n\nexport interface NativeTabsViewProps extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n | 'rippleColor'\n | 'disableIndicator'\n | 'labelVisibilityMode'\n> {\n focusedIndex: number;\n /**\n * Provenance counter associated with the currently rendered `focusedIndex`.\n */\n provenance: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (event: OnTabChangeEventPayload) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n *\n * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * If `true`, the tab is shown but cannot be selected by tapping it in the\n * tab bar.\n *\n * > **Note:** This only suppresses the native tap interaction. JavaScript\n * > navigation such as `router.push()` or `<Link />` still navigates to\n * > the tab. Use this for tabs that should appear visible but be temporarily inert,\n * > and gate navigation in your own code if you need to fully prevent access.\n *\n * Unlike `hidden`, the tab remains visible in the tab bar.\n *\n * @default false\n *\n * @platform android\n * @platform ios\n */\n disabled?: boolean;\n /**\n * A test identifier for the tab bar item.\n *\n * On iOS it maps to the item's accessibility identifier, which XCUITest and Maestro match.\n * On Android it maps to the item's view tag, which Espresso-based drivers like Detox read\n * but Maestro and Appium do not. Use `accessibilityLabel` to match the tab by id there.\n *\n * @platform android\n * @platform iOS\n */\n testID?: string;\n /**\n * The accessibility label of the tab bar item, announced by screen readers.\n * Defaults to the visible tab label.\n *\n * On Android, maps to the item's `contentDescription` and requires API 26 or above.\n *\n * @platform android\n * @platform iOS\n */\n accessibilityLabel?: string;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The color of the ripple effect when this tab is selected - will be visible when other tabs are pressed.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the active indicator for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform android\n */\n indicatorColor?: ColorValue;\n /**\n * When set to `true`, disables the active indicator for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @default false\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The visibility mode of the tab item label for this tab.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * Listeners for navigation events on this tab.\n *\n * Supported events:\n * - `tabPress` - called when this tab is pressed\n * - `focus` - called when this screen comes into focus\n * - `blur` - called when this screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs.Trigger\n * name=\"home\"\n * listeners={{\n * tabPress: (e) => {\n * console.log('Home tab pressed');\n * },\n * }}\n * />\n * ```\n */\n listeners?: ScreenProps<\n any,\n TabNavigationState<ParamListBase>,\n NativeTabNavigationEventMap\n >['listeners'];\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ColorValue, ImageSourcePropType } from 'react-native';
|
|
2
2
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
3
|
-
import type { NativeTabOptions, NativeTabsProps } from '../types';
|
|
3
|
+
import type { IconRenderingMode, NativeTabOptions, NativeTabsProps } from '../types';
|
|
4
4
|
export declare function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {
|
|
5
5
|
default?: ColorValue;
|
|
6
6
|
selected?: ColorValue;
|
|
@@ -11,7 +11,7 @@ export type AwaitedIcon = {
|
|
|
11
11
|
drawable?: string;
|
|
12
12
|
} | {
|
|
13
13
|
src?: ImageSourcePropType;
|
|
14
|
-
renderingMode?:
|
|
14
|
+
renderingMode?: IconRenderingMode;
|
|
15
15
|
};
|
|
16
16
|
export declare function useAwaitedScreensIcon(icon: NativeTabOptions['icon']): {
|
|
17
17
|
sf?: SFSymbol;
|
|
@@ -19,10 +19,10 @@ export declare function useAwaitedScreensIcon(icon: NativeTabOptions['icon']): {
|
|
|
19
19
|
drawable?: string;
|
|
20
20
|
} | {
|
|
21
21
|
src?: ImageSourcePropType;
|
|
22
|
-
renderingMode?:
|
|
22
|
+
renderingMode?: IconRenderingMode;
|
|
23
23
|
} | undefined;
|
|
24
|
-
export declare function convertComponentSrcToImageSource(src: React.ReactElement, renderingMode?:
|
|
24
|
+
export declare function convertComponentSrcToImageSource(src: React.ReactElement, renderingMode?: IconRenderingMode): {
|
|
25
25
|
src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;
|
|
26
|
-
renderingMode?:
|
|
26
|
+
renderingMode?: IconRenderingMode;
|
|
27
27
|
} | undefined;
|
|
28
28
|
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAEhB,MAAM,UAAU,CAAC;AAElB,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB,CAUA;AAED,MAAM,MAAM,WAAW,GACnB;IACE,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC,CAAC;AAEN,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;;;UAJxD,mBAAmB;oBACT,iBAAiB;cAgCtC;AAMD,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,KAAK,CAAC,YAAY,EACvB,aAAa,CAAC,EAAE,iBAAiB;;;cAgBlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":";;AAaA,oEAaC;AAaD,sDA6BC;AAMD,4EAkBC;AA5FD,iCAAqD;AAIrD,mDAAqD;AACrD,iDAA+F;AAQ/F,SAAgB,4BAA4B,CAAC,SAAuC;IAIlF,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,SAAS,IAAI,SAAS,IAAI,UAAU,IAAI,SAAS,CAAC,EAAE,CAAC;YACzF,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO;YACL,OAAO,EAAE,SAAuB;SACjC,CAAC;IACJ,CAAC;IAC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WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,aAAa,CAAC,IAA8B;IACnD,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC;AAClE,CAAC;AAED,SAAgB,gCAAgC,CAC9C,GAAuB,EACvB,aAAiC;IAEjC,IAAI,MAAuC,CAAC;IAC5C,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,sCAA2B,CAAC,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,MAAM,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACzE,CAAC;SAAM,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,uCAA4B,CAAC,EAAE,CAAC;QAC5D,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;QAC5E,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,aAAa,EAAE,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport type { ColorValue, ImageSourcePropType } from 'react-native';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { isChildOfType } from '../../utils/children';\nimport { NativeTabsTriggerPromiseIcon, NativeTabsTriggerVectorIcon } from '../common/elements';\nimport type {\n IconRenderingMode,\n NativeTabOptions,\n NativeTabsProps,\n SymbolOrImageSource,\n} from '../types';\n\nexport function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {\n default?: ColorValue;\n selected?: ColorValue;\n} {\n if (iconColor) {\n if (typeof iconColor === 'object' && ('default' in iconColor || 'selected' in iconColor)) {\n return iconColor;\n }\n return {\n default: iconColor as ColorValue,\n };\n }\n return {};\n}\n\nexport type AwaitedIcon =\n | {\n sf?: SFSymbol;\n xcasset?: string;\n drawable?: string;\n }\n | {\n src?: ImageSourcePropType;\n renderingMode?: IconRenderingMode;\n };\n\nexport function useAwaitedScreensIcon(icon: NativeTabOptions['icon']) {\n const src = icon && typeof icon === 'object' && 'src' in icon ? icon.src : undefined;\n const renderingMode =\n icon && typeof icon === 'object' && 'renderingMode' in icon ? icon.renderingMode : undefined;\n const [awaitedIcon, setAwaitedIcon] = useState<AwaitedIcon | undefined>(undefined);\n\n useEffect(() => {\n const loadIcon = async () => {\n if (src && src instanceof Promise) {\n const awaitedSrc = await src;\n if (awaitedSrc) {\n setAwaitedIcon({ src: awaitedSrc });\n }\n }\n };\n loadIcon();\n // Checking `src` rather then icon here, to avoid unnecessary re-renders\n // The icon object can be recreated, while src should stay the same\n // In this case as we control `VectorIcon`, it will only change if `family` or `name` props change\n // So we should be safe with promise resolving\n }, [src]);\n\n return useMemo(() => {\n const resolved = isAwaitedIcon(icon) ? icon : awaitedIcon;\n if (resolved && renderingMode && 'src' in resolved) {\n return { ...resolved, renderingMode };\n }\n return resolved;\n }, [awaitedIcon, icon, renderingMode]);\n}\n\nfunction isAwaitedIcon(icon: NativeTabOptions['icon']): icon is AwaitedIcon {\n return !icon || !('src' in icon && icon.src instanceof Promise);\n}\n\nexport function convertComponentSrcToImageSource(\n src: React.ReactElement,\n renderingMode?: IconRenderingMode\n) {\n let result: SymbolOrImageSource | undefined;\n if (isChildOfType(src, NativeTabsTriggerVectorIcon)) {\n const props = src.props;\n result = { src: props.family.getImageSource(props.name, 24, 'white') };\n } else if (isChildOfType(src, NativeTabsTriggerPromiseIcon)) {\n result = { src: src.props.loader() };\n } else {\n console.warn('Only VectorIcon is supported as a React element in Icon.src');\n return undefined;\n }\n if (renderingMode) {\n result = { ...result, renderingMode };\n }\n return result;\n}\n"]}
|
|
@@ -7,7 +7,8 @@ import type { ColorValue } from 'react-native';
|
|
|
7
7
|
import type { PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';
|
|
8
8
|
import type { AwaitedIcon } from './icon';
|
|
9
9
|
import type { NativeTabsTriggerIconProps } from '../common/elements';
|
|
10
|
-
import type { NativeTabOptions } from '../types';
|
|
10
|
+
import type { IconRenderingMode, NativeTabOptions } from '../types';
|
|
11
11
|
export declare function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps): void;
|
|
12
|
-
export declare function convertOptionsIconToScreensPropsIcon(_icon: AwaitedIcon | undefined,
|
|
12
|
+
export declare function convertOptionsIconToScreensPropsIcon(_icon: AwaitedIcon | undefined, _renderingMode?: IconRenderingMode): PlatformIconIOS | PlatformIconAndroid | undefined;
|
|
13
|
+
export declare function resolveIconRenderingMode(_icon: AwaitedIcon | undefined, _iconColor?: ColorValue): IconRenderingMode | undefined;
|
|
13
14
|
//# sourceMappingURL=optionsIconConverter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,0BAA0B,QAK7F;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,cAAc,CAAC,EAAE,iBAAiB,GACjC,eAAe,GAAG,mBAAmB,GAAG,SAAS,CAEnD;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,UAAU,CAAC,EAAE,UAAU,GACtB,iBAAiB,GAAG,SAAS,CAE/B"}
|
|
@@ -2,7 +2,8 @@ import type { ColorValue } from 'react-native';
|
|
|
2
2
|
import type { PlatformIconIOS } from 'react-native-screens';
|
|
3
3
|
import type { AwaitedIcon } from './icon';
|
|
4
4
|
import type { NativeTabsTriggerIconProps } from '../common/elements';
|
|
5
|
-
import type { NativeTabOptions } from '../types';
|
|
5
|
+
import type { IconRenderingMode, NativeTabOptions } from '../types';
|
|
6
6
|
export declare function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps): void;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function resolveIconRenderingMode(icon: AwaitedIcon | undefined, iconColor?: ColorValue): IconRenderingMode | undefined;
|
|
8
|
+
export declare function convertOptionsIconToScreensPropsIcon(icon: AwaitedIcon | undefined, renderingMode?: IconRenderingMode): PlatformIconIOS | undefined;
|
|
8
9
|
//# sourceMappingURL=optionsIconConverter.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.ios.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.ios.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,0BAA0B,QAmC7F;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,SAAS,CAAC,EAAE,UAAU,GACrB,iBAAiB,GAAG,SAAS,CAM/B;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,aAAa,CAAC,EAAE,iBAAiB,GAChC,eAAe,GAAG,SAAS,CAgB7B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.appendIconOptions = appendIconOptions;
|
|
4
|
+
exports.resolveIconRenderingMode = resolveIconRenderingMode;
|
|
4
5
|
exports.convertOptionsIconToScreensPropsIcon = convertOptionsIconToScreensPropsIcon;
|
|
5
6
|
const optionsIconConverter_shared_1 = require("./optionsIconConverter.shared");
|
|
6
7
|
function appendIconOptions(options, props) {
|
|
@@ -43,23 +44,39 @@ function appendIconOptions(options, props) {
|
|
|
43
44
|
}
|
|
44
45
|
(0, optionsIconConverter_shared_1.applySelectedColor)(options, props.selectedColor);
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function resolveIconRenderingMode(icon, iconColor) {
|
|
48
|
+
if (!getIconImageSource(icon)) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
const renderingMode = icon && 'renderingMode' in icon ? icon.renderingMode : undefined;
|
|
52
|
+
return renderingMode ?? (iconColor !== undefined ? 'template' : 'original');
|
|
53
|
+
}
|
|
54
|
+
function convertOptionsIconToScreensPropsIcon(icon, renderingMode) {
|
|
47
55
|
if (icon && 'sf' in icon && icon.sf) {
|
|
48
56
|
return {
|
|
49
57
|
type: 'sfSymbol',
|
|
50
58
|
name: icon.sf,
|
|
51
59
|
};
|
|
52
60
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const imageSource = getIconImageSource(icon);
|
|
62
|
+
if (!imageSource) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
const effectiveRenderingMode = renderingMode ?? resolveIconRenderingMode(icon);
|
|
66
|
+
if (effectiveRenderingMode === 'original') {
|
|
67
|
+
return { type: 'imageSource', imageSource };
|
|
68
|
+
}
|
|
69
|
+
return { type: 'templateSource', templateSource: imageSource };
|
|
70
|
+
}
|
|
71
|
+
function getIconImageSource(icon) {
|
|
72
|
+
if (!icon || ('sf' in icon && icon.sf)) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
if ('xcasset' in icon && icon.xcasset) {
|
|
76
|
+
return { uri: icon.xcasset };
|
|
77
|
+
}
|
|
78
|
+
if ('src' in icon && icon.src) {
|
|
79
|
+
return icon.src;
|
|
63
80
|
}
|
|
64
81
|
return undefined;
|
|
65
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.ios.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ios.ts"],"names":[],"mappings":";;AAQA,8CAmCC;AAED,
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.ios.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ios.ts"],"names":[],"mappings":";;AAQA,8CAmCC;AAED,4DASC;AAED,oFAmBC;AAvED,+EAAwF;AAIxF,SAAgB,iBAAiB,CAAC,OAAyB,EAAE,KAAiC;IAC5F,IAAI,IAAI,IAAI,KAAK,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC;QAC9B,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE;gBACrB,CAAC,CAAC;oBACE,EAAE,EAAE,KAAK,CAAC,EAAE;iBACb;gBACH,CAAC,CAAC,SAAS,CAAC;YACd,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;QACnC,CAAC;aAAM,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO;gBAC7B,CAAC,CAAC;oBACE,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO;iBACrB;gBACH,CAAC,CAAC,SAAS,CAAC;YACd,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,QAAQ;gBACtC,CAAC,CAAC;o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IconIOS } from 'react-native-screens';\n\nimport type { AwaitedIcon } from './icon';\nimport { applyIconSrcOptions, applySelectedColor } from './optionsIconConverter.shared';\nimport type { NativeTabsTriggerIconProps } from '../common/elements';\nimport type { IconRenderingMode, NativeTabOptions } from '../types';\n\nexport function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps) {\n if ('sf' in props && props.sf) {\n if (typeof props.sf === 'string') {\n options.icon = props.sf\n ? {\n sf: props.sf,\n }\n : undefined;\n options.selectedIcon = undefined;\n } else if (props.sf) {\n options.icon = props.sf.default\n ? {\n sf: props.sf.default,\n }\n : undefined;\n options.selectedIcon = props.sf.selected\n ? {\n sf: props.sf.selected,\n }\n : undefined;\n }\n } else if ('xcasset' in props && props.xcasset) {\n if (typeof props.xcasset === 'string') {\n options.icon = { xcasset: props.xcasset };\n options.selectedIcon = undefined;\n } else {\n options.icon = props.xcasset.default ? { xcasset: props.xcasset.default } : undefined;\n options.selectedIcon = props.xcasset.selected\n ? { xcasset: props.xcasset.selected }\n : undefined;\n }\n } else if ('src' in props && props.src) {\n applyIconSrcOptions(options, props);\n }\n applySelectedColor(options, props.selectedColor);\n}\n\nexport function resolveIconRenderingMode(\n icon: AwaitedIcon | undefined,\n iconColor?: ColorValue\n): IconRenderingMode | undefined {\n if (!getIconImageSource(icon)) {\n return undefined;\n }\n const renderingMode = icon && 'renderingMode' in icon ? icon.renderingMode : undefined;\n return renderingMode ?? (iconColor !== undefined ? 'template' : 'original');\n}\n\nexport function convertOptionsIconToScreensPropsIcon(\n icon: AwaitedIcon | undefined,\n renderingMode?: IconRenderingMode\n): PlatformIconIOS | undefined {\n if (icon && 'sf' in icon && icon.sf) {\n return {\n type: 'sfSymbol',\n name: icon.sf,\n };\n }\n const imageSource = getIconImageSource(icon);\n if (!imageSource) {\n return undefined;\n }\n const effectiveRenderingMode = renderingMode ?? resolveIconRenderingMode(icon);\n if (effectiveRenderingMode === 'original') {\n return { type: 'imageSource', imageSource };\n }\n return { type: 'templateSource', templateSource: imageSource };\n}\n\nfunction getIconImageSource(icon: AwaitedIcon | undefined): ImageSourcePropType | undefined {\n if (!icon || ('sf' in icon && icon.sf)) {\n return undefined;\n }\n if ('xcasset' in icon && icon.xcasset) {\n return { uri: icon.xcasset };\n }\n if ('src' in icon && icon.src) {\n return icon.src;\n }\n return undefined;\n}\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.appendIconOptions = appendIconOptions;
|
|
4
4
|
exports.convertOptionsIconToScreensPropsIcon = convertOptionsIconToScreensPropsIcon;
|
|
5
|
+
exports.resolveIconRenderingMode = resolveIconRenderingMode;
|
|
5
6
|
const optionsIconConverter_shared_1 = require("./optionsIconConverter.shared");
|
|
6
7
|
function appendIconOptions(options, props) {
|
|
7
8
|
if ('src' in props && props.src) {
|
|
@@ -9,7 +10,10 @@ function appendIconOptions(options, props) {
|
|
|
9
10
|
}
|
|
10
11
|
(0, optionsIconConverter_shared_1.applySelectedColor)(options, props.selectedColor);
|
|
11
12
|
}
|
|
12
|
-
function convertOptionsIconToScreensPropsIcon(_icon,
|
|
13
|
+
function convertOptionsIconToScreensPropsIcon(_icon, _renderingMode) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
function resolveIconRenderingMode(_icon, _iconColor) {
|
|
13
17
|
return undefined;
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=optionsIconConverter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ts"],"names":[],"mappings":";;AAaA,8CAKC;AAED,oFAKC;
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.ts"],"names":[],"mappings":";;AAaA,8CAKC;AAED,oFAKC;AAED,4DAKC;AAvBD,+EAAwF;AAIxF,SAAgB,iBAAiB,CAAC,OAAyB,EAAE,KAAiC;IAC5F,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;QAChC,IAAA,iDAAmB,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,IAAA,gDAAkB,EAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,oCAAoC,CAClD,KAA8B,EAC9B,cAAkC;IAElC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,wBAAwB,CACtC,KAA8B,EAC9B,UAAuB;IAEvB,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/**\n * TypeScript / non-native fallback. The real per-platform implementations live\n * in `optionsIconConverter.ios.ts` and `optionsIconConverter.android.ts`, which\n * Metro resolves at runtime via platform extensions.\n */\nimport type { ColorValue } from 'react-native';\nimport type { PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';\n\nimport type { AwaitedIcon } from './icon';\nimport { applyIconSrcOptions, applySelectedColor } from './optionsIconConverter.shared';\nimport type { NativeTabsTriggerIconProps } from '../common/elements';\nimport type { IconRenderingMode, NativeTabOptions } from '../types';\n\nexport function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps) {\n if ('src' in props && props.src) {\n applyIconSrcOptions(options, props);\n }\n applySelectedColor(options, props.selectedColor);\n}\n\nexport function convertOptionsIconToScreensPropsIcon(\n _icon: AwaitedIcon | undefined,\n _renderingMode?: IconRenderingMode\n): PlatformIconIOS | PlatformIconAndroid | undefined {\n return undefined;\n}\n\nexport function resolveIconRenderingMode(\n _icon: AwaitedIcon | undefined,\n _iconColor?: ColorValue\n): IconRenderingMode | undefined {\n return undefined;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.shared.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.shared.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.shared.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.shared.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAqB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,QAI5E;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,EACzB,aAAa,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,QAKrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsIconConverter.shared.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.shared.ts"],"names":[],"mappings":";;AAOA,kDAIC;AAED,gDAOC;AApBD,iCAA0D;AAG1D,iCAA0D;AAI1D,SAAgB,mBAAmB,CAAC,OAAyB,EAAE,KAAc;IAC3E,MAAM,IAAI,GAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;IAC1B,OAAO,CAAC,YAAY,GAAG,IAAI,EAAE,YAAY,CAAC;AAC5C,CAAC;AAED,SAAgB,kBAAkB,CAChC,OAAyB,EACzB,aAAoD;IAEpD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CAAC,iBAAiB,GAAG,aAAa,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,0BAA0B,CACjC,IAAyB;IAEzB,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACrB,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAC7B,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,UAAU,IAAI,IAAI,CAAC,GAAG;YACpD,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;YAChE,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;QAEhC,MAAM,OAAO,GAAoD,EAAE,CAAC;QACpE,OAAO,CAAC,IAAI,GAAG,0BAA0B,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC9F,OAAO,CAAC,YAAY,GAAG,0BAA0B,CAAC,QAAQ,EAAE;YAC1D,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,0BAA0B,CACjC,GAAmD,EACnD,OAEC;IAED,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,IAAA,sBAAc,EAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,IAAA,uCAAgC,EAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { isValidElement, type ReactElement } from 'react';\nimport type { ImageSourcePropType } from 'react-native';\n\nimport { convertComponentSrcToImageSource } from './icon';\nimport type { SrcIcon } from '../common/elements';\nimport type { NativeTabOptions } from '../types';\n\nexport function applyIconSrcOptions(options: NativeTabOptions, props: SrcIcon) {\n const icon = convertIconSrcToIconOption(props);\n options.icon = icon?.icon;\n options.selectedIcon = icon?.selectedIcon;\n}\n\nexport function applySelectedColor(\n options: NativeTabOptions,\n selectedColor: NativeTabOptions['selectedIconColor']\n) {\n if (selectedColor) {\n options.selectedIconColor = selectedColor;\n }\n}\n\nfunction convertIconSrcToIconOption(\n icon: SrcIcon | undefined\n): Pick<NativeTabOptions, 'icon' | 'selectedIcon'> | undefined {\n if (icon && icon.src) {\n const { defaultIcon, selected } =\n typeof icon.src === 'object' && 'selected' in icon.src\n ? { defaultIcon: icon.src.default, selected: icon.src.selected }\n : { defaultIcon: icon.src };\n\n const options: Pick<NativeTabOptions, 'icon' | 'selectedIcon'> = {};\n options.icon = convertSrcOrComponentToSrc(defaultIcon, { renderingMode: icon.renderingMode });\n options.selectedIcon = convertSrcOrComponentToSrc(selected, {\n renderingMode: icon.renderingMode,\n });\n return options;\n }\n\n return undefined;\n}\n\nfunction convertSrcOrComponentToSrc(\n src: ImageSourcePropType | ReactElement | undefined,\n options: {\n renderingMode:
|
|
1
|
+
{"version":3,"file":"optionsIconConverter.shared.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/optionsIconConverter.shared.ts"],"names":[],"mappings":";;AAOA,kDAIC;AAED,gDAOC;AApBD,iCAA0D;AAG1D,iCAA0D;AAI1D,SAAgB,mBAAmB,CAAC,OAAyB,EAAE,KAAc;IAC3E,MAAM,IAAI,GAAG,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;IAC1B,OAAO,CAAC,YAAY,GAAG,IAAI,EAAE,YAAY,CAAC;AAC5C,CAAC;AAED,SAAgB,kBAAkB,CAChC,OAAyB,EACzB,aAAoD;IAEpD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CAAC,iBAAiB,GAAG,aAAa,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,0BAA0B,CACjC,IAAyB;IAEzB,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACrB,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAC7B,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,UAAU,IAAI,IAAI,CAAC,GAAG;YACpD,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;YAChE,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;QAEhC,MAAM,OAAO,GAAoD,EAAE,CAAC;QACpE,OAAO,CAAC,IAAI,GAAG,0BAA0B,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC9F,OAAO,CAAC,YAAY,GAAG,0BAA0B,CAAC,QAAQ,EAAE;YAC1D,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,0BAA0B,CACjC,GAAmD,EACnD,OAEC;IAED,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,IAAA,sBAAc,EAAC,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,IAAA,uCAAgC,EAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { isValidElement, type ReactElement } from 'react';\nimport type { ImageSourcePropType } from 'react-native';\n\nimport { convertComponentSrcToImageSource } from './icon';\nimport type { SrcIcon } from '../common/elements';\nimport type { IconRenderingMode, NativeTabOptions } from '../types';\n\nexport function applyIconSrcOptions(options: NativeTabOptions, props: SrcIcon) {\n const icon = convertIconSrcToIconOption(props);\n options.icon = icon?.icon;\n options.selectedIcon = icon?.selectedIcon;\n}\n\nexport function applySelectedColor(\n options: NativeTabOptions,\n selectedColor: NativeTabOptions['selectedIconColor']\n) {\n if (selectedColor) {\n options.selectedIconColor = selectedColor;\n }\n}\n\nfunction convertIconSrcToIconOption(\n icon: SrcIcon | undefined\n): Pick<NativeTabOptions, 'icon' | 'selectedIcon'> | undefined {\n if (icon && icon.src) {\n const { defaultIcon, selected } =\n typeof icon.src === 'object' && 'selected' in icon.src\n ? { defaultIcon: icon.src.default, selected: icon.src.selected }\n : { defaultIcon: icon.src };\n\n const options: Pick<NativeTabOptions, 'icon' | 'selectedIcon'> = {};\n options.icon = convertSrcOrComponentToSrc(defaultIcon, { renderingMode: icon.renderingMode });\n options.selectedIcon = convertSrcOrComponentToSrc(selected, {\n renderingMode: icon.renderingMode,\n });\n return options;\n }\n\n return undefined;\n}\n\nfunction convertSrcOrComponentToSrc(\n src: ImageSourcePropType | ReactElement | undefined,\n options: {\n renderingMode: IconRenderingMode | undefined;\n }\n) {\n if (src) {\n if (isValidElement(src)) {\n return convertComponentSrcToImageSource(src, options.renderingMode);\n } else {\n return { src, renderingMode: options.renderingMode };\n }\n }\n return undefined;\n}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.router",
|
|
5
5
|
"module": "expo.modules.router",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.22",
|
|
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-57.0.
|
|
28
|
-
"url": "expo.modules.router-57.0.
|
|
27
|
+
"name": "expo.modules.router-57.0.22.aar",
|
|
28
|
+
"url": "expo.modules.router-57.0.22.aar",
|
|
29
29
|
"size": 15835,
|
|
30
30
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
31
31
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
],
|
|
75
75
|
"files": [
|
|
76
76
|
{
|
|
77
|
-
"name": "expo.modules.router-57.0.
|
|
78
|
-
"url": "expo.modules.router-57.0.
|
|
77
|
+
"name": "expo.modules.router-57.0.22.aar",
|
|
78
|
+
"url": "expo.modules.router-57.0.22.aar",
|
|
79
79
|
"size": 15835,
|
|
80
80
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
81
81
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
},
|
|
95
95
|
"files": [
|
|
96
96
|
{
|
|
97
|
-
"name": "expo.modules.router-57.0.
|
|
98
|
-
"url": "expo.modules.router-57.0.
|
|
97
|
+
"name": "expo.modules.router-57.0.22-sources.jar",
|
|
98
|
+
"url": "expo.modules.router-57.0.22-sources.jar",
|
|
99
99
|
"size": 2326,
|
|
100
100
|
"sha512": "a1a1537b57bc0d66efbf2bdfd5f514684400b9598e549eaf53c528d1bf32ff42b7826e74fb6e115f8ec0490b9e06ffbb3c3efe9f2f703652c13291ef82b0fa03",
|
|
101
101
|
"sha256": "2add0f802e663eb9b5f90e086dca0e0e337a1442e15fb372a05945e01ee0d289",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
13212569b802c9fad6eac29c263ee985
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
107bc893f4cf5dd68a24a2c170e99d9d87a4af1f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d1e9e55807590020be4af7e5662119004e5868b33c419d5cecd908a8d5c4f9f4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6390689e889079e88032f6f91c53bfe4d30ef9512cf66073670dba83ed51e845a49a58cc93f1c0e72abbe717d21827d7ae386c4dad91c0f646a8d61e7848ac71
|
|
@@ -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>57.0.
|
|
12
|
+
<version>57.0.22</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
|
+
95f2b7412d52b993474596576472df33
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
243d16447dfd8186d0c16e4f16c924dafe61e8c7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
50dbd5015b745ffc788c312ba8168679da66c6d2c13f7b7c6b0e6aef3c44d84c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0c233209b015630af638d1a6bc4ad0f4852bb79a3fdcb10809add9907353816b9d27b0dc254534f85b59159f1bd56f62bf956c25bb471ddab8c2f994e2df8794
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.22</latest>
|
|
7
|
+
<release>57.0.22</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.22</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260918080053</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
382df264d88b9019d2754050f461a132
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2e49dad1defa69b17e51f6c9211d868baa5025e1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
10a686e8008037853eaaf7815869d80c5624ae193639af5023712670c63f75f6
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6ea2708a0d2864569d4542b96ba8e92905c73723eabb5c9073de1427a9143b8b287e9a77f21fea6273710af7f19cd0a01aa816a9e1a44ef852fe7cd719e01c0e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.22",
|
|
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",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
],
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@expo/log-box": "^57.0.4",
|
|
84
|
-
"@expo/metro-runtime": "^57.0.
|
|
84
|
+
"@expo/metro-runtime": "^57.0.16",
|
|
85
85
|
"@testing-library/react-native": ">= 13.2.0",
|
|
86
86
|
"expo": "*",
|
|
87
|
-
"expo-constants": "^57.0.
|
|
88
|
-
"expo-linking": "^57.0.
|
|
87
|
+
"expo-constants": "^57.0.19",
|
|
88
|
+
"expo-linking": "^57.0.10",
|
|
89
89
|
"react": "*",
|
|
90
90
|
"react-dom": "*",
|
|
91
91
|
"react-native": "*",
|
|
@@ -140,13 +140,13 @@
|
|
|
140
140
|
"react-native-web": "~0.21.0",
|
|
141
141
|
"react-server-dom-webpack": "~19.0.6",
|
|
142
142
|
"tsd": "^0.33.0",
|
|
143
|
-
"expo": "57.0.
|
|
143
|
+
"expo": "57.0.24"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"@expo/log-box": "^57.0.4",
|
|
147
|
-
"@expo/metro-runtime": "^57.0.
|
|
147
|
+
"@expo/metro-runtime": "^57.0.16",
|
|
148
148
|
"@expo/schema-utils": "^57.0.2",
|
|
149
|
-
"@expo/ui": "^57.0.
|
|
149
|
+
"@expo/ui": "^57.0.19",
|
|
150
150
|
"@radix-ui/react-slot": "^1.2.0",
|
|
151
151
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
152
152
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
@@ -154,12 +154,12 @@
|
|
|
154
154
|
"color": "^4.2.3",
|
|
155
155
|
"debug": "^4.3.4",
|
|
156
156
|
"escape-string-regexp": "^4.0.0",
|
|
157
|
-
"expo-glass-effect": "^57.0.
|
|
157
|
+
"expo-glass-effect": "^57.0.3",
|
|
158
158
|
"expo-server": "^57.0.3",
|
|
159
|
-
"expo-symbols": "^57.0.
|
|
159
|
+
"expo-symbols": "^57.0.3",
|
|
160
160
|
"fast-deep-equal": "^3.1.3",
|
|
161
161
|
"invariant": "^2.2.4",
|
|
162
|
-
"nanoid": "^3.3.
|
|
162
|
+
"nanoid": "^3.3.18",
|
|
163
163
|
"query-string": "^7.1.3",
|
|
164
164
|
"react-fast-compare": "^3.2.2",
|
|
165
165
|
"react-is": "^19.1.0",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"standard-navigation": "^0.0.5",
|
|
172
172
|
"vaul": "^1.1.2"
|
|
173
173
|
},
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "7687b07947a5c866adeb11abbceae72403ccb188",
|
|
175
175
|
"scripts": {
|
|
176
176
|
"build": "node ./scripts/build.js",
|
|
177
177
|
"clean": "expo-module clean",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a6cb09d93c8ca93d0b63aaa49b570baf
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
886baa95c0dcb45f4f24eb40f9137a70188fea02
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9bff6ed8eea296a1843fe642a10fd89c700944f2887607ced248b70a6e3e0942
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
14ece7d2ec64f9a6c83e5ff1de2064604aad5fb46dd9100945bbc85434fefda441c35c1be67a82341c8f9536b5d3722599e48638d65d837fcc9589b75bcc303b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
db77b65b640cd74922b0bff4f14ab761
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4e7668387c583400364dc8c6ca12b881209397cc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
345671bfe9c9440c82cd81bc9b545a279dddee75c79c079300972c4750a564fe
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
26d3798c7067b7e38f55f902e3d8831d3d9e02cea2041a25bf53a16ed7dd95450c6425fff9a5530a24063444d6dbecb7aaefd60f7068263f45738840fab19c77
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|