@llmnative/react 1.22.0 → 1.22.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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8086,10 +8086,10 @@ var Tc = 120, Ec = 88, Dc = (e) => {
|
|
|
8086
8086
|
name: e,
|
|
8087
8087
|
onChange: t,
|
|
8088
8088
|
wrapperClassName: n
|
|
8089
|
-
}), [d, f] = h(null), p = m(s), g = Mc({
|
|
8089
|
+
}), [d, f] = h(null), p = m(s), g = m(/* @__PURE__ */ new WeakSet()), _ = Mc({
|
|
8090
8090
|
initialFiles: Array.isArray(s) ? s : [],
|
|
8091
8091
|
onFilesChange: (t) => {
|
|
8092
|
-
p.current = t, c({ target: {
|
|
8092
|
+
p.current = t, g.current.add(t), c({ target: {
|
|
8093
8093
|
name: e,
|
|
8094
8094
|
value: t
|
|
8095
8095
|
} });
|
|
@@ -8100,16 +8100,18 @@ var Tc = 120, Ec = 88, Dc = (e) => {
|
|
|
8100
8100
|
storageProvider: o
|
|
8101
8101
|
});
|
|
8102
8102
|
l(() => {
|
|
8103
|
-
s
|
|
8103
|
+
if (s === p.current || Array.isArray(s) && g.current.has(s)) return;
|
|
8104
|
+
let e = Array.isArray(s) ? s : [];
|
|
8105
|
+
p.current = s, (e.length !== 0 || _.files.length !== 0) && _.setFiles(e);
|
|
8104
8106
|
}, [s]);
|
|
8105
|
-
let
|
|
8106
|
-
d && (
|
|
8107
|
+
let v = (e) => {
|
|
8108
|
+
d && (_.updateFile(d.key, e), f(null));
|
|
8107
8109
|
};
|
|
8108
8110
|
return {
|
|
8109
|
-
...
|
|
8111
|
+
..._,
|
|
8110
8112
|
formWrapClass: u,
|
|
8111
8113
|
currentFile: d,
|
|
8112
|
-
handleSave:
|
|
8114
|
+
handleSave: v,
|
|
8113
8115
|
handleEdit: (e) => f(e),
|
|
8114
8116
|
handleClose: () => f(null)
|
|
8115
8117
|
};
|