@yieldfabric/wallet 0.2.1 → 0.2.2

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.cjs CHANGED
@@ -5353,7 +5353,7 @@ var init_SignupFlow = __esm({
5353
5353
  };
5354
5354
  AvererSidebar = ({ onError }) => {
5355
5355
  const navigate = useWalletNavigate();
5356
- return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 py-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light", children: [
5356
+ return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 pt-[calc(1.25rem+env(safe-area-inset-top))] pb-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light", children: [
5357
5357
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 md:gap-10", children: [
5358
5358
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(YieldFabricLockup, { size: 32 }) }),
5359
5359
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:block space-y-3 max-w-[260px]", children: [
@@ -5962,7 +5962,7 @@ function clearDynamicSession() {
5962
5962
  init_WalletConfigContext();
5963
5963
  var WalletAuthContext = React54.createContext(void 0);
5964
5964
  function WalletAuthProvider({ children }) {
5965
- const { onSessionBootstrapped } = useWalletConfig();
5965
+ const { onSessionBootstrapped, onBeforeLogout } = useWalletConfig();
5966
5966
  const [user, setUser] = React54.useState(null);
5967
5967
  const [isLoading, setIsLoading] = React54.useState(true);
5968
5968
  const [error, setError] = React54.useState(null);
@@ -6055,6 +6055,7 @@ function WalletAuthProvider({ children }) {
6055
6055
  setIsLoading(true);
6056
6056
  setError(null);
6057
6057
  tokenRenewalService.stopRenewal();
6058
+ await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
6058
6059
  await exports.authService.logout();
6059
6060
  clearDynamicSession();
6060
6061
  setUser(null);
@@ -6070,6 +6071,7 @@ function WalletAuthProvider({ children }) {
6070
6071
  setIsLoading(true);
6071
6072
  setError(null);
6072
6073
  tokenRenewalService.stopRenewal();
6074
+ await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
6073
6075
  await exports.authService.logoutAll();
6074
6076
  clearDynamicSession();
6075
6077
  setUser(null);
@@ -9317,11 +9319,11 @@ function humanizeMessageType(messageType) {
9317
9319
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
9318
9320
  }
9319
9321
  var TONE_COLORS = {
9320
- success: { dotClass: "bg-emerald-300", textClass: "text-emerald-300", bgClass: "bg-emerald-950/[0.16]" },
9321
- danger: { dotClass: "bg-red-300", textClass: "text-red-200", bgClass: "bg-red-950/[0.16]" },
9322
- warn: { dotClass: "bg-amber-300", textClass: "text-amber-200", bgClass: "bg-amber-950/[0.14]" },
9323
- info: { dotClass: "bg-blue-300", textClass: "text-blue-200", bgClass: "bg-blue-950/[0.14]" },
9324
- neutral: { dotClass: "bg-white/[0.34]", textClass: "text-white/[0.56]", bgClass: "bg-white/[0.045]" }
9322
+ success: { dotClass: "bg-emerald-300", textClass: "text-status-success-text dark:text-emerald-300", bgClass: "bg-status-success-bg dark:bg-emerald-950/[0.16]" },
9323
+ danger: { dotClass: "bg-red-300", textClass: "text-status-error-text dark:text-red-200", bgClass: "bg-status-error-bg dark:bg-red-950/[0.16]" },
9324
+ warn: { dotClass: "bg-amber-300", textClass: "text-status-warning-text dark:text-amber-200", bgClass: "bg-status-warning-bg dark:bg-amber-950/[0.14]" },
9325
+ info: { dotClass: "bg-blue-300", textClass: "text-azure dark:text-blue-200", bgClass: "bg-azure-tint dark:bg-blue-950/[0.14]" },
9326
+ neutral: { dotClass: "bg-text-muted dark:bg-white/[0.34]", textClass: "text-text-muted dark:text-white/[0.56]", bgClass: "bg-chip dark:bg-white/[0.045]" }
9325
9327
  };
9326
9328
  var STATUS_TO_TONE = {
9327
9329
  completed: "success",
@@ -10385,7 +10387,7 @@ function LoginPage({
10385
10387
  align = "center",
10386
10388
  logo
10387
10389
  }) {
10388
- const alignClass = align === "top" ? "items-start pt-12 pb-12" : "items-center";
10390
+ const alignClass = align === "top" ? "items-start pt-[calc(3rem+env(safe-area-inset-top))] pb-12" : "items-center pt-[env(safe-area-inset-top)]";
10389
10391
  return /* @__PURE__ */ jsxRuntime.jsx(
10390
10392
  "div",
10391
10393
  {
@@ -10524,7 +10526,7 @@ function OnboardingChoosePath({ chrome } = {}) {
10524
10526
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-[520px] text-center space-y-1.5", children: [
10525
10527
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[18px] text-text-primary font-medium", children: messages.choosePath.header }),
10526
10528
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-text-secondary", children: messages.choosePath.subheader }),
10527
- configError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
10529
+ configError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
10528
10530
  ] }),
10529
10531
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto w-full max-w-[480px] space-y-2.5", children: [
10530
10532
  avererEnabled && /* @__PURE__ */ jsxRuntime.jsx(
@@ -12273,7 +12275,7 @@ function OnboardingChooseMethod({ chrome } = {}) {
12273
12275
  return /* @__PURE__ */ jsxRuntime.jsx(StepShell, { chrome, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
12274
12276
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
12275
12277
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[16px] text-text-primary", children: messages.chooseMethod.header }),
12276
- configError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
12278
+ configError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
12277
12279
  ] }),
12278
12280
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
12279
12281
  enabled.map(({ id, impl }) => {
@@ -13066,7 +13068,7 @@ function SkeletonAvatar({
13066
13068
  {
13067
13069
  role: "img",
13068
13070
  "aria-label": choice ? `${name} - ${choice.label} avatar` : `${name}'s avatar`,
13069
- className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-[#252525] ${className}`,
13071
+ className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-surface-alt dark:bg-[#252525] ${className}`,
13070
13072
  style: {
13071
13073
  width: size,
13072
13074
  height: size
@@ -13119,7 +13121,7 @@ function AvatarPicker({
13119
13121
  onClick: () => onChange(c.id),
13120
13122
  className: [
13121
13123
  "rounded-full flex items-center justify-center select-none overflow-hidden",
13122
- "transition-all border-2 bg-[#252525]",
13124
+ "transition-all border-2 bg-surface-alt dark:bg-[#252525]",
13123
13125
  selected ? "border-primary scale-105" : "border-transparent hover:border-border-light"
13124
13126
  ].join(" "),
13125
13127
  style: { width: tileSize, height: tileSize },
@@ -15575,7 +15577,7 @@ var Drawer = ({
15575
15577
  role: "dialog",
15576
15578
  "aria-modal": "true",
15577
15579
  "aria-labelledby": titleId,
15578
- className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col ${widthClass} ${panelClassName}`,
15580
+ className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col pt-[env(safe-area-inset-top)] ${widthClass} ${panelClassName}`,
15579
15581
  style: { ...widthStyle, ...panelStyle },
15580
15582
  onClick: (e) => e.stopPropagation(),
15581
15583
  children: [
@@ -17986,7 +17988,7 @@ var OnboardingPolicySection = ({
17986
17988
  ]);
17987
17989
  if (hidden || loading || deployLoading || platformActive === null) return null;
17988
17990
  if (platformActive === "error") {
17989
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
17991
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
17990
17992
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
17991
17993
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: [
17992
17994
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Couldn't confirm whether this group is used as a platform." }),
@@ -18003,12 +18005,12 @@ var OnboardingPolicySection = ({
18003
18005
  ] });
18004
18006
  }
18005
18007
  if (!platformActive) {
18006
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
18008
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
18007
18009
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
18008
18010
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: "This group isn't used as a platform, so there are no signups to configure. Enable platform sponsorship first \u2014 then choose the sign-in methods and identity checks its users go through." })
18009
18011
  ] });
18010
18012
  }
18011
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
18013
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
18012
18014
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
18013
18015
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }),
18014
18016
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-text-muted", children: "The path people take from first visit to transacting on this platform." })
@@ -18793,7 +18795,7 @@ function DecodedCalldata({
18793
18795
  }
18794
18796
  const kindColor = {
18795
18797
  zero: "text-text-muted",
18796
- address: "text-blue-300/[0.90]",
18798
+ address: "text-azure dark:text-blue-300/[0.90]",
18797
18799
  uint: "text-text-primary",
18798
18800
  bytes32: "text-text-secondary"
18799
18801
  };
@@ -19784,14 +19786,14 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19784
19786
  type: "button",
19785
19787
  onClick: handleCancelMessage,
19786
19788
  disabled: cancelling,
19787
- className: "px-3 py-2 text-[13px] text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
19789
+ className: "px-3 py-2 text-[13px] text-status-error-text dark:text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
19788
19790
  children: cancelling ? "Cancelling\u2026" : "Cancel message"
19789
19791
  }
19790
19792
  ) : void 0,
19791
19793
  children: [
19792
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] font-medium text-red-100 mb-1", children: "Couldn't load transaction" }),
19794
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] font-medium text-status-error-text dark:text-red-100 mb-1", children: "Couldn't load transaction" }),
19793
19795
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-text-secondary max-w-sm", children: error }),
19794
- cancelError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-red-200 mt-3", children: cancelError })
19796
+ cancelError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 mt-3", children: cancelError })
19795
19797
  ]
19796
19798
  }
19797
19799
  );
@@ -19806,7 +19808,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19806
19808
  })();
19807
19809
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col h-full text-text-primary", children: [
19808
19810
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 px-4 py-4", children: [
19809
- reviewWarning && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-lg border border-amber-300/[0.22] bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-amber-100", children: reviewWarning }),
19811
+ reviewWarning && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-lg border border-status-warning-line dark:border-amber-300/[0.22] bg-status-warning-bg dark:bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-status-warning-text dark:text-amber-100", children: reviewWarning }),
19810
19812
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-text-secondary leading-5", children: mode === "inspect" ? "Review action details and execution outcome." : "Review the action, choose a signing key, and confirm." }),
19811
19813
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full rounded-[22px] border border-border-light bg-raised p-1 text-[12px] shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: ["simple", "advanced"].map((mode2) => /* @__PURE__ */ jsxRuntime.jsx(
19812
19814
  "button",
@@ -19995,7 +19997,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19995
19997
  ] })
19996
19998
  }
19997
19999
  ),
19998
- selector && !methodName && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-lg border border-red-300/[0.18] bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
20000
+ selector && !methodName && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "rounded-lg border border-status-error-line dark:border-red-300/[0.18] bg-status-error-bg dark:bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
19999
20001
  !dataEmpty && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[12px]", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
20000
20002
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
20001
20003
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-muted", children: "Calldata" }),
@@ -20054,7 +20056,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
20054
20056
  ] })
20055
20057
  ] }) }),
20056
20058
  mode === "sign" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-surface-alt", children: [
20057
- keysLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
20059
+ keysLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
20058
20060
  /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Sign with" }),
20059
20061
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "max-h-40 overflow-y-auto divide-y divide-border-light", children: availableKeys.map((key) => {
20060
20062
  const isSelected = selectedKey?.id === key.id;
@@ -20099,7 +20101,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
20099
20101
  walletLabel(walletKindFromKey(selectedKey)),
20100
20102
  " will open to sign."
20101
20103
  ] }),
20102
- ownedSignerBinding && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[11px] text-cyan-200", children: [
20104
+ ownedSignerBinding && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[11px] text-azure dark:text-cyan-200", children: [
20103
20105
  "This owned-group request is cryptographically bound to this personal key (",
20104
20106
  ownedSignerBinding.signerCustody,
20105
20107
  "). Choose a different key by returning to the parent group and minting a new child session."
@@ -20175,8 +20177,8 @@ function InspectFooter({
20175
20177
  }
20176
20178
  };
20177
20179
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-raised px-3 py-3 space-y-2.5", children: [
20178
- awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-[18px] border border-amber-300/[0.20] bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
20179
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
20180
+ awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-[18px] border border-status-warning-line dark:border-amber-300/[0.20] bg-status-warning-bg dark:bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
20181
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-status-warning-text dark:text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
20180
20182
  /* @__PURE__ */ jsxRuntime.jsx(
20181
20183
  "button",
20182
20184
  {
@@ -20205,7 +20207,7 @@ function InspectFooter({
20205
20207
  href: txExplorerUrl,
20206
20208
  target: "_blank",
20207
20209
  rel: "noopener noreferrer",
20208
- className: "text-blue-300/[0.90] hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
20210
+ className: "text-azure dark:text-blue-300/[0.90] hover:text-azure-deep dark:hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
20209
20211
  children: [
20210
20212
  formatTxHashShort(txHash),
20211
20213
  /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "ml-0.5 text-[9px] align-middle opacity-70", children: "\u2197" })
@@ -20231,7 +20233,7 @@ Opens in block explorer` : txHash
20231
20233
  ] }),
20232
20234
  message.response?.error && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
20233
20235
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-medium uppercase tracking-[0.13em] text-text-muted mb-0.5", children: "Error" }),
20234
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-red-200 break-words", children: message.response.error })
20236
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 break-words", children: message.response.error })
20235
20237
  ] }),
20236
20238
  reexecutions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("details", { children: [
20237
20239
  /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "text-[11px] uppercase tracking-[0.12em] text-text-muted cursor-pointer hover:text-text-primary transition-colors", children: [
@@ -20245,7 +20247,7 @@ Opens in block explorer` : txHash
20245
20247
  className: "text-[11px] rounded-[10px] border border-border-light px-2 py-1 bg-surface-alt",
20246
20248
  children: [
20247
20249
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
20248
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: r.success ? "text-emerald-300/[0.90]" : "text-red-200", children: r.success ? "Succeeded" : "Failed" }),
20250
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: r.success ? "text-status-success-text dark:text-emerald-300/[0.90]" : "text-status-error-text dark:text-red-200", children: r.success ? "Succeeded" : "Failed" }),
20249
20251
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-muted", children: formatRelativeTime(r.attempted_at) })
20250
20252
  ] }),
20251
20253
  r.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-text-secondary break-words", children: r.error })
@@ -20255,7 +20257,7 @@ Opens in block explorer` : txHash
20255
20257
  )) })
20256
20258
  ] })
20257
20259
  ] }),
20258
- actionError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[16px] border border-red-300/[0.24] bg-red-950/[0.18] px-3 py-2 text-[11px] text-red-100", children: actionError }),
20260
+ actionError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[16px] border border-status-error-line dark:border-red-300/[0.24] bg-status-error-bg dark:bg-red-950/[0.18] px-3 py-2 text-[11px] text-status-error-text dark:text-red-100", children: actionError }),
20259
20261
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
20260
20262
  /* @__PURE__ */ jsxRuntime.jsx(
20261
20263
  "button",
@@ -20638,8 +20640,10 @@ function SignatureWorkflow({
20638
20640
  ] });
20639
20641
  }
20640
20642
  var PLACEMENT_CLASSES = {
20641
- "top-left": "top-4 left-4",
20642
- "top-right": "top-4 right-4",
20643
+ // The top corners clear the status bar of a home-screen install (zero
20644
+ // in a browser tab).
20645
+ "top-left": "top-[calc(1rem+env(safe-area-inset-top))] left-4",
20646
+ "top-right": "top-[calc(1rem+env(safe-area-inset-top))] right-4",
20643
20647
  "bottom-left": "bottom-4 left-4",
20644
20648
  "bottom-right": "bottom-4 right-4"
20645
20649
  };
@@ -23992,18 +23996,18 @@ var GroupsView = ({
23992
23996
  ] }),
23993
23997
  error && /* @__PURE__ */ jsxRuntime.jsx(ErrorBanner, { children: error }),
23994
23998
  delegationSession?.kind === "owned" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-[22px] border border-cyan-300/[0.18] bg-cyan-400/[0.07] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
23995
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-cyan-300/80", children: "Account ownership path" }),
23999
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-azure dark:text-cyan-300/80", children: "Account ownership path" }),
23996
24000
  /* @__PURE__ */ jsxRuntime.jsxs(
23997
24001
  "div",
23998
24002
  {
23999
24003
  className: "mt-2 flex min-w-0 items-center gap-2",
24000
24004
  "aria-label": `${sourceGroup?.name ?? "Owning group"} is operating ${activeOwnedGroup?.name ?? "owned group"}`,
24001
24005
  children: [
24002
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
24003
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
24004
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
24005
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
24006
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-cyan-300/[0.18] bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
24006
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
24007
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24008
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
24009
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24010
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate rounded-lg border border-azure-line dark:border-cyan-300/[0.18] bg-azure-tint dark:bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
24007
24011
  ]
24008
24012
  }
24009
24013
  ),
@@ -24015,7 +24019,7 @@ var GroupsView = ({
24015
24019
  type: "button",
24016
24020
  onClick: () => void handleReturnToParent(),
24017
24021
  disabled: busyId === `parent:${delegationSession.parentGroupId}`,
24018
- className: "rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:opacity-45",
24022
+ className: "rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:opacity-45",
24019
24023
  children: busyId === `parent:${delegationSession.parentGroupId}` ? "Returning..." : `Return to ${sourceGroup?.name ?? "owning group"}`
24020
24024
  }
24021
24025
  ),
@@ -24031,7 +24035,7 @@ var GroupsView = ({
24031
24035
  )
24032
24036
  ] })
24033
24037
  ] }) : actingAsAnyGroup ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 rounded-[22px] border border-amber-300/[0.18] bg-amber-400/[0.08] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
24034
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-amber-300", children: [
24038
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-status-warning-text dark:text-amber-300", children: [
24035
24039
  "Acting as ",
24036
24040
  sourceGroup?.name ?? "a group",
24037
24041
  ". Operations use its direct delegation token."
@@ -24366,7 +24370,7 @@ function OwnedGroupRow({
24366
24370
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "px-3.5 py-3", children: [
24367
24371
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
24368
24372
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-[11px] font-semibold text-text-secondary", children: sourceName }),
24369
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
24373
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24370
24374
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-[12px] font-semibold text-text-primary", children: projection.group.name })
24371
24375
  ] }),
24372
24376
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center justify-between gap-3", children: [
@@ -24377,7 +24381,7 @@ function OwnedGroupRow({
24377
24381
  type: "button",
24378
24382
  onClick: onSwitch,
24379
24383
  disabled: busy,
24380
- className: "shrink-0 rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
24384
+ className: "shrink-0 rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
24381
24385
  children: busy ? "Checking ownership..." : `Operate as ${projection.group.name}`
24382
24386
  }
24383
24387
  )
@@ -24864,7 +24868,7 @@ function PlusIcon() {
24864
24868
  }
24865
24869
  function RoleBadge({ role }) {
24866
24870
  const label = normalizeRole(role);
24867
- const tone = label === "owner" ? "bg-orange-500/[0.16] text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-blue-300" : "bg-chip text-text-secondary";
24871
+ const tone = label === "owner" ? "bg-orange-500/[0.16] text-primary dark:text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-azure dark:text-blue-300" : "bg-chip text-text-secondary";
24868
24872
  return /* @__PURE__ */ jsxRuntime.jsx(
24869
24873
  "span",
24870
24874
  {
@@ -25006,7 +25010,7 @@ function ActiveEnvironmentBadge({
25006
25010
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center justify-between gap-3 px-1", children: [
25007
25011
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-text-muted", children: "Mode" }),
25008
25012
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 truncate text-right text-[9px] text-text-muted", children: [
25009
- environment.mode === "unknown" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1.5 font-semibold text-amber-400", children: "Unconfigured" }),
25013
+ environment.mode === "unknown" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1.5 font-semibold text-status-warning-text dark:text-amber-400", children: "Unconfigured" }),
25010
25014
  environment.network,
25011
25015
  environment.chainId && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5 font-mono text-text-secondary", children: environment.chainId })
25012
25016
  ] })
@@ -25020,7 +25024,7 @@ function ActiveEnvironmentBadge({
25020
25024
  /* @__PURE__ */ jsxRuntime.jsxs(
25021
25025
  "span",
25022
25026
  {
25023
- className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-amber-400" : environment.mode === "live" ? "text-emerald-400" : "text-text-secondary"}`,
25027
+ className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-status-warning-text dark:text-amber-400" : environment.mode === "live" ? "text-status-success-text dark:text-emerald-400" : "text-text-secondary"}`,
25024
25028
  children: [
25025
25029
  /* @__PURE__ */ jsxRuntime.jsx(
25026
25030
  "span",
@@ -25064,7 +25068,7 @@ function ActiveEnvironmentBadge({
25064
25068
  void switchTo(option);
25065
25069
  }
25066
25070
  },
25067
- className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
25071
+ className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-status-warning-text dark:text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-status-success-text dark:text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
25068
25072
  children: busy ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
25069
25073
  option.active && /* @__PURE__ */ jsxRuntime.jsx(
25070
25074
  "span",
@@ -25135,7 +25139,7 @@ function ActiveEnvironmentBadge({
25135
25139
  "div",
25136
25140
  {
25137
25141
  role: "alert",
25138
- className: "mt-2 rounded-xl border border-red-500/25 bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-red-400",
25142
+ className: "mt-2 rounded-xl border border-status-error-line dark:border-red-500/25 bg-status-error-bg dark:bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-400",
25139
25143
  children: error
25140
25144
  }
25141
25145
  )
@@ -25830,7 +25834,7 @@ function WalletMenu({
25830
25834
  onClick: onOpenActors,
25831
25835
  className: "flex min-h-[52px] w-full items-center gap-3 px-4 py-2 text-left text-[14px] font-semibold text-text-primary transition-colors hover:bg-raised-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-orange-400/70",
25832
25836
  children: [
25833
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-orange-500/10 text-orange-400", children: activeActor?.kind === "self" ? /* @__PURE__ */ jsxRuntime.jsx(IconUser, {}) : /* @__PURE__ */ jsxRuntime.jsx(IconBuilding, {}) }),
25837
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 text-primary dark:text-orange-400", children: activeActor?.kind === "self" ? /* @__PURE__ */ jsxRuntime.jsx(IconUser, {}) : /* @__PURE__ */ jsxRuntime.jsx(IconBuilding, {}) }),
25834
25838
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
25835
25839
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate", children: activeActor?.label ?? userName }),
25836
25840
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-[10px] font-medium capitalize text-text-muted", children: activeActor?.kind ?? "self" })
@@ -25845,7 +25849,7 @@ function WalletMenu({
25845
25849
  {
25846
25850
  type: "button",
25847
25851
  onClick: onSignOut,
25848
- className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
25852
+ className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-status-error-bg dark:bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-status-error-text dark:text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
25849
25853
  children: [
25850
25854
  /* @__PURE__ */ jsxRuntime.jsx(IconSignOut, {}),
25851
25855
  "Sign out"
@@ -25877,7 +25881,7 @@ function WalletMenuRow({
25877
25881
  {
25878
25882
  className: cx4(
25879
25883
  "mr-3 inline-flex h-8 w-8 items-center justify-center rounded-lg",
25880
- urgent ? "bg-violet-500/20 text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
25884
+ urgent ? "bg-violet-500/20 text-primary dark:text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
25881
25885
  ),
25882
25886
  children: item.icon
25883
25887
  }
@@ -26117,7 +26121,7 @@ function DirectoryPane({
26117
26121
  {
26118
26122
  type: "button",
26119
26123
  onClick: () => setQuery(""),
26120
- className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-orange-400 hover:bg-orange-400/10",
26124
+ className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-primary dark:text-orange-400 hover:bg-primary/10 dark:hover:bg-orange-400/10",
26121
26125
  children: "Clear search"
26122
26126
  }
26123
26127
  )
@@ -28047,7 +28051,7 @@ var BillingCenter = ({ dense = false }) => {
28047
28051
  if (notConfigured) {
28048
28052
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: outerClass, children: [
28049
28053
  !dense && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
28050
- /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
28054
+ /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
28051
28055
  "Usage & billing",
28052
28056
  !isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
28053
28057
  ] }),
@@ -28133,7 +28137,7 @@ var BillingCenter = ({ dense = false }) => {
28133
28137
  const recoveryAction = summary ? billingRecoveryAction(summary) : null;
28134
28138
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: outerClass, children: [
28135
28139
  !dense && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
28136
- /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
28140
+ /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
28137
28141
  "Usage & billing",
28138
28142
  !isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
28139
28143
  ] }),
@@ -29855,7 +29859,7 @@ function BusinessVerificationSection({
29855
29859
  };
29856
29860
  const copy = STATUS_COPY[status] ?? STATUS_COPY.unverified;
29857
29861
  const impl = flowInstance ? resolveKycInstance(config, flowInstance) : null;
29858
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4 space-y-3", children: [
29862
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4 space-y-3", children: [
29859
29863
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
29860
29864
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Business verification" }),
29861
29865
  /* @__PURE__ */ jsxRuntime.jsx(
package/dist/index.d.cts CHANGED
@@ -524,6 +524,10 @@ interface WalletRuntimeConfig extends ModeConfig {
524
524
  * cache reset + `userChanged` event dispatch here. Hosts that
525
525
  * don't use Apollo can omit this. */
526
526
  onSessionBootstrapped?: (userId: string) => void | Promise<void>;
527
+ /** Runs BEFORE the session is torn down on `logout` / `logoutAll`,
528
+ * while the token is still valid — the host forgets this device's push
529
+ * subscription here. Failures are swallowed; sign-out always proceeds. */
530
+ onBeforeLogout?: () => void | Promise<void>;
527
531
  /** Optional toast / error reporting hooks for wallet-internal
528
532
  * events that the host might want to surface (background poller
529
533
  * failures, queue subscription drops, etc.). */
package/dist/index.d.ts CHANGED
@@ -524,6 +524,10 @@ interface WalletRuntimeConfig extends ModeConfig {
524
524
  * cache reset + `userChanged` event dispatch here. Hosts that
525
525
  * don't use Apollo can omit this. */
526
526
  onSessionBootstrapped?: (userId: string) => void | Promise<void>;
527
+ /** Runs BEFORE the session is torn down on `logout` / `logoutAll`,
528
+ * while the token is still valid — the host forgets this device's push
529
+ * subscription here. Failures are swallowed; sign-out always proceeds. */
530
+ onBeforeLogout?: () => void | Promise<void>;
527
531
  /** Optional toast / error reporting hooks for wallet-internal
528
532
  * events that the host might want to surface (background poller
529
533
  * failures, queue subscription drops, etc.). */
package/dist/index.js CHANGED
@@ -5345,7 +5345,7 @@ var init_SignupFlow = __esm({
5345
5345
  };
5346
5346
  AvererSidebar = ({ onError }) => {
5347
5347
  const navigate = useWalletNavigate();
5348
- return /* @__PURE__ */ jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 py-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light", children: [
5348
+ return /* @__PURE__ */ jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 pt-[calc(1.25rem+env(safe-area-inset-top))] pb-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light", children: [
5349
5349
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 md:gap-10", children: [
5350
5350
  /* @__PURE__ */ jsx("div", { className: "text-text-primary", children: /* @__PURE__ */ jsx(YieldFabricLockup, { size: 32 }) }),
5351
5351
  /* @__PURE__ */ jsxs("div", { className: "hidden md:block space-y-3 max-w-[260px]", children: [
@@ -5954,7 +5954,7 @@ function clearDynamicSession() {
5954
5954
  init_WalletConfigContext();
5955
5955
  var WalletAuthContext = createContext(void 0);
5956
5956
  function WalletAuthProvider({ children }) {
5957
- const { onSessionBootstrapped } = useWalletConfig();
5957
+ const { onSessionBootstrapped, onBeforeLogout } = useWalletConfig();
5958
5958
  const [user, setUser] = useState(null);
5959
5959
  const [isLoading, setIsLoading] = useState(true);
5960
5960
  const [error, setError] = useState(null);
@@ -6047,6 +6047,7 @@ function WalletAuthProvider({ children }) {
6047
6047
  setIsLoading(true);
6048
6048
  setError(null);
6049
6049
  tokenRenewalService.stopRenewal();
6050
+ await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
6050
6051
  await authService.logout();
6051
6052
  clearDynamicSession();
6052
6053
  setUser(null);
@@ -6062,6 +6063,7 @@ function WalletAuthProvider({ children }) {
6062
6063
  setIsLoading(true);
6063
6064
  setError(null);
6064
6065
  tokenRenewalService.stopRenewal();
6066
+ await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
6065
6067
  await authService.logoutAll();
6066
6068
  clearDynamicSession();
6067
6069
  setUser(null);
@@ -9309,11 +9311,11 @@ function humanizeMessageType(messageType) {
9309
9311
  return spaced.charAt(0).toUpperCase() + spaced.slice(1);
9310
9312
  }
9311
9313
  var TONE_COLORS = {
9312
- success: { dotClass: "bg-emerald-300", textClass: "text-emerald-300", bgClass: "bg-emerald-950/[0.16]" },
9313
- danger: { dotClass: "bg-red-300", textClass: "text-red-200", bgClass: "bg-red-950/[0.16]" },
9314
- warn: { dotClass: "bg-amber-300", textClass: "text-amber-200", bgClass: "bg-amber-950/[0.14]" },
9315
- info: { dotClass: "bg-blue-300", textClass: "text-blue-200", bgClass: "bg-blue-950/[0.14]" },
9316
- neutral: { dotClass: "bg-white/[0.34]", textClass: "text-white/[0.56]", bgClass: "bg-white/[0.045]" }
9314
+ success: { dotClass: "bg-emerald-300", textClass: "text-status-success-text dark:text-emerald-300", bgClass: "bg-status-success-bg dark:bg-emerald-950/[0.16]" },
9315
+ danger: { dotClass: "bg-red-300", textClass: "text-status-error-text dark:text-red-200", bgClass: "bg-status-error-bg dark:bg-red-950/[0.16]" },
9316
+ warn: { dotClass: "bg-amber-300", textClass: "text-status-warning-text dark:text-amber-200", bgClass: "bg-status-warning-bg dark:bg-amber-950/[0.14]" },
9317
+ info: { dotClass: "bg-blue-300", textClass: "text-azure dark:text-blue-200", bgClass: "bg-azure-tint dark:bg-blue-950/[0.14]" },
9318
+ neutral: { dotClass: "bg-text-muted dark:bg-white/[0.34]", textClass: "text-text-muted dark:text-white/[0.56]", bgClass: "bg-chip dark:bg-white/[0.045]" }
9317
9319
  };
9318
9320
  var STATUS_TO_TONE = {
9319
9321
  completed: "success",
@@ -10377,7 +10379,7 @@ function LoginPage({
10377
10379
  align = "center",
10378
10380
  logo
10379
10381
  }) {
10380
- const alignClass = align === "top" ? "items-start pt-12 pb-12" : "items-center";
10382
+ const alignClass = align === "top" ? "items-start pt-[calc(3rem+env(safe-area-inset-top))] pb-12" : "items-center pt-[env(safe-area-inset-top)]";
10381
10383
  return /* @__PURE__ */ jsx(
10382
10384
  "div",
10383
10385
  {
@@ -10516,7 +10518,7 @@ function OnboardingChoosePath({ chrome } = {}) {
10516
10518
  /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-[520px] text-center space-y-1.5", children: [
10517
10519
  /* @__PURE__ */ jsx("h2", { className: "text-[18px] text-text-primary font-medium", children: messages.choosePath.header }),
10518
10520
  /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary", children: messages.choosePath.subheader }),
10519
- configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
10521
+ configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
10520
10522
  ] }),
10521
10523
  /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-[480px] space-y-2.5", children: [
10522
10524
  avererEnabled && /* @__PURE__ */ jsx(
@@ -12265,7 +12267,7 @@ function OnboardingChooseMethod({ chrome } = {}) {
12265
12267
  return /* @__PURE__ */ jsx(StepShell, { chrome, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
12266
12268
  /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
12267
12269
  /* @__PURE__ */ jsx("h2", { className: "text-[16px] text-text-primary", children: messages.chooseMethod.header }),
12268
- configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
12270
+ configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
12269
12271
  ] }),
12270
12272
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
12271
12273
  enabled.map(({ id, impl }) => {
@@ -13058,7 +13060,7 @@ function SkeletonAvatar({
13058
13060
  {
13059
13061
  role: "img",
13060
13062
  "aria-label": choice ? `${name} - ${choice.label} avatar` : `${name}'s avatar`,
13061
- className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-[#252525] ${className}`,
13063
+ className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-surface-alt dark:bg-[#252525] ${className}`,
13062
13064
  style: {
13063
13065
  width: size,
13064
13066
  height: size
@@ -13111,7 +13113,7 @@ function AvatarPicker({
13111
13113
  onClick: () => onChange(c.id),
13112
13114
  className: [
13113
13115
  "rounded-full flex items-center justify-center select-none overflow-hidden",
13114
- "transition-all border-2 bg-[#252525]",
13116
+ "transition-all border-2 bg-surface-alt dark:bg-[#252525]",
13115
13117
  selected ? "border-primary scale-105" : "border-transparent hover:border-border-light"
13116
13118
  ].join(" "),
13117
13119
  style: { width: tileSize, height: tileSize },
@@ -15567,7 +15569,7 @@ var Drawer = ({
15567
15569
  role: "dialog",
15568
15570
  "aria-modal": "true",
15569
15571
  "aria-labelledby": titleId,
15570
- className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col ${widthClass} ${panelClassName}`,
15572
+ className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col pt-[env(safe-area-inset-top)] ${widthClass} ${panelClassName}`,
15571
15573
  style: { ...widthStyle, ...panelStyle },
15572
15574
  onClick: (e) => e.stopPropagation(),
15573
15575
  children: [
@@ -17978,7 +17980,7 @@ var OnboardingPolicySection = ({
17978
17980
  ]);
17979
17981
  if (hidden || loading || deployLoading || platformActive === null) return null;
17980
17982
  if (platformActive === "error") {
17981
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
17983
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
17982
17984
  /* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
17983
17985
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: [
17984
17986
  /* @__PURE__ */ jsx("span", { children: "Couldn't confirm whether this group is used as a platform." }),
@@ -17995,12 +17997,12 @@ var OnboardingPolicySection = ({
17995
17997
  ] });
17996
17998
  }
17997
17999
  if (!platformActive) {
17998
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
18000
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
17999
18001
  /* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
18000
18002
  /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: "This group isn't used as a platform, so there are no signups to configure. Enable platform sponsorship first \u2014 then choose the sign-in methods and identity checks its users go through." })
18001
18003
  ] });
18002
18004
  }
18003
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
18005
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
18004
18006
  /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
18005
18007
  /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }),
18006
18008
  /* @__PURE__ */ jsx("p", { className: "text-xs text-text-muted", children: "The path people take from first visit to transacting on this platform." })
@@ -18785,7 +18787,7 @@ function DecodedCalldata({
18785
18787
  }
18786
18788
  const kindColor = {
18787
18789
  zero: "text-text-muted",
18788
- address: "text-blue-300/[0.90]",
18790
+ address: "text-azure dark:text-blue-300/[0.90]",
18789
18791
  uint: "text-text-primary",
18790
18792
  bytes32: "text-text-secondary"
18791
18793
  };
@@ -19776,14 +19778,14 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19776
19778
  type: "button",
19777
19779
  onClick: handleCancelMessage,
19778
19780
  disabled: cancelling,
19779
- className: "px-3 py-2 text-[13px] text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
19781
+ className: "px-3 py-2 text-[13px] text-status-error-text dark:text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
19780
19782
  children: cancelling ? "Cancelling\u2026" : "Cancel message"
19781
19783
  }
19782
19784
  ) : void 0,
19783
19785
  children: [
19784
- /* @__PURE__ */ jsx("p", { className: "text-[13px] font-medium text-red-100 mb-1", children: "Couldn't load transaction" }),
19786
+ /* @__PURE__ */ jsx("p", { className: "text-[13px] font-medium text-status-error-text dark:text-red-100 mb-1", children: "Couldn't load transaction" }),
19785
19787
  /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary max-w-sm", children: error }),
19786
- cancelError && /* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 mt-3", children: cancelError })
19788
+ cancelError && /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 mt-3", children: cancelError })
19787
19789
  ]
19788
19790
  }
19789
19791
  );
@@ -19798,7 +19800,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19798
19800
  })();
19799
19801
  return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col h-full text-text-primary", children: [
19800
19802
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3 px-4 py-4", children: [
19801
- reviewWarning && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-amber-300/[0.22] bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-amber-100", children: reviewWarning }),
19803
+ reviewWarning && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-status-warning-line dark:border-amber-300/[0.22] bg-status-warning-bg dark:bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-status-warning-text dark:text-amber-100", children: reviewWarning }),
19802
19804
  /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary leading-5", children: mode === "inspect" ? "Review action details and execution outcome." : "Review the action, choose a signing key, and confirm." }),
19803
19805
  /* @__PURE__ */ jsx("div", { className: "flex w-full rounded-[22px] border border-border-light bg-raised p-1 text-[12px] shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: ["simple", "advanced"].map((mode2) => /* @__PURE__ */ jsx(
19804
19806
  "button",
@@ -19987,7 +19989,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
19987
19989
  ] })
19988
19990
  }
19989
19991
  ),
19990
- selector && !methodName && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-red-300/[0.18] bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
19992
+ selector && !methodName && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-status-error-line dark:border-red-300/[0.18] bg-status-error-bg dark:bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
19991
19993
  !dataEmpty && /* @__PURE__ */ jsx("div", { className: "text-[12px]", children: isExpanded ? /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
19992
19994
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
19993
19995
  /* @__PURE__ */ jsx("span", { className: "text-text-muted", children: "Calldata" }),
@@ -20046,7 +20048,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
20046
20048
  ] })
20047
20049
  ] }) }),
20048
20050
  mode === "sign" && /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-surface-alt", children: [
20049
- keysLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
20051
+ keysLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
20050
20052
  /* @__PURE__ */ jsx(SectionLabel, { children: "Sign with" }),
20051
20053
  /* @__PURE__ */ jsx("ul", { className: "max-h-40 overflow-y-auto divide-y divide-border-light", children: availableKeys.map((key) => {
20052
20054
  const isSelected = selectedKey?.id === key.id;
@@ -20091,7 +20093,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
20091
20093
  walletLabel(walletKindFromKey(selectedKey)),
20092
20094
  " will open to sign."
20093
20095
  ] }),
20094
- ownedSignerBinding && /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-cyan-200", children: [
20096
+ ownedSignerBinding && /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-azure dark:text-cyan-200", children: [
20095
20097
  "This owned-group request is cryptographically bound to this personal key (",
20096
20098
  ownedSignerBinding.signerCustody,
20097
20099
  "). Choose a different key by returning to the parent group and minting a new child session."
@@ -20167,8 +20169,8 @@ function InspectFooter({
20167
20169
  }
20168
20170
  };
20169
20171
  return /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-raised px-3 py-3 space-y-2.5", children: [
20170
- awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxs("div", { className: "rounded-[18px] border border-amber-300/[0.20] bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
20171
- /* @__PURE__ */ jsx("p", { className: "text-[12px] text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
20172
+ awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxs("div", { className: "rounded-[18px] border border-status-warning-line dark:border-amber-300/[0.20] bg-status-warning-bg dark:bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
20173
+ /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-warning-text dark:text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
20172
20174
  /* @__PURE__ */ jsx(
20173
20175
  "button",
20174
20176
  {
@@ -20197,7 +20199,7 @@ function InspectFooter({
20197
20199
  href: txExplorerUrl,
20198
20200
  target: "_blank",
20199
20201
  rel: "noopener noreferrer",
20200
- className: "text-blue-300/[0.90] hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
20202
+ className: "text-azure dark:text-blue-300/[0.90] hover:text-azure-deep dark:hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
20201
20203
  children: [
20202
20204
  formatTxHashShort(txHash),
20203
20205
  /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "ml-0.5 text-[9px] align-middle opacity-70", children: "\u2197" })
@@ -20223,7 +20225,7 @@ Opens in block explorer` : txHash
20223
20225
  ] }),
20224
20226
  message.response?.error && /* @__PURE__ */ jsxs("div", { children: [
20225
20227
  /* @__PURE__ */ jsx("p", { className: "text-[10px] font-medium uppercase tracking-[0.13em] text-text-muted mb-0.5", children: "Error" }),
20226
- /* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 break-words", children: message.response.error })
20228
+ /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 break-words", children: message.response.error })
20227
20229
  ] }),
20228
20230
  reexecutions.length > 0 && /* @__PURE__ */ jsxs("details", { children: [
20229
20231
  /* @__PURE__ */ jsxs("summary", { className: "text-[11px] uppercase tracking-[0.12em] text-text-muted cursor-pointer hover:text-text-primary transition-colors", children: [
@@ -20237,7 +20239,7 @@ Opens in block explorer` : txHash
20237
20239
  className: "text-[11px] rounded-[10px] border border-border-light px-2 py-1 bg-surface-alt",
20238
20240
  children: [
20239
20241
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
20240
- /* @__PURE__ */ jsx("span", { className: r.success ? "text-emerald-300/[0.90]" : "text-red-200", children: r.success ? "Succeeded" : "Failed" }),
20242
+ /* @__PURE__ */ jsx("span", { className: r.success ? "text-status-success-text dark:text-emerald-300/[0.90]" : "text-status-error-text dark:text-red-200", children: r.success ? "Succeeded" : "Failed" }),
20241
20243
  /* @__PURE__ */ jsx("span", { className: "text-text-muted", children: formatRelativeTime(r.attempted_at) })
20242
20244
  ] }),
20243
20245
  r.error && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-text-secondary break-words", children: r.error })
@@ -20247,7 +20249,7 @@ Opens in block explorer` : txHash
20247
20249
  )) })
20248
20250
  ] })
20249
20251
  ] }),
20250
- actionError && /* @__PURE__ */ jsx("div", { className: "rounded-[16px] border border-red-300/[0.24] bg-red-950/[0.18] px-3 py-2 text-[11px] text-red-100", children: actionError }),
20252
+ actionError && /* @__PURE__ */ jsx("div", { className: "rounded-[16px] border border-status-error-line dark:border-red-300/[0.24] bg-status-error-bg dark:bg-red-950/[0.18] px-3 py-2 text-[11px] text-status-error-text dark:text-red-100", children: actionError }),
20251
20253
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2", children: [
20252
20254
  /* @__PURE__ */ jsx(
20253
20255
  "button",
@@ -20630,8 +20632,10 @@ function SignatureWorkflow({
20630
20632
  ] });
20631
20633
  }
20632
20634
  var PLACEMENT_CLASSES = {
20633
- "top-left": "top-4 left-4",
20634
- "top-right": "top-4 right-4",
20635
+ // The top corners clear the status bar of a home-screen install (zero
20636
+ // in a browser tab).
20637
+ "top-left": "top-[calc(1rem+env(safe-area-inset-top))] left-4",
20638
+ "top-right": "top-[calc(1rem+env(safe-area-inset-top))] right-4",
20635
20639
  "bottom-left": "bottom-4 left-4",
20636
20640
  "bottom-right": "bottom-4 right-4"
20637
20641
  };
@@ -23984,18 +23988,18 @@ var GroupsView = ({
23984
23988
  ] }),
23985
23989
  error && /* @__PURE__ */ jsx(ErrorBanner, { children: error }),
23986
23990
  delegationSession?.kind === "owned" ? /* @__PURE__ */ jsxs("div", { className: "rounded-[22px] border border-cyan-300/[0.18] bg-cyan-400/[0.07] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
23987
- /* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-cyan-300/80", children: "Account ownership path" }),
23991
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-azure dark:text-cyan-300/80", children: "Account ownership path" }),
23988
23992
  /* @__PURE__ */ jsxs(
23989
23993
  "div",
23990
23994
  {
23991
23995
  className: "mt-2 flex min-w-0 items-center gap-2",
23992
23996
  "aria-label": `${sourceGroup?.name ?? "Owning group"} is operating ${activeOwnedGroup?.name ?? "owned group"}`,
23993
23997
  children: [
23994
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
23995
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
23996
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
23997
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
23998
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-cyan-300/[0.18] bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
23998
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
23999
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24000
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
24001
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24002
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-azure-line dark:border-cyan-300/[0.18] bg-azure-tint dark:bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
23999
24003
  ]
24000
24004
  }
24001
24005
  ),
@@ -24007,7 +24011,7 @@ var GroupsView = ({
24007
24011
  type: "button",
24008
24012
  onClick: () => void handleReturnToParent(),
24009
24013
  disabled: busyId === `parent:${delegationSession.parentGroupId}`,
24010
- className: "rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:opacity-45",
24014
+ className: "rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:opacity-45",
24011
24015
  children: busyId === `parent:${delegationSession.parentGroupId}` ? "Returning..." : `Return to ${sourceGroup?.name ?? "owning group"}`
24012
24016
  }
24013
24017
  ),
@@ -24023,7 +24027,7 @@ var GroupsView = ({
24023
24027
  )
24024
24028
  ] })
24025
24029
  ] }) : actingAsAnyGroup ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-[22px] border border-amber-300/[0.18] bg-amber-400/[0.08] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
24026
- /* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-amber-300", children: [
24030
+ /* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-status-warning-text dark:text-amber-300", children: [
24027
24031
  "Acting as ",
24028
24032
  sourceGroup?.name ?? "a group",
24029
24033
  ". Operations use its direct delegation token."
@@ -24358,7 +24362,7 @@ function OwnedGroupRow({
24358
24362
  return /* @__PURE__ */ jsxs("li", { className: "px-3.5 py-3", children: [
24359
24363
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
24360
24364
  /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[11px] font-semibold text-text-secondary", children: sourceName }),
24361
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-cyan-300/70", children: "\u2192" }),
24365
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-[12px] text-azure dark:text-cyan-300/70", children: "\u2192" }),
24362
24366
  /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[12px] font-semibold text-text-primary", children: projection.group.name })
24363
24367
  ] }),
24364
24368
  /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-between gap-3", children: [
@@ -24369,7 +24373,7 @@ function OwnedGroupRow({
24369
24373
  type: "button",
24370
24374
  onClick: onSwitch,
24371
24375
  disabled: busy,
24372
- className: "shrink-0 rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
24376
+ className: "shrink-0 rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
24373
24377
  children: busy ? "Checking ownership..." : `Operate as ${projection.group.name}`
24374
24378
  }
24375
24379
  )
@@ -24856,7 +24860,7 @@ function PlusIcon() {
24856
24860
  }
24857
24861
  function RoleBadge({ role }) {
24858
24862
  const label = normalizeRole(role);
24859
- const tone = label === "owner" ? "bg-orange-500/[0.16] text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-blue-300" : "bg-chip text-text-secondary";
24863
+ const tone = label === "owner" ? "bg-orange-500/[0.16] text-primary dark:text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-azure dark:text-blue-300" : "bg-chip text-text-secondary";
24860
24864
  return /* @__PURE__ */ jsx(
24861
24865
  "span",
24862
24866
  {
@@ -24998,7 +25002,7 @@ function ActiveEnvironmentBadge({
24998
25002
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center justify-between gap-3 px-1", children: [
24999
25003
  /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-text-muted", children: "Mode" }),
25000
25004
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 truncate text-right text-[9px] text-text-muted", children: [
25001
- environment.mode === "unknown" && /* @__PURE__ */ jsx("span", { className: "mr-1.5 font-semibold text-amber-400", children: "Unconfigured" }),
25005
+ environment.mode === "unknown" && /* @__PURE__ */ jsx("span", { className: "mr-1.5 font-semibold text-status-warning-text dark:text-amber-400", children: "Unconfigured" }),
25002
25006
  environment.network,
25003
25007
  environment.chainId && /* @__PURE__ */ jsx("span", { className: "ml-1.5 font-mono text-text-secondary", children: environment.chainId })
25004
25008
  ] })
@@ -25012,7 +25016,7 @@ function ActiveEnvironmentBadge({
25012
25016
  /* @__PURE__ */ jsxs(
25013
25017
  "span",
25014
25018
  {
25015
- className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-amber-400" : environment.mode === "live" ? "text-emerald-400" : "text-text-secondary"}`,
25019
+ className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-status-warning-text dark:text-amber-400" : environment.mode === "live" ? "text-status-success-text dark:text-emerald-400" : "text-text-secondary"}`,
25016
25020
  children: [
25017
25021
  /* @__PURE__ */ jsx(
25018
25022
  "span",
@@ -25056,7 +25060,7 @@ function ActiveEnvironmentBadge({
25056
25060
  void switchTo(option);
25057
25061
  }
25058
25062
  },
25059
- className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
25063
+ className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-status-warning-text dark:text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-status-success-text dark:text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
25060
25064
  children: busy ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
25061
25065
  option.active && /* @__PURE__ */ jsx(
25062
25066
  "span",
@@ -25127,7 +25131,7 @@ function ActiveEnvironmentBadge({
25127
25131
  "div",
25128
25132
  {
25129
25133
  role: "alert",
25130
- className: "mt-2 rounded-xl border border-red-500/25 bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-red-400",
25134
+ className: "mt-2 rounded-xl border border-status-error-line dark:border-red-500/25 bg-status-error-bg dark:bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-400",
25131
25135
  children: error
25132
25136
  }
25133
25137
  )
@@ -25822,7 +25826,7 @@ function WalletMenu({
25822
25826
  onClick: onOpenActors,
25823
25827
  className: "flex min-h-[52px] w-full items-center gap-3 px-4 py-2 text-left text-[14px] font-semibold text-text-primary transition-colors hover:bg-raised-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-orange-400/70",
25824
25828
  children: [
25825
- /* @__PURE__ */ jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-orange-500/10 text-orange-400", children: activeActor?.kind === "self" ? /* @__PURE__ */ jsx(IconUser, {}) : /* @__PURE__ */ jsx(IconBuilding, {}) }),
25829
+ /* @__PURE__ */ jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 text-primary dark:text-orange-400", children: activeActor?.kind === "self" ? /* @__PURE__ */ jsx(IconUser, {}) : /* @__PURE__ */ jsx(IconBuilding, {}) }),
25826
25830
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
25827
25831
  /* @__PURE__ */ jsx("span", { className: "block truncate", children: activeActor?.label ?? userName }),
25828
25832
  /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[10px] font-medium capitalize text-text-muted", children: activeActor?.kind ?? "self" })
@@ -25837,7 +25841,7 @@ function WalletMenu({
25837
25841
  {
25838
25842
  type: "button",
25839
25843
  onClick: onSignOut,
25840
- className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
25844
+ className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-status-error-bg dark:bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-status-error-text dark:text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
25841
25845
  children: [
25842
25846
  /* @__PURE__ */ jsx(IconSignOut, {}),
25843
25847
  "Sign out"
@@ -25869,7 +25873,7 @@ function WalletMenuRow({
25869
25873
  {
25870
25874
  className: cx4(
25871
25875
  "mr-3 inline-flex h-8 w-8 items-center justify-center rounded-lg",
25872
- urgent ? "bg-violet-500/20 text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
25876
+ urgent ? "bg-violet-500/20 text-primary dark:text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
25873
25877
  ),
25874
25878
  children: item.icon
25875
25879
  }
@@ -26109,7 +26113,7 @@ function DirectoryPane({
26109
26113
  {
26110
26114
  type: "button",
26111
26115
  onClick: () => setQuery(""),
26112
- className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-orange-400 hover:bg-orange-400/10",
26116
+ className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-primary dark:text-orange-400 hover:bg-primary/10 dark:hover:bg-orange-400/10",
26113
26117
  children: "Clear search"
26114
26118
  }
26115
26119
  )
@@ -28039,7 +28043,7 @@ var BillingCenter = ({ dense = false }) => {
28039
28043
  if (notConfigured) {
28040
28044
  return /* @__PURE__ */ jsxs("div", { className: outerClass, children: [
28041
28045
  !dense && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
28042
- /* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
28046
+ /* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
28043
28047
  "Usage & billing",
28044
28048
  !isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
28045
28049
  ] }),
@@ -28125,7 +28129,7 @@ var BillingCenter = ({ dense = false }) => {
28125
28129
  const recoveryAction = summary ? billingRecoveryAction(summary) : null;
28126
28130
  return /* @__PURE__ */ jsxs("div", { className: outerClass, children: [
28127
28131
  !dense && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
28128
- /* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
28132
+ /* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
28129
28133
  "Usage & billing",
28130
28134
  !isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
28131
28135
  ] }),
@@ -29847,7 +29851,7 @@ function BusinessVerificationSection({
29847
29851
  };
29848
29852
  const copy = STATUS_COPY[status] ?? STATUS_COPY.unverified;
29849
29853
  const impl = flowInstance ? resolveKycInstance(config, flowInstance) : null;
29850
- return /* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4 space-y-3", children: [
29854
+ return /* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4 space-y-3", children: [
29851
29855
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
29852
29856
  /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Business verification" }),
29853
29857
  /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yieldfabric/wallet",
3
- "version": "0.2.1",
4
- "description": "Reusable YieldFabric wallet \u2014 login, signing, profile, and key management",
3
+ "version": "0.2.2",
4
+ "description": "Reusable YieldFabric wallet — login, signing, profile, and key management",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YieldFabric Technologies Ltd",
7
7
  "repository": {