@medialane/ui 0.185.0 → 0.186.0
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/components/media-wallet/action-button.cjs +54 -0
- package/dist/components/media-wallet/action-button.cjs.map +1 -0
- package/dist/components/media-wallet/action-button.d.cts +10 -0
- package/dist/components/media-wallet/action-button.d.ts +10 -0
- package/dist/components/media-wallet/action-button.js +28 -0
- package/dist/components/media-wallet/action-button.js.map +1 -0
- package/dist/components/media-wallet/action-modal.cjs +84 -0
- package/dist/components/media-wallet/action-modal.cjs.map +1 -0
- package/dist/components/media-wallet/action-modal.d.cts +20 -0
- package/dist/components/media-wallet/action-modal.d.ts +20 -0
- package/dist/components/media-wallet/action-modal.js +56 -0
- package/dist/components/media-wallet/action-modal.js.map +1 -0
- package/dist/components/media-wallet/activate-card.cjs +72 -0
- package/dist/components/media-wallet/activate-card.cjs.map +1 -0
- package/dist/components/media-wallet/activate-card.d.cts +7 -0
- package/dist/components/media-wallet/activate-card.d.ts +7 -0
- package/dist/components/media-wallet/activate-card.js +48 -0
- package/dist/components/media-wallet/activate-card.js.map +1 -0
- package/dist/components/media-wallet/address-qr.cjs +64 -0
- package/dist/components/media-wallet/address-qr.cjs.map +1 -0
- package/dist/components/media-wallet/address-qr.d.cts +8 -0
- package/dist/components/media-wallet/address-qr.d.ts +8 -0
- package/dist/components/media-wallet/address-qr.js +30 -0
- package/dist/components/media-wallet/address-qr.js.map +1 -0
- package/dist/components/media-wallet/back-button.cjs +41 -0
- package/dist/components/media-wallet/back-button.cjs.map +1 -0
- package/dist/components/media-wallet/back-button.d.cts +7 -0
- package/dist/components/media-wallet/back-button.d.ts +7 -0
- package/dist/components/media-wallet/back-button.js +17 -0
- package/dist/components/media-wallet/back-button.js.map +1 -0
- package/dist/components/media-wallet/copy-icon.cjs +49 -0
- package/dist/components/media-wallet/copy-icon.cjs.map +1 -0
- package/dist/components/media-wallet/copy-icon.d.cts +7 -0
- package/dist/components/media-wallet/copy-icon.d.ts +7 -0
- package/dist/components/media-wallet/copy-icon.js +25 -0
- package/dist/components/media-wallet/copy-icon.js.map +1 -0
- package/dist/components/media-wallet/currency-sheet.cjs +54 -0
- package/dist/components/media-wallet/currency-sheet.cjs.map +1 -0
- package/dist/components/media-wallet/currency-sheet.d.cts +12 -0
- package/dist/components/media-wallet/currency-sheet.d.ts +12 -0
- package/dist/components/media-wallet/currency-sheet.js +30 -0
- package/dist/components/media-wallet/currency-sheet.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-activity.cjs +223 -0
- package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-activity.d.cts +12 -0
- package/dist/components/media-wallet/media-wallet-activity.d.ts +12 -0
- package/dist/components/media-wallet/media-wallet-activity.js +189 -0
- package/dist/components/media-wallet/media-wallet-activity.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-header.cjs +97 -0
- package/dist/components/media-wallet/media-wallet-header.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-header.d.cts +8 -0
- package/dist/components/media-wallet/media-wallet-header.d.ts +8 -0
- package/dist/components/media-wallet/media-wallet-header.js +63 -0
- package/dist/components/media-wallet/media-wallet-header.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-home.cjs +258 -0
- package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-home.d.cts +14 -0
- package/dist/components/media-wallet/media-wallet-home.d.ts +14 -0
- package/dist/components/media-wallet/media-wallet-home.js +224 -0
- package/dist/components/media-wallet/media-wallet-home.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-overlay.cjs +137 -0
- package/dist/components/media-wallet/media-wallet-overlay.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-overlay.d.cts +14 -0
- package/dist/components/media-wallet/media-wallet-overlay.d.ts +14 -0
- package/dist/components/media-wallet/media-wallet-overlay.js +102 -0
- package/dist/components/media-wallet/media-wallet-overlay.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-send.cjs +313 -0
- package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-send.d.cts +14 -0
- package/dist/components/media-wallet/media-wallet-send.d.ts +14 -0
- package/dist/components/media-wallet/media-wallet-send.js +289 -0
- package/dist/components/media-wallet/media-wallet-send.js.map +1 -0
- package/dist/components/media-wallet/media-wallet-token-detail.cjs +164 -0
- package/dist/components/media-wallet/media-wallet-token-detail.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet-token-detail.d.cts +13 -0
- package/dist/components/media-wallet/media-wallet-token-detail.d.ts +13 -0
- package/dist/components/media-wallet/media-wallet-token-detail.js +140 -0
- package/dist/components/media-wallet/media-wallet-token-detail.js.map +1 -0
- package/dist/components/media-wallet/media-wallet.cjs +51 -0
- package/dist/components/media-wallet/media-wallet.cjs.map +1 -0
- package/dist/components/media-wallet/media-wallet.d.cts +13 -0
- package/dist/components/media-wallet/media-wallet.d.ts +13 -0
- package/dist/components/media-wallet/media-wallet.js +27 -0
- package/dist/components/media-wallet/media-wallet.js.map +1 -0
- package/dist/components/media-wallet/nft-strip.cjs +85 -0
- package/dist/components/media-wallet/nft-strip.cjs.map +1 -0
- package/dist/components/media-wallet/nft-strip.d.cts +12 -0
- package/dist/components/media-wallet/nft-strip.d.ts +12 -0
- package/dist/components/media-wallet/nft-strip.js +51 -0
- package/dist/components/media-wallet/nft-strip.js.map +1 -0
- package/dist/components/media-wallet/quick-action.cjs +59 -0
- package/dist/components/media-wallet/quick-action.cjs.map +1 -0
- package/dist/components/media-wallet/quick-action.d.cts +12 -0
- package/dist/components/media-wallet/quick-action.d.ts +12 -0
- package/dist/components/media-wallet/quick-action.js +35 -0
- package/dist/components/media-wallet/quick-action.js.map +1 -0
- package/dist/components/media-wallet/receive-card.cjs +86 -0
- package/dist/components/media-wallet/receive-card.cjs.map +1 -0
- package/dist/components/media-wallet/receive-card.d.cts +7 -0
- package/dist/components/media-wallet/receive-card.d.ts +7 -0
- package/dist/components/media-wallet/receive-card.js +52 -0
- package/dist/components/media-wallet/receive-card.js.map +1 -0
- package/dist/components/media-wallet/section-header.cjs +32 -0
- package/dist/components/media-wallet/section-header.cjs.map +1 -0
- package/dist/components/media-wallet/section-header.d.cts +7 -0
- package/dist/components/media-wallet/section-header.d.ts +7 -0
- package/dist/components/media-wallet/section-header.js +8 -0
- package/dist/components/media-wallet/section-header.js.map +1 -0
- package/dist/components/media-wallet/success-dialog.cjs +75 -0
- package/dist/components/media-wallet/success-dialog.cjs.map +1 -0
- package/dist/components/media-wallet/success-dialog.d.cts +11 -0
- package/dist/components/media-wallet/success-dialog.d.ts +11 -0
- package/dist/components/media-wallet/success-dialog.js +51 -0
- package/dist/components/media-wallet/success-dialog.js.map +1 -0
- package/dist/components/media-wallet/types.cjs +37 -0
- package/dist/components/media-wallet/types.cjs.map +1 -0
- package/dist/components/media-wallet/types.d.cts +66 -0
- package/dist/components/media-wallet/types.d.ts +66 -0
- package/dist/components/media-wallet/types.js +12 -0
- package/dist/components/media-wallet/types.js.map +1 -0
- package/dist/components/media-wallet/wallet-activity-icon.cjs +69 -0
- package/dist/components/media-wallet/wallet-activity-icon.cjs.map +1 -0
- package/dist/components/media-wallet/wallet-activity-icon.d.cts +8 -0
- package/dist/components/media-wallet/wallet-activity-icon.d.ts +8 -0
- package/dist/components/media-wallet/wallet-activity-icon.js +45 -0
- package/dist/components/media-wallet/wallet-activity-icon.js.map +1 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/media-wallet/activity-feed.cjs +35 -0
- package/dist/utils/media-wallet/activity-feed.cjs.map +1 -0
- package/dist/utils/media-wallet/activity-feed.d.cts +14 -0
- package/dist/utils/media-wallet/activity-feed.d.ts +14 -0
- package/dist/utils/media-wallet/activity-feed.js +11 -0
- package/dist/utils/media-wallet/activity-feed.js.map +1 -0
- package/dist/utils/media-wallet/confetti.cjs +51 -0
- package/dist/utils/media-wallet/confetti.cjs.map +1 -0
- package/dist/utils/media-wallet/confetti.d.cts +3 -0
- package/dist/utils/media-wallet/confetti.d.ts +3 -0
- package/dist/utils/media-wallet/confetti.js +17 -0
- package/dist/utils/media-wallet/confetti.js.map +1 -0
- package/dist/utils/media-wallet/nft-items.cjs +38 -0
- package/dist/utils/media-wallet/nft-items.cjs.map +1 -0
- package/dist/utils/media-wallet/nft-items.d.cts +13 -0
- package/dist/utils/media-wallet/nft-items.d.ts +13 -0
- package/dist/utils/media-wallet/nft-items.js +14 -0
- package/dist/utils/media-wallet/nft-items.js.map +1 -0
- package/dist/utils/media-wallet/run-intent-calls.cjs +32 -0
- package/dist/utils/media-wallet/run-intent-calls.cjs.map +1 -0
- package/dist/utils/media-wallet/run-intent-calls.d.cts +16 -0
- package/dist/utils/media-wallet/run-intent-calls.d.ts +16 -0
- package/dist/utils/media-wallet/run-intent-calls.js +8 -0
- package/dist/utils/media-wallet/run-intent-calls.js.map +1 -0
- package/dist/utils/media-wallet/use-erc20-balance.cjs +75 -0
- package/dist/utils/media-wallet/use-erc20-balance.cjs.map +1 -0
- package/dist/utils/media-wallet/use-erc20-balance.d.cts +15 -0
- package/dist/utils/media-wallet/use-erc20-balance.d.ts +15 -0
- package/dist/utils/media-wallet/use-erc20-balance.js +40 -0
- package/dist/utils/media-wallet/use-erc20-balance.js.map +1 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.cjs +52 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.cjs.map +1 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.d.cts +10 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.d.ts +10 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.js +18 -0
- package/dist/utils/media-wallet/use-tokens-by-owner.js.map +1 -0
- package/dist/utils/media-wallet/wallet-activity.cjs +83 -0
- package/dist/utils/media-wallet/wallet-activity.cjs.map +1 -0
- package/dist/utils/media-wallet/wallet-activity.d.cts +7 -0
- package/dist/utils/media-wallet/wallet-activity.d.ts +7 -0
- package/dist/utils/media-wallet/wallet-activity.js +57 -0
- package/dist/utils/media-wallet/wallet-activity.js.map +1 -0
- package/dist/utils/media-wallet/wallet-format.cjs +59 -0
- package/dist/utils/media-wallet/wallet-format.cjs.map +1 -0
- package/dist/utils/media-wallet/wallet-format.d.cts +9 -0
- package/dist/utils/media-wallet/wallet-format.d.ts +9 -0
- package/dist/utils/media-wallet/wallet-format.js +29 -0
- package/dist/utils/media-wallet/wallet-format.js.map +1 -0
- package/dist/utils/media-wallet/wallet-tokens.cjs +39 -0
- package/dist/utils/media-wallet/wallet-tokens.cjs.map +1 -0
- package/dist/utils/media-wallet/wallet-tokens.d.cts +10 -0
- package/dist/utils/media-wallet/wallet-tokens.d.ts +10 -0
- package/dist/utils/media-wallet/wallet-tokens.js +15 -0
- package/dist/utils/media-wallet/wallet-tokens.js.map +1 -0
- package/package.json +9 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var receive_card_exports = {};
|
|
31
|
+
__export(receive_card_exports, {
|
|
32
|
+
ReceiveCard: () => ReceiveCard
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(receive_card_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_image = __toESM(require("../image.js"), 1);
|
|
38
|
+
var import_address_qr = require("./address-qr.js");
|
|
39
|
+
var import_copy_icon = require("./copy-icon.js");
|
|
40
|
+
const FUNDING_DOCS_URL = "https://docs.medialane.io/learn/funding-your-account";
|
|
41
|
+
function ReceiveCard({ address }) {
|
|
42
|
+
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
43
|
+
const copy = () => {
|
|
44
|
+
navigator.clipboard?.writeText(address).catch(() => {
|
|
45
|
+
});
|
|
46
|
+
setCopied(true);
|
|
47
|
+
setTimeout(() => setCopied(false), 1500);
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-center text-sm text-muted-foreground", children: "Receive assets with your address:" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
onClick: copy,
|
|
55
|
+
className: "flex items-center justify-center gap-2 rounded-2xl bg-foreground/[0.06] px-4 py-3.5 text-center transition-colors active:bg-foreground/[0.1]",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "break-all font-mono text-sm font-medium", children: address }),
|
|
58
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 text-xs font-semibold text-muted-foreground", children: "Copied \u2713" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_copy_icon.CopyIcon, { className: "shrink-0 opacity-50" })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_qr.AddressQr, { value: address }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3 rounded-2xl bg-card/40 px-4 py-3 backdrop-blur-sm", children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-full bg-foreground/[0.06]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: "/Starknet-icon.svg", alt: "Starknet", width: 20, height: 20 }) }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm leading-relaxed text-muted-foreground", children: "Your onchain account is self-custody and permissionless. Please use only the Starknet blockchain to send and receive assets." })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-2 pt-1 text-center", children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Don't have tokens yet?" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"a",
|
|
71
|
+
{
|
|
72
|
+
href: FUNDING_DOCS_URL,
|
|
73
|
+
target: "_blank",
|
|
74
|
+
rel: "noopener noreferrer",
|
|
75
|
+
className: "inline-flex h-10 items-center justify-center rounded-full bg-brand-blue/10 px-5 text-sm font-semibold text-brand-blue transition-colors hover:bg-brand-blue/15",
|
|
76
|
+
children: "How to fund your account"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
ReceiveCard
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=receive-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/receive-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport Image from \"../image.js\";\nimport { AddressQr } from \"./address-qr.js\";\nimport { CopyIcon } from \"./copy-icon.js\";\n\nconst FUNDING_DOCS_URL = \"https://docs.medialane.io/learn/funding-your-account\";\n\nexport function ReceiveCard({ address }: { address: string }) {\n const [copied, setCopied] = useState(false);\n\n const copy = () => {\n navigator.clipboard?.writeText(address).catch(() => {});\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n };\n\n return (\n <div className=\"flex flex-col gap-4\">\n <p className=\"text-center text-sm text-muted-foreground\">Receive assets with your address:</p>\n\n <button\n onClick={copy}\n className=\"flex items-center justify-center gap-2 rounded-2xl bg-foreground/[0.06] px-4 py-3.5 text-center transition-colors active:bg-foreground/[0.1]\"\n >\n <span className=\"break-all font-mono text-sm font-medium\">{address}</span>\n {copied ? (\n <span className=\"shrink-0 text-xs font-semibold text-muted-foreground\">Copied ✓</span>\n ) : (\n <CopyIcon className=\"shrink-0 opacity-50\" />\n )}\n </button>\n\n <AddressQr value={address} />\n\n <div className=\"flex items-center gap-3 rounded-2xl bg-card/40 px-4 py-3 backdrop-blur-sm\">\n <div className=\"grid h-11 w-11 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <Image src=\"/Starknet-icon.svg\" alt=\"Starknet\" width={20} height={20} />\n </div>\n <p className=\"text-sm leading-relaxed text-muted-foreground\">\n Your onchain account is self-custody and permissionless. Please use\n only the Starknet blockchain to send and receive assets.\n </p>\n </div>\n\n <div className=\"flex flex-col items-center gap-2 pt-1 text-center\">\n <p className=\"text-xs text-muted-foreground\">Don't have tokens yet?</p>\n <a\n href={FUNDING_DOCS_URL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-10 items-center justify-center rounded-full bg-brand-blue/10 px-5 text-sm font-semibold text-brand-blue transition-colors hover:bg-brand-blue/15\"\n >\n How to fund your account\n </a>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBM;AAlBN,mBAAyB;AACzB,mBAAkB;AAClB,wBAA0B;AAC1B,uBAAyB;AAEzB,MAAM,mBAAmB;AAElB,SAAS,YAAY,EAAE,QAAQ,GAAwB;AAC5D,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAE1C,QAAM,OAAO,MAAM;AACjB,cAAU,WAAW,UAAU,OAAO,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AACtD,cAAU,IAAI;AACd,eAAW,MAAM,UAAU,KAAK,GAAG,IAAI;AAAA,EACzC;AAEA,SACE,6CAAC,SAAI,WAAU,uBACb;AAAA,gDAAC,OAAE,WAAU,6CAA4C,+CAAiC;AAAA,IAE1F;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAU;AAAA,QAEV;AAAA,sDAAC,UAAK,WAAU,2CAA2C,mBAAQ;AAAA,UAClE,SACC,4CAAC,UAAK,WAAU,wDAAuD,2BAAQ,IAE/E,4CAAC,6BAAS,WAAU,uBAAsB;AAAA;AAAA;AAAA,IAE9C;AAAA,IAEA,4CAAC,+BAAU,OAAO,SAAS;AAAA,IAE3B,6CAAC,SAAI,WAAU,6EACb;AAAA,kDAAC,SAAI,WAAU,gFACb,sDAAC,aAAAA,SAAA,EAAM,KAAI,sBAAqB,KAAI,YAAW,OAAO,IAAI,QAAQ,IAAI,GACxE;AAAA,MACA,4CAAC,OAAE,WAAU,iDAAgD,0IAG7D;AAAA,OACF;AAAA,IAEA,6CAAC,SAAI,WAAU,qDACb;AAAA,kDAAC,OAAE,WAAU,iCAAgC,oCAA2B;AAAA,MACxE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,OACF;AAAA,KACF;AAEJ;","names":["Image"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Image from "../image.js";
|
|
5
|
+
import { AddressQr } from "./address-qr.js";
|
|
6
|
+
import { CopyIcon } from "./copy-icon.js";
|
|
7
|
+
const FUNDING_DOCS_URL = "https://docs.medialane.io/learn/funding-your-account";
|
|
8
|
+
function ReceiveCard({ address }) {
|
|
9
|
+
const [copied, setCopied] = useState(false);
|
|
10
|
+
const copy = () => {
|
|
11
|
+
navigator.clipboard?.writeText(address).catch(() => {
|
|
12
|
+
});
|
|
13
|
+
setCopied(true);
|
|
14
|
+
setTimeout(() => setCopied(false), 1500);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
17
|
+
/* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground", children: "Receive assets with your address:" }),
|
|
18
|
+
/* @__PURE__ */ jsxs(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
onClick: copy,
|
|
22
|
+
className: "flex items-center justify-center gap-2 rounded-2xl bg-foreground/[0.06] px-4 py-3.5 text-center transition-colors active:bg-foreground/[0.1]",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "break-all font-mono text-sm font-medium", children: address }),
|
|
25
|
+
copied ? /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs font-semibold text-muted-foreground", children: "Copied \u2713" }) : /* @__PURE__ */ jsx(CopyIcon, { className: "shrink-0 opacity-50" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(AddressQr, { value: address }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-2xl bg-card/40 px-4 py-3 backdrop-blur-sm", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "grid h-11 w-11 shrink-0 place-items-center rounded-full bg-foreground/[0.06]", children: /* @__PURE__ */ jsx(Image, { src: "/Starknet-icon.svg", alt: "Starknet", width: 20, height: 20 }) }),
|
|
32
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: "Your onchain account is self-custody and permissionless. Please use only the Starknet blockchain to send and receive assets." })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 pt-1 text-center", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Don't have tokens yet?" }),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
"a",
|
|
38
|
+
{
|
|
39
|
+
href: FUNDING_DOCS_URL,
|
|
40
|
+
target: "_blank",
|
|
41
|
+
rel: "noopener noreferrer",
|
|
42
|
+
className: "inline-flex h-10 items-center justify-center rounded-full bg-brand-blue/10 px-5 text-sm font-semibold text-brand-blue transition-colors hover:bg-brand-blue/15",
|
|
43
|
+
children: "How to fund your account"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
ReceiveCard
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=receive-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/receive-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport Image from \"../image.js\";\nimport { AddressQr } from \"./address-qr.js\";\nimport { CopyIcon } from \"./copy-icon.js\";\n\nconst FUNDING_DOCS_URL = \"https://docs.medialane.io/learn/funding-your-account\";\n\nexport function ReceiveCard({ address }: { address: string }) {\n const [copied, setCopied] = useState(false);\n\n const copy = () => {\n navigator.clipboard?.writeText(address).catch(() => {});\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n };\n\n return (\n <div className=\"flex flex-col gap-4\">\n <p className=\"text-center text-sm text-muted-foreground\">Receive assets with your address:</p>\n\n <button\n onClick={copy}\n className=\"flex items-center justify-center gap-2 rounded-2xl bg-foreground/[0.06] px-4 py-3.5 text-center transition-colors active:bg-foreground/[0.1]\"\n >\n <span className=\"break-all font-mono text-sm font-medium\">{address}</span>\n {copied ? (\n <span className=\"shrink-0 text-xs font-semibold text-muted-foreground\">Copied ✓</span>\n ) : (\n <CopyIcon className=\"shrink-0 opacity-50\" />\n )}\n </button>\n\n <AddressQr value={address} />\n\n <div className=\"flex items-center gap-3 rounded-2xl bg-card/40 px-4 py-3 backdrop-blur-sm\">\n <div className=\"grid h-11 w-11 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <Image src=\"/Starknet-icon.svg\" alt=\"Starknet\" width={20} height={20} />\n </div>\n <p className=\"text-sm leading-relaxed text-muted-foreground\">\n Your onchain account is self-custody and permissionless. Please use\n only the Starknet blockchain to send and receive assets.\n </p>\n </div>\n\n <div className=\"flex flex-col items-center gap-2 pt-1 text-center\">\n <p className=\"text-xs text-muted-foreground\">Don't have tokens yet?</p>\n <a\n href={FUNDING_DOCS_URL}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-10 items-center justify-center rounded-full bg-brand-blue/10 px-5 text-sm font-semibold text-brand-blue transition-colors hover:bg-brand-blue/15\"\n >\n How to fund your account\n </a>\n </div>\n </div>\n );\n}\n"],"mappings":";AAoBM,cAEA,YAFA;AAlBN,SAAS,gBAAgB;AACzB,OAAO,WAAW;AAClB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AAEzB,MAAM,mBAAmB;AAElB,SAAS,YAAY,EAAE,QAAQ,GAAwB;AAC5D,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAE1C,QAAM,OAAO,MAAM;AACjB,cAAU,WAAW,UAAU,OAAO,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AACtD,cAAU,IAAI;AACd,eAAW,MAAM,UAAU,KAAK,GAAG,IAAI;AAAA,EACzC;AAEA,SACE,qBAAC,SAAI,WAAU,uBACb;AAAA,wBAAC,OAAE,WAAU,6CAA4C,+CAAiC;AAAA,IAE1F;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAU;AAAA,QAEV;AAAA,8BAAC,UAAK,WAAU,2CAA2C,mBAAQ;AAAA,UAClE,SACC,oBAAC,UAAK,WAAU,wDAAuD,2BAAQ,IAE/E,oBAAC,YAAS,WAAU,uBAAsB;AAAA;AAAA;AAAA,IAE9C;AAAA,IAEA,oBAAC,aAAU,OAAO,SAAS;AAAA,IAE3B,qBAAC,SAAI,WAAU,6EACb;AAAA,0BAAC,SAAI,WAAU,gFACb,8BAAC,SAAM,KAAI,sBAAqB,KAAI,YAAW,OAAO,IAAI,QAAQ,IAAI,GACxE;AAAA,MACA,oBAAC,OAAE,WAAU,iDAAgD,0IAG7D;AAAA,OACF;AAAA,IAEA,qBAAC,SAAI,WAAU,qDACb;AAAA,0BAAC,OAAE,WAAU,iCAAgC,oCAA2B;AAAA,MACxE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var section_header_exports = {};
|
|
20
|
+
__export(section_header_exports, {
|
|
21
|
+
SectionHeader: () => SectionHeader
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(section_header_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
function SectionHeader({ title }) {
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-[family-name:var(--font-display)] text-base font-bold tracking-tight", children: title });
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
SectionHeader
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=section-header.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/section-header.tsx"],"sourcesContent":["export function SectionHeader({ title }: { title: string }) {\n return <div className=\"font-[family-name:var(--font-display)] text-base font-bold tracking-tight\">{title}</div>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACS;AADF,SAAS,cAAc,EAAE,MAAM,GAAsB;AAC1D,SAAO,4CAAC,SAAI,WAAU,6EAA6E,iBAAM;AAC3G;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function SectionHeader({ title }) {
|
|
3
|
+
return /* @__PURE__ */ jsx("div", { className: "font-[family-name:var(--font-display)] text-base font-bold tracking-tight", children: title });
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
SectionHeader
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=section-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/section-header.tsx"],"sourcesContent":["export function SectionHeader({ title }: { title: string }) {\n return <div className=\"font-[family-name:var(--font-display)] text-base font-bold tracking-tight\">{title}</div>;\n}\n"],"mappings":"AACS;AADF,SAAS,cAAc,EAAE,MAAM,GAAsB;AAC1D,SAAO,oBAAC,SAAI,WAAU,6EAA6E,iBAAM;AAC3G;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var success_dialog_exports = {};
|
|
21
|
+
__export(success_dialog_exports, {
|
|
22
|
+
SuccessDialog: () => SuccessDialog
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(success_dialog_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_action_button = require("../action-button.js");
|
|
28
|
+
var import_action_modal = require("./action-modal.js");
|
|
29
|
+
var import_confetti = require("../../utils/media-wallet/confetti.js");
|
|
30
|
+
var import_wallet_format = require("../../utils/media-wallet/wallet-format.js");
|
|
31
|
+
var import_types = require("./types.js");
|
|
32
|
+
const BRAND_GRADIENT = "linear-gradient(115deg, #3b7bff, #8a5cf6, #f6608f, #fb8b46, #3b7bff)";
|
|
33
|
+
function SuccessDialog({
|
|
34
|
+
title,
|
|
35
|
+
message,
|
|
36
|
+
actionLabel = "Done",
|
|
37
|
+
txHash,
|
|
38
|
+
onClose
|
|
39
|
+
}) {
|
|
40
|
+
const { explorerUrl } = (0, import_types.useMediaWalletApp)();
|
|
41
|
+
(0, import_react.useEffect)(() => {
|
|
42
|
+
(0, import_confetti.fireConfetti)();
|
|
43
|
+
}, []);
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_modal.CanvasPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "absolute inset-0 z-[70] grid place-items-center p-6", onClick: onClose, children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_modal.ActionBackdrop, {}),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "card-base relative z-10 w-full max-w-[320px] p-6 text-center", onClick: (e) => e.stopPropagation(), children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: "mx-auto grid h-16 w-16 place-items-center rounded-full text-white",
|
|
51
|
+
style: { background: BRAND_GRADIENT },
|
|
52
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "30", height: "30", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 6L9 17l-5-5" }) })
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "mt-4 font-[family-name:var(--font-display)] text-xl font-extrabold tracking-tight", children: title }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1.5 text-sm leading-relaxed text-muted-foreground", children: message }),
|
|
57
|
+
txHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
"a",
|
|
59
|
+
{
|
|
60
|
+
href: (0, import_wallet_format.explorerTxUrl)(explorerUrl, txHash),
|
|
61
|
+
target: "_blank",
|
|
62
|
+
rel: "noopener noreferrer",
|
|
63
|
+
className: "mt-3 inline-block text-xs text-brand-blue hover:underline",
|
|
64
|
+
children: "View on Voyager \u2197"
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { big: true, onClick: onClose, className: "mt-5 w-full", style: { "--ml-grad": BRAND_GRADIENT }, children: actionLabel })
|
|
68
|
+
] })
|
|
69
|
+
] }) });
|
|
70
|
+
}
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
SuccessDialog
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=success-dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/success-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect } from \"react\";\nimport { ActionButton } from \"../action-button.js\";\nimport { ActionBackdrop, CanvasPortal } from \"./action-modal.js\";\nimport { fireConfetti } from \"../../utils/media-wallet/confetti.js\";\nimport { explorerTxUrl } from \"../../utils/media-wallet/wallet-format.js\";\nimport { useMediaWalletApp } from \"./types.js\";\n\nconst BRAND_GRADIENT = \"linear-gradient(115deg, #3b7bff, #8a5cf6, #f6608f, #fb8b46, #3b7bff)\";\n\nexport function SuccessDialog({\n title,\n message,\n actionLabel = \"Done\",\n txHash,\n onClose,\n}: {\n title: string;\n message: string;\n actionLabel?: string;\n txHash?: string;\n onClose: () => void;\n}) {\n const { explorerUrl } = useMediaWalletApp();\n useEffect(() => {\n fireConfetti();\n }, []);\n return (\n <CanvasPortal>\n <div className=\"absolute inset-0 z-[70] grid place-items-center p-6\" onClick={onClose}>\n <ActionBackdrop />\n <div className=\"card-base relative z-10 w-full max-w-[320px] p-6 text-center\" onClick={(e) => e.stopPropagation()}>\n <div\n className=\"mx-auto grid h-16 w-16 place-items-center rounded-full text-white\"\n style={{ background: BRAND_GRADIENT }}\n >\n <svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n </div>\n <h2 className=\"mt-4 font-[family-name:var(--font-display)] text-xl font-extrabold tracking-tight\">{title}</h2>\n <p className=\"mt-1.5 text-sm leading-relaxed text-muted-foreground\">{message}</p>\n {txHash && (\n <a\n href={explorerTxUrl(explorerUrl, txHash)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"mt-3 inline-block text-xs text-brand-blue hover:underline\"\n >\n View on Voyager ↗\n </a>\n )}\n <ActionButton big onClick={onClose} className=\"mt-5 w-full\" style={{ \"--ml-grad\": BRAND_GRADIENT } as React.CSSProperties}>\n {actionLabel}\n </ActionButton>\n </div>\n </div>\n </CanvasPortal>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BQ;AA7BR,mBAA0B;AAC1B,2BAA6B;AAC7B,0BAA6C;AAC7C,sBAA6B;AAC7B,2BAA8B;AAC9B,mBAAkC;AAElC,MAAM,iBAAiB;AAEhB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AACF,GAMG;AACD,QAAM,EAAE,YAAY,QAAI,gCAAkB;AAC1C,8BAAU,MAAM;AACd,sCAAa;AAAA,EACf,GAAG,CAAC,CAAC;AACL,SACE,4CAAC,oCACC,uDAAC,SAAI,WAAU,uDAAsD,SAAS,SAC5E;AAAA,gDAAC,sCAAe;AAAA,IAChB,6CAAC,SAAI,WAAU,gEAA+D,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAC9G;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAE,YAAY,eAAe;AAAA,UAEpC,sDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,OAAM,eAAc,SAAQ,gBAAe,SACvI,sDAAC,UAAK,GAAE,mBAAkB,GAC5B;AAAA;AAAA,MACF;AAAA,MACA,4CAAC,QAAG,WAAU,qFAAqF,iBAAM;AAAA,MACzG,4CAAC,OAAE,WAAU,wDAAwD,mBAAQ;AAAA,MAC5E,UACC;AAAA,QAAC;AAAA;AAAA,UACC,UAAM,oCAAc,aAAa,MAAM;AAAA,UACvC,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MAEF,4CAAC,qCAAa,KAAG,MAAC,SAAS,SAAS,WAAU,eAAc,OAAO,EAAE,aAAa,eAAe,GAC9F,uBACH;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function SuccessDialog({ title, message, actionLabel, txHash, onClose, }: {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
actionLabel?: string;
|
|
7
|
+
txHash?: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { SuccessDialog };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function SuccessDialog({ title, message, actionLabel, txHash, onClose, }: {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
actionLabel?: string;
|
|
7
|
+
txHash?: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { SuccessDialog };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import { ActionButton } from "../action-button.js";
|
|
5
|
+
import { ActionBackdrop, CanvasPortal } from "./action-modal.js";
|
|
6
|
+
import { fireConfetti } from "../../utils/media-wallet/confetti.js";
|
|
7
|
+
import { explorerTxUrl } from "../../utils/media-wallet/wallet-format.js";
|
|
8
|
+
import { useMediaWalletApp } from "./types.js";
|
|
9
|
+
const BRAND_GRADIENT = "linear-gradient(115deg, #3b7bff, #8a5cf6, #f6608f, #fb8b46, #3b7bff)";
|
|
10
|
+
function SuccessDialog({
|
|
11
|
+
title,
|
|
12
|
+
message,
|
|
13
|
+
actionLabel = "Done",
|
|
14
|
+
txHash,
|
|
15
|
+
onClose
|
|
16
|
+
}) {
|
|
17
|
+
const { explorerUrl } = useMediaWalletApp();
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
fireConfetti();
|
|
20
|
+
}, []);
|
|
21
|
+
return /* @__PURE__ */ jsx(CanvasPortal, { children: /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-[70] grid place-items-center p-6", onClick: onClose, children: [
|
|
22
|
+
/* @__PURE__ */ jsx(ActionBackdrop, {}),
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "card-base relative z-10 w-full max-w-[320px] p-6 text-center", onClick: (e) => e.stopPropagation(), children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: "mx-auto grid h-16 w-16 place-items-center rounded-full text-white",
|
|
28
|
+
style: { background: BRAND_GRADIENT },
|
|
29
|
+
children: /* @__PURE__ */ jsx("svg", { width: "30", height: "30", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) })
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-4 font-[family-name:var(--font-display)] text-xl font-extrabold tracking-tight", children: title }),
|
|
33
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm leading-relaxed text-muted-foreground", children: message }),
|
|
34
|
+
txHash && /* @__PURE__ */ jsx(
|
|
35
|
+
"a",
|
|
36
|
+
{
|
|
37
|
+
href: explorerTxUrl(explorerUrl, txHash),
|
|
38
|
+
target: "_blank",
|
|
39
|
+
rel: "noopener noreferrer",
|
|
40
|
+
className: "mt-3 inline-block text-xs text-brand-blue hover:underline",
|
|
41
|
+
children: "View on Voyager \u2197"
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(ActionButton, { big: true, onClick: onClose, className: "mt-5 w-full", style: { "--ml-grad": BRAND_GRADIENT }, children: actionLabel })
|
|
45
|
+
] })
|
|
46
|
+
] }) });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
SuccessDialog
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=success-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/success-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect } from \"react\";\nimport { ActionButton } from \"../action-button.js\";\nimport { ActionBackdrop, CanvasPortal } from \"./action-modal.js\";\nimport { fireConfetti } from \"../../utils/media-wallet/confetti.js\";\nimport { explorerTxUrl } from \"../../utils/media-wallet/wallet-format.js\";\nimport { useMediaWalletApp } from \"./types.js\";\n\nconst BRAND_GRADIENT = \"linear-gradient(115deg, #3b7bff, #8a5cf6, #f6608f, #fb8b46, #3b7bff)\";\n\nexport function SuccessDialog({\n title,\n message,\n actionLabel = \"Done\",\n txHash,\n onClose,\n}: {\n title: string;\n message: string;\n actionLabel?: string;\n txHash?: string;\n onClose: () => void;\n}) {\n const { explorerUrl } = useMediaWalletApp();\n useEffect(() => {\n fireConfetti();\n }, []);\n return (\n <CanvasPortal>\n <div className=\"absolute inset-0 z-[70] grid place-items-center p-6\" onClick={onClose}>\n <ActionBackdrop />\n <div className=\"card-base relative z-10 w-full max-w-[320px] p-6 text-center\" onClick={(e) => e.stopPropagation()}>\n <div\n className=\"mx-auto grid h-16 w-16 place-items-center rounded-full text-white\"\n style={{ background: BRAND_GRADIENT }}\n >\n <svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n </div>\n <h2 className=\"mt-4 font-[family-name:var(--font-display)] text-xl font-extrabold tracking-tight\">{title}</h2>\n <p className=\"mt-1.5 text-sm leading-relaxed text-muted-foreground\">{message}</p>\n {txHash && (\n <a\n href={explorerTxUrl(explorerUrl, txHash)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"mt-3 inline-block text-xs text-brand-blue hover:underline\"\n >\n View on Voyager ↗\n </a>\n )}\n <ActionButton big onClick={onClose} className=\"mt-5 w-full\" style={{ \"--ml-grad\": BRAND_GRADIENT } as React.CSSProperties}>\n {actionLabel}\n </ActionButton>\n </div>\n </div>\n </CanvasPortal>\n );\n}\n"],"mappings":";AA+BQ,cACA,YADA;AA7BR,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB,oBAAoB;AAC7C,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAElC,MAAM,iBAAiB;AAEhB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AACF,GAMG;AACD,QAAM,EAAE,YAAY,IAAI,kBAAkB;AAC1C,YAAU,MAAM;AACd,iBAAa;AAAA,EACf,GAAG,CAAC,CAAC;AACL,SACE,oBAAC,gBACC,+BAAC,SAAI,WAAU,uDAAsD,SAAS,SAC5E;AAAA,wBAAC,kBAAe;AAAA,IAChB,qBAAC,SAAI,WAAU,gEAA+D,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAC9G;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAE,YAAY,eAAe;AAAA,UAEpC,8BAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,OAAM,eAAc,SAAQ,gBAAe,SACvI,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,QAAG,WAAU,qFAAqF,iBAAM;AAAA,MACzG,oBAAC,OAAE,WAAU,wDAAwD,mBAAQ;AAAA,MAC5E,UACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,cAAc,aAAa,MAAM;AAAA,UACvC,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,WAAU;AAAA,UACX;AAAA;AAAA,MAED;AAAA,MAEF,oBAAC,gBAAa,KAAG,MAAC,SAAS,SAAS,WAAU,eAAc,OAAO,EAAE,aAAa,eAAe,GAC9F,uBACH;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var types_exports = {};
|
|
20
|
+
__export(types_exports, {
|
|
21
|
+
MediaWalletAppContext: () => MediaWalletAppContext,
|
|
22
|
+
useMediaWalletApp: () => useMediaWalletApp
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(types_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
const MediaWalletAppContext = (0, import_react.createContext)(null);
|
|
27
|
+
function useMediaWalletApp() {
|
|
28
|
+
const app = (0, import_react.useContext)(MediaWalletAppContext);
|
|
29
|
+
if (!app) throw new Error("useMediaWalletApp must be used inside MediaWalletOverlay");
|
|
30
|
+
return app;
|
|
31
|
+
}
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
MediaWalletAppContext,
|
|
35
|
+
useMediaWalletApp
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/types.ts"],"sourcesContent":["import { createContext, useContext, type ReactNode } from \"react\";\nimport type { ProviderInterface } from \"starknet\";\nimport type { MediaWallet, MedialaneClient, StarknetVenueSigner } from \"@medialane/sdk/starknet\";\nimport type { WalletToken } from \"../../utils/media-wallet/wallet-tokens.js\";\n\nexport type MediaWalletView =\n | { name: \"home\"; autoOpenReceive?: boolean }\n | { name: \"send\"; token?: WalletToken }\n | { name: \"token\"; token: WalletToken }\n | { name: \"activity\" };\n\nexport type WalletWriteStatus = \"idle\" | \"processing\" | \"confirming\" | \"success\" | \"error\";\n\nexport interface WalletWriteAction {\n run: (execute: (signer: StarknetVenueSigner) => Promise<{ txHash: string } | void>) => Promise<void>;\n status: WalletWriteStatus;\n reset: () => void;\n error: string | null;\n}\n\nexport interface MediaWalletSession {\n address: string | null;\n hasWallet: boolean;\n isDeployed: boolean | null;\n signer: StarknetVenueSigner | null;\n}\n\nexport interface MediaWalletHeaderIdentity {\n avatarUrl?: string | null;\n headline?: string;\n badge?: ReactNode;\n}\n\nexport interface MediaWalletAppProps {\n getClient: () => MedialaneClient;\n provider: ProviderInterface;\n wallet: Pick<MediaWallet, \"completeDeployment\">;\n useWalletSession: () => MediaWalletSession;\n useWriteAction: () => WalletWriteAction;\n resolveImage: (uri: string | null | undefined) => string | null;\n explorerUrl: string;\n useAccountEmail: () => string | null;\n useEmailStatus: () => { email: string | null; emailVerified: boolean; deadline?: string | null } | null;\n emailBanner: { href: string; text: (deadline: string | null | undefined) => string };\n externalWallet: { href: string; label: string };\n useHeaderIdentity?: (address: string) => MediaWalletHeaderIdentity;\n}\n\nexport const MediaWalletAppContext = createContext<MediaWalletAppProps | null>(null);\n\nexport function useMediaWalletApp(): MediaWalletAppProps {\n const app = useContext(MediaWalletAppContext);\n if (!app) throw new Error(\"useMediaWalletApp must be used inside MediaWalletOverlay\");\n return app;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0D;AAgDnD,MAAM,4BAAwB,4BAA0C,IAAI;AAE5E,SAAS,oBAAyC;AACvD,QAAM,UAAM,yBAAW,qBAAqB;AAC5C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,0DAA0D;AACpF,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ProviderInterface } from 'starknet';
|
|
4
|
+
import { MedialaneClient, MediaWallet, StarknetVenueSigner } from '@medialane/sdk/starknet';
|
|
5
|
+
import { WalletToken } from '../../utils/media-wallet/wallet-tokens.cjs';
|
|
6
|
+
|
|
7
|
+
type MediaWalletView = {
|
|
8
|
+
name: "home";
|
|
9
|
+
autoOpenReceive?: boolean;
|
|
10
|
+
} | {
|
|
11
|
+
name: "send";
|
|
12
|
+
token?: WalletToken;
|
|
13
|
+
} | {
|
|
14
|
+
name: "token";
|
|
15
|
+
token: WalletToken;
|
|
16
|
+
} | {
|
|
17
|
+
name: "activity";
|
|
18
|
+
};
|
|
19
|
+
type WalletWriteStatus = "idle" | "processing" | "confirming" | "success" | "error";
|
|
20
|
+
interface WalletWriteAction {
|
|
21
|
+
run: (execute: (signer: StarknetVenueSigner) => Promise<{
|
|
22
|
+
txHash: string;
|
|
23
|
+
} | void>) => Promise<void>;
|
|
24
|
+
status: WalletWriteStatus;
|
|
25
|
+
reset: () => void;
|
|
26
|
+
error: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface MediaWalletSession {
|
|
29
|
+
address: string | null;
|
|
30
|
+
hasWallet: boolean;
|
|
31
|
+
isDeployed: boolean | null;
|
|
32
|
+
signer: StarknetVenueSigner | null;
|
|
33
|
+
}
|
|
34
|
+
interface MediaWalletHeaderIdentity {
|
|
35
|
+
avatarUrl?: string | null;
|
|
36
|
+
headline?: string;
|
|
37
|
+
badge?: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
interface MediaWalletAppProps {
|
|
40
|
+
getClient: () => MedialaneClient;
|
|
41
|
+
provider: ProviderInterface;
|
|
42
|
+
wallet: Pick<MediaWallet, "completeDeployment">;
|
|
43
|
+
useWalletSession: () => MediaWalletSession;
|
|
44
|
+
useWriteAction: () => WalletWriteAction;
|
|
45
|
+
resolveImage: (uri: string | null | undefined) => string | null;
|
|
46
|
+
explorerUrl: string;
|
|
47
|
+
useAccountEmail: () => string | null;
|
|
48
|
+
useEmailStatus: () => {
|
|
49
|
+
email: string | null;
|
|
50
|
+
emailVerified: boolean;
|
|
51
|
+
deadline?: string | null;
|
|
52
|
+
} | null;
|
|
53
|
+
emailBanner: {
|
|
54
|
+
href: string;
|
|
55
|
+
text: (deadline: string | null | undefined) => string;
|
|
56
|
+
};
|
|
57
|
+
externalWallet: {
|
|
58
|
+
href: string;
|
|
59
|
+
label: string;
|
|
60
|
+
};
|
|
61
|
+
useHeaderIdentity?: (address: string) => MediaWalletHeaderIdentity;
|
|
62
|
+
}
|
|
63
|
+
declare const MediaWalletAppContext: React.Context<MediaWalletAppProps | null>;
|
|
64
|
+
declare function useMediaWalletApp(): MediaWalletAppProps;
|
|
65
|
+
|
|
66
|
+
export { MediaWalletAppContext, type MediaWalletAppProps, type MediaWalletHeaderIdentity, type MediaWalletSession, type MediaWalletView, type WalletWriteAction, type WalletWriteStatus, useMediaWalletApp };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ProviderInterface } from 'starknet';
|
|
4
|
+
import { MedialaneClient, MediaWallet, StarknetVenueSigner } from '@medialane/sdk/starknet';
|
|
5
|
+
import { WalletToken } from '../../utils/media-wallet/wallet-tokens.js';
|
|
6
|
+
|
|
7
|
+
type MediaWalletView = {
|
|
8
|
+
name: "home";
|
|
9
|
+
autoOpenReceive?: boolean;
|
|
10
|
+
} | {
|
|
11
|
+
name: "send";
|
|
12
|
+
token?: WalletToken;
|
|
13
|
+
} | {
|
|
14
|
+
name: "token";
|
|
15
|
+
token: WalletToken;
|
|
16
|
+
} | {
|
|
17
|
+
name: "activity";
|
|
18
|
+
};
|
|
19
|
+
type WalletWriteStatus = "idle" | "processing" | "confirming" | "success" | "error";
|
|
20
|
+
interface WalletWriteAction {
|
|
21
|
+
run: (execute: (signer: StarknetVenueSigner) => Promise<{
|
|
22
|
+
txHash: string;
|
|
23
|
+
} | void>) => Promise<void>;
|
|
24
|
+
status: WalletWriteStatus;
|
|
25
|
+
reset: () => void;
|
|
26
|
+
error: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface MediaWalletSession {
|
|
29
|
+
address: string | null;
|
|
30
|
+
hasWallet: boolean;
|
|
31
|
+
isDeployed: boolean | null;
|
|
32
|
+
signer: StarknetVenueSigner | null;
|
|
33
|
+
}
|
|
34
|
+
interface MediaWalletHeaderIdentity {
|
|
35
|
+
avatarUrl?: string | null;
|
|
36
|
+
headline?: string;
|
|
37
|
+
badge?: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
interface MediaWalletAppProps {
|
|
40
|
+
getClient: () => MedialaneClient;
|
|
41
|
+
provider: ProviderInterface;
|
|
42
|
+
wallet: Pick<MediaWallet, "completeDeployment">;
|
|
43
|
+
useWalletSession: () => MediaWalletSession;
|
|
44
|
+
useWriteAction: () => WalletWriteAction;
|
|
45
|
+
resolveImage: (uri: string | null | undefined) => string | null;
|
|
46
|
+
explorerUrl: string;
|
|
47
|
+
useAccountEmail: () => string | null;
|
|
48
|
+
useEmailStatus: () => {
|
|
49
|
+
email: string | null;
|
|
50
|
+
emailVerified: boolean;
|
|
51
|
+
deadline?: string | null;
|
|
52
|
+
} | null;
|
|
53
|
+
emailBanner: {
|
|
54
|
+
href: string;
|
|
55
|
+
text: (deadline: string | null | undefined) => string;
|
|
56
|
+
};
|
|
57
|
+
externalWallet: {
|
|
58
|
+
href: string;
|
|
59
|
+
label: string;
|
|
60
|
+
};
|
|
61
|
+
useHeaderIdentity?: (address: string) => MediaWalletHeaderIdentity;
|
|
62
|
+
}
|
|
63
|
+
declare const MediaWalletAppContext: React.Context<MediaWalletAppProps | null>;
|
|
64
|
+
declare function useMediaWalletApp(): MediaWalletAppProps;
|
|
65
|
+
|
|
66
|
+
export { MediaWalletAppContext, type MediaWalletAppProps, type MediaWalletHeaderIdentity, type MediaWalletSession, type MediaWalletView, type WalletWriteAction, type WalletWriteStatus, useMediaWalletApp };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const MediaWalletAppContext = createContext(null);
|
|
3
|
+
function useMediaWalletApp() {
|
|
4
|
+
const app = useContext(MediaWalletAppContext);
|
|
5
|
+
if (!app) throw new Error("useMediaWalletApp must be used inside MediaWalletOverlay");
|
|
6
|
+
return app;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
MediaWalletAppContext,
|
|
10
|
+
useMediaWalletApp
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/media-wallet/types.ts"],"sourcesContent":["import { createContext, useContext, type ReactNode } from \"react\";\nimport type { ProviderInterface } from \"starknet\";\nimport type { MediaWallet, MedialaneClient, StarknetVenueSigner } from \"@medialane/sdk/starknet\";\nimport type { WalletToken } from \"../../utils/media-wallet/wallet-tokens.js\";\n\nexport type MediaWalletView =\n | { name: \"home\"; autoOpenReceive?: boolean }\n | { name: \"send\"; token?: WalletToken }\n | { name: \"token\"; token: WalletToken }\n | { name: \"activity\" };\n\nexport type WalletWriteStatus = \"idle\" | \"processing\" | \"confirming\" | \"success\" | \"error\";\n\nexport interface WalletWriteAction {\n run: (execute: (signer: StarknetVenueSigner) => Promise<{ txHash: string } | void>) => Promise<void>;\n status: WalletWriteStatus;\n reset: () => void;\n error: string | null;\n}\n\nexport interface MediaWalletSession {\n address: string | null;\n hasWallet: boolean;\n isDeployed: boolean | null;\n signer: StarknetVenueSigner | null;\n}\n\nexport interface MediaWalletHeaderIdentity {\n avatarUrl?: string | null;\n headline?: string;\n badge?: ReactNode;\n}\n\nexport interface MediaWalletAppProps {\n getClient: () => MedialaneClient;\n provider: ProviderInterface;\n wallet: Pick<MediaWallet, \"completeDeployment\">;\n useWalletSession: () => MediaWalletSession;\n useWriteAction: () => WalletWriteAction;\n resolveImage: (uri: string | null | undefined) => string | null;\n explorerUrl: string;\n useAccountEmail: () => string | null;\n useEmailStatus: () => { email: string | null; emailVerified: boolean; deadline?: string | null } | null;\n emailBanner: { href: string; text: (deadline: string | null | undefined) => string };\n externalWallet: { href: string; label: string };\n useHeaderIdentity?: (address: string) => MediaWalletHeaderIdentity;\n}\n\nexport const MediaWalletAppContext = createContext<MediaWalletAppProps | null>(null);\n\nexport function useMediaWalletApp(): MediaWalletAppProps {\n const app = useContext(MediaWalletAppContext);\n if (!app) throw new Error(\"useMediaWalletApp must be used inside MediaWalletOverlay\");\n return app;\n}\n"],"mappings":"AAAA,SAAS,eAAe,kBAAkC;AAgDnD,MAAM,wBAAwB,cAA0C,IAAI;AAE5E,SAAS,oBAAyC;AACvD,QAAM,MAAM,WAAW,qBAAqB;AAC5C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,0DAA0D;AACpF,SAAO;AACT;","names":[]}
|