kaleido-ui 0.2.2 → 0.2.4
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/README.md +37 -10
- package/dist/icon-AvUL0Cws.d.cts +135 -0
- package/dist/icon-AvUL0Cws.d.ts +135 -0
- package/dist/native/index.cjs +0 -126
- package/dist/native/index.js +0 -126
- package/dist/web/assets/kaleidoswap-brand.js +11 -0
- package/dist/web/assets/protocol-icons.js +7 -0
- package/dist/web/chunk-25RRZDZ2.js +269 -0
- package/dist/web/chunk-27CY5EHL.js +230 -0
- package/dist/web/chunk-2GNXC446.js +84 -0
- package/dist/web/chunk-2NCH2ZDU.js +129 -0
- package/dist/web/chunk-2OGYEUYV.js +220 -0
- package/dist/web/chunk-2Q5SSNFO.js +63 -0
- package/dist/web/chunk-2REWXJEN.js +96 -0
- package/dist/web/chunk-2VAS6VYJ.js +106 -0
- package/dist/web/chunk-2VKFRAX3.js +39 -0
- package/dist/web/chunk-2Z6KFK4Z.js +41 -0
- package/dist/web/chunk-4246Y2F2.js +276 -0
- package/dist/web/chunk-4MLPMRXA.js +85 -0
- package/dist/web/chunk-4QLR4ZNK.js +383 -0
- package/dist/web/chunk-4UMKXXAK.js +33 -0
- package/dist/web/chunk-563GMWFT.js +32 -0
- package/dist/web/chunk-5BNDC7M4.js +50 -0
- package/dist/web/chunk-5GBURTY4.js +33 -0
- package/dist/web/chunk-5MM5YGGG.js +43 -0
- package/dist/web/chunk-5PZ2XVWL.js +85 -0
- package/dist/web/chunk-5V2KMO56.js +55 -0
- package/dist/web/chunk-5WBAFYPH.js +62 -0
- package/dist/web/chunk-62HIDJCD.js +98 -0
- package/dist/web/chunk-6IBQJIHT.js +56 -0
- package/dist/web/chunk-6PNGSAJB.js +55 -0
- package/dist/web/chunk-6VKWG5FJ.js +159 -0
- package/dist/web/chunk-76DAZT7Q.js +107 -0
- package/dist/web/chunk-7NS5S2PG.js +126 -0
- package/dist/web/chunk-7OE6AXLY.js +27 -0
- package/dist/web/chunk-7YUPXESC.js +666 -0
- package/dist/web/chunk-A3TKIXSI.js +197 -0
- package/dist/web/chunk-A3XHFJ6J.js +120 -0
- package/dist/web/chunk-A6MSV4MA.js +83 -0
- package/dist/web/chunk-A7MPRLJL.js +169 -0
- package/dist/web/chunk-AP7Q2FCS.js +43 -0
- package/dist/web/chunk-ASHU5XNR.js +21 -0
- package/dist/web/chunk-BGUBHWIO.js +41 -0
- package/dist/web/chunk-BY2KCPTX.js +444 -0
- package/dist/web/chunk-C7YIQDGQ.js +57 -0
- package/dist/web/chunk-CBE7BT3M.js +87 -0
- package/dist/web/chunk-CJATW6EO.js +108 -0
- package/dist/web/chunk-CRDCVB5X.js +96 -0
- package/dist/web/chunk-CRMLYZIX.js +35 -0
- package/dist/web/chunk-CXMCWSWC.js +20 -0
- package/dist/web/chunk-CZPNI33A.js +31 -0
- package/dist/web/chunk-DCUAE6PX.js +202 -0
- package/dist/web/chunk-DDMDRAD6.js +403 -0
- package/dist/web/chunk-DH7VXKGM.js +247 -0
- package/dist/web/chunk-DNHRMPKI.js +63 -0
- package/dist/web/chunk-DXFFYCU3.js +83 -0
- package/dist/web/chunk-EK5N3ZPW.js +417 -0
- package/dist/web/chunk-F2LIZX5K.js +140 -0
- package/dist/web/chunk-FSQV54O4.js +61 -0
- package/dist/web/chunk-FWOIRFV5.js +73 -0
- package/dist/web/chunk-G2MJL3VP.js +54 -0
- package/dist/web/chunk-G2ZYNR3W.js +28 -0
- package/dist/web/chunk-G373WZMN.js +150 -0
- package/dist/web/chunk-GMJGTSCQ.js +82 -0
- package/dist/web/chunk-GX7GBHJ6.js +362 -0
- package/dist/web/chunk-GZZ5KVON.js +70 -0
- package/dist/web/chunk-H3GYLFHP.js +30 -0
- package/dist/web/chunk-HDLOPDFX.js +89 -0
- package/dist/web/chunk-HP25HN7Q.js +69 -0
- package/dist/web/chunk-HVKSBEZN.js +98 -0
- package/dist/web/chunk-HWKXZNBN.js +74 -0
- package/dist/web/chunk-HY3VMT27.js +64 -0
- package/dist/web/chunk-IK32AIOS.js +27 -0
- package/dist/web/chunk-IMER4KGH.js +151 -0
- package/dist/web/chunk-IV6AAVUE.js +177 -0
- package/dist/web/chunk-JWMFTRDC.js +254 -0
- package/dist/web/chunk-JY3H7ZAI.js +41 -0
- package/dist/web/chunk-JY73M73T.js +175 -0
- package/dist/web/chunk-JYM5NHBA.js +80 -0
- package/dist/web/chunk-JZ3BUM5L.js +368 -0
- package/dist/web/chunk-KIMWCG5N.js +108 -0
- package/dist/web/chunk-L2UPQLY7.js +43 -0
- package/dist/web/chunk-LFAORJQK.js +81 -0
- package/dist/web/chunk-LOGZGZWN.js +1 -0
- package/dist/web/chunk-LPDB7EHH.js +65 -0
- package/dist/web/chunk-LSY4DY2I.js +72 -0
- package/dist/web/chunk-LYCLVP26.js +101 -0
- package/dist/web/chunk-LZ6PIXUO.js +43 -0
- package/dist/web/chunk-LZ723UCB.js +96 -0
- package/dist/web/chunk-M6RXTQEL.js +90 -0
- package/dist/web/chunk-MTQ22SKE.js +39 -0
- package/dist/web/chunk-MTQOAMDW.js +8 -0
- package/dist/web/chunk-NEXA6VGG.js +91 -0
- package/dist/web/chunk-NSA777UY.js +89 -0
- package/dist/web/chunk-O2TTO5FS.js +24 -0
- package/dist/web/chunk-O6NPTMDN.js +191 -0
- package/dist/web/chunk-OI7WX7NE.js +17 -0
- package/dist/web/chunk-OWSKP527.js +80 -0
- package/dist/web/chunk-OX3J3FYX.js +64 -0
- package/dist/web/chunk-PCKRLEAO.js +40 -0
- package/dist/web/chunk-PMGIJMRO.js +207 -0
- package/dist/web/chunk-PS7Q6MMU.js +60 -0
- package/dist/web/chunk-PTSOVDKH.js +169 -0
- package/dist/web/chunk-QBZSLR7U.js +54 -0
- package/dist/web/chunk-QCQRA6L5.js +63 -0
- package/dist/web/chunk-QFIGSIXA.js +558 -0
- package/dist/web/chunk-QRFFLA3N.js +84 -0
- package/dist/web/chunk-QXCCUYNY.js +232 -0
- package/dist/web/chunk-QXZ2WY3B.js +38 -0
- package/dist/web/chunk-R2MV4S4U.js +50 -0
- package/dist/web/chunk-R3IIXFGK.js +48 -0
- package/dist/web/chunk-RIOY4LFJ.js +141 -0
- package/dist/web/chunk-RV7Z3B3V.js +106 -0
- package/dist/web/chunk-RXXYUYBP.js +25 -0
- package/dist/web/chunk-S2ICIIH2.js +109 -0
- package/dist/web/chunk-SJNOBBU5.js +86 -0
- package/dist/web/chunk-STMNX3QT.js +109 -0
- package/dist/web/chunk-T7CEJV6P.js +66 -0
- package/dist/web/chunk-TBEKRQGW.js +99 -0
- package/dist/web/chunk-TCFHH5TE.js +179 -0
- package/dist/web/chunk-TI7NWMEQ.js +34 -0
- package/dist/web/chunk-TKRMGN7J.js +8 -0
- package/dist/web/chunk-TMK3SVYI.js +62 -0
- package/dist/web/chunk-TPGNO74K.js +67 -0
- package/dist/web/chunk-TS4UYWJJ.js +105 -0
- package/dist/web/chunk-TY6SGZC7.js +94 -0
- package/dist/web/chunk-UHXOPILM.js +101 -0
- package/dist/web/chunk-UK6ZL4MX.js +375 -0
- package/dist/web/chunk-UXLWWQ4J.js +20 -0
- package/dist/web/chunk-UZ4LWR4X.js +26 -0
- package/dist/web/chunk-VLZMX43R.js +45 -0
- package/dist/web/chunk-VM6AGMYO.js +46 -0
- package/dist/web/chunk-VUGV3ELU.js +176 -0
- package/dist/web/chunk-VYQHGSK6.js +244 -0
- package/dist/web/chunk-VZF5C3C6.js +146 -0
- package/dist/web/chunk-W4E2N3UN.js +58 -0
- package/dist/web/chunk-WEPSTI3Z.js +83 -0
- package/dist/web/chunk-WOAWUXER.js +139 -0
- package/dist/web/chunk-WURSWAKE.js +74 -0
- package/dist/web/chunk-WWF7IJBF.js +330 -0
- package/dist/web/chunk-X2RA4EG3.js +86 -0
- package/dist/web/chunk-XCQGJYGF.js +42 -0
- package/dist/web/chunk-XDSOOOYL.js +35 -0
- package/dist/web/chunk-XPHFJPUQ.js +291 -0
- package/dist/web/chunk-XXH4TYKZ.js +276 -0
- package/dist/web/chunk-XZQUQOR3.js +48 -0
- package/dist/web/chunk-Y3W6LOOE.js +66 -0
- package/dist/web/chunk-YNB4SSLD.js +113 -0
- package/dist/web/chunk-YQDCU7ZL.js +49 -0
- package/dist/web/chunk-YQQ7GDLZ.js +30 -0
- package/dist/web/chunk-YTXWYWVD.js +70 -0
- package/dist/web/chunk-YXVOFEDT.js +85 -0
- package/dist/web/chunk-Z2SS7UJ4.js +139 -0
- package/dist/web/chunk-Z5LVT3BD.js +128 -0
- package/dist/web/chunk-Z5O67WTL.js +85 -0
- package/dist/web/chunk-ZPNGHBKB.js +86 -0
- package/dist/web/chunk-ZR32WYJA.js +55 -0
- package/dist/web/chunk-ZRIBB4EB.js +62 -0
- package/dist/web/chunk-ZTVV4KBT.js +28 -0
- package/dist/web/chunk-ZXCT3Y6P.js +56 -0
- package/dist/web/components/account-capabilities-card.js +21 -0
- package/dist/web/components/account-menu.js +18 -0
- package/dist/web/components/account-settings-shared.js +50 -0
- package/dist/web/components/account-status-tabs.js +20 -0
- package/dist/web/components/action-tile.js +8 -0
- package/dist/web/components/activity-detail-row.js +22 -0
- package/dist/web/components/activity-filter-bar.js +22 -0
- package/dist/web/components/activity-list.js +23 -0
- package/dist/web/components/activity-network-filters.js +19 -0
- package/dist/web/components/activity-row.js +15 -0
- package/dist/web/components/activity-type-tabs.js +17 -0
- package/dist/web/components/alert-banner.js +13 -0
- package/dist/web/components/amount.js +8 -0
- package/dist/web/components/app-icon.js +15 -0
- package/dist/web/components/asset-card.js +21 -0
- package/dist/web/components/asset-icon.js +10 -0
- package/dist/web/components/asset-selector.js +24 -0
- package/dist/web/components/balance-breakdown.js +18 -0
- package/dist/web/components/basic-collapsible.js +11 -0
- package/dist/web/components/bottom-nav.js +13 -0
- package/dist/web/components/bottom-sheet.js +15 -0
- package/dist/web/components/btc-unified-receive.js +28 -0
- package/dist/web/components/charts/bar-chart.js +24 -0
- package/dist/web/components/charts/bar-list.js +24 -0
- package/dist/web/components/charts/core.js +63 -0
- package/dist/web/components/charts/donut-chart.js +26 -0
- package/dist/web/components/charts/index.js +72 -0
- package/dist/web/components/charts/line-chart.js +26 -0
- package/dist/web/components/charts/meter.js +24 -0
- package/dist/web/components/charts/mixed-chart.js +24 -0
- package/dist/web/components/charts/scatter-chart.js +24 -0
- package/dist/web/components/charts/sparkline.js +8 -0
- package/dist/web/components/choice-group.js +11 -0
- package/dist/web/components/code-block.js +21 -0
- package/dist/web/components/confirm-dialog.js +15 -0
- package/dist/web/components/copy-button.js +21 -0
- package/dist/web/components/copyable.js +20 -0
- package/dist/web/components/date-range-filter.js +16 -0
- package/dist/web/components/deposit-asset-selection.js +24 -0
- package/dist/web/components/deposit-generated-view.js +23 -0
- package/dist/web/components/deposit-invoice-generation.js +35 -0
- package/dist/web/components/deposit-network-default-modal.js +13 -0
- package/dist/web/components/deposit-pre-generation.js +17 -0
- package/dist/web/components/deposit-success-screen.js +20 -0
- package/dist/web/components/deposit-ui-shared.js +28 -0
- package/dist/web/components/disclosure-card.js +11 -0
- package/dist/web/components/dotted-leader.js +8 -0
- package/dist/web/components/empty-state.js +8 -0
- package/dist/web/components/environment-indicator.js +9 -0
- package/dist/web/components/error-boundary.js +10 -0
- package/dist/web/components/event-timeline.js +8 -0
- package/dist/web/components/extension-page-frame.js +15 -0
- package/dist/web/components/filter-bar.js +15 -0
- package/dist/web/components/filter-chip-group.js +8 -0
- package/dist/web/components/filter-dropdown.js +12 -0
- package/dist/web/components/floating-notice.js +12 -0
- package/dist/web/components/form-field.js +10 -0
- package/dist/web/components/halo-backdrop.js +8 -0
- package/dist/web/components/info-chip.js +24 -0
- package/dist/web/components/info-panel.js +13 -0
- package/dist/web/components/inline-selector.js +11 -0
- package/dist/web/components/instants-statement.js +20 -0
- package/dist/web/components/kaleidoscope-hero-animation.js +11 -0
- package/dist/web/components/kaleidoswap-logo.js +12 -0
- package/dist/web/components/list-field.js +14 -0
- package/dist/web/components/list-summary.js +8 -0
- package/dist/web/components/metric-card.js +14 -0
- package/dist/web/components/mobile-hero-animation.js +8 -0
- package/dist/web/components/network-badge.js +14 -0
- package/dist/web/components/network-icon.js +21 -0
- package/dist/web/components/network-status-chip.js +11 -0
- package/dist/web/components/notice-bar.js +8 -0
- package/dist/web/components/one-time-secret-dialog.js +18 -0
- package/dist/web/components/option-selector.js +12 -0
- package/dist/web/components/page-header.js +12 -0
- package/dist/web/components/page-shell.js +18 -0
- package/dist/web/components/pager.js +11 -0
- package/dist/web/components/period-select.js +20 -0
- package/dist/web/components/qr-code.js +10 -0
- package/dist/web/components/query-state.js +19 -0
- package/dist/web/components/read-status.js +15 -0
- package/dist/web/components/record-list.js +17 -0
- package/dist/web/components/recovery-phrase-card.js +20 -0
- package/dist/web/components/restricted.js +9 -0
- package/dist/web/components/secret-reveal-card.js +20 -0
- package/dist/web/components/section-header.js +9 -0
- package/dist/web/components/section-label.js +8 -0
- package/dist/web/components/selectable-card.js +8 -0
- package/dist/web/components/setting-item.js +13 -0
- package/dist/web/components/settings-section-card.js +11 -0
- package/dist/web/components/settings-selector-row.js +8 -0
- package/dist/web/components/settings-tile.js +21 -0
- package/dist/web/components/skeleton.js +10 -0
- package/dist/web/components/status-badge.js +13 -0
- package/dist/web/components/status-icon-badge.js +15 -0
- package/dist/web/components/stepper-number-input.js +10 -0
- package/dist/web/components/summary-rows.js +9 -0
- package/dist/web/components/swap-badge.js +11 -0
- package/dist/web/components/swap-input-card.js +28 -0
- package/dist/web/components/swap-step-list.js +10 -0
- package/dist/web/components/switch-row.js +9 -0
- package/dist/web/components/theme-toggle.js +12 -0
- package/dist/web/components/transaction-card.js +14 -0
- package/dist/web/components/trend-chart.js +28 -0
- package/dist/web/components/value-list.js +20 -0
- package/dist/web/components/wallet-asset-list.js +22 -0
- package/dist/web/components/withdraw-amount-input.js +13 -0
- package/dist/web/components/withdraw-confirmation.js +17 -0
- package/dist/web/components/withdraw-destination-input.js +14 -0
- package/dist/web/components/withdraw-invoice-info.js +10 -0
- package/dist/web/components/withdraw-route-selector.js +9 -0
- package/dist/web/components/withdraw-success.js +12 -0
- package/dist/web/hooks/use-asset-icon.js +11 -0
- package/dist/web/hooks/use-copy-to-clipboard.js +7 -0
- package/dist/web/hooks/use-media-query.js +9 -0
- package/dist/web/hooks/use-theme-mode.js +9 -0
- package/dist/web/hooks/use-toast.js +11 -0
- package/dist/web/icons/filled.js +15 -0
- package/dist/web/icons/index.js +13 -0
- package/dist/web/icons/outlined.js +221 -0
- package/dist/web/icons/public.js +248 -0
- package/dist/web/icons.cjs +776 -0
- package/dist/web/icons.d.cts +123 -0
- package/dist/web/icons.d.ts +123 -0
- package/dist/web/index.cjs +2547 -2496
- package/dist/web/index.d.cts +16 -107
- package/dist/web/index.d.ts +16 -107
- package/dist/web/index.js +592 -14464
- package/dist/web/primitives/avatar.js +10 -0
- package/dist/web/primitives/button.js +10 -0
- package/dist/web/primitives/card.js +20 -0
- package/dist/web/primitives/collapsible.js +16 -0
- package/dist/web/primitives/dialog.js +30 -0
- package/dist/web/primitives/dot-pagination.js +8 -0
- package/dist/web/primitives/drawer.js +43 -0
- package/dist/web/primitives/dropdown-menu.js +28 -0
- package/dist/web/primitives/glyph-button.js +10 -0
- package/dist/web/primitives/icon-button.js +15 -0
- package/dist/web/primitives/icon-glyph.js +8 -0
- package/dist/web/primitives/icon.js +16 -0
- package/dist/web/primitives/input.js +9 -0
- package/dist/web/primitives/label.js +9 -0
- package/dist/web/primitives/menu-search.js +20 -0
- package/dist/web/primitives/number-input.js +11 -0
- package/dist/web/primitives/popover.js +18 -0
- package/dist/web/primitives/scroll-area.js +12 -0
- package/dist/web/primitives/select.js +27 -0
- package/dist/web/primitives/switch.js +8 -0
- package/dist/web/primitives/table.js +27 -0
- package/dist/web/primitives/tabs.js +14 -0
- package/dist/web/primitives/toast.js +24 -0
- package/dist/web/primitives/toaster.js +15 -0
- package/dist/web/primitives/tooltip.js +10 -0
- package/dist/web/utils/amount-display.js +13 -0
- package/dist/web/utils/cn.js +7 -0
- package/dist/web/utils/field-styles.js +7 -0
- package/dist/web/utils/type-roles.js +7 -0
- package/package.json +9 -1
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
DepositGeneratedView
|
|
4
|
+
} from "./chunk-DH7VXKGM.js";
|
|
5
|
+
import {
|
|
6
|
+
DepositPreGeneration
|
|
7
|
+
} from "./chunk-27CY5EHL.js";
|
|
8
|
+
import {
|
|
9
|
+
DepositSuccessScreen
|
|
10
|
+
} from "./chunk-FWOIRFV5.js";
|
|
11
|
+
import {
|
|
12
|
+
BtcUnifiedReceive
|
|
13
|
+
} from "./chunk-A3TKIXSI.js";
|
|
14
|
+
import {
|
|
15
|
+
AccountChoiceChip,
|
|
16
|
+
MethodChoiceChip,
|
|
17
|
+
NETWORK_CONFIG
|
|
18
|
+
} from "./chunk-GX7GBHJ6.js";
|
|
19
|
+
import {
|
|
20
|
+
ScrollArea
|
|
21
|
+
} from "./chunk-DCUAE6PX.js";
|
|
22
|
+
import {
|
|
23
|
+
GlyphButton
|
|
24
|
+
} from "./chunk-JY3H7ZAI.js";
|
|
25
|
+
import {
|
|
26
|
+
eyebrow
|
|
27
|
+
} from "./chunk-MTQOAMDW.js";
|
|
28
|
+
import {
|
|
29
|
+
IconGlyph
|
|
30
|
+
} from "./chunk-YQQ7GDLZ.js";
|
|
31
|
+
import {
|
|
32
|
+
ArrowBack,
|
|
33
|
+
ProgressActivity
|
|
34
|
+
} from "./chunk-XXH4TYKZ.js";
|
|
35
|
+
import {
|
|
36
|
+
cn
|
|
37
|
+
} from "./chunk-PMGIJMRO.js";
|
|
38
|
+
|
|
39
|
+
// src/web/components/deposit-invoice-generation.tsx
|
|
40
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
+
var ACCOUNT_TITLES = {
|
|
42
|
+
RGB: "RGB & Lightning",
|
|
43
|
+
SPARK: "Spark",
|
|
44
|
+
ARKADE: "Arkade",
|
|
45
|
+
LIQUID: "Liquid"
|
|
46
|
+
};
|
|
47
|
+
function getAssetFamily(assetId, ticker) {
|
|
48
|
+
if (assetId === "BTC") return "BTC";
|
|
49
|
+
const normalized = (ticker || "").trim().toUpperCase();
|
|
50
|
+
if (normalized.startsWith("SPARK")) return "SPARK";
|
|
51
|
+
if (normalized.startsWith("ARK")) return "ARKADE";
|
|
52
|
+
return "RGB";
|
|
53
|
+
}
|
|
54
|
+
function resolveReceiveAccounts({
|
|
55
|
+
assetFamily,
|
|
56
|
+
accounts
|
|
57
|
+
}) {
|
|
58
|
+
if (assetFamily === "RGB") return accounts.RGB ? ["RGB"] : [];
|
|
59
|
+
if (assetFamily === "SPARK") return accounts.SPARK ? ["SPARK"] : [];
|
|
60
|
+
if (assetFamily === "ARKADE") return accounts.ARKADE ? ["ARKADE"] : [];
|
|
61
|
+
return ["RGB", "SPARK", "ARKADE"].filter((account) => accounts[account]);
|
|
62
|
+
}
|
|
63
|
+
function resolveReceiveMethodOptions({
|
|
64
|
+
account,
|
|
65
|
+
assetFamily,
|
|
66
|
+
accounts,
|
|
67
|
+
isLightningAvailable
|
|
68
|
+
}) {
|
|
69
|
+
const options = [];
|
|
70
|
+
if (account === "RGB") {
|
|
71
|
+
options.push({ method: "bitcoin_l1", enabled: accounts.RGB });
|
|
72
|
+
if (assetFamily === "BTC" || assetFamily === "RGB") {
|
|
73
|
+
options.push({
|
|
74
|
+
method: "lightning",
|
|
75
|
+
enabled: accounts.RGB && isLightningAvailable,
|
|
76
|
+
disabledReason: isLightningAvailable ? void 0 : "unavailable"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (account === "SPARK") {
|
|
81
|
+
options.push({ method: "spark", enabled: accounts.SPARK });
|
|
82
|
+
}
|
|
83
|
+
if (account === "ARKADE") {
|
|
84
|
+
options.push({ method: "arkade", enabled: accounts.ARKADE });
|
|
85
|
+
if (assetFamily === "BTC") options.push({ method: "boarding", enabled: accounts.ARKADE });
|
|
86
|
+
}
|
|
87
|
+
return options;
|
|
88
|
+
}
|
|
89
|
+
function DepositInvoiceGeneration({
|
|
90
|
+
handleBack,
|
|
91
|
+
handleDone,
|
|
92
|
+
selectedAsset,
|
|
93
|
+
selectedAssetId,
|
|
94
|
+
isNewAsset,
|
|
95
|
+
channelsLoading,
|
|
96
|
+
channels,
|
|
97
|
+
network,
|
|
98
|
+
setNetwork,
|
|
99
|
+
isLightningAvailable,
|
|
100
|
+
isRgbConnected,
|
|
101
|
+
isSparkConnected,
|
|
102
|
+
isArkadeConnected,
|
|
103
|
+
isSparkLightning,
|
|
104
|
+
maxDepositAmount,
|
|
105
|
+
usePrivacy,
|
|
106
|
+
setUsePrivacy,
|
|
107
|
+
walletChoice,
|
|
108
|
+
setWalletChoice,
|
|
109
|
+
arkSubMode,
|
|
110
|
+
setArkSubMode,
|
|
111
|
+
btcSelectedAccount,
|
|
112
|
+
gen,
|
|
113
|
+
needsColorableUtxos,
|
|
114
|
+
onOpenCreateUtxos
|
|
115
|
+
}) {
|
|
116
|
+
const {
|
|
117
|
+
amount,
|
|
118
|
+
address,
|
|
119
|
+
recipientId,
|
|
120
|
+
loading,
|
|
121
|
+
depositDetected,
|
|
122
|
+
invoiceStatus,
|
|
123
|
+
isInvoicePending,
|
|
124
|
+
isInvoicePaid,
|
|
125
|
+
isInvoiceFailedOrExpired,
|
|
126
|
+
accountReceiveResult,
|
|
127
|
+
copied,
|
|
128
|
+
handleAmountChange,
|
|
129
|
+
generateInvoice,
|
|
130
|
+
copyToClipboard,
|
|
131
|
+
getUnitLabel,
|
|
132
|
+
setAddress,
|
|
133
|
+
setRecipientId,
|
|
134
|
+
setAmount,
|
|
135
|
+
setInvoiceStatus,
|
|
136
|
+
setAccountReceiveResult
|
|
137
|
+
} = gen;
|
|
138
|
+
const isBtc = selectedAssetId === "BTC";
|
|
139
|
+
const assetFamily = getAssetFamily(selectedAssetId, selectedAsset?.ticker);
|
|
140
|
+
const displayTicker = selectedAsset?.ticker ?? (isBtc ? "BTC" : "RGB");
|
|
141
|
+
const selectedAccount = network === "spark" ? "SPARK" : network === "arkade" ? "ARKADE" : network === "lightning" && isBtc && walletChoice === "SPARK" ? "SPARK" : "RGB";
|
|
142
|
+
const currentMethod = network === "spark" ? "spark" : network === "arkade" ? arkSubMode === "boarding" ? "boarding" : "arkade" : network === "lightning" ? "lightning" : "bitcoin_l1";
|
|
143
|
+
const routeAccounts = {
|
|
144
|
+
RGB: isRgbConnected,
|
|
145
|
+
SPARK: isSparkConnected,
|
|
146
|
+
ARKADE: isArkadeConnected,
|
|
147
|
+
// Liquid isn't offered by kaleido-ui's own DepositInvoiceGeneration; the
|
|
148
|
+
// KaleidoSwap extension uses its own component for the Liquid receive path.
|
|
149
|
+
LIQUID: false
|
|
150
|
+
};
|
|
151
|
+
const availableAccounts = resolveReceiveAccounts({ assetFamily, accounts: routeAccounts });
|
|
152
|
+
const methodOptions = resolveReceiveMethodOptions({
|
|
153
|
+
account: selectedAccount,
|
|
154
|
+
assetFamily,
|
|
155
|
+
accounts: routeAccounts,
|
|
156
|
+
isLightningAvailable
|
|
157
|
+
});
|
|
158
|
+
const applyMethodSelection = (account, method) => {
|
|
159
|
+
if (account === "SPARK") setWalletChoice("SPARK");
|
|
160
|
+
else if (account === "RGB") setWalletChoice("RGB");
|
|
161
|
+
switch (method) {
|
|
162
|
+
case "bitcoin_l1":
|
|
163
|
+
setNetwork("onchain");
|
|
164
|
+
setWalletChoice("RGB");
|
|
165
|
+
break;
|
|
166
|
+
case "lightning":
|
|
167
|
+
setNetwork("lightning");
|
|
168
|
+
setWalletChoice(account === "SPARK" ? "SPARK" : "RGB");
|
|
169
|
+
break;
|
|
170
|
+
case "spark":
|
|
171
|
+
setNetwork("spark");
|
|
172
|
+
setWalletChoice("SPARK");
|
|
173
|
+
break;
|
|
174
|
+
case "arkade":
|
|
175
|
+
setNetwork("arkade");
|
|
176
|
+
setArkSubMode("ark");
|
|
177
|
+
break;
|
|
178
|
+
case "boarding":
|
|
179
|
+
setNetwork("arkade");
|
|
180
|
+
setArkSubMode("boarding");
|
|
181
|
+
break;
|
|
182
|
+
case "submarine_swap":
|
|
183
|
+
setNetwork("lightning");
|
|
184
|
+
setWalletChoice("RGB");
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const handleAccountSelect = (account) => {
|
|
189
|
+
const nextOptions = resolveReceiveMethodOptions({
|
|
190
|
+
account,
|
|
191
|
+
assetFamily,
|
|
192
|
+
accounts: routeAccounts,
|
|
193
|
+
isLightningAvailable
|
|
194
|
+
}).filter((option) => option.enabled).map((option) => option.method);
|
|
195
|
+
const nextMethod = nextOptions.includes(currentMethod) ? currentMethod : nextOptions[0];
|
|
196
|
+
if (nextMethod) applyMethodSelection(account, nextMethod);
|
|
197
|
+
};
|
|
198
|
+
if (depositDetected) {
|
|
199
|
+
return /* @__PURE__ */ jsx(
|
|
200
|
+
DepositSuccessScreen,
|
|
201
|
+
{
|
|
202
|
+
handleDone,
|
|
203
|
+
displayTicker,
|
|
204
|
+
selectedAsset,
|
|
205
|
+
network,
|
|
206
|
+
arkSubMode
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
const net = NETWORK_CONFIG[network];
|
|
211
|
+
const isAutoGenerate = network === "onchain" && isBtc || network === "spark" || network === "arkade" || network === "lightning";
|
|
212
|
+
const addressLabel = network === "spark" ? "Spark Address" : network === "arkade" ? arkSubMode === "boarding" ? "Boarding Address" : "Arkade Address" : network === "lightning" ? "Lightning Invoice" : "Deposit Address";
|
|
213
|
+
const showChannelWarning = selectedAccount === "RGB" && network === "lightning" && !channelsLoading && channels.length === 0 && !isSparkConnected;
|
|
214
|
+
const showLiquidityWarning = !isSparkLightning && network === "lightning" && maxDepositAmount === 0 && !channelsLoading && !isBtc;
|
|
215
|
+
const isNewRgbAsset = isNewAsset && assetFamily === "RGB";
|
|
216
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative flex h-screen flex-col overflow-hidden bg-background bg-page-radial pt-16 font-display text-foreground", children: [
|
|
217
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-4 top-4 z-30", children: /* @__PURE__ */ jsx(GlyphButton, { icon: ArrowBack, label: "Go back", size: "lg", onClick: handleBack }) }),
|
|
218
|
+
(() => {
|
|
219
|
+
const hideDestinationRail = isNewAsset && (network === "spark" || network === "arkade");
|
|
220
|
+
if (hideDestinationRail) return null;
|
|
221
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 px-4 py-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
222
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
223
|
+
/* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground", eyebrow), children: "Destination Account" }),
|
|
224
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: availableAccounts.map((account) => /* @__PURE__ */ jsx(
|
|
225
|
+
AccountChoiceChip,
|
|
226
|
+
{
|
|
227
|
+
account,
|
|
228
|
+
active: isBtc ? btcSelectedAccount === account : selectedAccount === account,
|
|
229
|
+
onClick: () => {
|
|
230
|
+
if (isBtc) {
|
|
231
|
+
if (account === "SPARK") {
|
|
232
|
+
setWalletChoice("SPARK");
|
|
233
|
+
setNetwork("spark");
|
|
234
|
+
} else if (account === "ARKADE") {
|
|
235
|
+
setNetwork("arkade");
|
|
236
|
+
setWalletChoice("RGB");
|
|
237
|
+
} else {
|
|
238
|
+
setWalletChoice("RGB");
|
|
239
|
+
setNetwork("onchain");
|
|
240
|
+
}
|
|
241
|
+
} else {
|
|
242
|
+
handleAccountSelect(account);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
account
|
|
247
|
+
)) })
|
|
248
|
+
] }),
|
|
249
|
+
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ jsxs("div", { children: [
|
|
250
|
+
/* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground", eyebrow), children: "Transfer Method" }),
|
|
251
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: methodOptions.map(({ method, enabled, disabledReason }) => /* @__PURE__ */ jsx(
|
|
252
|
+
MethodChoiceChip,
|
|
253
|
+
{
|
|
254
|
+
method,
|
|
255
|
+
active: currentMethod === method,
|
|
256
|
+
enabled,
|
|
257
|
+
disabledReason,
|
|
258
|
+
onClick: () => enabled && applyMethodSelection(selectedAccount, method)
|
|
259
|
+
},
|
|
260
|
+
method
|
|
261
|
+
)) })
|
|
262
|
+
] })
|
|
263
|
+
] }) });
|
|
264
|
+
})(),
|
|
265
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", viewportAs: "main", viewportClassName: "space-y-2.5 px-4 py-2.5", children: isBtc && accountReceiveResult ? /* @__PURE__ */ jsx(
|
|
266
|
+
BtcUnifiedReceive,
|
|
267
|
+
{
|
|
268
|
+
btcSelectedAccount,
|
|
269
|
+
accountReceiveResult,
|
|
270
|
+
invoiceStatus,
|
|
271
|
+
isInvoicePending,
|
|
272
|
+
isInvoicePaid,
|
|
273
|
+
isInvoiceFailedOrExpired,
|
|
274
|
+
amount,
|
|
275
|
+
handleAmountChange,
|
|
276
|
+
loading,
|
|
277
|
+
copied,
|
|
278
|
+
copyToClipboard,
|
|
279
|
+
setAddress,
|
|
280
|
+
setAmount,
|
|
281
|
+
setInvoiceStatus,
|
|
282
|
+
setAccountReceiveResult,
|
|
283
|
+
handleDone
|
|
284
|
+
}
|
|
285
|
+
) : isBtc && !accountReceiveResult && loading ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 py-10", children: [
|
|
286
|
+
/* @__PURE__ */ jsx(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
className: cn(
|
|
290
|
+
"flex size-16 items-center justify-center rounded-2xl shadow-raised",
|
|
291
|
+
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].bg
|
|
292
|
+
),
|
|
293
|
+
children: /* @__PURE__ */ jsx(
|
|
294
|
+
IconGlyph,
|
|
295
|
+
{
|
|
296
|
+
glyph: ProgressActivity,
|
|
297
|
+
className: cn(
|
|
298
|
+
"animate-spin text-icon-4xl",
|
|
299
|
+
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].text
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
)
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1 text-center", children: [
|
|
306
|
+
/* @__PURE__ */ jsx("p", { className: "text-caption font-bold text-muted-foreground", children: "Generating addresses..." }),
|
|
307
|
+
/* @__PURE__ */ jsx("p", { className: "text-caption text-foreground/55", children: ACCOUNT_TITLES[btcSelectedAccount] })
|
|
308
|
+
] })
|
|
309
|
+
] }) : !address ? /* @__PURE__ */ jsx(
|
|
310
|
+
DepositPreGeneration,
|
|
311
|
+
{
|
|
312
|
+
selectedAsset,
|
|
313
|
+
isBtc,
|
|
314
|
+
network,
|
|
315
|
+
net,
|
|
316
|
+
selectedAccount,
|
|
317
|
+
currentMethod,
|
|
318
|
+
channelsLoading,
|
|
319
|
+
showChannelWarning,
|
|
320
|
+
showLiquidityWarning,
|
|
321
|
+
isAutoGenerate,
|
|
322
|
+
loading,
|
|
323
|
+
usePrivacy,
|
|
324
|
+
setUsePrivacy,
|
|
325
|
+
amount,
|
|
326
|
+
handleAmountChange,
|
|
327
|
+
getUnitLabel,
|
|
328
|
+
generateInvoice,
|
|
329
|
+
needsColorableUtxos,
|
|
330
|
+
onOpenCreateUtxos,
|
|
331
|
+
showReceiveSummary: !isNewRgbAsset
|
|
332
|
+
}
|
|
333
|
+
) : /* @__PURE__ */ jsx(
|
|
334
|
+
DepositGeneratedView,
|
|
335
|
+
{
|
|
336
|
+
network,
|
|
337
|
+
net,
|
|
338
|
+
isBtc,
|
|
339
|
+
address,
|
|
340
|
+
addressLabel,
|
|
341
|
+
recipientId,
|
|
342
|
+
arkSubMode,
|
|
343
|
+
invoiceStatus,
|
|
344
|
+
isInvoicePending,
|
|
345
|
+
isInvoicePaid,
|
|
346
|
+
isInvoiceFailedOrExpired,
|
|
347
|
+
amount,
|
|
348
|
+
handleAmountChange,
|
|
349
|
+
loading,
|
|
350
|
+
copied,
|
|
351
|
+
copyToClipboard,
|
|
352
|
+
getUnitLabel,
|
|
353
|
+
selectedAsset,
|
|
354
|
+
maxDepositAmount,
|
|
355
|
+
setAddress,
|
|
356
|
+
setRecipientId,
|
|
357
|
+
setAmount,
|
|
358
|
+
setInvoiceStatus,
|
|
359
|
+
handleDone,
|
|
360
|
+
showQrNetworkBadge: false
|
|
361
|
+
}
|
|
362
|
+
) })
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export {
|
|
367
|
+
DepositInvoiceGeneration
|
|
368
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Button
|
|
4
|
+
} from "./chunk-OWSKP527.js";
|
|
5
|
+
import {
|
|
6
|
+
IconGlyph
|
|
7
|
+
} from "./chunk-YQQ7GDLZ.js";
|
|
8
|
+
import {
|
|
9
|
+
Check,
|
|
10
|
+
Refresh
|
|
11
|
+
} from "./chunk-XXH4TYKZ.js";
|
|
12
|
+
import {
|
|
13
|
+
cn
|
|
14
|
+
} from "./chunk-PMGIJMRO.js";
|
|
15
|
+
|
|
16
|
+
// src/web/components/read-status.tsx
|
|
17
|
+
import { useEffect, useRef, useState } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function RefreshButton({ onRefresh, isRefreshing = false, label = "Refresh", className }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
Button,
|
|
22
|
+
{
|
|
23
|
+
type: "button",
|
|
24
|
+
variant: "outline",
|
|
25
|
+
"data-slot": "refresh-button",
|
|
26
|
+
"aria-busy": isRefreshing || void 0,
|
|
27
|
+
className,
|
|
28
|
+
onClick: () => {
|
|
29
|
+
if (!isRefreshing) onRefresh();
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
IconGlyph,
|
|
34
|
+
{
|
|
35
|
+
glyph: Refresh,
|
|
36
|
+
className: cn("text-icon-md", isRefreshing && "animate-spin motion-reduce:animate-none")
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
label
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
var READ_STATUS_UPDATED_MS = 2e3;
|
|
45
|
+
function ReadStatus({
|
|
46
|
+
reads,
|
|
47
|
+
formatTime,
|
|
48
|
+
lastUpdateLabel = "Last update:",
|
|
49
|
+
updatedLabel = "Updated",
|
|
50
|
+
staleLabel = "Could not refresh. Showing the previous read.",
|
|
51
|
+
refreshLabel,
|
|
52
|
+
updatedAnnouncement = (time) => `Updated. Last update: ${time}`,
|
|
53
|
+
updatedMarkMs = READ_STATUS_UPDATED_MS,
|
|
54
|
+
className
|
|
55
|
+
}) {
|
|
56
|
+
const fetching = reads.some((read) => read.isFetching);
|
|
57
|
+
const landed = reads.every((read) => read.data !== void 0);
|
|
58
|
+
const lastRead = landed && reads.length > 0 ? Math.min(...reads.map((read) => read.dataUpdatedAt)) : void 0;
|
|
59
|
+
const previous = reads.some((read) => read.data !== void 0 && read.isError);
|
|
60
|
+
const [updated, setUpdated] = useState(false);
|
|
61
|
+
const [announcement, setAnnouncement] = useState("");
|
|
62
|
+
const requested = useRef(false);
|
|
63
|
+
const wasFetching = useRef(fetching);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
const finished = wasFetching.current && !fetching;
|
|
66
|
+
wasFetching.current = fetching;
|
|
67
|
+
if (!finished) return;
|
|
68
|
+
if (previous) {
|
|
69
|
+
if (requested.current) setAnnouncement(staleLabel);
|
|
70
|
+
requested.current = false;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (lastRead === void 0) return;
|
|
74
|
+
if (requested.current) setAnnouncement(updatedAnnouncement(formatTime(lastRead)));
|
|
75
|
+
requested.current = false;
|
|
76
|
+
setUpdated(true);
|
|
77
|
+
}, [fetching, previous, lastRead, staleLabel, updatedAnnouncement, formatTime]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!updated) return;
|
|
80
|
+
const timer = window.setTimeout(() => setUpdated(false), updatedMarkMs);
|
|
81
|
+
return () => window.clearTimeout(timer);
|
|
82
|
+
}, [updated, updatedMarkMs]);
|
|
83
|
+
const refresh = () => {
|
|
84
|
+
requested.current = true;
|
|
85
|
+
setAnnouncement("");
|
|
86
|
+
for (const read of reads) void read.refetch();
|
|
87
|
+
};
|
|
88
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "read-status", className: cn("flex flex-wrap items-center gap-x-3 gap-y-1", className), children: [
|
|
89
|
+
/* @__PURE__ */ jsxs("p", { className: "m-0 text-caption tabular-nums text-muted-foreground", children: [
|
|
90
|
+
previous && /* @__PURE__ */ jsx("span", { className: "mr-2 text-warning-fg", children: staleLabel }),
|
|
91
|
+
lastUpdateLabel,
|
|
92
|
+
" ",
|
|
93
|
+
lastRead === void 0 ? "\u2014" : formatTime(lastRead),
|
|
94
|
+
updated && /* @__PURE__ */ jsxs("span", { className: "ml-2 inline-flex items-center gap-1 text-success-fg", children: [
|
|
95
|
+
/* @__PURE__ */ jsx(IconGlyph, { glyph: Check, className: "text-icon-xs" }),
|
|
96
|
+
updatedLabel
|
|
97
|
+
] })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx(RefreshButton, { onRefresh: refresh, isRefreshing: fetching, label: refreshLabel }),
|
|
100
|
+
/* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", children: announcement })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
RefreshButton,
|
|
106
|
+
READ_STATUS_UPDATED_MS,
|
|
107
|
+
ReadStatus
|
|
108
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
CopyButton
|
|
4
|
+
} from "./chunk-QCQRA6L5.js";
|
|
5
|
+
import {
|
|
6
|
+
HorizontalScrollArea
|
|
7
|
+
} from "./chunk-DCUAE6PX.js";
|
|
8
|
+
import {
|
|
9
|
+
eyebrow
|
|
10
|
+
} from "./chunk-MTQOAMDW.js";
|
|
11
|
+
import {
|
|
12
|
+
cn
|
|
13
|
+
} from "./chunk-PMGIJMRO.js";
|
|
14
|
+
|
|
15
|
+
// src/web/components/code-block.tsx
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function CodeBlock({ code, label = "code", language, className }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
"figure",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "code-block",
|
|
22
|
+
"aria-label": label,
|
|
23
|
+
className: cn("relative m-0 min-w-0 overflow-hidden rounded-xl bg-muted/60 shadow-inner ring-1 ring-inset ring-secondary/15", className),
|
|
24
|
+
children: [
|
|
25
|
+
language && /* @__PURE__ */ jsx("figcaption", { className: cn("px-4 pt-3 text-muted-foreground", eyebrow), children: language }),
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ jsx(CopyButton, { value: code, label }) }),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
HorizontalScrollArea,
|
|
29
|
+
{
|
|
30
|
+
className: "my-4 ml-4 mr-12",
|
|
31
|
+
viewportAs: "pre",
|
|
32
|
+
viewportClassName: "m-0 pb-3 font-mono text-caption text-foreground",
|
|
33
|
+
children: /* @__PURE__ */ jsx("code", { children: code })
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
CodeBlock
|
|
43
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
PageHeader
|
|
4
|
+
} from "./chunk-62HIDJCD.js";
|
|
5
|
+
import {
|
|
6
|
+
FadeOverlay
|
|
7
|
+
} from "./chunk-A3XHFJ6J.js";
|
|
8
|
+
import {
|
|
9
|
+
ScrollArea
|
|
10
|
+
} from "./chunk-DCUAE6PX.js";
|
|
11
|
+
import {
|
|
12
|
+
cn
|
|
13
|
+
} from "./chunk-PMGIJMRO.js";
|
|
14
|
+
|
|
15
|
+
// src/web/components/extension-page-frame.tsx
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function ExtensionPageFrame({
|
|
18
|
+
children,
|
|
19
|
+
header,
|
|
20
|
+
title,
|
|
21
|
+
subtitle,
|
|
22
|
+
left,
|
|
23
|
+
right,
|
|
24
|
+
onBack,
|
|
25
|
+
backLabel,
|
|
26
|
+
titleAlign,
|
|
27
|
+
bottomNav,
|
|
28
|
+
bottomFade = Boolean(bottomNav),
|
|
29
|
+
scroll = true,
|
|
30
|
+
viewportAs = "main",
|
|
31
|
+
className,
|
|
32
|
+
contentClassName,
|
|
33
|
+
viewportClassName,
|
|
34
|
+
fadeClassName
|
|
35
|
+
}) {
|
|
36
|
+
const renderedHeader = header ?? (title || subtitle || left || right || onBack ? /* @__PURE__ */ jsx(
|
|
37
|
+
PageHeader,
|
|
38
|
+
{
|
|
39
|
+
title,
|
|
40
|
+
subtitle,
|
|
41
|
+
left,
|
|
42
|
+
right,
|
|
43
|
+
onBack,
|
|
44
|
+
backLabel,
|
|
45
|
+
titleAlign
|
|
46
|
+
}
|
|
47
|
+
) : null);
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: cn(
|
|
52
|
+
"relative flex h-screen flex-col overflow-hidden bg-background bg-page-radial font-display text-foreground",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
children: [
|
|
56
|
+
renderedHeader,
|
|
57
|
+
scroll ? /* @__PURE__ */ jsx(
|
|
58
|
+
ScrollArea,
|
|
59
|
+
{
|
|
60
|
+
className: cn("flex-1", contentClassName),
|
|
61
|
+
viewportAs,
|
|
62
|
+
viewportClassName,
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
) : /* @__PURE__ */ jsx("div", { className: cn("min-h-0 flex-1", contentClassName), children }),
|
|
66
|
+
bottomNav,
|
|
67
|
+
bottomFade && /* @__PURE__ */ jsx(
|
|
68
|
+
FadeOverlay,
|
|
69
|
+
{
|
|
70
|
+
heightClassName: "h-20",
|
|
71
|
+
className: cn("fixed inset-x-0 bottom-0 z-20", fadeClassName)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
ExtensionPageFrame
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Icon
|
|
4
|
+
} from "./chunk-A6MSV4MA.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-PMGIJMRO.js";
|
|
8
|
+
|
|
9
|
+
// src/web/components/status-badge.tsx
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function StatusBadge({ status, className }) {
|
|
12
|
+
const config = {
|
|
13
|
+
success: {
|
|
14
|
+
color: "text-brand",
|
|
15
|
+
bg: "bg-primary/10",
|
|
16
|
+
icon: "check_circle",
|
|
17
|
+
label: "Success"
|
|
18
|
+
},
|
|
19
|
+
completed: {
|
|
20
|
+
color: "text-brand",
|
|
21
|
+
bg: "bg-primary/10",
|
|
22
|
+
icon: "check_circle",
|
|
23
|
+
label: "Completed"
|
|
24
|
+
},
|
|
25
|
+
pending: {
|
|
26
|
+
color: "text-warning-fg",
|
|
27
|
+
bg: "bg-warning/10",
|
|
28
|
+
icon: "schedule",
|
|
29
|
+
label: "Pending"
|
|
30
|
+
},
|
|
31
|
+
failed: {
|
|
32
|
+
color: "text-danger-fg",
|
|
33
|
+
bg: "bg-danger/10",
|
|
34
|
+
icon: "error",
|
|
35
|
+
label: "Failed"
|
|
36
|
+
},
|
|
37
|
+
error: {
|
|
38
|
+
color: "text-danger-fg",
|
|
39
|
+
bg: "bg-danger/10",
|
|
40
|
+
icon: "error",
|
|
41
|
+
label: "Error"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const { color, bg, icon, label } = config[status];
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "status-badge",
|
|
49
|
+
className: cn(
|
|
50
|
+
"inline-flex items-center gap-1.5 pl-1 pr-2.5 py-1 rounded-full font-medium text-caption",
|
|
51
|
+
bg,
|
|
52
|
+
color,
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Icon, { name: icon, className: "text-icon-sm translate-y-px" }),
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: label })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
StatusBadge
|
|
65
|
+
};
|