expo-router 56.2.8 → 56.2.9
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/layouts/stack-utils/toolbar/StackToolbarButton/native.android.d.ts.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarButton/native.android.js +4 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarButton/native.android.js.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.d.ts.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.js +8 -5
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.module → 56.2.9/expo.modules.router-56.2.9.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.pom → 56.2.9/expo.modules.router-56.2.9.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.9/expo.modules.router-56.2.9.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 +9 -9
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.2.8/expo.modules.router-56.2.8.pom.sha512 +0 -1
- package/plugin/tsconfig.tsbuildinfo +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8-sources.jar → 56.2.9/expo.modules.router-56.2.9-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8-sources.jar.md5 → 56.2.9/expo.modules.router-56.2.9-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8-sources.jar.sha1 → 56.2.9/expo.modules.router-56.2.9-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8-sources.jar.sha256 → 56.2.9/expo.modules.router-56.2.9-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8-sources.jar.sha512 → 56.2.9/expo.modules.router-56.2.9-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.aar → 56.2.9/expo.modules.router-56.2.9.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.aar.md5 → 56.2.9/expo.modules.router-56.2.9.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.aar.sha1 → 56.2.9/expo.modules.router-56.2.9.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.aar.sha256 → 56.2.9/expo.modules.router-56.2.9.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.2.8/expo.modules.router-56.2.8.aar.sha512 → 56.2.9/expo.modules.router-56.2.9.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 = '56.2.
|
|
7
|
+
version = '56.2.9'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "56.2.
|
|
13
|
+
versionName "56.2.9"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.android.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarButton/native.android.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKxD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"native.android.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarButton/native.android.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKxD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgClE,CAAC"}
|
|
@@ -19,8 +19,11 @@ const NativeToolbarButton = (props) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
+
// `tint={null}` tells `<Icon>` to draw the source in its original colors.
|
|
23
|
+
// `undefined` would fall back to `LocalContentColor`, i.e. the IconButton's
|
|
24
|
+
// content color, which is still a tint.
|
|
22
25
|
const tintColor = props.imageRenderingMode === 'original'
|
|
23
|
-
?
|
|
26
|
+
? null
|
|
24
27
|
: (props.tintColor ?? toolbarColors.tintColor ?? (0, defaults_1.DEFAULT_TOOLBAR_TINT_COLOR)());
|
|
25
28
|
return ((0, jsx_runtime_1.jsx)(AnimatedItemContainer_1.AnimatedItemContainer, { visible: !props.hidden, children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.IconButton, { onClick: props.onPress, enabled: !props.disabled, children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: props.source, tint: tintColor, size: 24, contentDescription: props.accessibilityLabel }) }) }));
|
|
26
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.android.js","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarButton/native.android.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AACb,8DAA4D;AAG5D,qFAAkF;AAClF,wCAA8C;AAC9C,0CAAyD;AAEzD;;;GAGG;AACI,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE;IAC/E,MAAM,aAAa,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAEzC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CACV,wNAAwN,CACzN,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GACb,KAAK,CAAC,kBAAkB,KAAK,UAAU;QACrC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"native.android.js","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarButton/native.android.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AACb,8DAA4D;AAG5D,qFAAkF;AAClF,wCAA8C;AAC9C,0CAAyD;AAEzD;;;GAGG;AACI,MAAM,mBAAmB,GAAuC,CAAC,KAAK,EAAE,EAAE;IAC/E,MAAM,aAAa,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAEzC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAClB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CACV,wNAAwN,CACzN,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0EAA0E;IAC1E,4EAA4E;IAC5E,wCAAwC;IACxC,MAAM,SAAS,GACb,KAAK,CAAC,kBAAkB,KAAK,UAAU;QACrC,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,IAAI,IAAA,qCAA0B,GAAE,CAAC,CAAC;IAEnF,OAAO,CACL,uBAAC,6CAAqB,IAAC,OAAO,EAAE,CAAC,KAAK,CAAC,MAAM,YAC3C,uBAAC,4BAAU,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,YAC1D,uBAAC,sBAAI,IACH,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,EAAE,EACR,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,GAC5C,GACS,GACS,CACzB,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,mBAAmB,uBAgC9B","sourcesContent":["'use client';\nimport { IconButton, Icon } from '@expo/ui/jetpack-compose';\n\nimport type { NativeToolbarButtonProps } from './types';\nimport { AnimatedItemContainer } from '../../../../toolbar/AnimatedItemContainer';\nimport { useToolbarColors } from '../context';\nimport { DEFAULT_TOOLBAR_TINT_COLOR } from '../defaults';\n\n/**\n * Native toolbar button component for Android bottom toolbar.\n * Renders as an IconButton with animated visibility.\n */\nexport const NativeToolbarButton: React.FC<NativeToolbarButtonProps> = (props) => {\n const toolbarColors = useToolbarColors();\n\n if (!props.source) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Stack.Toolbar.Button on Android requires an ImageSourcePropType icon. SF Symbols and xcasset icons are not supported. Use the `icon` prop with a require() or { uri } source, or use <Stack.Toolbar.Icon src={...} />.'\n );\n }\n return null;\n }\n\n // `tint={null}` tells `<Icon>` to draw the source in its original colors.\n // `undefined` would fall back to `LocalContentColor`, i.e. the IconButton's\n // content color, which is still a tint.\n const tintColor =\n props.imageRenderingMode === 'original'\n ? null\n : (props.tintColor ?? toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR());\n\n return (\n <AnimatedItemContainer visible={!props.hidden}>\n <IconButton onClick={props.onPress} enabled={!props.disabled}>\n <Icon\n source={props.source}\n tint={tintColor}\n size={24}\n contentDescription={props.accessibilityLabel}\n />\n </IconButton>\n </AnimatedItemContainer>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.android.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAqBpF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"native.android.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAqBpF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+G9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CA4C1E,CAAC"}
|
|
@@ -28,9 +28,12 @@ const NativeToolbarMenu = (props) => {
|
|
|
28
28
|
const parentClose = (0, react_1.use)(ToolbarMenuCloseContext);
|
|
29
29
|
const isNested = parentClose !== null;
|
|
30
30
|
const toolbarColors = (0, context_1.useToolbarColors)();
|
|
31
|
-
const tintColor = props.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const tintColor = props.tintColor ?? toolbarColors.tintColor ?? (0, defaults_1.DEFAULT_TOOLBAR_TINT_COLOR)();
|
|
32
|
+
// `tint={null}` tells `<Icon>` to draw the source in its original colors.
|
|
33
|
+
// `undefined` would fall back to `LocalContentColor` (i.e. still a tint).
|
|
34
|
+
// Only the user-provided source respects `imageRenderingMode`; internal
|
|
35
|
+
// ornaments (submenu arrow, action checkmark) are always tinted.
|
|
36
|
+
const sourceTint = props.imageRenderingMode === 'original' ? null : tintColor;
|
|
34
37
|
const backgroundColor = (toolbarColors.backgroundColor ??
|
|
35
38
|
(0, defaults_1.DEFAULT_TOOLBAR_BACKGROUND_COLOR)());
|
|
36
39
|
const closeMenu = (0, react_1.useCallback)(() => {
|
|
@@ -44,7 +47,7 @@ const NativeToolbarMenu = (props) => {
|
|
|
44
47
|
// Non-inline nested: DropdownMenu with DropdownMenuItem trigger
|
|
45
48
|
if (isNested) {
|
|
46
49
|
const trailingIcon = ((0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenuItem.TrailingIcon, { children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: arrowRightIcon, tint: tintColor, size: 24 }) }));
|
|
47
|
-
const leadingIcon = props.source ? ((0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenuItem.LeadingIcon, { children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: props.source, tint:
|
|
50
|
+
const leadingIcon = props.source ? ((0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenuItem.LeadingIcon, { children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: props.source, tint: sourceTint, size: 24 }) })) : null;
|
|
48
51
|
return ((0, jsx_runtime_1.jsxs)(jetpack_compose_1.DropdownMenu, { expanded: expanded, onDismissRequest: () => setExpanded(false), color: backgroundColor, children: [(0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenu.Trigger, { children: (0, jsx_runtime_1.jsxs)(jetpack_compose_1.DropdownMenuItem, { onClick: () => {
|
|
49
52
|
if (!props.disabled)
|
|
50
53
|
setExpanded(true);
|
|
@@ -59,7 +62,7 @@ const NativeToolbarMenu = (props) => {
|
|
|
59
62
|
}
|
|
60
63
|
return null;
|
|
61
64
|
}
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(AnimatedItemContainer_1.AnimatedItemContainer, { visible: !props.hidden, children: (0, jsx_runtime_1.jsxs)(jetpack_compose_1.DropdownMenu, { expanded: expanded, onDismissRequest: () => setExpanded(false), color: backgroundColor, children: [(0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenu.Trigger, { children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.IconButton, { onClick: () => setExpanded(true), enabled: !props.disabled, modifiers: [(0, modifiers_1.background)(backgroundColor)], children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: props.source, tint:
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(AnimatedItemContainer_1.AnimatedItemContainer, { visible: !props.hidden, children: (0, jsx_runtime_1.jsxs)(jetpack_compose_1.DropdownMenu, { expanded: expanded, onDismissRequest: () => setExpanded(false), color: backgroundColor, children: [(0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenu.Trigger, { children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.IconButton, { onClick: () => setExpanded(true), enabled: !props.disabled, modifiers: [(0, modifiers_1.background)(backgroundColor)], children: (0, jsx_runtime_1.jsx)(jetpack_compose_1.Icon, { source: props.source, tint: sourceTint, size: 24, contentDescription: props.accessibilityLabel }) }) }), (0, jsx_runtime_1.jsx)(jetpack_compose_1.DropdownMenu.Items, { children: (0, jsx_runtime_1.jsx)(ToolbarMenuCloseContext, { value: closeMenu, children: props.children }) })] }) }));
|
|
63
66
|
};
|
|
64
67
|
exports.NativeToolbarMenu = NativeToolbarMenu;
|
|
65
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.android.js","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AACb,8DAOkC;AAClC,kEAAgE;AAChE,iCAAkE;AAGlE,uDAA+C;AAC/C,qFAAkF;AAClF,yDAAiE;AACjE,wCAA8C;AAC9C,0CAIqB;AAErB,MAAM,cAAc,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAC;AACxE,MAAM,aAAa,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,IAAA,qBAAa,EAAsB,IAAI,CAAC,CAAC;AAEzE;;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,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,uBAAuB,2BA4ClC","sourcesContent":["'use client';\nimport {\n DropdownMenu,\n DropdownMenuItem,\n HorizontalDivider,\n Icon,\n IconButton,\n Text as ComposeText,\n} from '@expo/ui/jetpack-compose';\nimport { background } from '@expo/ui/jetpack-compose/modifiers';\nimport { createContext, use, useCallback, useState } from 'react';\n\nimport type { NativeToolbarMenuActionProps, NativeToolbarMenuProps } from './types';\nimport { Label } from '../../../../primitives';\nimport { AnimatedItemContainer } from '../../../../toolbar/AnimatedItemContainer';\nimport { getFirstChildOfType } from '../../../../utils/children';\nimport { useToolbarColors } from '../context';\nimport {\n DEFAULT_DESTRUCTIVE_COLOR,\n DEFAULT_TOOLBAR_BACKGROUND_COLOR,\n DEFAULT_TOOLBAR_TINT_COLOR,\n} from '../defaults';\n\nconst arrowRightIcon = require('../../../../../assets/arrow_right.xml');\nconst checkmarkIcon = require('../../../../../assets/checkmark.xml');\n\n/**\n * Context for propagating menu close callbacks from root to nested menus.\n * - `null` means root level (no parent menu)\n * - A function means nested level (call to close entire menu chain)\n */\nconst ToolbarMenuCloseContext = createContext<(() => void) | null>(null);\n\n/**\n * Native toolbar menu component for Android bottom toolbar.\n * Renders as a DropdownMenu with IconButton trigger (root) or DropdownMenuItem trigger (nested).\n */\nexport const NativeToolbarMenu: React.FC<NativeToolbarMenuProps> = (props) => {\n const [expanded, setExpanded] = useState(false);\n const parentClose = use(ToolbarMenuCloseContext);\n const isNested = parentClose !== null;\n const toolbarColors = useToolbarColors();\n\n const tintColor =\n props.imageRenderingMode === 'original'\n ? undefined\n : (props.tintColor ?? toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR());\n\n const backgroundColor = (toolbarColors.backgroundColor ??\n DEFAULT_TOOLBAR_BACKGROUND_COLOR()) as string;\n\n const closeMenu = useCallback(() => {\n setExpanded(false);\n parentClose?.();\n }, [parentClose]);\n\n // Inline nested: render children directly with a divider separator\n if (isNested && props.inline) {\n return (\n <>\n <HorizontalDivider />\n {props.children}\n </>\n );\n }\n\n // Non-inline nested: DropdownMenu with DropdownMenuItem trigger\n if (isNested) {\n const trailingIcon = (\n <DropdownMenuItem.TrailingIcon>\n <Icon source={arrowRightIcon} tint={tintColor} size={24} />\n </DropdownMenuItem.TrailingIcon>\n );\n const leadingIcon = props.source ? (\n <DropdownMenuItem.LeadingIcon>\n <Icon source={props.source} tint={tintColor} size={24} />\n </DropdownMenuItem.LeadingIcon>\n ) : null;\n return (\n <DropdownMenu\n expanded={expanded}\n onDismissRequest={() => setExpanded(false)}\n color={backgroundColor}>\n <DropdownMenu.Trigger>\n <DropdownMenuItem\n onClick={() => {\n if (!props.disabled) setExpanded(true);\n }}\n modifiers={[background(backgroundColor)]}\n enabled={!props.disabled}>\n {leadingIcon}\n <DropdownMenuItem.Text>\n <ComposeText\n color={\n typeof props.tintColor === 'string'\n ? props.tintColor\n : ((toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR()) as string)\n }>\n {props.label}\n </ComposeText>\n </DropdownMenuItem.Text>\n {trailingIcon}\n </DropdownMenuItem>\n </DropdownMenu.Trigger>\n <DropdownMenu.Items>\n <ToolbarMenuCloseContext value={closeMenu}>{props.children}</ToolbarMenuCloseContext>\n </DropdownMenu.Items>\n </DropdownMenu>\n );\n }\n\n // Root: AnimatedItemContainer + IconButton trigger + DropdownMenu\n if (!props.source) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Stack.Toolbar.Menu on Android requires an ImageSourcePropType icon. SF Symbols and xcasset icons are not supported. Use the `icon` prop with a require() or { uri } source, or use <Stack.Toolbar.Icon src={...} />.'\n );\n }\n return null;\n }\n\n return (\n <AnimatedItemContainer visible={!props.hidden}>\n <DropdownMenu\n expanded={expanded}\n onDismissRequest={() => setExpanded(false)}\n color={backgroundColor}>\n <DropdownMenu.Trigger>\n <IconButton\n onClick={() => setExpanded(true)}\n enabled={!props.disabled}\n modifiers={[background(backgroundColor)]}>\n <Icon\n source={props.source}\n tint={tintColor}\n size={24}\n contentDescription={props.accessibilityLabel}\n />\n </IconButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Items>\n <ToolbarMenuCloseContext value={closeMenu}>{props.children}</ToolbarMenuCloseContext>\n </DropdownMenu.Items>\n </DropdownMenu>\n </AnimatedItemContainer>\n );\n};\n\n/**\n * Native toolbar menu action component for Android.\n * Renders as a DropdownMenuItem.\n */\nexport const NativeToolbarMenuAction: React.FC<NativeToolbarMenuActionProps> = (props) => {\n const closeMenu = use(ToolbarMenuCloseContext);\n const toolbarColors = useToolbarColors();\n const tintColor = props.destructive\n ? (DEFAULT_DESTRUCTIVE_COLOR() as string)\n : ((toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR()) as string);\n\n const backgroundColor = (toolbarColors.backgroundColor ??\n DEFAULT_TOOLBAR_BACKGROUND_COLOR()) as string;\n\n const handleClick = useCallback(() => {\n props.onPress?.();\n if (!props.unstable_keepPresented) {\n closeMenu?.();\n }\n }, [props.onPress, props.unstable_keepPresented, closeMenu]);\n\n const areChildrenString = typeof props.children === 'string';\n const label = areChildrenString\n ? props.children\n : (getFirstChildOfType(props.children, Label)?.props.children ?? '');\n\n if (props.hidden) return null;\n\n return (\n <DropdownMenuItem\n onClick={handleClick}\n modifiers={[background(backgroundColor)]}\n enabled={!props.disabled}>\n <DropdownMenuItem.Text>\n <ComposeText color={tintColor}>{label}</ComposeText>\n </DropdownMenuItem.Text>\n {props.source && (\n <DropdownMenuItem.LeadingIcon>\n <Icon source={props.source} tint={tintColor} size={24} />\n </DropdownMenuItem.LeadingIcon>\n )}\n {props.isOn && (\n <DropdownMenuItem.TrailingIcon>\n <Icon source={checkmarkIcon} tint={tintColor} size={24} />\n </DropdownMenuItem.TrailingIcon>\n )}\n </DropdownMenuItem>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"native.android.js","sourceRoot":"","sources":["../../../../../src/layouts/stack-utils/toolbar/StackToolbarMenu/native.android.tsx"],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cACpB,uBAAC,sBAAW,IAAC,KAAK,EAAE,SAAS,YAAG,KAAK,GAAe,GAC9B,EACvB,KAAK,CAAC,MAAM,IAAI,CACf,uBAAC,kCAAgB,CAAC,WAAW,cAC3B,uBAAC,sBAAI,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,GAAI,GAC5B,CAChC,EACA,KAAK,CAAC,IAAI,IAAI,CACb,uBAAC,kCAAgB,CAAC,YAAY,cAC5B,uBAAC,sBAAI,IAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,GAAI,GAC5B,CACjC,IACgB,CACpB,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,uBAAuB,2BA4ClC","sourcesContent":["'use client';\nimport {\n DropdownMenu,\n DropdownMenuItem,\n HorizontalDivider,\n Icon,\n IconButton,\n Text as ComposeText,\n} from '@expo/ui/jetpack-compose';\nimport { background } from '@expo/ui/jetpack-compose/modifiers';\nimport { createContext, use, useCallback, useState } from 'react';\n\nimport type { NativeToolbarMenuActionProps, NativeToolbarMenuProps } from './types';\nimport { Label } from '../../../../primitives';\nimport { AnimatedItemContainer } from '../../../../toolbar/AnimatedItemContainer';\nimport { getFirstChildOfType } from '../../../../utils/children';\nimport { useToolbarColors } from '../context';\nimport {\n DEFAULT_DESTRUCTIVE_COLOR,\n DEFAULT_TOOLBAR_BACKGROUND_COLOR,\n DEFAULT_TOOLBAR_TINT_COLOR,\n} from '../defaults';\n\nconst arrowRightIcon = require('../../../../../assets/arrow_right.xml');\nconst checkmarkIcon = require('../../../../../assets/checkmark.xml');\n\n/**\n * Context for propagating menu close callbacks from root to nested menus.\n * - `null` means root level (no parent menu)\n * - A function means nested level (call to close entire menu chain)\n */\nconst ToolbarMenuCloseContext = createContext<(() => void) | null>(null);\n\n/**\n * Native toolbar menu component for Android bottom toolbar.\n * Renders as a DropdownMenu with IconButton trigger (root) or DropdownMenuItem trigger (nested).\n */\nexport const NativeToolbarMenu: React.FC<NativeToolbarMenuProps> = (props) => {\n const [expanded, setExpanded] = useState(false);\n const parentClose = use(ToolbarMenuCloseContext);\n const isNested = parentClose !== null;\n const toolbarColors = useToolbarColors();\n\n const tintColor = props.tintColor ?? toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR();\n // `tint={null}` tells `<Icon>` to draw the source in its original colors.\n // `undefined` would fall back to `LocalContentColor` (i.e. still a tint).\n // Only the user-provided source respects `imageRenderingMode`; internal\n // ornaments (submenu arrow, action checkmark) are always tinted.\n const sourceTint = props.imageRenderingMode === 'original' ? null : tintColor;\n\n const backgroundColor = (toolbarColors.backgroundColor ??\n DEFAULT_TOOLBAR_BACKGROUND_COLOR()) as string;\n\n const closeMenu = useCallback(() => {\n setExpanded(false);\n parentClose?.();\n }, [parentClose]);\n\n // Inline nested: render children directly with a divider separator\n if (isNested && props.inline) {\n return (\n <>\n <HorizontalDivider />\n {props.children}\n </>\n );\n }\n\n // Non-inline nested: DropdownMenu with DropdownMenuItem trigger\n if (isNested) {\n const trailingIcon = (\n <DropdownMenuItem.TrailingIcon>\n <Icon source={arrowRightIcon} tint={tintColor} size={24} />\n </DropdownMenuItem.TrailingIcon>\n );\n const leadingIcon = props.source ? (\n <DropdownMenuItem.LeadingIcon>\n <Icon source={props.source} tint={sourceTint} size={24} />\n </DropdownMenuItem.LeadingIcon>\n ) : null;\n return (\n <DropdownMenu\n expanded={expanded}\n onDismissRequest={() => setExpanded(false)}\n color={backgroundColor}>\n <DropdownMenu.Trigger>\n <DropdownMenuItem\n onClick={() => {\n if (!props.disabled) setExpanded(true);\n }}\n modifiers={[background(backgroundColor)]}\n enabled={!props.disabled}>\n {leadingIcon}\n <DropdownMenuItem.Text>\n <ComposeText\n color={\n typeof props.tintColor === 'string'\n ? props.tintColor\n : ((toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR()) as string)\n }>\n {props.label}\n </ComposeText>\n </DropdownMenuItem.Text>\n {trailingIcon}\n </DropdownMenuItem>\n </DropdownMenu.Trigger>\n <DropdownMenu.Items>\n <ToolbarMenuCloseContext value={closeMenu}>{props.children}</ToolbarMenuCloseContext>\n </DropdownMenu.Items>\n </DropdownMenu>\n );\n }\n\n // Root: AnimatedItemContainer + IconButton trigger + DropdownMenu\n if (!props.source) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Stack.Toolbar.Menu on Android requires an ImageSourcePropType icon. SF Symbols and xcasset icons are not supported. Use the `icon` prop with a require() or { uri } source, or use <Stack.Toolbar.Icon src={...} />.'\n );\n }\n return null;\n }\n\n return (\n <AnimatedItemContainer visible={!props.hidden}>\n <DropdownMenu\n expanded={expanded}\n onDismissRequest={() => setExpanded(false)}\n color={backgroundColor}>\n <DropdownMenu.Trigger>\n <IconButton\n onClick={() => setExpanded(true)}\n enabled={!props.disabled}\n modifiers={[background(backgroundColor)]}>\n <Icon\n source={props.source}\n tint={sourceTint}\n size={24}\n contentDescription={props.accessibilityLabel}\n />\n </IconButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Items>\n <ToolbarMenuCloseContext value={closeMenu}>{props.children}</ToolbarMenuCloseContext>\n </DropdownMenu.Items>\n </DropdownMenu>\n </AnimatedItemContainer>\n );\n};\n\n/**\n * Native toolbar menu action component for Android.\n * Renders as a DropdownMenuItem.\n */\nexport const NativeToolbarMenuAction: React.FC<NativeToolbarMenuActionProps> = (props) => {\n const closeMenu = use(ToolbarMenuCloseContext);\n const toolbarColors = useToolbarColors();\n const tintColor = props.destructive\n ? (DEFAULT_DESTRUCTIVE_COLOR() as string)\n : ((toolbarColors.tintColor ?? DEFAULT_TOOLBAR_TINT_COLOR()) as string);\n\n const backgroundColor = (toolbarColors.backgroundColor ??\n DEFAULT_TOOLBAR_BACKGROUND_COLOR()) as string;\n\n const handleClick = useCallback(() => {\n props.onPress?.();\n if (!props.unstable_keepPresented) {\n closeMenu?.();\n }\n }, [props.onPress, props.unstable_keepPresented, closeMenu]);\n\n const areChildrenString = typeof props.children === 'string';\n const label = areChildrenString\n ? props.children\n : (getFirstChildOfType(props.children, Label)?.props.children ?? '');\n\n if (props.hidden) return null;\n\n return (\n <DropdownMenuItem\n onClick={handleClick}\n modifiers={[background(backgroundColor)]}\n enabled={!props.disabled}>\n <DropdownMenuItem.Text>\n <ComposeText color={tintColor}>{label}</ComposeText>\n </DropdownMenuItem.Text>\n {props.source && (\n <DropdownMenuItem.LeadingIcon>\n <Icon source={props.source} tint={tintColor} size={24} />\n </DropdownMenuItem.LeadingIcon>\n )}\n {props.isOn && (\n <DropdownMenuItem.TrailingIcon>\n <Icon source={checkmarkIcon} tint={tintColor} size={24} />\n </DropdownMenuItem.TrailingIcon>\n )}\n </DropdownMenuItem>\n );\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": "56.2.
|
|
6
|
+
"version": "56.2.9",
|
|
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-56.2.
|
|
28
|
-
"url": "expo.modules.router-56.2.
|
|
27
|
+
"name": "expo.modules.router-56.2.9.aar",
|
|
28
|
+
"url": "expo.modules.router-56.2.9.aar",
|
|
29
29
|
"size": 15835,
|
|
30
30
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
31
31
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
],
|
|
75
75
|
"files": [
|
|
76
76
|
{
|
|
77
|
-
"name": "expo.modules.router-56.2.
|
|
78
|
-
"url": "expo.modules.router-56.2.
|
|
77
|
+
"name": "expo.modules.router-56.2.9.aar",
|
|
78
|
+
"url": "expo.modules.router-56.2.9.aar",
|
|
79
79
|
"size": 15835,
|
|
80
80
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
81
81
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
},
|
|
95
95
|
"files": [
|
|
96
96
|
{
|
|
97
|
-
"name": "expo.modules.router-56.2.
|
|
98
|
-
"url": "expo.modules.router-56.2.
|
|
97
|
+
"name": "expo.modules.router-56.2.9-sources.jar",
|
|
98
|
+
"url": "expo.modules.router-56.2.9-sources.jar",
|
|
99
99
|
"size": 2326,
|
|
100
100
|
"sha512": "a1a1537b57bc0d66efbf2bdfd5f514684400b9598e549eaf53c528d1bf32ff42b7826e74fb6e115f8ec0490b9e06ffbb3c3efe9f2f703652c13291ef82b0fa03",
|
|
101
101
|
"sha256": "2add0f802e663eb9b5f90e086dca0e0e337a1442e15fb372a05945e01ee0d289",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f298af0f16a6fbff29fdfaff94036adf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2ab27dd2100011c63642aaca6fdf0c749411d2b0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c2c47d6187417ec623a380ee854c109235d405a27c046436bf0240abfeb7e8c5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
35ae7ac23fb193f11efb8232ea57c3991b4710e341f950d698b27fc9259bcbda83e2118bf05afc039b78f0deded2028fd25daf9bda7b80e299f6e16ec0efd51d
|
|
@@ -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>56.2.
|
|
12
|
+
<version>56.2.9</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
|
+
2575f4708a0ddf59ce67e31e7b35d601
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c6a05d729e14818913e6c70c8e6983532eb62b5c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5835add9537c96ae79c88c44a7011b7da8d49a8bd043ddc8f648ba84beaac632
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
91ac51e5087a72a42c21fd4908e163619c3ac4aa994ffbc90ee1adadc30ae66ef806c6d58aa923cf5b1644e7fdb1a7d4e2bb5bf48ba35da9cd3b879394b2c55b
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.2.
|
|
7
|
-
<release>56.2.
|
|
6
|
+
<latest>56.2.9</latest>
|
|
7
|
+
<release>56.2.9</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.2.
|
|
9
|
+
<version>56.2.9</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260605211253</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
482cd04746d75be7177082e1a461b4e8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
65797124b734b180ffaa361d55e989fdeea745e3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1221338d0282f3e5754b3b24956eef69892afe2f7fda98fd3e2730d8ec45fd69
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
72e08aef14c3baaf334418134ed9eb35e4c6cc296c967361aa7b0234fc4a583ed0f7d05381279bb473afe43fbe581c51bc32a3f8784c68ef75b5acbc98a0fdec
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "56.2.
|
|
3
|
+
"version": "56.2.9",
|
|
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",
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@expo/log-box": "^56.0.12",
|
|
82
|
-
"@expo/metro-runtime": "^56.0.
|
|
82
|
+
"@expo/metro-runtime": "^56.0.14",
|
|
83
83
|
"@testing-library/react-native": ">= 13.2.0",
|
|
84
84
|
"expo": "*",
|
|
85
|
-
"expo-constants": "^56.0.
|
|
85
|
+
"expo-constants": "^56.0.17",
|
|
86
86
|
"expo-linking": "^56.0.13",
|
|
87
87
|
"react": "*",
|
|
88
88
|
"react-dom": "*",
|
|
@@ -136,13 +136,13 @@
|
|
|
136
136
|
"react-native-web": "~0.21.0",
|
|
137
137
|
"react-server-dom-webpack": "~19.0.6",
|
|
138
138
|
"tsd": "^0.33.0",
|
|
139
|
-
"expo": "56.0.
|
|
139
|
+
"expo": "56.0.9"
|
|
140
140
|
},
|
|
141
141
|
"dependencies": {
|
|
142
142
|
"@expo/log-box": "^56.0.12",
|
|
143
|
-
"@expo/metro-runtime": "^56.0.
|
|
143
|
+
"@expo/metro-runtime": "^56.0.14",
|
|
144
144
|
"@expo/schema-utils": "^56.0.0",
|
|
145
|
-
"@expo/ui": "^56.0.
|
|
145
|
+
"@expo/ui": "^56.0.16",
|
|
146
146
|
"@radix-ui/react-slot": "^1.2.0",
|
|
147
147
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
148
148
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
"debug": "^4.3.4",
|
|
154
154
|
"escape-string-regexp": "^4.0.0",
|
|
155
155
|
"expo-glass-effect": "^56.0.4",
|
|
156
|
-
"expo-server": "^56.0.
|
|
157
|
-
"expo-symbols": "^56.0.
|
|
156
|
+
"expo-server": "^56.0.5",
|
|
157
|
+
"expo-symbols": "^56.0.6",
|
|
158
158
|
"fast-deep-equal": "^3.1.3",
|
|
159
159
|
"invariant": "^2.2.4",
|
|
160
160
|
"nanoid": "^3.3.8",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"shallowequal": "^1.1.0",
|
|
169
169
|
"vaul": "^1.1.2"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "175f1e78e3444ca99ddea473faea6777a0656668",
|
|
172
172
|
"scripts": {
|
|
173
173
|
"build": "node ./scripts/build.js",
|
|
174
174
|
"clean": "expo-module clean",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0aeac47f3cde542d8c5f461cd510b2a4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f3ab1b0a39f03acd77a1af1f65b3c0167fe3d792
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
eff7fa346c8965d3be1a68811cf522c3c2f2d416ed271cbd097533117ea95ca9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
217055698dc240f218d78c280609b681dcecd990577b46cdaeba70439738c3030f18007abca79c4d43c6245994e9e44054aa098dd684dda92955227a44695e02
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
72f8a59483c1c86ee6eaf81db5891780
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d8eb25e09998cae9aa65b2392fae19996204c6f5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
43e95621fab031cd438af107491630d232fa9b7e6a51bab675f18d6b554aea06
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c901b4e540a7f692d98ccf26d72c7dea1517765a727cb4728346c5d6d7dbea540393c9409f86cd284d6f107059f13007f1080a571930aae4f36c3d8bbb227ec7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/index.ts","./src/withrouter.ts"],"version":"5.9.3"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|