expo-router 7.0.0-canary-20251206-615dec1 → 7.0.0-canary-20251210-1f163e3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -2
- package/build/ExpoRoot.d.ts.map +1 -1
- package/build/ExpoRoot.js +2 -1
- package/build/ExpoRoot.js.map +1 -1
- package/build/color/android.dynamic.types.d.ts +3 -3
- package/build/color/android.dynamic.types.js.map +1 -1
- package/build/color/android.material.types.d.ts +3 -3
- package/build/color/android.material.types.js.map +1 -1
- package/build/fork/getPathFromState.d.ts.map +1 -1
- package/build/fork/getPathFromState.js +2 -1
- package/build/fork/getPathFromState.js.map +1 -1
- package/build/fork/getStateFromPath-forks.d.ts.map +1 -1
- package/build/fork/getStateFromPath-forks.js +3 -7
- package/build/fork/getStateFromPath-forks.js.map +1 -1
- package/build/link/Link.d.ts +2 -0
- package/build/link/Link.d.ts.map +1 -1
- package/build/link/Link.js +2 -0
- package/build/link/Link.js.map +1 -1
- package/build/link/elements.d.ts +15 -4
- package/build/link/elements.d.ts.map +1 -1
- package/build/link/elements.js +7 -2
- package/build/link/elements.js.map +1 -1
- package/build/link/preview/native.d.ts +5 -1
- package/build/link/preview/native.d.ts.map +1 -1
- package/build/link/preview/native.js +12 -1
- package/build/link/preview/native.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +1 -1
- package/build/link/zoom/link-apple-zoom-target.d.ts +3 -0
- package/build/link/zoom/link-apple-zoom-target.d.ts.map +1 -0
- package/build/link/zoom/link-apple-zoom-target.js +20 -0
- package/build/link/zoom/link-apple-zoom-target.js.map +1 -0
- package/build/link/zoom/useZoomTransitionPrimitives.ios.d.ts.map +1 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js +4 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js.map +1 -1
- package/build/link/zoom/zoom-transition-context.d.ts +7 -0
- package/build/link/zoom/zoom-transition-context.d.ts.map +1 -1
- package/build/link/zoom/zoom-transition-context.js +32 -1
- package/build/link/zoom/zoom-transition-context.js.map +1 -1
- package/build/loaders/utils.d.ts.map +1 -1
- package/build/loaders/utils.js +2 -1
- package/build/loaders/utils.js.map +1 -1
- package/build/native-tabs/NativeTabTrigger.d.ts +1 -1
- package/build/native-tabs/NativeTabTrigger.d.ts.map +1 -1
- package/build/native-tabs/NativeTabTrigger.js +5 -6
- package/build/native-tabs/NativeTabTrigger.js.map +1 -1
- package/build/native-tabs/NativeTabsView.web.js +1 -1
- package/build/native-tabs/NativeTabsView.web.js.map +1 -1
- package/build/typed-routes/types.d.ts +4 -1
- package/build/typed-routes/types.d.ts.map +1 -1
- package/build/typed-routes/types.js.map +1 -1
- package/build/useScreens.d.ts.map +1 -1
- package/build/useScreens.js +6 -3
- package/build/useScreens.js.map +1 -1
- package/build/utils/url.d.ts +1 -0
- package/build/utils/url.d.ts.map +1 -1
- package/build/utils/url.js +9 -0
- package/build/utils/url.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/LinkPreview/LinkPreviewNativeActionView.swift +1 -1
- package/ios/LinkPreview/LinkPreviewNativeModule.swift +11 -0
- package/ios/LinkPreview/LinkZoomTransition.swift +126 -15
- package/ios/Toolbar/RouterToolbarHostView.swift +5 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.module → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.pom → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
- package/package.json +10 -10
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1-sources.jar → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1-sources.jar.md5 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1-sources.jar.sha1 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1-sources.jar.sha256 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1-sources.jar.sha512 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.aar → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.aar.md5 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.aar.sha1 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.aar.sha256 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251206-615dec1/expo.modules.router-7.0.0-canary-20251206-615dec1.aar.sha512 → 7.0.0-canary-20251210-1f163e3/expo.modules.router-7.0.0-canary-20251210-1f163e3.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 = '7.0.0-canary-
|
|
7
|
+
version = '7.0.0-canary-20251210-1f163e3'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "7.0.0-canary-
|
|
13
|
+
versionName "7.0.0-canary-20251210-1f163e3"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
package/build/ExpoRoot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoRoot.d.ts","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAY,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAO7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpoRoot.d.ts","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAY,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAO7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAOxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAOzC,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,OAAO,EAAE,OAAO,CAAC;KAClB,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtE,CAAC;AAgBF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,aAAwB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBA2BtF"}
|
package/build/ExpoRoot.js
CHANGED
|
@@ -49,6 +49,7 @@ const utils_1 = require("./global-state/utils");
|
|
|
49
49
|
const LinkPreviewContext_1 = require("./link/preview/LinkPreviewContext");
|
|
50
50
|
const primitives_1 = require("./primitives");
|
|
51
51
|
const statusbar_1 = require("./utils/statusbar");
|
|
52
|
+
const url_1 = require("./utils/url");
|
|
52
53
|
const Sitemap_1 = require("./views/Sitemap");
|
|
53
54
|
const SplashScreen = __importStar(require("./views/Splash"));
|
|
54
55
|
const Unmatched_1 = require("./views/Unmatched");
|
|
@@ -108,7 +109,7 @@ function ContextNavigator({ context, location: initialLocation = initialUrl, wra
|
|
|
108
109
|
}
|
|
109
110
|
else if (typeof initialLocation === 'string') {
|
|
110
111
|
// The initial location is a string, so we need to parse it into a URL.
|
|
111
|
-
const url =
|
|
112
|
+
const url = (0, url_1.parseUrlUsingCustomBase)(initialLocation);
|
|
112
113
|
contextType = {
|
|
113
114
|
location: {
|
|
114
115
|
pathname: url.pathname,
|
package/build/ExpoRoot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoRoot.js","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Db,4BA2BC;AApFD,qDAKkC;AAClC,+CAA6F;AAC7F,+CAAmE;AACnE,mFAAkE;AAElE,2CAA2F;AAC3F,yFAAsF;AACtF,oEAAgG;AAEhG,8DAA8D;AAC9D,gFAAwF;AACxF,8DAA2D;AAC3D,gDAAiF;AACjF,0EAA+E;AAC/E,6CAAsC;AAEtC,iDAAiE;AACjE,6CAA0C;AAC1C,6DAA+C;A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C/C,MAAM,OAAO,GAAoC,MAAM,CAAC,OAAO,CAAC;QAEhE,IAAI,OAAO,GAAG,eAAe,MAAM,CAAC,IAAI,IACtC,OAAO,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAChE,oCAAoC,CAAC;QAErC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,UAAU,CAAC;YAChB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS,CAAC;YACf,KAAK,SAAS;gBACZ,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;oBAClB,OAAO,IAAI,kCAAkC,OAAO,CAAC,IAAI,IAAI,CAAC;gBAChE,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAI,gFAAgF,CAAC;gBAC9F,CAAC;gBAED,MAAM;YACR,KAAK,SAAS,CAAC;YACf,KAAK,KAAK,CAAC;YACX,KAAK,YAAY;gBACf,OAAO,IAAI,wCAAwC,CAAC;gBACpD,MAAM;YACR,KAAK,aAAa,CAAC;YACnB,KAAK,cAAc,CAAC;YACpB,KAAK,eAAe;gBAClB,OAAO,IAAI,+CAA+C,CAAC;gBAC3D,MAAM;QACV,CAAC;QAED,OAAO,IAAI,0EAA0E,CAAC;QAEtF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;KAAM,CAAC;IACN,iBAAiB,GAAG,cAAa,CAAC,CAAC;AACrC,CAAC","sourcesContent":["'use client';\n\nimport {\n LinkingOptions,\n NavigationAction,\n StackRouter,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport React, { type PropsWithChildren, Fragment, type ComponentType, useMemo } from 'react';\nimport { StatusBar, useColorScheme, Platform } from 'react-native';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport { INTERNAL_SLOT_NAME, NOT_FOUND_ROUTE_NAME, SITEMAP_ROUTE_NAME } from './constants';\nimport { useDomComponentNavigation } from './domComponents/useDomComponentNavigation';\nimport { NavigationContainer as UpstreamNavigationContainer } from './fork/NavigationContainer';\nimport { ExpoLinkingOptions } from './getLinkingConfig';\nimport { store, useStore } from './global-state/router-store';\nimport { ServerContext, ServerContextType } from './global-state/serverLocationContext';\nimport { StoreContext } from './global-state/storeContext';\nimport { shouldAppendNotFound, shouldAppendSitemap } from './global-state/utils';\nimport { LinkPreviewContextProvider } from './link/preview/LinkPreviewContext';\nimport { Screen } from './primitives';\nimport { RequireContext } from './types';\nimport { canOverrideStatusBarBehavior } from './utils/statusbar';\nimport { Sitemap } from './views/Sitemap';\nimport * as SplashScreen from './views/Splash';\nimport { Unmatched } from './views/Unmatched';\n\nexport type ExpoRootProps = {\n context: RequireContext;\n location?: URL | string;\n wrapper?: ComponentType<PropsWithChildren>;\n linking?: Partial<ExpoLinkingOptions>;\n};\n\nexport type NativeIntent = {\n redirectSystemPath?: (event: {\n path: string | null;\n initial: boolean;\n }) => Promise<string | null | undefined> | string | null | undefined;\n};\n\nconst isTestEnv = process.env.NODE_ENV === 'test';\n\nconst INITIAL_METRICS =\n Platform.OS === 'web' || isTestEnv\n ? {\n frame: { x: 0, y: 0, width: 0, height: 0 },\n insets: { top: 0, left: 0, right: 0, bottom: 0 },\n }\n : undefined;\n\nconst documentTitle = {\n enabled: false,\n};\n\n/**\n * @hidden\n */\nexport function ExpoRoot({ wrapper: ParentWrapper = Fragment, ...props }: ExpoRootProps) {\n /*\n * Due to static rendering we need to wrap these top level views in second wrapper\n * View's like <SafeAreaProvider /> generate a <div> so if the parent wrapper\n * is a HTML document, we need to ensure its inside the <body>\n */\n const wrapper = useMemo(\n () =>\n ({ children }: PropsWithChildren) => {\n return (\n <ParentWrapper>\n <LinkPreviewContextProvider>\n <SafeAreaProvider\n // SSR support\n initialMetrics={INITIAL_METRICS}>\n {/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}\n {canOverrideStatusBarBehavior && <AutoStatusBar />}\n {children}\n </SafeAreaProvider>\n </LinkPreviewContextProvider>\n </ParentWrapper>\n );\n },\n [ParentWrapper]\n );\n\n return <ContextNavigator {...props} wrapper={wrapper} />;\n}\n\nfunction AutoStatusBar() {\n return <StatusBar barStyle={useColorScheme() === 'light' ? 'dark-content' : 'light-content'} />;\n}\n\nconst initialUrl =\n Platform.OS === 'web' && typeof window !== 'undefined'\n ? new URL(window.location.href)\n : undefined;\n\nfunction ContextNavigator({\n context,\n location: initialLocation = initialUrl,\n wrapper: WrapperComponent = Fragment,\n linking = {},\n}: ExpoRootProps) {\n // location and linking.getInitialURL are both used to initialize the router state\n // - location is used on web and during static rendering\n // - linking.getInitialURL is used on native\n const serverContext = useMemo(() => {\n let contextType: ServerContextType = {};\n\n if (initialLocation instanceof URL) {\n contextType = {\n location: {\n pathname: initialLocation.pathname + initialLocation.hash,\n search: initialLocation.search,\n },\n };\n } else if (typeof initialLocation === 'string') {\n // The initial location is a string, so we need to parse it into a URL.\n const url = new URL(initialLocation, 'http://placeholder.base');\n contextType = {\n location: {\n pathname: url.pathname,\n search: url.search,\n },\n };\n }\n\n return contextType;\n }, []);\n\n /*\n * The serverUrl is an initial URL used in server rendering environments.\n * e.g Static renders, units tests, etc\n */\n const serverUrl = serverContext.location\n ? `${serverContext.location.pathname}${serverContext.location.search}`\n : undefined;\n\n const store = useStore(context, linking, serverUrl);\n\n useDomComponentNavigation();\n\n if (store.shouldShowTutorial()) {\n SplashScreen.hideAsync();\n if (process.env.NODE_ENV === 'development') {\n const Tutorial = require('./onboard/Tutorial').Tutorial;\n return (\n <WrapperComponent>\n <Tutorial />\n </WrapperComponent>\n );\n } else {\n // Ensure tutorial styles are stripped in production.\n return null;\n }\n }\n\n return (\n <StoreContext.Provider value={store}>\n <UpstreamNavigationContainer\n ref={store.navigationRef}\n initialState={store.state}\n linking={store.linking as LinkingOptions<any>}\n onUnhandledAction={onUnhandledAction}\n onStateChange={store.onStateChange}\n documentTitle={documentTitle}\n onReady={store.onReady}>\n <ServerContext.Provider value={serverContext}>\n <WrapperComponent>\n <Content />\n </WrapperComponent>\n </ServerContext.Provider>\n </UpstreamNavigationContainer>\n </StoreContext.Provider>\n );\n}\n\nfunction Content() {\n const children = [<Screen name={INTERNAL_SLOT_NAME} component={store.rootComponent} />];\n if (shouldAppendNotFound()) {\n children.push(<Screen name={NOT_FOUND_ROUTE_NAME} component={Unmatched} />);\n }\n if (shouldAppendSitemap()) {\n children.push(<Screen name={SITEMAP_ROUTE_NAME} component={Sitemap} />);\n }\n const { state, descriptors, NavigationContent } = useNavigationBuilder(StackRouter, {\n children,\n id: INTERNAL_SLOT_NAME,\n });\n\n return (\n <NavigationContent>{descriptors[state.routes[state.index].key].render()}</NavigationContent>\n );\n}\n\nlet onUnhandledAction: (action: NavigationAction) => void;\n\nif (process.env.NODE_ENV !== 'production') {\n onUnhandledAction = (action: NavigationAction) => {\n const payload: Record<string, any> | undefined = action.payload;\n\n let message = `The action '${action.type}'${\n payload ? ` with payload ${JSON.stringify(action.payload)}` : ''\n } was not handled by any navigator.`;\n\n switch (action.type) {\n case 'NAVIGATE':\n case 'PUSH':\n case 'REPLACE':\n case 'JUMP_TO':\n if (payload?.name) {\n message += `\\n\\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\\n\\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n\n break;\n case 'GO_BACK':\n case 'POP':\n case 'POP_TO_TOP':\n message += `\\n\\nIs there any screen to go back to?`;\n break;\n case 'OPEN_DRAWER':\n case 'CLOSE_DRAWER':\n case 'TOGGLE_DRAWER':\n message += `\\n\\nIs your screen inside a Drawer navigator?`;\n break;\n }\n\n message += `\\n\\nThis is a development-only warning and won't be shown in production.`;\n\n if (process.env.NODE_ENV === 'test') {\n throw new Error(message);\n }\n console.error(message);\n };\n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0EAA0E,CAAC;QAEtF,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;KAAM,CAAC;IACN,iBAAiB,GAAG,cAAa,CAAC,CAAC;AACrC,CAAC","sourcesContent":["'use client';\n\nimport {\n LinkingOptions,\n NavigationAction,\n StackRouter,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport React, { type PropsWithChildren, Fragment, type ComponentType, useMemo } from 'react';\nimport { StatusBar, useColorScheme, Platform } from 'react-native';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport { INTERNAL_SLOT_NAME, NOT_FOUND_ROUTE_NAME, SITEMAP_ROUTE_NAME } from './constants';\nimport { useDomComponentNavigation } from './domComponents/useDomComponentNavigation';\nimport { NavigationContainer as UpstreamNavigationContainer } from './fork/NavigationContainer';\nimport { ExpoLinkingOptions } from './getLinkingConfig';\nimport { store, useStore } from './global-state/router-store';\nimport { ServerContext, ServerContextType } from './global-state/serverLocationContext';\nimport { StoreContext } from './global-state/storeContext';\nimport { shouldAppendNotFound, shouldAppendSitemap } from './global-state/utils';\nimport { LinkPreviewContextProvider } from './link/preview/LinkPreviewContext';\nimport { Screen } from './primitives';\nimport { RequireContext } from './types';\nimport { canOverrideStatusBarBehavior } from './utils/statusbar';\nimport { parseUrlUsingCustomBase } from './utils/url';\nimport { Sitemap } from './views/Sitemap';\nimport * as SplashScreen from './views/Splash';\nimport { Unmatched } from './views/Unmatched';\n\nexport type ExpoRootProps = {\n context: RequireContext;\n location?: URL | string;\n wrapper?: ComponentType<PropsWithChildren>;\n linking?: Partial<ExpoLinkingOptions>;\n};\n\nexport type NativeIntent = {\n redirectSystemPath?: (event: {\n path: string | null;\n initial: boolean;\n }) => Promise<string | null | undefined> | string | null | undefined;\n};\n\nconst isTestEnv = process.env.NODE_ENV === 'test';\n\nconst INITIAL_METRICS =\n Platform.OS === 'web' || isTestEnv\n ? {\n frame: { x: 0, y: 0, width: 0, height: 0 },\n insets: { top: 0, left: 0, right: 0, bottom: 0 },\n }\n : undefined;\n\nconst documentTitle = {\n enabled: false,\n};\n\n/**\n * @hidden\n */\nexport function ExpoRoot({ wrapper: ParentWrapper = Fragment, ...props }: ExpoRootProps) {\n /*\n * Due to static rendering we need to wrap these top level views in second wrapper\n * View's like <SafeAreaProvider /> generate a <div> so if the parent wrapper\n * is a HTML document, we need to ensure its inside the <body>\n */\n const wrapper = useMemo(\n () =>\n ({ children }: PropsWithChildren) => {\n return (\n <ParentWrapper>\n <LinkPreviewContextProvider>\n <SafeAreaProvider\n // SSR support\n initialMetrics={INITIAL_METRICS}>\n {/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}\n {canOverrideStatusBarBehavior && <AutoStatusBar />}\n {children}\n </SafeAreaProvider>\n </LinkPreviewContextProvider>\n </ParentWrapper>\n );\n },\n [ParentWrapper]\n );\n\n return <ContextNavigator {...props} wrapper={wrapper} />;\n}\n\nfunction AutoStatusBar() {\n return <StatusBar barStyle={useColorScheme() === 'light' ? 'dark-content' : 'light-content'} />;\n}\n\nconst initialUrl =\n Platform.OS === 'web' && typeof window !== 'undefined'\n ? new URL(window.location.href)\n : undefined;\n\nfunction ContextNavigator({\n context,\n location: initialLocation = initialUrl,\n wrapper: WrapperComponent = Fragment,\n linking = {},\n}: ExpoRootProps) {\n // location and linking.getInitialURL are both used to initialize the router state\n // - location is used on web and during static rendering\n // - linking.getInitialURL is used on native\n const serverContext = useMemo(() => {\n let contextType: ServerContextType = {};\n\n if (initialLocation instanceof URL) {\n contextType = {\n location: {\n pathname: initialLocation.pathname + initialLocation.hash,\n search: initialLocation.search,\n },\n };\n } else if (typeof initialLocation === 'string') {\n // The initial location is a string, so we need to parse it into a URL.\n const url = parseUrlUsingCustomBase(initialLocation);\n contextType = {\n location: {\n pathname: url.pathname,\n search: url.search,\n },\n };\n }\n\n return contextType;\n }, []);\n\n /*\n * The serverUrl is an initial URL used in server rendering environments.\n * e.g Static renders, units tests, etc\n */\n const serverUrl = serverContext.location\n ? `${serverContext.location.pathname}${serverContext.location.search}`\n : undefined;\n\n const store = useStore(context, linking, serverUrl);\n\n useDomComponentNavigation();\n\n if (store.shouldShowTutorial()) {\n SplashScreen.hideAsync();\n if (process.env.NODE_ENV === 'development') {\n const Tutorial = require('./onboard/Tutorial').Tutorial;\n return (\n <WrapperComponent>\n <Tutorial />\n </WrapperComponent>\n );\n } else {\n // Ensure tutorial styles are stripped in production.\n return null;\n }\n }\n\n return (\n <StoreContext.Provider value={store}>\n <UpstreamNavigationContainer\n ref={store.navigationRef}\n initialState={store.state}\n linking={store.linking as LinkingOptions<any>}\n onUnhandledAction={onUnhandledAction}\n onStateChange={store.onStateChange}\n documentTitle={documentTitle}\n onReady={store.onReady}>\n <ServerContext.Provider value={serverContext}>\n <WrapperComponent>\n <Content />\n </WrapperComponent>\n </ServerContext.Provider>\n </UpstreamNavigationContainer>\n </StoreContext.Provider>\n );\n}\n\nfunction Content() {\n const children = [<Screen name={INTERNAL_SLOT_NAME} component={store.rootComponent} />];\n if (shouldAppendNotFound()) {\n children.push(<Screen name={NOT_FOUND_ROUTE_NAME} component={Unmatched} />);\n }\n if (shouldAppendSitemap()) {\n children.push(<Screen name={SITEMAP_ROUTE_NAME} component={Sitemap} />);\n }\n const { state, descriptors, NavigationContent } = useNavigationBuilder(StackRouter, {\n children,\n id: INTERNAL_SLOT_NAME,\n });\n\n return (\n <NavigationContent>{descriptors[state.routes[state.index].key].render()}</NavigationContent>\n );\n}\n\nlet onUnhandledAction: (action: NavigationAction) => void;\n\nif (process.env.NODE_ENV !== 'production') {\n onUnhandledAction = (action: NavigationAction) => {\n const payload: Record<string, any> | undefined = action.payload;\n\n let message = `The action '${action.type}'${\n payload ? ` with payload ${JSON.stringify(action.payload)}` : ''\n } was not handled by any navigator.`;\n\n switch (action.type) {\n case 'NAVIGATE':\n case 'PUSH':\n case 'REPLACE':\n case 'JUMP_TO':\n if (payload?.name) {\n message += `\\n\\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\\n\\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n\n break;\n case 'GO_BACK':\n case 'POP':\n case 'POP_TO_TOP':\n message += `\\n\\nIs there any screen to go back to?`;\n break;\n case 'OPEN_DRAWER':\n case 'CLOSE_DRAWER':\n case 'TOGGLE_DRAWER':\n message += `\\n\\nIs your screen inside a Drawer navigator?`;\n break;\n }\n\n message += `\\n\\nThis is a development-only warning and won't be shown in production.`;\n\n if (process.env.NODE_ENV === 'test') {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = function () {};\n}\n"]}
|
|
@@ -2,11 +2,11 @@ import type { ColorValue } from 'react-native';
|
|
|
2
2
|
/**
|
|
3
3
|
* [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)
|
|
4
4
|
*
|
|
5
|
-
* You can find out more about color roles
|
|
5
|
+
* You can find out more about color roles in [official Material Design 3 documentation](https://m3.material.io/styles/color/roles).
|
|
6
6
|
*
|
|
7
|
-
* You can read about
|
|
7
|
+
* You can read about the difference between dynamic and static colors in [official Material Design 3 documentation](https://m3.material.io/styles/color/choosing-a-scheme).
|
|
8
8
|
*
|
|
9
|
-
* For detailed definition of each color role, see
|
|
9
|
+
* For a detailed definition of each color role, see [material components color documentation](https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md).
|
|
10
10
|
*/
|
|
11
11
|
export interface AndroidDynamicMaterialColorType {
|
|
12
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.dynamic.types.js","sourceRoot":"","sources":["../../src/color/android.dynamic.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorValue } from 'react-native';\n\n/**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * You can find out more about color roles @link https://m3.material.io/styles/color/roles\n *\n * You can read about about difference between dynamic and static colors @link https://m3.material.io/styles/color/choosing-a-scheme\n *\n * For detailed definition of each color role, see @link https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md\n */\nexport interface AndroidDynamicMaterialColorType {\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n primaryInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n error: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onError: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n errorContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onErrorContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outline: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outlineVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n */\n background: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n */\n onBackground: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surface: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurface: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurfaceVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n surfaceInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n onSurfaceInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceBright: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLow: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLowest: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHigh: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHighest: ColorValue;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"android.dynamic.types.js","sourceRoot":"","sources":["../../src/color/android.dynamic.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorValue } from 'react-native';\n\n/**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * You can find out more about color roles in [official Material Design 3 documentation](https://m3.material.io/styles/color/roles).\n *\n * You can read about the difference between dynamic and static colors in [official Material Design 3 documentation](https://m3.material.io/styles/color/choosing-a-scheme).\n *\n * For a detailed definition of each color role, see [material components color documentation](https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md).\n */\nexport interface AndroidDynamicMaterialColorType {\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n primaryInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiary: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixedDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixed: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixedVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n error: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onError: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n errorContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onErrorContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outline: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outlineVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n */\n background: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n */\n onBackground: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surface: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurface: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurfaceVariant: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n surfaceInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n onSurfaceInverse: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceBright: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceDim: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainer: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLow: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLowest: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHigh: ColorValue;\n /**\n * [Android Dynamic Material Colors](https://m3.material.io/styles/color/dynamic/user-generated-source)\n *\n * This color adapts based on the user's wallpaper and theme settings.\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHighest: ColorValue;\n}\n"]}
|
|
@@ -2,11 +2,11 @@ import type { ColorValue } from 'react-native';
|
|
|
2
2
|
/**
|
|
3
3
|
* [Android Static Material Colors](https://m3.material.io/styles/color/static/baseline)
|
|
4
4
|
*
|
|
5
|
-
* You can find out more about color roles
|
|
5
|
+
* You can find out more about color roles in [official Material Design 3 documentation](https://m3.material.io/styles/color/roles).
|
|
6
6
|
*
|
|
7
|
-
* You can read about
|
|
7
|
+
* You can read about the difference between dynamic and static colors in [official Material Design 3 documentation](https://m3.material.io/styles/color/choosing-a-scheme).
|
|
8
8
|
*
|
|
9
|
-
* For detailed definition of each color role, see
|
|
9
|
+
* For a detailed definition of each color role, see [material components color documentation](https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md).
|
|
10
10
|
*/
|
|
11
11
|
export interface AndroidStaticMaterialColorType {
|
|
12
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.material.types.js","sourceRoot":"","sources":["../../src/color/android.material.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorValue } from 'react-native';\n\n/**\n * [Android Static Material Colors](https://m3.material.io/styles/color/static/baseline)\n *\n * You can find out more about color roles @link https://m3.material.io/styles/color/roles\n *\n * You can read about about difference between dynamic and static colors @link https://m3.material.io/styles/color/choosing-a-scheme\n *\n * For detailed definition of each color role, see @link https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md\n */\nexport interface AndroidStaticMaterialColorType {\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n primaryInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n error: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onError: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n errorContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onErrorContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outline: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outlineVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n */\n background: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n */\n onBackground: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surface: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurface: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurfaceVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n surfaceInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n onSurfaceInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceBright: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLow: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLowest: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHigh: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHighest: ColorValue;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"android.material.types.js","sourceRoot":"","sources":["../../src/color/android.material.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorValue } from 'react-native';\n\n/**\n * [Android Static Material Colors](https://m3.material.io/styles/color/static/baseline)\n *\n * You can find out more about color roles in [official Material Design 3 documentation](https://m3.material.io/styles/color/roles).\n *\n * You can read about the difference between dynamic and static colors in [official Material Design 3 documentation](https://m3.material.io/styles/color/choosing-a-scheme).\n *\n * For a detailed definition of each color role, see [material components color documentation](https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md).\n */\nexport interface AndroidStaticMaterialColorType {\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n primaryInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n primaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Primary color role](https://m3.material.io/styles/color/roles#41f55188-5c63-4107-ac41-822ebca8ae1b)\n */\n onPrimaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n secondaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Secondary color role](https://m3.material.io/styles/color/roles#290bcc49-b728-414c-8cc5-04336c1c799c)\n */\n onSecondaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiary: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n tertiaryFixedDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixed: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Tertiary color role](https://m3.material.io/styles/color/roles#727a0bf8-c95f-4f83-bc43-290d20f24e8e)\n */\n onTertiaryFixedVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n error: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onError: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n errorContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Error color role](https://m3.material.io/styles/color/roles#47a25970-8a80-43be-8307-c12e0f7a2b43)\n */\n onErrorContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outline: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Outline color role](https://m3.material.io/styles/color/roles#e7d72e44-72e2-4ce9-a18d-df07b1433d18)\n */\n outlineVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n */\n background: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n */\n onBackground: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surface: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurface: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n onSurfaceVariant: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n surfaceInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n *\n * [Read more about Inverse colors](https://m3.material.io/styles/color/roles#7fc6b47e-db22-4e98-8359-7649a099e4a1)\n */\n onSurfaceInverse: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceBright: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceDim: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainer: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLow: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerLowest: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHigh: ColorValue;\n /**\n * [Android Static Material Color](https://m3.material.io/styles/color/static/baseline)\n *\n * [Read more about Surface color role](https://m3.material.io/styles/color/roles#89f972b1-e372-494c-aabc-69aea34ed591)\n */\n surfaceContainerHighest: ColorValue;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPathFromState.d.ts","sourceRoot":"","sources":["../../src/fork/getPathFromState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAS,MAAM,2BAA2B,CAAC;AAItF,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5E,MAAM,MAAM,OAAO,CAAC,SAAS,SAAS,MAAM,IAAI,WAAW,GAAG;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAGF,MAAM,MAAM,KAAK,GAAG,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;AA4BrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,SAAS,MAAM,EACvD,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,MAAM,EAC3D,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;;;
|
|
1
|
+
{"version":3,"file":"getPathFromState.d.ts","sourceRoot":"","sources":["../../src/fork/getPathFromState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAS,MAAM,2BAA2B,CAAC;AAItF,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5E,MAAM,MAAM,OAAO,CAAC,SAAS,SAAS,MAAM,IAAI,WAAW,GAAG;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAGF,MAAM,MAAM,KAAK,GAAG,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;AA4BrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,SAAS,MAAM,EACvD,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,MAAM,EAC3D,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;;;EA2P7B;AAsDD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAM,GAAG,SAAqC,UAQxD"}
|
|
@@ -186,7 +186,8 @@ function getPathDataFromState(state, options) {
|
|
|
186
186
|
: Object.keys(screens)[0]
|
|
187
187
|
: undefined;
|
|
188
188
|
if (screen && screens && currentOptions[route.name].screens?.[screen]) {
|
|
189
|
-
|
|
189
|
+
const nestedParams = route.params?.params;
|
|
190
|
+
route = { ...screens[screen], name: screen, key: screen, params: nestedParams };
|
|
190
191
|
currentOptions = screens;
|
|
191
192
|
}
|
|
192
193
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPathFromState.js","sourceRoot":"","sources":["../../src/fork/getPathFromState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;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O,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACtD,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAC9B,OAA8B,EAC9B,OAAgB,EACY,EAAE,CAC9B,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;IACxC,MAAM,MAAM,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE5C,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC,CACH,CAAC;AAEJ,SAAgB,aAAa,CAC3B,IAAY,EACZ,UAA8B,OAAO,CAAC,GAAG,CAAC,aAAa;IAEvD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;QACrE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { PathConfig, PathConfigMap } from '@react-navigation/native';\nimport type { NavigationState, PartialState, Route } from '@react-navigation/routers';\nimport * as queryString from 'query-string';\n\nimport * as expo from './getPathFromState-forks';\nimport type { ExpoConfigItem, ExpoOptions } from './getPathFromState-forks';\nimport { removeInternalExpoRouterParams } from '../navigationParams';\n\n// START FORK\nexport type Options<ParamList extends object> = ExpoOptions & {\n path?: string;\n initialRouteName?: string;\n screens: PathConfigMap<ParamList>;\n};\n// END FORK\n\nexport type State = NavigationState | Omit<PartialState<NavigationState>, 'stale'>;\n\nexport type StringifyConfig = Record<string, (value: any) => string>;\n\n// START FORK\ntype ConfigItem = ExpoConfigItem & {\n pattern?: string;\n stringify?: StringifyConfig;\n screens?: Record<string, ConfigItem>;\n};\n// END FORK\n\nconst getActiveRoute = (state: State): { name: string; params?: object } => {\n const route =\n typeof state.index === 'number'\n ? state.routes[state.index]\n : state.routes[state.routes.length - 1];\n\n if (route.state) {\n return getActiveRoute(route.state);\n }\n\n return route;\n};\n\nlet cachedNormalizedConfigs: [PathConfigMap<object> | undefined, Record<string, ConfigItem>] = [\n undefined,\n {},\n];\n\n/**\n * Utility to serialize a navigation state object to a path string.\n *\n * @example\n * ```js\n * getPathFromState(\n * {\n * routes: [\n * {\n * name: 'Chat',\n * params: { author: 'Jane', id: 42 },\n * },\n * ],\n * },\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * stringify: { author: author => author.toLowerCase() }\n * }\n * }\n * }\n * )\n * ```\n *\n * @param state Navigation state to serialize.\n * @param options Extra options to fine-tune how to serialize the path.\n * @returns Path representing the state, e.g. /foo/bar?count=42.\n */\nexport function getPathFromState<ParamList extends object>(\n state: State,\n options?: Options<ParamList>\n): string {\n return getPathDataFromState(state, options).path;\n}\n\nexport function getPathDataFromState<ParamList extends object>(\n state: State,\n options?: Options<ParamList>\n) {\n if (state == null) {\n throw Error(\"Got 'undefined' for the navigation state. You must pass a valid state object.\");\n }\n\n if (options) {\n // START FORK\n expo.validatePathConfig(options);\n // validatePathConfig(options);\n // END FORK\n }\n\n // Create a normalized configs object which will be easier to use\n if (cachedNormalizedConfigs[0] !== options?.screens) {\n cachedNormalizedConfigs = [\n options?.screens,\n options?.screens ? createNormalizedConfigs(options.screens) : {},\n ];\n }\n const configs: Record<string, ConfigItem> = cachedNormalizedConfigs[1];\n\n let path = '/';\n let current: State | undefined = state;\n\n const allParams: Record<string, any> = {};\n\n while (current) {\n let index = typeof current.index === 'number' ? current.index : 0;\n let route = current.routes[index] as Route<string> & {\n state?: State;\n };\n\n let pattern: string | undefined;\n\n let focusedParams: Record<string, any> | undefined;\n const focusedRoute = getActiveRoute(state);\n let currentOptions = configs;\n\n // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined\n const nestedRouteNames: string[] = [];\n\n let hasNext = true;\n\n while (route.name in currentOptions && hasNext) {\n pattern = currentOptions[route.name].pattern;\n\n nestedRouteNames.push(route.name);\n\n if (route.params) {\n const stringify = currentOptions[route.name]?.stringify;\n\n // START FORK\n // This mutates allParams\n const currentParams = expo.fixCurrentParams(allParams, route, stringify);\n\n // const currentParams = Object.fromEntries(\n // Object.entries(route.params).map(([key, value]) => [\n // key,\n // stringify?.[key] ? stringify[key](value) : String(value),\n // ])\n // );\n\n // if (pattern) {\n // Object.assign(allParams, currentParams);\n // }\n // END FORK\n\n if (focusedRoute === route) {\n // If this is the focused route, keep the params for later use\n // We save it here since it's been stringified already\n focusedParams = { ...currentParams };\n\n pattern\n ?.split('/')\n .filter((p) => expo.isDynamicPart(p))\n // eslint-disable-next-line no-loop-func\n .forEach((p) => {\n const name = expo.getParamName(p);\n\n // Remove the params present in the pattern since we'll only use the rest for query string\n if (focusedParams) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[name];\n }\n });\n }\n }\n\n // If there is no `screens` property or no nested state, we return pattern\n if (!currentOptions[route.name].screens || route.state === undefined) {\n // START FORK\n // Expo Router allows you to navigate to a (group) and not specify a target screen\n // This is different from React Navigation, which requires a target screen\n // We need to handle this case here, by selecting either the index screen or the first screen of the group\n\n // IMPORTANT: This does not affect groups that use _layout files with initialRouteNames\n // Layout files create a new route config. This only affects groups without layouts that have their screens\n // hoisted.\n\n // Example:\n // - /home/_layout\n // - /home/(a|b|c)/index --> Hoisted to /home/_layout navigator\n // - /home/(a|b|c)/other --> Hoisted to /home/_layout navigator\n // - /home/(profile)/me --> Hoisted to /home/_layout navigator\n //\n // route.push('/home/(a)') --> This should navigate to /home/(a)/index\n // route.push('/home/(profile)') --> This should navigate to /home/(profile)/me\n const screens = currentOptions[route.name].screens;\n\n // Determine what screen the user wants to navigate to. If no screen is specified, assume there is an index screen\n // In the examples above, this ensures that /home/(a) navigates to /home/(a)/index\n const targetScreen =\n // This is typed as unknown, so we need to add these extra assertions\n route.params && 'screen' in route.params && typeof route.params.screen === 'string'\n ? route.params.screen\n : 'index';\n\n // If the target screen is not in the screens object, default to the first screen\n // In the examples above, this ensures that /home/(profile) navigates to /home/(profile)/me\n // As there is no index screen in the group\n const screen = screens\n ? screens[targetScreen]\n ? targetScreen\n : Object.keys(screens)[0]\n : undefined;\n\n if (screen && screens && currentOptions[route.name].screens?.[screen]) {\n route = { ...screens[screen], name: screen, key: screen };\n currentOptions = screens;\n } else {\n hasNext = false;\n }\n // hasNext = false;\n // END FORK\n } else {\n index =\n typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1;\n\n const nextRoute = route.state.routes[index];\n const nestedConfig = currentOptions[route.name].screens;\n\n // if there is config for next route name, we go deeper\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute as Route<string> & { state?: State };\n currentOptions = nestedConfig;\n } else {\n // If not, there is no sense in going deeper in config\n hasNext = false;\n }\n }\n }\n\n if (pattern === undefined) {\n pattern = nestedRouteNames.join('/');\n }\n\n if (currentOptions[route.name] !== undefined) {\n // START FORK\n path += expo.getPathWithConventionsCollapsed({\n ...options,\n pattern,\n route,\n params: allParams,\n initialRouteName: configs[route.name]?.initialRouteName,\n });\n // path += pattern\n // .split('/')\n // .map((p) => {\n // const name = getParamName(p);\n\n // // We don't know what to show for wildcard patterns\n // // Showing the route name seems ok, though whatever we show here will be incorrect\n // // Since the page doesn't actually exist\n // if (p === '*') {\n // return route.name;\n // }\n\n // // If the path has a pattern for a param, put the param in the path\n // if (p.startsWith(':')) {\n // const value = allParams[name];\n\n // if (value === undefined && p.endsWith('?')) {\n // // Optional params without value assigned in route.params should be ignored\n // return '';\n // }\n\n // // Valid characters according to\n // // https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 (see pchar definition)\n // return String(value).replace(/[^A-Za-z0-9\\-._~!$&'()*+,;=:@]/g, (char) =>\n // encodeURIComponent(char)\n // );\n // }\n\n // return encodeURIComponent(p);\n // })\n // .join('/');\n // } else {\n } else if (!route.name.startsWith('+')) {\n path += encodeURIComponent(route.name);\n }\n // END FORK\n\n if (!focusedParams) {\n focusedParams = focusedRoute.params;\n }\n\n if (route.state) {\n path += '/';\n } else if (focusedParams) {\n for (const param in focusedParams) {\n if (focusedParams[param] === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[param];\n }\n }\n\n // START FORK\n delete focusedParams['#'];\n focusedParams = removeInternalExpoRouterParams(focusedParams);\n // END FORK\n\n const query = queryString.stringify(focusedParams, { sort: false });\n if (query) {\n path += `?${query}`;\n }\n }\n\n current = route.state;\n }\n\n // Remove multiple as well as trailing slashes\n path = path.replace(/\\/+/g, '/');\n path = path.length > 1 ? path.replace(/\\/$/, '') : path;\n\n // Include the root path if specified\n if (options?.path) {\n path = joinPaths(options.path, path);\n }\n\n // START FORK\n path = expo.appendBaseUrl(path);\n if (allParams['#']) {\n path += `#${allParams['#']}`;\n }\n // END FORK\n\n // START FORK\n return { path, params: allParams };\n // END FORK\n}\n\n// const getParamName = (pattern: string) => pattern.replace(/^:/, '').replace(/\\?$/, '');\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst createConfigItem = (\n config: PathConfig<object> | string,\n parentPattern?: string\n): ConfigItem => {\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n return { pattern };\n }\n\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n // If an object is specified as the value (e.g. Foo: { ... }),\n // It can have `path` property and `screens` prop which has nested configs\n const pattern =\n config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';\n\n const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined;\n\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern?.split('/').filter(Boolean).join('/'),\n stringify: config.stringify,\n screens,\n };\n};\n\nconst createNormalizedConfigs = (\n options: PathConfigMap<object>,\n pattern?: string\n): Record<string, ConfigItem> =>\n Object.fromEntries(\n Object.entries(options).map(([name, c]) => {\n const result = createConfigItem(c, pattern);\n\n return [name, result];\n })\n );\n\nexport function appendBaseUrl(\n path: string,\n baseUrl: string | undefined = process.env.EXPO_BASE_URL\n) {\n if (process.env.NODE_ENV !== 'development') {\n if (baseUrl) {\n return `/${baseUrl.replace(/^\\/+/, '').replace(/\\/$/, '')}${path}`;\n }\n }\n return path;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getPathFromState.js","sourceRoot":"","sources":["../../src/fork/getPathFromState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,4CAKC;AAED,oDA6PC;AAsDD,sCAUC;AA7YD,0DAA4C;AAE5C,+DAAiD;AAEjD,0DAAqE;AAoBrE,WAAW;AAEX,MAAM,cAAc,GAAG,CAAC,KAAY,EAAqC,EAAE;IACzE,MAAM,KAAK,GACT,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;QAC7B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAC3B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE5C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,IAAI,uBAAuB,GAAoE;IAC7F,SAAS;IACT,EAAE;CACH,CAA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,CAAC,GAAG,CAAC,aAAa;IAEvD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;QACrE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { PathConfig, PathConfigMap } from '@react-navigation/native';\nimport type { NavigationState, PartialState, Route } from '@react-navigation/routers';\nimport * as queryString from 'query-string';\n\nimport * as expo from './getPathFromState-forks';\nimport type { ExpoConfigItem, ExpoOptions } from './getPathFromState-forks';\nimport { removeInternalExpoRouterParams } from '../navigationParams';\n\n// START FORK\nexport type Options<ParamList extends object> = ExpoOptions & {\n path?: string;\n initialRouteName?: string;\n screens: PathConfigMap<ParamList>;\n};\n// END FORK\n\nexport type State = NavigationState | Omit<PartialState<NavigationState>, 'stale'>;\n\nexport type StringifyConfig = Record<string, (value: any) => string>;\n\n// START FORK\ntype ConfigItem = ExpoConfigItem & {\n pattern?: string;\n stringify?: StringifyConfig;\n screens?: Record<string, ConfigItem>;\n};\n// END FORK\n\nconst getActiveRoute = (state: State): { name: string; params?: object } => {\n const route =\n typeof state.index === 'number'\n ? state.routes[state.index]\n : state.routes[state.routes.length - 1];\n\n if (route.state) {\n return getActiveRoute(route.state);\n }\n\n return route;\n};\n\nlet cachedNormalizedConfigs: [PathConfigMap<object> | undefined, Record<string, ConfigItem>] = [\n undefined,\n {},\n];\n\n/**\n * Utility to serialize a navigation state object to a path string.\n *\n * @example\n * ```js\n * getPathFromState(\n * {\n * routes: [\n * {\n * name: 'Chat',\n * params: { author: 'Jane', id: 42 },\n * },\n * ],\n * },\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * stringify: { author: author => author.toLowerCase() }\n * }\n * }\n * }\n * )\n * ```\n *\n * @param state Navigation state to serialize.\n * @param options Extra options to fine-tune how to serialize the path.\n * @returns Path representing the state, e.g. /foo/bar?count=42.\n */\nexport function getPathFromState<ParamList extends object>(\n state: State,\n options?: Options<ParamList>\n): string {\n return getPathDataFromState(state, options).path;\n}\n\nexport function getPathDataFromState<ParamList extends object>(\n state: State,\n options?: Options<ParamList>\n) {\n if (state == null) {\n throw Error(\"Got 'undefined' for the navigation state. You must pass a valid state object.\");\n }\n\n if (options) {\n // START FORK\n expo.validatePathConfig(options);\n // validatePathConfig(options);\n // END FORK\n }\n\n // Create a normalized configs object which will be easier to use\n if (cachedNormalizedConfigs[0] !== options?.screens) {\n cachedNormalizedConfigs = [\n options?.screens,\n options?.screens ? createNormalizedConfigs(options.screens) : {},\n ];\n }\n const configs: Record<string, ConfigItem> = cachedNormalizedConfigs[1];\n\n let path = '/';\n let current: State | undefined = state;\n\n const allParams: Record<string, any> = {};\n\n while (current) {\n let index = typeof current.index === 'number' ? current.index : 0;\n let route = current.routes[index] as Route<string> & {\n state?: State;\n };\n\n let pattern: string | undefined;\n\n let focusedParams: Record<string, any> | undefined;\n const focusedRoute = getActiveRoute(state);\n let currentOptions = configs;\n\n // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined\n const nestedRouteNames: string[] = [];\n\n let hasNext = true;\n\n while (route.name in currentOptions && hasNext) {\n pattern = currentOptions[route.name].pattern;\n\n nestedRouteNames.push(route.name);\n\n if (route.params) {\n const stringify = currentOptions[route.name]?.stringify;\n\n // START FORK\n // This mutates allParams\n const currentParams = expo.fixCurrentParams(allParams, route, stringify);\n\n // const currentParams = Object.fromEntries(\n // Object.entries(route.params).map(([key, value]) => [\n // key,\n // stringify?.[key] ? stringify[key](value) : String(value),\n // ])\n // );\n\n // if (pattern) {\n // Object.assign(allParams, currentParams);\n // }\n // END FORK\n\n if (focusedRoute === route) {\n // If this is the focused route, keep the params for later use\n // We save it here since it's been stringified already\n focusedParams = { ...currentParams };\n\n pattern\n ?.split('/')\n .filter((p) => expo.isDynamicPart(p))\n // eslint-disable-next-line no-loop-func\n .forEach((p) => {\n const name = expo.getParamName(p);\n\n // Remove the params present in the pattern since we'll only use the rest for query string\n if (focusedParams) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[name];\n }\n });\n }\n }\n\n // If there is no `screens` property or no nested state, we return pattern\n if (!currentOptions[route.name].screens || route.state === undefined) {\n // START FORK\n // Expo Router allows you to navigate to a (group) and not specify a target screen\n // This is different from React Navigation, which requires a target screen\n // We need to handle this case here, by selecting either the index screen or the first screen of the group\n\n // IMPORTANT: This does not affect groups that use _layout files with initialRouteNames\n // Layout files create a new route config. This only affects groups without layouts that have their screens\n // hoisted.\n\n // Example:\n // - /home/_layout\n // - /home/(a|b|c)/index --> Hoisted to /home/_layout navigator\n // - /home/(a|b|c)/other --> Hoisted to /home/_layout navigator\n // - /home/(profile)/me --> Hoisted to /home/_layout navigator\n //\n // route.push('/home/(a)') --> This should navigate to /home/(a)/index\n // route.push('/home/(profile)') --> This should navigate to /home/(profile)/me\n const screens = currentOptions[route.name].screens;\n\n // Determine what screen the user wants to navigate to. If no screen is specified, assume there is an index screen\n // In the examples above, this ensures that /home/(a) navigates to /home/(a)/index\n const targetScreen =\n // This is typed as unknown, so we need to add these extra assertions\n route.params && 'screen' in route.params && typeof route.params.screen === 'string'\n ? route.params.screen\n : 'index';\n\n // If the target screen is not in the screens object, default to the first screen\n // In the examples above, this ensures that /home/(profile) navigates to /home/(profile)/me\n // As there is no index screen in the group\n const screen = screens\n ? screens[targetScreen]\n ? targetScreen\n : Object.keys(screens)[0]\n : undefined;\n\n if (screen && screens && currentOptions[route.name].screens?.[screen]) {\n const nestedParams = (route.params as { params?: object } | undefined)?.params;\n route = { ...screens[screen], name: screen, key: screen, params: nestedParams };\n currentOptions = screens;\n } else {\n hasNext = false;\n }\n // hasNext = false;\n // END FORK\n } else {\n index =\n typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1;\n\n const nextRoute = route.state.routes[index];\n const nestedConfig = currentOptions[route.name].screens;\n\n // if there is config for next route name, we go deeper\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute as Route<string> & { state?: State };\n currentOptions = nestedConfig;\n } else {\n // If not, there is no sense in going deeper in config\n hasNext = false;\n }\n }\n }\n\n if (pattern === undefined) {\n pattern = nestedRouteNames.join('/');\n }\n\n if (currentOptions[route.name] !== undefined) {\n // START FORK\n path += expo.getPathWithConventionsCollapsed({\n ...options,\n pattern,\n route,\n params: allParams,\n initialRouteName: configs[route.name]?.initialRouteName,\n });\n // path += pattern\n // .split('/')\n // .map((p) => {\n // const name = getParamName(p);\n\n // // We don't know what to show for wildcard patterns\n // // Showing the route name seems ok, though whatever we show here will be incorrect\n // // Since the page doesn't actually exist\n // if (p === '*') {\n // return route.name;\n // }\n\n // // If the path has a pattern for a param, put the param in the path\n // if (p.startsWith(':')) {\n // const value = allParams[name];\n\n // if (value === undefined && p.endsWith('?')) {\n // // Optional params without value assigned in route.params should be ignored\n // return '';\n // }\n\n // // Valid characters according to\n // // https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 (see pchar definition)\n // return String(value).replace(/[^A-Za-z0-9\\-._~!$&'()*+,;=:@]/g, (char) =>\n // encodeURIComponent(char)\n // );\n // }\n\n // return encodeURIComponent(p);\n // })\n // .join('/');\n // } else {\n } else if (!route.name.startsWith('+')) {\n path += encodeURIComponent(route.name);\n }\n // END FORK\n\n if (!focusedParams) {\n focusedParams = focusedRoute.params;\n }\n\n if (route.state) {\n path += '/';\n } else if (focusedParams) {\n for (const param in focusedParams) {\n if (focusedParams[param] === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[param];\n }\n }\n\n // START FORK\n delete focusedParams['#'];\n focusedParams = removeInternalExpoRouterParams(focusedParams);\n // END FORK\n\n const query = queryString.stringify(focusedParams, { sort: false });\n if (query) {\n path += `?${query}`;\n }\n }\n\n current = route.state;\n }\n\n // Remove multiple as well as trailing slashes\n path = path.replace(/\\/+/g, '/');\n path = path.length > 1 ? path.replace(/\\/$/, '') : path;\n\n // Include the root path if specified\n if (options?.path) {\n path = joinPaths(options.path, path);\n }\n\n // START FORK\n path = expo.appendBaseUrl(path);\n if (allParams['#']) {\n path += `#${allParams['#']}`;\n }\n // END FORK\n\n // START FORK\n return { path, params: allParams };\n // END FORK\n}\n\n// const getParamName = (pattern: string) => pattern.replace(/^:/, '').replace(/\\?$/, '');\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst createConfigItem = (\n config: PathConfig<object> | string,\n parentPattern?: string\n): ConfigItem => {\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n return { pattern };\n }\n\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n // If an object is specified as the value (e.g. Foo: { ... }),\n // It can have `path` property and `screens` prop which has nested configs\n const pattern =\n config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';\n\n const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined;\n\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern?.split('/').filter(Boolean).join('/'),\n stringify: config.stringify,\n screens,\n };\n};\n\nconst createNormalizedConfigs = (\n options: PathConfigMap<object>,\n pattern?: string\n): Record<string, ConfigItem> =>\n Object.fromEntries(\n Object.entries(options).map(([name, c]) => {\n const result = createConfigItem(c, pattern);\n\n return [name, result];\n })\n );\n\nexport function appendBaseUrl(\n path: string,\n baseUrl: string | undefined = process.env.EXPO_BASE_URL\n) {\n if (process.env.NODE_ENV !== 'development') {\n if (baseUrl) {\n return `/${baseUrl.replace(/^\\/+/, '').replace(/\\/$/, '')}${path}`;\n }\n }\n return path;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStateFromPath-forks.d.ts","sourceRoot":"","sources":["../../src/fork/getStateFromPath-forks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"getStateFromPath-forks.d.ts","sourceRoot":"","sources":["../../src/fork/getStateFromPath-forks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIhG,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,6BAQlF;AAED,wBAAgB,wBAAwB,C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AQ;sBACnB,MAAM;aACf,OAAO;gBACJ,OAAO;iBACN,OAAO;wBACA,MAAM,EAAE;WACrB,MAAM,EAAE;qBACE,MAAM;;;;;;;;cA6OxB;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,kBAAkB,EAAE,IAKhD,QAAQ,WAAW,iBAMrC;AAQD,wBAAgB,oBAAoB,CAAC,gBAAgB,GAAE,MAAM,EAAO,IACtC,GAAG,WAAW,EAAE,GAAG,WAAW,YA2J3D;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,EAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,EACpD,IAAI,CAAC,EAAE,MAAM,iDA4Bd;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAUrC;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAelD"}
|
|
@@ -23,6 +23,7 @@ exports.cleanPath = cleanPath;
|
|
|
23
23
|
exports.routePatternToRegex = routePatternToRegex;
|
|
24
24
|
const escape_string_regexp_1 = __importDefault(require("escape-string-regexp"));
|
|
25
25
|
const matchers_1 = require("../matchers");
|
|
26
|
+
const url_1 = require("../utils/url");
|
|
26
27
|
/**
|
|
27
28
|
* In Expo Router, the params are available at all levels of the routing config
|
|
28
29
|
* @param routes
|
|
@@ -49,12 +50,7 @@ function getUrlWithReactNavigationConcessions(path, baseUrl = process.env.EXPO_B
|
|
|
49
50
|
let pathname = '';
|
|
50
51
|
let hash = '';
|
|
51
52
|
try {
|
|
52
|
-
|
|
53
|
-
// However, this seems to get flagged since it's preserved 1:1 in the output bytecode by certain scanners
|
|
54
|
-
// Instead, we use an empty `file:` URL. This will still perform `pathname` normalization, search parameter parsing
|
|
55
|
-
// encoding, and all other logic, except the logic that applies to hostnames and protocols, and also not leave a
|
|
56
|
-
// dummy URL in the output bytecode
|
|
57
|
-
const parsed = new URL(path, 'file:');
|
|
53
|
+
const parsed = (0, url_1.parseUrlUsingCustomBase)(path);
|
|
58
54
|
pathname = parsed.pathname;
|
|
59
55
|
hash = parsed.hash;
|
|
60
56
|
}
|
|
@@ -369,7 +365,7 @@ function getRouteConfigSorter(previousSegments = []) {
|
|
|
369
365
|
};
|
|
370
366
|
}
|
|
371
367
|
function parseQueryParams(path, route, parseConfig, hash) {
|
|
372
|
-
const searchParams =
|
|
368
|
+
const searchParams = (0, url_1.parseUrlUsingCustomBase)(path).searchParams;
|
|
373
369
|
const params = Object.create(null);
|
|
374
370
|
if (hash) {
|
|
375
371
|
params['#'] = hash.slice(1);
|