@expo/ui 57.0.13 → 57.0.15
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 +34 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +17 -3
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +31 -0
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +161 -11
- package/build/PresentedContentContext.d.ts +18 -0
- package/build/PresentedContentContext.d.ts.map +1 -0
- package/build/community/pager-view/PagerView.android.d.ts.map +1 -1
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts.map +1 -1
- package/build/jetpack-compose/Host/index.d.ts +3 -0
- package/build/jetpack-compose/Host/index.d.ts.map +1 -1
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts +25 -2
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/RNHostView/index.d.ts +6 -6
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/shared.d.ts +2 -1
- package/build/jetpack-compose/TextField/shared.d.ts.map +1 -1
- package/build/jetpack-compose/Tooltip/index.d.ts.map +1 -1
- package/build/keyboard/index.d.ts +43 -0
- package/build/keyboard/index.d.ts.map +1 -0
- package/build/keyboard/interop.d.ts +16 -0
- package/build/keyboard/interop.d.ts.map +1 -0
- package/build/keyboard/textInputState.d.ts +2 -0
- package/build/keyboard/textInputState.d.ts.map +1 -0
- package/build/keyboard/textInputState.web.d.ts +11 -0
- package/build/keyboard/textInputState.web.d.ts.map +1 -0
- package/build/swift-ui/Background/index.d.ts +18 -0
- package/build/swift-ui/Background/index.d.ts.map +1 -0
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/Host/index.d.ts +3 -0
- package/build/swift-ui/Host/index.d.ts.map +1 -1
- package/build/swift-ui/Popover/index.d.ts.map +1 -1
- package/build/swift-ui/RNHostView.d.ts +4 -1
- package/build/swift-ui/RNHostView.d.ts.map +1 -1
- package/build/swift-ui/SecureField/index.d.ts.map +1 -1
- package/build/swift-ui/TextField/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/modifiers/index.d.ts +9 -34
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +3 -2
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapeStyle.d.ts +54 -0
- package/build/swift-ui/modifiers/shapeStyle.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 +20 -0
- package/build/universal/BottomSheet/types.d.ts.map +1 -1
- package/build/universal/ListItem/ListItem.android.d.ts.map +1 -1
- package/build/universal/ListItem/types.d.ts +19 -0
- package/build/universal/ListItem/types.d.ts.map +1 -1
- package/build/universal/RNHostView/index.android.d.ts +1 -1
- package/build/universal/RNHostView/index.android.d.ts.map +1 -1
- package/build/universal/RNHostView/index.d.ts +1 -1
- package/build/universal/RNHostView/index.d.ts.map +1 -1
- package/build/universal/RNHostView/index.ios.d.ts +1 -1
- package/build/universal/RNHostView/index.ios.d.ts.map +1 -1
- package/build/universal/RNHostView/types.d.ts +2 -0
- package/build/universal/RNHostView/types.d.ts.map +1 -1
- package/build/utils/useMergeRefs.d.ts +12 -0
- package/build/utils/useMergeRefs.d.ts.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/BackgroundView.swift +34 -0
- package/ios/ColorPickerView.swift +1 -1
- package/ios/Convertibles/ShapeStyleValue.swift +129 -0
- package/ios/ExpoUIModule.swift +4 -0
- package/ios/HostView.swift +7 -0
- package/ios/Modifiers/ForegroundStyleModifier.swift +12 -105
- package/ios/Modifiers/ViewModifierRegistry.swift +29 -5
- package/ios/RNHostView.swift +64 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13-sources.jar → 57.0.15/expo.modules.ui-57.0.15-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13.module → 57.0.15/expo.modules.ui-57.0.15.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13.pom → 57.0.15/expo.modules.ui-57.0.15.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.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 +4 -4
- package/src/PresentedContentContext.tsx +22 -0
- package/src/community/pager-view/PagerView.android.tsx +1 -7
- package/src/jetpack-compose/AlertDialog/index.tsx +6 -1
- package/src/jetpack-compose/BasicAlertDialog/index.tsx +7 -1
- package/src/jetpack-compose/DropdownMenu/index.tsx +7 -1
- package/src/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.tsx +3 -1
- package/src/jetpack-compose/Host/index.tsx +28 -17
- package/src/jetpack-compose/ModalBottomSheet/index.tsx +8 -1
- package/src/jetpack-compose/Progress/index.tsx +32 -2
- package/src/jetpack-compose/RNHostView/index.tsx +28 -13
- package/src/jetpack-compose/TextField/shared.ts +7 -1
- package/src/jetpack-compose/Tooltip/index.tsx +2 -1
- package/src/keyboard/index.tsx +243 -0
- package/src/keyboard/interop.ts +99 -0
- package/src/keyboard/textInputState.ts +2 -0
- package/src/keyboard/textInputState.web.ts +16 -0
- package/src/swift-ui/Background/index.tsx +38 -0
- package/src/swift-ui/BottomSheet/index.tsx +4 -1
- package/src/swift-ui/Host/index.tsx +33 -18
- package/src/swift-ui/Popover/index.tsx +7 -1
- package/src/swift-ui/RNHostView.tsx +20 -3
- package/src/swift-ui/SecureField/index.tsx +8 -2
- package/src/swift-ui/TextField/index.tsx +8 -1
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/modifiers/index.ts +10 -39
- package/src/swift-ui/modifiers/presentationModifiers.ts +3 -2
- package/src/swift-ui/modifiers/shapeStyle.ts +55 -0
- package/src/ts-declarations/react-native-text-input-state.d.ts +26 -0
- package/src/universal/BottomSheet/index.android.tsx +4 -0
- package/src/universal/BottomSheet/index.ios.tsx +5 -0
- package/src/universal/BottomSheet/index.tsx +4 -0
- package/src/universal/BottomSheet/types.ts +22 -0
- package/src/universal/ListItem/ListItem.android.tsx +2 -1
- package/src/universal/ListItem/types.ts +21 -0
- package/src/universal/RNHostView/index.android.tsx +2 -1
- package/src/universal/RNHostView/index.ios.tsx +6 -2
- package/src/universal/RNHostView/index.tsx +2 -0
- package/src/universal/RNHostView/types.ts +3 -0
- package/src/utils/useMergeRefs.ts +47 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha512 +0 -1
package/ios/RNHostView.swift
CHANGED
|
@@ -5,22 +5,59 @@ import ExpoModulesCore
|
|
|
5
5
|
|
|
6
6
|
internal final class RNHostViewProps: ExpoSwiftUI.ViewProps {
|
|
7
7
|
@Field var matchContents: Bool = false
|
|
8
|
+
/**
|
|
9
|
+
Adds LeafNode and MeasurableYogaNode trait in Shadow node
|
|
10
|
+
*/
|
|
11
|
+
@Field var expoInternalSizeFromChildren: Bool = false
|
|
12
|
+
/**
|
|
13
|
+
Whether this view owns its subtree's touches and is the origin its content is measured from. Set
|
|
14
|
+
by the JavaScript side for content presented in its own view controller — see `RNHostView.tsx`,
|
|
15
|
+
which reads it from the sheet or popover presenting the content.
|
|
16
|
+
|
|
17
|
+
Also read by `ExpoViewShadowNode` in C++, which turns it into the `RootNodeKind` trait so
|
|
18
|
+
`measure()` stops its ancestor walk here.
|
|
19
|
+
*/
|
|
20
|
+
@Field var layoutRoot: Bool = false
|
|
8
21
|
}
|
|
9
22
|
|
|
23
|
+
// Touches and `measure()` must agree on a coordinate space. Which space depends on where the
|
|
24
|
+
// content sits:
|
|
25
|
+
// Normal tree:
|
|
26
|
+
// The surface root above us already dispatches, in surface coordinates. We attach
|
|
27
|
+
// nothing and publish a content origin, so `measure()` matches those touches.
|
|
28
|
+
// Sheet, popover:
|
|
29
|
+
// Presented in its own view controller, so nothing above dispatches and the
|
|
30
|
+
// content would get no touches at all. We attach our own handler, and
|
|
31
|
+
// `layoutRoot` measures from this view — the space those touches arrive in.
|
|
32
|
+
//
|
|
33
|
+
// Attaching a handler in the normal tree would give the subtree two streams in two spaces: UIKit
|
|
34
|
+
// delivers a touch to the hit view and every ancestor, and the root's cannot be suppressed from
|
|
35
|
+
// below, so presses would cancel on any movement.
|
|
10
36
|
struct RNHostView: ExpoSwiftUI.View {
|
|
11
37
|
|
|
12
38
|
@ObservedObject var props: RNHostViewProps
|
|
13
|
-
// Owns the RCTSurfaceTouchHandler we attach to the hosted RN view so it is detached again when
|
|
14
|
-
// this host disappears.
|
|
15
39
|
@StateObject private var touchHandler = RNHostTouchHandler()
|
|
16
40
|
|
|
17
41
|
var body: some View {
|
|
42
|
+
hostedContent
|
|
43
|
+
.modifier(
|
|
44
|
+
PublishContentOriginModifier(
|
|
45
|
+
shadowNodeProxy: props.shadowNodeProxy,
|
|
46
|
+
isEnabled: !props.layoutRoot
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@ViewBuilder
|
|
52
|
+
private var hostedContent: some View {
|
|
18
53
|
if props.matchContents, let childUIView = firstChildUIView {
|
|
19
54
|
ApplySizeFromYogaNode(childUIView: childUIView) {
|
|
20
55
|
Children()
|
|
21
56
|
}
|
|
22
57
|
.onAppear {
|
|
23
|
-
|
|
58
|
+
if props.layoutRoot {
|
|
59
|
+
touchHandler.attach(to: childUIView)
|
|
60
|
+
}
|
|
24
61
|
}
|
|
25
62
|
.onDisappear {
|
|
26
63
|
touchHandler.detach()
|
|
@@ -40,7 +77,7 @@ struct RNHostView: ExpoSwiftUI.View {
|
|
|
40
77
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
41
78
|
.modifier(ReportSizeToYogaNodeModifier(shadowNodeProxy: props.shadowNodeProxy))
|
|
42
79
|
.onAppear {
|
|
43
|
-
if let view = firstChildUIView {
|
|
80
|
+
if props.layoutRoot, let view = firstChildUIView {
|
|
44
81
|
touchHandler.attach(to: view)
|
|
45
82
|
}
|
|
46
83
|
}
|
|
@@ -55,6 +92,29 @@ struct RNHostView: ExpoSwiftUI.View {
|
|
|
55
92
|
}
|
|
56
93
|
}
|
|
57
94
|
|
|
95
|
+
// Publishes where SwiftUI placed this view inside its `Host`, so `measure()` reports the position
|
|
96
|
+
// the hosted content actually occupies.
|
|
97
|
+
private struct PublishContentOriginModifier: ViewModifier {
|
|
98
|
+
let shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
99
|
+
let isEnabled: Bool
|
|
100
|
+
|
|
101
|
+
func body(content: Content) -> some View {
|
|
102
|
+
if isEnabled {
|
|
103
|
+
content
|
|
104
|
+
.onGeometryChange(for: CGRect.self) { proxy in
|
|
105
|
+
proxy.frame(in: .named(expoHostCoordinateSpace))
|
|
106
|
+
} action: { frame in
|
|
107
|
+
shadowNodeProxy.setContentOrigin?(frame.origin)
|
|
108
|
+
}
|
|
109
|
+
.onDisappear {
|
|
110
|
+
shadowNodeProxy.clearContentOrigin?()
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
content
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
58
118
|
// Tracks the `RCTSurfaceTouchHandler` attached to a hosted RN view so it can be detached when the
|
|
59
119
|
// `RNHostView` disappears, instead of leaking onto the recycled component view.
|
|
60
120
|
private final class RNHostTouchHandler: ObservableObject {
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
727cf7bc8ccb03288f429d152d19ebb8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8f8ba3c03ae3deb578a50866e3aa7c1da0a1608a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c0de9f779e4c1fa3758abcbbee8831628a015e11cc4d7242fd1c1ead65a62eef
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20a3c1eb5e1bddbb7b3708606f314fbffaa9165cff2e148826fd2e7cd7e1def14e2b3e7ef1190ba853b66f5a71f3d32c05c71f7c7e98dc8470d2e5c2bfccd752
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
edd3e3bac5983521c3fb8ba7a1830f75
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
413330dc1478358eefbcd2ad21a352e69567b868
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.15",
|
|
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-57.0.
|
|
28
|
-
"url": "expo.modules.ui-57.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-57.0.15.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.15.aar",
|
|
29
|
+
"size": 1996194,
|
|
30
|
+
"sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
|
|
31
|
+
"sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
|
|
32
|
+
"sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
|
|
33
|
+
"md5": "edd3e3bac5983521c3fb8ba7a1830f75"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-57.0.
|
|
145
|
-
"url": "expo.modules.ui-57.0.
|
|
146
|
-
"size":
|
|
147
|
-
"sha512": "
|
|
148
|
-
"sha256": "
|
|
149
|
-
"sha1": "
|
|
150
|
-
"md5": "
|
|
144
|
+
"name": "expo.modules.ui-57.0.15.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.15.aar",
|
|
146
|
+
"size": 1996194,
|
|
147
|
+
"sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
|
|
148
|
+
"sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
|
|
149
|
+
"sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
|
|
150
|
+
"md5": "edd3e3bac5983521c3fb8ba7a1830f75"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-57.0.
|
|
165
|
-
"url": "expo.modules.ui-57.0.
|
|
166
|
-
"size":
|
|
167
|
-
"sha512": "
|
|
168
|
-
"sha256": "
|
|
169
|
-
"sha1": "
|
|
170
|
-
"md5": "
|
|
164
|
+
"name": "expo.modules.ui-57.0.15-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.15-sources.jar",
|
|
166
|
+
"size": 101673,
|
|
167
|
+
"sha512": "20a3c1eb5e1bddbb7b3708606f314fbffaa9165cff2e148826fd2e7cd7e1def14e2b3e7ef1190ba853b66f5a71f3d32c05c71f7c7e98dc8470d2e5c2bfccd752",
|
|
168
|
+
"sha256": "c0de9f779e4c1fa3758abcbbee8831628a015e11cc4d7242fd1c1ead65a62eef",
|
|
169
|
+
"sha1": "8f8ba3c03ae3deb578a50866e3aa7c1da0a1608a",
|
|
170
|
+
"md5": "727cf7bc8ccb03288f429d152d19ebb8"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2795adc5211a8fc7f863c991f23d839d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0b9ff6c6054311175dc6bd90b07c314a7ede6f84
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
78e5605f43fc4b0f3d2f9a15f1c4fdec5c2ea8cd318b91c420b6eb15dd5eb494
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f05356766b79d9fdcf15c07d42f0d07954b8ccf6603f68f05ce2c1520ef4a7be053913ea4dc39f8c9d778ab0e844d3933e057b56073a68eecb6acbc4dffca05
|
|
@@ -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>57.0.
|
|
12
|
+
<version>57.0.15</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/57.0.15/expo.modules.ui-57.0.15.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5a8652e710f6244614c44748103be21e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20bca33f9608309fa2b6d4b60f481576201db951
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
05310f77cf9090370c199b477a3a20040419deaf872950d919fe112d9820ca3b
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
872bf3ee828e9dcea87db32b2396a6eb3cccacffdedf263d0f85a7943ca20d09fbb5e97c6f20bcd2852e128597f47f67ed957b76350335de57c13f5a103cd67f
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.15</latest>
|
|
7
|
+
<release>57.0.15</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.15</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260901160721</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ef804b0b5130bf45649f48809235610b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
00c505224838ff5cfc459029b30fbe70426dc730
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0f4c9b5ca861ed3f22c5b000a3022934d9956a512c8c28ddb6b70f883ba75503
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
786895d2586ce5fb37d448df152d909e98c025c03aaf2270c419fd12255f58901f577deb0cb4d9f63fad7d3c591b528caee5583839c481d23c1737e8646dd681
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.15",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@types/react": "~19.2.0",
|
|
97
97
|
"react-native-reanimated": "4.5.1",
|
|
98
98
|
"react-native-worklets": "0.10.1",
|
|
99
|
-
"expo": "
|
|
100
|
-
"expo
|
|
99
|
+
"expo-module-scripts": "56.0.3",
|
|
100
|
+
"expo": "57.0.19"
|
|
101
101
|
},
|
|
102
102
|
"jest": {
|
|
103
103
|
"preset": "expo-module-scripts"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"optional": true
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "b76ecf192c5325793bcea31dd9bb8efd91f9ad7f",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createContext, useContext, type ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export const PresentedContentContext = createContext(false);
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Whether the surrounding content is presented in its own view controller — a sheet, a popover
|
|
7
|
+
* — rather than in the React Native surface.
|
|
8
|
+
*
|
|
9
|
+
* `RNHostView` needs this because nothing above such content dispatches React Native touches: the
|
|
10
|
+
* surface root is not one of its ancestors. A hosted view there has to dispatch its own touches and
|
|
11
|
+
* be the origin its content is measured from, and both of those come from a single `layoutRoot`
|
|
12
|
+
* prop.
|
|
13
|
+
*
|
|
14
|
+
* Defaults to `false`, so content that is not wrapped keeps deferring to the surface root.
|
|
15
|
+
*/
|
|
16
|
+
export function useIsPresentedInOwnWindow(): boolean {
|
|
17
|
+
return useContext(PresentedContentContext);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function PresentedContent({ children }: { children: ReactNode }) {
|
|
21
|
+
return <PresentedContentContext.Provider value>{children}</PresentedContentContext.Provider>;
|
|
22
|
+
}
|
|
@@ -77,13 +77,7 @@ export function PagerView(props: PagerViewProps) {
|
|
|
77
77
|
const pages = Children.toArray(children)
|
|
78
78
|
.filter((child): child is ReactElement => isValidElement(child))
|
|
79
79
|
.map((child, index) => (
|
|
80
|
-
<RNHostView
|
|
81
|
-
key={child.key ?? String(index)}
|
|
82
|
-
// Overlap pages at one origin so each page's RN shadow position matches
|
|
83
|
-
// where Compose draws it; otherwise `measure()`-based hit-testing
|
|
84
|
-
// (e.g. `Pressable`) misfires on pages after the first (#46386).
|
|
85
|
-
style={StyleSheet.absoluteFill}
|
|
86
|
-
modifiers={[fillMaxSize()]}>
|
|
80
|
+
<RNHostView key={child.key ?? String(index)} modifiers={[fillMaxSize()]}>
|
|
87
81
|
<View style={styles.page} pointerEvents={index === settledPage ? 'auto' : 'none'}>
|
|
88
82
|
{child}
|
|
89
83
|
</View>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
import { type ColorValue } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import { PresentedContent } from '../../PresentedContentContext';
|
|
4
5
|
import { type ViewEvent, type ModifierConfig, type DialogProperties } from '../../types';
|
|
5
6
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
7
|
|
|
@@ -123,7 +124,11 @@ function AlertDialogIcon(props: { children: React.ReactNode }) {
|
|
|
123
124
|
*/
|
|
124
125
|
function AlertDialogComponent(props: AlertDialogProps) {
|
|
125
126
|
const { children, ...restProps } = props;
|
|
126
|
-
return
|
|
127
|
+
return (
|
|
128
|
+
<AlertDialogNativeView {...transformProps(restProps)}>
|
|
129
|
+
<PresentedContent>{children}</PresentedContent>
|
|
130
|
+
</AlertDialogNativeView>
|
|
131
|
+
);
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
AlertDialogComponent.Title = AlertDialogTitle;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
|
|
3
|
+
import { PresentedContent } from '../../PresentedContentContext';
|
|
3
4
|
import { type ViewEvent, type ModifierConfig, type DialogProperties } from '../../types';
|
|
4
5
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
6
|
|
|
@@ -51,7 +52,12 @@ function transformProps(props: BasicAlertDialogProps): NativeBasicAlertDialogPro
|
|
|
51
52
|
* Unlike `AlertDialog`, this component does not have structured title/text/buttons slots.
|
|
52
53
|
*/
|
|
53
54
|
export function BasicAlertDialog(props: BasicAlertDialogProps) {
|
|
54
|
-
|
|
55
|
+
const { children, ...rest } = props;
|
|
56
|
+
return (
|
|
57
|
+
<BasicAlertDialogNativeView {...transformProps(rest as BasicAlertDialogProps)}>
|
|
58
|
+
<PresentedContent>{children}</PresentedContent>
|
|
59
|
+
</BasicAlertDialogNativeView>
|
|
60
|
+
);
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
// Re-exported so the docs generator includes DialogProperties on the BasicAlertDialog API page.
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { StyleProp, ViewStyle, ColorValue } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { PresentedContent } from '../../PresentedContentContext';
|
|
5
6
|
import type { ModifierConfig } from '../../types';
|
|
6
7
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
7
8
|
|
|
@@ -67,7 +68,12 @@ type NativeMenuProps = {
|
|
|
67
68
|
* Children should be `DropdownMenuItem` components or other native views.
|
|
68
69
|
*/
|
|
69
70
|
export function Items(props: { children: ReactNode }) {
|
|
70
|
-
|
|
71
|
+
// The items are presented in their own popup window; the trigger stays in the React Native surface.
|
|
72
|
+
return (
|
|
73
|
+
<SlotNativeView slotName="items">
|
|
74
|
+
<PresentedContent>{props.children}</PresentedContent>
|
|
75
|
+
</SlotNativeView>
|
|
76
|
+
);
|
|
71
77
|
}
|
|
72
78
|
Items.tag = 'Items';
|
|
73
79
|
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { type ColorValue } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { PresentedContent } from '../../PresentedContentContext';
|
|
5
6
|
import { type ModifierConfig } from '../../types';
|
|
6
7
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
7
8
|
|
|
@@ -48,7 +49,8 @@ export function ExposedDropdownMenu(props: ExposedDropdownMenuProps) {
|
|
|
48
49
|
modifiers={modifiers}
|
|
49
50
|
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
50
51
|
{...restProps}>
|
|
51
|
-
{
|
|
52
|
+
{/* The menu is a popup in its own window. The anchor stays in `ExposedDropdownMenuBox`. */}
|
|
53
|
+
<PresentedContent>{children}</PresentedContent>
|
|
52
54
|
</NativeView>
|
|
53
55
|
);
|
|
54
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { useMemo, type Ref } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
type ColorSchemeName,
|
|
5
5
|
type ColorValue,
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
useColorScheme as useRNColorScheme,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
|
|
12
|
+
import { TextInputHostProvider, useTextInputHostRef } from '../../keyboard';
|
|
13
|
+
import { useMergeRefs } from '../../utils/useMergeRefs';
|
|
12
14
|
import { getMaterialColors, HostPaletteContext } from '../colors';
|
|
13
15
|
import { type PrimitiveBaseProps } from '../layout';
|
|
14
16
|
|
|
@@ -65,6 +67,8 @@ export interface HostProps extends PrimitiveBaseProps {
|
|
|
65
67
|
children: React.ReactNode;
|
|
66
68
|
style?: StyleProp<ViewStyle>;
|
|
67
69
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto';
|
|
70
|
+
/** @hidden */
|
|
71
|
+
ref?: Ref<any>;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
type NativeHostProps = Omit<HostProps, 'colorScheme'> & {
|
|
@@ -72,6 +76,7 @@ type NativeHostProps = Omit<HostProps, 'colorScheme'> & {
|
|
|
72
76
|
matchContentsHorizontal?: boolean;
|
|
73
77
|
colorScheme?: ColorSchemeName;
|
|
74
78
|
seedColor?: ColorValue;
|
|
79
|
+
ref?: Ref<any>;
|
|
75
80
|
};
|
|
76
81
|
|
|
77
82
|
const HostNativeView: React.ComponentType<NativeHostProps> = requireNativeView(
|
|
@@ -87,6 +92,7 @@ export function Host(props: HostProps) {
|
|
|
87
92
|
layoutDirection,
|
|
88
93
|
colorScheme,
|
|
89
94
|
seedColor,
|
|
95
|
+
ref,
|
|
90
96
|
...restProps
|
|
91
97
|
} = props;
|
|
92
98
|
const schemeString = colorScheme === 'light' || colorScheme === 'dark' ? colorScheme : undefined;
|
|
@@ -97,25 +103,30 @@ export function Host(props: HostProps) {
|
|
|
97
103
|
() => getMaterialColors({ scheme: resolvedScheme, seedColor }),
|
|
98
104
|
[resolvedScheme, seedColor]
|
|
99
105
|
);
|
|
106
|
+
const hostRef = useTextInputHostRef();
|
|
107
|
+
const mergedRef = useMergeRefs(ref, hostRef);
|
|
100
108
|
|
|
101
109
|
return (
|
|
102
110
|
<HostPaletteContext.Provider value={palette}>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
layoutDirection
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
<TextInputHostProvider hostRef={hostRef}>
|
|
112
|
+
<HostNativeView
|
|
113
|
+
{...restProps}
|
|
114
|
+
modifiers={modifiers}
|
|
115
|
+
matchContentsVertical={
|
|
116
|
+
typeof matchContents === 'object' ? matchContents.vertical : matchContents
|
|
117
|
+
}
|
|
118
|
+
matchContentsHorizontal={
|
|
119
|
+
typeof matchContents === 'object' ? matchContents.horizontal : matchContents
|
|
120
|
+
}
|
|
121
|
+
colorScheme={schemeString}
|
|
122
|
+
seedColor={seedColor}
|
|
123
|
+
onLayoutContent={onLayoutContent}
|
|
124
|
+
layoutDirection={
|
|
125
|
+
layoutDirection ?? (I18nManager.getConstants().isRTL ? 'rightToLeft' : 'leftToRight')
|
|
126
|
+
}
|
|
127
|
+
ref={mergedRef}
|
|
128
|
+
/>
|
|
129
|
+
</TextInputHostProvider>
|
|
119
130
|
</HostPaletteContext.Provider>
|
|
120
131
|
);
|
|
121
132
|
}
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import type { Ref, ReactNode, ComponentType } from 'react';
|
|
3
3
|
import type { ColorValue } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { PresentedContent } from '../../PresentedContentContext';
|
|
5
6
|
import { type ModifierConfig } from '../../types';
|
|
6
7
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
7
8
|
|
|
@@ -138,7 +139,13 @@ function DragHandle(props: { children: ReactNode }) {
|
|
|
138
139
|
* A Material Design modal bottom sheet.
|
|
139
140
|
*/
|
|
140
141
|
function ModalBottomSheetComponent(props: ModalBottomSheetProps) {
|
|
141
|
-
|
|
142
|
+
const { children, ...rest } = props;
|
|
143
|
+
// The whole sheet, drag handle included, is presented in its own window, so all of it is marked.
|
|
144
|
+
return (
|
|
145
|
+
<ModalBottomSheetNativeView {...transformProps(rest as ModalBottomSheetProps)}>
|
|
146
|
+
<PresentedContent>{children}</PresentedContent>
|
|
147
|
+
</ModalBottomSheetNativeView>
|
|
148
|
+
);
|
|
142
149
|
}
|
|
143
150
|
|
|
144
151
|
ModalBottomSheetComponent.DragHandle = DragHandle;
|
|
@@ -128,9 +128,38 @@ export const CircularProgressIndicator = createProgressComponent<CircularProgres
|
|
|
128
128
|
|
|
129
129
|
// endregion
|
|
130
130
|
|
|
131
|
+
// region WavyProgressIndicators
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Wave configuration shared by the wavy progress indicator variants.
|
|
135
|
+
*/
|
|
136
|
+
export type WavyProgressCommonConfig = {
|
|
137
|
+
/**
|
|
138
|
+
* Height of the wave, where `0` draws a flat line and `1` draws the full wave height.
|
|
139
|
+
* When set, the amplitude stays the same across the whole track.
|
|
140
|
+
* When omitted, a determinate indicator uses the Material 3 default, which flattens the wave as
|
|
141
|
+
* progress approaches `0` and `1`.
|
|
142
|
+
* An indeterminate indicator defaults to the full wave height.
|
|
143
|
+
*/
|
|
144
|
+
amplitude?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Length of a single wave in dp. `CircularWavyProgressIndicator` rounds this to fit a whole
|
|
147
|
+
* number of waves around the ring, so the wave it draws can be slightly shorter or longer.
|
|
148
|
+
*/
|
|
149
|
+
wavelength?: number;
|
|
150
|
+
/**
|
|
151
|
+
* Speed of the wave in dp per second. Defaults to `wavelength`, which advances the wave by one
|
|
152
|
+
* wavelength per second. Set it to `0` to stop the wave from moving.
|
|
153
|
+
*/
|
|
154
|
+
waveSpeed?: number;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// endregion
|
|
158
|
+
|
|
131
159
|
// region LinearWavyProgressIndicator
|
|
132
160
|
|
|
133
|
-
export interface LinearWavyProgressIndicatorProps
|
|
161
|
+
export interface LinearWavyProgressIndicatorProps
|
|
162
|
+
extends ProgressCommonConfig, WavyProgressCommonConfig {
|
|
134
163
|
/**
|
|
135
164
|
* Size of the stop indicator in dp at the end of the determinate progress track.
|
|
136
165
|
*/
|
|
@@ -149,7 +178,8 @@ export const LinearWavyProgressIndicator =
|
|
|
149
178
|
|
|
150
179
|
// region CircularWavyProgressIndicator
|
|
151
180
|
|
|
152
|
-
export interface CircularWavyProgressIndicatorProps
|
|
181
|
+
export interface CircularWavyProgressIndicatorProps
|
|
182
|
+
extends ProgressCommonConfig, WavyProgressCommonConfig {}
|
|
153
183
|
|
|
154
184
|
/**
|
|
155
185
|
* A circular progress indicator with wavy animation style.
|