@expo/ui 56.0.7 → 56.0.8
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 +17 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +6 -2
- package/android/src/main/java/expo/modules/ui/HostView.kt +2 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +19 -1
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +8 -3
- package/android/src/main/java/expo/modules/ui/ShadowNodeSyncFlush.kt +28 -0
- package/build/community/menu/MenuView.android.d.ts +16 -0
- package/build/community/menu/MenuView.android.d.ts.map +1 -0
- package/build/community/menu/MenuView.d.ts +19 -0
- package/build/community/menu/MenuView.d.ts.map +1 -0
- package/build/community/menu/MenuView.ios.d.ts +10 -0
- package/build/community/menu/MenuView.ios.d.ts.map +1 -0
- package/build/community/menu/index.d.ts +5 -0
- package/build/community/menu/index.d.ts.map +1 -0
- package/build/community/menu/types.d.ts +166 -0
- package/build/community/menu/types.d.ts.map +1 -0
- package/build/jetpack-compose/modifiers/index.d.ts +15 -0
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/Alert/index.d.ts +42 -0
- package/build/swift-ui/Alert/index.d.ts.map +1 -0
- package/build/swift-ui/SlotView.d.ts +5 -2
- package/build/swift-ui/SlotView.d.ts.map +1 -1
- package/build/swift-ui/SwipeActions/index.d.ts +38 -0
- package/build/swift-ui/SwipeActions/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +2 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +3 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/symbolEffect.d.ts +103 -0
- package/build/swift-ui/modifiers/symbolEffect.d.ts.map +1 -0
- package/build/universal/Host/index.d.ts +17 -6
- package/build/universal/Host/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Alert/Alert.swift +56 -0
- package/ios/Alert/AlertProps.swift +8 -0
- package/ios/ExpoUIModule.swift +2 -0
- package/ios/ExpoUITouchHandlerHelper.h +4 -1
- package/ios/ExpoUITouchHandlerHelper.mm +1 -0
- package/ios/Modifiers/SwipeActionsModifier.swift +97 -0
- package/ios/Modifiers/SymbolEffectModifier.swift +452 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/ios/SlotView.swift +5 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7-sources.jar → 56.0.8/expo.modules.ui-56.0.8-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8-sources.jar.sha512 +1 -0
- 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 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7.module → 56.0.8/expo.modules.ui-56.0.8.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7.pom → 56.0.8/expo.modules.ui-56.0.8.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.8/expo.modules.ui-56.0.8.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 +7 -3
- package/src/community/menu/MenuView.android.tsx +224 -0
- package/src/community/menu/MenuView.ios.tsx +149 -0
- package/src/community/menu/MenuView.tsx +36 -0
- package/src/community/menu/index.tsx +14 -0
- package/src/community/menu/types.tsx +171 -0
- package/src/jetpack-compose/modifiers/index.ts +25 -0
- package/src/swift-ui/Alert/index.tsx +87 -0
- package/src/swift-ui/SlotView.tsx +17 -4
- package/src/swift-ui/SwipeActions/index.tsx +73 -0
- package/src/swift-ui/index.tsx +2 -0
- package/src/swift-ui/modifiers/index.ts +3 -0
- package/src/swift-ui/modifiers/symbolEffect.ts +181 -0
- package/src/ts-declarations/react-native-web.d.ts +20 -0
- package/src/universal/Host/index.tsx +70 -5
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.8 — 2026-05-15
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- [universal] Added `matchContents`, `layoutDirection`, `onLayoutContent`, `useViewportSizeMeasurement`, and `ignoreSafeArea` support to the universal `Host`. ([#45776](https://github.com/expo/expo/pull/45776) by [@zoontek](https://github.com/zoontek))
|
|
18
|
+
- [iOS] Added `symbolEffect` modifier. ([#45727](https://github.com/expo/expo/pull/45727) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
19
|
+
- [iOS] Added `Alert` component wrapping SwiftUI's `.alert(_:isPresented:actions:message:)` modifier, with `Alert.Trigger`, `Alert.Actions`, and optional `Alert.Message` slots. Mirrors the existing `ConfirmationDialog` shape so it composes the same way with `Button` actions and `isPresented` bindings. ([#45700](https://github.com/expo/expo/pull/45700) by [@ramonclaudio](https://github.com/ramonclaudio))
|
|
20
|
+
|
|
21
|
+
### 💡 Others
|
|
22
|
+
|
|
23
|
+
- Fixed precompile xcframework warning. ([#45762](https://github.com/expo/expo/pull/45762) by [@kudo](https://github.com/kudo))
|
|
24
|
+
|
|
13
25
|
## 56.0.7 — 2026-05-13
|
|
14
26
|
|
|
15
27
|
_This version does not introduce any user-facing changes._
|
|
@@ -20,10 +32,13 @@ _This version does not introduce any user-facing changes._
|
|
|
20
32
|
|
|
21
33
|
- Added `@expo/ui/community/slider`, a drop-in replacement for `@react-native-community/slider`. ([#45623](https://github.com/expo/expo/pull/45623) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
22
34
|
- Make `ChartView` public. ([#45674](https://github.com/expo/expo/pull/45674) by [@jakex7](https://github.com/jakex7))
|
|
35
|
+
- Added `@expo/ui/community/menu`, a drop-in replacement for `@react-native-menu/menu`. ([#45670](https://github.com/expo/expo/pull/45670) by [@vonovak](https://github.com/vonovak))
|
|
36
|
+
- [android] Added Compose `combinedClickable` modifier. ([#45670](https://github.com/expo/expo/pull/45670) by [@vonovak](https://github.com/vonovak))
|
|
23
37
|
|
|
24
38
|
### 🐛 Bug fixes
|
|
25
39
|
|
|
26
40
|
- Fix `useNativeState` recreating the `ObservableState` when initial value changes; the seed is now captured once via `useRef`. ([#45623](https://github.com/expo/expo/pull/45623) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
41
|
+
- [Android] Fix layout shift in `Host` with `matchContents`. ([#45775](https://github.com/expo/expo/pull/45775) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
27
42
|
|
|
28
43
|
## 56.0.5 — 2026-05-11
|
|
29
44
|
|
|
@@ -87,6 +102,7 @@ _This version does not introduce any user-facing changes._
|
|
|
87
102
|
- [iOS] Add `WorkletCallback` shared object for synchronous UI thread callbacks. ([#44216](https://github.com/expo/expo/pull/44216) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
88
103
|
- [iOS] Added `scrollPosition` and `id` modifiers for tracking and scrolling to view-aligned targets in `ScrollView` and other scrollable containers (iOS 17+). ([#44652](https://github.com/expo/expo/pull/44652) by [@ramonclaudio](https://github.com/ramonclaudio))
|
|
89
104
|
- Added `@expo/ui/datetimepicker` — an Android and iOS `DateTimePicker` drop-in replacement for `@react-native-community/datetimepicker`. ([#44014](https://github.com/expo/expo/pull/44014) by [@vonovak](https://github.com/vonovak))
|
|
105
|
+
- [iOS] Added `SwipeActions` component. ([#44689](https://github.com/expo/expo/pull/44689) by [@yousofabouhalawa](https://github.com/yousofabouhalawa))
|
|
90
106
|
- [swift-ui] Added `LazyHStack` and `LazyVStack`. ([#44612](https://github.com/expo/expo/pull/44612) by [@kudo](https://github.com/kudo))
|
|
91
107
|
- [jetpack-compose] Added `LazyRow` component and `onVisibilityChanged` modifier. ([#44615](https://github.com/expo/expo/pull/44615) by [@kudo](https://github.com/kudo))
|
|
92
108
|
- Added universal components. ([#44601](https://github.com/expo/expo/pull/44601) by [@kudo](https://github.com/kudo))
|
|
@@ -115,6 +131,7 @@ _This version does not introduce any user-facing changes._
|
|
|
115
131
|
### 💡 Others
|
|
116
132
|
|
|
117
133
|
- Moved `DateTimePicker` to `@expo/ui/community/datetime-picker`. The old `@expo/ui/datetimepicker` export still works but logs a deprecation warning in development. ([@vonovak](https://github.com/vonovak)) ([#45211](https://github.com/expo/expo/pull/45211) by [@vonovak](https://github.com/vonovak))
|
|
134
|
+
- [iOS] Added `extraProps` to `SlotView` for passing metadata to SwiftUI slot consumers. ([#44689](https://github.com/expo/expo/pull/45287) by [@yousofabouhalawa](https://github.com/yousofabouhalawa))
|
|
118
135
|
- [jetpack-compose] Use view hash code as key for `Children`. ([#44521](https://github.com/expo/expo/pull/44521) by [@kudo](https://github.com/kudo))
|
|
119
136
|
- Refactored `ComposableScope` and allow extensibility. ([#44698](https://github.com/expo/expo/pull/44698) by [@kudo](https://github.com/kudo))
|
|
120
137
|
- [jetpack-compose] Reuse `HorizontalAlignment` converter in `LazyColumn`. ([#44755](https://github.com/expo/expo/pull/44755) by [@kudo](https://github.com/kudo))
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '56.0.
|
|
15
|
+
version = '56.0.8'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "56.0.
|
|
21
|
+
versionName "56.0.8"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -86,7 +86,8 @@ class ExpoUIModule : Module() {
|
|
|
86
86
|
//region Views use expo-modules-core DSL for uncommon features
|
|
87
87
|
|
|
88
88
|
View(HostView::class) {
|
|
89
|
-
|
|
89
|
+
// See ShadowNodeSyncFlush.kt for why onExpoUISyncFlush is needed.
|
|
90
|
+
Events("onLayoutContent", "onExpoUISyncFlush")
|
|
90
91
|
|
|
91
92
|
OnViewDidUpdateProps { view ->
|
|
92
93
|
view.onViewDidUpdateProps()
|
|
@@ -123,7 +124,10 @@ class ExpoUIModule : Module() {
|
|
|
123
124
|
colorScheme.toTokenMap()
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
View(RNHostView::class)
|
|
127
|
+
View(RNHostView::class) {
|
|
128
|
+
// See ShadowNodeSyncFlush.kt for why this internal phantom event is needed.
|
|
129
|
+
Events("onExpoUISyncFlush")
|
|
130
|
+
}
|
|
127
131
|
|
|
128
132
|
View(SlotView::class) {
|
|
129
133
|
Events("onSlotEvent")
|
|
@@ -193,6 +193,7 @@ internal class HostView(context: Context, appContext: AppContext) :
|
|
|
193
193
|
if (constraints.maxWidth == 0) widthDp else Double.NaN,
|
|
194
194
|
if (constraints.maxHeight == 0) heightDp else Double.NaN
|
|
195
195
|
)
|
|
196
|
+
flushPendingStateUpdates()
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
199
|
|
|
@@ -221,6 +222,7 @@ internal class HostView(context: Context, appContext: AppContext) :
|
|
|
221
222
|
val styleWidth = if (matchContentsHorizontal == true && width > 0) width else null
|
|
222
223
|
val styleHeight = if (matchContentsVertical == true && height > 0) height else null
|
|
223
224
|
shadowNodeProxy.setStyleSize(styleWidth?.toDouble(), styleHeight?.toDouble())
|
|
225
|
+
flushPendingStateUpdates()
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
onLayoutContent(LayoutContentEvent(width.toDouble(), height.toDouble()))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@file:OptIn(ExperimentalMaterial3ExpressiveApi::class, ExperimentalMaterial3Api::class)
|
|
1
|
+
@file:OptIn(ExperimentalMaterial3ExpressiveApi::class, ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
|
|
2
2
|
|
|
3
3
|
package expo.modules.ui
|
|
4
4
|
|
|
@@ -7,9 +7,11 @@ import androidx.compose.animation.animateContentSize
|
|
|
7
7
|
import androidx.compose.animation.core.Spring
|
|
8
8
|
import androidx.compose.animation.core.spring
|
|
9
9
|
import androidx.compose.foundation.BorderStroke
|
|
10
|
+
import androidx.compose.foundation.ExperimentalFoundationApi
|
|
10
11
|
import androidx.compose.foundation.background
|
|
11
12
|
import androidx.compose.foundation.border
|
|
12
13
|
import androidx.compose.foundation.clickable
|
|
14
|
+
import androidx.compose.foundation.combinedClickable
|
|
13
15
|
import androidx.compose.foundation.horizontalScroll
|
|
14
16
|
import androidx.compose.foundation.rememberScrollState
|
|
15
17
|
import androidx.compose.foundation.verticalScroll
|
|
@@ -633,6 +635,22 @@ object ModifierRegistry {
|
|
|
633
635
|
}
|
|
634
636
|
}
|
|
635
637
|
|
|
638
|
+
register("combinedClickable") { map, _, _, eventDispatcher ->
|
|
639
|
+
val params = recordFromMap<ClickableParams>(map)
|
|
640
|
+
val onClick = { eventDispatcher("combinedClickable", mapOf("event" to "click")) }
|
|
641
|
+
val onLongClick = { eventDispatcher("combinedClickable", mapOf("event" to "longClick")) }
|
|
642
|
+
if (params.indication) {
|
|
643
|
+
Modifier.combinedClickable(onClick = onClick, onLongClick = onLongClick)
|
|
644
|
+
} else {
|
|
645
|
+
Modifier.combinedClickable(
|
|
646
|
+
interactionSource = null,
|
|
647
|
+
indication = null,
|
|
648
|
+
onClick = onClick,
|
|
649
|
+
onLongClick = onLongClick
|
|
650
|
+
)
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
636
654
|
register("selectable") { map, _, _, eventDispatcher ->
|
|
637
655
|
val params = recordFromMap<SelectableParams>(map)
|
|
638
656
|
Modifier.selectable(
|
|
@@ -36,7 +36,8 @@ import expo.modules.kotlin.views.OptimizedComposeProps
|
|
|
36
36
|
|
|
37
37
|
@OptimizedComposeProps
|
|
38
38
|
internal data class RNHostViewProps(
|
|
39
|
-
val matchContents: MutableState<Boolean?> = mutableStateOf(null)
|
|
39
|
+
val matchContents: MutableState<Boolean?> = mutableStateOf(null),
|
|
40
|
+
val modifiers: ModifierList = emptyList()
|
|
40
41
|
) : ComposeProps
|
|
41
42
|
|
|
42
43
|
@SuppressLint("ViewConstructor")
|
|
@@ -86,23 +87,26 @@ internal class RNHostView(context: Context, appContext: AppContext) :
|
|
|
86
87
|
@Composable
|
|
87
88
|
override fun ComposableScope.Content() {
|
|
88
89
|
val matchContents = props.matchContents.value ?: false
|
|
90
|
+
val scope: ComposableScope = this
|
|
89
91
|
|
|
90
92
|
wrapperState.value?.let { wrapper ->
|
|
91
93
|
val childView = childViewState.value ?: return@let
|
|
92
|
-
val
|
|
94
|
+
val sizingModifier = if (matchContents) {
|
|
93
95
|
applySizeFromYogaNodeModifier(childView)
|
|
94
96
|
} else {
|
|
95
97
|
Modifier
|
|
96
98
|
.fillMaxSize()
|
|
97
99
|
.then(reportSizeToYogaNodeModifier())
|
|
98
100
|
}
|
|
101
|
+
val modifiers = sizingModifier
|
|
102
|
+
.then(ModifierRegistry.applyModifiers(props.modifiers, appContext, scope, globalEventDispatcher))
|
|
99
103
|
|
|
100
104
|
AndroidView(
|
|
101
105
|
factory = {
|
|
102
106
|
(wrapper.parent as? ViewGroup)?.removeView(wrapper)
|
|
103
107
|
wrapper
|
|
104
108
|
},
|
|
105
|
-
modifier =
|
|
109
|
+
modifier = modifiers
|
|
106
110
|
)
|
|
107
111
|
}
|
|
108
112
|
}
|
|
@@ -154,6 +158,7 @@ internal class RNHostView(context: Context, appContext: AppContext) :
|
|
|
154
158
|
size.width.toDp().value.toDouble(),
|
|
155
159
|
size.height.toDp().value.toDouble()
|
|
156
160
|
)
|
|
161
|
+
flushPendingStateUpdates()
|
|
157
162
|
}
|
|
158
163
|
}
|
|
159
164
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
package expo.modules.ui
|
|
2
|
+
|
|
3
|
+
import android.view.View
|
|
4
|
+
import com.facebook.react.bridge.Arguments
|
|
5
|
+
import com.facebook.react.bridge.ReactContext
|
|
6
|
+
import com.facebook.react.bridge.WritableMap
|
|
7
|
+
import com.facebook.react.uimanager.UIManagerHelper
|
|
8
|
+
import com.facebook.react.uimanager.events.Event
|
|
9
|
+
|
|
10
|
+
// Workaround helper that triggers a synchronous event to flush a pending
|
|
11
|
+
// shadow-node state update in the current event beat. Mirrors iOS's
|
|
12
|
+
// `EventQueue::UpdateMode::unstable_Immediate`, which Android does not expose
|
|
13
|
+
// to Java/Kotlin as of now.
|
|
14
|
+
// TODO: Remove when a synchronous state update API is exposed on Android.
|
|
15
|
+
// https://github.com/facebook/react-native/pull/56311
|
|
16
|
+
internal fun View.flushPendingStateUpdates() {
|
|
17
|
+
val reactContext = context as? ReactContext ?: return
|
|
18
|
+
val surfaceId = UIManagerHelper.getSurfaceId(this)
|
|
19
|
+
UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)
|
|
20
|
+
?.dispatchEvent(SyncFlushEvent(surfaceId, id))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private class SyncFlushEvent(surfaceId: Int, viewTag: Int) : Event<SyncFlushEvent>(surfaceId, viewTag) {
|
|
24
|
+
override fun getEventName(): String = "topExpoUISyncFlush"
|
|
25
|
+
override fun getEventData(): WritableMap = Arguments.createMap()
|
|
26
|
+
override fun canCoalesce(): Boolean = true
|
|
27
|
+
override fun experimental_isSynchronous(): Boolean = true
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MenuComponentProps, MenuComponentRef } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-menu/menu` on Android.
|
|
5
|
+
* Wraps the trigger in a `Pressable` (whose `onPress`/`onLongPress` opens the menu) and
|
|
6
|
+
* renders the actions tree as a controlled Material `DropdownMenu`.
|
|
7
|
+
*
|
|
8
|
+
* Note: when `action.image` is a string, it is treated as an iOS SF Symbol and ignored
|
|
9
|
+
* on Android — pass an `ImageSourcePropType` (e.g. `require('./icon.xml')`) to render
|
|
10
|
+
* a leading icon. `MenuView.title` is also unused on Android since Material
|
|
11
|
+
* `DropdownMenu` has no title slot.
|
|
12
|
+
*/
|
|
13
|
+
export declare function MenuView(props: MenuComponentProps & {
|
|
14
|
+
ref?: React.Ref<MenuComponentRef>;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=MenuView.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuView.android.d.ts","sourceRoot":"","sources":["../../../src/community/menu/MenuView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAc,kBAAkB,EAAE,gBAAgB,EAAqB,MAAM,SAAS,CAAC;AA4InG;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,2CAsEzF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import type { MenuComponentProps, MenuComponentRef } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-menu/menu`'s `MenuView`. Wrap any trigger
|
|
5
|
+
* view; long-pressing or tapping (per `shouldOpenOnLongPress`) shows a popup menu
|
|
6
|
+
* built from the `actions` tree.
|
|
7
|
+
*
|
|
8
|
+
* - On Android, renders via Compose's `DropdownMenu` anchored to a `Pressable`.
|
|
9
|
+
* - On iOS, renders via SwiftUI's `Menu` (tap) or `ContextMenu` (long-press).
|
|
10
|
+
* - On web, the trigger renders the trigger but actions do not fire;
|
|
11
|
+
* a one-time `console.warn` is emitted.
|
|
12
|
+
*
|
|
13
|
+
* @platform android
|
|
14
|
+
* @platform ios
|
|
15
|
+
*/
|
|
16
|
+
export declare function MenuView(props: MenuComponentProps & {
|
|
17
|
+
ref?: Ref<MenuComponentRef>;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=MenuView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuView.d.ts","sourceRoot":"","sources":["../../../src/community/menu/MenuView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAkC,MAAM,OAAO,CAAC;AAGjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIpE;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,2CAenF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MenuComponentProps, MenuComponentRef } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-menu/menu` on iOS.
|
|
5
|
+
* Uses SwiftUI `Menu` for tap triggers and `ContextMenu` for long-press triggers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function MenuView(props: MenuComponentProps & {
|
|
8
|
+
ref?: React.Ref<MenuComponentRef>;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=MenuView.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuView.ios.d.ts","sourceRoot":"","sources":["../../../src/community/menu/MenuView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAc,kBAAkB,EAAE,gBAAgB,EAAqB,MAAM,SAAS,CAAC;AAiGnG;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,2CA6CzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/community/menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,eAAe,QAAQ,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ColorValue, ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
4
|
+
/**
|
|
5
|
+
* Visual and behavioral attributes of a menu action.
|
|
6
|
+
* Compatible with `@react-native-menu/menu`.
|
|
7
|
+
*/
|
|
8
|
+
export type MenuAttributes = {
|
|
9
|
+
/**
|
|
10
|
+
* Renders the action with a destructive style (red text/icon).
|
|
11
|
+
*/
|
|
12
|
+
destructive?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Disables the action so it can't be activated.
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Hides the action from the menu.
|
|
19
|
+
*/
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Selection state for a menu action.
|
|
24
|
+
* `'on'` renders a checkmark; `'off'` doesn't.
|
|
25
|
+
*/
|
|
26
|
+
export type MenuState = 'on' | 'off';
|
|
27
|
+
/**
|
|
28
|
+
* A single action inside a `MenuView`.
|
|
29
|
+
* Compatible with `@react-native-menu/menu`.
|
|
30
|
+
*/
|
|
31
|
+
export type MenuAction = {
|
|
32
|
+
/**
|
|
33
|
+
* Identifier passed back via `onPressAction.nativeEvent.event` when this action is selected.
|
|
34
|
+
* Defaults to `title` if omitted.
|
|
35
|
+
*/
|
|
36
|
+
id?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Action label shown in the menu.
|
|
39
|
+
*/
|
|
40
|
+
title: string;
|
|
41
|
+
/**
|
|
42
|
+
* Text color of the action label.
|
|
43
|
+
* @platform android
|
|
44
|
+
*/
|
|
45
|
+
titleColor?: ColorValue;
|
|
46
|
+
/**
|
|
47
|
+
* Icon to render beside the action label.
|
|
48
|
+
*
|
|
49
|
+
* - When an `SFSymbol` name (e.g. `'trash'`), rendered on iOS only.
|
|
50
|
+
* Not rendered on Android — pass an `ImageSourcePropType` instead to show an
|
|
51
|
+
* icon there.
|
|
52
|
+
* - When an `ImageSourcePropType` (e.g. `require('./trash.xml')` or
|
|
53
|
+
* `{ uri: '...' }`), rendered on Android via Compose `Icon`. Ignored on iOS;
|
|
54
|
+
* SwiftUI menus only accept SF Symbol names for built-in `Menu`/`Button`
|
|
55
|
+
* labels.
|
|
56
|
+
*/
|
|
57
|
+
image?: SFSymbol | ImageSourcePropType;
|
|
58
|
+
/**
|
|
59
|
+
* Tint color applied to the action's icon.
|
|
60
|
+
*
|
|
61
|
+
* Visually applied on Android via the leading `Icon`'s tint. On iOS, the
|
|
62
|
+
* value is accepted but **may not render**: SwiftUI's `Menu`/`ContextMenu`
|
|
63
|
+
* draw their items via the system menu UI, which ignores per-item color
|
|
64
|
+
* modifiers.
|
|
65
|
+
*/
|
|
66
|
+
imageColor?: ColorValue;
|
|
67
|
+
/**
|
|
68
|
+
* Selection state. When `'on'`, the action renders a checkmark.
|
|
69
|
+
*/
|
|
70
|
+
state?: MenuState;
|
|
71
|
+
/**
|
|
72
|
+
* Visual/behavioral flags.
|
|
73
|
+
*/
|
|
74
|
+
attributes?: MenuAttributes;
|
|
75
|
+
/**
|
|
76
|
+
* Nested actions. Without `displayInline`, renders as a submenu;
|
|
77
|
+
* with `displayInline: true`, renders as an inline section.
|
|
78
|
+
*/
|
|
79
|
+
subactions?: MenuAction[];
|
|
80
|
+
/**
|
|
81
|
+
* When `true` and `subactions` is present, renders the children as an inline section
|
|
82
|
+
* inside the parent menu (with this action's `title` as the section header on iOS).
|
|
83
|
+
*/
|
|
84
|
+
displayInline?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Imperative handle exposed by `MenuView` via `ref`.
|
|
88
|
+
* Compatible with `@react-native-menu/menu`'s `ref.show()` API.
|
|
89
|
+
*/
|
|
90
|
+
export type MenuComponentRef = {
|
|
91
|
+
/**
|
|
92
|
+
* Programmatically open the menu.
|
|
93
|
+
*
|
|
94
|
+
* On Android, opens the anchored `DropdownMenu` (equivalent to the user tapping
|
|
95
|
+
* the trigger). On iOS this is a no-op — SwiftUI `Menu`/`ContextMenu` have no
|
|
96
|
+
* programmatic open API; a one-time `console.warn` is emitted in development.
|
|
97
|
+
* @platform android
|
|
98
|
+
*/
|
|
99
|
+
show: () => void;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Event payload delivered to `onPressAction` when an action is selected.
|
|
103
|
+
* Compatible with `@react-native-menu/menu`.
|
|
104
|
+
*/
|
|
105
|
+
export type NativeActionEvent = {
|
|
106
|
+
nativeEvent: {
|
|
107
|
+
/** Identifier of the pressed action: `action.id ?? action.title`. */
|
|
108
|
+
event: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Props for the `MenuView` component.
|
|
113
|
+
* Drop-in compatible with `@react-native-menu/menu`.
|
|
114
|
+
*/
|
|
115
|
+
export type MenuComponentProps = {
|
|
116
|
+
/**
|
|
117
|
+
* Menu title shown at the top of the menu.
|
|
118
|
+
* @platform ios
|
|
119
|
+
*/
|
|
120
|
+
title?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Callback invoked when a menu action is selected.
|
|
123
|
+
*/
|
|
124
|
+
onPressAction?: (event: NativeActionEvent) => void;
|
|
125
|
+
/**
|
|
126
|
+
* Callback invoked when the menu opens.
|
|
127
|
+
*
|
|
128
|
+
* On Android, fires when the trigger's tap/long-press flips `expanded` to `true`.
|
|
129
|
+
* On iOS, SwiftUI `Menu`/`ContextMenu` do not expose an open hook, so this is not
|
|
130
|
+
* fired there.
|
|
131
|
+
* @platform android
|
|
132
|
+
*/
|
|
133
|
+
onOpenMenu?: () => void;
|
|
134
|
+
/**
|
|
135
|
+
* Callback invoked when the menu closes (either via dismissal or after an action
|
|
136
|
+
* fires).
|
|
137
|
+
*
|
|
138
|
+
* On Android, fires from the controlled `DropdownMenu`'s dismiss path.
|
|
139
|
+
* On iOS, SwiftUI `Menu`/`ContextMenu` do not expose a close hook in a way we can
|
|
140
|
+
* forward, so this is not fired there.
|
|
141
|
+
* @platform android
|
|
142
|
+
*/
|
|
143
|
+
onCloseMenu?: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* The actions to display in the menu.
|
|
146
|
+
*/
|
|
147
|
+
actions: MenuAction[];
|
|
148
|
+
/**
|
|
149
|
+
* When `true`, the menu opens on long-press of the trigger instead of a single tap.
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
shouldOpenOnLongPress?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Style applied to the trigger wrapper.
|
|
155
|
+
*/
|
|
156
|
+
style?: StyleProp<ViewStyle>;
|
|
157
|
+
/**
|
|
158
|
+
* Test identifier passed through to the trigger view.
|
|
159
|
+
*/
|
|
160
|
+
testID?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Trigger view. Long-pressing or tapping (per `shouldOpenOnLongPress`) opens the menu.
|
|
163
|
+
*/
|
|
164
|
+
children?: ReactNode;
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/community/menu/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,mBAAmB,CAAC;IACvC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE;QACX,qEAAqE;QACrE,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
|
|
@@ -194,6 +194,21 @@ export declare const menuAnchor: (type?: "primaryNotEditable", enabled?: boolean
|
|
|
194
194
|
export declare const clickable: (handler: () => void, options?: {
|
|
195
195
|
indication?: boolean;
|
|
196
196
|
}) => import("./createModifier").ModifierConfig;
|
|
197
|
+
/**
|
|
198
|
+
* Makes the view respond to both click and long-click gestures.
|
|
199
|
+
* Wraps Compose's `Modifier.combinedClickable`. Useful for triggering a `DropdownMenu`
|
|
200
|
+
* on long-press while keeping a separate short-press action.
|
|
201
|
+
* @param handlers.onClick - Function to call on a short tap.
|
|
202
|
+
* @param handlers.onLongClick - Function to call on a long press.
|
|
203
|
+
* @param options - Optional configuration.
|
|
204
|
+
* @param options.indication - Whether to show a ripple indication. Defaults to `true`.
|
|
205
|
+
*/
|
|
206
|
+
export declare const combinedClickable: (handlers: {
|
|
207
|
+
onClick?: () => void;
|
|
208
|
+
onLongClick?: () => void;
|
|
209
|
+
}, options?: {
|
|
210
|
+
indication?: boolean;
|
|
211
|
+
}) => import("./createModifier").ModifierConfig;
|
|
197
212
|
/**
|
|
198
213
|
* Makes the view selectable, like a radio button row.
|
|
199
214
|
* @param selected - Whether the item is currently selected.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/modifiers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,IAAI,EACJ,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,SAAS,GAEjB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,WAAW,GACX,aAAa,GACb,cAAc,GACd,WAAW,GAEX,KAAK,GACL,kBAAkB,GAClB,QAAQ,GAER,OAAO,GACP,oBAAoB,GACpB,KAAK,CAAC;AAEV;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,8CAA0C,CAAC;AAEjF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,QAAQ,MAAM,8CACvB,CAAC;AAMzD;;;;GAIG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,8CAA8C,CAAC;AAEj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AI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAIlD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;eACmB,YAAY;YAClB,YAAY;4BAClB,MAAM,GAAG,WAAW,KAAG,YAAY;wBAIvC,MAAM,GAAG,WAAW,KAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,YAAY,8CAAsC,CAAC;AAM/E;;;;GAIG;AACH,eAAO,MAAM,cAAc,iDAAyC,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,iDAA2C,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Props of the `Alert` component.
|
|
4
|
+
*/
|
|
5
|
+
export type AlertProps = {
|
|
6
|
+
/**
|
|
7
|
+
* The contents of the alert.
|
|
8
|
+
* Should include `Alert.Trigger`, `Alert.Actions`, and optionally `Alert.Message`.
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The title of the alert.
|
|
13
|
+
*/
|
|
14
|
+
title: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the alert is presented.
|
|
17
|
+
*/
|
|
18
|
+
isPresented?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* A callback that is called when the `isPresented` state changes.
|
|
21
|
+
*/
|
|
22
|
+
onIsPresentedChange?: (isPresented: boolean) => void;
|
|
23
|
+
} & CommonViewModifierProps;
|
|
24
|
+
/**
|
|
25
|
+
* `Alert` presents a SwiftUI alert with a title, optional message, and action buttons.
|
|
26
|
+
*
|
|
27
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/alert(_:ispresented:actions:message:)).
|
|
28
|
+
*/
|
|
29
|
+
declare function Alert(props: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare namespace Alert {
|
|
31
|
+
var Trigger: (props: {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
var Actions: (props: {
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
var Message: (props: {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
}
|
|
41
|
+
export { Alert };
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Alert/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;CACtD,GAAG,uBAAuB,CAAC;AAgC5B;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,2CAe/B;kBAfQ,KAAK;yBAvBU;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;yBAO7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;yBAO7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;AA8BrD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type SlotProps<ExtraProps extends Record<string, unknown> = Record<string, unknown>> = {
|
|
2
2
|
name: string;
|
|
3
|
+
extraProps?: ExtraProps;
|
|
3
4
|
children?: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export declare function Slot<ExtraProps extends Record<string, unknown> = Record<string, unknown>>({ name, extraProps, children, }: SlotProps<ExtraProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
5
8
|
//# sourceMappingURL=SlotView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotView.d.ts","sourceRoot":"","sources":["../../src/swift-ui/SlotView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlotView.d.ts","sourceRoot":"","sources":["../../src/swift-ui/SlotView.tsx"],"names":[],"mappings":"AAEA,KAAK,SAAS,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAIF,wBAAgB,IAAI,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACzF,IAAI,EACJ,UAAU,EACV,QAAQ,GACT,EAAE,SAAS,CAAC,UAAU,CAAC,2CAMvB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
|
+
export type SwipeActionsEdge = 'leading' | 'trailing';
|
|
3
|
+
export type SwipeActionsProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The regular content and `SwipeActions.Actions` action groups.
|
|
6
|
+
*/
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
} & CommonViewModifierProps;
|
|
9
|
+
export type SwipeActionsGroupProps = {
|
|
10
|
+
/**
|
|
11
|
+
* The edge where these swipe actions are revealed.
|
|
12
|
+
* @default 'trailing'
|
|
13
|
+
*/
|
|
14
|
+
edge?: SwipeActionsEdge;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a full swipe automatically performs the first action in this group.
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
allowsFullSwipe?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The buttons revealed when the user swipes from this edge.
|
|
22
|
+
*/
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The buttons revealed when the user swipes the regular content from an edge.
|
|
27
|
+
*/
|
|
28
|
+
export declare function Actions({ edge, allowsFullSwipe, children, }: SwipeActionsGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Applies native SwiftUI swipe actions to its non-slot children.
|
|
31
|
+
* @platform ios
|
|
32
|
+
*/
|
|
33
|
+
declare function SwipeActionsComponent(props: SwipeActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare const SwipeActions: typeof SwipeActionsComponent & {
|
|
35
|
+
Actions: typeof Actions;
|
|
36
|
+
};
|
|
37
|
+
export { SwipeActions };
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/SwipeActions/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,uBAAuB,CAAC;AAE5B,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AASF;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAiB,EACjB,eAAsB,EACtB,QAAQ,GACT,EAAE,sBAAsB,2CAMxB;AAED;;;GAGG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,2CAUtD;AAED,QAAA,MAAM,YAAY;;CAAoD,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../State/index.fx';
|
|
2
2
|
export * from './AccessoryWidgetBackground';
|
|
3
|
+
export * from './Alert';
|
|
3
4
|
export * from './BottomSheet';
|
|
4
5
|
export * from './Button';
|
|
5
6
|
export * from './Chart';
|
|
@@ -32,6 +33,7 @@ export * from './ShareLink';
|
|
|
32
33
|
export * from './Slider';
|
|
33
34
|
export * from './Spacer';
|
|
34
35
|
export * from './Stepper';
|
|
36
|
+
export * from './SwipeActions';
|
|
35
37
|
export * from './Text';
|
|
36
38
|
export { useNativeState } from '../State/useNativeState';
|
|
37
39
|
export * from './SyncToggle';
|