@glacislabs/stablegenie-zerodelta 4.14.1 → 4.15.0

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/mount.cjs CHANGED
@@ -579,6 +579,8 @@ var FAILED = /* @__PURE__ */ new Set(["cancelled", "fill_failed", "delivery_fail
579
579
  var ATTENTION = /* @__PURE__ */ new Set(["cancel_pending", "awaiting_claim"]);
580
580
  var TRACKING = Object.freeze({ phase: "tracking", status: "", steps: [] });
581
581
  var word = (v) => typeof v === "string" ? v.trim().toLowerCase() : "";
582
+ var STEP_ORDER = { submitted: 0, arrived: 1, filled: 2, delivered: 3 };
583
+ var STATUS_REACHED = { in_progress: 1, outbound_bridging: 2, delivery_failed: 2, delivered: 3 };
582
584
  function normalizeDelivery(raw2) {
583
585
  const row = raw2 && typeof raw2 === "object" && !Array.isArray(raw2) ? raw2.data ?? raw2 : null;
584
586
  if (!row || typeof row !== "object" || Array.isArray(row)) return TRACKING;
@@ -588,7 +590,9 @@ function normalizeDelivery(raw2) {
588
590
  const own = word(r.status);
589
591
  const status = journey || own;
590
592
  const rawSteps = Array.isArray(r.steps) ? r.steps : [];
591
- const steps = rawSteps.filter((s) => s && typeof s === "object" && typeof s.stepName === "string").sort((a, b) => Number(a.stepNumber ?? 0) - Number(b.stepNumber ?? 0)).slice(0, 8).map((s) => ({ name: String(s.stepName).slice(0, 32), done: s.stepStatus === "completed" }));
593
+ const listed = rawSteps.filter((s) => s && typeof s === "object" && typeof s.stepName === "string").sort((a, b) => Number(a.stepNumber ?? 0) - Number(b.stepNumber ?? 0)).slice(0, 8).map((s) => ({ name: String(s.stepName).slice(0, 32), done: s.stepStatus === "completed" }));
594
+ const reached = Math.max(STATUS_REACHED[own] ?? -1, ...listed.filter((s) => s.done).map((s) => STEP_ORDER[s.name] ?? -1));
595
+ const steps = listed.map((s) => (STEP_ORDER[s.name] ?? Infinity) <= reached ? { ...s, done: true } : s);
592
596
  if (!status) return TRACKING;
593
597
  if (FAILED.has(status)) return { phase: "failed", status, steps };
594
598
  if (ATTENTION.has(status)) return { phase: "attention", status, steps };
@@ -3544,7 +3548,7 @@ var CHANNEL_HEADER = "x-zd-channel";
3544
3548
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
3545
3549
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
3546
3550
  var WIDGET_CHANNEL = "widget";
3547
- var WIDGET_VERSION = "4.14.1" ;
3551
+ var WIDGET_VERSION = "4.15.0" ;
3548
3552
  var MAX_CHANNEL_VERSION_LEN = 32;
3549
3553
  function sanitizeVersion(raw2) {
3550
3554
  const v = String(raw2).trim();
@@ -6149,13 +6153,13 @@ img.sg-tok-badge{width:16px;padding:0;object-fit:cover;background:var(--sg-bg)}
6149
6153
  .sg-ws-back:hover{color:var(--sg-text)}
6150
6154
  .sg-ws-close{display:flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:#a7a9be;cursor:pointer}
6151
6155
  .sg-ws-close:hover{color:var(--sg-text)}
6152
- .sg-ws-back:focus-visible,.sg-ws-close:focus-visible,.sg-ws-icon-btn:focus-visible,.sg-ws-action:focus-visible,.sg-ws-sum:focus-visible,.sg-rcp-opt:focus-visible,.sg-rcp-custom:focus-visible,.sg-rcp-change:focus-visible{outline:2px solid var(--sg-accent);outline-offset:2px}
6156
+ .sg-ws-back:focus-visible,.sg-ws-close:focus-visible,.sg-ws-icon-btn:focus-visible,.sg-ws-action:focus-visible,.sg-ws-sum:focus-visible,.sg-rcp-opt:focus-visible,.sg-rcp-custom:focus-visible{outline:2px solid var(--sg-accent);outline-offset:2px}
6153
6157
  .sg-ws-main{display:flex;flex-direction:column;gap:16px}
6154
6158
  .sg-ws-title{margin:0;font-family:var(--sg-font-display);font-size:16px;font-weight:600;line-height:1.2;letter-spacing:.32px;color:var(--sg-t90)}
6155
6159
  .sg-ws[data-wide]{gap:16px}
6156
6160
  .sg-ws[data-wide] .sg-ws-sum-lead{min-width:0}
6157
6161
  .sg-ws[data-wide] .sg-ws-sum-text{overflow:hidden;text-overflow:ellipsis}
6158
- .sg-widget[data-sg-mode="dark"] :is(.sg-ws-action,.sg-rcp-custom,.sg-rcp-change,.sg-ws-icon-btn,.sg-rcp-tick){color:var(--sg-info)}
6162
+ .sg-widget[data-sg-mode="dark"] :is(.sg-ws-action,.sg-rcp-custom,.sg-rcp-value[data-tone="choose"],.sg-ws-icon-btn,.sg-rcp-tick){color:var(--sg-info)}
6159
6163
  .sg-ws[data-wide] .sg-ws-back{font-size:12px;font-weight:400}
6160
6164
  .sg-ws[data-wide] .sg-ws-title{font-family:var(--sg-font);font-size:18px;font-weight:500;letter-spacing:0}
6161
6165
  .sg-ws-list{display:flex;flex-direction:column;gap:4px}
@@ -6200,16 +6204,20 @@ button.sg-ws-sum{cursor:pointer}
6200
6204
  .sg-ws-foot{flex:0 0 auto}
6201
6205
  .sg-btn.sg-ws-cta{height:44px;min-height:44px;padding:0 24px}
6202
6206
  .sg-btn.sg-ws-cta:disabled{opacity:.2;cursor:not-allowed}
6203
- .sg-rcp-row{display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;width:100%;padding:12px 16px;border-radius:24px;background:var(--sg-a4);font-size:12px;line-height:1.2;white-space:nowrap}
6207
+ .sg-rcp-row{display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;width:100%;padding:12px 16px;border:0;border-radius:24px;background:var(--sg-a4);color:inherit;font:inherit;font-size:12px;line-height:1.2;text-align:left;white-space:nowrap}
6208
+ button.sg-rcp-row{cursor:pointer}
6209
+ button.sg-rcp-row:hover:not(:disabled){background:color-mix(in srgb,var(--sg-accent) 8%,transparent)}
6210
+ button.sg-rcp-row[data-wide]:hover:not(:disabled){background:var(--sg-a4)}
6211
+ button.sg-rcp-row:disabled{cursor:not-allowed;opacity:.6}
6212
+ button.sg-rcp-row:focus-visible{outline:2px solid var(--sg-accent);outline-offset:2px}
6204
6213
  .sg-rcp-row[data-wide]{background:transparent;border:1px solid var(--sg-a12);padding:12px 16px}
6205
6214
  .sg-rcp-row[data-tone="error"]{white-space:normal;color:var(--sg-danger);background:color-mix(in srgb,var(--sg-danger) 8%,transparent)}
6206
6215
  .sg-rcp-label{color:var(--sg-t60)}
6207
- .sg-rcp-end{display:inline-flex;align-items:center;gap:8px;min-width:0}
6208
- .sg-rcp-value{color:var(--sg-t90);overflow:hidden;text-overflow:ellipsis}
6209
- .sg-rcp-value[data-empty]{color:var(--sg-t50)}
6210
- .sg-rcp-change{padding:0;border:0;background:transparent;font:inherit;font-size:12px;font-weight:500;line-height:1.4;color:var(--sg-accent);cursor:pointer}
6211
- .sg-rcp-change:hover:not(:disabled){text-decoration:underline}
6212
- .sg-rcp-change:disabled{opacity:.5;cursor:not-allowed}
6216
+ .sg-rcp-end{display:inline-flex;align-items:center;gap:4px;min-width:0}
6217
+ .sg-rcp-end svg{flex:0 0 auto;color:var(--sg-t80)}
6218
+ .sg-rcp-value{color:var(--sg-t90);font-weight:500;overflow:hidden;text-overflow:ellipsis}
6219
+ .sg-rcp-value[data-tone="choose"]{color:var(--sg-accent)}
6220
+ .sg-rcp-value[data-empty]{color:var(--sg-t50);font-weight:400}
6213
6221
  .sg-rcp-opt{display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;width:100%;padding:18px 16px;border:1px solid var(--sg-a12);border-radius:24px;background:transparent;color:var(--sg-text);font:inherit;text-align:left;cursor:pointer}
6214
6222
  .sg-rcp-opt[data-selected]{border-color:transparent;background:var(--sg-a4)}
6215
6223
  .sg-rcp-opt:hover:not(:disabled):not([data-selected]){border-color:color-mix(in srgb,var(--sg-accent) 40%,transparent)}
@@ -6220,10 +6228,17 @@ button.sg-ws-sum{cursor:pointer}
6220
6228
  .sg-rcp-custom[data-open]{flex-direction:column;align-items:stretch;gap:8px;border-color:transparent;background:var(--sg-a4);cursor:default}
6221
6229
  .sg-rcp-custom-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
6222
6230
  .sg-rcp-custom-head label{cursor:text}
6223
- .sg-rcp-input{box-sizing:border-box;width:100%;padding:11px 16px;border:1px solid var(--sg-a12);border-radius:12px;background:var(--sg-bg);color:var(--sg-t90);font:inherit;font-size:12px;font-weight:400;line-height:1.2;outline:none;text-overflow:ellipsis}
6231
+ .sg-rcp-input{display:block;box-sizing:border-box;width:100%;margin:0;padding:11px 12px;border:1px solid var(--sg-a12);border-radius:12px;background:var(--sg-bg);color:var(--sg-t90);font:inherit;font-size:12px;font-weight:400;line-height:1.2;outline:none;resize:none;overflow:hidden;word-break:break-all;overflow-wrap:anywhere}
6224
6232
  .sg-rcp-input::placeholder{color:var(--sg-t50)}
6225
6233
  .sg-rcp-input:focus{border-color:var(--sg-accent)}
6226
- .sg-rcp-input[aria-invalid="true"]{border-color:var(--sg-danger)}
6234
+ .sg-rcp-input[aria-invalid="true"]{border-color:color-mix(in srgb,var(--sg-flag) 12%,transparent)}
6235
+ .sg-rcp-input[aria-invalid="true"]:focus{border-color:color-mix(in srgb,var(--sg-flag) 40%,transparent)}
6236
+ .sg-rcp-custom[data-invalid]{background:color-mix(in srgb,var(--sg-flag) 6%,transparent)}
6237
+ .sg-rcp-custom[data-invalid] .sg-rcp-custom-head label{color:var(--sg-t90)}
6238
+ .sg-rcp-custom[data-invalid] .sg-ws-error{font-size:11px;line-height:1.2;color:var(--sg-flag)}
6239
+ .sg-rcp-bad{display:flex;color:var(--sg-flag);opacity:.8;flex:0 0 auto}
6240
+ /* The wide card beside an open sheet draws its disabled CTA like the sheet's own (Figma 3155:50731, 20%). */
6241
+ .sg-duo .sg-cta-wrap .sg-btn:disabled{opacity:.2}
6227
6242
  .sg-rcp-hint{margin:0;font-size:12px;font-weight:400;line-height:1.2;color:var(--sg-t60)}
6228
6243
  .sg-widget[data-sg-takeover]{display:flex;flex-direction:column}
6229
6244
  .sg-widget[data-sg-takeover]>.sg-head,.sg-widget[data-sg-takeover]>.sg-foot{display:none}
@@ -8518,8 +8533,8 @@ function ShieldTickBold() {
8518
8533
  }
8519
8534
  ) });
8520
8535
  }
8521
- function CloseCircleBold() {
8522
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
8536
+ function CloseCircleBold({ size = 14 }) {
8537
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
8523
8538
  "path",
8524
8539
  {
8525
8540
  fill: "currentColor",
@@ -8608,9 +8623,7 @@ function SheetFrame(props) {
8608
8623
  }
8609
8624
  function WalletChip(props) {
8610
8625
  const count = props.addresses.length;
8611
- if (!count) {
8612
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "sg-wallet", onClick: props.onConnect, disabled: props.connecting, children: props.connecting ? "Connecting\u2026" : "Connect wallet" });
8613
- }
8626
+ if (!count) return null;
8614
8627
  const label2 = count === 1 ? chipShort(props.addresses[0]) : `${count} wallets`;
8615
8628
  return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", ref: props.btnRef, className: "sg-wallet", "data-connected": "true", onClick: props.onOpen, disabled: props.disabled, "aria-haspopup": "dialog", "aria-label": `Wallets: ${label2}`, children: [
8616
8629
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-wallet-dot", "aria-hidden": "true" }),
@@ -8685,19 +8698,44 @@ function RecipientRow({ state, disabled, wide }) {
8685
8698
  if (state.error) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-rcp-row", "data-wide": wide || void 0, "data-tone": "error", role: "alert", children: state.error });
8686
8699
  const address = state.shown;
8687
8700
  if (!address && !state.managed) return null;
8688
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-rcp-row", "data-wide": wide || void 0, children: [
8689
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-label", children: "Recipient" }),
8690
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-rcp-end", children: [
8691
- address ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-rcp-value", title: address, children: [
8692
- FAMILY_LABEL[state.recipientFamily],
8693
- " \xB7 ",
8694
- chipShort(address)
8695
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-value", "data-empty": "true", children: "Not set" }),
8696
- state.managed ? /* @__PURE__ */ jsxRuntime.jsx("button", { ref: state.triggerRef, type: "button", className: "sg-rcp-change", onClick: state.show, disabled, "aria-haspopup": "dialog", children: address ? "Change" : "Add" }) : null
8697
- ] })
8698
- ] });
8701
+ const value = address ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-rcp-value", title: address, children: [
8702
+ FAMILY_LABEL[state.recipientFamily],
8703
+ " \xB7 ",
8704
+ chipShort(address)
8705
+ ] }) : state.missing ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-value", "data-tone": "choose", children: "Choose" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-value", "data-empty": "true", children: "--" });
8706
+ if (!state.managed) {
8707
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-rcp-row", "data-wide": wide || void 0, children: [
8708
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-label", children: "Recipient" }),
8709
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-end", children: value })
8710
+ ] });
8711
+ }
8712
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8713
+ "button",
8714
+ {
8715
+ ref: state.triggerRef,
8716
+ type: "button",
8717
+ className: "sg-rcp-row",
8718
+ "data-wide": wide || void 0,
8719
+ onClick: state.show,
8720
+ disabled,
8721
+ "aria-haspopup": "dialog",
8722
+ "aria-label": address ? `Recipient: ${FAMILY_LABEL[state.recipientFamily]} ${chipShort(address)}. Change recipient` : "Choose recipient",
8723
+ children: [
8724
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-label", children: "Recipient" }),
8725
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-rcp-end", children: [
8726
+ value,
8727
+ /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, {})
8728
+ ] })
8729
+ ]
8730
+ }
8731
+ );
8699
8732
  }
8700
- function RecipientSheet({ state, wide, minHeight }) {
8733
+ function RecipientSheet({
8734
+ state,
8735
+ wide,
8736
+ minHeight,
8737
+ onPending
8738
+ }) {
8701
8739
  const family = state.recipientFamily;
8702
8740
  const label2 = FAMILY_LABEL[family];
8703
8741
  const eligible = state.wallets.filter((w) => w.eligible);
@@ -8707,7 +8745,6 @@ function RecipientSheet({ state, wide, minHeight }) {
8707
8745
  return current ? { kind: "wallet", address: current.address } : { kind: "custom" };
8708
8746
  });
8709
8747
  const [draft, setDraft] = react.useState(state.typed);
8710
- const [editing, setEditing] = react.useState(false);
8711
8748
  const id = react.useId();
8712
8749
  const inputRef = react.useRef(null);
8713
8750
  const noWallet = family === "solana" && !state.familyWallet.address && !state.familyWallet.wallets.length;
@@ -8719,6 +8756,30 @@ function RecipientSheet({ state, wide, minHeight }) {
8719
8756
  const chosenWallet = choice.kind === "wallet" ? eligible.find((w) => w.address === choice.address) : void 0;
8720
8757
  const ready = choice.kind === "wallet" ? Boolean(chosenWallet) : valid;
8721
8758
  const custom = choice.kind === "custom";
8759
+ const appliedWallet = state.typed ? null : state.recipient ?? state.shown ?? null;
8760
+ const pending = choice.kind === "custom" ? !state.typed || draft.trim() !== state.typed : choice.address !== appliedWallet;
8761
+ const pendingRef = react.useRef(onPending);
8762
+ pendingRef.current = onPending;
8763
+ react.useEffect(() => pendingRef.current?.(pending), [pending]);
8764
+ react.useEffect(() => () => pendingRef.current?.(false), []);
8765
+ react.useLayoutEffect(() => {
8766
+ const el = inputRef.current;
8767
+ if (!el) return;
8768
+ const fit = () => {
8769
+ el.style.height = "auto";
8770
+ el.style.height = `${el.scrollHeight + (el.offsetHeight - el.clientHeight)}px`;
8771
+ };
8772
+ fit();
8773
+ if (typeof ResizeObserver === "undefined") return;
8774
+ let width = el.clientWidth;
8775
+ const observer = new ResizeObserver(() => {
8776
+ if (el.clientWidth === width) return;
8777
+ width = el.clientWidth;
8778
+ fit();
8779
+ });
8780
+ observer.observe(el);
8781
+ return () => observer.disconnect();
8782
+ }, [draft, custom, wide]);
8722
8783
  react.useEffect(() => {
8723
8784
  if (custom) inputRef.current?.focus();
8724
8785
  }, [custom]);
@@ -8775,33 +8836,35 @@ function RecipientSheet({ state, wide, minHeight }) {
8775
8836
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: wallet.name }),
8776
8837
  /* @__PURE__ */ jsxRuntime.jsx(AddCircle, {})
8777
8838
  ] }, wallet.name)) : null,
8778
- custom ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-rcp-custom", "data-open": "true", children: [
8839
+ custom ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-rcp-custom", "data-open": "true", "data-invalid": invalid || void 0, children: [
8779
8840
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-rcp-custom-head", children: [
8780
8841
  /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, children: "Add another address" }),
8781
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-tick", children: /* @__PURE__ */ jsxRuntime.jsx(Tick2, {}) })
8842
+ invalid ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-bad", children: /* @__PURE__ */ jsxRuntime.jsx(CloseCircleBold, { size: 16 }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-rcp-tick", children: /* @__PURE__ */ jsxRuntime.jsx(Tick2, {}) })
8782
8843
  ] }),
8783
8844
  /* @__PURE__ */ jsxRuntime.jsx(
8784
- "input",
8845
+ "textarea",
8785
8846
  {
8786
8847
  ref: inputRef,
8848
+ rows: 1,
8787
8849
  id,
8788
8850
  className: "sg-rcp-input",
8789
8851
  placeholder: family === "solana" ? "Solana recipient address" : "0x...Recipient address",
8790
8852
  "aria-label": `${label2} recipient address`,
8791
8853
  "aria-invalid": invalid || void 0,
8792
8854
  "aria-describedby": invalid ? `${id}-error` : void 0,
8793
- value: editing || draft.length <= 34 ? draft : `${draft.slice(0, 13)}..${draft.slice(-15)}`,
8794
- onFocus: () => setEditing(true),
8795
- onBlur: () => setEditing(false),
8796
- onChange: (event) => setDraft(event.target.value),
8855
+ value: draft,
8856
+ onChange: (event) => setDraft(event.target.value.replace(/\s+/g, "")),
8797
8857
  onKeyDown: (event) => {
8798
- if (event.key === "Enter") confirm();
8858
+ if (event.key === "Enter") {
8859
+ event.preventDefault();
8860
+ confirm();
8861
+ }
8799
8862
  },
8800
8863
  spellCheck: false,
8801
8864
  autoComplete: "off"
8802
8865
  }
8803
8866
  ),
8804
- invalid ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-error`, className: "sg-ws-error", children: shapeOk && !checksumOk ? "Checksum does not match. Check the address for a typo." : `Not a valid ${label2} address.` }) : null,
8867
+ invalid ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-error`, className: "sg-ws-error", children: shapeOk && !checksumOk ? "Checksum does not match. Check the address for a typo." : `Enter a valid ${label2} address` }) : null,
8805
8868
  noWallet ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "sg-rcp-hint", children: [
8806
8869
  "No ",
8807
8870
  label2,
@@ -10952,6 +11015,8 @@ function ExchangeCard(props) {
10952
11015
  const title = config.title || (mode === "onramp" ? "Buy stablecoins" : mode === "offramp" ? "Cash out" : "Exchange");
10953
11016
  const soonLabel = mode === "onramp" ? "On-ramp coming soon" : "Off-ramp coming soon";
10954
11017
  const quotePaused = solActive ? false : addressed ? flow.quotePaused : idle2 && preview.status === "ready";
11018
+ const [recipientPending, setRecipientPending] = react.useState(false);
11019
+ const recipientLocked = wide && recipientState.open && recipientPending;
10955
11020
  const ctaLabel = rampMode ? soonLabel : submitting ? "Exchanging\u2026" : connected2 && flow.quoteStale ? flow.quotePaused ? "Refresh quote" : "Refreshing quote\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall || "Exchange";
10956
11021
  const selected = addressed ? flow.selected : null;
10957
11022
  const hasQuote = Boolean(quotable && !quoting && !quoteError && receive);
@@ -10985,8 +11050,6 @@ function ExchangeCard(props) {
10985
11050
  WalletChip,
10986
11051
  {
10987
11052
  addresses: sheetWallets.map((w) => w.address),
10988
- connecting: wallet.connecting,
10989
- onConnect: wallet.connect,
10990
11053
  btnRef: walletChipRef,
10991
11054
  disabled: submitting,
10992
11055
  onOpen: () => {
@@ -11055,7 +11118,7 @@ function ExchangeCard(props) {
11055
11118
  connect: !wallet.account ? { family: "evm", onClick: () => void wallet.connect(), busy: wallet.connecting } : !solanaWallet.address ? { family: "solana", onClick: (name) => void solanaWallet.connect(name), busy: solanaWallet.status === "connecting", choices: solanaWallet.wallets.map((w) => w.name) } : void 0,
11056
11119
  error: solanaWallet.error || wallet.error
11057
11120
  }
11058
- ) : recipientState.open ? /* @__PURE__ */ jsxRuntime.jsx(RecipientSheet, { state: recipientState, wide }) : sheet === "compliance" ? /* @__PURE__ */ jsxRuntime.jsx(ComplianceSheet, { compliance, direct: selected?.state === "DIRECT", hasQuote: complianceHasQuote, onClose: closeSheet }) : sheet === "quote" && hasQuote ? /* @__PURE__ */ jsxRuntime.jsx(
11121
+ ) : recipientState.open ? /* @__PURE__ */ jsxRuntime.jsx(RecipientSheet, { state: recipientState, wide, onPending: wide ? setRecipientPending : void 0 }) : sheet === "compliance" ? /* @__PURE__ */ jsxRuntime.jsx(ComplianceSheet, { compliance, direct: selected?.state === "DIRECT", hasQuote: complianceHasQuote, onClose: closeSheet }) : sheet === "quote" && hasQuote ? /* @__PURE__ */ jsxRuntime.jsx(
11059
11122
  QuoteSheet,
11060
11123
  {
11061
11124
  onClose: closeSheet,
@@ -11092,7 +11155,7 @@ function ExchangeCard(props) {
11092
11155
  {
11093
11156
  onClick: solFlow.run,
11094
11157
  busy: submitting,
11095
- disabled: !quotable || !cryptoReady || !!recipientState.error || !solFlow.plan || solFlow.insufficient || solFlow.solShort || solFlow.status === "quoting",
11158
+ disabled: recipientLocked || !quotable || !cryptoReady || !!recipientState.error || !solFlow.plan || solFlow.insufficient || solFlow.solShort || solFlow.status === "quoting",
11096
11159
  children: solFlow.status === "preparing" ? "Preparing order\u2026" : solFlow.status === "submitting" ? "Submitting\u2026" : solFlow.insufficient ? "Insufficient balance" : solFlow.solShort ? "Not enough SOL for network fees" : solFlow.status === "failed" ? "Try again" : !solFlow.plan ? "Exchange" : solFlow.needsPreparation ? "Continue in wallet" : "Submit"
11097
11160
  }
11098
11161
  );
@@ -11186,7 +11249,7 @@ function ExchangeCard(props) {
11186
11249
  "Connect ",
11187
11250
  recipientState.recipientFamily === "solana" ? "Solana" : "EVM",
11188
11251
  " wallet"
11189
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: rampMode ? void 0 : flow.submit, busy: submitting, disabled: needsRecipient || rampMode || !quotable || !cryptoReady || connected2 && (!flow.selected || flow.insufficient || !!flow.nativeShortfall || flow.status === "loading"), children: ctaLabel }),
11252
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: rampMode ? void 0 : flow.submit, busy: submitting, disabled: needsRecipient || recipientLocked || rampMode || !quotable || !cryptoReady || connected2 && (!flow.selected || flow.insufficient || !!flow.nativeShortfall || flow.status === "loading"), children: ctaLabel }),
11190
11253
  wallet.error ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: wallet.error }) : null
11191
11254
  ] });
11192
11255
  const notices = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -11207,7 +11270,7 @@ function ExchangeCard(props) {
11207
11270
  ] }),
11208
11271
  amountField,
11209
11272
  amountNoteEl,
11210
- /* @__PURE__ */ jsxRuntime.jsx(PaneFoot, { usd: mode === "onramp" ? null : fromUsd, balance: mode !== "onramp" && fromBal ? shortBalance(fromBal.formatted) : null })
11273
+ /* @__PURE__ */ jsxRuntime.jsx(PaneFoot, { usd: mode === "onramp" ? null : fromUsd, balance: mode === "onramp" ? null : fromBal ? shortBalance(fromBal.formatted) : connected2 ? null : "--" })
11211
11274
  ] })
11212
11275
  ] }),
11213
11276
  notices,
@@ -11225,7 +11288,7 @@ function ExchangeCard(props) {
11225
11288
  payToken
11226
11289
  ] }),
11227
11290
  amountNoteEl,
11228
- /* @__PURE__ */ jsxRuntime.jsx(PaneFoot, { usd: mode === "onramp" ? null : fromUsd, balance: mode !== "onramp" && fromBal ? shortBalance(fromBal.formatted) : null })
11291
+ /* @__PURE__ */ jsxRuntime.jsx(PaneFoot, { usd: mode === "onramp" ? null : fromUsd, balance: mode === "onramp" ? null : fromBal ? shortBalance(fromBal.formatted) : connected2 ? null : "--" })
11229
11292
  ] }),
11230
11293
  /* @__PURE__ */ jsxRuntime.jsx(FlipButton, { onClick: flip, disabled: !flippable }),
11231
11294
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-pane", "data-kind": "receive", children: [
package/dist/mount.js CHANGED
@@ -1,2 +1,2 @@
1
- export { mount } from './chunk-B74WAUBW.js';
2
- import './chunk-43VO6XXW.js';
1
+ export { mount } from './chunk-3U5Z5CC3.js';
2
+ import './chunk-GWQKWJJA.js';