@expo/ui 58.0.22 → 58.0.23
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/ComposeViews.kt +53 -29
- package/android/src/main/java/expo/modules/ui/HostView.kt +52 -8
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +40 -12
- package/android/src/main/java/expo/modules/ui/UniversalLayout.kt +610 -0
- package/android/src/main/java/expo/modules/ui/state/ObservableState.kt +2 -0
- package/android/src/main/java/expo/modules/ui/state/WorkletCallback.kt +2 -0
- package/build/jetpack-compose/Column/index.d.ts +5 -0
- package/build/jetpack-compose/Column/index.js.map +1 -1
- package/build/jetpack-compose/Row/index.d.ts +5 -0
- package/build/jetpack-compose/Row/index.js.map +1 -1
- package/build/recycling/useRecycledRows.d.ts +2 -0
- package/build/recycling/useRecycledRows.js +1 -0
- package/build/recycling/useRecycledRows.js.map +1 -1
- package/build/swift-ui/HStack/index.d.ts +6 -0
- package/build/swift-ui/HStack/index.js.map +1 -1
- package/build/swift-ui/VStack/index.d.ts +6 -0
- package/build/swift-ui/VStack/index.js.map +1 -1
- package/build/universal/Button/index.android.js +3 -1
- package/build/universal/Button/index.android.js.map +1 -1
- package/build/universal/Button/index.ios.js +3 -1
- package/build/universal/Button/index.ios.js.map +1 -1
- package/build/universal/Collapsible/index.ios.js +1 -0
- package/build/universal/Collapsible/index.ios.js.map +1 -1
- package/build/universal/Column/index.android.js +4 -1
- package/build/universal/Column/index.android.js.map +1 -1
- package/build/universal/Column/index.ios.js +2 -0
- package/build/universal/Column/index.ios.js.map +1 -1
- package/build/universal/Column/index.js +13 -4
- package/build/universal/Column/index.js.map +1 -1
- package/build/universal/FieldGroup/FieldGroup.android.js +3 -1
- package/build/universal/FieldGroup/FieldGroup.android.js.map +1 -1
- package/build/universal/FieldGroup/FieldGroup.ios.js +3 -1
- package/build/universal/FieldGroup/FieldGroup.ios.js.map +1 -1
- package/build/universal/FieldGroup/FieldSection.android.js +13 -4
- package/build/universal/FieldGroup/FieldSection.android.js.map +1 -1
- package/build/universal/FieldGroup/FieldSection.ios.js +3 -1
- package/build/universal/FieldGroup/FieldSection.ios.js.map +1 -1
- package/build/universal/Icon/index.android.js +3 -1
- package/build/universal/Icon/index.android.js.map +1 -1
- package/build/universal/Icon/index.ios.js +3 -1
- package/build/universal/Icon/index.ios.js.map +1 -1
- package/build/universal/List/ListForEach.android.d.ts +7 -0
- package/build/universal/List/ListForEach.android.js +6 -0
- package/build/universal/List/ListForEach.android.js.map +1 -0
- package/build/universal/List/ListForEach.d.ts +5 -0
- package/build/universal/List/ListForEach.ios.d.ts +5 -0
- package/build/universal/List/ListForEach.ios.js +11 -0
- package/build/universal/List/ListForEach.ios.js.map +1 -0
- package/build/universal/List/ListForEach.js +263 -0
- package/build/universal/List/ListForEach.js.map +1 -0
- package/build/universal/List/ListScrollContext.d.ts +5 -0
- package/build/universal/List/ListScrollContext.js +6 -0
- package/build/universal/List/ListScrollContext.js.map +1 -0
- package/build/universal/List/index.android.d.ts +5 -0
- package/build/universal/List/index.android.js +3 -0
- package/build/universal/List/index.android.js.map +1 -1
- package/build/universal/List/index.d.ts +5 -0
- package/build/universal/List/index.ios.d.ts +5 -0
- package/build/universal/List/index.ios.js +3 -0
- package/build/universal/List/index.ios.js.map +1 -1
- package/build/universal/List/index.js +12 -1
- package/build/universal/List/index.js.map +1 -1
- package/build/universal/List/types.d.ts +42 -1
- package/build/universal/List/types.js +1 -3
- package/build/universal/List/types.js.map +1 -1
- package/build/universal/RNHostView/index.android.js +3 -1
- package/build/universal/RNHostView/index.android.js.map +1 -1
- package/build/universal/Row/index.android.js +4 -1
- package/build/universal/Row/index.android.js.map +1 -1
- package/build/universal/Row/index.ios.js +2 -0
- package/build/universal/Row/index.ios.js.map +1 -1
- package/build/universal/Row/index.js +13 -7
- package/build/universal/Row/index.js.map +1 -1
- package/build/universal/ScrollView/index.android.js +8 -1
- package/build/universal/ScrollView/index.android.js.map +1 -1
- package/build/universal/ScrollView/index.ios.js +3 -1
- package/build/universal/ScrollView/index.ios.js.map +1 -1
- package/build/universal/Spacer/index.android.js +3 -1
- package/build/universal/Spacer/index.android.js.map +1 -1
- package/build/universal/Spacer/index.ios.js +3 -1
- package/build/universal/Spacer/index.ios.js.map +1 -1
- package/build/universal/Text/index.android.js +3 -1
- package/build/universal/Text/index.android.js.map +1 -1
- package/build/universal/Text/index.ios.js +3 -1
- package/build/universal/Text/index.ios.js.map +1 -1
- package/build/universal/TextInput/index.android.js +22 -7
- package/build/universal/TextInput/index.android.js.map +1 -1
- package/build/universal/TextInput/index.ios.js +1 -0
- package/build/universal/TextInput/index.ios.js.map +1 -1
- package/build/universal/index.d.ts +1 -1
- package/build/universal/modifierUtils.d.ts +34 -1
- package/build/universal/modifierUtils.js +98 -2
- package/build/universal/modifierUtils.js.map +1 -1
- package/build/universal/stackAxis.d.ts +9 -0
- package/build/universal/stackAxis.js +11 -0
- package/build/universal/stackAxis.js.map +1 -0
- package/build/universal/transformStyle.android.d.ts +6 -2
- package/build/universal/transformStyle.android.js +18 -11
- package/build/universal/transformStyle.android.js.map +1 -1
- package/build/universal/transformStyle.ios.d.ts +5 -1
- package/build/universal/transformStyle.ios.js +29 -11
- package/build/universal/transformStyle.ios.js.map +1 -1
- package/build/universal/types.d.ts +26 -1
- package/build/universal/types.js.map +1 -1
- package/ios/GroupView.swift +3 -0
- package/ios/HStackView.swift +26 -2
- package/ios/HostView.swift +21 -12
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/ios/ScrollViewComponent.swift +20 -0
- package/ios/UIBaseView.swift +4 -1
- package/ios/UniversalLayout.swift +691 -0
- package/ios/VStackView.swift +26 -2
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22-sources.jar → 58.0.23/expo.modules.ui-58.0.23-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22.module → 58.0.23/expo.modules.ui-58.0.23.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22.pom → 58.0.23/expo.modules.ui-58.0.23.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha512 +1 -0
- package/package.json +1 -1
- package/src/jetpack-compose/Column/index.tsx +5 -0
- package/src/jetpack-compose/Row/index.tsx +5 -0
- package/src/recycling/useRecycledRows.tsx +3 -0
- package/src/swift-ui/HStack/index.tsx +6 -0
- package/src/swift-ui/VStack/index.tsx +6 -0
- package/src/universal/Button/index.android.tsx +3 -1
- package/src/universal/Button/index.ios.tsx +2 -1
- package/src/universal/Collapsible/index.ios.tsx +4 -1
- package/src/universal/Column/index.android.tsx +3 -1
- package/src/universal/Column/index.ios.tsx +2 -1
- package/src/universal/Column/index.tsx +9 -4
- package/src/universal/FieldGroup/FieldGroup.android.tsx +8 -1
- package/src/universal/FieldGroup/FieldGroup.ios.tsx +2 -1
- package/src/universal/FieldGroup/FieldSection.android.tsx +17 -4
- package/src/universal/FieldGroup/FieldSection.ios.tsx +2 -1
- package/src/universal/Icon/index.android.tsx +2 -1
- package/src/universal/Icon/index.ios.tsx +2 -1
- package/src/universal/List/ListForEach.android.tsx +6 -0
- package/src/universal/List/ListForEach.ios.tsx +9 -0
- package/src/universal/List/ListForEach.tsx +246 -0
- package/src/universal/List/ListScrollContext.ts +6 -0
- package/src/universal/List/index.android.tsx +5 -0
- package/src/universal/List/index.ios.tsx +5 -0
- package/src/universal/List/index.tsx +11 -2
- package/src/universal/List/types.ts +45 -1
- package/src/universal/RNHostView/index.android.tsx +2 -1
- package/src/universal/Row/index.android.tsx +3 -1
- package/src/universal/Row/index.ios.tsx +2 -1
- package/src/universal/Row/index.tsx +9 -10
- package/src/universal/ScrollView/index.android.tsx +15 -3
- package/src/universal/ScrollView/index.ios.tsx +2 -1
- package/src/universal/Spacer/index.android.tsx +6 -4
- package/src/universal/Spacer/index.ios.tsx +2 -1
- package/src/universal/Text/index.android.tsx +2 -1
- package/src/universal/Text/index.ios.tsx +2 -1
- package/src/universal/TextInput/index.android.tsx +26 -5
- package/src/universal/TextInput/index.ios.tsx +1 -1
- package/src/universal/index.ts +6 -1
- package/src/universal/modifierUtils.ts +159 -2
- package/src/universal/stackAxis.ts +17 -0
- package/src/universal/transformStyle.android.ts +30 -12
- package/src/universal/transformStyle.ios.ts +41 -13
- package/src/universal/types.ts +27 -3
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha512 +0 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, Fragment, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { useItemKeys, useRecycledRows } from '../../recycling/useRecycledRows';
|
|
5
|
+
import { ListScrollContext } from './ListScrollContext';
|
|
6
|
+
const RowSizesContext = /*#__PURE__*/ createContext(null);
|
|
7
|
+
function asHTMLElement(value) {
|
|
8
|
+
return typeof HTMLElement !== 'undefined' && value instanceof HTMLElement ? value : null;
|
|
9
|
+
}
|
|
10
|
+
function getScrollParent(node) {
|
|
11
|
+
for(let parent = node.parentElement; parent; parent = parent.parentElement){
|
|
12
|
+
const { overflowY } = getComputedStyle(parent);
|
|
13
|
+
if ((overflowY === 'auto' || overflowY === 'scroll') && parent.scrollHeight > parent.clientHeight) {
|
|
14
|
+
return parent;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return document.scrollingElement;
|
|
18
|
+
}
|
|
19
|
+
// Index of the item at `offset`, clamped to the data.
|
|
20
|
+
function getIndexAt(offsets, offset) {
|
|
21
|
+
let low = 0;
|
|
22
|
+
let high = offsets.length - 2;
|
|
23
|
+
while(low < high){
|
|
24
|
+
const middle = low + high + 1 >> 1;
|
|
25
|
+
if (offsets[middle] <= offset) low = middle;
|
|
26
|
+
else high = middle - 1;
|
|
27
|
+
}
|
|
28
|
+
return low;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Renders one row for each item of `data`, and reuses rows while the list scrolls.
|
|
32
|
+
*/ export function ListForEach({ recycling = true, ...props }) {
|
|
33
|
+
return recycling ? /*#__PURE__*/ _jsx(RecycledListForEach, {
|
|
34
|
+
...props
|
|
35
|
+
}) : /*#__PURE__*/ _jsx(StaticListForEach, {
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function StaticListForEach({ data, keyExtractor, children: renderItem }) {
|
|
40
|
+
const itemKeys = useItemKeys('List.ForEach', data, keyExtractor);
|
|
41
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
42
|
+
children: data.map((item, index)=>/*#__PURE__*/ _jsx(Fragment, {
|
|
43
|
+
children: renderItem({
|
|
44
|
+
item,
|
|
45
|
+
index
|
|
46
|
+
})
|
|
47
|
+
}, itemKeys[index]))
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function RecycledListForEach({ data, keyExtractor, children: renderItem, overscanCount, estimatedItemSize = 64 }) {
|
|
51
|
+
const { itemKeys, revision, rows, start, onWindowChange } = useRecycledRows({
|
|
52
|
+
componentName: 'List.ForEach',
|
|
53
|
+
Slot,
|
|
54
|
+
data,
|
|
55
|
+
keyExtractor,
|
|
56
|
+
renderItem,
|
|
57
|
+
overscanCount,
|
|
58
|
+
estimatedItemSize
|
|
59
|
+
});
|
|
60
|
+
const listRef = useContext(ListScrollContext);
|
|
61
|
+
const containerRef = useRef(null);
|
|
62
|
+
const heights = useRef(new Map()).current;
|
|
63
|
+
const [heightsVersion, setHeightsVersion] = useState(0);
|
|
64
|
+
const rowSizes = useMemo(()=>{
|
|
65
|
+
const measures = new Set();
|
|
66
|
+
return {
|
|
67
|
+
measureAll: ()=>measures.forEach((measure)=>measure()),
|
|
68
|
+
register: (measure)=>{
|
|
69
|
+
measures.add(measure);
|
|
70
|
+
return ()=>measures.delete(measure);
|
|
71
|
+
},
|
|
72
|
+
report: (itemKey, height)=>{
|
|
73
|
+
if (!(height > 0) || heights.get(itemKey) === height) return;
|
|
74
|
+
heights.set(itemKey, height);
|
|
75
|
+
setHeightsVersion((version)=>version + 1);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}, [
|
|
79
|
+
heights
|
|
80
|
+
]);
|
|
81
|
+
// `offsets[i]` is the top of item `i`; the last entry is the total height.
|
|
82
|
+
const offsets = useMemo(()=>{
|
|
83
|
+
const result = new Float64Array(itemKeys.length + 1);
|
|
84
|
+
itemKeys.forEach((itemKey, index)=>{
|
|
85
|
+
result[index + 1] = result[index] + (heights.get(itemKey) ?? estimatedItemSize);
|
|
86
|
+
});
|
|
87
|
+
return result;
|
|
88
|
+
// `heightsVersion` tracks changes to `heights`.
|
|
89
|
+
}, [
|
|
90
|
+
itemKeys,
|
|
91
|
+
estimatedItemSize,
|
|
92
|
+
heights,
|
|
93
|
+
heightsVersion
|
|
94
|
+
]);
|
|
95
|
+
const latest = useRef({
|
|
96
|
+
itemKeys,
|
|
97
|
+
offsets,
|
|
98
|
+
revision,
|
|
99
|
+
onWindowChange
|
|
100
|
+
});
|
|
101
|
+
latest.current = {
|
|
102
|
+
itemKeys,
|
|
103
|
+
offsets,
|
|
104
|
+
revision,
|
|
105
|
+
onWindowChange
|
|
106
|
+
};
|
|
107
|
+
// The first visible item and its offset, from the last window update.
|
|
108
|
+
const anchor = useRef(null);
|
|
109
|
+
const updateWindow = useCallback(()=>{
|
|
110
|
+
const container = asHTMLElement(containerRef.current);
|
|
111
|
+
const { itemKeys, offsets, revision, onWindowChange } = latest.current;
|
|
112
|
+
if (!container || offsets.length < 2) return;
|
|
113
|
+
const containerTop = container.getBoundingClientRect().top;
|
|
114
|
+
let top = 0;
|
|
115
|
+
let bottom = window.innerHeight;
|
|
116
|
+
const list = asHTMLElement(listRef?.current);
|
|
117
|
+
if (list) {
|
|
118
|
+
const listRect = list.getBoundingClientRect();
|
|
119
|
+
top = Math.max(top, listRect.top);
|
|
120
|
+
bottom = Math.min(bottom, listRect.bottom);
|
|
121
|
+
}
|
|
122
|
+
const first = getIndexAt(offsets, top - containerTop);
|
|
123
|
+
const last = getIndexAt(offsets, bottom - containerTop);
|
|
124
|
+
anchor.current = {
|
|
125
|
+
itemKeys,
|
|
126
|
+
index: first,
|
|
127
|
+
offset: offsets[first]
|
|
128
|
+
};
|
|
129
|
+
onWindowChange({
|
|
130
|
+
first,
|
|
131
|
+
last: Math.max(first, last),
|
|
132
|
+
revision
|
|
133
|
+
});
|
|
134
|
+
}, [
|
|
135
|
+
listRef
|
|
136
|
+
]);
|
|
137
|
+
useLayoutEffect(()=>{
|
|
138
|
+
// Rows measured above the first visible row move it, so scroll by the same amount.
|
|
139
|
+
const container = asHTMLElement(containerRef.current);
|
|
140
|
+
const previous = anchor.current;
|
|
141
|
+
if (container && previous?.itemKeys === itemKeys) {
|
|
142
|
+
const delta = offsets[previous.index] - previous.offset;
|
|
143
|
+
const scrollParent = delta === 0 ? null : getScrollParent(container);
|
|
144
|
+
if (scrollParent) scrollParent.scrollTop += delta;
|
|
145
|
+
}
|
|
146
|
+
updateWindow();
|
|
147
|
+
}, [
|
|
148
|
+
updateWindow,
|
|
149
|
+
itemKeys,
|
|
150
|
+
offsets,
|
|
151
|
+
revision
|
|
152
|
+
]);
|
|
153
|
+
useEffect(()=>{
|
|
154
|
+
const container = asHTMLElement(containerRef.current);
|
|
155
|
+
if (!container) return;
|
|
156
|
+
const onScroll = (event)=>{
|
|
157
|
+
if (event.target instanceof Node && !event.target.contains(container)) return;
|
|
158
|
+
updateWindow();
|
|
159
|
+
};
|
|
160
|
+
const options = {
|
|
161
|
+
capture: true,
|
|
162
|
+
passive: true
|
|
163
|
+
};
|
|
164
|
+
window.addEventListener('scroll', onScroll, options);
|
|
165
|
+
window.addEventListener('resize', updateWindow);
|
|
166
|
+
return ()=>{
|
|
167
|
+
window.removeEventListener('scroll', onScroll, options);
|
|
168
|
+
window.removeEventListener('resize', updateWindow);
|
|
169
|
+
};
|
|
170
|
+
}, [
|
|
171
|
+
updateWindow
|
|
172
|
+
]);
|
|
173
|
+
useEffect(()=>{
|
|
174
|
+
const live = new Set(itemKeys);
|
|
175
|
+
for (const itemKey of heights.keys()){
|
|
176
|
+
if (!live.has(itemKey)) heights.delete(itemKey);
|
|
177
|
+
}
|
|
178
|
+
}, [
|
|
179
|
+
heights,
|
|
180
|
+
itemKeys
|
|
181
|
+
]);
|
|
182
|
+
// Row heights depend on the width.
|
|
183
|
+
useEffect(()=>{
|
|
184
|
+
const container = asHTMLElement(containerRef.current);
|
|
185
|
+
if (!container || typeof ResizeObserver === 'undefined') return;
|
|
186
|
+
let width = container.getBoundingClientRect().width;
|
|
187
|
+
const observer = new ResizeObserver(()=>{
|
|
188
|
+
const nextWidth = container.getBoundingClientRect().width;
|
|
189
|
+
if (nextWidth === width) return;
|
|
190
|
+
width = nextWidth;
|
|
191
|
+
heights.clear();
|
|
192
|
+
setHeightsVersion((version)=>version + 1);
|
|
193
|
+
rowSizes.measureAll();
|
|
194
|
+
});
|
|
195
|
+
observer.observe(container);
|
|
196
|
+
return ()=>observer.disconnect();
|
|
197
|
+
}, [
|
|
198
|
+
heights,
|
|
199
|
+
rowSizes
|
|
200
|
+
]);
|
|
201
|
+
// Rotate the pool from slot order to item order, so the DOM order matches the screen.
|
|
202
|
+
const pivot = rows.length === 0 ? 0 : start % rows.length;
|
|
203
|
+
const orderedRows = [
|
|
204
|
+
...rows.slice(pivot),
|
|
205
|
+
...rows.slice(0, pivot)
|
|
206
|
+
];
|
|
207
|
+
const end = start + rows.length;
|
|
208
|
+
return /*#__PURE__*/ _jsx(RowSizesContext.Provider, {
|
|
209
|
+
value: rowSizes,
|
|
210
|
+
children: /*#__PURE__*/ _jsxs(View, {
|
|
211
|
+
ref: containerRef,
|
|
212
|
+
children: [
|
|
213
|
+
/*#__PURE__*/ _jsx(View, {
|
|
214
|
+
style: {
|
|
215
|
+
height: offsets[start]
|
|
216
|
+
}
|
|
217
|
+
}),
|
|
218
|
+
orderedRows,
|
|
219
|
+
/*#__PURE__*/ _jsx(View, {
|
|
220
|
+
style: {
|
|
221
|
+
height: offsets[itemKeys.length] - offsets[end]
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function Slot({ itemKey, children }) {
|
|
229
|
+
const rowSizes = useContext(RowSizesContext);
|
|
230
|
+
const ref = useRef(null);
|
|
231
|
+
const itemKeyRef = useRef(itemKey);
|
|
232
|
+
itemKeyRef.current = itemKey;
|
|
233
|
+
const measure = useCallback(()=>{
|
|
234
|
+
const node = asHTMLElement(ref.current);
|
|
235
|
+
if (node) rowSizes?.report(itemKeyRef.current, node.getBoundingClientRect().height);
|
|
236
|
+
}, [
|
|
237
|
+
rowSizes
|
|
238
|
+
]);
|
|
239
|
+
useLayoutEffect(measure, [
|
|
240
|
+
measure,
|
|
241
|
+
itemKey
|
|
242
|
+
]);
|
|
243
|
+
useEffect(()=>{
|
|
244
|
+
const node = asHTMLElement(ref.current);
|
|
245
|
+
if (!node || !rowSizes || typeof ResizeObserver === 'undefined') return;
|
|
246
|
+
const observer = new ResizeObserver(measure);
|
|
247
|
+
observer.observe(node);
|
|
248
|
+
const unregister = rowSizes.register(measure);
|
|
249
|
+
return ()=>{
|
|
250
|
+
observer.disconnect();
|
|
251
|
+
unregister();
|
|
252
|
+
};
|
|
253
|
+
}, [
|
|
254
|
+
measure,
|
|
255
|
+
rowSizes
|
|
256
|
+
]);
|
|
257
|
+
return /*#__PURE__*/ _jsx(View, {
|
|
258
|
+
ref: ref,
|
|
259
|
+
children: children
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
//# sourceMappingURL=ListForEach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["universal/List/ListForEach.tsx"],"sourcesContent":[null],"names":["createContext","Fragment","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","useState","View","useItemKeys","useRecycledRows","ListScrollContext","RowSizesContext","asHTMLElement","value","HTMLElement","getScrollParent","node","parent","parentElement","overflowY","getComputedStyle","scrollHeight","clientHeight","document","scrollingElement","getIndexAt","offsets","offset","low","high","length","middle","ListForEach","recycling","props","RecycledListForEach","StaticListForEach","data","keyExtractor","children","renderItem","itemKeys","map","item","index","overscanCount","estimatedItemSize","revision","rows","start","onWindowChange","componentName","Slot","listRef","containerRef","heights","Map","current","heightsVersion","setHeightsVersion","rowSizes","measures","Set","measureAll","forEach","measure","register","add","delete","report","itemKey","height","get","set","version","result","Float64Array","latest","anchor","updateWindow","container","containerTop","getBoundingClientRect","top","bottom","window","innerHeight","list","listRect","Math","max","min","first","last","previous","delta","scrollParent","scrollTop","onScroll","event","target","Node","contains","options","capture","passive","addEventListener","removeEventListener","live","keys","has","ResizeObserver","width","observer","nextWidth","clear","observe","disconnect","pivot","orderedRows","slice","end","Provider","ref","style","itemKeyRef","unregister"],"mappings":";AAAA,SACEA,aAAa,EACbC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,QAAQ;AACf,SAASC,IAAI,QAAQ,eAAe;AAEpC,SACEC,WAAW,EACXC,eAAe,QAEV,kCAAkC;AACzC,SAASC,iBAAiB,QAAQ,sBAAsB;AASxD,MAAMC,gCAAkBb,cAA+B;AAEvD,SAASc,cAAcC,KAAc;IACnC,OAAO,OAAOC,gBAAgB,eAAeD,iBAAiBC,cAAcD,QAAQ;AACtF;AAEA,SAASE,gBAAgBC,IAAiB;IACxC,IAAK,IAAIC,SAASD,KAAKE,aAAa,EAAED,QAAQA,SAASA,OAAOC,aAAa,CAAE;QAC3E,MAAM,EAAEC,SAAS,EAAE,GAAGC,iBAA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OAAO;wBAAErD,QAAQ7C,OAAO,CAACuB,MAAM;oBAAC;;gBACrCsE;8BACD,KAAChH;oBAAKqH,OAAO;wBAAErD,QAAQ7C,OAAO,CAACe,SAASX,MAAM,CAAC,GAAIJ,OAAO,CAAC+F,IAAI;oBAAE;;;;;AAIzE;AAEA,SAASrE,KAAK,EAAEkB,OAAO,EAAE/B,QAAQ,EAAqB;IACpD,MAAMqB,WAAW3D,WAAWU;IAC5B,MAAMgH,MAAMtH,OAAO;IACnB,MAAMwH,aAAaxH,OAAOiE;IAC1BuD,WAAWpE,OAAO,GAAGa;IAErB,MAAML,UAAUjE,YAAY;QAC1B,MAAMgB,OAAOJ,cAAc+G,IAAIlE,OAAO;QACtC,IAAIzC,MAAM4C,UAAUS,OAAOwD,WAAWpE,OAAO,EAAEzC,KAAKkE,qBAAqB,GAAGX,MAAM;IACpF,GAAG;QAACX;KAAS;IAEbzD,gBAAgB8D,SAAS;QAACA;QAASK;KAAQ;IAE3CpE,UAAU;QACR,MAAMc,OAAOJ,cAAc+G,IAAIlE,OAAO;QACtC,IAAI,CAACzC,QAAQ,CAAC4C,YAAY,OAAOmD,mBAAmB,aAAa;QACjE,MAAME,WAAW,IAAIF,eAAe9C;QACpCgD,SAASG,OAAO,CAACpG;QACjB,MAAM8G,aAAalE,SAASM,QAAQ,CAACD;QACrC,OAAO;YACLgD,SAASI,UAAU;YACnBS;QACF;IACF,GAAG;QAAC7D;QAASL;KAAS;IAEtB,qBAAO,KAACrD;QAAKoH,KAAKA;kBAAMpF;;AAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["universal/List/ListScrollContext.ts"],"sourcesContent":[null],"names":["createContext","ListScrollContext"],"mappings":"AAAA,SAASA,aAAa,QAAwB,QAAQ;AAEtD;;CAEC,GACD,OAAO,MAAMC,oBAAoBD,cAAyC,MAAM"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ListForEach } from './ListForEach';
|
|
1
2
|
import type { ListProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Android implementation of `List`.
|
|
@@ -5,4 +6,8 @@ import type { ListProps } from './types';
|
|
|
5
6
|
* The returned promise drives the refresh indicator's visibility.
|
|
6
7
|
*/
|
|
7
8
|
export declare function List({ children, onRefresh, testID }: ListProps): import("react").JSX.Element;
|
|
9
|
+
export declare namespace List {
|
|
10
|
+
var ForEach: typeof ListForEach;
|
|
11
|
+
}
|
|
12
|
+
export { ListForEach } from './ListForEach';
|
|
8
13
|
export * from './types';
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { LazyColumn, PullToRefreshBox } from '@expo/ui/jetpack-compose';
|
|
3
3
|
import { testID as testIDModifier } from '@expo/ui/jetpack-compose/modifiers';
|
|
4
4
|
import { useCallback, useState } from 'react';
|
|
5
|
+
import { ListForEach } from './ListForEach';
|
|
5
6
|
/**
|
|
6
7
|
* Android implementation of `List`.
|
|
7
8
|
* Composes `LazyColumn` and wraps with `PullToRefreshBox` when `onRefresh` is provided.
|
|
@@ -38,6 +39,8 @@ import { useCallback, useState } from 'react';
|
|
|
38
39
|
children: listContent
|
|
39
40
|
}));
|
|
40
41
|
}
|
|
42
|
+
List.ForEach = ListForEach;
|
|
43
|
+
export { ListForEach } from './ListForEach';
|
|
41
44
|
export * from './types';
|
|
42
45
|
|
|
43
46
|
//# sourceMappingURL=index.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/List/index.android.tsx"],"sourcesContent":[null],"names":["LazyColumn","PullToRefreshBox","testID","testIDModifier","useCallback","useState","List","children","onRefresh","isRefreshing","setIsRefreshing","handleRefresh","listModifiers","undefined","listContent","modifiers","contentAlignment"],"mappings":";AAAA,SAASA,UAAU,EAAEC,gBAAgB,QAAQ,2BAA2B;AACxE,SAASC,UAAUC,cAAc,QAA6B,qCAAqC;AACnG,SAASC,WAAW,EAAEC,QAAQ,QAAQ,QAAQ;
|
|
1
|
+
{"version":3,"sources":["universal/List/index.android.tsx"],"sourcesContent":[null],"names":["LazyColumn","PullToRefreshBox","testID","testIDModifier","useCallback","useState","ListForEach","List","children","onRefresh","isRefreshing","setIsRefreshing","handleRefresh","listModifiers","undefined","listContent","modifiers","contentAlignment","ForEach"],"mappings":";AAAA,SAASA,UAAU,EAAEC,gBAAgB,QAAQ,2BAA2B;AACxE,SAASC,UAAUC,cAAc,QAA6B,qCAAqC;AACnG,SAASC,WAAW,EAAEC,QAAQ,QAAQ,QAAQ;AAE9C,SAASC,WAAW,QAAQ,gBAAgB;AAG5C;;;;CAIC,GACD,OAAO,SAASC,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEP,MAAM,EAAa;IAC7D,MAAM,CAACQ,cAAcC,gBAAgB,GAAGN,SAAS;IAEjD,MAAMO,gBAAgBR,YAAY;QAChC,IAAI,CAACK,WAAW;QAChBE,gBAAgB;QAChB,IAAI;YACF,MAAMF;QACR,SAAU;YACRE,gBAAgB;QAClB;IACF,GAAG;QAACF;KAAU;IAEd,MAAMI,gBAA8CX,SAAS;QAACC,eAAeD;KAAQ,GAAGY;IACxF,MAAMC,4BAAc,KAACf;QAAWgB,WAAWH;kBAAgBL;;IAE3D,IAAI,CAACC,WAAW;QACd,OAAOM;IACT;IAEA,OACE,uEAAuE;IACvE,oHAAoH;kBACpH,KAACd;QACCS,cAAcA;QACdD,WAAWG;QACXK,kBAAiB;kBAChBF;;AAGP;AAEAR,KAAKW,OAAO,GAAGZ;AAEf,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,cAAc,UAAU"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ListForEach } from './ListForEach';
|
|
1
2
|
import type { ListProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* A vertical container of rows.
|
|
4
5
|
* Typically populated with [`ListItem`](#listitem) children.
|
|
5
6
|
*/
|
|
6
7
|
export declare function List({ children, testID }: ListProps): import("react").JSX.Element;
|
|
8
|
+
export declare namespace List {
|
|
9
|
+
var ForEach: typeof ListForEach;
|
|
10
|
+
}
|
|
11
|
+
export { ListForEach } from './ListForEach';
|
|
7
12
|
export * from './types';
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ListForEach } from './ListForEach';
|
|
1
2
|
import type { ListProps } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* iOS implementation of `List`.
|
|
4
5
|
* Delegates to SwiftUI's `List` and applies `.refreshable` when `onRefresh` is provided.
|
|
5
6
|
*/
|
|
6
7
|
export declare function List({ children, onRefresh, testID }: ListProps): import("react").JSX.Element;
|
|
8
|
+
export declare namespace List {
|
|
9
|
+
var ForEach: typeof ListForEach;
|
|
10
|
+
}
|
|
11
|
+
export { ListForEach } from './ListForEach';
|
|
7
12
|
export * from './types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { List as SwiftUIList } from '@expo/ui/swift-ui';
|
|
3
3
|
import { refreshable } from '@expo/ui/swift-ui/modifiers';
|
|
4
|
+
import { ListForEach } from './ListForEach';
|
|
4
5
|
/**
|
|
5
6
|
* iOS implementation of `List`.
|
|
6
7
|
* Delegates to SwiftUI's `List` and applies `.refreshable` when `onRefresh` is provided.
|
|
@@ -14,6 +15,8 @@ import { refreshable } from '@expo/ui/swift-ui/modifiers';
|
|
|
14
15
|
children: children
|
|
15
16
|
});
|
|
16
17
|
}
|
|
18
|
+
List.ForEach = ListForEach;
|
|
19
|
+
export { ListForEach } from './ListForEach';
|
|
17
20
|
export * from './types';
|
|
18
21
|
|
|
19
22
|
//# sourceMappingURL=index.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/List/index.ios.tsx"],"sourcesContent":[null],"names":["List","SwiftUIList","refreshable","children","onRefresh","testID","modifiers","undefined"],"mappings":";AAAA,SAASA,QAAQC,WAAW,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAA6B,8BAA8B;
|
|
1
|
+
{"version":3,"sources":["universal/List/index.ios.tsx"],"sourcesContent":[null],"names":["List","SwiftUIList","refreshable","ListForEach","children","onRefresh","testID","modifiers","undefined","ForEach"],"mappings":";AAAA,SAASA,QAAQC,WAAW,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAA6B,8BAA8B;AAE/E,SAASC,WAAW,QAAQ,gBAAgB;AAG5C;;;CAGC,GACD,OAAO,SAASH,KAAK,EAAEI,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAa;IAC7D,MAAMC,YAA0CF,YAAY;QAACH,YAAYG;KAAW,GAAGG;IACvF,qBACE,KAACP;QAAYM,WAAWA;QAAWD,QAAQA;kBACxCF;;AAGP;AAEAJ,KAAKS,OAAO,GAAGN;AAEf,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,cAAc,UAAU"}
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { ListForEach } from './ListForEach';
|
|
5
|
+
import { ListScrollContext } from './ListScrollContext';
|
|
3
6
|
/**
|
|
4
7
|
* A vertical container of rows.
|
|
5
8
|
* Typically populated with [`ListItem`](#listitem) children.
|
|
6
9
|
*/ export function List({ children, testID }) {
|
|
10
|
+
const ref = useRef(null);
|
|
7
11
|
return /*#__PURE__*/ _jsx(View, {
|
|
12
|
+
ref: ref,
|
|
8
13
|
style: styles.container,
|
|
9
14
|
testID: testID,
|
|
10
|
-
children:
|
|
15
|
+
children: /*#__PURE__*/ _jsx(ListScrollContext.Provider, {
|
|
16
|
+
value: ref,
|
|
17
|
+
children: children
|
|
18
|
+
})
|
|
11
19
|
});
|
|
12
20
|
}
|
|
13
21
|
const styles = StyleSheet.create({
|
|
14
22
|
container: {
|
|
23
|
+
flex: 1,
|
|
15
24
|
flexDirection: 'column',
|
|
16
25
|
width: '100%',
|
|
17
26
|
overflowX: 'auto',
|
|
18
27
|
overflowY: 'auto'
|
|
19
28
|
}
|
|
20
29
|
});
|
|
30
|
+
List.ForEach = ListForEach;
|
|
31
|
+
export { ListForEach } from './ListForEach';
|
|
21
32
|
export * from './types';
|
|
22
33
|
|
|
23
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/List/index.tsx"],"sourcesContent":[null],"names":["StyleSheet","View","List","children","testID","style","styles","container","create","flexDirection","width","overflowX","overflowY"],"mappings":";AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,eAAe;
|
|
1
|
+
{"version":3,"sources":["universal/List/index.tsx"],"sourcesContent":[null],"names":["useRef","StyleSheet","View","ListForEach","ListScrollContext","List","children","testID","ref","style","styles","container","Provider","value","create","flex","flexDirection","width","overflowX","overflowY","ForEach"],"mappings":";AAAA,SAASA,MAAM,QAAQ,QAAQ;AAC/B,SAASC,UAAU,EAAEC,IAAI,QAAQ,eAAe;AAEhD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,iBAAiB,QAAQ,sBAAsB;AAGxD;;;CAGC,GACD,OAAO,SAASC,KAAK,EAAEC,QAAQ,EAAEC,MAAM,EAAa;IAClD,MAAMC,MAAMR,OAAO;IACnB,qBACE,KAACE;QAAKM,KAAKA;QAAKC,OAAOC,OAAOC,SAAS;QAAEJ,QAAQA;kBAC/C,cAAA,KAACH,kBAAkBQ,QAAQ;YAACC,OAAOL;sBAAMF;;;AAG/C;AAEA,MAAMI,SAAST,WAAWa,MAAM,CAAC;IAC/BH,WAAW;QACTI,MAAM;QACNC,eAAe;QACfC,OAAO;QACPC,WAAW;QACXC,WAAW;IACb;AACF;AAEAd,KAAKe,OAAO,GAAGjB;AAEf,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,cAAc,UAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Props for the [`List`](#list) component.
|
|
4
4
|
* A virtualized vertical container of rows.
|
|
@@ -23,3 +23,44 @@ export interface ListProps {
|
|
|
23
23
|
*/
|
|
24
24
|
testID?: string;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the `List.ForEach` component.
|
|
28
|
+
*/
|
|
29
|
+
export interface ListForEachProps<T> {
|
|
30
|
+
/**
|
|
31
|
+
* Items to display. Pass a new array to update.
|
|
32
|
+
*/
|
|
33
|
+
data: readonly T[];
|
|
34
|
+
/**
|
|
35
|
+
* Returns a stable, unique string key for each item.
|
|
36
|
+
*/
|
|
37
|
+
keyExtractor: (item: T, index: number) => string;
|
|
38
|
+
/**
|
|
39
|
+
* Renders a row. Wrap it in `useCallback`, or every row re-renders on each parent render.
|
|
40
|
+
* A recycled row keeps its local state (`useState`) when it shows another item.
|
|
41
|
+
*/
|
|
42
|
+
children: (info: {
|
|
43
|
+
item: T;
|
|
44
|
+
index: number;
|
|
45
|
+
}) => ReactElement;
|
|
46
|
+
/**
|
|
47
|
+
* Renders only the rows near the visible range. Set to `false` to render every row.
|
|
48
|
+
* Changing it remounts the rows.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
recycling?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Extra rows to render above and below the visible rows.
|
|
55
|
+
*
|
|
56
|
+
* @default 10
|
|
57
|
+
*/
|
|
58
|
+
overscanCount?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Row height to use until a row is measured: dp on Android, points on iOS (without the row
|
|
61
|
+
* insets), and pixels on web.
|
|
62
|
+
*
|
|
63
|
+
* @default 64
|
|
64
|
+
*/
|
|
65
|
+
estimatedItemSize?: number;
|
|
66
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Props for the
|
|
3
|
-
* A virtualized vertical container of rows.
|
|
4
|
-
* Typically populated with [`ListItem`](#listitem) children, though any node is accepted.
|
|
2
|
+
* Props for the `List.ForEach` component.
|
|
5
3
|
*/ export { };
|
|
6
4
|
|
|
7
5
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/List/types.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["universal/List/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA6BA;;CAEC,GACD,WAuCC"}
|
|
@@ -10,7 +10,9 @@ import { transformToModifiers } from '../transformStyle';
|
|
|
10
10
|
disabled,
|
|
11
11
|
hidden,
|
|
12
12
|
testID
|
|
13
|
-
}, extraModifiers
|
|
13
|
+
}, extraModifiers, {
|
|
14
|
+
componentName: 'RNHostView'
|
|
15
|
+
});
|
|
14
16
|
return /*#__PURE__*/ _jsx(ComposeRNHostView, {
|
|
15
17
|
matchContents: matchContents,
|
|
16
18
|
modifiers: modifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/RNHostView/index.android.tsx"],"sourcesContent":[null],"names":["RNHostView","ComposeRNHostView","transformToModifiers","children","matchContents","style","onAppear","onDisappear","disabled","hidden","testID","onLayout","modifiers","extraModifiers"],"mappings":";AAAA,SAASA,cAAcC,iBAAiB,QAAQ,2BAA2B;AAE3E,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD;;CAEC,GACD,OAAO,SAASF,WAAW,EACzBG,QAAQ,EACRC,aAAa,EACbC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,QAAQ,EACRC,WAAWC,cAAc,EACT;IAChB,MAAMD,YAAYV,qBAChBG,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDG;
|
|
1
|
+
{"version":3,"sources":["universal/RNHostView/index.android.tsx"],"sourcesContent":[null],"names":["RNHostView","ComposeRNHostView","transformToModifiers","children","matchContents","style","onAppear","onDisappear","disabled","hidden","testID","onLayout","modifiers","extraModifiers","componentName"],"mappings":";AAAA,SAASA,cAAcC,iBAAiB,QAAQ,2BAA2B;AAE3E,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD;;CAEC,GACD,OAAO,SAASF,WAAW,EACzBG,QAAQ,EACRC,aAAa,EACbC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,QAAQ,EACRC,WAAWC,cAAc,EACT;IAChB,MAAMD,YAAYV,qBAChBG,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDG,gBACA;QAAEC,eAAe;IAAa;IAGhC,qBACE,KAACb;QAAkBG,eAAeA;QAAeQ,WAAWA;QAAWD,UAAUA;kBAC9ER;;AAGP;AAEA,cAAc,UAAU"}
|
|
@@ -15,12 +15,15 @@ export function Row({ children, alignment = 'start', spacing, style, onPress, on
|
|
|
15
15
|
disabled,
|
|
16
16
|
hidden,
|
|
17
17
|
testID
|
|
18
|
-
}, extraModifiers
|
|
18
|
+
}, extraModifiers, {
|
|
19
|
+
componentName: 'Row'
|
|
20
|
+
});
|
|
19
21
|
return /*#__PURE__*/ _jsx(ComposeRow, {
|
|
20
22
|
verticalAlignment: alignmentMap[alignment],
|
|
21
23
|
horizontalArrangement: spacing != null ? {
|
|
22
24
|
spacedBy: spacing
|
|
23
25
|
} : undefined,
|
|
26
|
+
resolvesChildPercentages: true,
|
|
24
27
|
modifiers: modifiers,
|
|
25
28
|
children: children
|
|
26
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/Row/index.android.tsx"],"sourcesContent":[null],"names":["Row","ComposeRow","useUniversalLifecycle","transformToModifiers","alignmentMap","start","center","end","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","undefined","verticalAlignment","horizontalArrangement","spacedBy"],"mappings":";AAAA,SAASA,OAAOC,UAAU,QAAQ,2BAA2B;AAE7D,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAwE;IAC5EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASP,IAAI,EAClBQ,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EAChB;IACTjB,sBAAsBW,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAME,YAAYf,qBAChBQ,OACA;QAAEC,SAASG,WAAWK,YAAYR;QAASG;QAAUC;QAAQC;IAAO,GACpEE;
|
|
1
|
+
{"version":3,"sources":["universal/Row/index.android.tsx"],"sourcesContent":[null],"names":["Row","ComposeRow","useUniversalLifecycle","transformToModifiers","alignmentMap","start","center","end","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","undefined","componentName","verticalAlignment","horizontalArrangement","spacedBy","resolvesChildPercentages"],"mappings":";AAAA,SAASA,OAAOC,UAAU,QAAQ,2BAA2B;AAE7D,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAwE;IAC5EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASP,IAAI,EAClBQ,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EAChB;IACTjB,sBAAsBW,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAME,YAAYf,qBAChBQ,OACA;QAAEC,SAASG,WAAWK,YAAYR;QAASG;QAAUC;QAAQC;IAAO,GACpEE,gBACA;QAAEE,eAAe;IAAM;IAGzB,qBACE,KAACpB;QACCqB,mBAAmBlB,YAAY,CAACK,UAAU;QAC1Cc,uBAAuBb,WAAW,OAAO;YAAEc,UAAUd;QAAQ,IAAIU;QACjEK,wBAAwB;QACxBP,WAAWA;kBACVV;;AAGP;AAEA,cAAc,UAAU"}
|
|
@@ -20,12 +20,14 @@ export function Row({ children, alignment = 'start', spacing, style, onPress, on
|
|
|
20
20
|
hidden,
|
|
21
21
|
testID
|
|
22
22
|
}, extraModifiers, {
|
|
23
|
+
componentName: 'Row',
|
|
23
24
|
frameAlignment: frameAlignmentMap[alignment]
|
|
24
25
|
});
|
|
25
26
|
return /*#__PURE__*/ _jsx(HStack, {
|
|
26
27
|
alignment: alignmentMap[alignment],
|
|
27
28
|
spacing: spacing,
|
|
28
29
|
modifiers: modifiers,
|
|
30
|
+
resolvesChildPercentages: true,
|
|
29
31
|
testID: testID,
|
|
30
32
|
children: children
|
|
31
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/Row/index.ios.tsx"],"sourcesContent":[null],"names":["HStack","transformToModifiers","alignmentMap","start","center","end","frameAlignmentMap","Row","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","frameAlignment"],"mappings":";AAAA,SAASA,MAAM,QAAQ,oBAAoB;AAE3C,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAwE;IAC5EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,MAAMC,oBAA4F;IAChGH,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASE,IAAI,EAClBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EAChB;IACT,MAAMD,YAAYjB,qBAChBU,OACA;QAAEC;QAASC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAC3DE,gBACA;QAAEC,
|
|
1
|
+
{"version":3,"sources":["universal/Row/index.ios.tsx"],"sourcesContent":[null],"names":["HStack","transformToModifiers","alignmentMap","start","center","end","frameAlignmentMap","Row","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","componentName","frameAlignment","resolvesChildPercentages"],"mappings":";AAAA,SAASA,MAAM,QAAQ,oBAAoB;AAE3C,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAwE;IAC5EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,MAAMC,oBAA4F;IAChGH,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASE,IAAI,EAClBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EAChB;IACT,MAAMD,YAAYjB,qBAChBU,OACA;QAAEC;QAASC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAC3DE,gBACA;QAAEC,eAAe;QAAOC,gBAAgBf,iBAAiB,CAACG,UAAU;IAAC;IAGvE,qBACE,KAACT;QACCS,WAAWP,YAAY,CAACO,UAAU;QAClCC,SAASA;QACTQ,WAAWA;QACXI,wBAAwB;QACxBL,QAAQA;kBACPT;;AAGP;AAEA,cAAc,UAAU"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useUniversalLifecycle } from '../hooks';
|
|
4
|
+
import { StackAxisContext, useCrossAxisSize } from '../stackAxis';
|
|
4
5
|
const styles = StyleSheet.create({
|
|
5
6
|
row: {
|
|
6
|
-
// Fill the parent's cross-axis by default so a `<Spacer flexible />`
|
|
7
|
-
// child has room to grow. Without this, a Row placed inside a `Column`
|
|
8
|
-
// with alignment other than 'stretch' is content-sized on web, which
|
|
9
|
-
// leaves flex children with no leftover space. SwiftUI and Compose
|
|
10
|
-
// achieve the same effect via their own layout phases.
|
|
11
|
-
alignSelf: 'stretch',
|
|
12
7
|
flexDirection: 'row'
|
|
13
8
|
},
|
|
9
|
+
// Fill the parent's cross axis when this row has no size of its own on that axis,
|
|
10
|
+
// so a flexible child still has leftover space. A set size must not use
|
|
11
|
+
// stretch, or the parent's alignment cannot move it.
|
|
12
|
+
stretch: {
|
|
13
|
+
alignSelf: 'stretch'
|
|
14
|
+
},
|
|
14
15
|
hidden: {
|
|
15
16
|
display: 'none'
|
|
16
17
|
},
|
|
@@ -34,6 +35,7 @@ const alignmentStyles = StyleSheet.create({
|
|
|
34
35
|
* A horizontal layout container that arranges its children from start to end.
|
|
35
36
|
*/ export function Row({ children, alignment = 'start', spacing, style, onPress, onAppear, onDisappear, disabled = false, hidden = false, testID }) {
|
|
36
37
|
useUniversalLifecycle(onAppear, onDisappear);
|
|
38
|
+
const crossAxisSize = useCrossAxisSize(style);
|
|
37
39
|
const Container = onPress ? Pressable : View;
|
|
38
40
|
return /*#__PURE__*/ _jsx(Container, {
|
|
39
41
|
onPress: onPress,
|
|
@@ -41,6 +43,7 @@ const alignmentStyles = StyleSheet.create({
|
|
|
41
43
|
testID: testID,
|
|
42
44
|
style: [
|
|
43
45
|
styles.row,
|
|
46
|
+
crossAxisSize == null && styles.stretch,
|
|
44
47
|
alignmentStyles[alignment],
|
|
45
48
|
spacing != null && {
|
|
46
49
|
gap: spacing
|
|
@@ -49,7 +52,10 @@ const alignmentStyles = StyleSheet.create({
|
|
|
49
52
|
hidden && styles.hidden,
|
|
50
53
|
disabled && styles.disabled
|
|
51
54
|
],
|
|
52
|
-
children:
|
|
55
|
+
children: /*#__PURE__*/ _jsx(StackAxisContext.Provider, {
|
|
56
|
+
value: "horizontal",
|
|
57
|
+
children: children
|
|
58
|
+
})
|
|
53
59
|
});
|
|
54
60
|
}
|
|
55
61
|
export * from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["universal/Row/index.tsx"],"sourcesContent":[null],"names":["Pressable","StyleSheet","View","useUniversalLifecycle","styles","create","row","
|
|
1
|
+
{"version":3,"sources":["universal/Row/index.tsx"],"sourcesContent":[null],"names":["Pressable","StyleSheet","View","useUniversalLifecycle","StackAxisContext","useCrossAxisSize","styles","create","row","flexDirection","stretch","alignSelf","hidden","display","disabled","opacity","pointerEvents","alignmentStyles","start","alignItems","center","end","Row","children","alignment","spacing","style","onPress","onAppear","onDisappear","testID","crossAxisSize","Container","gap","Provider","value"],"mappings":";AAAA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAwB,eAAe;AAE3E,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,eAAe;AAIlE,MAAMC,SAASL,WAAWM,MAAM,CAAC;IAC/BC,KAAK;QAAEC,eAAe;IAAM;IAC5B,kFAAkF;IAClF,wEAAwE;IACxE,qDAAqD;IACrDC,SAAS;QAAEC,WAAW;IAAU;IAChCC,QAAQ;QAAEC,SAAS;IAAO;IAC1BC,UAAU;QACRC,SAAS;QACTC,eAAe;IACjB;AACF;AAEA,MAAMC,kBAAkBhB,WAAWM,MAAM,CAAC;IACxCW,OAAO;QAAEC,YAAY;IAAa;IAClCC,QAAQ;QAAED,YAAY;IAAS;IAC/BE,KAAK;QAAEF,YAAY;IAAW;AAChC;AAEA;;CAEC,GACD,OAAO,SAASG,IAAI,EAClBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXf,WAAW,KAAK,EAChBF,SAAS,KAAK,EACdkB,MAAM,EACG;IACT3B,sBAAsByB,UAAUC;IAChC,MAAME,gBAAgB1B,iBAAiBqB;IAEvC,MAAMM,YAAYL,UAAU3B,YAAYE;IAExC,qBACE,KAAC8B;QACCL,SAASA;QACTb,UAAUA;QACVgB,QAAQA;QACRJ,OAAO;YACLpB,OAAOE,GAAG;YACVuB,iBAAiB,QAAQzB,OAAOI,OAAO;YACvCO,eAAe,CAACO,UAAU;YAC1BC,WAAW,QAAQ;gBAAEQ,KAAKR;YAAQ;YAClCC;YACAd,UAAUN,OAAOM,MAAM;YACvBE,YAAYR,OAAOQ,QAAQ;SAC5B;kBACD,cAAA,KAACV,iBAAiB8B,QAAQ;YAACC,OAAM;sBAAcZ;;;AAGrD;AAEA,cAAc,UAAU"}
|