react-solidlike 2.2.0 → 2.2.1
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/dist/index.js +2 -2
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -80,7 +80,7 @@ function For({ each, children, keyExtractor, fallback = null }) {
|
|
|
80
80
|
if (!each || each.length === 0) return fallback;
|
|
81
81
|
return each.map((item, index) => {
|
|
82
82
|
const key = keyExtractor ? keyExtractor(item, index) : index;
|
|
83
|
-
return
|
|
83
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(item, index) }, key);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -104,7 +104,7 @@ function QueryBoundary({ query, loading = null, error = null, empty = null, chil
|
|
|
104
104
|
function Repeat({ times, children }) {
|
|
105
105
|
if (times <= 0) return null;
|
|
106
106
|
const elements = [];
|
|
107
|
-
for (let i = 0; i < times; i++) elements.push( jsx(Fragment, { children: children(i) }, i));
|
|
107
|
+
for (let i = 0; i < times; i++) elements.push(/* @__PURE__ */ jsx(Fragment, { children: children(i) }, i));
|
|
108
108
|
return elements;
|
|
109
109
|
}
|
|
110
110
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-solidlike",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Declarative React control flow components inspired by Solid.js, replacing ternary expressions and array.map() in JSX",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
12
|
+
"default": "./dist/index.js"
|
|
14
13
|
}
|
|
15
14
|
},
|
|
16
15
|
"files": [
|