@expo/ui 56.0.8 → 56.0.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/CHANGELOG.md +22 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +38 -1
- package/android/src/main/java/expo/modules/ui/LoadingView.kt +80 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +31 -3
- package/android/src/main/java/expo/modules/ui/SnackbarView.kt +126 -0
- package/android/src/main/java/expo/modules/ui/state/ObservableState.kt +10 -0
- package/assets/keyboard_arrow_down.xml +10 -0
- package/build/State/useNativeState.d.ts +32 -3
- package/build/State/useNativeState.d.ts.map +1 -1
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/jetpack-compose/LoadingIndicator/index.d.ts +41 -0
- package/build/jetpack-compose/LoadingIndicator/index.d.ts.map +1 -0
- package/build/jetpack-compose/Snackbar/index.d.ts +94 -0
- package/build/jetpack-compose/Snackbar/index.d.ts.map +1 -0
- package/build/jetpack-compose/index.d.ts +2 -0
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +6 -2
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/BottomSheet/index.d.ts +5 -1
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +1 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/withAnimation.d.ts +26 -0
- package/build/swift-ui/withAnimation.d.ts.map +1 -0
- package/build/universal/BottomSheet/index.android.d.ts +1 -1
- package/build/universal/BottomSheet/index.android.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.d.ts +1 -1
- package/build/universal/BottomSheet/index.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts.map +1 -1
- package/build/universal/BottomSheet/types.d.ts +27 -0
- package/build/universal/BottomSheet/types.d.ts.map +1 -1
- package/build/universal/Collapsible/index.android.d.ts +8 -0
- package/build/universal/Collapsible/index.android.d.ts.map +1 -0
- package/build/universal/Collapsible/index.d.ts +8 -0
- package/build/universal/Collapsible/index.d.ts.map +1 -0
- package/build/universal/Collapsible/index.ios.d.ts +7 -0
- package/build/universal/Collapsible/index.ios.d.ts.map +1 -0
- package/build/universal/Collapsible/types.d.ts +23 -0
- package/build/universal/Collapsible/types.d.ts.map +1 -0
- package/build/universal/Column/index.d.ts.map +1 -1
- package/build/universal/Host/index.d.ts +5 -18
- package/build/universal/Host/index.d.ts.map +1 -1
- package/build/universal/Host/types.d.ts +72 -0
- package/build/universal/Host/types.d.ts.map +1 -0
- package/build/universal/List/index.android.d.ts +9 -0
- package/build/universal/List/index.android.d.ts.map +1 -0
- package/build/universal/List/index.d.ts +8 -0
- package/build/universal/List/index.d.ts.map +1 -0
- package/build/universal/List/index.ios.d.ts +8 -0
- package/build/universal/List/index.ios.d.ts.map +1 -0
- package/build/universal/List/types.d.ts +26 -0
- package/build/universal/List/types.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.android.d.ts +8 -0
- package/build/universal/ListItem/ListItem.android.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.d.ts +9 -0
- package/build/universal/ListItem/ListItem.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.ios.d.ts +8 -0
- package/build/universal/ListItem/ListItem.ios.d.ts.map +1 -0
- package/build/universal/ListItem/ListItemSlots.d.ts +21 -0
- package/build/universal/ListItem/ListItemSlots.d.ts.map +1 -0
- package/build/universal/ListItem/index.d.ts +10 -0
- package/build/universal/ListItem/index.d.ts.map +1 -0
- package/build/universal/ListItem/types.d.ts +59 -0
- package/build/universal/ListItem/types.d.ts.map +1 -0
- package/build/universal/Picker/Picker.android.d.ts +9 -0
- package/build/universal/Picker/Picker.android.d.ts.map +1 -0
- package/build/universal/Picker/Picker.d.ts +8 -0
- package/build/universal/Picker/Picker.d.ts.map +1 -0
- package/build/universal/Picker/Picker.ios.d.ts +9 -0
- package/build/universal/Picker/Picker.ios.d.ts.map +1 -0
- package/build/universal/Picker/PickerItem.d.ts +9 -0
- package/build/universal/Picker/PickerItem.d.ts.map +1 -0
- package/build/universal/Picker/index.d.ts +8 -0
- package/build/universal/Picker/index.d.ts.map +1 -0
- package/build/universal/Picker/types.d.ts +69 -0
- package/build/universal/Picker/types.d.ts.map +1 -0
- package/build/universal/index.d.ts +4 -0
- package/build/universal/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +4 -1
- package/ios/ExpoUIModule.swift +41 -1
- package/ios/Modifiers/AnimationConfig.swift +109 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +1 -112
- package/ios/State/ObservableState.swift +12 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.8/expo.modules.ui-56.0.8-sources.jar → 56.0.9/expo.modules.ui-56.0.9-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.8/expo.modules.ui-56.0.8.module → 56.0.9/expo.modules.ui-56.0.9.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.8/expo.modules.ui-56.0.8.pom → 56.0.9/expo.modules.ui-56.0.9.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/src/State/useNativeState.ts +70 -10
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +0 -17
- package/src/jetpack-compose/LoadingIndicator/index.tsx +92 -0
- package/src/jetpack-compose/Snackbar/index.tsx +135 -0
- package/src/jetpack-compose/index.ts +2 -0
- package/src/jetpack-compose/modifiers/index.ts +5 -2
- package/src/swift-ui/BottomSheet/index.tsx +32 -15
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/withAnimation.ts +71 -0
- package/src/ts-declarations/react-native-web.d.ts +7 -0
- package/src/universal/BottomSheet/index.android.tsx +27 -3
- package/src/universal/BottomSheet/index.ios.tsx +30 -12
- package/src/universal/BottomSheet/index.tsx +46 -4
- package/src/universal/BottomSheet/types.ts +25 -0
- package/src/universal/Collapsible/index.android.tsx +72 -0
- package/src/universal/Collapsible/index.ios.tsx +16 -0
- package/src/universal/Collapsible/index.tsx +58 -0
- package/src/universal/Collapsible/types.ts +25 -0
- package/src/universal/Column/index.tsx +3 -1
- package/src/universal/Host/index.tsx +9 -10
- package/src/universal/Host/types.ts +70 -0
- package/src/universal/List/index.android.tsx +44 -0
- package/src/universal/List/index.ios.tsx +19 -0
- package/src/universal/List/index.tsx +26 -0
- package/src/universal/List/types.ts +28 -0
- package/src/universal/ListItem/ListItem.android.tsx +52 -0
- package/src/universal/ListItem/ListItem.ios.tsx +58 -0
- package/src/universal/ListItem/ListItem.tsx +72 -0
- package/src/universal/ListItem/ListItemSlots.tsx +66 -0
- package/src/universal/ListItem/index.ts +15 -0
- package/src/universal/ListItem/types.ts +67 -0
- package/src/universal/Picker/Picker.android.tsx +69 -0
- package/src/universal/Picker/Picker.ios.tsx +45 -0
- package/src/universal/Picker/Picker.tsx +52 -0
- package/src/universal/Picker/PickerItem.tsx +27 -0
- package/src/universal/Picker/index.ts +11 -0
- package/src/universal/Picker/types.ts +79 -0
- package/src/universal/index.ts +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.sha512 +0 -1
- package/src/community/bottom-sheet/CLAUDE.md +0 -55
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "56.0.
|
|
6
|
+
"version": "56.0.9",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-56.0.
|
|
28
|
-
"url": "expo.modules.ui-56.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-56.0.9.aar",
|
|
28
|
+
"url": "expo.modules.ui-56.0.9.aar",
|
|
29
|
+
"size": 1805504,
|
|
30
|
+
"sha512": "ba0dfa2c02b2ad1f248bfe43a5a922a95dbb83c493eb23cd8d3b98f3e790d9be19133002ac2ab408f3a9268af3c5718072f0646c2e13b0ce2d01b8198ae8ccc6",
|
|
31
|
+
"sha256": "7f2175675f65b6caaf5ce6580cdd24a10f208ae6d80b894e4460796fe2f0dc05",
|
|
32
|
+
"sha1": "4631f8e63a9536ef63c03c7666fbaa0e5a4f60a1",
|
|
33
|
+
"md5": "1375a9ac8dc803a405dd2fa39159a0bc"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-56.0.
|
|
145
|
-
"url": "expo.modules.ui-56.0.
|
|
146
|
-
"size":
|
|
147
|
-
"sha512": "
|
|
148
|
-
"sha256": "
|
|
149
|
-
"sha1": "
|
|
150
|
-
"md5": "
|
|
144
|
+
"name": "expo.modules.ui-56.0.9.aar",
|
|
145
|
+
"url": "expo.modules.ui-56.0.9.aar",
|
|
146
|
+
"size": 1805504,
|
|
147
|
+
"sha512": "ba0dfa2c02b2ad1f248bfe43a5a922a95dbb83c493eb23cd8d3b98f3e790d9be19133002ac2ab408f3a9268af3c5718072f0646c2e13b0ce2d01b8198ae8ccc6",
|
|
148
|
+
"sha256": "7f2175675f65b6caaf5ce6580cdd24a10f208ae6d80b894e4460796fe2f0dc05",
|
|
149
|
+
"sha1": "4631f8e63a9536ef63c03c7666fbaa0e5a4f60a1",
|
|
150
|
+
"md5": "1375a9ac8dc803a405dd2fa39159a0bc"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-56.0.
|
|
165
|
-
"url": "expo.modules.ui-56.0.
|
|
166
|
-
"size":
|
|
167
|
-
"sha512": "
|
|
168
|
-
"sha256": "
|
|
169
|
-
"sha1": "
|
|
170
|
-
"md5": "
|
|
164
|
+
"name": "expo.modules.ui-56.0.9-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-56.0.9-sources.jar",
|
|
166
|
+
"size": 86330,
|
|
167
|
+
"sha512": "408e70adeb3b30e509e418a2a6edbd5afb888a27f8fcd5c04032a1089ef32c4483e542854cd1621a74aa2763094cd2e6ba98b30e99e213dd06734167e6d4083c",
|
|
168
|
+
"sha256": "e068f417d7a302f7d37e1d8648b7f61d2da46d215aede6ad991e35f780e794ea",
|
|
169
|
+
"sha1": "b68d51962848180ac90fcb20a9766fabd72327ad",
|
|
170
|
+
"md5": "792086c87c80e11e11b3e96d4b0a27d5"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
485b997d6738de54d6dc1a04d29b4c9a
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9fc748a23b388982628ba7ea8fb7beb7ce8673b9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
824aeb287c84a0ae7a903bbcd2ed28e02606bb63ff7b752f67f12469461f5b75
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7a87a1877c5555ab2b67f662d16481ef097240be1ac1ffaf3866ce167bf086cd272977ed945aafaf0143ee82c0fba1af5a5edc9fd6dd3715976708eea8beb901
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>56.0.
|
|
12
|
+
<version>56.0.9</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f2d9d3bd7c4ea14a224a23d28ed45f95
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f7de9f68a75a8180e441e1d8f88d38db511ea4d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d8cabffaed7874f9cdaa99bdb3148847466647b3d8e38175a0d6129f42fc54ea
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d1b858cfe33845e3584fe8fe75da774a06c2d6ddef4c44e59671a832d9c5df04dad92780c7aa6f1a0183e337e4998d89598f6c08e91fda083ae0cd5c4a7cfb37
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0.
|
|
7
|
-
<release>56.0.
|
|
6
|
+
<latest>56.0.9</latest>
|
|
7
|
+
<release>56.0.9</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0.
|
|
9
|
+
<version>56.0.9</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260519105316</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8beb24b746da04389648d65442b3fb27
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8f014cd5ad5596a8660865918f34d57e96318181
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
00837d4c8ed40055be180e9910d9ed846227ab6602aef92f5f397e03348985db
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
400a09733b7b0b618213ee16be214463bc22a236e1073bd075d8e75a3ca278987524685812324ef7b2b52a0ec4be6a0ccd056dfc9e1f059080ba8c4594aa811f
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.9",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@types/react": "~19.2.0",
|
|
92
92
|
"react-native-reanimated": "4.3.1",
|
|
93
93
|
"react-native-worklets": "0.8.3",
|
|
94
|
-
"expo": "56.0.0-preview.
|
|
94
|
+
"expo": "56.0.0-preview.13",
|
|
95
95
|
"expo-module-scripts": "56.0.2"
|
|
96
96
|
},
|
|
97
97
|
"jest": {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"optional": true
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "290368bc41026449a05a4ebf991b85c3a2fb0e3a",
|
|
124
124
|
"scripts": {
|
|
125
125
|
"build": "expo-module build",
|
|
126
126
|
"clean": "expo-module clean",
|
|
@@ -12,11 +12,39 @@ const ExpoUI = requireNativeModule('ExpoUI');
|
|
|
12
12
|
*/
|
|
13
13
|
export type ObservableState<T> = SharedObject & {
|
|
14
14
|
/**
|
|
15
|
-
* The current value.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* The current value.
|
|
16
|
+
*
|
|
17
|
+
* Writes from a UI worklet are synchronous and immediately readable. Writes
|
|
18
|
+
* from the JS thread are scheduled to the UI thread asynchronously, the new value is not readable until the update has been
|
|
19
|
+
* applied. Prefer writing from a worklet when you need synchronous updates
|
|
18
20
|
*/
|
|
19
21
|
value: T;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A single listener invoked on the native UI runtime whenever the value changes
|
|
25
|
+
* (after iOS `didSet` and Android's setter). Assigning replaces the previous
|
|
26
|
+
* listener; assign `null` to clear. The initial value does not fire `onChange`.
|
|
27
|
+
*
|
|
28
|
+
* The callback must be a worklet so it can run synchronously on the UI thread.
|
|
29
|
+
* Attach it inside `useEffect` and clear it in the cleanup so the listener
|
|
30
|
+
* lifecycle matches the component lifecycle.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const state = useNativeState(0);
|
|
35
|
+
*
|
|
36
|
+
* useEffect(() => {
|
|
37
|
+
* state.onChange = (value) => {
|
|
38
|
+
* 'worklet';
|
|
39
|
+
* console.log('changed to', value);
|
|
40
|
+
* };
|
|
41
|
+
* return () => {
|
|
42
|
+
* state.onChange = null;
|
|
43
|
+
* };
|
|
44
|
+
* }, []);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
onChange: { listener(value: T): void }['listener'] | null;
|
|
20
48
|
};
|
|
21
49
|
|
|
22
50
|
/**
|
|
@@ -28,6 +56,7 @@ export function useNativeState<T>(initialValue: T): ObservableState<T> {
|
|
|
28
56
|
return useReleasingSharedObject(() => {
|
|
29
57
|
const state = new ExpoUI.ObservableState({ value: initialValueRef.current });
|
|
30
58
|
defineValueProperty(state);
|
|
59
|
+
defineOnChangeProperty(state);
|
|
31
60
|
return state;
|
|
32
61
|
}, []) as ObservableState<T>;
|
|
33
62
|
}
|
|
@@ -35,26 +64,57 @@ export function useNativeState<T>(initialValue: T): ObservableState<T> {
|
|
|
35
64
|
type NativeObservableState = {
|
|
36
65
|
getValue(): unknown;
|
|
37
66
|
setValue(v: { value: unknown }): void;
|
|
67
|
+
setOnChange(callback: object | null): void;
|
|
38
68
|
};
|
|
39
69
|
|
|
40
70
|
/**
|
|
41
71
|
* Adds a `value` property that delegates to the native `getValue`/`setValue` functions.
|
|
42
72
|
*/
|
|
43
73
|
function defineValueProperty(state: NativeObservableState): void {
|
|
44
|
-
let warnedOnJSWrite = false;
|
|
45
74
|
Object.defineProperty(state, 'value', {
|
|
46
75
|
get() {
|
|
47
76
|
return state.getValue();
|
|
48
77
|
},
|
|
49
78
|
set(v: unknown) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
79
|
+
state.setValue({ value: v });
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Adds an `onChange` property that wraps the user's worklet function as a
|
|
86
|
+
* `WorkletCallback` SharedObject before handing it to native. The cached
|
|
87
|
+
* function (not the SharedObject) is what the getter returns, so reading
|
|
88
|
+
* `state.onChange` gives back what the user assigned.
|
|
89
|
+
*/
|
|
90
|
+
function defineOnChangeProperty(state: NativeObservableState): void {
|
|
91
|
+
let currentFn: ((value: unknown) => void) | null = null;
|
|
92
|
+
Object.defineProperty(state, 'onChange', {
|
|
93
|
+
get() {
|
|
94
|
+
return currentFn;
|
|
95
|
+
},
|
|
96
|
+
set(fn: ((value: unknown) => void) | null | undefined) {
|
|
97
|
+
if (!fn) {
|
|
98
|
+
currentFn = null;
|
|
99
|
+
state.setOnChange(null);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (!worklets) {
|
|
103
|
+
throw new Error(
|
|
104
|
+
"ObservableState.onChange requires the 'react-native-worklets' package, which couldn't be loaded. " +
|
|
105
|
+
'Install react-native-worklets and rebuild the native app, then assign onChange again.'
|
|
55
106
|
);
|
|
56
107
|
}
|
|
57
|
-
|
|
108
|
+
if (!worklets.isWorkletFunction(fn)) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
'ObservableState.onChange must be a worklet so it can run on the UI runtime when the native value changes. ' +
|
|
111
|
+
"Add the 'worklet' directive as the first statement in your callback: " +
|
|
112
|
+
"state.onChange = (value) => { 'worklet'; ... };"
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
currentFn = fn;
|
|
116
|
+
const callback = new ExpoUI.WorkletCallback(worklets.createSerializable(fn));
|
|
117
|
+
state.setOnChange(callback);
|
|
58
118
|
},
|
|
59
119
|
});
|
|
60
120
|
}
|
|
@@ -84,12 +84,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
84
84
|
} = props;
|
|
85
85
|
const { width } = useWindowDimensions();
|
|
86
86
|
|
|
87
|
-
// Two-state pattern for animated close:
|
|
88
|
-
// - isMounted: whether the native sheet tree exists in the React tree
|
|
89
|
-
// - isPresented: passed to native isPresented prop (controls SwiftUI animation)
|
|
90
|
-
// On close: isPresented→false (native animates out) → onIsPresentedChange fires → isMounted→false (unmount)
|
|
91
|
-
// On open: isMounted→true + isPresented→true (mount + native animates in)
|
|
92
|
-
const [isMounted, setIsMounted] = useState(indexProp >= 0);
|
|
93
87
|
const [isPresented, setIsPresented] = useState(indexProp >= 0);
|
|
94
88
|
const [currentIndex, setCurrentIndex] = useState(Math.max(indexProp, 0));
|
|
95
89
|
// Ref mirrors currentIndex for use in handleDetentChange without adding it as a useCallback dep
|
|
@@ -129,7 +123,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
129
123
|
fireCloseCallbacks();
|
|
130
124
|
} else if (indexProp >= 0) {
|
|
131
125
|
closedRef.current = false;
|
|
132
|
-
setIsMounted(true);
|
|
133
126
|
setIsPresented(true);
|
|
134
127
|
const clampedIndex = Math.min(indexProp, detents.length - 1);
|
|
135
128
|
setCurrentIndex(clampedIndex);
|
|
@@ -141,7 +134,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
141
134
|
(presented: boolean) => {
|
|
142
135
|
if (!presented) {
|
|
143
136
|
setIsPresented(false);
|
|
144
|
-
setIsMounted(false);
|
|
145
137
|
fireCloseCallbacks();
|
|
146
138
|
}
|
|
147
139
|
},
|
|
@@ -169,7 +161,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
169
161
|
}
|
|
170
162
|
const clampedIndex = Math.min(Math.max(index, 0), detents.length - 1);
|
|
171
163
|
closedRef.current = false;
|
|
172
|
-
setIsMounted(true);
|
|
173
164
|
setIsPresented(true);
|
|
174
165
|
currentIndexRef.current = clampedIndex;
|
|
175
166
|
setCurrentIndex(clampedIndex);
|
|
@@ -224,14 +215,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
224
215
|
]
|
|
225
216
|
);
|
|
226
217
|
|
|
227
|
-
if (!isMounted) {
|
|
228
|
-
return (
|
|
229
|
-
<BottomSheetInternalContext.Provider value={internalContextValue}>
|
|
230
|
-
<BottomSheetContext.Provider value={methods}>{null}</BottomSheetContext.Provider>
|
|
231
|
-
</BottomSheetInternalContext.Provider>
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
218
|
return (
|
|
236
219
|
<BottomSheetInternalContext.Provider value={internalContextValue}>
|
|
237
220
|
<BottomSheetContext.Provider value={methods}>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type ColorValue } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { ObservableState } from '../../State/useNativeState';
|
|
5
|
+
import { getStateId } from '../../State/utils';
|
|
6
|
+
import { type ModifierConfig } from '../../types';
|
|
7
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Common props shared by loading indicator variants.
|
|
11
|
+
*/
|
|
12
|
+
export type LoadingIndicatorCommonConfig = {
|
|
13
|
+
/**
|
|
14
|
+
* An observable state that holds the current progress value.
|
|
15
|
+
* Create one with `useNativeState(0)`. Omit for indeterminate loading.
|
|
16
|
+
*/
|
|
17
|
+
progress?: ObservableState<number | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Loading indicator color.
|
|
20
|
+
*/
|
|
21
|
+
color?: ColorValue;
|
|
22
|
+
/**
|
|
23
|
+
* Modifiers for the component.
|
|
24
|
+
*/
|
|
25
|
+
modifiers?: ModifierConfig[];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
type NativeLoadingIndicatorCommonConfig = Omit<
|
|
29
|
+
LoadingIndicatorCommonConfig,
|
|
30
|
+
'progress' | 'modifiers'
|
|
31
|
+
> & {
|
|
32
|
+
progress?: number;
|
|
33
|
+
modifiers?: unknown;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function transformProps<T extends LoadingIndicatorCommonConfig>(
|
|
37
|
+
props: T
|
|
38
|
+
): NativeLoadingIndicatorCommonConfig {
|
|
39
|
+
const { modifiers, progress, ...restProps } = props;
|
|
40
|
+
return {
|
|
41
|
+
modifiers,
|
|
42
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
43
|
+
...restProps,
|
|
44
|
+
progress: getStateId(progress),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function createLoadingIndicatorComponent<P extends LoadingIndicatorCommonConfig>(
|
|
49
|
+
viewName: string
|
|
50
|
+
): React.ComponentType<P> {
|
|
51
|
+
const NativeView: React.ComponentType<NativeLoadingIndicatorCommonConfig> = requireNativeView(
|
|
52
|
+
'ExpoUI',
|
|
53
|
+
viewName
|
|
54
|
+
);
|
|
55
|
+
function Component(props: P) {
|
|
56
|
+
return <NativeView {...transformProps(props)} />;
|
|
57
|
+
}
|
|
58
|
+
Component.displayName = viewName;
|
|
59
|
+
return Component;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// region LoadingIndicator
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A loading indicator that displays loading using morphing shapes.
|
|
66
|
+
*
|
|
67
|
+
* Matches the Jetpack Compose `LoadingIndicator`.
|
|
68
|
+
*/
|
|
69
|
+
export const LoadingIndicator = createLoadingIndicatorComponent('LoadingIndicatorView');
|
|
70
|
+
|
|
71
|
+
// endregion
|
|
72
|
+
|
|
73
|
+
// region ContainedLoadingIndicator
|
|
74
|
+
|
|
75
|
+
export type ContainedLoadingIndicatorProps = LoadingIndicatorCommonConfig & {
|
|
76
|
+
/**
|
|
77
|
+
* Loading indicator's container color
|
|
78
|
+
*/
|
|
79
|
+
containerColor?: ColorValue;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* A loading indicator that displays loading using morphing shapes inside a container.
|
|
84
|
+
*
|
|
85
|
+
* Matches the Jetpack Compose `ContainedLoadingIndicator`.
|
|
86
|
+
*/
|
|
87
|
+
export const ContainedLoadingIndicator =
|
|
88
|
+
createLoadingIndicatorComponent<ContainedLoadingIndicatorProps>('ContainedLoadingIndicatorView');
|
|
89
|
+
// endregion
|
|
90
|
+
|
|
91
|
+
// Exported for docs api data
|
|
92
|
+
export { type ObservableState };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type Ref } from 'react';
|
|
3
|
+
import { type ColorValue } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { type ModifierConfig } from '../../types';
|
|
6
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
7
|
+
|
|
8
|
+
export type SnackbarProps = {
|
|
9
|
+
/**
|
|
10
|
+
* The background color of the snackbar container.
|
|
11
|
+
*/
|
|
12
|
+
containerColor?: ColorValue;
|
|
13
|
+
/**
|
|
14
|
+
* The preferred content color used for the message text.
|
|
15
|
+
*/
|
|
16
|
+
contentColor?: ColorValue;
|
|
17
|
+
/**
|
|
18
|
+
* The content color used for the action button.
|
|
19
|
+
*/
|
|
20
|
+
actionContentColor?: ColorValue;
|
|
21
|
+
/**
|
|
22
|
+
* The content color used for the dismiss-action icon button.
|
|
23
|
+
*/
|
|
24
|
+
dismissActionContentColor?: ColorValue;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the action should be placed on a new line below the message.
|
|
27
|
+
* Useful for long action labels.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
actionOnNewLine?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Modifiers for the component.
|
|
33
|
+
*/
|
|
34
|
+
modifiers?: ModifierConfig[];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const SnackbarNativeView: React.ComponentType<SnackbarProps> = requireNativeView(
|
|
38
|
+
'ExpoUI',
|
|
39
|
+
'SnackbarView'
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Styling configuration for the snackbar shown by `SnackbarHost`. Pass as a
|
|
44
|
+
* child to override colors or place the action on a new line.
|
|
45
|
+
*/
|
|
46
|
+
export function Snackbar(props: SnackbarProps) {
|
|
47
|
+
const { modifiers, ...rest } = props;
|
|
48
|
+
return (
|
|
49
|
+
<SnackbarNativeView
|
|
50
|
+
modifiers={modifiers}
|
|
51
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
52
|
+
{...rest}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// --- SnackbarHost ---
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* How long the snackbar is shown. Mirrors Compose's `SnackbarDuration` enum.
|
|
61
|
+
*/
|
|
62
|
+
export type SnackbarDuration = 'short' | 'long' | 'indefinite';
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Reason a snackbar invocation resolved. Mirrors Compose's `SnackbarResult` enum.
|
|
66
|
+
*/
|
|
67
|
+
export type SnackbarResult = 'actionPerformed' | 'dismissed';
|
|
68
|
+
|
|
69
|
+
export type SnackbarShowOptions = {
|
|
70
|
+
/**
|
|
71
|
+
* The message body of the snackbar.
|
|
72
|
+
*/
|
|
73
|
+
message: string;
|
|
74
|
+
/**
|
|
75
|
+
* Label for the optional action button. When omitted, no action button is shown.
|
|
76
|
+
*/
|
|
77
|
+
actionLabel?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to show a trailing close (X) icon button to dismiss the snackbar.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
withDismissAction?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* How long to show the snackbar. Defaults to `'short'` when an `actionLabel`
|
|
85
|
+
* is not provided, and `'indefinite'` when it is, matching Compose.
|
|
86
|
+
*/
|
|
87
|
+
duration?: SnackbarDuration;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type SnackbarHostRef = {
|
|
91
|
+
/**
|
|
92
|
+
* Shows a snackbar and resolves with `'actionPerformed'` when the user taps
|
|
93
|
+
* the action, or `'dismissed'` when it times out or the dismiss-action
|
|
94
|
+
* button is tapped. Subsequent calls queue and show after the current
|
|
95
|
+
* snackbar is dismissed.
|
|
96
|
+
*/
|
|
97
|
+
showSnackbar: (options: SnackbarShowOptions) => Promise<SnackbarResult>;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export type SnackbarHostProps = {
|
|
101
|
+
/**
|
|
102
|
+
* Ref exposing the imperative `showSnackbar` method.
|
|
103
|
+
*/
|
|
104
|
+
ref?: Ref<SnackbarHostRef>;
|
|
105
|
+
/**
|
|
106
|
+
* Modifiers for the component.
|
|
107
|
+
*/
|
|
108
|
+
modifiers?: ModifierConfig[];
|
|
109
|
+
/**
|
|
110
|
+
* Optional `Snackbar` child supplying styling for shown snackbars. Mirrors
|
|
111
|
+
* Compose's `SnackbarHost(hostState) { data -> Snackbar(data, ...) }` lambda.
|
|
112
|
+
*/
|
|
113
|
+
children?: React.ReactNode;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const SnackbarHostNativeView: React.ComponentType<SnackbarHostProps> = requireNativeView(
|
|
117
|
+
'ExpoUI',
|
|
118
|
+
'SnackbarHostView'
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A Material 3 [SnackbarHost](https://developer.android.com/develop/ui/compose/components/snackbar)
|
|
123
|
+
* that displays snackbars triggered via its ref's `showSnackbar` method.
|
|
124
|
+
*/
|
|
125
|
+
export function SnackbarHost(props: SnackbarHostProps) {
|
|
126
|
+
const { modifiers, children, ...rest } = props;
|
|
127
|
+
return (
|
|
128
|
+
<SnackbarHostNativeView
|
|
129
|
+
modifiers={modifiers}
|
|
130
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
131
|
+
{...rest}>
|
|
132
|
+
{children}
|
|
133
|
+
</SnackbarHostNativeView>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
@@ -49,6 +49,7 @@ export {
|
|
|
49
49
|
type HorizontalPagerProps,
|
|
50
50
|
} from './HorizontalPager';
|
|
51
51
|
export * from './SearchBar';
|
|
52
|
+
export * from './Snackbar';
|
|
52
53
|
export * from './DockedSearchBar';
|
|
53
54
|
export * from './HorizontalFloatingToolbar';
|
|
54
55
|
export * from './FloatingActionButton';
|
|
@@ -57,6 +58,7 @@ export * from './RadioButton';
|
|
|
57
58
|
export * from './Surface';
|
|
58
59
|
export { type TextProps, Text } from './Text';
|
|
59
60
|
export * from './Tooltip';
|
|
61
|
+
export * from './LoadingIndicator';
|
|
60
62
|
|
|
61
63
|
export * from './AnimatedVisibility';
|
|
62
64
|
export * from './Box';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { type AnimatedValue } from './animation';
|
|
3
|
+
import { type AnimatedValue, type AnimationSpec } from './animation';
|
|
4
4
|
import { createModifier, createModifierWithEventListener } from './createModifier';
|
|
5
5
|
export { type ExpoModifier, type ModifierConfig } from '../../types';
|
|
6
6
|
export {
|
|
@@ -142,9 +142,12 @@ export const offset = (x: number, y: number) => createModifier('offset', { x, y
|
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Sets the background color.
|
|
145
|
+
* Pass an `animationSpec` to smoothly animate between colors when the prop changes (backed by `animateColorAsState`).
|
|
145
146
|
* @param color - A color string (hex, e.g., `'#FF0000'`).
|
|
147
|
+
* @param options.animationSpec - Optional spec — animate between color changes.
|
|
146
148
|
*/
|
|
147
|
-
export const background = (color: ColorValue
|
|
149
|
+
export const background = (color: ColorValue, options?: { animationSpec?: AnimationSpec }) =>
|
|
150
|
+
createModifier('background', { color, animationSpec: options?.animationSpec });
|
|
148
151
|
|
|
149
152
|
/**
|
|
150
153
|
* Adds a border around the view.
|