kaleido-ui 0.1.11 → 0.1.12

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.
@@ -5402,7 +5402,9 @@ function DepositPreGeneration({
5402
5402
  amount,
5403
5403
  handleAmountChange,
5404
5404
  getUnitLabel,
5405
- generateInvoice
5405
+ generateInvoice,
5406
+ needsColorableUtxos = false,
5407
+ onOpenCreateUtxos
5406
5408
  }) {
5407
5409
  const method = METHOD_META2[currentMethod];
5408
5410
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-3", children: [
@@ -5507,13 +5509,20 @@ function DepositPreGeneration({
5507
5509
  }
5508
5510
  )
5509
5511
  ] }),
5510
- !isAutoGenerate && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
5512
+ needsColorableUtxos && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AlertBanner, { variant: "warning", children: [
5513
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "Colorable UTXOs Required" }),
5514
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-tiny text-warning/70", children: "To receive RGB assets on-chain you need at least one uncolored UTXO. Create some now and the invoice will be generated automatically." })
5515
+ ] }),
5516
+ !isAutoGenerate && (needsColorableUtxos && onOpenCreateUtxos ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
5517
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "add_circle" }),
5518
+ "Create Colorable UTXOs"
5519
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
5511
5520
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-md", children: "progress_activity" }),
5512
5521
  "Generating..."
5513
5522
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
5514
5523
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "qr_code_2" }),
5515
5524
  "Generate Address"
5516
- ] }) })
5525
+ ] }) }))
5517
5526
  ] });
5518
5527
  }
5519
5528
 
@@ -5893,7 +5902,9 @@ function DepositInvoiceGeneration({
5893
5902
  arkSubMode,
5894
5903
  setArkSubMode,
5895
5904
  btcSelectedAccount,
5896
- gen
5905
+ gen,
5906
+ needsColorableUtxos,
5907
+ onOpenCreateUtxos
5897
5908
  }) {
5898
5909
  const {
5899
5910
  amount,
@@ -6114,7 +6125,9 @@ function DepositInvoiceGeneration({
6114
6125
  amount,
6115
6126
  handleAmountChange,
6116
6127
  getUnitLabel,
6117
- generateInvoice
6128
+ generateInvoice,
6129
+ needsColorableUtxos,
6130
+ onOpenCreateUtxos
6118
6131
  }
6119
6132
  ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6120
6133
  DepositGeneratedView,
@@ -1163,8 +1163,15 @@ interface DepositPreGenerationProps {
1163
1163
  handleAmountChange: (event: ChangeEvent<HTMLInputElement>) => void;
1164
1164
  getUnitLabel: () => string;
1165
1165
  generateInvoice: () => Promise<void>;
1166
+ /**
1167
+ * RGB on-chain only: true when the user needs to create at least one
1168
+ * uncolored UTXO before an invoice can be generated.
1169
+ */
1170
+ needsColorableUtxos?: boolean;
1171
+ /** Invoked by the inline "Create Colorable UTXOs" CTA. */
1172
+ onOpenCreateUtxos?: () => void;
1166
1173
  }
1167
- declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
1174
+ declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
1168
1175
 
1169
1176
  interface DepositSelectionAsset {
1170
1177
  asset_id: string;
@@ -1246,8 +1253,15 @@ interface DepositInvoiceGenerationProps {
1246
1253
  setArkSubMode: (mode: 'ark' | 'boarding') => void;
1247
1254
  btcSelectedAccount: DepositAccountId;
1248
1255
  gen: DepositGenerationController;
1256
+ /**
1257
+ * RGB on-chain only: when true, the pre-generation step shows a warning
1258
+ * banner and swaps the Generate CTA for "Create Colorable UTXOs". Wire
1259
+ * `onOpenCreateUtxos` to open your own RGB UTXO creation modal.
1260
+ */
1261
+ needsColorableUtxos?: boolean;
1262
+ onOpenCreateUtxos?: () => void;
1249
1263
  }
1250
- declare function DepositInvoiceGeneration({ handleBack, handleDone, selectedAsset, selectedAssetId, isNewAsset, channelsLoading, channels, network, setNetwork, isLightningAvailable, isRgbConnected, isSparkConnected, isArkadeConnected, isSparkLightning, maxDepositAmount, usePrivacy, setUsePrivacy, walletChoice, setWalletChoice, arkSubMode, setArkSubMode, btcSelectedAccount, gen, }: DepositInvoiceGenerationProps): react_jsx_runtime.JSX.Element;
1264
+ declare function DepositInvoiceGeneration({ handleBack, handleDone, selectedAsset, selectedAssetId, isNewAsset, channelsLoading, channels, network, setNetwork, isLightningAvailable, isRgbConnected, isSparkConnected, isArkadeConnected, isSparkLightning, maxDepositAmount, usePrivacy, setUsePrivacy, walletChoice, setWalletChoice, arkSubMode, setArkSubMode, btcSelectedAccount, gen, needsColorableUtxos, onOpenCreateUtxos, }: DepositInvoiceGenerationProps): react_jsx_runtime.JSX.Element;
1251
1265
 
1252
1266
  type ToasterToast = ToastProps & {
1253
1267
  id: string;
@@ -1163,8 +1163,15 @@ interface DepositPreGenerationProps {
1163
1163
  handleAmountChange: (event: ChangeEvent<HTMLInputElement>) => void;
1164
1164
  getUnitLabel: () => string;
1165
1165
  generateInvoice: () => Promise<void>;
1166
+ /**
1167
+ * RGB on-chain only: true when the user needs to create at least one
1168
+ * uncolored UTXO before an invoice can be generated.
1169
+ */
1170
+ needsColorableUtxos?: boolean;
1171
+ /** Invoked by the inline "Create Colorable UTXOs" CTA. */
1172
+ onOpenCreateUtxos?: () => void;
1166
1173
  }
1167
- declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
1174
+ declare function DepositPreGeneration({ selectedAsset, isBtc, network, net, selectedAccount, currentMethod, channelsLoading, showChannelWarning, showLiquidityWarning, isAutoGenerate, loading, usePrivacy, setUsePrivacy, amount, handleAmountChange, getUnitLabel, generateInvoice, needsColorableUtxos, onOpenCreateUtxos, }: DepositPreGenerationProps): react_jsx_runtime.JSX.Element;
1168
1175
 
1169
1176
  interface DepositSelectionAsset {
1170
1177
  asset_id: string;
@@ -1246,8 +1253,15 @@ interface DepositInvoiceGenerationProps {
1246
1253
  setArkSubMode: (mode: 'ark' | 'boarding') => void;
1247
1254
  btcSelectedAccount: DepositAccountId;
1248
1255
  gen: DepositGenerationController;
1256
+ /**
1257
+ * RGB on-chain only: when true, the pre-generation step shows a warning
1258
+ * banner and swaps the Generate CTA for "Create Colorable UTXOs". Wire
1259
+ * `onOpenCreateUtxos` to open your own RGB UTXO creation modal.
1260
+ */
1261
+ needsColorableUtxos?: boolean;
1262
+ onOpenCreateUtxos?: () => void;
1249
1263
  }
1250
- declare function DepositInvoiceGeneration({ handleBack, handleDone, selectedAsset, selectedAssetId, isNewAsset, channelsLoading, channels, network, setNetwork, isLightningAvailable, isRgbConnected, isSparkConnected, isArkadeConnected, isSparkLightning, maxDepositAmount, usePrivacy, setUsePrivacy, walletChoice, setWalletChoice, arkSubMode, setArkSubMode, btcSelectedAccount, gen, }: DepositInvoiceGenerationProps): react_jsx_runtime.JSX.Element;
1264
+ declare function DepositInvoiceGeneration({ handleBack, handleDone, selectedAsset, selectedAssetId, isNewAsset, channelsLoading, channels, network, setNetwork, isLightningAvailable, isRgbConnected, isSparkConnected, isArkadeConnected, isSparkLightning, maxDepositAmount, usePrivacy, setUsePrivacy, walletChoice, setWalletChoice, arkSubMode, setArkSubMode, btcSelectedAccount, gen, needsColorableUtxos, onOpenCreateUtxos, }: DepositInvoiceGenerationProps): react_jsx_runtime.JSX.Element;
1251
1265
 
1252
1266
  type ToasterToast = ToastProps & {
1253
1267
  id: string;
package/dist/web/index.js CHANGED
@@ -5247,7 +5247,9 @@ function DepositPreGeneration({
5247
5247
  amount,
5248
5248
  handleAmountChange,
5249
5249
  getUnitLabel,
5250
- generateInvoice
5250
+ generateInvoice,
5251
+ needsColorableUtxos = false,
5252
+ onOpenCreateUtxos
5251
5253
  }) {
5252
5254
  const method = METHOD_META2[currentMethod];
5253
5255
  return /* @__PURE__ */ jsxs44("div", { className: "space-y-3", children: [
@@ -5352,13 +5354,20 @@ function DepositPreGeneration({
5352
5354
  }
5353
5355
  )
5354
5356
  ] }),
5355
- !isAutoGenerate && /* @__PURE__ */ jsx57(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ jsxs44("span", { className: "flex items-center justify-center gap-2", children: [
5357
+ needsColorableUtxos && /* @__PURE__ */ jsxs44(AlertBanner, { variant: "warning", children: [
5358
+ /* @__PURE__ */ jsx57("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "Colorable UTXOs Required" }),
5359
+ /* @__PURE__ */ jsx57("p", { className: "text-tiny text-warning/70", children: "To receive RGB assets on-chain you need at least one uncolored UTXO. Create some now and the invoice will be generated automatically." })
5360
+ ] }),
5361
+ !isAutoGenerate && (needsColorableUtxos && onOpenCreateUtxos ? /* @__PURE__ */ jsx57(Button, { variant: "cta", size: "cta", onClick: onOpenCreateUtxos, disabled: loading, children: /* @__PURE__ */ jsxs44("span", { className: "flex items-center justify-center gap-2", children: [
5362
+ /* @__PURE__ */ jsx57("span", { className: "material-symbols-outlined text-icon-md", children: "add_circle" }),
5363
+ "Create Colorable UTXOs"
5364
+ ] }) }) : /* @__PURE__ */ jsx57(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ jsxs44("span", { className: "flex items-center justify-center gap-2", children: [
5356
5365
  /* @__PURE__ */ jsx57("span", { className: "material-symbols-outlined animate-spin text-icon-md", children: "progress_activity" }),
5357
5366
  "Generating..."
5358
5367
  ] }) : /* @__PURE__ */ jsxs44("span", { className: "flex items-center justify-center gap-2", children: [
5359
5368
  /* @__PURE__ */ jsx57("span", { className: "material-symbols-outlined text-icon-md", children: "qr_code_2" }),
5360
5369
  "Generate Address"
5361
- ] }) })
5370
+ ] }) }))
5362
5371
  ] });
5363
5372
  }
5364
5373
 
@@ -5738,7 +5747,9 @@ function DepositInvoiceGeneration({
5738
5747
  arkSubMode,
5739
5748
  setArkSubMode,
5740
5749
  btcSelectedAccount,
5741
- gen
5750
+ gen,
5751
+ needsColorableUtxos,
5752
+ onOpenCreateUtxos
5742
5753
  }) {
5743
5754
  const {
5744
5755
  amount,
@@ -5959,7 +5970,9 @@ function DepositInvoiceGeneration({
5959
5970
  amount,
5960
5971
  handleAmountChange,
5961
5972
  getUnitLabel,
5962
- generateInvoice
5973
+ generateInvoice,
5974
+ needsColorableUtxos,
5975
+ onOpenCreateUtxos
5963
5976
  }
5964
5977
  ) : /* @__PURE__ */ jsx59(
5965
5978
  DepositGeneratedView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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",