@expo/ui 58.0.6 → 58.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 +20 -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/ModifierRegistry.kt +11 -3
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +18 -4
- package/android/src/main/java/expo/modules/ui/SemanticsModifier.kt +2 -1
- 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/jetpack-compose/modifiers/index.d.ts +15 -3
- package/build/jetpack-compose/modifiers/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/index.d.ts +5 -1
- package/build/swift-ui/modifiers/index.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/State.android.d.ts +1 -3
- package/build/universal/State.d.ts +2 -3
- package/build/universal/State.ios.d.ts +1 -3
- package/build/universal/State.js +10 -4
- package/build/universal/State.js.map +1 -1
- package/build/universal/transformStyle.ios.js +4 -3
- package/build/universal/transformStyle.ios.js.map +1 -1
- package/build/universal/types.d.ts +24 -0
- package/build/universal/types.js +8 -2
- package/build/universal/types.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.8/expo.modules.ui-58.0.8-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.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.8/expo.modules.ui-58.0.8.module} +24 -24
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.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.8/expo.modules.ui-58.0.8.pom} +3 -3
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.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 +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/jetpack-compose/modifiers/index.ts +16 -1
- 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/index.ts +5 -1
- package/src/swift-ui/modifiers/presentationModifiers.ts +10 -0
- package/src/universal/State.android.ts +1 -1
- package/src/universal/State.ios.ts +1 -1
- package/src/universal/State.ts +12 -4
- package/src/universal/transformStyle.ios.ts +5 -2
- package/src/universal/types.ts +27 -0
- 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
package/src/universal/State.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ObservableState } from './types';
|
|
4
|
+
|
|
5
|
+
export type { ObservableState };
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Web polyfill for the native `useNativeState` hook.
|
|
@@ -13,14 +15,20 @@ export function useNativeState<T>(initialValue: T): ObservableState<T> {
|
|
|
13
15
|
|
|
14
16
|
const stateRef = useRef<ObservableState<T> | null>(null);
|
|
15
17
|
if (stateRef.current === null) {
|
|
18
|
+
const get = () => valRef.current;
|
|
19
|
+
const set = (v: T) => {
|
|
20
|
+
valRef.current = v;
|
|
21
|
+
setVal(v);
|
|
22
|
+
};
|
|
16
23
|
stateRef.current = {
|
|
17
24
|
get value() {
|
|
18
|
-
return
|
|
25
|
+
return get();
|
|
19
26
|
},
|
|
20
27
|
set value(v: T) {
|
|
21
|
-
|
|
22
|
-
setVal(v);
|
|
28
|
+
set(v);
|
|
23
29
|
},
|
|
30
|
+
get,
|
|
31
|
+
set,
|
|
24
32
|
};
|
|
25
33
|
}
|
|
26
34
|
return stateRef.current;
|
|
@@ -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));
|
package/src/universal/types.ts
CHANGED
|
@@ -111,3 +111,30 @@ export interface UniversalBaseProps {
|
|
|
111
111
|
* @docsInline
|
|
112
112
|
*/
|
|
113
113
|
export type UniversalAlignment = 'start' | 'center' | 'end';
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Observable state created with `useNativeState`.
|
|
117
|
+
*
|
|
118
|
+
* On Android and iOS, the value is shared with native views. A write from the JavaScript thread
|
|
119
|
+
* is applied on the UI thread asynchronously, so a read right after it may still return the
|
|
120
|
+
* previous value. Writes don't re-render the component that created the state.
|
|
121
|
+
*
|
|
122
|
+
* On web, the value is backed by React state. A write is readable immediately and re-renders the
|
|
123
|
+
* component that created the state.
|
|
124
|
+
*/
|
|
125
|
+
export type ObservableState<T> = {
|
|
126
|
+
/**
|
|
127
|
+
* The current value.
|
|
128
|
+
*/
|
|
129
|
+
value: T;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Reads the current value. A React Compiler-compliant alternative to reading `.value`.
|
|
133
|
+
*/
|
|
134
|
+
get(): T;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Writes a new value. A React Compiler-compliant alternative to assigning `.value`.
|
|
138
|
+
*/
|
|
139
|
+
set(value: T): void;
|
|
140
|
+
};
|
|
@@ -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
|