expo-widgets 57.0.9 → 57.0.11
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 +10 -0
- package/android/build.gradle +2 -2
- package/bundle/jsx-runtime-stub.ts +7 -0
- package/ios/Widgets/DynamicView.swift +13 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 57.0.11 — 2026-08-20
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix blank widget when JSX children mix a `.map()` array with sibling elements. ([#47888](https://github.com/expo/expo/pull/47888) by [@jakex7](https://github.com/jakex7))
|
|
18
|
+
|
|
19
|
+
## 57.0.10 — 2026-08-14
|
|
20
|
+
|
|
21
|
+
_This version does not introduce any user-facing changes._
|
|
22
|
+
|
|
13
23
|
## 57.0.9 — 2026-08-10
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -13,7 +13,7 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
13
13
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
14
14
|
|
|
15
15
|
group = 'expo.modules.widgets'
|
|
16
|
-
version = '57.0.
|
|
16
|
+
version = '57.0.11'
|
|
17
17
|
|
|
18
18
|
expoModule {
|
|
19
19
|
canBePublished false
|
|
@@ -23,7 +23,7 @@ android {
|
|
|
23
23
|
namespace "expo.modules.widgets"
|
|
24
24
|
defaultConfig {
|
|
25
25
|
versionCode 1
|
|
26
|
-
versionName '57.0.
|
|
26
|
+
versionName '57.0.11'
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
buildFeatures {
|
|
@@ -49,6 +49,13 @@ function jsxProd(
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// React flattens nested children arrays (e.g. a `.map()` result mixed with sibling
|
|
53
|
+
// elements) during reconciliation. There is no reconciler here - the element tree is
|
|
54
|
+
// serialized for the native widget parsers, which expect a flat children list.
|
|
55
|
+
if (Array.isArray(props.children)) {
|
|
56
|
+
props.children = props.children.flat(Infinity);
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
return ReactElement(type, key, props);
|
|
53
60
|
}
|
|
54
61
|
|
|
@@ -151,11 +151,23 @@ public struct WidgetsDynamicView: View, ExpoSwiftUI.AnyChild {
|
|
|
151
151
|
where P: UIBaseViewProps {
|
|
152
152
|
if let props = node["props"] as? [String: Any] {
|
|
153
153
|
if let children = props["children"] as? [Any] {
|
|
154
|
-
let validChildren = children
|
|
154
|
+
let validChildren = flattenChildNodes(children)
|
|
155
155
|
initialProps.children = validChildren.map { WidgetsDynamicView(name: name, kind: kind, node: $0, entryIndex: entryIndex, environmentString: environmentString) }
|
|
156
156
|
} else if let child = props["children"] as? [String: Any] {
|
|
157
157
|
initialProps.children = [WidgetsDynamicView(name: name, kind: kind, node: child, entryIndex: entryIndex, environmentString: environmentString)]
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
+
|
|
162
|
+
private func flattenChildNodes(_ children: [Any]) -> [[String: Any]] {
|
|
163
|
+
return children.flatMap { child -> [[String: Any]] in
|
|
164
|
+
if let node = child as? [String: Any] {
|
|
165
|
+
return [node]
|
|
166
|
+
}
|
|
167
|
+
if let nested = child as? [Any] {
|
|
168
|
+
return flattenChildNodes(nested)
|
|
169
|
+
}
|
|
170
|
+
return []
|
|
171
|
+
}
|
|
172
|
+
}
|
|
161
173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-widgets",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.11",
|
|
4
4
|
"description": "Widgets.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/widgets/",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@expo/plist": "^0.8.1",
|
|
25
|
-
"@expo/ui": "~57.0.
|
|
25
|
+
"@expo/ui": "~57.0.12"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@expo/spawn-async": "^1.8.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/react": "~19.2.0",
|
|
31
31
|
"react-native": "0.86.2",
|
|
32
32
|
"resolve-workspace-root": "^2.0.0",
|
|
33
|
-
"expo": "57.0.
|
|
33
|
+
"expo": "57.0.15",
|
|
34
34
|
"expo-module-scripts": "56.0.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"./scripts/xcode-build-bundle.sh"
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "499024a441d67293aa60afcbe02051999a54f1bb",
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "expo-module build",
|
|
50
50
|
"build:plugin": "expo-module build plugin",
|