expo-router 7.0.0-canary-20251211-7da85ea → 7.0.0-canary-20251212-acb11f2
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/link/ExpoLink.d.ts.map +1 -1
- package/build/link/ExpoLink.js +10 -9
- package/build/link/ExpoLink.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.d.ts.map +1 -1
- package/build/link/zoom/ZoomTransitionEnabler.ios.js +4 -2
- package/build/link/zoom/ZoomTransitionEnabler.ios.js.map +1 -1
- package/build/link/zoom/link-apple-zoom.js +7 -2
- package/build/link/zoom/link-apple-zoom.js.map +1 -1
- package/build/link/zoom/useZoomHref.d.ts +3 -0
- package/build/link/zoom/useZoomHref.d.ts.map +1 -0
- package/build/link/zoom/useZoomHref.ios.d.ts +3 -0
- package/build/link/zoom/useZoomHref.ios.d.ts.map +1 -0
- package/build/link/zoom/useZoomHref.ios.js +38 -0
- package/build/link/zoom/useZoomHref.ios.js.map +1 -0
- package/build/link/zoom/useZoomHref.js +8 -0
- package/build/link/zoom/useZoomHref.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.d.ts +4 -0
- package/build/link/zoom/zoom-transition-context-providers.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.d.ts +4 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.js +71 -0
- package/build/link/zoom/zoom-transition-context-providers.ios.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.js +11 -0
- package/build/link/zoom/zoom-transition-context-providers.js.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.types.d.ts +9 -0
- package/build/link/zoom/zoom-transition-context-providers.types.d.ts.map +1 -0
- package/build/link/zoom/zoom-transition-context-providers.types.js +3 -0
- package/build/link/zoom/zoom-transition-context-providers.types.js.map +1 -0
- package/build/link/zoom/zoom-transition-context.d.ts +4 -6
- package/build/link/zoom/zoom-transition-context.d.ts.map +1 -1
- package/build/link/zoom/zoom-transition-context.js +0 -27
- package/build/link/zoom/zoom-transition-context.js.map +1 -1
- package/build/useScreens.js +3 -3
- package/build/useScreens.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.module → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.pom → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.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 +12 -12
- package/build/link/zoom/useZoomTransitionPrimitives.d.ts +0 -6
- package/build/link/zoom/useZoomTransitionPrimitives.d.ts.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.d.ts +0 -11
- package/build/link/zoom/useZoomTransitionPrimitives.ios.d.ts.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js +0 -69
- package/build/link/zoom/useZoomTransitionPrimitives.ios.js.map +0 -1
- package/build/link/zoom/useZoomTransitionPrimitives.js +0 -9
- package/build/link/zoom/useZoomTransitionPrimitives.js.map +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea-sources.jar → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea-sources.jar.md5 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea-sources.jar.sha1 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea-sources.jar.sha256 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea-sources.jar.sha512 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.aar → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.aar.md5 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.aar.sha1 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.aar.sha256 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20251211-7da85ea/expo.modules.router-7.0.0-canary-20251211-7da85ea.aar.sha512 → 7.0.0-canary-20251212-acb11f2/expo.modules.router-7.0.0-canary-20251212-acb11f2.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-20251212-acb11f2'
|
|
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-20251212-acb11f2"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoLink.d.ts","sourceRoot":"","sources":["../../src/link/ExpoLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"ExpoLink.d.ts","sourceRoot":"","sources":["../../src/link/ExpoLink.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAMxC"}
|
package/build/link/ExpoLink.js
CHANGED
|
@@ -44,29 +44,30 @@ const BaseExpoRouterLink_1 = require("./BaseExpoRouterLink");
|
|
|
44
44
|
const LinkWithPreview_1 = require("./LinkWithPreview");
|
|
45
45
|
const elements_1 = require("./elements");
|
|
46
46
|
const PreviewRouteContext_1 = require("./preview/PreviewRouteContext");
|
|
47
|
-
const
|
|
47
|
+
const useZoomHref_1 = require("./zoom/useZoomHref");
|
|
48
48
|
const url_1 = require("../utils/url");
|
|
49
|
-
const
|
|
49
|
+
const zoom_transition_context_providers_1 = require("./zoom/zoom-transition-context-providers");
|
|
50
50
|
function ExpoLink(props) {
|
|
51
|
+
return (<zoom_transition_context_providers_1.ZoomTransitionSourceContextProvider linkProps={props}>
|
|
52
|
+
<ExpoLinkImpl {...props}/>
|
|
53
|
+
</zoom_transition_context_providers_1.ZoomTransitionSourceContextProvider>);
|
|
54
|
+
}
|
|
55
|
+
function ExpoLinkImpl(props) {
|
|
51
56
|
const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
|
|
52
|
-
const
|
|
57
|
+
const href = (0, useZoomHref_1.useZoomHref)(props);
|
|
53
58
|
const shouldUseLinkWithPreview = process.env.EXPO_OS === 'ios' &&
|
|
54
59
|
isLinkWithPreview(props) &&
|
|
55
60
|
!isPreview &&
|
|
56
61
|
expo_constants_1.default?.expoConfig?.newArchEnabled !== false;
|
|
57
62
|
if (shouldUseLinkWithPreview) {
|
|
58
|
-
return
|
|
59
|
-
<LinkWithPreview_1.LinkWithPreview {...props} href={href} hrefForPreviewNavigation={props.href}/>
|
|
60
|
-
</zoom_transition_context_1.ZoomTransitionSourceContext>);
|
|
63
|
+
return <LinkWithPreview_1.LinkWithPreview {...props} href={href} hrefForPreviewNavigation={props.href}/>;
|
|
61
64
|
}
|
|
62
65
|
let children = props.children;
|
|
63
66
|
if (react_1.default.Children.count(props.children) > 1) {
|
|
64
67
|
const arrayChildren = react_1.default.Children.toArray(props.children).filter((child) => !(0, react_1.isValidElement)(child) || (child.type !== elements_1.LinkPreview && child.type !== elements_1.LinkMenu));
|
|
65
68
|
children = arrayChildren.length === 1 ? arrayChildren[0] : props.children;
|
|
66
69
|
}
|
|
67
|
-
return
|
|
68
|
-
<BaseExpoRouterLink_1.BaseExpoRouterLink {...props} href={href} children={children}/>
|
|
69
|
-
</zoom_transition_context_1.ZoomTransitionSourceContext>);
|
|
70
|
+
return <BaseExpoRouterLink_1.BaseExpoRouterLink {...props} href={href} children={children}/>;
|
|
70
71
|
}
|
|
71
72
|
function isLinkWithPreview(props) {
|
|
72
73
|
const isExternal = (0, url_1.shouldLinkExternally)(String(props.href));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoLink.js","sourceRoot":"","sources":["../../src/link/ExpoLink.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcb,
|
|
1
|
+
{"version":3,"file":"ExpoLink.js","sourceRoot":"","sources":["../../src/link/ExpoLink.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcb,4BAMC;AAlBD,oEAAuC;AAC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BAAQ,CAAC,CAC7F,CAAC;QACF,QAAQ,GAAG,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC5E,CAAC;IAED,OAAO,CAAC,uCAAkB,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAAC;AAC3E,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAgB;IACzC,MAAM,UAAU,GAAG,IAAA,0BAAoB,EAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,OAAO,gBAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC1C,CAAC,KAAK,EAAE,EAAE,CACR,IAAA,sBAAc,EAAC,KAAK,CAAC;QACrB,CAAC,CAAC,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAW,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAQ,CAAC,CAC3E,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport Constants from 'expo-constants';\nimport React, { Children, isValidElement } from 'react';\n\nimport { BaseExpoRouterLink } from './BaseExpoRouterLink';\nimport { LinkWithPreview } from './LinkWithPreview';\nimport { LinkMenu, LinkPreview } from './elements';\nimport { useIsPreview } from './preview/PreviewRouteContext';\nimport { LinkProps } from './useLinkHooks';\nimport { useZoomHref } from './zoom/useZoomHref';\nimport { shouldLinkExternally } from '../utils/url';\nimport { ZoomTransitionSourceContextProvider } from './zoom/zoom-transition-context-providers';\n\nexport function ExpoLink(props: LinkProps) {\n return (\n <ZoomTransitionSourceContextProvider linkProps={props}>\n <ExpoLinkImpl {...props} />\n </ZoomTransitionSourceContextProvider>\n );\n}\n\nfunction ExpoLinkImpl(props: LinkProps) {\n const isPreview = useIsPreview();\n const href = useZoomHref(props);\n const shouldUseLinkWithPreview =\n process.env.EXPO_OS === 'ios' &&\n isLinkWithPreview(props) &&\n !isPreview &&\n Constants?.expoConfig?.newArchEnabled !== false;\n if (shouldUseLinkWithPreview) {\n return <LinkWithPreview {...props} href={href} hrefForPreviewNavigation={props.href} />;\n }\n let children = props.children;\n if (React.Children.count(props.children) > 1) {\n const arrayChildren = React.Children.toArray(props.children).filter(\n (child) => !isValidElement(child) || (child.type !== LinkPreview && child.type !== LinkMenu)\n );\n children = arrayChildren.length === 1 ? arrayChildren[0] : props.children;\n }\n\n return <BaseExpoRouterLink {...props} href={href} children={children} />;\n}\n\nfunction isLinkWithPreview(props: LinkProps): boolean {\n const isExternal = shouldLinkExternally(String(props.href));\n return Children.toArray(props.children).some(\n (child) =>\n isValidElement(child) &&\n ((!isExternal && child.type === LinkPreview) || child.type === LinkMenu)\n );\n}\n"]}
|
|
@@ -211,7 +211,7 @@ export interface LinkProps extends Omit<TextProps, 'href'>, WebAnchorProps {
|
|
|
211
211
|
export declare function useInteropClassName(props: {
|
|
212
212
|
style?: TextProps['style'];
|
|
213
213
|
className?: string;
|
|
214
|
-
}): false | "" | import("react-native").TextStyle | (import("react-native").
|
|
214
|
+
}): false | "" | import("react-native").TextStyle | (import("react-native").TextStyle | import("react-native").Falsy | import("react-native").RecursiveArray<import("react-native").TextStyle | import("react-native").Falsy> | readonly (import("react-native").TextStyle | import("react-native").Falsy)[] | {
|
|
215
215
|
$$css: boolean;
|
|
216
216
|
__routerLinkClassName: string;
|
|
217
217
|
})[] | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomTransitionEnabler.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAahF,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ZoomTransitionEnabler.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAahF,wBAAgB,oBAAoB,SAKnC;AAED,wBAAgB,uBAAuB,YAEtC;AAED,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,sCAmC1E"}
|
|
@@ -10,8 +10,10 @@ const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
|
|
|
10
10
|
const native_1 = require("../preview/native");
|
|
11
11
|
let _isZoomTransitionEnabled = false;
|
|
12
12
|
function enableZoomTransition() {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if (process.env.EXPO_OS === 'ios') {
|
|
14
|
+
console.warn('[expo-router] Zoom transition is an experimental feature. Use at your own risk.');
|
|
15
|
+
_isZoomTransitionEnabled = true;
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
function isZoomTransitionEnabled() {
|
|
17
19
|
return _isZoomTransitionEnabled;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomTransitionEnabler.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"ZoomTransitionEnabler.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/ZoomTransitionEnabler.ios.tsx"],"names":[],"mappings":";;AAeA,oDAKC;AAED,0DAEC;AAED,sDAmCC;AA7DD,iCAA4B;AAG5B,qFAAiF;AACjF,6DAKgC;AAChC,wEAA8D;AAC9D,8CAA8D;AAE9D,IAAI,wBAAwB,GAAG,KAAK,CAAC;AAErC,SAAgB,oBAAoB;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAChG,wBAAwB,GAAG,IAAI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AC,EACzD,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { use } from 'react';\n\nimport type { ZoomTransitionEnablerProps } from './ZoomTransitionEnabler.types';\nimport { DescriptorsContext } from '../../fork/native-stack/descriptors-context';\nimport {\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME,\n} from '../../navigationParams';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\nimport { LinkZoomTransitionEnabler } from '../preview/native';\n\nlet _isZoomTransitionEnabled = false;\n\nexport function enableZoomTransition() {\n if (process.env.EXPO_OS === 'ios') {\n console.warn('[expo-router] Zoom transition is an experimental feature. Use at your own risk.');\n _isZoomTransitionEnabled = true;\n }\n}\n\nexport function isZoomTransitionEnabled() {\n return _isZoomTransitionEnabled;\n}\n\nexport function ZoomTransitionEnabler({ route }: ZoomTransitionEnablerProps) {\n const isPreview = useIsPreview();\n if (\n isZoomTransitionEnabled() &&\n !isPreview &&\n route &&\n typeof route === 'object' &&\n 'params' in route &&\n typeof route.params === 'object' &&\n 'key' in route &&\n typeof route.key === 'string'\n ) {\n const params = route.params ?? {};\n const internalParams = getInternalExpoRouterParams(params);\n const zoomTransitionId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];\n const zoomTransitionScreenId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];\n const isLinkPreviewNavigation =\n !!internalParams[INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME];\n const hasZoomTransition =\n !!zoomTransitionId && zoomTransitionScreenId === route.key && !isLinkPreviewNavigation;\n if (hasZoomTransition && typeof zoomTransitionId === 'string') {\n const descriptorsMap = use(DescriptorsContext);\n const currentDescriptor = descriptorsMap[route.key];\n const preventInteractiveDismissal = currentDescriptor?.options?.gestureEnabled === false;\n return (\n <LinkZoomTransitionEnabler\n zoomTransitionSourceIdentifier={zoomTransitionId}\n preventInteractiveDismissal={preventInteractiveDismissal}\n />\n );\n }\n }\n return null;\n}\n"]}
|
|
@@ -29,8 +29,13 @@ function LinkAppleZoomImpl({ children, alignmentRect, ...rest }) {
|
|
|
29
29
|
addSource();
|
|
30
30
|
return removeSource;
|
|
31
31
|
}, [addSource, removeSource]);
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const hasTooManyChildren = react_1.Children.count(children) > 1;
|
|
33
|
+
(0, react_1.useEffect)(() => {
|
|
34
|
+
if (process.env.NODE_ENV !== 'production' && hasTooManyChildren) {
|
|
35
|
+
console.warn('[expo-router] Link.ZoomTransitionSource only accepts a single child component. Please wrap multiple children in a View or another container component.');
|
|
36
|
+
}
|
|
37
|
+
}, [hasTooManyChildren]);
|
|
38
|
+
if (hasTooManyChildren) {
|
|
34
39
|
return null;
|
|
35
40
|
}
|
|
36
41
|
return (<native_1.LinkZoomTransitionSource identifier={identifier} alignment={alignmentRect}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-apple-zoom.js","sourceRoot":"","sources":["../../../src/link/zoom/link-apple-zoom.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AA6Bb,sCAKC;AAhCD,iCAAyE;AAEzE,2EAAsE;AACtE,uEAAwE;AACxE,wCAAqC;AACrC,8CAA6D;AAgB7D;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,KAAyB;IACrD,IAAI,CAAC,IAAA,mDAAuB,GAAE,EAAE,CAAC;QAC/B,OAAO,CAAC,WAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC1C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AC;IAEtD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,SAAS,EAAE,CAAC;QACZ,OAAO,YAAY,CAAC;IACtB,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9B,MAAM,kBAAkB,GAAG,gBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAExD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,kBAAkB,EAAE,CAAC;YAChE,OAAO,CAAC,IAAI,CACV,wJAAwJ,CACzJ,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEzB,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,iCAAwB,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CACzE;MAAA,CAAC,WAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,WAAI,CAClC;IAAA,EAAE,iCAAwB,CAAC,CAC5B,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { Children, use, useEffect, type PropsWithChildren } from 'react';\n\nimport { isZoomTransitionEnabled } from './ZoomTransitionEnabler.ios';\nimport { ZoomTransitionSourceContext } from './zoom-transition-context';\nimport { Slot } from '../../ui/Slot';\nimport { LinkZoomTransitionSource } from '../preview/native';\n\ninterface LinkAppleZoomProps extends PropsWithChildren {\n /**\n * Defines the rectangle used for the zoom transition's alignment. This rectangle is specified in the zoomed screen's coordinate space.\n *\n * @platform ios 18+\n */\n alignmentRect?: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n}\n\n/**\n * When this component is used inside a Link, [zoom transition](https://developer.apple.com/documentation/uikit/enhancing-your-app-with-fluid-transitions?language=objc)\n * will be used when navigating to the link's href.\n *\n * @platform ios 18+\n */\nexport function LinkAppleZoom(props: LinkAppleZoomProps) {\n if (!isZoomTransitionEnabled()) {\n return <Slot {...props} />;\n }\n return <LinkAppleZoomImpl {...props} />;\n}\n\ntype LinkAppleZoomImplProps = LinkAppleZoomProps & {\n onPress?: () => void;\n};\n\nfunction LinkAppleZoomImpl({ children, alignmentRect, ...rest }: LinkAppleZoomImplProps) {\n const value = use(ZoomTransitionSourceContext);\n if (!value) {\n throw new Error('[expo-router] Link.ZoomTransitionSource must be used within a Link');\n }\n const { identifier, addSource, removeSource } = value;\n\n useEffect(() => {\n addSource();\n return removeSource;\n }, [addSource, removeSource]);\n\n const hasTooManyChildren = Children.count(children) > 1;\n\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && hasTooManyChildren) {\n console.warn(\n '[expo-router] Link.ZoomTransitionSource only accepts a single child component. Please wrap multiple children in a View or another container component.'\n );\n }\n }, [hasTooManyChildren]);\n\n if (hasTooManyChildren) {\n return null;\n }\n\n return (\n <LinkZoomTransitionSource identifier={identifier} alignment={alignmentRect}>\n <Slot {...rest}>{children}</Slot>\n </LinkZoomTransitionSource>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useZoomHref.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomHref.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,uCAE9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useZoomHref.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomHref.ios.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,uCA8B9C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useZoomHref = useZoomHref;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const navigationParams_1 = require("../../navigationParams");
|
|
7
|
+
const url_1 = require("../../utils/url");
|
|
8
|
+
const zoom_transition_context_1 = require("./zoom-transition-context");
|
|
9
|
+
function useZoomHref({ href }) {
|
|
10
|
+
const value = (0, react_1.use)(zoom_transition_context_1.ZoomTransitionSourceContext);
|
|
11
|
+
if (!value) {
|
|
12
|
+
throw new Error('[expo-router] useZoomHref must be used within a ZoomTransitionSourceContextProvider. This is most likely a bug in expo-router.');
|
|
13
|
+
}
|
|
14
|
+
const { hasZoomSource, identifier } = value;
|
|
15
|
+
return (0, react_1.useMemo)(() => {
|
|
16
|
+
if (!hasZoomSource) {
|
|
17
|
+
return href;
|
|
18
|
+
}
|
|
19
|
+
if (typeof href === 'string') {
|
|
20
|
+
const { pathname, searchParams } = (0, url_1.parseUrlUsingCustomBase)(href);
|
|
21
|
+
return {
|
|
22
|
+
pathname,
|
|
23
|
+
params: {
|
|
24
|
+
...Object.fromEntries(searchParams.entries()),
|
|
25
|
+
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: identifier,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
pathname: href.pathname,
|
|
31
|
+
params: {
|
|
32
|
+
...(href.params ?? {}),
|
|
33
|
+
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: identifier,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}, [href, identifier, hasZoomSource]);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=useZoomHref.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useZoomHref.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomHref.ios.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AASb,kCA8BC;AArCD,iCAAqC;AAErC,6DAAmG;AACnG,yCAA0D;AAE1D,uEAAwE;AAExE,SAAgB,WAAW,CAAC,EAAE,IAAI,EAAa;IAC7C,MAAM,KAAK,GAAG,IAAA,WAAG,EAAC,qDAA2B,CAAC,CAAC;IAC/C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,gIAAgI,CACjI,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC5C,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAClB,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,6BAAuB,EAAC,IAAI,CAAC,CAAC;YACjE,OAAO;gBACL,QAAQ;gBACR,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;oBAC7C,CAAC,4EAAyD,CAAC,EAAE,UAAU;iBACxE;aACF,CAAC;QACJ,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE;gBACN,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;gBACtB,CAAC,4EAAyD,CAAC,EAAE,UAAU;aACxE;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;AACxC,CAAC","sourcesContent":["'use client';\n\nimport { use, useMemo } from 'react';\n\nimport { INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME } from '../../navigationParams';\nimport { parseUrlUsingCustomBase } from '../../utils/url';\nimport { LinkProps } from '../useLinkHooks';\nimport { ZoomTransitionSourceContext } from './zoom-transition-context';\n\nexport function useZoomHref({ href }: LinkProps) {\n const value = use(ZoomTransitionSourceContext);\n if (!value) {\n throw new Error(\n '[expo-router] useZoomHref must be used within a ZoomTransitionSourceContextProvider. This is most likely a bug in expo-router.'\n );\n }\n const { hasZoomSource, identifier } = value;\n return useMemo(() => {\n if (!hasZoomSource) {\n return href;\n }\n if (typeof href === 'string') {\n const { pathname, searchParams } = parseUrlUsingCustomBase(href);\n return {\n pathname,\n params: {\n ...Object.fromEntries(searchParams.entries()),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: identifier,\n },\n };\n }\n return {\n pathname: href.pathname,\n params: {\n ...(href.params ?? {}),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: identifier,\n },\n };\n }, [href, identifier, hasZoomSource]);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useZoomHref.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomHref.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAIb,kCAEC;AAFD,SAAgB,WAAW,CAAC,EAAE,IAAI,EAAa;IAC7C,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["'use client';\n\nimport { LinkProps } from '../useLinkHooks';\n\nexport function useZoomHref({ href }: LinkProps) {\n return href;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ZoomTransitionSourceContextProviderProps, ZoomTransitionTargetContextProviderProps } from './zoom-transition-context-providers.types';
|
|
2
|
+
export declare function ZoomTransitionSourceContextProvider({ children, }: ZoomTransitionSourceContextProviderProps): import("react").ReactNode;
|
|
3
|
+
export declare function ZoomTransitionTargetContextProvider({ children, }: ZoomTransitionTargetContextProviderProps): import("react").ReactNode;
|
|
4
|
+
//# sourceMappingURL=zoom-transition-context-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACzC,MAAM,2CAA2C,CAAC;AAEnD,wBAAgB,mCAAmC,CAAC,EAClD,QAAQ,GACT,EAAE,wCAAwC,6BAE1C;AAED,wBAAgB,mCAAmC,CAAC,EAClD,QAAQ,GACT,EAAE,wCAAwC,6BAE1C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ZoomTransitionSourceContextProviderProps, ZoomTransitionTargetContextProviderProps } from './zoom-transition-context-providers.types';
|
|
2
|
+
export declare function ZoomTransitionSourceContextProvider({ children, linkProps, }: ZoomTransitionSourceContextProviderProps): import("react").JSX.Element;
|
|
3
|
+
export declare function ZoomTransitionTargetContextProvider({ route, children, }: ZoomTransitionTargetContextProviderProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
4
|
+
//# sourceMappingURL=zoom-transition-context-providers.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.ios.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,wCAAwC,EACxC,wCAAwC,EACzC,MAAM,2CAA2C,CAAC;AASnD,wBAAgB,mCAAmC,CAAC,EAClD,QAAQ,EACR,SAAS,GACV,EAAE,wCAAwC,+BAgD1C;AAED,wBAAgB,mCAAmC,CAAC,EAClD,KAAK,EACL,QAAQ,GACT,EAAE,wCAAwC,+VA4B1C"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ZoomTransitionSourceContextProvider = ZoomTransitionSourceContextProvider;
|
|
5
|
+
exports.ZoomTransitionTargetContextProvider = ZoomTransitionTargetContextProvider;
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const ZoomTransitionEnabler_ios_1 = require("./ZoomTransitionEnabler.ios");
|
|
8
|
+
const zoom_transition_context_1 = require("./zoom-transition-context");
|
|
9
|
+
const navigationParams_1 = require("../../navigationParams");
|
|
10
|
+
const url_1 = require("../../utils/url");
|
|
11
|
+
const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
|
|
12
|
+
function ZoomTransitionSourceContextProvider({ children, linkProps, }) {
|
|
13
|
+
const { href, asChild } = linkProps;
|
|
14
|
+
const isExternalHref = typeof href === 'string' ? (0, url_1.shouldLinkExternally)(href) : (0, url_1.shouldLinkExternally)(href.pathname);
|
|
15
|
+
const numberOfSources = (0, react_1.useRef)(0);
|
|
16
|
+
const [hasZoomSource, setHasZoomSource] = (0, react_1.useState)(false);
|
|
17
|
+
const zoomTransitionId = (0, react_1.useId)();
|
|
18
|
+
const addSource = (0, react_1.useCallback)(() => {
|
|
19
|
+
if (!(0, ZoomTransitionEnabler_ios_1.isZoomTransitionEnabled)()) {
|
|
20
|
+
throw new Error('[expo-router] Zoom transitions are not enabled.');
|
|
21
|
+
}
|
|
22
|
+
if (numberOfSources.current >= 1) {
|
|
23
|
+
throw new Error('[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.');
|
|
24
|
+
}
|
|
25
|
+
if (!asChild) {
|
|
26
|
+
throw new Error('[expo-router] Link must be used with `asChild` prop to enable zoom transitions.');
|
|
27
|
+
}
|
|
28
|
+
if (isExternalHref) {
|
|
29
|
+
throw new Error('[expo-router] Zoom transitions can only be used with internal links.');
|
|
30
|
+
}
|
|
31
|
+
numberOfSources.current += 1;
|
|
32
|
+
setHasZoomSource(true);
|
|
33
|
+
}, [asChild, isExternalHref]);
|
|
34
|
+
const removeSource = (0, react_1.useCallback)(() => {
|
|
35
|
+
numberOfSources.current -= 1;
|
|
36
|
+
if (numberOfSources.current <= 0) {
|
|
37
|
+
setHasZoomSource(false);
|
|
38
|
+
}
|
|
39
|
+
}, []);
|
|
40
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
41
|
+
identifier: zoomTransitionId,
|
|
42
|
+
hasZoomSource,
|
|
43
|
+
addSource,
|
|
44
|
+
removeSource,
|
|
45
|
+
}), [zoomTransitionId, hasZoomSource, addSource, removeSource]);
|
|
46
|
+
return <zoom_transition_context_1.ZoomTransitionSourceContext value={value}>{children}</zoom_transition_context_1.ZoomTransitionSourceContext>;
|
|
47
|
+
}
|
|
48
|
+
function ZoomTransitionTargetContextProvider({ route, children, }) {
|
|
49
|
+
const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
|
|
50
|
+
if ((0, ZoomTransitionEnabler_ios_1.isZoomTransitionEnabled)() &&
|
|
51
|
+
!isPreview &&
|
|
52
|
+
route &&
|
|
53
|
+
typeof route === 'object' &&
|
|
54
|
+
'params' in route &&
|
|
55
|
+
typeof route.params === 'object' &&
|
|
56
|
+
'key' in route &&
|
|
57
|
+
typeof route.key === 'string') {
|
|
58
|
+
const params = route.params ?? {};
|
|
59
|
+
const internalParams = (0, navigationParams_1.getInternalExpoRouterParams)(params);
|
|
60
|
+
const zoomTransitionId = internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];
|
|
61
|
+
const zoomTransitionScreenId = internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];
|
|
62
|
+
const hasZoomTransition = !!zoomTransitionId && zoomTransitionScreenId === route.key;
|
|
63
|
+
if (hasZoomTransition && typeof zoomTransitionId === 'string') {
|
|
64
|
+
return (<zoom_transition_context_1.ZoomTransitionTargetContext value={{ identifier: zoomTransitionId }}>
|
|
65
|
+
{children}
|
|
66
|
+
</zoom_transition_context_1.ZoomTransitionTargetContext>);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return children;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=zoom-transition-context-providers.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.ios.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAsBb,kFAmDC;AAED,kFA+BC;AAxGD,iCAAsE;AAEtE,2EAAsE;AACtE,uEAImC;AAKnC,6DAIgC;AAChC,yCAAuD;AACvD,wEAA8D;AAE9D,SAAgB,mCAAmC,CAAC,EAClD,QAAQ,EACR,SAAS,GACgC;IACzC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IACpC,MAAM,cAAc,GAClB,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,0BAAoB,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,0BAAoB,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9F,MAAM,eAAe,GAAG,IAAA,cAAM,EAAC,CAAC,CAAC,CAAC;IAClC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE1D,MAAM,gBAAgB,GAAG,IAAA,aAAK,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACjC,IAAI,CAAC,IAAA,mDAAuB,GAAE,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,eAAe,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CACb,8FAA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AAO,KAAK,CAAC,GAAG,KAAK,QAAQ,EAC7B,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAClC,MAAM,cAAc,GAAG,IAAA,8CAA2B,EAAC,MAAM,CAAC,CAAC;QAC3D,MAAM,gBAAgB,GACpB,cAAc,CAAC,4EAAyD,CAAC,CAAC;QAC5E,MAAM,sBAAsB,GAC1B,cAAc,CAAC,4EAAyD,CAAC,CAAC;QAC5E,MAAM,iBAAiB,GAAG,CAAC,CAAC,gBAAgB,IAAI,sBAAsB,KAAK,KAAK,CAAC,GAAG,CAAC;QACrF,IAAI,iBAAiB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE,CAAC;YAC9D,OAAO,CACL,CAAC,qDAA2B,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,CACnE;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,qDAA2B,CAAC,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["'use client';\n\nimport { useCallback, useId, useMemo, useRef, useState } from 'react';\n\nimport { isZoomTransitionEnabled } from './ZoomTransitionEnabler.ios';\nimport {\n ZoomTransitionSourceContext,\n ZoomTransitionTargetContext,\n type ZoomTransitionSourceContextValueType,\n} from './zoom-transition-context';\nimport type {\n ZoomTransitionSourceContextProviderProps,\n ZoomTransitionTargetContextProviderProps,\n} from './zoom-transition-context-providers.types';\nimport {\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME,\n} from '../../navigationParams';\nimport { shouldLinkExternally } from '../../utils/url';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\n\nexport function ZoomTransitionSourceContextProvider({\n children,\n linkProps,\n}: ZoomTransitionSourceContextProviderProps) {\n const { href, asChild } = linkProps;\n const isExternalHref =\n typeof href === 'string' ? shouldLinkExternally(href) : shouldLinkExternally(href.pathname);\n const numberOfSources = useRef(0);\n const [hasZoomSource, setHasZoomSource] = useState(false);\n\n const zoomTransitionId = useId();\n\n const addSource = useCallback(() => {\n if (!isZoomTransitionEnabled()) {\n throw new Error('[expo-router] Zoom transitions are not enabled.');\n }\n if (numberOfSources.current >= 1) {\n throw new Error(\n '[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.'\n );\n }\n if (!asChild) {\n throw new Error(\n '[expo-router] Link must be used with `asChild` prop to enable zoom transitions.'\n );\n }\n if (isExternalHref) {\n throw new Error('[expo-router] Zoom transitions can only be used with internal links.');\n }\n numberOfSources.current += 1;\n setHasZoomSource(true);\n }, [asChild, isExternalHref]);\n\n const removeSource = useCallback(() => {\n numberOfSources.current -= 1;\n if (numberOfSources.current <= 0) {\n setHasZoomSource(false);\n }\n }, []);\n\n const value = useMemo<ZoomTransitionSourceContextValueType>(\n () => ({\n identifier: zoomTransitionId,\n hasZoomSource,\n addSource,\n removeSource,\n }),\n [zoomTransitionId, hasZoomSource, addSource, removeSource]\n );\n\n return <ZoomTransitionSourceContext value={value}>{children}</ZoomTransitionSourceContext>;\n}\n\nexport function ZoomTransitionTargetContextProvider({\n route,\n children,\n}: ZoomTransitionTargetContextProviderProps) {\n const isPreview = useIsPreview();\n if (\n isZoomTransitionEnabled() &&\n !isPreview &&\n route &&\n typeof route === 'object' &&\n 'params' in route &&\n typeof route.params === 'object' &&\n 'key' in route &&\n typeof route.key === 'string'\n ) {\n const params = route.params ?? {};\n const internalParams = getInternalExpoRouterParams(params);\n const zoomTransitionId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];\n const zoomTransitionScreenId =\n internalParams[INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];\n const hasZoomTransition = !!zoomTransitionId && zoomTransitionScreenId === route.key;\n if (hasZoomTransition && typeof zoomTransitionId === 'string') {\n return (\n <ZoomTransitionTargetContext value={{ identifier: zoomTransitionId }}>\n {children}\n </ZoomTransitionTargetContext>\n );\n }\n }\n return children;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZoomTransitionSourceContextProvider = ZoomTransitionSourceContextProvider;
|
|
4
|
+
exports.ZoomTransitionTargetContextProvider = ZoomTransitionTargetContextProvider;
|
|
5
|
+
function ZoomTransitionSourceContextProvider({ children, }) {
|
|
6
|
+
return children;
|
|
7
|
+
}
|
|
8
|
+
function ZoomTransitionTargetContextProvider({ children, }) {
|
|
9
|
+
return children;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=zoom-transition-context-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.js","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.tsx"],"names":[],"mappings":";;AAKA,kFAIC;AAED,kFAIC;AAVD,SAAgB,mCAAmC,CAAC,EAClD,QAAQ,GACiC;IACzC,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,mCAAmC,CAAC,EAClD,QAAQ,GACiC;IACzC,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import type {\n ZoomTransitionSourceContextProviderProps,\n ZoomTransitionTargetContextProviderProps,\n} from './zoom-transition-context-providers.types';\n\nexport function ZoomTransitionSourceContextProvider({\n children,\n}: ZoomTransitionSourceContextProviderProps) {\n return children;\n}\n\nexport function ZoomTransitionTargetContextProvider({\n children,\n}: ZoomTransitionTargetContextProviderProps) {\n return children;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { LinkProps } from '../useLinkHooks';
|
|
3
|
+
export interface ZoomTransitionTargetContextProviderProps extends PropsWithChildren {
|
|
4
|
+
route: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface ZoomTransitionSourceContextProviderProps extends PropsWithChildren {
|
|
7
|
+
linkProps: LinkProps;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=zoom-transition-context-providers.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.types.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,wCAAyC,SAAQ,iBAAiB;IACjF,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,wCAAyC,SAAQ,iBAAiB;IACjF,SAAS,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-transition-context-providers.types.js","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context-providers.types.ts"],"names":[],"mappings":"","sourcesContent":["import { type PropsWithChildren } from 'react';\n\nimport type { LinkProps } from '../useLinkHooks';\n\nexport interface ZoomTransitionTargetContextProviderProps extends PropsWithChildren {\n route: unknown;\n}\n\nexport interface ZoomTransitionSourceContextProviderProps extends PropsWithChildren {\n linkProps: LinkProps;\n}\n"]}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { type PropsWithChildren } from 'react';
|
|
2
1
|
export type ZoomTransitionSourceContextValueType = {
|
|
3
2
|
identifier: string;
|
|
3
|
+
hasZoomSource: boolean;
|
|
4
4
|
addSource: () => void;
|
|
5
5
|
removeSource: () => void;
|
|
6
6
|
} | undefined;
|
|
7
7
|
export declare const ZoomTransitionSourceContext: import("react").Context<ZoomTransitionSourceContextValueType>;
|
|
8
|
-
export
|
|
8
|
+
export interface ZoomTransitionTargetContextValueType {
|
|
9
9
|
identifier: string | null;
|
|
10
|
-
}
|
|
11
|
-
export declare
|
|
12
|
-
route: unknown;
|
|
13
|
-
}>): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const ZoomTransitionTargetContext: import("react").Context<ZoomTransitionTargetContextValueType>;
|
|
14
12
|
//# sourceMappingURL=zoom-transition-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoom-transition-context.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zoom-transition-context.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,oCAAoC,GAC5C;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,GACD,SAAS,CAAC;AAEd,eAAO,MAAM,2BAA2B,+DACwB,CAAC;AAEjE,MAAM,WAAW,oCAAoC;IACnD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,2BAA2B,+DAEtC,CAAC"}
|
|
@@ -2,36 +2,9 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ZoomTransitionTargetContext = exports.ZoomTransitionSourceContext = void 0;
|
|
5
|
-
exports.ZoomTransitionTargetContextProvider = ZoomTransitionTargetContextProvider;
|
|
6
5
|
const react_1 = require("react");
|
|
7
|
-
const ZoomTransitionEnabler_ios_1 = require("./ZoomTransitionEnabler.ios");
|
|
8
|
-
const navigationParams_1 = require("../../navigationParams");
|
|
9
|
-
const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
|
|
10
6
|
exports.ZoomTransitionSourceContext = (0, react_1.createContext)(undefined);
|
|
11
7
|
exports.ZoomTransitionTargetContext = (0, react_1.createContext)({
|
|
12
8
|
identifier: null,
|
|
13
9
|
});
|
|
14
|
-
function ZoomTransitionTargetContextProvider({ route, children, }) {
|
|
15
|
-
const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
|
|
16
|
-
if ((0, ZoomTransitionEnabler_ios_1.isZoomTransitionEnabled)() &&
|
|
17
|
-
!isPreview &&
|
|
18
|
-
route &&
|
|
19
|
-
typeof route === 'object' &&
|
|
20
|
-
'params' in route &&
|
|
21
|
-
typeof route.params === 'object' &&
|
|
22
|
-
'key' in route &&
|
|
23
|
-
typeof route.key === 'string') {
|
|
24
|
-
const params = route.params ?? {};
|
|
25
|
-
const internalParams = (0, navigationParams_1.getInternalExpoRouterParams)(params);
|
|
26
|
-
const zoomTransitionId = internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME];
|
|
27
|
-
const zoomTransitionScreenId = internalParams[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME];
|
|
28
|
-
const hasZoomTransition = !!zoomTransitionId && zoomTransitionScreenId === route.key;
|
|
29
|
-
if (hasZoomTransition && typeof zoomTransitionId === 'string') {
|
|
30
|
-
return (<exports.ZoomTransitionTargetContext value={{ identifier: zoomTransitionId }}>
|
|
31
|
-
{children}
|
|
32
|
-
</exports.ZoomTransitionTargetContext>);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return children;
|
|
36
|
-
}
|
|
37
10
|
//# sourceMappingURL=zoom-transition-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoom-transition-context.js","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"zoom-transition-context.js","sourceRoot":"","sources":["../../../src/link/zoom/zoom-transition-context.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AAEb,iCAAsC;AAWzB,QAAA,2BAA2B,GACtC,IAAA,qBAAa,EAAuC,SAAS,CAAC,CAAC;AAMpD,QAAA,2BAA2B,GAAG,IAAA,qBAAa,EAAuC;IAC7F,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC","sourcesContent":["'use client';\n\nimport { createContext } from 'react';\n\nexport type ZoomTransitionSourceContextValueType =\n | {\n identifier: string;\n hasZoomSource: boolean;\n addSource: () => void;\n removeSource: () => void;\n }\n | undefined;\n\nexport const ZoomTransitionSourceContext =\n createContext<ZoomTransitionSourceContextValueType>(undefined);\n\nexport interface ZoomTransitionTargetContextValueType {\n identifier: string | null;\n}\n\nexport const ZoomTransitionTargetContext = createContext<ZoomTransitionTargetContextValueType>({\n identifier: null,\n});\n"]}
|
package/build/useScreens.js
CHANGED
|
@@ -48,7 +48,7 @@ const Route_1 = require("./Route");
|
|
|
48
48
|
const storeContext_1 = require("./global-state/storeContext");
|
|
49
49
|
const import_mode_1 = __importDefault(require("./import-mode"));
|
|
50
50
|
const ZoomTransitionEnabler_1 = require("./link/zoom/ZoomTransitionEnabler");
|
|
51
|
-
const
|
|
51
|
+
const zoom_transition_context_providers_1 = require("./link/zoom/zoom-transition-context-providers");
|
|
52
52
|
const navigationParams_1 = require("./navigationParams");
|
|
53
53
|
const primitives_1 = require("./primitives");
|
|
54
54
|
const EmptyRoute_1 = require("./views/EmptyRoute");
|
|
@@ -224,14 +224,14 @@ function getQualifiedRouteComponent(value) {
|
|
|
224
224
|
}, [navigation]);
|
|
225
225
|
return (<Route_1.Route node={value} route={route}>
|
|
226
226
|
<ZoomTransitionEnabler_1.ZoomTransitionEnabler route={route}/>
|
|
227
|
-
<
|
|
227
|
+
<zoom_transition_context_providers_1.ZoomTransitionTargetContextProvider route={route}>
|
|
228
228
|
<react_1.default.Suspense fallback={<SuspenseFallback_1.SuspenseFallback route={value}/>}>
|
|
229
229
|
<ScreenComponent {...props}
|
|
230
230
|
// Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
|
|
231
231
|
// the intention is to make it possible to deduce shared routes.
|
|
232
232
|
segment={value.route}/>
|
|
233
233
|
</react_1.default.Suspense>
|
|
234
|
-
</
|
|
234
|
+
</zoom_transition_context_providers_1.ZoomTransitionTargetContextProvider>
|
|
235
235
|
</Route_1.Route>);
|
|
236
236
|
}
|
|
237
237
|
if (__DEV__) {
|
package/build/useScreens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScreens.js","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Jb,4CAwBC;AAmDD,gEAkGC;AAED,oDAwBC;AAED,sCAcC;AAED,sCAaC;AA9XD,qDAOkC;AAElC,+CAAyC;AAEzC,mCAA6F;AAC7F,8DAAiE;AACjE,gEAAoD;AACpD,6EAA0E;AAC1E,iFAA0F;AAC1F,yDAI4B;AAC5B,6CAAsC;AAEtC,mDAAgD;AAChD,+DAA4D;AAC5D,qCAAkC;AAmClC,SAAS,iBAAiB,CACxB,QAAqB,EACrB,QAAuB,EAAE,EACzB,gBAAyB;IAEzB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,QAAQ;aACZ,IAAI,CAAC,IAAA,6BAAqB,EAAC,gBAAgB,CAAC,CAAC;aAC7C,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IAE9B,MA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ase,\n type NavigationState,\n type ParamListBase,\n type RouteProp,\n type ScreenListeners,\n} from '@react-navigation/native';\nimport type { NativeStackNavigationEventMap } from '@react-navigation/native-stack';\nimport React, { useEffect } from 'react';\n\nimport { LoadedRoute, Route, RouteNode, sortRoutesWithInitial, useRouteNode } from './Route';\nimport { useExpoRouterStore } from './global-state/storeContext';\nimport EXPO_ROUTER_IMPORT_MODE from './import-mode';\nimport { ZoomTransitionEnabler } from './link/zoom/ZoomTransitionEnabler';\nimport { ZoomTransitionTargetContextProvider } from './link/zoom/zoom-transition-context';\nimport {\n hasParam,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n removeParams,\n} from './navigationParams';\nimport { Screen } from './primitives';\nimport { UnknownOutputParams } from './types';\nimport { EmptyRoute } from './views/EmptyRoute';\nimport { SuspenseFallback } from './views/SuspenseFallback';\nimport { Try } from './views/Try';\n\nexport type ScreenProps<\n TOptions extends Record<string, any> = Record<string, any>,\n TState extends NavigationState = NavigationState,\n TEventMap extends EventMapBase = EventMapBase,\n> = {\n /** Name is required when used inside a Layout component. */\n name?: string;\n /**\n * Redirect to the nearest sibling route.\n * If all children are `redirect={true}`, the layout will render `null` as there are no children to render.\n */\n redirect?: boolean;\n initialParams?: Record<string, any>;\n options?:\n | TOptions\n | ((prop: { route: RouteProp<ParamListBase, string>; navigation: any }) => TOptions);\n\n listeners?:\n | ScreenListeners<TState, TEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenListeners<TState, TEventMap>);\n\n getId?: ({ params }: { params?: Record<string, any> }) => string | undefined;\n\n dangerouslySingular?: SingularOptions;\n};\n\nexport type SingularOptions =\n | boolean\n | ((name: string, params: UnknownOutputParams) => string | undefined);\n\nfunction getSortedChildren(\n children: RouteNode[],\n order: ScreenProps[] = [],\n initialRouteName?: string\n): { route: RouteNode; props: Partial<ScreenProps> }[] {\n if (!order?.length) {\n return children\n .sort(sortRoutesWithInitial(initialRouteName))\n .map((route) => ({ route, props: {} }));\n }\n const entries = [...children];\n\n const ordered = order\n .map(\n ({\n name,\n redirect,\n initialParams,\n listeners,\n options,\n getId,\n dangerouslySingular: singular,\n }) => {\n if (!entries.length) {\n console.warn(\n `[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`\n );\n return null;\n }\n const matchIndex = entries.findIndex((child) => child.route === name);\n if (matchIndex === -1) {\n console.warn(\n `[Layout children]: No route named \"${name}\" exists in nested children:`,\n children.map(({ route }) => route)\n );\n return null;\n } else {\n // Get match and remove from entries\n const match = entries[matchIndex];\n entries.splice(matchIndex, 1);\n\n // Ensure to return null after removing from entries.\n if (redirect) {\n if (typeof redirect === 'string') {\n throw new Error(`Redirecting to a specific route is not supported yet.`);\n }\n return null;\n }\n\n if (getId) {\n console.warn(\n `Deprecated: prop 'getId' on screen ${name} is deprecated. Please rename the prop to 'dangerouslySingular'`\n );\n if (singular) {\n console.warn(\n `Screen ${name} cannot use both getId and dangerouslySingular together.`\n );\n }\n } else if (singular) {\n // If singular is set, use it as the getId function.\n if (typeof singular === 'string') {\n getId = () => singular;\n } else if (typeof singular === 'function' && name) {\n getId = (options) => singular(name, options.params || {});\n } else if (singular === true && name) {\n getId = (options) => getSingularId(name, options);\n }\n }\n\n return {\n route: match,\n props: { initialParams, listeners, options, getId },\n };\n }\n }\n )\n .filter(Boolean) as {\n route: RouteNode;\n props: Partial<ScreenProps>;\n }[];\n\n // Add any remaining children\n ordered.push(\n ...entries.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({ route, props: {} }))\n );\n\n return ordered;\n}\n\n/**\n * @returns React Navigation screens sorted by the `route` property.\n */\nexport function useSortedScreens(\n order: ScreenProps[],\n protectedScreens: Set<string>,\n useOnlyUserDefinedScreens: boolean = false\n): React.ReactNode[] {\n const node = useRouteNode();\n\n const nodeChildren = node?.children ?? [];\n const children = useOnlyUserDefinedScreens\n ? nodeChildren.filter((child) =>\n order.some((userDefinedScreen) => userDefinedScreen.name === child.route)\n )\n : nodeChildren;\n\n const sorted = children.length ? getSortedChildren(children, order, node?.initialRouteName) : [];\n return React.useMemo(\n () =>\n sorted\n .filter((item) => !protectedScreens.has(item.route.route))\n .map((value) => {\n return routeToScreen(value.route, value.props);\n }),\n [sorted, protectedScreens]\n );\n}\n\nfunction fromImport(value: RouteNode, { ErrorBoundary, ...component }: LoadedRoute) {\n // If possible, add a more helpful display name for the component stack to improve debugging of React errors such as `Text strings must be rendered within a <Text> component.`.\n if (component?.default && __DEV__) {\n component.default.displayName ??= `${component.default.name ?? 'Route'}(${value.contextKey})`;\n }\n\n if (ErrorBoundary) {\n const Wrapped = React.forwardRef((props: any, ref: any) => {\n const children = React.createElement(component.default || EmptyRoute, {\n ...props,\n ref,\n });\n return <Try catch={ErrorBoundary}>{children}</Try>;\n });\n\n if (__DEV__) {\n Wrapped.displayName = `ErrorBoundary(${value.contextKey})`;\n }\n\n return {\n default: Wrapped,\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof component.default === 'object' &&\n component.default &&\n Object.keys(component.default).length === 0\n ) {\n return { default: EmptyRoute };\n }\n }\n\n return { default: component.default };\n}\n\nfunction fromLoadedRoute(value: RouteNode, res: LoadedRoute) {\n if (!(res instanceof Promise)) {\n return fromImport(value, res);\n }\n\n return res.then(fromImport.bind(null, value));\n}\n\n// TODO: Maybe there's a more React-y way to do this?\n// Without this store, the process enters a recursive loop.\nconst qualifiedStore = new WeakMap<RouteNode, React.ComponentType<any>>();\n\n/** Wrap the component with various enhancements and add access to child routes. */\nexport function getQualifiedRouteComponent(value: RouteNode) {\n if (qualifiedStore.has(value)) {\n return qualifiedStore.get(value)!;\n }\n\n let ScreenComponent:\n | React.ForwardRefExoticComponent<React.RefAttributes<unknown>>\n | React.ComponentType<any>;\n\n // TODO: This ensures sync doesn't use React.lazy, but it's not ideal.\n if (EXPO_ROUTER_IMPORT_MODE === 'lazy') {\n ScreenComponent = React.lazy(async () => {\n const res = value.loadRoute();\n return fromLoadedRoute(value, res) as Promise<{\n default: React.ComponentType<any>;\n }>;\n });\n\n if (__DEV__) {\n ScreenComponent.displayName = `AsyncRoute(${value.route})`;\n }\n } else {\n const res = value.loadRoute();\n ScreenComponent = fromImport(value, res).default!;\n }\n function BaseRoute({\n // Remove these React Navigation props to\n // enforce usage of expo-router hooks (where the query params are correct).\n route,\n navigation,\n\n // Pass all other props to the component\n ...props\n }: any) {\n const stateForPath = useStateForPath();\n const isFocused = navigation.isFocused();\n const store = useExpoRouterStore();\n\n if (isFocused) {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }\n\n useEffect(\n () =>\n navigation.addListener('focus', () => {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n // Because setFocusedState caches the route info, this call will only trigger rerenders\n // if the component itself didn’t rerender and the route info changed.\n // Otherwise, the update from the `if` above will handle it,\n // and this won’t cause a redundant second update.\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }),\n [navigation]\n );\n\n useEffect(() => {\n return navigation.addListener(\n 'transitionEnd',\n (e?: NativeStackNavigationEventMap['transitionEnd']) => {\n if (!e?.data?.closing) {\n // When navigating to a screen, remove the no animation param to re-enable animations\n // Otherwise the navigation back would also have no animation\n if (hasParam(route?.params, INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME)) {\n navigation.replaceParams(\n removeParams(route?.params, [INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME])\n );\n }\n }\n }\n );\n }, [navigation]);\n\n return (\n <Route node={value} route={route}>\n <ZoomTransitionEnabler route={route} />\n <ZoomTransitionTargetContextProvider route={route}>\n <React.Suspense fallback={<SuspenseFallback route={value} />}>\n <ScreenComponent\n {...props}\n // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`\n // the intention is to make it possible to deduce shared routes.\n segment={value.route}\n />\n </React.Suspense>\n </ZoomTransitionTargetContextProvider>\n </Route>\n );\n }\n\n if (__DEV__) {\n BaseRoute.displayName = `Route(${value.route})`;\n }\n\n qualifiedStore.set(value, BaseRoute);\n return BaseRoute;\n}\n\nexport function screenOptionsFactory(\n route: RouteNode,\n options?: ScreenProps['options']\n): ScreenProps['options'] {\n return (args) => {\n // Only eager load generated components\n const staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n const staticResult = typeof staticOptions === 'function' ? staticOptions(args) : staticOptions;\n const dynamicResult = typeof options === 'function' ? options?.(args) : options;\n const output = {\n ...staticResult,\n ...dynamicResult,\n };\n\n // Prevent generated screens from showing up in the tab bar.\n if (route.internal) {\n output.tabBarItemStyle = { display: 'none' };\n output.tabBarButton = () => null;\n // TODO: React Navigation doesn't provide a way to prevent rendering the drawer item.\n output.drawerItemStyle = { height: 0, display: 'none' };\n }\n\n return output;\n };\n}\n\nexport function routeToScreen(\n route: RouteNode,\n { options, getId, ...props }: Partial<ScreenProps> = {}\n) {\n return (\n <Screen\n {...props}\n name={route.route}\n key={route.route}\n getId={getId}\n options={screenOptionsFactory(route, options)}\n getComponent={() => getQualifiedRouteComponent(route)}\n />\n );\n}\n\nexport function getSingularId(name: string, options: Record<string, any> = {}) {\n return name\n .split('/')\n .map((segment) => {\n if (segment.startsWith('[...')) {\n return options.params?.[segment.slice(4, -1)]?.join('/') || segment;\n } else if (segment.startsWith('[') && segment.endsWith(']')) {\n return options.params?.[segment.slice(1, -1)] || segment;\n } else {\n return segment;\n }\n })\n .join('/');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useScreens.js","sourceRoot":"","sources":["../src/useScreens.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0Jb,4CAwBC;AAmDD,gEAkGC;AAED,oDAwBC;AAED,sCAcC;AAED,sCAaC;AA9XD,qDAOkC;AAElC,+CAAyC;AAEzC,mCAA6F;AAC7F,8DAAiE;AACjE,gEAAoD;AACpD,6EAA0E;AAC1E,qGAAoG;AACpG,yDAI4B;AA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E,IAAI,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC;QACtE,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5D,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["'use client';\n\nimport {\n useStateForPath,\n type EventMapBase,\n type NavigationState,\n type ParamListBase,\n type RouteProp,\n type ScreenListeners,\n} from '@react-navigation/native';\nimport type { NativeStackNavigationEventMap } from '@react-navigation/native-stack';\nimport React, { useEffect } from 'react';\n\nimport { LoadedRoute, Route, RouteNode, sortRoutesWithInitial, useRouteNode } from './Route';\nimport { useExpoRouterStore } from './global-state/storeContext';\nimport EXPO_ROUTER_IMPORT_MODE from './import-mode';\nimport { ZoomTransitionEnabler } from './link/zoom/ZoomTransitionEnabler';\nimport { ZoomTransitionTargetContextProvider } from './link/zoom/zoom-transition-context-providers';\nimport {\n hasParam,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n removeParams,\n} from './navigationParams';\nimport { Screen } from './primitives';\nimport { UnknownOutputParams } from './types';\nimport { EmptyRoute } from './views/EmptyRoute';\nimport { SuspenseFallback } from './views/SuspenseFallback';\nimport { Try } from './views/Try';\n\nexport type ScreenProps<\n TOptions extends Record<string, any> = Record<string, any>,\n TState extends NavigationState = NavigationState,\n TEventMap extends EventMapBase = EventMapBase,\n> = {\n /** Name is required when used inside a Layout component. */\n name?: string;\n /**\n * Redirect to the nearest sibling route.\n * If all children are `redirect={true}`, the layout will render `null` as there are no children to render.\n */\n redirect?: boolean;\n initialParams?: Record<string, any>;\n options?:\n | TOptions\n | ((prop: { route: RouteProp<ParamListBase, string>; navigation: any }) => TOptions);\n\n listeners?:\n | ScreenListeners<TState, TEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenListeners<TState, TEventMap>);\n\n getId?: ({ params }: { params?: Record<string, any> }) => string | undefined;\n\n dangerouslySingular?: SingularOptions;\n};\n\nexport type SingularOptions =\n | boolean\n | ((name: string, params: UnknownOutputParams) => string | undefined);\n\nfunction getSortedChildren(\n children: RouteNode[],\n order: ScreenProps[] = [],\n initialRouteName?: string\n): { route: RouteNode; props: Partial<ScreenProps> }[] {\n if (!order?.length) {\n return children\n .sort(sortRoutesWithInitial(initialRouteName))\n .map((route) => ({ route, props: {} }));\n }\n const entries = [...children];\n\n const ordered = order\n .map(\n ({\n name,\n redirect,\n initialParams,\n listeners,\n options,\n getId,\n dangerouslySingular: singular,\n }) => {\n if (!entries.length) {\n console.warn(\n `[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`\n );\n return null;\n }\n const matchIndex = entries.findIndex((child) => child.route === name);\n if (matchIndex === -1) {\n console.warn(\n `[Layout children]: No route named \"${name}\" exists in nested children:`,\n children.map(({ route }) => route)\n );\n return null;\n } else {\n // Get match and remove from entries\n const match = entries[matchIndex];\n entries.splice(matchIndex, 1);\n\n // Ensure to return null after removing from entries.\n if (redirect) {\n if (typeof redirect === 'string') {\n throw new Error(`Redirecting to a specific route is not supported yet.`);\n }\n return null;\n }\n\n if (getId) {\n console.warn(\n `Deprecated: prop 'getId' on screen ${name} is deprecated. Please rename the prop to 'dangerouslySingular'`\n );\n if (singular) {\n console.warn(\n `Screen ${name} cannot use both getId and dangerouslySingular together.`\n );\n }\n } else if (singular) {\n // If singular is set, use it as the getId function.\n if (typeof singular === 'string') {\n getId = () => singular;\n } else if (typeof singular === 'function' && name) {\n getId = (options) => singular(name, options.params || {});\n } else if (singular === true && name) {\n getId = (options) => getSingularId(name, options);\n }\n }\n\n return {\n route: match,\n props: { initialParams, listeners, options, getId },\n };\n }\n }\n )\n .filter(Boolean) as {\n route: RouteNode;\n props: Partial<ScreenProps>;\n }[];\n\n // Add any remaining children\n ordered.push(\n ...entries.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({ route, props: {} }))\n );\n\n return ordered;\n}\n\n/**\n * @returns React Navigation screens sorted by the `route` property.\n */\nexport function useSortedScreens(\n order: ScreenProps[],\n protectedScreens: Set<string>,\n useOnlyUserDefinedScreens: boolean = false\n): React.ReactNode[] {\n const node = useRouteNode();\n\n const nodeChildren = node?.children ?? [];\n const children = useOnlyUserDefinedScreens\n ? nodeChildren.filter((child) =>\n order.some((userDefinedScreen) => userDefinedScreen.name === child.route)\n )\n : nodeChildren;\n\n const sorted = children.length ? getSortedChildren(children, order, node?.initialRouteName) : [];\n return React.useMemo(\n () =>\n sorted\n .filter((item) => !protectedScreens.has(item.route.route))\n .map((value) => {\n return routeToScreen(value.route, value.props);\n }),\n [sorted, protectedScreens]\n );\n}\n\nfunction fromImport(value: RouteNode, { ErrorBoundary, ...component }: LoadedRoute) {\n // If possible, add a more helpful display name for the component stack to improve debugging of React errors such as `Text strings must be rendered within a <Text> component.`.\n if (component?.default && __DEV__) {\n component.default.displayName ??= `${component.default.name ?? 'Route'}(${value.contextKey})`;\n }\n\n if (ErrorBoundary) {\n const Wrapped = React.forwardRef((props: any, ref: any) => {\n const children = React.createElement(component.default || EmptyRoute, {\n ...props,\n ref,\n });\n return <Try catch={ErrorBoundary}>{children}</Try>;\n });\n\n if (__DEV__) {\n Wrapped.displayName = `ErrorBoundary(${value.contextKey})`;\n }\n\n return {\n default: Wrapped,\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n if (\n typeof component.default === 'object' &&\n component.default &&\n Object.keys(component.default).length === 0\n ) {\n return { default: EmptyRoute };\n }\n }\n\n return { default: component.default };\n}\n\nfunction fromLoadedRoute(value: RouteNode, res: LoadedRoute) {\n if (!(res instanceof Promise)) {\n return fromImport(value, res);\n }\n\n return res.then(fromImport.bind(null, value));\n}\n\n// TODO: Maybe there's a more React-y way to do this?\n// Without this store, the process enters a recursive loop.\nconst qualifiedStore = new WeakMap<RouteNode, React.ComponentType<any>>();\n\n/** Wrap the component with various enhancements and add access to child routes. */\nexport function getQualifiedRouteComponent(value: RouteNode) {\n if (qualifiedStore.has(value)) {\n return qualifiedStore.get(value)!;\n }\n\n let ScreenComponent:\n | React.ForwardRefExoticComponent<React.RefAttributes<unknown>>\n | React.ComponentType<any>;\n\n // TODO: This ensures sync doesn't use React.lazy, but it's not ideal.\n if (EXPO_ROUTER_IMPORT_MODE === 'lazy') {\n ScreenComponent = React.lazy(async () => {\n const res = value.loadRoute();\n return fromLoadedRoute(value, res) as Promise<{\n default: React.ComponentType<any>;\n }>;\n });\n\n if (__DEV__) {\n ScreenComponent.displayName = `AsyncRoute(${value.route})`;\n }\n } else {\n const res = value.loadRoute();\n ScreenComponent = fromImport(value, res).default!;\n }\n function BaseRoute({\n // Remove these React Navigation props to\n // enforce usage of expo-router hooks (where the query params are correct).\n route,\n navigation,\n\n // Pass all other props to the component\n ...props\n }: any) {\n const stateForPath = useStateForPath();\n const isFocused = navigation.isFocused();\n const store = useExpoRouterStore();\n\n if (isFocused) {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }\n\n useEffect(\n () =>\n navigation.addListener('focus', () => {\n const state = navigation.getState();\n const isLeaf = !('state' in state.routes[state.index]);\n // Because setFocusedState caches the route info, this call will only trigger rerenders\n // if the component itself didn’t rerender and the route info changed.\n // Otherwise, the update from the `if` above will handle it,\n // and this won’t cause a redundant second update.\n if (isLeaf && stateForPath) store.setFocusedState(stateForPath);\n }),\n [navigation]\n );\n\n useEffect(() => {\n return navigation.addListener(\n 'transitionEnd',\n (e?: NativeStackNavigationEventMap['transitionEnd']) => {\n if (!e?.data?.closing) {\n // When navigating to a screen, remove the no animation param to re-enable animations\n // Otherwise the navigation back would also have no animation\n if (hasParam(route?.params, INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME)) {\n navigation.replaceParams(\n removeParams(route?.params, [INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME])\n );\n }\n }\n }\n );\n }, [navigation]);\n\n return (\n <Route node={value} route={route}>\n <ZoomTransitionEnabler route={route} />\n <ZoomTransitionTargetContextProvider route={route}>\n <React.Suspense fallback={<SuspenseFallback route={value} />}>\n <ScreenComponent\n {...props}\n // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`\n // the intention is to make it possible to deduce shared routes.\n segment={value.route}\n />\n </React.Suspense>\n </ZoomTransitionTargetContextProvider>\n </Route>\n );\n }\n\n if (__DEV__) {\n BaseRoute.displayName = `Route(${value.route})`;\n }\n\n qualifiedStore.set(value, BaseRoute);\n return BaseRoute;\n}\n\nexport function screenOptionsFactory(\n route: RouteNode,\n options?: ScreenProps['options']\n): ScreenProps['options'] {\n return (args) => {\n // Only eager load generated components\n const staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n const staticResult = typeof staticOptions === 'function' ? staticOptions(args) : staticOptions;\n const dynamicResult = typeof options === 'function' ? options?.(args) : options;\n const output = {\n ...staticResult,\n ...dynamicResult,\n };\n\n // Prevent generated screens from showing up in the tab bar.\n if (route.internal) {\n output.tabBarItemStyle = { display: 'none' };\n output.tabBarButton = () => null;\n // TODO: React Navigation doesn't provide a way to prevent rendering the drawer item.\n output.drawerItemStyle = { height: 0, display: 'none' };\n }\n\n return output;\n };\n}\n\nexport function routeToScreen(\n route: RouteNode,\n { options, getId, ...props }: Partial<ScreenProps> = {}\n) {\n return (\n <Screen\n {...props}\n name={route.route}\n key={route.route}\n getId={getId}\n options={screenOptionsFactory(route, options)}\n getComponent={() => getQualifiedRouteComponent(route)}\n />\n );\n}\n\nexport function getSingularId(name: string, options: Record<string, any> = {}) {\n return name\n .split('/')\n .map((segment) => {\n if (segment.startsWith('[...')) {\n return options.params?.[segment.slice(4, -1)]?.join('/') || segment;\n } else if (segment.startsWith('[') && segment.endsWith(']')) {\n return options.params?.[segment.slice(1, -1)] || segment;\n } else {\n return segment;\n }\n })\n .join('/');\n}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.router",
|
|
5
5
|
"module": "expo.modules.router",
|
|
6
|
-
"version": "7.0.0-canary-
|
|
6
|
+
"version": "7.0.0-canary-20251212-acb11f2",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
28
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
27
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
28
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
29
29
|
"size": 13671,
|
|
30
30
|
"sha512": "f51bd2a6d3fcc9075dbf99d66f77162d530586d0793d68e109a55f6edfbe4ff98bc9c9c5d587d0feec99807b6ae94a729232000e89f840278b21f4d423caa520",
|
|
31
31
|
"sha256": "089d182f36875a201ad1b30b44d39812cd5155af987f3d33cd5eef8542103c82",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
],
|
|
61
61
|
"files": [
|
|
62
62
|
{
|
|
63
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
64
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
63
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
64
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2.aar",
|
|
65
65
|
"size": 13671,
|
|
66
66
|
"sha512": "f51bd2a6d3fcc9075dbf99d66f77162d530586d0793d68e109a55f6edfbe4ff98bc9c9c5d587d0feec99807b6ae94a729232000e89f840278b21f4d423caa520",
|
|
67
67
|
"sha256": "089d182f36875a201ad1b30b44d39812cd5155af987f3d33cd5eef8542103c82",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
{
|
|
83
|
-
"name": "expo.modules.router-7.0.0-canary-
|
|
84
|
-
"url": "expo.modules.router-7.0.0-canary-
|
|
83
|
+
"name": "expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar",
|
|
84
|
+
"url": "expo.modules.router-7.0.0-canary-20251212-acb11f2-sources.jar",
|
|
85
85
|
"size": 2318,
|
|
86
86
|
"sha512": "9864add8e93e3c0a9a9c930aaed67016b15054c3fafd59a0bd3a5402d7cdc5827be84c22c2c137f3e5acb4e39270d9bfb9ca3fe11234458d4f2e0d4c78747f48",
|
|
87
87
|
"sha256": "d5dff6259e86de721fc0f07fe740a5e18088e19b76738719b0a6f94caef06224",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
63799c2588bcab02f32e7f36d8da2f59
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6e3a50bfc261ac93dbeeaea71385e108dfe28145
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
178b09b7f1ee9b8e76cded79d7e6bc3aebe1e0dc44890c10ea092578aba53a42
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1c51124e4dff9122ca6e2f9841a2ef7c6a5642e874a49fbe127a056b77acf5592ed2dfc49d0edcc6ee36024ac519f37401c72024ea1032e930c6531dce5813dd
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.router</groupId>
|
|
11
11
|
<artifactId>expo.modules.router</artifactId>
|
|
12
|
-
<version>7.0.0-canary-
|
|
12
|
+
<version>7.0.0-canary-20251212-acb11f2</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.router</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1ae40958c4c97d79e497a07caaa9c564
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d5c967ca56caf7af963aeba0b6225a51de2545b5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9f59a92438de015917762757c73db2320369aa989a0c56bc04d5e3dd505f93af
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
15b6d757c52ad72cabc16dbb12c90ba9071ca71942dcbe0b7521af0fd84380a9591c1f987c75badc416cbebee446aa5ea65e99ca6ff492598d389f56d3c01719
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>7.0.0-canary-
|
|
7
|
-
<release>7.0.0-canary-
|
|
6
|
+
<latest>7.0.0-canary-20251212-acb11f2</latest>
|
|
7
|
+
<release>7.0.0-canary-20251212-acb11f2</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>7.0.0-canary-
|
|
9
|
+
<version>7.0.0-canary-20251212-acb11f2</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20251212085744</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c95eebefc801b91bbb5ef2d1a05e60cb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20d756935a24a0cafc35173ff678bc21ed933bc4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9680ebbdc7b5c576e9e5d7c9be67280423918a827180d04401df75717fc28c90
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f9b4a239b8ee09f92b8add4acebb402edf663a90c4a13f387051c4c407142339d070e62a344baff2b1ccaf8f8a464157798b92c49d4cf64b85ada473846d3465
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "7.0.0-canary-
|
|
3
|
+
"version": "7.0.0-canary-20251212-acb11f2",
|
|
4
4
|
"description": "Expo Router is a file-based router for React Native and web applications.",
|
|
5
5
|
"author": "650 Industries, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"expo"
|
|
84
84
|
],
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
87
|
-
"@expo/log-box": "0.0.13-canary-
|
|
86
|
+
"@expo/metro-runtime": "6.2.0-canary-20251212-acb11f2",
|
|
87
|
+
"@expo/log-box": "0.0.13-canary-20251212-acb11f2",
|
|
88
88
|
"@react-navigation/drawer": "^7.7.2",
|
|
89
89
|
"@testing-library/react-native": ">= 12.0.0",
|
|
90
|
-
"expo": "55.0.0-canary-
|
|
91
|
-
"expo-constants": "18.1.0-canary-
|
|
92
|
-
"expo-linking": "8.0.11-canary-
|
|
93
|
-
"expo-symbols": "1.1.0-canary-
|
|
90
|
+
"expo": "55.0.0-canary-20251212-acb11f2",
|
|
91
|
+
"expo-constants": "18.1.0-canary-20251212-acb11f2",
|
|
92
|
+
"expo-linking": "8.0.11-canary-20251212-acb11f2",
|
|
93
|
+
"expo-symbols": "1.1.0-canary-20251212-acb11f2",
|
|
94
94
|
"react": "*",
|
|
95
95
|
"react-dom": "*",
|
|
96
96
|
"react-native": "*",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"react-native-safe-area-context": ">= 5.4.0",
|
|
100
100
|
"react-native-screens": "*",
|
|
101
101
|
"react-native-web": "*",
|
|
102
|
-
"react-server-dom-webpack": "~19.0.
|
|
102
|
+
"react-server-dom-webpack": "~19.0.3 || ~19.1.4 || ~19.2.3"
|
|
103
103
|
},
|
|
104
104
|
"peerDependenciesMeta": {
|
|
105
105
|
"@testing-library/react-native": {
|
|
@@ -132,11 +132,11 @@
|
|
|
132
132
|
"@types/react-dom": "^19.1.7",
|
|
133
133
|
"@types/semver": "^7.7.0",
|
|
134
134
|
"immer": "^10.1.1",
|
|
135
|
-
"react-server-dom-webpack": "~19.0.
|
|
135
|
+
"react-server-dom-webpack": "~19.0.3"
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@expo/metro-runtime": "6.2.0-canary-
|
|
139
|
-
"@expo/schema-utils": "0.1.9-canary-
|
|
138
|
+
"@expo/metro-runtime": "6.2.0-canary-20251212-acb11f2",
|
|
139
|
+
"@expo/schema-utils": "0.1.9-canary-20251212-acb11f2",
|
|
140
140
|
"@radix-ui/react-slot": "1.2.0",
|
|
141
141
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
142
142
|
"@react-navigation/bottom-tabs": "^7.7.3",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"client-only": "^0.0.1",
|
|
146
146
|
"debug": "^4.3.4",
|
|
147
147
|
"escape-string-regexp": "^4.0.0",
|
|
148
|
-
"expo-server": "1.0.6-canary-
|
|
148
|
+
"expo-server": "1.0.6-canary-20251212-acb11f2",
|
|
149
149
|
"fast-deep-equal": "^3.1.3",
|
|
150
150
|
"invariant": "^2.2.4",
|
|
151
151
|
"nanoid": "^3.3.8",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LinkProps } from '../useLinkHooks';
|
|
2
|
-
export declare function useZoomTransitionPrimitives({ href }: LinkProps): {
|
|
3
|
-
zoomTransitionSourceContextValue: undefined;
|
|
4
|
-
href: string | import("../..").HrefObject;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,wBAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;;;EAG9D"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LinkProps } from '../useLinkHooks';
|
|
2
|
-
export declare function useZoomTransitionPrimitives({ href, asChild }: LinkProps): {
|
|
3
|
-
zoomTransitionSourceContextValue: {
|
|
4
|
-
identifier: string;
|
|
5
|
-
addSource: () => void;
|
|
6
|
-
removeSource: () => void;
|
|
7
|
-
canAddSource: boolean;
|
|
8
|
-
} | undefined;
|
|
9
|
-
href: string | import("../..").HrefObject;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.ios.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.ios.d.ts","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.ios.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,wBAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS;;;;;;;;EAuEvE"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useZoomTransitionPrimitives = useZoomTransitionPrimitives;
|
|
5
|
-
const non_secure_1 = require("nanoid/non-secure");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const ZoomTransitionEnabler_1 = require("./ZoomTransitionEnabler");
|
|
8
|
-
const navigationParams_1 = require("../../navigationParams");
|
|
9
|
-
const url_1 = require("../../utils/url");
|
|
10
|
-
const PreviewRouteContext_1 = require("../preview/PreviewRouteContext");
|
|
11
|
-
function useZoomTransitionPrimitives({ href, asChild }) {
|
|
12
|
-
const isPreview = (0, PreviewRouteContext_1.useIsPreview)();
|
|
13
|
-
const zoomTransitionId = (0, react_1.useMemo)(() => !isPreview && process.env.EXPO_OS === 'ios' && (0, ZoomTransitionEnabler_1.isZoomTransitionEnabled)()
|
|
14
|
-
? (0, non_secure_1.nanoid)()
|
|
15
|
-
: undefined, []);
|
|
16
|
-
const [numberOfSources, setNumberOfSources] = (0, react_1.useState)(0);
|
|
17
|
-
const addSource = (0, react_1.useCallback)(() => {
|
|
18
|
-
setNumberOfSources((prev) => prev + 1);
|
|
19
|
-
}, []);
|
|
20
|
-
const removeSource = (0, react_1.useCallback)(() => {
|
|
21
|
-
setNumberOfSources((prev) => prev - 1);
|
|
22
|
-
}, []);
|
|
23
|
-
const hasZoomSource = numberOfSources > 0;
|
|
24
|
-
(0, react_1.useEffect)(() => {
|
|
25
|
-
if (numberOfSources > 1) {
|
|
26
|
-
throw new Error('[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.');
|
|
27
|
-
}
|
|
28
|
-
}, [numberOfSources]);
|
|
29
|
-
(0, react_1.useEffect)(() => {
|
|
30
|
-
if (hasZoomSource && !asChild) {
|
|
31
|
-
console.warn('[expo-router] Using zoom transition links without `asChild` prop may lead to unexpected behavior. Please ensure to set `asChild` when using zoom transitions.');
|
|
32
|
-
}
|
|
33
|
-
}, [hasZoomSource, asChild]);
|
|
34
|
-
const zoomTransitionSourceContextValue = (0, react_1.useMemo)(() => {
|
|
35
|
-
if (!zoomTransitionId) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
identifier: zoomTransitionId,
|
|
40
|
-
addSource,
|
|
41
|
-
removeSource,
|
|
42
|
-
canAddSource: !hasZoomSource,
|
|
43
|
-
};
|
|
44
|
-
}, [zoomTransitionId, addSource, removeSource, hasZoomSource]);
|
|
45
|
-
const computedHref = (0, react_1.useMemo)(() => {
|
|
46
|
-
if (!hasZoomSource || !zoomTransitionId) {
|
|
47
|
-
return href;
|
|
48
|
-
}
|
|
49
|
-
if (typeof href === 'string') {
|
|
50
|
-
const { pathname, searchParams } = (0, url_1.parseUrlUsingCustomBase)(href);
|
|
51
|
-
return {
|
|
52
|
-
pathname,
|
|
53
|
-
params: {
|
|
54
|
-
...Object.fromEntries(searchParams.entries()),
|
|
55
|
-
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
pathname: href.pathname,
|
|
61
|
-
params: {
|
|
62
|
-
...(href.params ?? {}),
|
|
63
|
-
[navigationParams_1.INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
}, [href, zoomTransitionId, hasZoomSource]);
|
|
67
|
-
return { zoomTransitionSourceContextValue, href: computedHref };
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.ios.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.ios.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.ios.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAWb,kEAuEC;AAhFD,kDAA2C;AAC3C,iCAAkE;AAElE,mEAAkE;AAClE,6DAAmG;AACnG,yCAA0D;AAC1D,wEAA8D;AAG9D,SAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAa;IACtE,MAAM,SAAS,GAAG,IAAA,kCAAY,GAAE,CAAC;IACjC,MAAM,gBAAgB,GAAG,IAAA,eAAO,EAC9B,GAAG,EAAE,CACH,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,IAAA,+CAAuB,GAAE;QACtE,CAAC,CAAC,IAAA,mBAAM,GAAE;QACV,CAAC,CAAC,SAAS,EACf,EAAE,CACH,CAAC;IAEF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC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Aa,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAA,6BAAuB,EAAC,IAAI,CAAC,CAAC;YACjE,OAAO;gBACL,QAAQ;gBACR,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;oBAC7C,CAAC,4EAAyD,CAAC,EAAE,gBAAgB;iBAC9E;aACF,CAAC;QACJ,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE;gBACN,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;gBACtB,CAAC,4EAAyD,CAAC,EAAE,gBAAgB;aAC9E;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC;IAC5C,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AAClE,CAAC","sourcesContent":["'use client';\n\nimport { nanoid } from 'nanoid/non-secure';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { isZoomTransitionEnabled } from './ZoomTransitionEnabler';\nimport { INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME } from '../../navigationParams';\nimport { parseUrlUsingCustomBase } from '../../utils/url';\nimport { useIsPreview } from '../preview/PreviewRouteContext';\nimport { LinkProps } from '../useLinkHooks';\n\nexport function useZoomTransitionPrimitives({ href, asChild }: LinkProps) {\n const isPreview = useIsPreview();\n const zoomTransitionId = useMemo(\n () =>\n !isPreview && process.env.EXPO_OS === 'ios' && isZoomTransitionEnabled()\n ? nanoid()\n : undefined,\n []\n );\n\n const [numberOfSources, setNumberOfSources] = useState(0);\n const addSource = useCallback(() => {\n setNumberOfSources((prev) => prev + 1);\n }, []);\n const removeSource = useCallback(() => {\n setNumberOfSources((prev) => prev - 1);\n }, []);\n\n const hasZoomSource = numberOfSources > 0;\n\n useEffect(() => {\n if (numberOfSources > 1) {\n throw new Error(\n '[expo-router] Only one Link.ZoomTransitionSource can be used within a single Link component.'\n );\n }\n }, [numberOfSources]);\n\n useEffect(() => {\n if (hasZoomSource && !asChild) {\n console.warn(\n '[expo-router] Using zoom transition links without `asChild` prop may lead to unexpected behavior. Please ensure to set `asChild` when using zoom transitions.'\n );\n }\n }, [hasZoomSource, asChild]);\n\n const zoomTransitionSourceContextValue = useMemo(() => {\n if (!zoomTransitionId) {\n return undefined;\n }\n return {\n identifier: zoomTransitionId,\n addSource,\n removeSource,\n canAddSource: !hasZoomSource,\n };\n }, [zoomTransitionId, addSource, removeSource, hasZoomSource]);\n\n const computedHref = useMemo(() => {\n if (!hasZoomSource || !zoomTransitionId) {\n return href;\n }\n if (typeof href === 'string') {\n const { pathname, searchParams } = parseUrlUsingCustomBase(href);\n return {\n pathname,\n params: {\n ...Object.fromEntries(searchParams.entries()),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,\n },\n };\n }\n return {\n pathname: href.pathname,\n params: {\n ...(href.params ?? {}),\n [INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME]: zoomTransitionId,\n },\n };\n }, [href, zoomTransitionId, hasZoomSource]);\n return { zoomTransitionSourceContextValue, href: computedHref };\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useZoomTransitionPrimitives = useZoomTransitionPrimitives;
|
|
5
|
-
function useZoomTransitionPrimitives({ href }) {
|
|
6
|
-
const zoomTransitionSourceContextValue = undefined;
|
|
7
|
-
return { zoomTransitionSourceContextValue, href };
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=useZoomTransitionPrimitives.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomTransitionPrimitives.js","sourceRoot":"","sources":["../../../src/link/zoom/useZoomTransitionPrimitives.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAKb,kEAGC;AAHD,SAAgB,2BAA2B,CAAC,EAAE,IAAI,EAAa;IAC7D,MAAM,gCAAgC,GAAyC,SAAS,CAAC;IACzF,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,CAAC;AACpD,CAAC","sourcesContent":["'use client';\n\nimport { LinkProps } from '../useLinkHooks';\nimport type { ZoomTransitionSourceContextValueType } from './zoom-transition-context';\n\nexport function useZoomTransitionPrimitives({ href }: LinkProps) {\n const zoomTransitionSourceContextValue: ZoomTransitionSourceContextValueType = undefined;\n return { zoomTransitionSourceContextValue, href };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
89a36f0465ec4f939679ad1d4d724bad
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fc663c699f6fd6ee332c67fcb5e419fc377a39d7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d764f2c340a1d9710dec664581830071ee93b7c94406f3c313e70951f92565a6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
80ea9f1432ce674c57fef44f91d810a80c7f6b140e651cb1da7c1210a55e4063b07fff432035bdfc3bea042007fbedc900ef4686717d3f958342e30f35b708ec
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
46b2f3026ea327f7efcd96f0cd423e68
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
40aba5659304450d31f97f7c268c2d92ec095f21
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0f04a16aeee3aafcc0866a447c37017ad9da773a15f466304c4fcd02d68a4c77
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
954efc9011c6dd13fdb6a3babac202c8ce854f4ba605388c378096e7e450ac06249946aa3f81da7d4d52eabaea7ab99e91f522937fdec3e5a2ebbbd16dc45a70
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|