@llmnative/react 1.15.2 → 1.15.3

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.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",
@@ -12266,13 +12267,21 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
12266
12267
  return;
12267
12268
  }
12268
12269
  let e = window.setTimeout(() => {
12269
- localStorage.setItem(oe, JSON.stringify(Nt(B)));
12270
+ try {
12271
+ localStorage.setItem(oe, JSON.stringify(Nt(B)));
12272
+ } catch {
12273
+ xe({
12274
+ type: "warning",
12275
+ 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."
12276
+ });
12277
+ }
12270
12278
  }, 150);
12271
12279
  return () => window.clearTimeout(e);
12272
12280
  }, [
12273
12281
  ne,
12274
12282
  oe,
12275
12283
  le,
12284
+ xe,
12276
12285
  _e,
12277
12286
  B
12278
12287
  ]), l(() => {
@@ -12287,7 +12296,9 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
12287
12296
  B
12288
12297
  ]), l(() => () => {
12289
12298
  let { storageKey: e, record: t, isDirty: n } = ae.current;
12290
- !e || !n || !t || typeof localStorage > "u" || localStorage.setItem(e, JSON.stringify(Nt(t)));
12299
+ if (!(!e || !n || !t || typeof localStorage > "u")) try {
12300
+ localStorage.setItem(e, JSON.stringify(Nt(t)));
12301
+ } catch {}
12291
12302
  }, []), l(() => {
12292
12303
  L.bindActions({
12293
12304
  save: Ve,