@qwanyx/stack 0.2.39 → 0.2.41

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.esm.js CHANGED
@@ -4234,8 +4234,8 @@ function pu() {
4234
4234
  }
4235
4235
  var ge = !1, Me;
4236
4236
  {
4237
- var dt = typeof WeakMap == "function" ? WeakMap : Map;
4238
- Me = new dt();
4237
+ var ct = typeof WeakMap == "function" ? WeakMap : Map;
4238
+ Me = new ct();
4239
4239
  }
4240
4240
  function Ct(b, P) {
4241
4241
  if (!b || ge)
@@ -4294,9 +4294,9 @@ function pu() {
4294
4294
  if (Ne !== 1 || je !== 1)
4295
4295
  do
4296
4296
  if (Ne--, je--, je < 0 || se[Ne] !== Ke[je]) {
4297
- var ut = `
4297
+ var at = `
4298
4298
  ` + se[Ne].replace(" at new ", " at ");
4299
- return b.displayName && ut.includes("<anonymous>") && (ut = ut.replace("<anonymous>", b.displayName)), typeof b == "function" && Me.set(b, ut), ut;
4299
+ return b.displayName && at.includes("<anonymous>") && (at = at.replace("<anonymous>", b.displayName)), typeof b == "function" && Me.set(b, at), at;
4300
4300
  }
4301
4301
  while (Ne >= 1 && je >= 0);
4302
4302
  break;
@@ -4344,7 +4344,7 @@ function pu() {
4344
4344
  }
4345
4345
  return "";
4346
4346
  }
4347
- var ft = Object.prototype.hasOwnProperty, Ut = {}, Wt = C.ReactDebugCurrentFrame;
4347
+ var dt = Object.prototype.hasOwnProperty, Ut = {}, Wt = C.ReactDebugCurrentFrame;
4348
4348
  function Dt(b) {
4349
4349
  if (b) {
4350
4350
  var P = b._owner, G = ot(b.type, b._source, P ? P.type : null);
@@ -4352,9 +4352,9 @@ function pu() {
4352
4352
  } else
4353
4353
  Wt.setExtraStackFrame(null);
4354
4354
  }
4355
- function ht(b, P, G, Z, he) {
4355
+ function ft(b, P, G, Z, he) {
4356
4356
  {
4357
- var be = Function.call.bind(ft);
4357
+ var be = Function.call.bind(dt);
4358
4358
  for (var le in b)
4359
4359
  if (be(b, le)) {
4360
4360
  var se = void 0;
@@ -4371,9 +4371,9 @@ function pu() {
4371
4371
  }
4372
4372
  }
4373
4373
  }
4374
- var lt = Array.isArray;
4374
+ var ht = Array.isArray;
4375
4375
  function At(b) {
4376
- return lt(b);
4376
+ return ht(b);
4377
4377
  }
4378
4378
  function W(b) {
4379
4379
  {
@@ -4402,7 +4402,7 @@ function pu() {
4402
4402
  __source: !0
4403
4403
  }, J, S;
4404
4404
  function I(b) {
4405
- if (ft.call(b, "ref")) {
4405
+ if (dt.call(b, "ref")) {
4406
4406
  var P = Object.getOwnPropertyDescriptor(b, "ref").get;
4407
4407
  if (P && P.isReactWarning)
4408
4408
  return !1;
@@ -4410,7 +4410,7 @@ function pu() {
4410
4410
  return b.ref !== void 0;
4411
4411
  }
4412
4412
  function K(b) {
4413
- if (ft.call(b, "key")) {
4413
+ if (dt.call(b, "key")) {
4414
4414
  var P = Object.getOwnPropertyDescriptor(b, "key").get;
4415
4415
  if (P && P.isReactWarning)
4416
4416
  return !1;
@@ -4476,7 +4476,7 @@ function pu() {
4476
4476
  var be, le = {}, se = null, Ke = null;
4477
4477
  G !== void 0 && (q(G), se = "" + G), K(P) && (q(P.key), se = "" + P.key), I(P) && (Ke = P.ref, Q(P, he));
4478
4478
  for (be in P)
4479
- ft.call(P, be) && !X.hasOwnProperty(be) && (le[be] = P[be]);
4479
+ dt.call(P, be) && !X.hasOwnProperty(be) && (le[be] = P[be]);
4480
4480
  if (b && b.defaultProps) {
4481
4481
  var Ne = b.defaultProps;
4482
4482
  for (be in Ne)
@@ -4514,7 +4514,7 @@ Check the render method of \`` + b + "`.";
4514
4514
  return "";
4515
4515
  }
4516
4516
  }
4517
- function at(b) {
4517
+ function lt(b) {
4518
4518
  return "";
4519
4519
  }
4520
4520
  var Et = {};
@@ -4578,7 +4578,7 @@ Check the top-level render call using <` + G + ">.");
4578
4578
  return;
4579
4579
  if (G) {
4580
4580
  var Z = L(P);
4581
- ht(G, b.props, "prop", Z, b);
4581
+ ft(G, b.props, "prop", Z, b);
4582
4582
  } else if (P.PropTypes !== void 0 && !fe) {
4583
4583
  fe = !0;
4584
4584
  var he = L(P);
@@ -4606,7 +4606,7 @@ Check the top-level render call using <` + G + ">.");
4606
4606
  if (!le) {
4607
4607
  var se = "";
4608
4608
  (b === void 0 || typeof b == "object" && b !== null && Object.keys(b).length === 0) && (se += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
4609
- var Ke = at();
4609
+ var Ke = lt();
4610
4610
  Ke ? se += Ke : se += Ue();
4611
4611
  var Ne;
4612
4612
  b === null ? Ne = "null" : At(b) ? Ne = "array" : b !== void 0 && b.$$typeof === e ? (Ne = "<" + (L(b.type) || "Unknown") + " />", se = " Did you accidentally export a JSX literal instead of a component?") : Ne = typeof b, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ne, se);
@@ -4615,19 +4615,19 @@ Check the top-level render call using <` + G + ">.");
4615
4615
  if (je == null)
4616
4616
  return je;
4617
4617
  if (le) {
4618
- var ut = P.children;
4619
- if (ut !== void 0)
4618
+ var at = P.children;
4619
+ if (at !== void 0)
4620
4620
  if (Z)
4621
- if (At(ut)) {
4622
- for (var br = 0; br < ut.length; br++)
4623
- yr(ut[br], b);
4624
- Object.freeze && Object.freeze(ut);
4621
+ if (At(at)) {
4622
+ for (var br = 0; br < at.length; br++)
4623
+ yr(at[br], b);
4624
+ Object.freeze && Object.freeze(at);
4625
4625
  } else
4626
4626
  x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
4627
4627
  else
4628
- yr(ut, b);
4628
+ yr(at, b);
4629
4629
  }
4630
- if (ft.call(P, "key")) {
4630
+ if (dt.call(P, "key")) {
4631
4631
  var rr = L(b), Ze = Object.keys(P).filter(function(Ra) {
4632
4632
  return Ra !== "key";
4633
4633
  }), Ds = Ze.length > 0 ? "{key: someKey, " + Ze.join(": ..., ") + ": ...}" : "{key: someKey}";
@@ -5283,7 +5283,7 @@ function Af({
5283
5283
  De(() => {
5284
5284
  k([]), R(/* @__PURE__ */ new Set()), oe(null), L(null), a === void 0 && ke(""), d && Me();
5285
5285
  }, [s, d]);
5286
- const dt = re(async (S) => {
5286
+ const ct = re(async (S) => {
5287
5287
  if (ge) {
5288
5288
  oe(S), pe(null), Se(!0);
5289
5289
  try {
@@ -5295,10 +5295,10 @@ function Af({
5295
5295
  Se(!1);
5296
5296
  }
5297
5297
  }, [ge, t, s]), Ct = re((S) => {
5298
- f == null || f(S), i && dt(S);
5299
- }, [f, i, dt]), qt = re((S, I, K) => {
5298
+ f == null || f(S), i && ct(S);
5299
+ }, [f, i, ct]), qt = re((S, I, K) => {
5300
5300
  if (!o) {
5301
- f == null || f(S), i && dt(S);
5301
+ f == null || f(S), i && ct(S);
5302
5302
  return;
5303
5303
  }
5304
5304
  const Q = S.uid;
@@ -5344,7 +5344,7 @@ function Af({
5344
5344
  const K = I instanceof Error ? I : new Error("Archive failed");
5345
5345
  console.error("Archive error:", K), L(K.message), m == null || m(K);
5346
5346
  }
5347
- }, [ge, t, j, s, g, m]), ft = re(() => {
5347
+ }, [ge, t, j, s, g, m]), dt = re(() => {
5348
5348
  if (j.size === D.length)
5349
5349
  R(/* @__PURE__ */ new Set()), h == null || h([]);
5350
5350
  else {
@@ -5357,13 +5357,13 @@ function Af({
5357
5357
  delete: it,
5358
5358
  archive: ot,
5359
5359
  refresh: Me,
5360
- selectAll: ft,
5360
+ selectAll: dt,
5361
5361
  clearSelection: Ut
5362
5362
  }, Dt = (S) => {
5363
5363
  if (!S) return "";
5364
5364
  const I = new Date(S), K = /* @__PURE__ */ new Date();
5365
5365
  return I.toDateString() === K.toDateString() ? I.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : I.toLocaleDateString([], { month: "short", day: "numeric" });
5366
- }, ht = (S, I) => /* @__PURE__ */ p.jsx("div", { style: {
5366
+ }, ft = (S, I) => /* @__PURE__ */ p.jsx("div", { style: {
5367
5367
  padding: "12px 16px",
5368
5368
  background: I ? _.selectedBackground : S.seen ? _.cardBackground : _.unreadBackground,
5369
5369
  borderBottom: `1px solid ${_.border}`,
@@ -5394,7 +5394,7 @@ function Af({
5394
5394
  color: _.textSecondary,
5395
5395
  flexShrink: 0
5396
5396
  }, children: Dt(S.date) })
5397
- ] }) }), lt = (S) => /* @__PURE__ */ p.jsxs("div", { style: { padding: "24px" }, children: [
5397
+ ] }) }), ht = (S) => /* @__PURE__ */ p.jsxs("div", { style: { padding: "24px" }, children: [
5398
5398
  /* @__PURE__ */ p.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: _.text }, children: _r(S.subject) || "(No subject)" }),
5399
5399
  /* @__PURE__ */ p.jsxs("div", { style: { fontSize: "14px", color: _.textSecondary, marginBottom: "16px" }, children: [
5400
5400
  "From: ",
@@ -5508,7 +5508,7 @@ function Af({
5508
5508
  padding: "48px",
5509
5509
  textAlign: "center",
5510
5510
  color: _.textSecondary
5511
- }, children: "Loading..." }), Xe = C || ht, q = x || lt, T = A || At, X = w || W, J = E || Ce;
5511
+ }, children: "Loading..." }), Xe = C || ft, q = x || ht, T = A || At, X = w || W, J = E || Ce;
5512
5512
  return M && D.length === 0 ? /* @__PURE__ */ p.jsx("div", { style: { background: _.background, width: "100%", height: "100%" }, children: J() }) : /* @__PURE__ */ p.jsxs("div", { style: { display: "flex", background: _.background, width: "100%", height: "100%" }, children: [
5513
5513
  /* @__PURE__ */ p.jsxs("div", { style: {
5514
5514
  flex: i && ie ? "0 0 50%" : "1",
@@ -5753,7 +5753,7 @@ function Ns(r, e, t) {
5753
5753
  return s && (r === s || n && r.previousSibling === s) || n && ds(r, t) !== void 0;
5754
5754
  }
5755
5755
  function Xu(r, e, t) {
5756
- const n = ct(t._window);
5756
+ const n = ut(t._window);
5757
5757
  let s = null, o = null;
5758
5758
  n !== null && n.anchorNode === r && (s = n.anchorOffset, o = n.focusOffset);
5759
5759
  const i = r.nodeValue;
@@ -6087,7 +6087,7 @@ function Il(r) {
6087
6087
  return r.nodeType === Zt ? r.nodeValue : null;
6088
6088
  }
6089
6089
  function ki(r, e, t) {
6090
- const n = ct(e._window);
6090
+ const n = ut(e._window);
6091
6091
  if (n === null) return;
6092
6092
  const s = n.anchorNode;
6093
6093
  let { anchorOffset: o, focusOffset: i } = n;
@@ -6303,7 +6303,7 @@ function ac(r, e, t) {
6303
6303
  }
6304
6304
  n !== null && Ni(n, r, e);
6305
6305
  }
6306
- function ct(r) {
6306
+ function ut(r) {
6307
6307
  return wt ? (r || window).getSelection() : null;
6308
6308
  }
6309
6309
  function uc(r) {
@@ -6739,7 +6739,7 @@ const Rt = Object.freeze({}), ei = 30, ti = [["keydown", function(r, e) {
6739
6739
  const t = V(), n = r.data, s = Xl(r);
6740
6740
  if (n != null && O(t) && Yl(t, s, n, r.timeStamp, !1)) {
6741
6741
  Gr && (Ps(e, n), Gr = !1);
6742
- const o = t.anchor.getNode(), i = ct(e._window);
6742
+ const o = t.anchor.getNode(), i = ut(e._window);
6743
6743
  if (i === null) return;
6744
6744
  const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, u = l ? t.focus.offset : t.anchor.offset;
6745
6745
  zn && !t.isCollapsed() && z(o) && i.anchorNode !== null && o.getTextContent().slice(0, a) + n + o.getTextContent().slice(a + u) === Il(i.anchorNode) || U(e, Sr, n);
@@ -6751,7 +6751,7 @@ const Rt = Object.freeze({}), ei = 30, ti = [["keydown", function(r, e) {
6751
6751
  }), Cr = null;
6752
6752
  }], ["click", function(r, e) {
6753
6753
  nt(e, () => {
6754
- const t = V(), n = ct(e._window), s = wn();
6754
+ const t = V(), n = ut(e._window), s = wn();
6755
6755
  if (n) {
6756
6756
  if (O(t)) {
6757
6757
  const o = t.anchor, i = o.getNode();
@@ -6881,7 +6881,7 @@ let rn = 0, Hl = null, Jl = 0, Cr = null;
6881
6881
  const Zn = /* @__PURE__ */ new WeakMap();
6882
6882
  let ri = !1, ni = !1, nn = !1, Gr = !1, Ql = [0, "", 0, "root", 0];
6883
6883
  function Yl(r, e, t, n, s) {
6884
- const o = r.anchor, i = r.focus, l = o.getNode(), a = Be(), u = ct(a._window), c = u !== null ? u.anchorNode : null, d = o.key, f = a.getElementByKey(d), h = t.length;
6884
+ const o = r.anchor, i = r.focus, l = o.getNode(), a = Be(), u = ut(a._window), c = u !== null ? u.anchorNode : null, d = o.key, f = a.getElementByKey(d), h = t.length;
6885
6885
  return d !== i.key || !z(l) || (!s && (!zn || Jl < n + 50) || l.isDirty() && h < 2 || Ol(t)) && o.offset !== i.offset && !l.isComposing() || sr(l) || l.isDirty() && h > 1 || (s || !zn) && f !== null && !l.isComposing() && c !== Gn(f) || u !== null && e !== null && (!e.collapsed || e.startContainer !== u.anchorNode || e.startOffset !== u.anchorOffset) || l.getFormat() !== r.format || l.getStyle() !== r.style || ic(r, l);
6886
6886
  }
6887
6887
  function ho(r, e) {
@@ -6946,7 +6946,7 @@ function Zl(r) {
6946
6946
  }
6947
6947
  const kr = /* @__PURE__ */ new Map();
6948
6948
  function ea(r) {
6949
- const e = r.target, t = ct(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
6949
+ const e = r.target, t = ut(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
6950
6950
  if (t === null) return;
6951
6951
  const n = Fl(t.anchorNode);
6952
6952
  if (n === null) return;
@@ -8268,7 +8268,7 @@ class er {
8268
8268
  return N(f) ? (m = f.__key, g = t ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), m = h.__key, t || g++), s.set(m, g, "element"), void (i && o.set(m, g, "element"));
8269
8269
  }
8270
8270
  }
8271
- const a = Be(), u = ct(a._window);
8271
+ const a = Be(), u = ut(a._window);
8272
8272
  if (!u) return;
8273
8273
  const c = a._blockCursorElement, d = a._rootElement;
8274
8274
  if (d === null || c === null || !N(l) || l.isInline() || l.canBeEmpty() || Ni(c, a, d), function(f, h, g, m) {
@@ -8758,7 +8758,7 @@ function Jt(r, e) {
8758
8758
  let B;
8759
8759
  for (B in k) M.has(B) || (k === D && (k = Pl(v)), delete k[B]);
8760
8760
  }(r, t);
8761
- const w = s ? null : ct(r._window);
8761
+ const w = s ? null : ut(r._window);
8762
8762
  if (r._editable && w !== null && (a || l === null || l.dirty)) {
8763
8763
  $e = r, Ie = t;
8764
8764
  try {
@@ -8864,7 +8864,7 @@ function da(r, e, t) {
8864
8864
  Ie = a, tt = !1, r._updating = !0, $e = r;
8865
8865
  try {
8866
8866
  u && (r._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(C) {
8867
- const x = C.getEditorState()._selection, A = ct(C._window);
8867
+ const x = C.getEditorState()._selection, A = ut(C._window);
8868
8868
  return O(x) || x == null ? Pi(x, A, C, null) : x.clone();
8869
8869
  }(r));
8870
8870
  const m = r._compositionKey;
@@ -9804,7 +9804,7 @@ class xs {
9804
9804
  blur() {
9805
9805
  const e = this._rootElement;
9806
9806
  e !== null && e.blur();
9807
- const t = ct(this._window);
9807
+ const t = ut(this._window);
9808
9808
  t !== null && t.removeAllRanges();
9809
9809
  }
9810
9810
  isEditable() {
@@ -10282,7 +10282,7 @@ async function $o(r, e, t) {
10282
10282
  a(zo(r, e, t));
10283
10283
  });
10284
10284
  });
10285
- const n = r.getRootElement(), s = r._window == null ? window.document : r._window.document, o = ct(r._window);
10285
+ const n = r.getRootElement(), s = r._window == null ? window.document : r._window.document, o = ut(r._window);
10286
10286
  if (n === null || o === null) return !1;
10287
10287
  const i = s.createElement("span");
10288
10288
  i.style.cssText = "position: fixed; top: -1000px;", i.append(s.createTextNode("#")), n.append(i);
@@ -10296,7 +10296,7 @@ async function $o(r, e, t) {
10296
10296
  }
10297
10297
  function zo(r, e, t) {
10298
10298
  if (t === void 0) {
10299
- const s = ct(r._window);
10299
+ const s = ut(r._window);
10300
10300
  if (!s) return !1;
10301
10301
  const o = s.anchorNode, i = s.focusNode;
10302
10302
  if (o !== null && i !== null && !yn(r, o, i)) return !1;
@@ -12365,16 +12365,16 @@ function Sf({
12365
12365
  }, [l, t]);
12366
12366
  const ze = (W) => {
12367
12367
  Y(W), we(!1), i == null || i(W);
12368
- }, ge = xe(null), [Me, dt] = H(!1), Ct = (W) => {
12368
+ }, ge = xe(null), [Me, ct] = H(!1), Ct = (W) => {
12369
12369
  const Ce = W.target.files;
12370
12370
  Ce && ie((Xe) => [...Xe, ...Array.from(Ce)]), ge.current && (ge.current.value = "");
12371
12371
  }, qt = (W) => {
12372
- W.preventDefault(), W.stopPropagation(), dt(!0);
12372
+ W.preventDefault(), W.stopPropagation(), ct(!0);
12373
12373
  }, it = (W) => {
12374
- W.preventDefault(), W.stopPropagation(), dt(!1);
12374
+ W.preventDefault(), W.stopPropagation(), ct(!1);
12375
12375
  }, ot = (W) => {
12376
- W.preventDefault(), W.stopPropagation(), dt(!1), W.dataTransfer.files && ie((Ce) => [...Ce, ...Array.from(W.dataTransfer.files)]);
12377
- }, ft = (W) => W.type.startsWith("image/") ? "image" : W.type === "application/pdf" ? "picture_as_pdf" : W.type.includes("spreadsheet") || W.type.includes("excel") ? "table_chart" : W.type.includes("document") || W.type.includes("word") ? "description" : "attach_file", Ut = (W) => {
12376
+ W.preventDefault(), W.stopPropagation(), ct(!1), W.dataTransfer.files && ie((Ce) => [...Ce, ...Array.from(W.dataTransfer.files)]);
12377
+ }, dt = (W) => W.type.startsWith("image/") ? "image" : W.type === "application/pdf" ? "picture_as_pdf" : W.type.includes("spreadsheet") || W.type.includes("excel") ? "table_chart" : W.type.includes("document") || W.type.includes("word") ? "description" : "attach_file", Ut = (W) => {
12378
12378
  ie((Ce) => Ce.filter((Xe, q) => q !== W));
12379
12379
  }, Wt = (W) => W < 1024 ? `${W} B` : W < 1024 * 1024 ? `${(W / 1024).toFixed(1)} KB` : `${(W / (1024 * 1024)).toFixed(1)} MB`, Dt = async () => {
12380
12380
  if (!_.trim()) {
@@ -12414,7 +12414,7 @@ function Sf({
12414
12414
  } finally {
12415
12415
  _e(!1);
12416
12416
  }
12417
- }, ht = {
12417
+ }, ft = {
12418
12418
  width: "100%",
12419
12419
  padding: "8px 12px",
12420
12420
  fontSize: "14px",
@@ -12423,7 +12423,7 @@ function Sf({
12423
12423
  background: v.inputBackground,
12424
12424
  color: v.text,
12425
12425
  outline: "none"
12426
- }, lt = {
12426
+ }, ht = {
12427
12427
  display: "block",
12428
12428
  fontSize: "12px",
12429
12429
  fontWeight: 500,
@@ -12452,6 +12452,7 @@ function Sf({
12452
12452
  display: "flex",
12453
12453
  flexDirection: "column",
12454
12454
  gap: "16px",
12455
+ padding: "16px",
12455
12456
  background: v.background
12456
12457
  },
12457
12458
  children: [
@@ -12470,7 +12471,7 @@ function Sf({
12470
12471
  }
12471
12472
  ),
12472
12473
  /* @__PURE__ */ p.jsxs("div", { children: [
12473
- /* @__PURE__ */ p.jsx("label", { style: lt, children: "To" }),
12474
+ /* @__PURE__ */ p.jsx("label", { style: ht, children: "To" }),
12474
12475
  /* @__PURE__ */ p.jsx(
12475
12476
  "input",
12476
12477
  {
@@ -12479,7 +12480,7 @@ function Sf({
12479
12480
  onChange: (W) => D(W.target.value),
12480
12481
  placeholder: "recipient@example.com",
12481
12482
  disabled: d || oe,
12482
- style: ht
12483
+ style: ft
12483
12484
  }
12484
12485
  )
12485
12486
  ] }),
@@ -12503,7 +12504,7 @@ function Sf({
12503
12504
  ),
12504
12505
  Se && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
12505
12506
  /* @__PURE__ */ p.jsxs("div", { children: [
12506
- /* @__PURE__ */ p.jsx("label", { style: lt, children: "CC" }),
12507
+ /* @__PURE__ */ p.jsx("label", { style: ht, children: "CC" }),
12507
12508
  /* @__PURE__ */ p.jsx(
12508
12509
  "input",
12509
12510
  {
@@ -12512,12 +12513,12 @@ function Sf({
12512
12513
  onChange: (W) => M(W.target.value),
12513
12514
  placeholder: "cc@example.com",
12514
12515
  disabled: d || oe,
12515
- style: ht
12516
+ style: ft
12516
12517
  }
12517
12518
  )
12518
12519
  ] }),
12519
12520
  /* @__PURE__ */ p.jsxs("div", { children: [
12520
- /* @__PURE__ */ p.jsx("label", { style: lt, children: "BCC" }),
12521
+ /* @__PURE__ */ p.jsx("label", { style: ht, children: "BCC" }),
12521
12522
  /* @__PURE__ */ p.jsx(
12522
12523
  "input",
12523
12524
  {
@@ -12526,13 +12527,13 @@ function Sf({
12526
12527
  onChange: (W) => F(W.target.value),
12527
12528
  placeholder: "bcc@example.com",
12528
12529
  disabled: d || oe,
12529
- style: ht
12530
+ style: ft
12530
12531
  }
12531
12532
  )
12532
12533
  ] })
12533
12534
  ] }),
12534
12535
  /* @__PURE__ */ p.jsxs("div", { children: [
12535
- /* @__PURE__ */ p.jsx("label", { style: lt, children: "Subject" }),
12536
+ /* @__PURE__ */ p.jsx("label", { style: ht, children: "Subject" }),
12536
12537
  /* @__PURE__ */ p.jsx(
12537
12538
  "input",
12538
12539
  {
@@ -12541,34 +12542,31 @@ function Sf({
12541
12542
  onChange: (W) => j(W.target.value),
12542
12543
  placeholder: "Email subject",
12543
12544
  disabled: d || oe,
12544
- style: ht
12545
+ style: ft
12545
12546
  }
12546
12547
  )
12547
12548
  ] }),
12548
- /* @__PURE__ */ p.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: [
12549
- /* @__PURE__ */ p.jsx("label", { style: lt, children: "Message" }),
12550
- /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ p.jsx(
12551
- af,
12552
- {
12553
- value: R,
12554
- onChange: ze,
12555
- placeholder: h,
12556
- replyTo: n,
12557
- theme: v,
12558
- disabled: d || oe,
12559
- minHeight: m,
12560
- externalUpdate: ke ? l : void 0,
12561
- insertText: a,
12562
- insertTextTrigger: u,
12563
- onAiRestructure: x,
12564
- onAiProofread: A,
12565
- onAiRewrite: w,
12566
- renderAboveToolbar: E
12567
- }
12568
- ) })
12569
- ] }),
12549
+ /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ p.jsx(
12550
+ af,
12551
+ {
12552
+ value: R,
12553
+ onChange: ze,
12554
+ placeholder: h,
12555
+ replyTo: n,
12556
+ theme: v,
12557
+ disabled: d || oe,
12558
+ minHeight: m,
12559
+ externalUpdate: ke ? l : void 0,
12560
+ insertText: a,
12561
+ insertTextTrigger: u,
12562
+ onAiRestructure: x,
12563
+ onAiProofread: A,
12564
+ onAiRewrite: w,
12565
+ renderAboveToolbar: E
12566
+ }
12567
+ ) }) }),
12570
12568
  /* @__PURE__ */ p.jsxs("div", { children: [
12571
- /* @__PURE__ */ p.jsx("label", { style: { ...lt, marginBottom: "8px" }, children: "Attachments" }),
12569
+ /* @__PURE__ */ p.jsx("label", { style: { ...ht, marginBottom: "8px" }, children: "Attachments" }),
12572
12570
  /* @__PURE__ */ p.jsx(
12573
12571
  "input",
12574
12572
  {
@@ -12623,7 +12621,7 @@ function Sf({
12623
12621
  borderRadius: "8px"
12624
12622
  },
12625
12623
  children: [
12626
- /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: v.textSecondary }, children: ft(W) }),
12624
+ /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: v.textSecondary }, children: dt(W) }),
12627
12625
  /* @__PURE__ */ p.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
12628
12626
  /* @__PURE__ */ p.jsx("div", { style: { fontSize: "14px", fontWeight: 500, color: v.text, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: W.name }),
12629
12627
  /* @__PURE__ */ p.jsx("div", { style: { fontSize: "12px", color: v.textSecondary }, children: Wt(W.size) })
@@ -13321,7 +13319,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13321
13319
  ne.setInt16(Fe, Ue, !0), Fe += 2;
13322
13320
  }
13323
13321
  return new Blob([ae], { type: "audio/wav" });
13324
- }, dt = async (q, T, X, J) => {
13322
+ }, ct = async (q, T, X, J) => {
13325
13323
  const S = new AudioContext(), I = q.sampleRate, K = Math.max(q.numberOfChannels, T.numberOfChannels), Q = Math.min(X, q.length), ee = Math.max(0, q.length - X), ae = J === "insert" ? Q + T.length + ee : Q + T.length, ne = S.createBuffer(K, ae, I);
13326
13324
  for (let te = 0; te < K; te++) {
13327
13325
  const Ae = ne.getChannelData(te), Fe = te < q.numberOfChannels ? q.getChannelData(te) : q.getChannelData(0);
@@ -13354,18 +13352,18 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13354
13352
  if (I.length > 0)
13355
13353
  if (l === "recording")
13356
13354
  for (let Ue = 0; Ue < I.length; Ue++) {
13357
- const at = I.length - 1 - Ue, Et = ye - at * 4;
13355
+ const lt = I.length - 1 - Ue, Et = ye - lt * 4;
13358
13356
  if (Et < -3 || Et > J) continue;
13359
13357
  const pt = I[Ue] * (S / 2 - 12), Pt = S / 2 - pt;
13360
13358
  T.fillStyle = "#10b981", T.fillRect(Et, Pt, 3, pt * 2);
13361
13359
  }
13362
13360
  else {
13363
13361
  const Ue = K > 0 ? Q / K * I.length : 0;
13364
- for (let at = 0; at < I.length; at++) {
13365
- const Et = Ue - at, pt = ye - Et * 4;
13362
+ for (let lt = 0; lt < I.length; lt++) {
13363
+ const Et = Ue - lt, pt = ye - Et * 4;
13366
13364
  if (pt < -3 || pt > J) continue;
13367
- const Pt = I[at] * (S / 2 - 12), yr = S / 2 - Pt;
13368
- T.fillStyle = at <= Ue ? "#10b981" : "#4b5563", T.fillRect(pt, yr, 3, Pt * 2);
13365
+ const Pt = I[lt] * (S / 2 - 12), yr = S / 2 - Pt;
13366
+ T.fillStyle = lt <= Ue ? "#10b981" : "#4b5563", T.fillRect(pt, yr, 3, Pt * 2);
13369
13367
  }
13370
13368
  }
13371
13369
  T.strokeStyle = "#ef4444", T.lineWidth = 1, T.beginPath(), T.moveTo(ye, 0), T.lineTo(ye, S), T.stroke(), T.fillStyle = "#fff", T.font = "bold 18px monospace", T.textAlign = "center", T.fillText(ze(Q), ye, S - 6), l === "recording" && (T.fillStyle = "#ef4444", T.beginPath(), T.arc(20, 20, 8, 0, Math.PI * 2), T.fill(), T.fillStyle = "#fff", T.font = "10px sans-serif", T.textAlign = "left", T.fillText("REC", 34, 24)), T.textAlign = "left";
@@ -13403,7 +13401,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13403
13401
  let K, Q;
13404
13402
  if (oe.current !== null && _e.current)
13405
13403
  try {
13406
- const ne = await ge(I), te = _e.current.sampleRate, Ae = Math.floor(oe.current * te), Fe = await dt(
13404
+ const ne = await ge(I), te = _e.current.sampleRate, Ae = Math.floor(oe.current * te), Fe = await ct(
13407
13405
  _e.current,
13408
13406
  ne,
13409
13407
  Ae,
@@ -13436,7 +13434,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13436
13434
  }
13437
13435
  }, ot = () => {
13438
13436
  de.current = !1, w(!1), v(null), j.current && (cancelAnimationFrame(j.current), j.current = null), L.current && (clearInterval(L.current), L.current = null), D.current && D.current.state !== "inactive" && D.current.stop();
13439
- }, ft = (q) => {
13437
+ }, dt = (q) => {
13440
13438
  const T = _.current;
13441
13439
  if (!T) return;
13442
13440
  const X = d || u;
@@ -13454,7 +13452,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13454
13452
  const q = R.current;
13455
13453
  q && (h ? (q.pause(), y(q.currentTime), g(!1)) : (q.currentTime = m, q.play().catch(() => {
13456
13454
  }), g(!0)));
13457
- }, ht = async (q) => {
13455
+ }, ft = async (q) => {
13458
13456
  if (!Y.current) {
13459
13457
  it();
13460
13458
  return;
@@ -13468,7 +13466,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13468
13466
  } catch {
13469
13467
  x("Failed to prepare recording. Please try again.");
13470
13468
  }
13471
- }, lt = () => {
13469
+ }, ht = () => {
13472
13470
  R.current && (R.current.pause(), R.current = null), Y.current = null, _e.current = null, oe.current = null, pe.current = [], g(!1), y(0), f(0), c(0), it();
13473
13471
  }, At = () => {
13474
13472
  Y.current ? r(Y.current, d || u) : alert("No audio recorded yet!");
@@ -13526,12 +13524,12 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13526
13524
  fe.addColorStop(0, Ae), fe.addColorStop(1, "transparent"), S.fillStyle = fe, S.fillRect(0, 0, te, Q);
13527
13525
  const qe = S.createLinearGradient(K - te, 0, K, 0);
13528
13526
  qe.addColorStop(0, "transparent"), qe.addColorStop(1, Ae), S.fillStyle = qe, S.fillRect(K - te, 0, te, Q), S.strokeStyle = "#5a6b62", S.lineWidth = 1, S.beginPath(), S.moveTo(0, Q / 2), S.lineTo(K, Q / 2), S.stroke();
13529
- const Ue = K / 2, at = 3, Et = 4, pt = ae > 0 ? ne / ae * ee.length : 0;
13527
+ const Ue = K / 2, lt = 3, Et = 4, pt = ae > 0 ? ne / ae * ee.length : 0;
13530
13528
  for (let tr = 0; tr < ee.length; tr++) {
13531
13529
  const ws = pt - tr, xr = Ue - ws * Et;
13532
- if (xr < -at || xr > K) continue;
13530
+ if (xr < -lt || xr > K) continue;
13533
13531
  const Mr = ee[tr] * (Q / 2 - 12), Cs = Q / 2 - Mr;
13534
- S.fillStyle = tr <= pt ? "#10b981" : "#4b5563", S.fillRect(xr, Cs, at, Mr * 2);
13532
+ S.fillStyle = tr <= pt ? "#10b981" : "#4b5563", S.fillRect(xr, Cs, lt, Mr * 2);
13535
13533
  }
13536
13534
  S.strokeStyle = "#ef4444", S.lineWidth = 1, S.beginPath(), S.moveTo(Ue, 0), S.lineTo(Ue, Q), S.stroke(), S.fillStyle = "#fff", S.font = "bold 18px monospace", S.textAlign = "center";
13537
13535
  const Pt = Math.floor(ne / 60), yr = Math.floor(ne % 60);
@@ -13584,7 +13582,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13584
13582
  if (l === "editing") {
13585
13583
  Oe.current = !0, we.current = q.clientX, Ge.current = m;
13586
13584
  const T = (J) => {
13587
- Oe.current && ft(J.clientX);
13585
+ Oe.current && dt(J.clientX);
13588
13586
  }, X = () => {
13589
13587
  Oe.current = !1, window.removeEventListener("mousemove", T), window.removeEventListener("mouseup", X);
13590
13588
  };
@@ -13649,7 +13647,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13649
13647
  "button",
13650
13648
  {
13651
13649
  onClick: () => {
13652
- E === "insert" ? ot() : l === "idle" ? (v("insert"), it()) : l === "editing" && (v("insert"), ht("insert"));
13650
+ E === "insert" ? ot() : l === "idle" ? (v("insert"), it()) : l === "editing" && (v("insert"), ft("insert"));
13653
13651
  },
13654
13652
  disabled: l === "recording" && E !== "insert" || h,
13655
13653
  style: l === "recording" && E !== "insert" || h ? Ce : W,
@@ -13661,7 +13659,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13661
13659
  "button",
13662
13660
  {
13663
13661
  onClick: () => {
13664
- E === "mic" ? ot() : l === "idle" ? (v("mic"), it()) : l === "editing" && (v("mic"), ht("replace"));
13662
+ E === "mic" ? ot() : l === "idle" ? (v("mic"), it()) : l === "editing" && (v("mic"), ft("replace"));
13665
13663
  },
13666
13664
  disabled: l === "recording" && E !== "mic" || h,
13667
13665
  style: l === "recording" && E !== "mic" || h ? Ce : W,
@@ -13673,7 +13671,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
13673
13671
  "button",
13674
13672
  {
13675
13673
  onClick: () => {
13676
- E === "startover" ? ot() : l === "editing" && (v("startover"), lt());
13674
+ E === "startover" ? ot() : l === "editing" && (v("startover"), ht());
13677
13675
  },
13678
13676
  disabled: l === "idle" || l === "recording" && E !== "startover" || h,
13679
13677
  style: l === "idle" || l === "recording" && E !== "startover" || h ? Ce : W,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwanyx/stack",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "description": "Modern HyperCard for React - All-in-one data management (REST + Graph API + Auth + Hooks + UI)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",