@medialane/ui 0.305.0 → 0.306.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.
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "icon" | "default" | "sm" | "lg" | null | undefined;
6
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -0,0 +1,48 @@
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 cancel_order_confirm_exports = {};
21
+ __export(cancel_order_confirm_exports, {
22
+ CancelOrderConfirm: () => CancelOrderConfirm
23
+ });
24
+ module.exports = __toCommonJS(cancel_order_confirm_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_marketplace_dialog_primitives = require("./marketplace-dialog-primitives.js");
27
+ function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }) {
28
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
29
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_marketplace_dialog_primitives.OrderSummaryHero, { name, image, price, tone: "destructive" }),
30
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31
+ import_marketplace_dialog_primitives.MarketplaceConfirmStep,
32
+ {
33
+ description: "This order will be permanently removed onchain.",
34
+ error,
35
+ secondaryLabel: "Keep it",
36
+ onSecondary: onKeep,
37
+ primaryLabel: `Cancel ${variant}`,
38
+ onPrimary: onConfirm,
39
+ primaryVariant: "destructive"
40
+ }
41
+ )
42
+ ] });
43
+ }
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ CancelOrderConfirm
47
+ });
48
+ //# sourceMappingURL=cancel-order-confirm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/cancel-order-confirm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { MarketplaceConfirmStep, OrderSummaryHero } from \"./marketplace-dialog-primitives.js\";\n\nexport interface CancelOrderConfirmProps {\n variant: \"listing\" | \"offer\";\n name: string;\n image?: string | null;\n price?: ComponentProps<typeof OrderSummaryHero>[\"price\"];\n error?: string | null;\n onKeep: () => void;\n onConfirm: () => void;\n}\n\nexport function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }: CancelOrderConfirmProps) {\n return (\n <div>\n <OrderSummaryHero name={name} image={image} price={price} tone=\"destructive\" />\n <MarketplaceConfirmStep\n description=\"This order will be permanently removed onchain.\"\n error={error}\n secondaryLabel=\"Keep it\"\n onSecondary={onKeep}\n primaryLabel={`Cancel ${variant}`}\n onPrimary={onConfirm}\n primaryVariant=\"destructive\"\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAdJ,2CAAyD;AAYlD,SAAS,mBAAmB,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,QAAQ,UAAU,GAA4B;AACrH,SACE,6CAAC,SACC;AAAA,gDAAC,yDAAiB,MAAY,OAAc,OAAc,MAAK,eAAc;AAAA,IAC7E;AAAA,MAAC;AAAA;AAAA,QACC,aAAY;AAAA,QACZ;AAAA,QACA,gBAAe;AAAA,QACf,aAAa;AAAA,QACb,cAAc,UAAU,OAAO;AAAA,QAC/B,WAAW;AAAA,QACX,gBAAe;AAAA;AAAA,IACjB;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
3
+ import { OrderSummaryHero } from './marketplace-dialog-primitives.cjs';
4
+
5
+ interface CancelOrderConfirmProps {
6
+ variant: "listing" | "offer";
7
+ name: string;
8
+ image?: string | null;
9
+ price?: ComponentProps<typeof OrderSummaryHero>["price"];
10
+ error?: string | null;
11
+ onKeep: () => void;
12
+ onConfirm: () => void;
13
+ }
14
+ declare function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }: CancelOrderConfirmProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { CancelOrderConfirm, type CancelOrderConfirmProps };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
3
+ import { OrderSummaryHero } from './marketplace-dialog-primitives.js';
4
+
5
+ interface CancelOrderConfirmProps {
6
+ variant: "listing" | "offer";
7
+ name: string;
8
+ image?: string | null;
9
+ price?: ComponentProps<typeof OrderSummaryHero>["price"];
10
+ error?: string | null;
11
+ onKeep: () => void;
12
+ onConfirm: () => void;
13
+ }
14
+ declare function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }: CancelOrderConfirmProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { CancelOrderConfirm, type CancelOrderConfirmProps };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { MarketplaceConfirmStep, OrderSummaryHero } from "./marketplace-dialog-primitives.js";
4
+ function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }) {
5
+ return /* @__PURE__ */ jsxs("div", { children: [
6
+ /* @__PURE__ */ jsx(OrderSummaryHero, { name, image, price, tone: "destructive" }),
7
+ /* @__PURE__ */ jsx(
8
+ MarketplaceConfirmStep,
9
+ {
10
+ description: "This order will be permanently removed onchain.",
11
+ error,
12
+ secondaryLabel: "Keep it",
13
+ onSecondary: onKeep,
14
+ primaryLabel: `Cancel ${variant}`,
15
+ onPrimary: onConfirm,
16
+ primaryVariant: "destructive"
17
+ }
18
+ )
19
+ ] });
20
+ }
21
+ export {
22
+ CancelOrderConfirm
23
+ };
24
+ //# sourceMappingURL=cancel-order-confirm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/cancel-order-confirm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { MarketplaceConfirmStep, OrderSummaryHero } from \"./marketplace-dialog-primitives.js\";\n\nexport interface CancelOrderConfirmProps {\n variant: \"listing\" | \"offer\";\n name: string;\n image?: string | null;\n price?: ComponentProps<typeof OrderSummaryHero>[\"price\"];\n error?: string | null;\n onKeep: () => void;\n onConfirm: () => void;\n}\n\nexport function CancelOrderConfirm({ variant, name, image, price, error, onKeep, onConfirm }: CancelOrderConfirmProps) {\n return (\n <div>\n <OrderSummaryHero name={name} image={image} price={price} tone=\"destructive\" />\n <MarketplaceConfirmStep\n description=\"This order will be permanently removed onchain.\"\n error={error}\n secondaryLabel=\"Keep it\"\n onSecondary={onKeep}\n primaryLabel={`Cancel ${variant}`}\n onPrimary={onConfirm}\n primaryVariant=\"destructive\"\n />\n </div>\n );\n}\n"],"mappings":";AAiBI,SACE,KADF;AAdJ,SAAS,wBAAwB,wBAAwB;AAYlD,SAAS,mBAAmB,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,QAAQ,UAAU,GAA4B;AACrH,SACE,qBAAC,SACC;AAAA,wBAAC,oBAAiB,MAAY,OAAc,OAAc,MAAK,eAAc;AAAA,IAC7E;AAAA,MAAC;AAAA;AAAA,QACC,aAAY;AAAA,QACZ;AAAA,QACA,gBAAe;AAAA,QACf,aAAa;AAAA,QACb,cAAc,UAAU,OAAO;AAAA,QAC/B,WAAW;AAAA,QACX,gBAAe;AAAA;AAAA,IACjB;AAAA,KACF;AAEJ;","names":[]}
@@ -15,7 +15,6 @@ declare const editionMintSchema: zod.ZodObject<{
15
15
  aiPolicy: zod.ZodEnum<["Allowed", "Not Allowed", "Training Only"]>;
16
16
  royalty: zod.ZodNumber;
17
17
  }, "strip", zod.ZodTypeAny, {
18
- value: string;
19
18
  name: string;
20
19
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
21
20
  licenseType: string;
@@ -25,11 +24,11 @@ declare const editionMintSchema: zod.ZodObject<{
25
24
  geographicScope: string;
26
25
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
27
26
  royalty: number;
27
+ value: string;
28
28
  recipient: string;
29
29
  description?: string | undefined;
30
30
  external_url?: string | undefined;
31
31
  }, {
32
- value: string;
33
32
  name: string;
34
33
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
35
34
  licenseType: string;
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
39
38
  geographicScope: string;
40
39
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
41
40
  royalty: number;
41
+ value: string;
42
42
  recipient: string;
43
43
  description?: string | undefined;
44
44
  external_url?: string | undefined;
@@ -15,7 +15,6 @@ declare const editionMintSchema: zod.ZodObject<{
15
15
  aiPolicy: zod.ZodEnum<["Allowed", "Not Allowed", "Training Only"]>;
16
16
  royalty: zod.ZodNumber;
17
17
  }, "strip", zod.ZodTypeAny, {
18
- value: string;
19
18
  name: string;
20
19
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
21
20
  licenseType: string;
@@ -25,11 +24,11 @@ declare const editionMintSchema: zod.ZodObject<{
25
24
  geographicScope: string;
26
25
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
27
26
  royalty: number;
27
+ value: string;
28
28
  recipient: string;
29
29
  description?: string | undefined;
30
30
  external_url?: string | undefined;
31
31
  }, {
32
- value: string;
33
32
  name: string;
34
33
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
35
34
  licenseType: string;
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
39
38
  geographicScope: string;
40
39
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
41
40
  royalty: number;
41
+ value: string;
42
42
  recipient: string;
43
43
  description?: string | undefined;
44
44
  external_url?: string | undefined;
@@ -121,7 +121,7 @@ function MarketplaceErrorState({
121
121
  }) {
122
122
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
123
123
  tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
124
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
125
125
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-5 w-5 text-white" }) })
126
126
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-9 w-9 text-destructive" }) }),
127
127
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1 max-w-full", children: [
@@ -148,7 +148,7 @@ function MarketplaceDialogHero({
148
148
  }) {
149
149
  const name = tokenName || `Token #${tokenId}`;
150
150
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative flex justify-center pt-6 shrink-0", children: [
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted", children: tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center", children: fallbackIcon }) }),
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center", children: fallbackIcon }) }),
152
152
  badge
153
153
  ] });
154
154
  }
@@ -168,7 +168,7 @@ function OrderSummaryHero({
168
168
  const stable = price ? (0, import_format.isStableCurrency)(price.currency) : false;
169
169
  const face = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
170
170
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
171
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
172
172
  "div",
173
173
  {
174
174
  className: (0, import_cn.cn)(
@@ -180,7 +180,7 @@ function OrderSummaryHero({
180
180
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-4 px-5 pt-4 pb-1", children: [
181
181
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
182
182
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-lg leading-tight truncate", children: name }),
183
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle })
183
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle }) : null
184
184
  ] }),
185
185
  price ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "shrink-0 text-right", children: [
186
186
  usdTotal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: (0, import_cn.cn)(face, "text-2xl"), children: usdTotal }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: (0, import_cn.cn)("flex items-center gap-2 justify-end text-2xl", face), children: [
@@ -290,7 +290,7 @@ function MarketplaceConfirmStep({
290
290
  import_button.Button,
291
291
  {
292
292
  variant: "outline",
293
- className: "gap-1.5",
293
+ className: "h-11 flex-1 gap-1.5",
294
294
  onClick: onSecondary,
295
295
  children: secondaryLabel
296
296
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Keep this window open until it finishes.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div>\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BM;AAzBN,mBAAkB;AAClB,0BAA2D;AAC3D,mBAAwC;AACxC,oBAAuB;AACvB,2BAA6B;AAC7B,gBAAmB;AACnB,oBAAqD;AAQ9C,SAAS,kBAAkB,EAAE,QAAQ,aAAa,UAAU,GAA2B;AAC5F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,WAAW,OAAO,MAAM;AAAA,MACjC,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,UAAK,WAAU,gBAAgB;AAAA,iBAAO,MAAM,GAAG,EAAE;AAAA,UAAE;AAAA,UAAE,OAAO,MAAM,EAAE;AAAA,WAAE;AAAA,QACvE,4CAAC,oCAAa,WAAU,WAAU;AAAA;AAAA;AAAA,EACpC;AAEJ;AAWO,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAoC;AAClC,SACE,6CAAC,SAAI,WAAU,6CACZ;AAAA,eACC,6CAAC,SAAI,WAAU,uEACb;AAAA,kDAAC,aAAAA,SAAA,EAAM,KAAK,UAAU,KAAK,UAAU,MAAI,MAAC,OAAM,QAAO,WAAU,gBAAe,aAAW,MAAC;AAAA,MAC5F,4CAAC,SAAI,WAAU,sEACb,sDAAC,+BAAQ,WAAU,qCAAoC,GACzD;AAAA,OACF,IAEA,4CAAC,+BAAQ,WAAU,uCAAsC;AAAA,IAE3D,6CAAC,SAAI,WAAU,yBACb;AAA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A,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,6CAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,4CAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,6CAAC,sBAAM,SAAQ,eACb;AAAA,kDAAC,mCAAY,WAAU,WAAU;AAAA,MACjC,4CAAC,iCAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,6CAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":["Image"]}
1
+ {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Keep this window open until it finishes.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle?: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n {subtitle ? <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div> : null}\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"h-11 flex-1 gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BM;AAzBN,mBAAkB;AAClB,0BAA2D;AAC3D,mBAAwC;AACxC,oBAAuB;AACvB,2BAA6B;AAC7B,gBAAmB;AACnB,oBAAqD;AAQ9C,SAAS,kBAAkB,EAAE,QAAQ,aAAa,UAAU,GAA2B;AAC5F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,WAAW,OAAO,MAAM;AAAA,MACjC,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,UAAK,WAAU,gBAAgB;AAAA,iBAAO,MAAM,GAAG,EAAE;AAAA,UAAE;AAAA,UAAE,OAAO,MAAM,EAAE;AAAA,WAAE;AAAA,QACvE,4CAAC,oCAAa,WAAU,WAAU;AAAA;AAAA;AAAA,EACpC;AAEJ;AAWO,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAAoC;AAClC,SACE,6CAAC,SAAI,WAAU,6CACZ;AAAA,eACC,6CAAC,SAAI,WAAU,uEACb;AAAA,kDAAC,aAAAA,SAAA,EAAM,KAAK,UAAU,KAAK,UAAU,MAAI,MAAC,OAAM,QAAO,WAAU,gBAAe,aAAW,MAAC;AAAA,MAC5F,4CAAC,SAAI,WAAU,sEACb,sDAAC,+BAAQ,WAAU,qCAAoC,GACzD;AAAA,OACF,IAEA,4CAAC,+BAAQ,WAAU,uCAAsC;AAAA,IAE3D,6CAAC,SAAI,WAAU,yB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B;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,6CAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,4CAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,6CAAC,sBAAM,SAAQ,eACb;AAAA,kDAAC,mCAAY,WAAU,WAAU;AAAA,MACjC,4CAAC,iCAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,6CAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":["Image"]}
@@ -47,7 +47,7 @@ declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbac
47
47
  interface OrderSummaryHeroProps {
48
48
  name: string;
49
49
  image?: string | null;
50
- subtitle: ReactNode;
50
+ subtitle?: ReactNode;
51
51
  tone?: "default" | "destructive";
52
52
  price?: {
53
53
  formatted: string | null;
@@ -47,7 +47,7 @@ declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbac
47
47
  interface OrderSummaryHeroProps {
48
48
  name: string;
49
49
  image?: string | null;
50
- subtitle: ReactNode;
50
+ subtitle?: ReactNode;
51
51
  tone?: "default" | "destructive";
52
52
  price?: {
53
53
  formatted: string | null;
@@ -80,7 +80,7 @@ function MarketplaceErrorState({
80
80
  }) {
81
81
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
82
82
  tokenImage ? /* @__PURE__ */ jsxs("div", { className: "relative", children: [
83
- /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
83
+ /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden", children: /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
84
84
  /* @__PURE__ */ jsx("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-white" }) })
85
85
  ] }) : /* @__PURE__ */ jsx("div", { className: "h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-9 w-9 text-destructive" }) }),
86
86
  /* @__PURE__ */ jsxs("div", { className: "text-center space-y-1 max-w-full", children: [
@@ -107,7 +107,7 @@ function MarketplaceDialogHero({
107
107
  }) {
108
108
  const name = tokenName || `Token #${tokenId}`;
109
109
  return /* @__PURE__ */ jsxs("div", { className: "relative flex justify-center pt-6 shrink-0", children: [
110
- /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted", children: tokenImage ? /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx("div", { className: "h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center", children: fallbackIcon }) }),
110
+ /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: tokenImage ? /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx("div", { className: "h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center", children: fallbackIcon }) }),
111
111
  badge
112
112
  ] });
113
113
  }
@@ -127,7 +127,7 @@ function OrderSummaryHero({
127
127
  const stable = price ? isStableCurrency(price.currency) : false;
128
128
  const face = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
129
129
  return /* @__PURE__ */ jsxs("div", { children: [
130
- /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted", children: image ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx(
130
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx(
131
131
  "div",
132
132
  {
133
133
  className: cn(
@@ -139,7 +139,7 @@ function OrderSummaryHero({
139
139
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-5 pt-4 pb-1", children: [
140
140
  /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
141
141
  /* @__PURE__ */ jsx("p", { className: "font-bold text-lg leading-tight truncate", children: name }),
142
- /* @__PURE__ */ jsx("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle })
142
+ subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle }) : null
143
143
  ] }),
144
144
  price ? /* @__PURE__ */ jsxs("div", { className: "shrink-0 text-right", children: [
145
145
  usdTotal ? /* @__PURE__ */ jsx("p", { className: cn(face, "text-2xl"), children: usdTotal }) : /* @__PURE__ */ jsxs("p", { className: cn("flex items-center gap-2 justify-end text-2xl", face), children: [
@@ -249,7 +249,7 @@ function MarketplaceConfirmStep({
249
249
  Button,
250
250
  {
251
251
  variant: "outline",
252
- className: "gap-1.5",
252
+ className: "h-11 flex-1 gap-1.5",
253
253
  onClick: onSecondary,
254
254
  children: secondaryLabel
255
255
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Keep this window open until it finishes.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div>\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";AA4BM,SACA,KADA;AAzBN,OAAO,WAAW;AAClB,SAAS,aAAa,cAAc,SAAS,cAAc;AAC3D,SAAS,OAAO,wBAAwB;AACxC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,oBAAoB,wBAAwB;AAQ9C,SAAS,kBAAkB,EAAE,QAAQ,aAAa,UAAU,GAA2B;AAC5F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,WAAW,OAAO,MAAM;AAAA,MACjC,QA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components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Keep this window open until it finishes.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle?: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n {subtitle ? <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div> : null}\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"h-11 flex-1 gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";AA4BM,SACA,KADA;AAzBN,OAAO,WAAW;AAClB,SAAS,aAAa,cAAc,SAAS,cAAc;AAC3D,SAAS,OAAO,wBAAwB;AACxC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,oBAAoB,wBAAwB;AAQ9C,SAAS,kBAAkB,EAAE,QAAQ,aAAa,UAAU,GAA2B;AAC5F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,WAAW,OAAO,MAAM;AAAA,MACjC,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,6BAAC,UAA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Y;AAAA,MAC7C,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,IAAI,OAAO;AAAA,MACnC;AAAA,MACA,WAAU;AAAA,MAET,cAAI;AAAA;AAAA,IARA,IAAI;AAAA,EASX,CACD,GACH;AAEJ;AAgBO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACF,GAAgC;AAC9B,QAAM,gBAAgB,mBAAmB,gBACvC;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,qBAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,oBAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,qBAAC,SAAM,SAAQ,eACb;AAAA,0BAAC,eAAY,WAAU,WAAU;AAAA,MACjC,oBAAC,oBAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,qBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
package/dist/index.cjs CHANGED
@@ -78,6 +78,7 @@ __export(index_exports, {
78
78
  COIN_KINDS: () => import_coins.COIN_KINDS,
79
79
  COLLECTION_TYPES: () => import_new_collection_menu.COLLECTION_TYPES,
80
80
  CONNECTION_FAILED: () => import_describe_error.CONNECTION_FAILED,
81
+ CancelOrderConfirm: () => import_cancel_order_confirm.CancelOrderConfirm,
81
82
  Card: () => import_card.Card,
82
83
  CardContent: () => import_card.CardContent,
83
84
  CardDescription: () => import_card.CardDescription,
@@ -768,6 +769,7 @@ var import_drops_page = require("./components/drops-page.js");
768
769
  var import_pop_my_events_page = require("./components/pop-my-events-page.js");
769
770
  var import_creator_page = require("./components/creator-page.js");
770
771
  var import_account_page = require("./components/account-page.js");
772
+ var import_cancel_order_confirm = require("./components/cancel-order-confirm.js");
771
773
  var import_underline_tabs = require("./components/underline-tabs.js");
772
774
  var import_more_menu = require("./components/more-menu.js");
773
775
  var import_license_request_page = require("./components/license-request-page.js");
@@ -975,6 +977,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
975
977
  COIN_KINDS,
976
978
  COLLECTION_TYPES,
977
979
  CONNECTION_FAILED,
980
+ CancelOrderConfirm,
978
981
  Card,
979
982
  CardContent,
980
983
  CardDescription,