kaleido-ui 0.1.29 → 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.
- package/dist/web/index.cjs +11 -1
- package/dist/web/index.d.cts +9 -0
- package/dist/web/index.d.ts +9 -0
- package/dist/web/index.js +11 -1
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -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.
|
|
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 })
|
package/dist/web/index.d.cts
CHANGED
|
@@ -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;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -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;
|
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__ */
|
|
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 })
|
package/package.json
CHANGED