@llmnative/react 1.15.2 → 1.15.4
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/I18n.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2469,7 +2469,8 @@ var bn = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10
|
|
|
2469
2469
|
draftRestoreAction: "Restore",
|
|
2470
2470
|
draftDiscardAction: "Discard",
|
|
2471
2471
|
draftRestoredTitle: "Draft restored",
|
|
2472
|
-
draftRestoredMessage: "The local draft has been restored. You can still discard it for a few seconds."
|
|
2472
|
+
draftRestoredMessage: "The local draft has been restored. You can still discard it for a few seconds.",
|
|
2473
|
+
draftSaveError: "Could not save a local draft — the change is too large for browser storage (e.g. an unsent image upload). Save the form to keep it."
|
|
2473
2474
|
},
|
|
2474
2475
|
grid: {
|
|
2475
2476
|
buttonAdd: "Add",
|
|
@@ -7839,16 +7840,17 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
7839
7840
|
let { variants: t, naturalWidth: i } = await nc(a, r), o = d && n ? await rc(t, d, n, e.name) : t.map((e) => ({
|
|
7840
7841
|
url: e.localUrl,
|
|
7841
7842
|
width: e.width
|
|
7842
|
-
})), s = e.name.split(".").pop() ?? "jpg", c = e.name.replace(/\.[^/.]+$/, ""), l = d && n ? await d.upload(a, `${n}/${c}_${i}w.${s}`) ?? a : URL.createObjectURL(await fetch(a).then((e) => e.blob())),
|
|
7843
|
-
url:
|
|
7843
|
+
})), s = e.name.split(".").pop() ?? "jpg", c = e.name.replace(/\.[^/.]+$/, ""), l = d && n ? await d.upload(a, `${n}/${c}_${i}w.${s}`) : void 0, u = l ?? (d && n ? a : URL.createObjectURL(await fetch(a).then((e) => e.blob()))), f = [...o, {
|
|
7844
|
+
url: u,
|
|
7844
7845
|
width: i
|
|
7845
7846
|
}];
|
|
7846
|
-
if (
|
|
7847
|
+
if (f.length > 0) {
|
|
7847
7848
|
v(e.name, {
|
|
7848
|
-
url:
|
|
7849
|
-
srcset: ic(
|
|
7849
|
+
url: u,
|
|
7850
|
+
srcset: ic(f),
|
|
7850
7851
|
sizes: "(max-width: 640px) 100vw, 800px",
|
|
7851
|
-
progress: 100
|
|
7852
|
+
progress: 100,
|
|
7853
|
+
...l ? { base64: void 0 } : {}
|
|
7852
7854
|
});
|
|
7853
7855
|
return;
|
|
7854
7856
|
}
|
|
@@ -7858,7 +7860,8 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
7858
7860
|
if (t) {
|
|
7859
7861
|
v(e.name, {
|
|
7860
7862
|
url: t,
|
|
7861
|
-
progress: 100
|
|
7863
|
+
progress: 100,
|
|
7864
|
+
base64: void 0
|
|
7862
7865
|
});
|
|
7863
7866
|
return;
|
|
7864
7867
|
}
|
|
@@ -12266,13 +12269,21 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12266
12269
|
return;
|
|
12267
12270
|
}
|
|
12268
12271
|
let e = window.setTimeout(() => {
|
|
12269
|
-
|
|
12272
|
+
try {
|
|
12273
|
+
localStorage.setItem(oe, JSON.stringify(Nt(B)));
|
|
12274
|
+
} catch {
|
|
12275
|
+
xe({
|
|
12276
|
+
type: "warning",
|
|
12277
|
+
message: P.draftSaveError ?? "Could not save a local draft — the change is too large for browser storage (e.g. an unsent image upload). Save the form to keep it."
|
|
12278
|
+
});
|
|
12279
|
+
}
|
|
12270
12280
|
}, 150);
|
|
12271
12281
|
return () => window.clearTimeout(e);
|
|
12272
12282
|
}, [
|
|
12273
12283
|
ne,
|
|
12274
12284
|
oe,
|
|
12275
12285
|
le,
|
|
12286
|
+
xe,
|
|
12276
12287
|
_e,
|
|
12277
12288
|
B
|
|
12278
12289
|
]), l(() => {
|
|
@@ -12287,7 +12298,9 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12287
12298
|
B
|
|
12288
12299
|
]), l(() => () => {
|
|
12289
12300
|
let { storageKey: e, record: t, isDirty: n } = ae.current;
|
|
12290
|
-
!e || !n || !t || typeof localStorage > "u"
|
|
12301
|
+
if (!(!e || !n || !t || typeof localStorage > "u")) try {
|
|
12302
|
+
localStorage.setItem(e, JSON.stringify(Nt(t)));
|
|
12303
|
+
} catch {}
|
|
12291
12304
|
}, []), l(() => {
|
|
12292
12305
|
L.bindActions({
|
|
12293
12306
|
save: Ve,
|