@expo/ui 58.0.6 → 58.0.7
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 +12 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +9 -0
- package/android/src/main/java/expo/modules/ui/LazyColumnView.kt +6 -1
- package/android/src/main/java/expo/modules/ui/LazyItemsView.kt +313 -0
- package/android/src/main/java/expo/modules/ui/LazyRowView.kt +6 -1
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +18 -4
- package/build/jetpack-compose/LazyColumn/index.d.ts +6 -0
- package/build/jetpack-compose/LazyColumn/index.js +2 -0
- package/build/jetpack-compose/LazyColumn/index.js.map +1 -1
- package/build/jetpack-compose/LazyItems/index.d.ts +54 -0
- package/build/jetpack-compose/LazyItems/index.js +63 -0
- package/build/jetpack-compose/LazyItems/index.js.map +1 -0
- package/build/jetpack-compose/LazyRow/index.d.ts +6 -0
- package/build/jetpack-compose/LazyRow/index.js +2 -0
- package/build/jetpack-compose/LazyRow/index.js.map +1 -1
- package/build/jetpack-compose/index.d.ts +1 -0
- package/build/jetpack-compose/index.js.map +1 -1
- package/build/recycling/useRecycledRows.d.ts +52 -0
- package/build/recycling/useRecycledRows.js +121 -0
- package/build/recycling/useRecycledRows.js.map +1 -0
- package/build/recycling/window.js.map +1 -0
- package/build/swift-ui/List/DataListForEach.d.ts +2 -9
- package/build/swift-ui/List/DataListForEach.js +15 -106
- package/build/swift-ui/List/DataListForEach.js.map +1 -1
- package/build/swift-ui/List/ListForEach.js +3 -2
- package/build/swift-ui/List/ListForEach.js.map +1 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +8 -0
- package/build/swift-ui/modifiers/presentationModifiers.js +9 -0
- package/build/swift-ui/modifiers/presentationModifiers.js.map +1 -1
- package/build/universal/transformStyle.ios.js +4 -3
- package/build/universal/transformStyle.ios.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Modifiers/PresentationModifiers.swift +10 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.6/expo.modules.ui-58.0.6-sources.jar → 58.0.7/expo.modules.ui-58.0.7-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.6/expo.modules.ui-58.0.6.module → 58.0.7/expo.modules.ui-58.0.7.module} +23 -23
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.6/expo.modules.ui-58.0.6.pom → 58.0.7/expo.modules.ui-58.0.7.pom} +2 -2
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.7/expo.modules.ui-58.0.7.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/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
- package/src/jetpack-compose/LazyColumn/index.tsx +3 -0
- package/src/jetpack-compose/LazyItems/index.tsx +121 -0
- package/src/jetpack-compose/LazyRow/index.tsx +3 -0
- package/src/jetpack-compose/index.ts +1 -0
- package/src/recycling/useRecycledRows.tsx +200 -0
- package/src/swift-ui/List/DataListForEach.tsx +21 -142
- package/src/swift-ui/List/ListForEach.tsx +3 -2
- package/src/swift-ui/modifiers/presentationModifiers.ts +10 -0
- package/src/universal/transformStyle.ios.ts +5 -2
- package/build/swift-ui/List/window.js.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha512 +0 -1
- /package/build/{swift-ui/List → recycling}/window.d.ts +0 -0
- /package/build/{swift-ui/List → recycling}/window.js +0 -0
- /package/src/{swift-ui/List → recycling}/window.ts +0 -0
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
3
|
|
|
4
|
+
import {
|
|
5
|
+
useRecycledRows,
|
|
6
|
+
type RecycledSlotProps,
|
|
7
|
+
type WindowChangeEvent,
|
|
8
|
+
} from '../../recycling/useRecycledRows';
|
|
4
9
|
import { type ViewEvent } from '../../types';
|
|
5
10
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
11
|
import { type CommonViewModifierProps } from '../types';
|
|
7
|
-
import { getSlotIndices, getWindow } from './window';
|
|
8
12
|
|
|
9
13
|
export interface ListForEachProps<ItemT> extends CommonViewModifierProps {
|
|
10
14
|
/** Called with deleted indices from this group's `data` array. */
|
|
@@ -46,9 +50,8 @@ export interface ListForEachProps<ItemT> extends CommonViewModifierProps {
|
|
|
46
50
|
estimatedItemSize?: number;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
|
-
type WindowEvent = { first: number; last: number; revision: number };
|
|
50
53
|
type NativeProps = CommonViewModifierProps &
|
|
51
|
-
ViewEvent<'onWindowChange',
|
|
54
|
+
ViewEvent<'onWindowChange', WindowChangeEvent> &
|
|
52
55
|
ViewEvent<'onDelete', { indices: number[]; revision: number }> &
|
|
53
56
|
ViewEvent<'onMove', { sourceIndices: number[]; destination: number; revision: number }> & {
|
|
54
57
|
deleteEnabled: boolean;
|
|
@@ -58,59 +61,14 @@ type NativeProps = CommonViewModifierProps &
|
|
|
58
61
|
estimatedItemSize: number;
|
|
59
62
|
children: ReactElement;
|
|
60
63
|
};
|
|
61
|
-
type SlotProps = {
|
|
62
|
-
itemKey: string;
|
|
63
|
-
index: number;
|
|
64
|
-
revision: number;
|
|
65
|
-
children: ReactElement;
|
|
66
|
-
};
|
|
67
64
|
|
|
68
65
|
const NativeList = requireNativeView<NativeProps>('ExpoUI', 'DataListForEachView');
|
|
69
|
-
export const NativeSlot = requireNativeView<
|
|
66
|
+
export const NativeSlot = requireNativeView<RecycledSlotProps>('ExpoUI', 'DataListForEachItemView');
|
|
70
67
|
const NativePool = requireNativeView<{ children: ReactElement[] }>(
|
|
71
68
|
'ExpoUI',
|
|
72
69
|
'DataListForEachPoolView'
|
|
73
70
|
);
|
|
74
71
|
|
|
75
|
-
// Skip unchanged rows when the window moves.
|
|
76
|
-
const RecycledRow = memo(function RecycledRow<ItemT>({
|
|
77
|
-
item,
|
|
78
|
-
index,
|
|
79
|
-
itemKey,
|
|
80
|
-
revision,
|
|
81
|
-
renderItem,
|
|
82
|
-
}: SlotPropsWithoutChildren & {
|
|
83
|
-
item: ItemT;
|
|
84
|
-
renderItem: ListForEachProps<ItemT>['children'];
|
|
85
|
-
}) {
|
|
86
|
-
return (
|
|
87
|
-
<NativeSlot itemKey={itemKey} index={index} revision={revision}>
|
|
88
|
-
{renderItem({ item, index })}
|
|
89
|
-
</NativeSlot>
|
|
90
|
-
);
|
|
91
|
-
}) as <ItemT>(
|
|
92
|
-
props: SlotPropsWithoutChildren & {
|
|
93
|
-
item: ItemT;
|
|
94
|
-
renderItem: ListForEachProps<ItemT>['children'];
|
|
95
|
-
}
|
|
96
|
-
) => ReactElement;
|
|
97
|
-
type SlotPropsWithoutChildren = Omit<SlotProps, 'children'>;
|
|
98
|
-
|
|
99
|
-
export function useItemKeys<ItemT>(
|
|
100
|
-
data: readonly ItemT[],
|
|
101
|
-
keyExtractor: ListForEachProps<ItemT>['keyExtractor']
|
|
102
|
-
): string[] {
|
|
103
|
-
const keyExtractorRef = useRef(keyExtractor);
|
|
104
|
-
keyExtractorRef.current = keyExtractor;
|
|
105
|
-
return useMemo(() => {
|
|
106
|
-
const keys = data.map((item, index) => keyExtractorRef.current(item, index));
|
|
107
|
-
if (keys.some((key) => typeof key !== 'string') || new Set(keys).size !== keys.length) {
|
|
108
|
-
throw new Error('List.ForEach keyExtractor must return a unique string for every item.');
|
|
109
|
-
}
|
|
110
|
-
return keys;
|
|
111
|
-
}, [data]);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
72
|
/**
|
|
115
73
|
* Renders a window of recycled rows inside List or Section.
|
|
116
74
|
* Rows show placeholders while JS prepares content. Native keys still cover the full data set.
|
|
@@ -120,56 +78,22 @@ export function DataListForEach<ItemT>({
|
|
|
120
78
|
data,
|
|
121
79
|
keyExtractor,
|
|
122
80
|
children: renderItem,
|
|
123
|
-
overscanCount
|
|
81
|
+
overscanCount,
|
|
124
82
|
estimatedItemSize = 64,
|
|
125
83
|
modifiers,
|
|
126
84
|
onDelete,
|
|
127
85
|
onMove,
|
|
128
86
|
...props
|
|
129
87
|
}: ListForEachProps<ItemT>) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const itemKeys = useItemKeys(data, keyExtractor);
|
|
137
|
-
const [state, setState] = useState({
|
|
138
|
-
keys: itemKeys,
|
|
139
|
-
first: 0,
|
|
140
|
-
last: 0,
|
|
141
|
-
revision: 0,
|
|
142
|
-
capacity: 0,
|
|
88
|
+
const { itemKeys, revision, rows, onWindowChange, isCurrentRevision } = useRecycledRows({
|
|
89
|
+
componentName: 'List.ForEach',
|
|
90
|
+
Slot: NativeSlot,
|
|
91
|
+
data,
|
|
92
|
+
keyExtractor,
|
|
93
|
+
renderItem,
|
|
143
94
|
overscanCount,
|
|
95
|
+
estimatedItemSize,
|
|
144
96
|
});
|
|
145
|
-
let current = state;
|
|
146
|
-
if (state.keys !== itemKeys) {
|
|
147
|
-
const previousKey = state.keys[state.first];
|
|
148
|
-
const anchor = previousKey === undefined ? 0 : Math.max(0, itemKeys.indexOf(previousKey));
|
|
149
|
-
current = {
|
|
150
|
-
...state,
|
|
151
|
-
keys: itemKeys,
|
|
152
|
-
first: Math.min(anchor, Math.max(0, data.length - 1)),
|
|
153
|
-
last: Math.min(anchor + state.last - state.first, Math.max(0, data.length - 1)),
|
|
154
|
-
revision: state.revision + 1,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
if (current.overscanCount !== overscanCount) {
|
|
158
|
-
current = { ...current, overscanCount, capacity: 0 };
|
|
159
|
-
}
|
|
160
|
-
if (current !== state) setState(current);
|
|
161
|
-
const { start, capacity } = getWindow(
|
|
162
|
-
data.length,
|
|
163
|
-
current.first,
|
|
164
|
-
current.last,
|
|
165
|
-
overscanCount,
|
|
166
|
-
current.capacity
|
|
167
|
-
);
|
|
168
|
-
const committedRevision = useRef(current.revision);
|
|
169
|
-
useLayoutEffect(() => {
|
|
170
|
-
committedRevision.current = current.revision;
|
|
171
|
-
}, [current.revision]);
|
|
172
|
-
const indices = getSlotIndices(start, capacity);
|
|
173
97
|
|
|
174
98
|
return (
|
|
175
99
|
<NativeList
|
|
@@ -181,69 +105,24 @@ export function DataListForEach<ItemT>({
|
|
|
181
105
|
onDelete={
|
|
182
106
|
onDelete
|
|
183
107
|
? ({ nativeEvent }) => {
|
|
184
|
-
if (nativeEvent.revision
|
|
108
|
+
if (isCurrentRevision(nativeEvent.revision)) onDelete(nativeEvent.indices);
|
|
185
109
|
}
|
|
186
110
|
: undefined
|
|
187
111
|
}
|
|
188
112
|
onMove={
|
|
189
113
|
onMove
|
|
190
114
|
? ({ nativeEvent }) => {
|
|
191
|
-
if (nativeEvent.revision
|
|
115
|
+
if (isCurrentRevision(nativeEvent.revision)) {
|
|
192
116
|
onMove(nativeEvent.sourceIndices, nativeEvent.destination);
|
|
193
117
|
}
|
|
194
118
|
}
|
|
195
119
|
: undefined
|
|
196
120
|
}
|
|
197
121
|
itemKeys={itemKeys}
|
|
198
|
-
revision={
|
|
122
|
+
revision={revision}
|
|
199
123
|
estimatedItemSize={estimatedItemSize}
|
|
200
|
-
onWindowChange={({ nativeEvent
|
|
201
|
-
|
|
202
|
-
!Number.isSafeInteger(event.first) ||
|
|
203
|
-
!Number.isSafeInteger(event.last) ||
|
|
204
|
-
event.last < event.first
|
|
205
|
-
) {
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
setState((previous) => {
|
|
209
|
-
// Ignore requests from before a data change.
|
|
210
|
-
if (event.revision !== previous.revision) return previous;
|
|
211
|
-
const maximum = Math.max(0, previous.keys.length - 1);
|
|
212
|
-
const first = Math.max(0, Math.min(event.first, maximum));
|
|
213
|
-
const last = Math.max(first, Math.min(event.last, maximum));
|
|
214
|
-
const { capacity } = getWindow(
|
|
215
|
-
previous.keys.length,
|
|
216
|
-
first,
|
|
217
|
-
last,
|
|
218
|
-
previous.overscanCount,
|
|
219
|
-
previous.capacity
|
|
220
|
-
);
|
|
221
|
-
return first === previous.first &&
|
|
222
|
-
last === previous.last &&
|
|
223
|
-
capacity === previous.capacity
|
|
224
|
-
? previous
|
|
225
|
-
: { ...previous, first, last, capacity };
|
|
226
|
-
});
|
|
227
|
-
}}>
|
|
228
|
-
<NativePool>
|
|
229
|
-
{indices.map((index, slot) => {
|
|
230
|
-
const item = data[index];
|
|
231
|
-
const itemKey = itemKeys[index];
|
|
232
|
-
if (item === undefined || itemKey === undefined) {
|
|
233
|
-
throw new Error(`List.ForEach could not resolve the item at index ${index}.`);
|
|
234
|
-
}
|
|
235
|
-
return (
|
|
236
|
-
<RecycledRow
|
|
237
|
-
key={slot}
|
|
238
|
-
item={item}
|
|
239
|
-
index={index}
|
|
240
|
-
itemKey={itemKey}
|
|
241
|
-
revision={current.revision}
|
|
242
|
-
renderItem={renderItem}
|
|
243
|
-
/>
|
|
244
|
-
);
|
|
245
|
-
})}
|
|
246
|
-
</NativePool>
|
|
124
|
+
onWindowChange={({ nativeEvent }) => onWindowChange(nativeEvent)}>
|
|
125
|
+
<NativePool>{rows}</NativePool>
|
|
247
126
|
</NativeList>
|
|
248
127
|
);
|
|
249
128
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
|
|
3
|
+
import { useItemKeys } from '../../recycling/useRecycledRows';
|
|
3
4
|
import { type ViewEvent } from '../../types';
|
|
4
5
|
import { type CommonViewModifierProps } from '../types';
|
|
5
|
-
import { DataListForEach, NativeSlot,
|
|
6
|
+
import { DataListForEach, NativeSlot, type ListForEachProps } from './DataListForEach';
|
|
6
7
|
|
|
7
8
|
export { type ListForEachProps };
|
|
8
9
|
|
|
@@ -94,7 +95,7 @@ function StaticListForEach<ItemT>({
|
|
|
94
95
|
estimatedItemSize: _estimatedItemSize,
|
|
95
96
|
...props
|
|
96
97
|
}: Omit<ListForEachProps<ItemT>, 'recycling'>) {
|
|
97
|
-
const itemKeys = useItemKeys(data, keyExtractor);
|
|
98
|
+
const itemKeys = useItemKeys('List.ForEach', data, keyExtractor);
|
|
98
99
|
return (
|
|
99
100
|
<ChildrenListForEach {...props}>
|
|
100
101
|
{data.map((item, index) => (
|
|
@@ -57,6 +57,16 @@ export const presentationDetents = (
|
|
|
57
57
|
export const presentationDragIndicator = (visibility: 'automatic' | 'visible' | 'hidden') =>
|
|
58
58
|
createModifier('presentationDragIndicator', { visibility });
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Sets the corner radius of a sheet presentation.
|
|
62
|
+
* @param cornerRadius - The corner radius in points, or `null` to use the system default.
|
|
63
|
+
* @platform ios 16.4+
|
|
64
|
+
* @platform tvos 16.4+
|
|
65
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/presentationcornerradius(_:)).
|
|
66
|
+
*/
|
|
67
|
+
export const presentationCornerRadius = (cornerRadius: number | null) =>
|
|
68
|
+
createModifier('presentationCornerRadius', { cornerRadius });
|
|
69
|
+
|
|
60
70
|
/**
|
|
61
71
|
* Presentation background interaction type.
|
|
62
72
|
*/
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
background,
|
|
3
3
|
border,
|
|
4
4
|
clipShape,
|
|
5
|
+
contentShape,
|
|
5
6
|
disabled as disabledMod,
|
|
6
7
|
font,
|
|
7
8
|
foregroundStyle,
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
onTapGesture,
|
|
16
17
|
opacity,
|
|
17
18
|
padding,
|
|
19
|
+
shapes,
|
|
18
20
|
type ModifierConfig,
|
|
19
21
|
} from '@expo/ui/swift-ui/modifiers';
|
|
20
22
|
|
|
@@ -154,8 +156,9 @@ export function transformToModifiers(
|
|
|
154
156
|
// type. The event, lifecycle, and behavior modifiers below are never dropped.
|
|
155
157
|
mods = omitUserOverridden(mods, extraModifiers);
|
|
156
158
|
|
|
157
|
-
// Events
|
|
158
|
-
|
|
159
|
+
// Events. SwiftUI only hit-tests drawn content, so the `contentShape` lets
|
|
160
|
+
// taps on empty space (for example a `Spacer` in a `Row`) reach `onPress`.
|
|
161
|
+
if (props.onPress) mods.push(contentShape(shapes.rectangle()), onTapGesture(props.onPress));
|
|
159
162
|
|
|
160
163
|
// Lifecycle
|
|
161
164
|
if (props.onAppear) mods.push(onAppear(props.onAppear));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["swift-ui/List/window.ts"],"sourcesContent":[null],"names":["getWindow","count","first","last","overscanCount","minCapacity","start","capacity","Math","max","min","end","needed","getSlotIndices","Array","from","length","_","slot"],"mappings":"AAAA,OAAO,SAASA,UACdC,KAAa,EACbC,KAAa,EACbC,IAAY,EACZC,aAAqB,EACrBC,cAAc,CAAC;IAEf,IAAIJ,UAAU,GAAG,OAAO;QAAEK,OAAO;QAAGC,UAAU;IAAE;IAChDL,QAAQM,KAAKC,GAAG,CAAC,GAAGD,KAAKE,GAAG,CAACR,OAAOD,QAAQ;IAC5CE,OAAOK,KAAKC,GAAG,CAACP,OAAOM,KAAKE,GAAG,CAACP,MAAMF,QAAQ;IAC9C,MAAMK,QAAQE,KAAKC,GAAG,CAAC,GAAGP,QAAQE;IAClC,MAAMO,MAAMH,KAAKE,GAAG,CAACT,OAAOE,OAAO,IAAIC;IACvC,6FAA6F;IAC7F,yEAAyE;IACzE,MAAMQ,SAASD,MAAML;IACrB,IAAIC,WAAWF;IACf,IAAIO,SAASL,UAAUA,WAAWA,aAAa,IAAIK,SAASA,SAASR;IACrEG,WAAWC,KAAKE,GAAG,CAACT,OAAOM;IAC3B,OAAO;QAAED,OAAOE,KAAKE,GAAG,CAACJ,OAAOL,QAAQM;QAAWA;IAAS;AAC9D;AAEA,OAAO,SAASM,eAAeP,KAAa,EAAEC,QAAgB;IAC5D,IAAIA,aAAa,GAAG,OAAO,EAAE;IAC7B,OAAOO,MAAMC,IAAI,CACf;QAAEC,QAAQT;IAAS,GACnB,CAACU,GAAGC,OAASZ,QAAS,AAACY,CAAAA,OAAQZ,QAAQC,WAAYA,QAAO,IAAKA;AAEnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a2c50d54e658f6c03ab37ce21bc712ed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ccc4bc2b5f6f1713a4f7c85ae9be4a6247690fc5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d4e08c526d892c05d1ab6e42bd451df874e4da5cc58c18080ad730fc0ae59dfa
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5a6dc466f00aa1d74a9e1df2c4a06f3bf9c00b9eebe03e54e1ae68db446806f3f47f98e4a1d04bd90db6683459dd11785d22499d9cef48dd979293f8a88104d3
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
61e999a9915231a3196a7fc2864c479e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
643965a7c8a6f46ba589dcd348cbf5e112834194
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9b228fbd60d559e9dfebe894e1846a8c7ce3c72e5c91936b4382c97295e9b072
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ddcedbdcc0e95db83f0657a68090572e6d7c7fb9233e796ea875d86e9782c619560ef0e98316cdf6642abbed4b42eb43b5e8264be55130f47e473adbc0f77c11
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7e592a224a0fc4b1d3190d5e0453dca4
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
351d8fdc59045d3033183991bc4a41010bbdf928
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
67875636aba690f3ed01c1885a8f5dd5c72824b9028ed012d77016a5c5bfef85
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.module.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b7469559d94d21ec59ac3c32700d5c1651d2384574457e83c5f11eea0d6e947dd0ae5b68209f09056c30a0493e561c3a1dd74ea51cd3ec0435e8887603646187
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5c827bb51c32599862e86feff95a8e6d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
df98a93ccb93778ea5f6d701bf92e3caf1565000
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3b1a0a5386bc7a66e1e3097896cf2e63f8faccfa982ad72fc4d9f81dd6d7b9b7
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.6/expo.modules.ui-58.0.6.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d66ff20ada5d5bcd01c7ca0506db62ecc07e8eae9113f3e174b776efa9588663ef4bb7ea2761fba9c7ae518b3732c4185a7aee70d4a64e6fb0fcd579abdb5d94
|
|
File without changes
|
|
File without changes
|
|
File without changes
|