kaleido-ui 0.1.28 → 0.1.30

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.
@@ -5111,6 +5111,10 @@ function DepositNetworkDefaultModal({
5111
5111
 
5112
5112
  // src/web/components/btc-unified-receive.tsx
5113
5113
  var import_jsx_runtime55 = require("react/jsx-runtime");
5114
+ function formatSatsForRow(value) {
5115
+ if (!value || value <= 0 || !Number.isFinite(value)) return null;
5116
+ return `${value.toLocaleString("en-US")} sats`;
5117
+ }
5114
5118
  function BtcUnifiedReceive({
5115
5119
  btcSelectedAccount,
5116
5120
  accountReceiveResult,
@@ -5210,7 +5214,13 @@ function BtcUnifiedReceive({
5210
5214
  children: [
5211
5215
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("flex size-5 flex-shrink-0 items-center justify-center rounded-md", network.bg), children: network.icon }),
5212
5216
  /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
5213
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
5217
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-1.5", children: [
5218
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
5219
+ (() => {
5220
+ const amountLabel = formatSatsForRow(address.amountSats);
5221
+ return amountLabel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "rounded-full bg-white/10 px-1.5 py-0.5 text-tiny font-bold tabular-nums text-white/70", children: amountLabel }) : null;
5222
+ })()
5223
+ ] }),
5214
5224
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "mt-0.5 truncate font-mono text-tiny text-muted-foreground", children: address.value.length > 50 ? `${address.value.slice(0, 18)}...${address.value.slice(-14)}` : address.value })
5215
5225
  ] }),
5216
5226
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CopyIcon, { copied })
@@ -5293,7 +5303,8 @@ function DepositGeneratedView({
5293
5303
  setAmount,
5294
5304
  setInvoiceStatus,
5295
5305
  showQrNetworkBadge = true,
5296
- onRegenerate
5306
+ onRegenerate,
5307
+ showRegenerate = true
5297
5308
  }) {
5298
5309
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
5299
5310
  (network === "lightning" || network === "arkade" && arkSubMode === "ark") && isBtc && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
@@ -5441,7 +5452,7 @@ function DepositGeneratedView({
5441
5452
  ]
5442
5453
  }
5443
5454
  ),
5444
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex justify-center pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5455
+ showRegenerate && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex justify-center pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5445
5456
  "button",
5446
5457
  {
5447
5458
  type: "button",
@@ -1106,6 +1106,15 @@ interface BtcUnifiedReceiveAddress {
1106
1106
  network: DepositNetworkKey;
1107
1107
  label: string;
1108
1108
  value: string;
1109
+ /**
1110
+ * Amount the address / invoice is bound to, in satoshis. Surfaced as
1111
+ * a small "10,000 sats" tag next to the row label so the user can see
1112
+ * at a glance what the LN invoice / Spark invoice / BIP21 link
1113
+ * actually encodes — bolt11 invoices and Spark invoices carry the
1114
+ * amount internally, but the user couldn't see it without decoding.
1115
+ * Omit (or pass 0) for amountless / open-ended addresses.
1116
+ */
1117
+ amountSats?: number;
1109
1118
  }
1110
1119
  interface BtcUnifiedReceiveResult {
1111
1120
  qrValue: string;
@@ -1175,8 +1184,14 @@ interface DepositGeneratedViewProps {
1175
1184
  * not refire on cleared state — e.g. RGB on-chain.
1176
1185
  */
1177
1186
  onRegenerate?: () => Promise<void> | void;
1187
+ /**
1188
+ * Hide the "New Address" / "New Invoice" round button. Use when the
1189
+ * regenerate flow is broken or unsupported for the current path so the
1190
+ * user doesn't get stuck on a non-functional control.
1191
+ */
1192
+ showRegenerate?: boolean;
1178
1193
  }
1179
- declare function DepositGeneratedView({ network, net, isBtc, address, addressLabel, recipientId, arkSubMode, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, getUnitLabel, selectedAsset, maxDepositAmount, setAddress, setRecipientId, setAmount, setInvoiceStatus, showQrNetworkBadge, onRegenerate, }: DepositGeneratedViewProps): react_jsx_runtime.JSX.Element;
1194
+ declare function DepositGeneratedView({ network, net, isBtc, address, addressLabel, recipientId, arkSubMode, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, getUnitLabel, selectedAsset, maxDepositAmount, setAddress, setRecipientId, setAmount, setInvoiceStatus, showQrNetworkBadge, onRegenerate, showRegenerate, }: DepositGeneratedViewProps): react_jsx_runtime.JSX.Element;
1180
1195
 
1181
1196
  interface DepositPreGenerationAsset {
1182
1197
  ticker?: string;
@@ -1106,6 +1106,15 @@ interface BtcUnifiedReceiveAddress {
1106
1106
  network: DepositNetworkKey;
1107
1107
  label: string;
1108
1108
  value: string;
1109
+ /**
1110
+ * Amount the address / invoice is bound to, in satoshis. Surfaced as
1111
+ * a small "10,000 sats" tag next to the row label so the user can see
1112
+ * at a glance what the LN invoice / Spark invoice / BIP21 link
1113
+ * actually encodes — bolt11 invoices and Spark invoices carry the
1114
+ * amount internally, but the user couldn't see it without decoding.
1115
+ * Omit (or pass 0) for amountless / open-ended addresses.
1116
+ */
1117
+ amountSats?: number;
1109
1118
  }
1110
1119
  interface BtcUnifiedReceiveResult {
1111
1120
  qrValue: string;
@@ -1175,8 +1184,14 @@ interface DepositGeneratedViewProps {
1175
1184
  * not refire on cleared state — e.g. RGB on-chain.
1176
1185
  */
1177
1186
  onRegenerate?: () => Promise<void> | void;
1187
+ /**
1188
+ * Hide the "New Address" / "New Invoice" round button. Use when the
1189
+ * regenerate flow is broken or unsupported for the current path so the
1190
+ * user doesn't get stuck on a non-functional control.
1191
+ */
1192
+ showRegenerate?: boolean;
1178
1193
  }
1179
- declare function DepositGeneratedView({ network, net, isBtc, address, addressLabel, recipientId, arkSubMode, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, getUnitLabel, selectedAsset, maxDepositAmount, setAddress, setRecipientId, setAmount, setInvoiceStatus, showQrNetworkBadge, onRegenerate, }: DepositGeneratedViewProps): react_jsx_runtime.JSX.Element;
1194
+ declare function DepositGeneratedView({ network, net, isBtc, address, addressLabel, recipientId, arkSubMode, invoiceStatus, isInvoicePending, isInvoicePaid, isInvoiceFailedOrExpired, amount, handleAmountChange, loading, copied, copyToClipboard, getUnitLabel, selectedAsset, maxDepositAmount, setAddress, setRecipientId, setAmount, setInvoiceStatus, showQrNetworkBadge, onRegenerate, showRegenerate, }: DepositGeneratedViewProps): react_jsx_runtime.JSX.Element;
1180
1195
 
1181
1196
  interface DepositPreGenerationAsset {
1182
1197
  ticker?: string;
package/dist/web/index.js CHANGED
@@ -4956,6 +4956,10 @@ function DepositNetworkDefaultModal({
4956
4956
 
4957
4957
  // src/web/components/btc-unified-receive.tsx
4958
4958
  import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
4959
+ function formatSatsForRow(value) {
4960
+ if (!value || value <= 0 || !Number.isFinite(value)) return null;
4961
+ return `${value.toLocaleString("en-US")} sats`;
4962
+ }
4959
4963
  function BtcUnifiedReceive({
4960
4964
  btcSelectedAccount,
4961
4965
  accountReceiveResult,
@@ -5055,7 +5059,13 @@ function BtcUnifiedReceive({
5055
5059
  children: [
5056
5060
  /* @__PURE__ */ jsx55("div", { className: cn("flex size-5 flex-shrink-0 items-center justify-center rounded-md", network.bg), children: network.icon }),
5057
5061
  /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
5058
- /* @__PURE__ */ jsx55("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
5062
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-1.5", children: [
5063
+ /* @__PURE__ */ jsx55("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
5064
+ (() => {
5065
+ const amountLabel = formatSatsForRow(address.amountSats);
5066
+ return amountLabel ? /* @__PURE__ */ jsx55("span", { className: "rounded-full bg-white/10 px-1.5 py-0.5 text-tiny font-bold tabular-nums text-white/70", children: amountLabel }) : null;
5067
+ })()
5068
+ ] }),
5059
5069
  /* @__PURE__ */ jsx55("p", { className: "mt-0.5 truncate font-mono text-tiny text-muted-foreground", children: address.value.length > 50 ? `${address.value.slice(0, 18)}...${address.value.slice(-14)}` : address.value })
5060
5070
  ] }),
5061
5071
  /* @__PURE__ */ jsx55(CopyIcon, { copied })
@@ -5138,7 +5148,8 @@ function DepositGeneratedView({
5138
5148
  setAmount,
5139
5149
  setInvoiceStatus,
5140
5150
  showQrNetworkBadge = true,
5141
- onRegenerate
5151
+ onRegenerate,
5152
+ showRegenerate = true
5142
5153
  }) {
5143
5154
  return /* @__PURE__ */ jsxs43("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
5144
5155
  (network === "lightning" || network === "arkade" && arkSubMode === "ark") && isBtc && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
@@ -5286,7 +5297,7 @@ function DepositGeneratedView({
5286
5297
  ]
5287
5298
  }
5288
5299
  ),
5289
- /* @__PURE__ */ jsx56("div", { className: "flex justify-center pt-1", children: /* @__PURE__ */ jsx56(
5300
+ showRegenerate && /* @__PURE__ */ jsx56("div", { className: "flex justify-center pt-1", children: /* @__PURE__ */ jsx56(
5290
5301
  "button",
5291
5302
  {
5292
5303
  type: "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "KaleidoSwap shared UI library — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit",
5
5
  "license": "MIT",
6
6
  "type": "module",