@llmnative/react 1.15.0 → 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",
@@ -8000,7 +8001,7 @@ var bc = 120, xc = 88, Sc = (e) => {
8000
8001
  onClick: (t) => {
8001
8002
  t.stopPropagation(), w(e.key);
8002
8003
  },
8003
- className: "flex items-center justify-center w-6 h-6 rounded-full text-muted-foreground hover:bg-red-50 hover:text-red-500 transition-colors ml-auto"
8004
+ className: "flex items-center justify-center w-6 h-6 rounded-full text-muted-foreground hover:bg-red-50 hover:text-red-500 transition-colors ml-auto cursor-pointer"
8004
8005
  }, /* @__PURE__ */ t.createElement(Q, {
8005
8006
  name: "x",
8006
8007
  className: "w-3.5 h-3.5"
@@ -8012,7 +8013,7 @@ var bc = 120, xc = 88, Sc = (e) => {
8012
8013
  }, /* @__PURE__ */ t.createElement("button", {
8013
8014
  type: "button",
8014
8015
  onClick: C,
8015
- className: "flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors"
8016
+ className: "flex items-center gap-1.5 text-xs text-muted-foreground hover:text-primary transition-colors cursor-pointer"
8016
8017
  }, /* @__PURE__ */ t.createElement(Q, {
8017
8018
  name: "upload",
8018
8019
  className: "w-3.5 h-3.5"
@@ -8119,7 +8120,7 @@ var bc = 120, xc = 88, Sc = (e) => {
8119
8120
  })), a && /* @__PURE__ */ t.createElement("button", {
8120
8121
  type: "button",
8121
8122
  onClick: () => j(e),
8122
- className: "flex items-center justify-center w-7 h-7 rounded-full bg-white/20 hover:bg-white/35 text-white transition-colors"
8123
+ className: "flex items-center justify-center w-7 h-7 rounded-full bg-white/20 hover:bg-white/35 text-white transition-colors cursor-pointer"
8123
8124
  }, /* @__PURE__ */ t.createElement(Q, {
8124
8125
  name: "pencil",
8125
8126
  className: "w-4 h-4"
@@ -8128,7 +8129,7 @@ var bc = 120, xc = 88, Sc = (e) => {
8128
8129
  onClick: (t) => {
8129
8130
  t.preventDefault(), t.stopPropagation(), k(e.key);
8130
8131
  },
8131
- className: "flex items-center justify-center w-7 h-7 rounded-full bg-red-500/70 hover:bg-red-500/90 text-white transition-colors"
8132
+ className: "flex items-center justify-center w-7 h-7 rounded-full bg-red-500/70 hover:bg-red-500/90 text-white transition-colors cursor-pointer"
8132
8133
  }, /* @__PURE__ */ t.createElement(Q, {
8133
8134
  name: "x",
8134
8135
  className: "w-4 h-4"
@@ -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,