@medialane/ui 0.406.0 → 0.408.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/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/coin-row.cjs +1 -1
- package/dist/components/coin-row.cjs.map +1 -1
- package/dist/components/coin-row.js +1 -1
- package/dist/components/coin-row.js.map +1 -1
- package/dist/components/coins-explorer.cjs +2 -2
- package/dist/components/coins-explorer.cjs.map +1 -1
- package/dist/components/coins-explorer.js +2 -2
- package/dist/components/coins-explorer.js.map +1 -1
- package/dist/components/drop/create/drop-panel.cjs +1 -1
- package/dist/components/drop/create/drop-panel.cjs.map +1 -1
- package/dist/components/drop/create/drop-panel.js +1 -1
- package/dist/components/drop/create/drop-panel.js.map +1 -1
- package/dist/components/icon-tile.cjs +4 -4
- package/dist/components/icon-tile.cjs.map +1 -1
- package/dist/components/icon-tile.d.cts +3 -3
- package/dist/components/icon-tile.d.ts +3 -3
- package/dist/components/icon-tile.js +4 -4
- package/dist/components/icon-tile.js.map +1 -1
- package/dist/components/launchpad/coin-create.cjs +2 -2
- package/dist/components/launchpad/coin-create.cjs.map +1 -1
- package/dist/components/launchpad/coin-create.js +2 -2
- package/dist/components/launchpad/coin-create.js.map +1 -1
- package/dist/components/nav-command-dialog.cjs +1 -1
- package/dist/components/nav-command-dialog.cjs.map +1 -1
- package/dist/components/nav-command-dialog.js +1 -1
- package/dist/components/nav-command-dialog.js.map +1 -1
- package/dist/components/rewards/rewards-dashboard.cjs +2 -2
- package/dist/components/rewards/rewards-dashboard.cjs.map +1 -1
- package/dist/components/rewards/rewards-dashboard.js +2 -2
- package/dist/components/rewards/rewards-dashboard.js.map +1 -1
- package/dist/data/launchpad-services.cjs +2 -2
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.js +2 -2
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/data/nav-commands.cjs +54 -1
- package/dist/data/nav-commands.cjs.map +1 -1
- package/dist/data/nav-commands.d.cts +17 -2
- package/dist/data/nav-commands.d.ts +17 -2
- package/dist/data/nav-commands.js +54 -1
- package/dist/data/nav-commands.js.map +1 -1
- package/dist/i18n/catalog/pt.cjs +4 -6
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +4 -6
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -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>, "
|
|
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>, "
|
|
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>, "
|
|
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>, "
|
|
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;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "soft" | "destructive" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "soft" | "destructive" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -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?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "default" | "secondary" | "soft" | "link" | "destructive" | "ghost" | "tonal" | 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?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "default" | "secondary" | "soft" | "link" | "destructive" | "ghost" | "tonal" | 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;
|
|
@@ -111,7 +111,7 @@ function CoinRow({ collection, usePrice, href, showKind = false }) {
|
|
|
111
111
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block truncate font-semibold leading-tight", children: collection.name ?? t("Untitled coin") }),
|
|
112
112
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "block truncate text-xs text-muted-foreground", children: [
|
|
113
113
|
collection.symbol ?? "\u2014",
|
|
114
|
-
showKind && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-muted-foreground/60", children: [
|
|
114
|
+
showKind && (0, import_coins.coinKind)(collection.service) !== "creator" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-muted-foreground/60", children: [
|
|
115
115
|
" \xB7 ",
|
|
116
116
|
(0, import_coins.coinKindLabel)((0, import_coins.coinKind)(collection.service))
|
|
117
117
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/coin-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PriceDisplay } from \"./price-display.js\";\nimport {\n coinKind, coinKindLabel, coinAccentToken,\n type CoinCollectionLike, type CoinPriceLike,\n} from \"../data/coins.js\";\nimport { formatUsdPrice } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport type CoinMarketStatus = \"live\" | \"pre-launch\" | \"unavailable\";\n\nexport type UseCoinPrice = (collection: CoinCollectionLike) => {\n price: CoinPriceLike | null;\n status?: CoinMarketStatus;\n isLoading: boolean;\n};\n\nexport const COIN_GRID = \"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 sm:gap-4\";\n\nexport interface CoinRowProps {\n collection: CoinCollectionLike;\n usePrice: UseCoinPrice;\n href: string;\n showKind?: boolean;\n}\n\nexport function CoinAvatar({ collection, size = 36 }: { collection: CoinCollectionLike; size?: number }) {\n const resolveImage = useImageUrl();\n const logoUri = collection.profile?.image ?? collection.image;\n const logo = resolveImage(logoUri);\n const initials = (collection.symbol ?? collection.name ?? \"?\").trim().slice(0, 2).toUpperCase();\n const accent = coinAccentToken(collection.symbol ?? collection.name ?? collection.contractAddress);\n\n return (\n <div\n className={cn(\"relative shrink-0 overflow-hidden rounded-full\", accent)}\n style={{ width: size, height: size }}\n >\n {logo ? (\n <Image src={logo} alt=\"\" fill sizes={`${size}px`} className=\"object-cover\" unoptimized />\n ) : (\n <span\n className=\"flex h-full w-full items-center justify-center font-bold leading-none text-white\"\n style={{ fontSize: size * 0.36 }}\n >\n {initials}\n </span>\n )}\n </div>\n );\n}\n\nfunction PriceCell({ price, status, isLoading }: { price: CoinPriceLike | null; status?: CoinMarketStatus; isLoading: boolean }) {\n const t = useT();\n if (isLoading) return <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />;\n if (!price) {\n return status === \"pre-launch\" ? (\n <span className=\"block text-right text-xs text-muted-foreground\">{t(\"Not trading yet\")}</span>\n ) : (\n <span\n className=\"block text-right text-muted-foreground\"\n title={t(\"No liquidity route was found for this coin on any Starknet DEX yet.\")}\n >\n —\n </span>\n );\n }\n\n const usd = price.quoteUsdRate != null ? formatUsdPrice(price.quotePerCoin * price.quoteUsdRate) : null;\n\n return (\n <span className=\"flex justify-end\">\n <PriceDisplay\n amountFormatted={String(price.quotePerCoin)}\n currency={price.quoteSymbol}\n usdValue={usd}\n scale=\"card\"\n pillClassName=\"hidden sm:inline-flex\"\n />\n </span>\n );\n}\n\nexport function CoinRow({ collection, usePrice, href, showKind = false }: CoinRowProps) {\n const t = useT();\n const { price, status, isLoading } = usePrice(collection);\n\n return (\n <Link\n href={href}\n className={cn(\n COIN_GRID,\n \"border-b border-border/40 px-2 py-2.5 text-sm transition-colors\",\n \"hover:bg-muted/40 active:bg-muted/60\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <CoinAvatar collection={collection} />\n <span className=\"min-w-0\">\n <span className=\"block truncate font-semibold leading-tight\">{collection.name ?? t(\"Untitled coin\")}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {collection.symbol ?? \"—\"}\n {showKind && <span className=\"text-muted-foreground/60\"> · {coinKindLabel(coinKind(collection.service))}</span>}\n </span>\n </span>\n </span>\n\n <PriceCell price={price} status={status} isLoading={isLoading} />\n </Link>\n );\n}\n\nexport function CoinRowSkeleton() {\n return (\n <div className={cn(COIN_GRID, \"border-b border-border/40 px-2 py-2.5\")}>\n <span className=\"flex items-center gap-3\">\n <span className=\"h-9 w-9 shrink-0 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"space-y-1.5\">\n <span className=\"block h-4 w-28 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"block h-3 w-14 animate-pulse rounded-full bg-muted-foreground/10\" />\n </span>\n </span>\n <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CQ;AA1CR,kBAAiB;AACjB,mBAAkB;AAClB,gBAAmB;AACnB,2BAA6B;AAC7B,mBAGO;AACP,oBAA+B;AAC/B,2BAA4B;AAC5B,sBAAqB;AAUd,MAAM,YAAY;AASlB,SAAS,WAAW,EAAE,YAAY,OAAO,GAAG,GAAsD;AACvG,QAAM,mBAAe,kCAAY;AACjC,QAAM,UAAU,WAAW,SAAS,SAAS,WAAW;AACxD,QAAM,OAAO,aAAa,OAAO;AACjC,QAAM,YAAY,WAAW,UAAU,WAAW,QAAQ,KAAK,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,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AAC,YAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,UAAK,WAAU,mCACd;AAAA,sDAAC,cAAW,YAAwB;AAAA,UACpC,6CAAC,UAAK,WAAU,WACd;AAAA,wDAAC,UAAK,WAAU,8CAA8C,qBAAW,QAAQ,EAAE,eAAe,GAAE;AAAA,YACpG,6CAAC,UAAK,WAAU,gDACb;AAAA,yBAAW,UAAU;AAAA,cACrB,
|
|
1
|
+
{"version":3,"sources":["../../src/components/coin-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PriceDisplay } from \"./price-display.js\";\nimport {\n coinKind, coinKindLabel, coinAccentToken,\n type CoinCollectionLike, type CoinPriceLike,\n} from \"../data/coins.js\";\nimport { formatUsdPrice } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport type CoinMarketStatus = \"live\" | \"pre-launch\" | \"unavailable\";\n\nexport type UseCoinPrice = (collection: CoinCollectionLike) => {\n price: CoinPriceLike | null;\n status?: CoinMarketStatus;\n isLoading: boolean;\n};\n\nexport const COIN_GRID = \"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 sm:gap-4\";\n\nexport interface CoinRowProps {\n collection: CoinCollectionLike;\n usePrice: UseCoinPrice;\n href: string;\n showKind?: boolean;\n}\n\nexport function CoinAvatar({ collection, size = 36 }: { collection: CoinCollectionLike; size?: number }) {\n const resolveImage = useImageUrl();\n const logoUri = collection.profile?.image ?? collection.image;\n const logo = resolveImage(logoUri);\n const initials = (collection.symbol ?? collection.name ?? \"?\").trim().slice(0, 2).toUpperCase();\n const accent = coinAccentToken(collection.symbol ?? collection.name ?? collection.contractAddress);\n\n return (\n <div\n className={cn(\"relative shrink-0 overflow-hidden rounded-full\", accent)}\n style={{ width: size, height: size }}\n >\n {logo ? (\n <Image src={logo} alt=\"\" fill sizes={`${size}px`} className=\"object-cover\" unoptimized />\n ) : (\n <span\n className=\"flex h-full w-full items-center justify-center font-bold leading-none text-white\"\n style={{ fontSize: size * 0.36 }}\n >\n {initials}\n </span>\n )}\n </div>\n );\n}\n\nfunction PriceCell({ price, status, isLoading }: { price: CoinPriceLike | null; status?: CoinMarketStatus; isLoading: boolean }) {\n const t = useT();\n if (isLoading) return <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />;\n if (!price) {\n return status === \"pre-launch\" ? (\n <span className=\"block text-right text-xs text-muted-foreground\">{t(\"Not trading yet\")}</span>\n ) : (\n <span\n className=\"block text-right text-muted-foreground\"\n title={t(\"No liquidity route was found for this coin on any Starknet DEX yet.\")}\n >\n —\n </span>\n );\n }\n\n const usd = price.quoteUsdRate != null ? formatUsdPrice(price.quotePerCoin * price.quoteUsdRate) : null;\n\n return (\n <span className=\"flex justify-end\">\n <PriceDisplay\n amountFormatted={String(price.quotePerCoin)}\n currency={price.quoteSymbol}\n usdValue={usd}\n scale=\"card\"\n pillClassName=\"hidden sm:inline-flex\"\n />\n </span>\n );\n}\n\nexport function CoinRow({ collection, usePrice, href, showKind = false }: CoinRowProps) {\n const t = useT();\n const { price, status, isLoading } = usePrice(collection);\n\n return (\n <Link\n href={href}\n className={cn(\n COIN_GRID,\n \"border-b border-border/40 px-2 py-2.5 text-sm transition-colors\",\n \"hover:bg-muted/40 active:bg-muted/60\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <CoinAvatar collection={collection} />\n <span className=\"min-w-0\">\n <span className=\"block truncate font-semibold leading-tight\">{collection.name ?? t(\"Untitled coin\")}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {collection.symbol ?? \"—\"}\n {showKind && coinKind(collection.service) !== \"creator\" && <span className=\"text-muted-foreground/60\"> · {coinKindLabel(coinKind(collection.service))}</span>}\n </span>\n </span>\n </span>\n\n <PriceCell price={price} status={status} isLoading={isLoading} />\n </Link>\n );\n}\n\nexport function CoinRowSkeleton() {\n return (\n <div className={cn(COIN_GRID, \"border-b border-border/40 px-2 py-2.5\")}>\n <span className=\"flex items-center gap-3\">\n <span className=\"h-9 w-9 shrink-0 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"space-y-1.5\">\n <span className=\"block h-4 w-28 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"block h-3 w-14 animate-pulse rounded-full bg-muted-foreground/10\" />\n </span>\n </span>\n <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CQ;AA1CR,kBAAiB;AACjB,mBAAkB;AAClB,gBAAmB;AACnB,2BAA6B;AAC7B,mBAGO;AACP,oBAA+B;AAC/B,2BAA4B;AAC5B,sBAAqB;AAUd,MAAM,YAAY;AASlB,SAAS,WAAW,EAAE,YAAY,OAAO,GAAG,GAAsD;AACvG,QAAM,mBAAe,kCAAY;AACjC,QAAM,UAAU,WAAW,SAAS,SAAS,WAAW;AACxD,QAAM,OAAO,aAAa,OAAO;AACjC,QAAM,YAAY,WAAW,UAAU,WAAW,QAAQ,KAAK,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,YAAY;AAC9F,QAAM,aAAS,8BAAgB,WAAW,UAAU,WAAW,QAAQ,WAAW,eAAe;AAEjG,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,cAAG,kDAAkD,MAAM;AAAA,MACtE,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MAElC,iBACC,4CAAC,aAAAA,SAAA,EAAM,KAAK,MAAM,KAAI,IAAG,MAAI,MAAC,OAAO,GAAG,IAAI,MAAM,WAAU,gBAAe,aAAW,MAAC,IAEvF;AAAA,QAAC;AAAA;AA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AAS,WAAW,OAAO,MAAM,aAAa,6CAAC,UAAK,WAAU,4BAA2B;AAAA;AAAA,oBAAI,gCAAc,uBAAS,WAAW,OAAO,CAAC;AAAA,iBAAE;AAAA,eACxJ;AAAA,aACF;AAAA,WACF;AAAA,QAEA,4CAAC,aAAU,OAAc,QAAgB,WAAsB;AAAA;AAAA;AAAA,EACjE;AAEJ;AAEO,SAAS,kBAAkB;AAChC,SACE,6CAAC,SAAI,eAAW,cAAG,WAAW,uCAAuC,GACnE;AAAA,iDAAC,UAAK,WAAU,2BACd;AAAA,kDAAC,UAAK,WAAU,sEAAqE;AAAA,MACrF,6CAAC,UAAK,WAAU,eACd;AAAA,oDAAC,UAAK,WAAU,oEAAmE;AAAA,QACnF,4CAAC,UAAK,WAAU,oEAAmE;AAAA,SACrF;AAAA,OACF;AAAA,IACA,4CAAC,UAAK,WAAU,4EAA2E;AAAA,KAC7F;AAEJ;","names":["Image","Link"]}
|
|
@@ -79,7 +79,7 @@ function CoinRow({ collection, usePrice, href, showKind = false }) {
|
|
|
79
79
|
/* @__PURE__ */ jsx("span", { className: "block truncate font-semibold leading-tight", children: collection.name ?? t("Untitled coin") }),
|
|
80
80
|
/* @__PURE__ */ jsxs("span", { className: "block truncate text-xs text-muted-foreground", children: [
|
|
81
81
|
collection.symbol ?? "\u2014",
|
|
82
|
-
showKind && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/60", children: [
|
|
82
|
+
showKind && coinKind(collection.service) !== "creator" && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/60", children: [
|
|
83
83
|
" \xB7 ",
|
|
84
84
|
coinKindLabel(coinKind(collection.service))
|
|
85
85
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/coin-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PriceDisplay } from \"./price-display.js\";\nimport {\n coinKind, coinKindLabel, coinAccentToken,\n type CoinCollectionLike, type CoinPriceLike,\n} from \"../data/coins.js\";\nimport { formatUsdPrice } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport type CoinMarketStatus = \"live\" | \"pre-launch\" | \"unavailable\";\n\nexport type UseCoinPrice = (collection: CoinCollectionLike) => {\n price: CoinPriceLike | null;\n status?: CoinMarketStatus;\n isLoading: boolean;\n};\n\nexport const COIN_GRID = \"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 sm:gap-4\";\n\nexport interface CoinRowProps {\n collection: CoinCollectionLike;\n usePrice: UseCoinPrice;\n href: string;\n showKind?: boolean;\n}\n\nexport function CoinAvatar({ collection, size = 36 }: { collection: CoinCollectionLike; size?: number }) {\n const resolveImage = useImageUrl();\n const logoUri = collection.profile?.image ?? collection.image;\n const logo = resolveImage(logoUri);\n const initials = (collection.symbol ?? collection.name ?? \"?\").trim().slice(0, 2).toUpperCase();\n const accent = coinAccentToken(collection.symbol ?? collection.name ?? collection.contractAddress);\n\n return (\n <div\n className={cn(\"relative shrink-0 overflow-hidden rounded-full\", accent)}\n style={{ width: size, height: size }}\n >\n {logo ? (\n <Image src={logo} alt=\"\" fill sizes={`${size}px`} className=\"object-cover\" unoptimized />\n ) : (\n <span\n className=\"flex h-full w-full items-center justify-center font-bold leading-none text-white\"\n style={{ fontSize: size * 0.36 }}\n >\n {initials}\n </span>\n )}\n </div>\n );\n}\n\nfunction PriceCell({ price, status, isLoading }: { price: CoinPriceLike | null; status?: CoinMarketStatus; isLoading: boolean }) {\n const t = useT();\n if (isLoading) return <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />;\n if (!price) {\n return status === \"pre-launch\" ? (\n <span className=\"block text-right text-xs text-muted-foreground\">{t(\"Not trading yet\")}</span>\n ) : (\n <span\n className=\"block text-right text-muted-foreground\"\n title={t(\"No liquidity route was found for this coin on any Starknet DEX yet.\")}\n >\n —\n </span>\n );\n }\n\n const usd = price.quoteUsdRate != null ? formatUsdPrice(price.quotePerCoin * price.quoteUsdRate) : null;\n\n return (\n <span className=\"flex justify-end\">\n <PriceDisplay\n amountFormatted={String(price.quotePerCoin)}\n currency={price.quoteSymbol}\n usdValue={usd}\n scale=\"card\"\n pillClassName=\"hidden sm:inline-flex\"\n />\n </span>\n );\n}\n\nexport function CoinRow({ collection, usePrice, href, showKind = false }: CoinRowProps) {\n const t = useT();\n const { price, status, isLoading } = usePrice(collection);\n\n return (\n <Link\n href={href}\n className={cn(\n COIN_GRID,\n \"border-b border-border/40 px-2 py-2.5 text-sm transition-colors\",\n \"hover:bg-muted/40 active:bg-muted/60\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <CoinAvatar collection={collection} />\n <span className=\"min-w-0\">\n <span className=\"block truncate font-semibold leading-tight\">{collection.name ?? t(\"Untitled coin\")}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {collection.symbol ?? \"—\"}\n {showKind && <span className=\"text-muted-foreground/60\"> · {coinKindLabel(coinKind(collection.service))}</span>}\n </span>\n </span>\n </span>\n\n <PriceCell price={price} status={status} isLoading={isLoading} />\n </Link>\n );\n}\n\nexport function CoinRowSkeleton() {\n return (\n <div className={cn(COIN_GRID, \"border-b border-border/40 px-2 py-2.5\")}>\n <span className=\"flex items-center gap-3\">\n <span className=\"h-9 w-9 shrink-0 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"space-y-1.5\">\n <span className=\"block h-4 w-28 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"block h-3 w-14 animate-pulse rounded-full bg-muted-foreground/10\" />\n </span>\n </span>\n <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />\n </div>\n );\n}\n"],"mappings":";AA4CQ,cA+
|
|
1
|
+
{"version":3,"sources":["../../src/components/coin-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PriceDisplay } from \"./price-display.js\";\nimport {\n coinKind, coinKindLabel, coinAccentToken,\n type CoinCollectionLike, type CoinPriceLike,\n} from \"../data/coins.js\";\nimport { formatUsdPrice } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport type CoinMarketStatus = \"live\" | \"pre-launch\" | \"unavailable\";\n\nexport type UseCoinPrice = (collection: CoinCollectionLike) => {\n price: CoinPriceLike | null;\n status?: CoinMarketStatus;\n isLoading: boolean;\n};\n\nexport const COIN_GRID = \"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 sm:gap-4\";\n\nexport interface CoinRowProps {\n collection: CoinCollectionLike;\n usePrice: UseCoinPrice;\n href: string;\n showKind?: boolean;\n}\n\nexport function CoinAvatar({ collection, size = 36 }: { collection: CoinCollectionLike; size?: number }) {\n const resolveImage = useImageUrl();\n const logoUri = collection.profile?.image ?? collection.image;\n const logo = resolveImage(logoUri);\n const initials = (collection.symbol ?? collection.name ?? \"?\").trim().slice(0, 2).toUpperCase();\n const accent = coinAccentToken(collection.symbol ?? collection.name ?? collection.contractAddress);\n\n return (\n <div\n className={cn(\"relative shrink-0 overflow-hidden rounded-full\", accent)}\n style={{ width: size, height: size }}\n >\n {logo ? (\n <Image src={logo} alt=\"\" fill sizes={`${size}px`} className=\"object-cover\" unoptimized />\n ) : (\n <span\n className=\"flex h-full w-full items-center justify-center font-bold leading-none text-white\"\n style={{ fontSize: size * 0.36 }}\n >\n {initials}\n </span>\n )}\n </div>\n );\n}\n\nfunction PriceCell({ price, status, isLoading }: { price: CoinPriceLike | null; status?: CoinMarketStatus; isLoading: boolean }) {\n const t = useT();\n if (isLoading) return <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />;\n if (!price) {\n return status === \"pre-launch\" ? (\n <span className=\"block text-right text-xs text-muted-foreground\">{t(\"Not trading yet\")}</span>\n ) : (\n <span\n className=\"block text-right text-muted-foreground\"\n title={t(\"No liquidity route was found for this coin on any Starknet DEX yet.\")}\n >\n —\n </span>\n );\n }\n\n const usd = price.quoteUsdRate != null ? formatUsdPrice(price.quotePerCoin * price.quoteUsdRate) : null;\n\n return (\n <span className=\"flex justify-end\">\n <PriceDisplay\n amountFormatted={String(price.quotePerCoin)}\n currency={price.quoteSymbol}\n usdValue={usd}\n scale=\"card\"\n pillClassName=\"hidden sm:inline-flex\"\n />\n </span>\n );\n}\n\nexport function CoinRow({ collection, usePrice, href, showKind = false }: CoinRowProps) {\n const t = useT();\n const { price, status, isLoading } = usePrice(collection);\n\n return (\n <Link\n href={href}\n className={cn(\n COIN_GRID,\n \"border-b border-border/40 px-2 py-2.5 text-sm transition-colors\",\n \"hover:bg-muted/40 active:bg-muted/60\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <CoinAvatar collection={collection} />\n <span className=\"min-w-0\">\n <span className=\"block truncate font-semibold leading-tight\">{collection.name ?? t(\"Untitled coin\")}</span>\n <span className=\"block truncate text-xs text-muted-foreground\">\n {collection.symbol ?? \"—\"}\n {showKind && coinKind(collection.service) !== \"creator\" && <span className=\"text-muted-foreground/60\"> · {coinKindLabel(coinKind(collection.service))}</span>}\n </span>\n </span>\n </span>\n\n <PriceCell price={price} status={status} isLoading={isLoading} />\n </Link>\n );\n}\n\nexport function CoinRowSkeleton() {\n return (\n <div className={cn(COIN_GRID, \"border-b border-border/40 px-2 py-2.5\")}>\n <span className=\"flex items-center gap-3\">\n <span className=\"h-9 w-9 shrink-0 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"space-y-1.5\">\n <span className=\"block h-4 w-28 animate-pulse rounded-full bg-muted-foreground/20\" />\n <span className=\"block h-3 w-14 animate-pulse rounded-full bg-muted-foreground/10\" />\n </span>\n </span>\n <span className=\"ml-auto block h-4 w-16 animate-pulse rounded-full bg-muted-foreground/20\" />\n </div>\n );\n}\n"],"mappings":";AA4CQ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C,UAAK,WAAU,oEAAmE;AAAA,SACrF;AAAA,OACF;AAAA,IACA,oBAAC,UAAK,WAAU,4EAA2E;AAAA,KAC7F;AAEJ;","names":[]}
|
|
@@ -59,7 +59,7 @@ function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = tr
|
|
|
59
59
|
if (!counts) return { statItems: [], pillFilters: [] };
|
|
60
60
|
const forKind = (kind) => (0, import_coins.coinServiceIds)(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);
|
|
61
61
|
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
|
62
|
-
const kinds = import_coins.COIN_KINDS.filter((kind) => forKind(kind) > 0);
|
|
62
|
+
const kinds = import_coins.COIN_KINDS.filter((kind) => kind !== "creator" && forKind(kind) > 0);
|
|
63
63
|
return {
|
|
64
64
|
statItems: [
|
|
65
65
|
{ label: total === 1 ? "Coin" : "Coins", value: total },
|
|
@@ -70,7 +70,7 @@ function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = tr
|
|
|
70
70
|
}, [counts]);
|
|
71
71
|
const activeIndex = pillFilters.indexOf(filter);
|
|
72
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-8", children: [
|
|
73
|
-
heading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_header.PageHeader, { title: t("
|
|
73
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_page_header.PageHeader, { title: t("Coins"), action, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
74
|
import_stat_tile.StatPillRow,
|
|
75
75
|
{
|
|
76
76
|
items: statItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/coins-explorer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useMemo } from \"react\";\nimport { Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { CoinRow, CoinRowSkeleton, COIN_GRID, type UseCoinPrice } from \"./coin-row.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { PageHeader } from \"./page-header.js\";\nimport { StatPillRow } from \"./stat-tile.js\";\nimport { orderCoins, type CoinPriceSort } from \"../data/coin-order.js\";\nimport { coinKind, coinKindLabelPlural, coinServiceIds, COIN_KINDS, type CoinCollectionLike, type CoinKind } from \"../data/coins.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport type CoinFilter = \"all\" | CoinKind;\nexport type CoinSort = \"recent\" | \"name\";\nexport type CoinCounts = Record<string, number>;\n\nexport type UseCoins = (opts: { filter: CoinFilter; sort: CoinSort }) => {\n collections: CoinCollectionLike[];\n isLoading: boolean;\n counts?: CoinCounts;\n};\n\nexport type UsePriceMap = () => { prices: Record<string, number | null>; isLoading: boolean };\n\nexport interface CoinsExplorerProps {\n useCoins: UseCoins;\n usePrice: UseCoinPrice;\n usePriceMap?: UsePriceMap;\n\n coinHref: (collection: CoinCollectionLike) => string;\n heading?: boolean;\n\n action?: React.ReactNode;\n}\n\nconst SORT_OPTIONS: { label: string; value: CoinSort }[] = [\n { label: msg(\"Recently launched\"), value: \"recent\" },\n { label: msg(\"Name\"), value: \"name\" },\n];\n\nconst noPriceMap: UsePriceMap = () => ({ prices: {}, isLoading: false });\n\nexport function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = true, action }: CoinsExplorerProps) {\n const t = useT();\n const [filter, setFilter] = useState<CoinFilter>(\"all\");\n const [sort, setSort] = useState<CoinSort>(\"recent\");\n const [query, setQuery] = useState(\"\");\n const [priceSort, setPriceSort] = useState<CoinPriceSort | undefined>(undefined);\n\n const { collections, isLoading, counts } = useCoins({ filter, sort });\n const { prices } = (usePriceMap ?? noPriceMap)();\n const items = useMemo(() => {\n const q = query.trim().toLowerCase();\n const matched = q\n ? collections.filter((c) => (c.name ?? \"\").toLowerCase().includes(q) || (c.symbol ?? \"\").toLowerCase().includes(q))\n : collections;\n return usePriceMap ? orderCoins(matched, prices, priceSort) : matched;\n }, [collections, query, usePriceMap, prices, priceSort]);\n\n const showKind = useMemo(() => new Set(items.map((c) => coinKind(c.service))).size > 1, [items]);\n\n const { statItems, pillFilters } = useMemo(() => {\n if (!counts) return { statItems: [], pillFilters: [] as CoinFilter[] };\n const forKind = (kind: CoinKind) =>\n coinServiceIds(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);\n const total = Object.values(counts).reduce((a, b) => a + b, 0);\n const kinds = COIN_KINDS.filter((kind) => forKind(kind) > 0);\n return {\n statItems: [\n { label: total === 1 ? \"Coin\" : \"Coins\", value: total },\n ...kinds.map((kind) => ({ label: coinKindLabelPlural(kind), value: forKind(kind) })),\n ],\n pillFilters: [\"all\", ...kinds] as CoinFilter[],\n };\n }, [counts]);\n\n const activeIndex = pillFilters.indexOf(filter);\n\n return (\n <div className=\"space-y-8\">\n {heading && (\n <PageHeader title={t(\"Creator coins & memecoins\")} action={action}>\n <StatPillRow\n items={statItems}\n onSelect={(index) => setFilter(pillFilters[index])}\n activeIndex={activeIndex}\n />\n </PageHeader>\n )}\n\n <div className=\"flex items-center gap-2\">\n <div className=\"relative flex-1\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={t(\"Search coins by name or symbol…\")}\n className=\"w-full rounded-2xl border border-border bg-background py-2 pl-9 pr-3 text-sm outline-none focus:border-primary/50\"\n />\n </div>\n <select\n value={sort}\n onChange={(e) => setSort(e.target.value as CoinSort)}\n aria-label={t(\"Sort coins\")}\n className=\"shrink-0 rounded-2xl border border-border bg-background px-2.5 py-2 text-xs font-medium text-foreground outline-none focus:border-primary/50\"\n >\n {SORT_OPTIONS.map(({ label, value }) => (\n <option key={value} value={value}>{t(label)}</option>\n ))}\n </select>\n </div>\n\n <div>\n <div className={cn(COIN_GRID, \"border-b border-border px-2 pb-2 text-2xs font-medium uppercase tracking-wide text-muted-foreground\")}>\n <span>{t(\"Token\")}</span>\n {usePriceMap ? (\n <button\n type=\"button\"\n onClick={() => setPriceSort(priceSort === undefined ? \"desc\" : priceSort === \"desc\" ? \"asc\" : undefined)}\n className={cn(\"text-right uppercase tracking-wide\", priceSort ? \"text-foreground\" : \"text-muted-foreground\")}\n >\n {t(\"Price\")}{priceSort === \"desc\" ? \" ↓\" : priceSort === \"asc\" ? \" ↑\" : \"\"}\n </button>\n ) : (\n <span className=\"text-right\">{t(\"Price\")}</span>\n )}\n </div>\n\n {isLoading && items.length === 0 ? (\n Array.from({ length: 6 }).map((_, i) => <CoinRowSkeleton key={i} />)\n ) : items.length === 0 ? (\n <div className=\"py-16 text-center\">\n {query.trim() ? (\n <p className=\"text-sm text-muted-foreground\">{`No coins match \"${query.trim()}\".`}</p>\n ) : (\n <>\n <p className=\"text-sm font-medium\">{t(emptyMessages.coins.title)}</p>\n <p className=\"text-sm text-muted-foreground\">{t(emptyMessages.coins.description)}</p>\n </>\n )}\n </div>\n ) : (\n items.map((c) => (\n <CoinRow\n key={`${c.chain}-${c.contractAddress}`}\n collection={c}\n usePrice={usePrice}\n href={coinHref(c)}\n showKind={showKind}\n />\n ))\n )}\n </div>\n </div>\n );\n}\n\nexport function CoinsPage(props: Omit<CoinsExplorerProps, \"heading\">) {\n return (\n <PageContainer>\n <CoinsExplorer {...props} />\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFU;AAnFV,mBAAkC;AAClC,0BAAuB;AACvB,gBAAmB;AACnB,sBAAuE;AACvE,4BAA8B;AAC9B,yBAA2B;AAC3B,uBAA4B;AAC5B,wBAA+C;AAC/C,mBAAkH;AAClH,4BAA8B;AAC9B,sBAAqB;AACrB,uBAAoB;AAyBpB,MAAM,eAAqD;AAAA,EACzD,EAAE,WAAO,sBAAI,mBAAmB,GAAG,OAAO,SAAS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,sDAAC,iBAAe,GAAG,OAAO,GAC5B;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/coins-explorer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useMemo } from \"react\";\nimport { Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { CoinRow, CoinRowSkeleton, COIN_GRID, type UseCoinPrice } from \"./coin-row.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { PageHeader } from \"./page-header.js\";\nimport { StatPillRow } from \"./stat-tile.js\";\nimport { orderCoins, type CoinPriceSort } from \"../data/coin-order.js\";\nimport { coinKind, coinKindLabelPlural, coinServiceIds, COIN_KINDS, type CoinCollectionLike, type CoinKind } from \"../data/coins.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport type CoinFilter = \"all\" | CoinKind;\nexport type CoinSort = \"recent\" | \"name\";\nexport type CoinCounts = Record<string, number>;\n\nexport type UseCoins = (opts: { filter: CoinFilter; sort: CoinSort }) => {\n collections: CoinCollectionLike[];\n isLoading: boolean;\n counts?: CoinCounts;\n};\n\nexport type UsePriceMap = () => { prices: Record<string, number | null>; isLoading: boolean };\n\nexport interface CoinsExplorerProps {\n useCoins: UseCoins;\n usePrice: UseCoinPrice;\n usePriceMap?: UsePriceMap;\n\n coinHref: (collection: CoinCollectionLike) => string;\n heading?: boolean;\n\n action?: React.ReactNode;\n}\n\nconst SORT_OPTIONS: { label: string; value: CoinSort }[] = [\n { label: msg(\"Recently launched\"), value: \"recent\" },\n { label: msg(\"Name\"), value: \"name\" },\n];\n\nconst noPriceMap: UsePriceMap = () => ({ prices: {}, isLoading: false });\n\nexport function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = true, action }: CoinsExplorerProps) {\n const t = useT();\n const [filter, setFilter] = useState<CoinFilter>(\"all\");\n const [sort, setSort] = useState<CoinSort>(\"recent\");\n const [query, setQuery] = useState(\"\");\n const [priceSort, setPriceSort] = useState<CoinPriceSort | undefined>(undefined);\n\n const { collections, isLoading, counts } = useCoins({ filter, sort });\n const { prices } = (usePriceMap ?? noPriceMap)();\n const items = useMemo(() => {\n const q = query.trim().toLowerCase();\n const matched = q\n ? collections.filter((c) => (c.name ?? \"\").toLowerCase().includes(q) || (c.symbol ?? \"\").toLowerCase().includes(q))\n : collections;\n return usePriceMap ? orderCoins(matched, prices, priceSort) : matched;\n }, [collections, query, usePriceMap, prices, priceSort]);\n\n const showKind = useMemo(() => new Set(items.map((c) => coinKind(c.service))).size > 1, [items]);\n\n const { statItems, pillFilters } = useMemo(() => {\n if (!counts) return { statItems: [], pillFilters: [] as CoinFilter[] };\n const forKind = (kind: CoinKind) =>\n coinServiceIds(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);\n const total = Object.values(counts).reduce((a, b) => a + b, 0);\n const kinds = COIN_KINDS.filter((kind) => kind !== \"creator\" && forKind(kind) > 0);\n return {\n statItems: [\n { label: total === 1 ? \"Coin\" : \"Coins\", value: total },\n ...kinds.map((kind) => ({ label: coinKindLabelPlural(kind), value: forKind(kind) })),\n ],\n pillFilters: [\"all\", ...kinds] as CoinFilter[],\n };\n }, [counts]);\n\n const activeIndex = pillFilters.indexOf(filter);\n\n return (\n <div className=\"space-y-8\">\n {heading && (\n <PageHeader title={t(\"Coins\")} action={action}>\n <StatPillRow\n items={statItems}\n onSelect={(index) => setFilter(pillFilters[index])}\n activeIndex={activeIndex}\n />\n </PageHeader>\n )}\n\n <div className=\"flex items-center gap-2\">\n <div className=\"relative flex-1\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={t(\"Search coins by name or symbol…\")}\n className=\"w-full rounded-2xl border border-border bg-background py-2 pl-9 pr-3 text-sm outline-none focus:border-primary/50\"\n />\n </div>\n <select\n value={sort}\n onChange={(e) => setSort(e.target.value as CoinSort)}\n aria-label={t(\"Sort coins\")}\n className=\"shrink-0 rounded-2xl border border-border bg-background px-2.5 py-2 text-xs font-medium text-foreground outline-none focus:border-primary/50\"\n >\n {SORT_OPTIONS.map(({ label, value }) => (\n <option key={value} value={value}>{t(label)}</option>\n ))}\n </select>\n </div>\n\n <div>\n <div className={cn(COIN_GRID, \"border-b border-border px-2 pb-2 text-2xs font-medium uppercase tracking-wide text-muted-foreground\")}>\n <span>{t(\"Token\")}</span>\n {usePriceMap ? (\n <button\n type=\"button\"\n onClick={() => setPriceSort(priceSort === undefined ? \"desc\" : priceSort === \"desc\" ? \"asc\" : undefined)}\n className={cn(\"text-right uppercase tracking-wide\", priceSort ? \"text-foreground\" : \"text-muted-foreground\")}\n >\n {t(\"Price\")}{priceSort === \"desc\" ? \" ↓\" : priceSort === \"asc\" ? \" ↑\" : \"\"}\n </button>\n ) : (\n <span className=\"text-right\">{t(\"Price\")}</span>\n )}\n </div>\n\n {isLoading && items.length === 0 ? (\n Array.from({ length: 6 }).map((_, i) => <CoinRowSkeleton key={i} />)\n ) : items.length === 0 ? (\n <div className=\"py-16 text-center\">\n {query.trim() ? (\n <p className=\"text-sm text-muted-foreground\">{`No coins match \"${query.trim()}\".`}</p>\n ) : (\n <>\n <p className=\"text-sm font-medium\">{t(emptyMessages.coins.title)}</p>\n <p className=\"text-sm text-muted-foreground\">{t(emptyMessages.coins.description)}</p>\n </>\n )}\n </div>\n ) : (\n items.map((c) => (\n <CoinRow\n key={`${c.chain}-${c.contractAddress}`}\n collection={c}\n usePrice={usePrice}\n href={coinHref(c)}\n showKind={showKind}\n />\n ))\n )}\n </div>\n </div>\n );\n}\n\nexport function CoinsPage(props: Omit<CoinsExplorerProps, \"heading\">) {\n return (\n <PageContainer>\n <CoinsExplorer {...props} />\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqFU;AAnFV,mBAAk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AAI,CAAC,MACT;AAAA,QAAC;AAAA;AAAA,UAEC,YAAY;AAAA,UACZ;AAAA,UACA,MAAM,SAAS,CAAC;AAAA,UAChB;AAAA;AAAA,QAJK,GAAG,EAAE,KAAK,IAAI,EAAE,eAAe;AAAA,MAKtC,CACD;AAAA,OAEL;AAAA,KACF;AAEJ;AAEO,SAAS,UAAU,OAA4C;AACpE,SACE,4CAAC,uCACC,sDAAC,iBAAe,GAAG,OAAO,GAC5B;AAEJ;","names":[]}
|
|
@@ -35,7 +35,7 @@ function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = tr
|
|
|
35
35
|
if (!counts) return { statItems: [], pillFilters: [] };
|
|
36
36
|
const forKind = (kind) => coinServiceIds(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);
|
|
37
37
|
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
|
38
|
-
const kinds = COIN_KINDS.filter((kind) => forKind(kind) > 0);
|
|
38
|
+
const kinds = COIN_KINDS.filter((kind) => kind !== "creator" && forKind(kind) > 0);
|
|
39
39
|
return {
|
|
40
40
|
statItems: [
|
|
41
41
|
{ label: total === 1 ? "Coin" : "Coins", value: total },
|
|
@@ -46,7 +46,7 @@ function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = tr
|
|
|
46
46
|
}, [counts]);
|
|
47
47
|
const activeIndex = pillFilters.indexOf(filter);
|
|
48
48
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
|
|
49
|
-
heading && /* @__PURE__ */ jsx(PageHeader, { title: t("
|
|
49
|
+
heading && /* @__PURE__ */ jsx(PageHeader, { title: t("Coins"), action, children: /* @__PURE__ */ jsx(
|
|
50
50
|
StatPillRow,
|
|
51
51
|
{
|
|
52
52
|
items: statItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/coins-explorer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useMemo } from \"react\";\nimport { Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { CoinRow, CoinRowSkeleton, COIN_GRID, type UseCoinPrice } from \"./coin-row.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { PageHeader } from \"./page-header.js\";\nimport { StatPillRow } from \"./stat-tile.js\";\nimport { orderCoins, type CoinPriceSort } from \"../data/coin-order.js\";\nimport { coinKind, coinKindLabelPlural, coinServiceIds, COIN_KINDS, type CoinCollectionLike, type CoinKind } from \"../data/coins.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport type CoinFilter = \"all\" | CoinKind;\nexport type CoinSort = \"recent\" | \"name\";\nexport type CoinCounts = Record<string, number>;\n\nexport type UseCoins = (opts: { filter: CoinFilter; sort: CoinSort }) => {\n collections: CoinCollectionLike[];\n isLoading: boolean;\n counts?: CoinCounts;\n};\n\nexport type UsePriceMap = () => { prices: Record<string, number | null>; isLoading: boolean };\n\nexport interface CoinsExplorerProps {\n useCoins: UseCoins;\n usePrice: UseCoinPrice;\n usePriceMap?: UsePriceMap;\n\n coinHref: (collection: CoinCollectionLike) => string;\n heading?: boolean;\n\n action?: React.ReactNode;\n}\n\nconst SORT_OPTIONS: { label: string; value: CoinSort }[] = [\n { label: msg(\"Recently launched\"), value: \"recent\" },\n { label: msg(\"Name\"), value: \"name\" },\n];\n\nconst noPriceMap: UsePriceMap = () => ({ prices: {}, isLoading: false });\n\nexport function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = true, action }: CoinsExplorerProps) {\n const t = useT();\n const [filter, setFilter] = useState<CoinFilter>(\"all\");\n const [sort, setSort] = useState<CoinSort>(\"recent\");\n const [query, setQuery] = useState(\"\");\n const [priceSort, setPriceSort] = useState<CoinPriceSort | undefined>(undefined);\n\n const { collections, isLoading, counts } = useCoins({ filter, sort });\n const { prices } = (usePriceMap ?? noPriceMap)();\n const items = useMemo(() => {\n const q = query.trim().toLowerCase();\n const matched = q\n ? collections.filter((c) => (c.name ?? \"\").toLowerCase().includes(q) || (c.symbol ?? \"\").toLowerCase().includes(q))\n : collections;\n return usePriceMap ? orderCoins(matched, prices, priceSort) : matched;\n }, [collections, query, usePriceMap, prices, priceSort]);\n\n const showKind = useMemo(() => new Set(items.map((c) => coinKind(c.service))).size > 1, [items]);\n\n const { statItems, pillFilters } = useMemo(() => {\n if (!counts) return { statItems: [], pillFilters: [] as CoinFilter[] };\n const forKind = (kind: CoinKind) =>\n coinServiceIds(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);\n const total = Object.values(counts).reduce((a, b) => a + b, 0);\n const kinds = COIN_KINDS.filter((kind) => forKind(kind) > 0);\n return {\n statItems: [\n { label: total === 1 ? \"Coin\" : \"Coins\", value: total },\n ...kinds.map((kind) => ({ label: coinKindLabelPlural(kind), value: forKind(kind) })),\n ],\n pillFilters: [\"all\", ...kinds] as CoinFilter[],\n };\n }, [counts]);\n\n const activeIndex = pillFilters.indexOf(filter);\n\n return (\n <div className=\"space-y-8\">\n {heading && (\n <PageHeader title={t(\"Creator coins & memecoins\")} action={action}>\n <StatPillRow\n items={statItems}\n onSelect={(index) => setFilter(pillFilters[index])}\n activeIndex={activeIndex}\n />\n </PageHeader>\n )}\n\n <div className=\"flex items-center gap-2\">\n <div className=\"relative flex-1\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={t(\"Search coins by name or symbol…\")}\n className=\"w-full rounded-2xl border border-border bg-background py-2 pl-9 pr-3 text-sm outline-none focus:border-primary/50\"\n />\n </div>\n <select\n value={sort}\n onChange={(e) => setSort(e.target.value as CoinSort)}\n aria-label={t(\"Sort coins\")}\n className=\"shrink-0 rounded-2xl border border-border bg-background px-2.5 py-2 text-xs font-medium text-foreground outline-none focus:border-primary/50\"\n >\n {SORT_OPTIONS.map(({ label, value }) => (\n <option key={value} value={value}>{t(label)}</option>\n ))}\n </select>\n </div>\n\n <div>\n <div className={cn(COIN_GRID, \"border-b border-border px-2 pb-2 text-2xs font-medium uppercase tracking-wide text-muted-foreground\")}>\n <span>{t(\"Token\")}</span>\n {usePriceMap ? (\n <button\n type=\"button\"\n onClick={() => setPriceSort(priceSort === undefined ? \"desc\" : priceSort === \"desc\" ? \"asc\" : undefined)}\n className={cn(\"text-right uppercase tracking-wide\", priceSort ? \"text-foreground\" : \"text-muted-foreground\")}\n >\n {t(\"Price\")}{priceSort === \"desc\" ? \" ↓\" : priceSort === \"asc\" ? \" ↑\" : \"\"}\n </button>\n ) : (\n <span className=\"text-right\">{t(\"Price\")}</span>\n )}\n </div>\n\n {isLoading && items.length === 0 ? (\n Array.from({ length: 6 }).map((_, i) => <CoinRowSkeleton key={i} />)\n ) : items.length === 0 ? (\n <div className=\"py-16 text-center\">\n {query.trim() ? (\n <p className=\"text-sm text-muted-foreground\">{`No coins match \"${query.trim()}\".`}</p>\n ) : (\n <>\n <p className=\"text-sm font-medium\">{t(emptyMessages.coins.title)}</p>\n <p className=\"text-sm text-muted-foreground\">{t(emptyMessages.coins.description)}</p>\n </>\n )}\n </div>\n ) : (\n items.map((c) => (\n <CoinRow\n key={`${c.chain}-${c.contractAddress}`}\n collection={c}\n usePrice={usePrice}\n href={coinHref(c)}\n showKind={showKind}\n />\n ))\n )}\n </div>\n </div>\n );\n}\n\nexport function CoinsPage(props: Omit<CoinsExplorerProps, \"heading\">) {\n return (\n <PageContainer>\n <CoinsExplorer {...props} />\n </PageContainer>\n );\n}\n"],"mappings":";AAqFU,SAqDI,UArDJ,KASF,YATE;AAnFV,SAAS,UAAU,eAAe;AAClC,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,SAAS,iBAAiB,iBAAoC;AACvE,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,kBAAsC;AAC/C,SAAS,UAAU,qBAAqB,gBAA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AE,KAAK,IAAI,EAAE,eAAe;AAAA,MAKtC,CACD;AAAA,OAEL;AAAA,KACF;AAEJ;AAEO,SAAS,UAAU,OAA4C;AACpE,SACE,oBAAC,iBACC,8BAAC,iBAAe,GAAG,OAAO,GAC5B;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/coins-explorer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useMemo } from \"react\";\nimport { Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { CoinRow, CoinRowSkeleton, COIN_GRID, type UseCoinPrice } from \"./coin-row.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { PageHeader } from \"./page-header.js\";\nimport { StatPillRow } from \"./stat-tile.js\";\nimport { orderCoins, type CoinPriceSort } from \"../data/coin-order.js\";\nimport { coinKind, coinKindLabelPlural, coinServiceIds, COIN_KINDS, type CoinCollectionLike, type CoinKind } from \"../data/coins.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nexport type CoinFilter = \"all\" | CoinKind;\nexport type CoinSort = \"recent\" | \"name\";\nexport type CoinCounts = Record<string, number>;\n\nexport type UseCoins = (opts: { filter: CoinFilter; sort: CoinSort }) => {\n collections: CoinCollectionLike[];\n isLoading: boolean;\n counts?: CoinCounts;\n};\n\nexport type UsePriceMap = () => { prices: Record<string, number | null>; isLoading: boolean };\n\nexport interface CoinsExplorerProps {\n useCoins: UseCoins;\n usePrice: UseCoinPrice;\n usePriceMap?: UsePriceMap;\n\n coinHref: (collection: CoinCollectionLike) => string;\n heading?: boolean;\n\n action?: React.ReactNode;\n}\n\nconst SORT_OPTIONS: { label: string; value: CoinSort }[] = [\n { label: msg(\"Recently launched\"), value: \"recent\" },\n { label: msg(\"Name\"), value: \"name\" },\n];\n\nconst noPriceMap: UsePriceMap = () => ({ prices: {}, isLoading: false });\n\nexport function CoinsExplorer({ useCoins, usePrice, usePriceMap, coinHref, heading = true, action }: CoinsExplorerProps) {\n const t = useT();\n const [filter, setFilter] = useState<CoinFilter>(\"all\");\n const [sort, setSort] = useState<CoinSort>(\"recent\");\n const [query, setQuery] = useState(\"\");\n const [priceSort, setPriceSort] = useState<CoinPriceSort | undefined>(undefined);\n\n const { collections, isLoading, counts } = useCoins({ filter, sort });\n const { prices } = (usePriceMap ?? noPriceMap)();\n const items = useMemo(() => {\n const q = query.trim().toLowerCase();\n const matched = q\n ? collections.filter((c) => (c.name ?? \"\").toLowerCase().includes(q) || (c.symbol ?? \"\").toLowerCase().includes(q))\n : collections;\n return usePriceMap ? orderCoins(matched, prices, priceSort) : matched;\n }, [collections, query, usePriceMap, prices, priceSort]);\n\n const showKind = useMemo(() => new Set(items.map((c) => coinKind(c.service))).size > 1, [items]);\n\n const { statItems, pillFilters } = useMemo(() => {\n if (!counts) return { statItems: [], pillFilters: [] as CoinFilter[] };\n const forKind = (kind: CoinKind) =>\n coinServiceIds(kind).reduce((sum, id) => sum + (counts[id] ?? 0), 0);\n const total = Object.values(counts).reduce((a, b) => a + b, 0);\n const kinds = COIN_KINDS.filter((kind) => kind !== \"creator\" && forKind(kind) > 0);\n return {\n statItems: [\n { label: total === 1 ? \"Coin\" : \"Coins\", value: total },\n ...kinds.map((kind) => ({ label: coinKindLabelPlural(kind), value: forKind(kind) })),\n ],\n pillFilters: [\"all\", ...kinds] as CoinFilter[],\n };\n }, [counts]);\n\n const activeIndex = pillFilters.indexOf(filter);\n\n return (\n <div className=\"space-y-8\">\n {heading && (\n <PageHeader title={t(\"Coins\")} action={action}>\n <StatPillRow\n items={statItems}\n onSelect={(index) => setFilter(pillFilters[index])}\n activeIndex={activeIndex}\n />\n </PageHeader>\n )}\n\n <div className=\"flex items-center gap-2\">\n <div className=\"relative flex-1\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={t(\"Search coins by name or symbol…\")}\n className=\"w-full rounded-2xl border border-border bg-background py-2 pl-9 pr-3 text-sm outline-none focus:border-primary/50\"\n />\n </div>\n <select\n value={sort}\n onChange={(e) => setSort(e.target.value as CoinSort)}\n aria-label={t(\"Sort coins\")}\n className=\"shrink-0 rounded-2xl border border-border bg-background px-2.5 py-2 text-xs font-medium text-foreground outline-none focus:border-primary/50\"\n >\n {SORT_OPTIONS.map(({ label, value }) => (\n <option key={value} value={value}>{t(label)}</option>\n ))}\n </select>\n </div>\n\n <div>\n <div className={cn(COIN_GRID, \"border-b border-border px-2 pb-2 text-2xs font-medium uppercase tracking-wide text-muted-foreground\")}>\n <span>{t(\"Token\")}</span>\n {usePriceMap ? (\n <button\n type=\"button\"\n onClick={() => setPriceSort(priceSort === undefined ? \"desc\" : priceSort === \"desc\" ? \"asc\" : undefined)}\n className={cn(\"text-right uppercase tracking-wide\", priceSort ? \"text-foreground\" : \"text-muted-foreground\")}\n >\n {t(\"Price\")}{priceSort === \"desc\" ? \" ↓\" : priceSort === \"asc\" ? \" ↑\" : \"\"}\n </button>\n ) : (\n <span className=\"text-right\">{t(\"Price\")}</span>\n )}\n </div>\n\n {isLoading && items.length === 0 ? (\n Array.from({ length: 6 }).map((_, i) => <CoinRowSkeleton key={i} />)\n ) : items.length === 0 ? (\n <div className=\"py-16 text-center\">\n {query.trim() ? (\n <p className=\"text-sm text-muted-foreground\">{`No coins match \"${query.trim()}\".`}</p>\n ) : (\n <>\n <p className=\"text-sm font-medium\">{t(emptyMessages.coins.title)}</p>\n <p className=\"text-sm text-muted-foreground\">{t(emptyMessages.coins.description)}</p>\n </>\n )}\n </div>\n ) : (\n items.map((c) => (\n <CoinRow\n key={`${c.chain}-${c.contractAddress}`}\n collection={c}\n usePrice={usePrice}\n href={coinHref(c)}\n showKind={showKind}\n />\n ))\n )}\n </div>\n </div>\n );\n}\n\nexport function CoinsPage(props: Omit<CoinsExplorerProps, \"heading\">) {\n return (\n <PageContainer>\n <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ACE;AAAA,4BAAC,OAAE,WAAU,uBAAuB,YAAE,cAAc,MAAM,KAAK,GAAE;AAAA,QACjE,oBAAC,OAAE,WAAU,iCAAiC,YAAE,cAAc,MAAM,WAAW,GAAE;AAAA,SACnF,GAEJ,IAEA,MAAM,IAAI,CAAC,MACT;AAAA,QAAC;AAAA;AAAA,UAEC,YAAY;AAAA,UACZ;AAAA,UACA,MAAM,SAAS,CAAC;AAAA,UAChB;AAAA;AAAA,QAJK,GAAG,EAAE,KAAK,IAAI,EAAE,eAAe;AAAA,MAKtC,CACD;AAAA,OAEL;AAAA,KACF;AAEJ;AAEO,SAAS,UAAU,OAA4C;AACpE,SACE,oBAAC,iBACC,8BAAC,iBAAe,GAAG,OAAO,GAC5B;AAEJ;","names":[]}
|
|
@@ -38,7 +38,7 @@ function DropPanel({ icon, title, summary, error, open, onToggle, children }) {
|
|
|
38
38
|
onClick: onToggle,
|
|
39
39
|
className: "flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5",
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { size: "sm", className: "h-10 w-10 [&_svg]:h-
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { size: "sm", className: "h-10 w-10 [&_svg]:h-7 [&_svg]:w-7", children: icon }),
|
|
42
42
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
43
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-[15px] font-semibold", children: title }),
|
|
44
44
|
error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-sm text-destructive", children: t(error.text, error.vars) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-sm text-muted-foreground", children: summary })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/drop/create/drop-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { IconTile } from \"../../icon-tile.js\";\nimport { cn } from \"../../../utils/cn.js\";\nimport type { DropDraft, DropDraftErrors } from \"../../../utils/drop/draft.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport type { Phrase } from \"../../../i18n/translate.js\";\n\nexport interface PanelProps {\n draft: DropDraft;\n setDraft: (patch: Partial<DropDraft>) => void;\n errors: DropDraftErrors;\n open: boolean;\n onToggle: () => void;\n}\n\nexport function DropPanel({ icon, title, summary, error, open, onToggle, children }: {\n icon: ReactNode;\n title: string;\n summary: ReactNode;\n error?: Phrase;\n open: boolean;\n onToggle: () => void;\n children: ReactNode;\n}) {\n const t = useT();\n return (\n <section className=\"rounded-2xl border border-border bg-background\">\n <button type=\"button\" aria-expanded={open} onClick={onToggle}\n className=\"flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5\">\n <IconTile size=\"sm\" className=\"h-10 w-10 [&_svg]:h-
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/create/drop-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { IconTile } from \"../../icon-tile.js\";\nimport { cn } from \"../../../utils/cn.js\";\nimport type { DropDraft, DropDraftErrors } from \"../../../utils/drop/draft.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport type { Phrase } from \"../../../i18n/translate.js\";\n\nexport interface PanelProps {\n draft: DropDraft;\n setDraft: (patch: Partial<DropDraft>) => void;\n errors: DropDraftErrors;\n open: boolean;\n onToggle: () => void;\n}\n\nexport function DropPanel({ icon, title, summary, error, open, onToggle, children }: {\n icon: ReactNode;\n title: string;\n summary: ReactNode;\n error?: Phrase;\n open: boolean;\n onToggle: () => void;\n children: ReactNode;\n}) {\n const t = useT();\n return (\n <section className=\"rounded-2xl border border-border bg-background\">\n <button type=\"button\" aria-expanded={open} onClick={onToggle}\n className=\"flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5\">\n <IconTile size=\"sm\" className=\"h-10 w-10 [&_svg]:h-7 [&_svg]:w-7\">{icon}</IconTile>\n <span className=\"min-w-0 flex-1 space-y-1\">\n <span className=\"block text-[15px] font-semibold\">{title}</span>\n {error\n ? <span className=\"block text-sm text-destructive\">{t(error.text, error.vars)}</span>\n : <span className=\"block text-sm text-muted-foreground\">{summary}</span>}\n </span>\n <ChevronDown className={cn(\"h-4 w-4 shrink-0 text-muted-foreground transition-transform\", open && \"rotate-180\")} />\n </button>\n {open && <div className=\"space-y-5 border-t border-border/60 p-4 sm:p-5\">{children}</div>}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCQ;AA7BR,0BAA4B;AAC5B,uBAAyB;AACzB,gBAAmB;AAEnB,sBAAqB;AAWd,SAAS,UAAU,EAAE,MAAM,OAAO,SAAS,OAAO,MAAM,UAAU,SAAS,GAQ/E;AACD,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,aAAQ,WAAU,kDACjB;AAAA;AAAA,MAAC;AAAA;AAAA,QAAO,MAAK;AAAA,QAAS,iBAAe;AAAA,QAAM,SAAS;AAAA,QAClD,WAAU;AAAA,QACV;AAAA,sDAAC,6BAAS,MAAK,MAAK,WAAU,qCAAqC,gBAAK;AAAA,UACxE,6CAAC,UAAK,WAAU,4BACd;AAAA,wDAAC,UAAK,WAAU,mCAAmC,iBAAM;AAAA,YACxD,QACG,4CAAC,UAAK,WAAU,kCAAkC,YAAE,MAAM,MAAM,MAAM,IAAI,GAAE,IAC5E,4CAAC,UAAK,WAAU,uCAAuC,mBAAQ;AAAA,aACrE;AAAA,UACA,4CAAC,mCAAY,eAAW,cAAG,+DAA+D,QAAQ,YAAY,GAAG;AAAA;AAAA;AAAA,IACnH;AAAA,IACC,QAAQ,4CAAC,SAAI,WAAU,kDAAkD,UAAS;AAAA,KACrF;AAEJ;","names":[]}
|
|
@@ -15,7 +15,7 @@ function DropPanel({ icon, title, summary, error, open, onToggle, children }) {
|
|
|
15
15
|
onClick: onToggle,
|
|
16
16
|
className: "flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5",
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */ jsx(IconTile, { size: "sm", className: "h-10 w-10 [&_svg]:h-
|
|
18
|
+
/* @__PURE__ */ jsx(IconTile, { size: "sm", className: "h-10 w-10 [&_svg]:h-7 [&_svg]:w-7", children: icon }),
|
|
19
19
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
20
20
|
/* @__PURE__ */ jsx("span", { className: "block text-[15px] font-semibold", children: title }),
|
|
21
21
|
error ? /* @__PURE__ */ jsx("span", { className: "block text-sm text-destructive", children: t(error.text, error.vars) }) : /* @__PURE__ */ jsx("span", { className: "block text-sm text-muted-foreground", children: summary })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/drop/create/drop-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { IconTile } from \"../../icon-tile.js\";\nimport { cn } from \"../../../utils/cn.js\";\nimport type { DropDraft, DropDraftErrors } from \"../../../utils/drop/draft.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport type { Phrase } from \"../../../i18n/translate.js\";\n\nexport interface PanelProps {\n draft: DropDraft;\n setDraft: (patch: Partial<DropDraft>) => void;\n errors: DropDraftErrors;\n open: boolean;\n onToggle: () => void;\n}\n\nexport function DropPanel({ icon, title, summary, error, open, onToggle, children }: {\n icon: ReactNode;\n title: string;\n summary: ReactNode;\n error?: Phrase;\n open: boolean;\n onToggle: () => void;\n children: ReactNode;\n}) {\n const t = useT();\n return (\n <section className=\"rounded-2xl border border-border bg-background\">\n <button type=\"button\" aria-expanded={open} onClick={onToggle}\n className=\"flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5\">\n <IconTile size=\"sm\" className=\"h-10 w-10 [&_svg]:h-
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/create/drop-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { IconTile } from \"../../icon-tile.js\";\nimport { cn } from \"../../../utils/cn.js\";\nimport type { DropDraft, DropDraftErrors } from \"../../../utils/drop/draft.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport type { Phrase } from \"../../../i18n/translate.js\";\n\nexport interface PanelProps {\n draft: DropDraft;\n setDraft: (patch: Partial<DropDraft>) => void;\n errors: DropDraftErrors;\n open: boolean;\n onToggle: () => void;\n}\n\nexport function DropPanel({ icon, title, summary, error, open, onToggle, children }: {\n icon: ReactNode;\n title: string;\n summary: ReactNode;\n error?: Phrase;\n open: boolean;\n onToggle: () => void;\n children: ReactNode;\n}) {\n const t = useT();\n return (\n <section className=\"rounded-2xl border border-border bg-background\">\n <button type=\"button\" aria-expanded={open} onClick={onToggle}\n className=\"flex w-full items-center gap-3.5 rounded-2xl p-4 text-left transition-colors hover:bg-muted/30 sm:p-5\">\n <IconTile size=\"sm\" className=\"h-10 w-10 [&_svg]:h-7 [&_svg]:w-7\">{icon}</IconTile>\n <span className=\"min-w-0 flex-1 space-y-1\">\n <span className=\"block text-[15px] font-semibold\">{title}</span>\n {error\n ? <span className=\"block text-sm text-destructive\">{t(error.text, error.vars)}</span>\n : <span className=\"block text-sm text-muted-foreground\">{summary}</span>}\n </span>\n <ChevronDown className={cn(\"h-4 w-4 shrink-0 text-muted-foreground transition-transform\", open && \"rotate-180\")} />\n </button>\n {open && <div className=\"space-y-5 border-t border-border/60 p-4 sm:p-5\">{children}</div>}\n </section>\n );\n}\n"],"mappings":";AAgCQ,cACA,YADA;AA7BR,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,UAAU;AAEnB,SAAS,YAAY;AAWd,SAAS,UAAU,EAAE,MAAM,OAAO,SAAS,OAAO,MAAM,UAAU,SAAS,GAQ/E;AACD,QAAM,IAAI,KAAK;AACf,SACE,qBAAC,aAAQ,WAAU,kDACjB;AAAA;AAAA,MAAC;AAAA;AAAA,QAAO,MAAK;AAAA,QAAS,iBAAe;AAAA,QAAM,SAAS;AAAA,QAClD,WAAU;AAAA,QACV;AAAA,8BAAC,YAAS,MAAK,MAAK,WAAU,qCAAqC,gBAAK;AAAA,UACxE,qBAAC,UAAK,WAAU,4BACd;AAAA,gCAAC,UAAK,WAAU,mCAAmC,iBAAM;AAAA,YACxD,QACG,oBAAC,UAAK,WAAU,kCAAkC,YAAE,MAAM,MAAM,MAAM,IAAI,GAAE,IAC5E,oBAAC,UAAK,WAAU,uCAAuC,mBAAQ;AAAA,aACrE;AAAA,UACA,oBAAC,eAAY,WAAW,GAAG,+DAA+D,QAAQ,YAAY,GAAG;AAAA;AAAA;AAAA,IACnH;AAAA,IACC,QAAQ,oBAAC,SAAI,WAAU,kDAAkD,UAAS;AAAA,KACrF;AAEJ;","names":[]}
|
|
@@ -24,9 +24,9 @@ module.exports = __toCommonJS(icon_tile_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_cn = require("../utils/cn.js");
|
|
26
26
|
const SIZES = {
|
|
27
|
-
sm: "h-8 w-8 text-sm [&_svg]:h-
|
|
28
|
-
md: "h-11 w-11 text-base [&_svg]:h-
|
|
29
|
-
lg: "h-16 w-16 text-xl [&_svg]:h-
|
|
27
|
+
sm: "h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]",
|
|
28
|
+
md: "h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]",
|
|
29
|
+
lg: "h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]"
|
|
30
30
|
};
|
|
31
31
|
const LOGO_CORNER = "rounded-[30%]";
|
|
32
32
|
function IconTile({ size = "md", destructive, className, ...props }) {
|
|
@@ -34,7 +34,7 @@ function IconTile({ size = "md", destructive, className, ...props }) {
|
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
36
|
className: (0, import_cn.cn)(
|
|
37
|
-
"inline-flex shrink-0 items-center justify-center font-bold text-white",
|
|
37
|
+
"inline-flex shrink-0 items-center justify-center font-bold text-white [&_svg]:stroke-[2.25]",
|
|
38
38
|
destructive ? "bg-destructive" : "bg-primary",
|
|
39
39
|
LOGO_CORNER,
|
|
40
40
|
SIZES[size],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 text-sm [&_svg]:h-
|
|
1
|
+
{"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]\",\n md: \"h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]\",\n lg: \"h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]\",\n} as const;\n\nconst LOGO_CORNER = \"rounded-[30%]\";\n\nexport interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n size?: keyof typeof SIZES;\n destructive?: boolean;\n}\n\nexport function IconTile({ size = \"md\", destructive, className, ...props }: IconTileProps) {\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center font-bold text-white [&_svg]:stroke-[2.25]\",\n destructive ? \"bg-destructive\" : \"bg-primary\",\n LOGO_CORNER,\n SIZES[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBI;AAjBJ,gBAAmB;AAEnB,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,cAAc;AAOb,SAAS,SAAS,EAAE,OAAO,MAAM,aAAa,WAAW,GAAG,MAAM,GAAkB;AACzF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,cAAc,mBAAmB;AAAA,QACjC;AAAA,QACA,MAAM,IAAI;AAAA,QACV;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -2,9 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
declare const SIZES: {
|
|
5
|
-
readonly sm: "h-8 w-8 text-sm [&_svg]:h-
|
|
6
|
-
readonly md: "h-11 w-11 text-base [&_svg]:h-
|
|
7
|
-
readonly lg: "h-16 w-16 text-xl [&_svg]:h-
|
|
5
|
+
readonly sm: "h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]";
|
|
6
|
+
readonly md: "h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]";
|
|
7
|
+
readonly lg: "h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]";
|
|
8
8
|
};
|
|
9
9
|
interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
10
10
|
size?: keyof typeof SIZES;
|
|
@@ -2,9 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
declare const SIZES: {
|
|
5
|
-
readonly sm: "h-8 w-8 text-sm [&_svg]:h-
|
|
6
|
-
readonly md: "h-11 w-11 text-base [&_svg]:h-
|
|
7
|
-
readonly lg: "h-16 w-16 text-xl [&_svg]:h-
|
|
5
|
+
readonly sm: "h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]";
|
|
6
|
+
readonly md: "h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]";
|
|
7
|
+
readonly lg: "h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]";
|
|
8
8
|
};
|
|
9
9
|
interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
10
10
|
size?: keyof typeof SIZES;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
const SIZES = {
|
|
4
|
-
sm: "h-8 w-8 text-sm [&_svg]:h-
|
|
5
|
-
md: "h-11 w-11 text-base [&_svg]:h-
|
|
6
|
-
lg: "h-16 w-16 text-xl [&_svg]:h-
|
|
4
|
+
sm: "h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]",
|
|
5
|
+
md: "h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]",
|
|
6
|
+
lg: "h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]"
|
|
7
7
|
};
|
|
8
8
|
const LOGO_CORNER = "rounded-[30%]";
|
|
9
9
|
function IconTile({ size = "md", destructive, className, ...props }) {
|
|
@@ -11,7 +11,7 @@ function IconTile({ size = "md", destructive, className, ...props }) {
|
|
|
11
11
|
"span",
|
|
12
12
|
{
|
|
13
13
|
className: cn(
|
|
14
|
-
"inline-flex shrink-0 items-center justify-center font-bold text-white",
|
|
14
|
+
"inline-flex shrink-0 items-center justify-center font-bold text-white [&_svg]:stroke-[2.25]",
|
|
15
15
|
destructive ? "bg-destructive" : "bg-primary",
|
|
16
16
|
LOGO_CORNER,
|
|
17
17
|
SIZES[size],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 text-sm [&_svg]:h-
|
|
1
|
+
{"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 text-sm [&_svg]:h-[22px] [&_svg]:w-[22px]\",\n md: \"h-11 w-11 text-base [&_svg]:h-[30px] [&_svg]:w-[30px]\",\n lg: \"h-16 w-16 text-xl [&_svg]:h-[42px] [&_svg]:w-[42px]\",\n} as const;\n\nconst LOGO_CORNER = \"rounded-[30%]\";\n\nexport interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n size?: keyof typeof SIZES;\n destructive?: boolean;\n}\n\nexport function IconTile({ size = \"md\", destructive, className, ...props }: IconTileProps) {\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center font-bold text-white [&_svg]:stroke-[2.25]\",\n destructive ? \"bg-destructive\" : \"bg-primary\",\n LOGO_CORNER,\n SIZES[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"AAkBI;AAjBJ,SAAS,UAAU;AAEnB,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,cAAc;AAOb,SAAS,SAAS,EAAE,OAAO,MAAM,aAAa,WAAW,GAAG,MAAM,GAAkB;AACzF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,cAAc,mBAAmB;AAAA,QACjC;AAAA,QACA,MAAM,IAAI;AAAA,QACV;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -181,7 +181,7 @@ function CoinCreate({ aside, tradeHref }) {
|
|
|
181
181
|
{
|
|
182
182
|
icon: import_lucide_react.Coins,
|
|
183
183
|
iconClassName: "text-brand-orange",
|
|
184
|
-
title: t("Launch a
|
|
184
|
+
title: t("Launch a coin"),
|
|
185
185
|
description: t("Secure your account to launch a coin."),
|
|
186
186
|
children: [
|
|
187
187
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: t("Launch your coin"), workingLabel: t("Launching your coin\u2026"), firstStepLabel: t("Launch your coin"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -211,7 +211,7 @@ function CoinCreate({ aside, tradeHref }) {
|
|
|
211
211
|
import_claim_route_shell.ClaimRouteShell,
|
|
212
212
|
{
|
|
213
213
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Coins, { className: "h-4 w-4 text-white" }),
|
|
214
|
-
title: t("Design your
|
|
214
|
+
title: t("Design your coin"),
|
|
215
215
|
subtitle: t("A few steps to design and launch your coin."),
|
|
216
216
|
aside: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
217
217
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coin_launch_preview.CoinLaunchPreview, { data: previewData }),
|