@medialane/ui 0.364.0 → 0.366.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/fast-mint/asset-form-parts.cjs +19 -12
- package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
- package/dist/components/fast-mint/asset-form-parts.d.cts +14 -6
- package/dist/components/fast-mint/asset-form-parts.d.ts +14 -6
- package/dist/components/fast-mint/asset-form-parts.js +18 -12
- package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.cjs +111 -73
- package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
- package/dist/components/fast-mint/fast-mint.js +112 -74
- package/dist/components/fast-mint/fast-mint.js.map +1 -1
- package/dist/components/fast-mint/types.cjs.map +1 -1
- package/dist/components/fast-mint/types.d.cts +1 -0
- package/dist/components/fast-mint/types.d.ts +1 -0
- package/dist/components/launchpad/collection-create-form.cjs +12 -3
- package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
- package/dist/components/launchpad/collection-create-form.js +12 -3
- package/dist/components/launchpad/collection-create-form.js.map +1 -1
- package/dist/components/launchpad/pop-create.cjs +10 -1
- package/dist/components/launchpad/pop-create.cjs.map +1 -1
- package/dist/components/launchpad/pop-create.js +10 -1
- package/dist/components/launchpad/pop-create.js.map +1 -1
- package/dist/components/launchpad-filter-bar.cjs +20 -35
- package/dist/components/launchpad-filter-bar.cjs.map +1 -1
- package/dist/components/launchpad-filter-bar.d.cts +6 -6
- package/dist/components/launchpad-filter-bar.d.ts +6 -6
- package/dist/components/launchpad-filter-bar.js +21 -38
- package/dist/components/launchpad-filter-bar.js.map +1 -1
- package/dist/components/launchpad-page.cjs +10 -22
- package/dist/components/launchpad-page.cjs.map +1 -1
- package/dist/components/launchpad-page.js +11 -23
- package/dist/components/launchpad-page.js.map +1 -1
- package/dist/components/launchpad-services.cjs +41 -52
- package/dist/components/launchpad-services.cjs.map +1 -1
- package/dist/components/launchpad-services.d.cts +11 -10
- package/dist/components/launchpad-services.d.ts +11 -10
- package/dist/components/launchpad-services.js +40 -53
- package/dist/components/launchpad-services.js.map +1 -1
- package/dist/data/launchpad-services.cjs +21 -16
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.d.cts +1 -1
- package/dist/data/launchpad-services.d.ts +1 -1
- package/dist/data/launchpad-services.js +21 -16
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/utils/launchpad-handoff.cjs +62 -0
- package/dist/utils/launchpad-handoff.cjs.map +1 -0
- package/dist/utils/launchpad-handoff.d.cts +11 -0
- package/dist/utils/launchpad-handoff.d.ts +11 -0
- package/dist/utils/launchpad-handoff.js +35 -0
- package/dist/utils/launchpad-handoff.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { Search, X } from "lucide-react";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
LAUNCHPAD_SERVICE_DEFINITIONS
|
|
9
|
-
} from "../data/launchpad-services.js";
|
|
10
|
-
function LaunchpadFilterBar({
|
|
11
|
-
query,
|
|
12
|
-
onQueryChange,
|
|
13
|
-
groups,
|
|
14
|
-
activeGroups,
|
|
15
|
-
onToggleGroup
|
|
16
|
-
}) {
|
|
5
|
+
import { launchpadSectionId } from "./launchpad-services.js";
|
|
6
|
+
function LaunchpadFilterBar({ query, onQueryChange, sections }) {
|
|
17
7
|
const inputRef = useRef(null);
|
|
18
8
|
useEffect(() => {
|
|
19
9
|
const onKeyDown = (e) => {
|
|
@@ -26,11 +16,12 @@ function LaunchpadFilterBar({
|
|
|
26
16
|
window.addEventListener("keydown", onKeyDown);
|
|
27
17
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
28
18
|
}, []);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
const jumpTo = (key) => {
|
|
20
|
+
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
21
|
+
document.getElementById(launchpadSectionId(key))?.scrollIntoView({ behavior: reduce ? "auto" : "smooth", block: "start" });
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-20 -mx-4 sm:-mx-6 lg:-mx-8 px-4 sm:px-6 lg:px-8 py-3 bg-background/95 backdrop-blur-sm flex flex-col lg:flex-row gap-3 lg:items-center", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "relative lg:w-72 lg:shrink-0", children: [
|
|
34
25
|
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none" }),
|
|
35
26
|
/* @__PURE__ */ jsx(
|
|
36
27
|
"input",
|
|
@@ -54,27 +45,19 @@ function LaunchpadFilterBar({
|
|
|
54
45
|
}
|
|
55
46
|
) : /* @__PURE__ */ jsx("kbd", { className: "absolute right-3 top-1/2 -translate-y-1/2 hidden sm:flex h-5 w-5 items-center justify-center rounded border border-border bg-muted/40 text-2xs font-medium text-muted-foreground pointer-events-none", children: "/" })
|
|
56
47
|
] }),
|
|
57
|
-
/* @__PURE__ */ jsx("
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children: [
|
|
71
|
-
group.title,
|
|
72
|
-
/* @__PURE__ */ jsx("span", { className: cn("tabular-nums", active ? "text-white/70" : "text-muted-foreground/60"), children: count })
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
group.key
|
|
76
|
-
);
|
|
77
|
-
}) })
|
|
48
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "Launchpad sections", className: "flex gap-2 overflow-x-auto lg:flex-wrap lg:overflow-visible -mx-4 px-4 sm:mx-0 sm:px-0", children: sections.map(({ group, count }) => /* @__PURE__ */ jsxs(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
type: "button",
|
|
52
|
+
onClick: () => jumpTo(group.key),
|
|
53
|
+
className: "h-8 shrink-0 px-3.5 rounded-full text-xs font-semibold transition-colors border inline-flex items-center gap-1.5 bg-card text-muted-foreground border-border active:bg-muted/60 sm:hover:bg-muted/40 sm:hover:text-foreground",
|
|
54
|
+
children: [
|
|
55
|
+
group.title,
|
|
56
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground/60", children: count })
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
group.key
|
|
60
|
+
)) })
|
|
78
61
|
] });
|
|
79
62
|
}
|
|
80
63
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/launchpad-filter-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\nimport { Search, X } from \"lucide-react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/launchpad-filter-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\nimport { Search, X } from \"lucide-react\";\nimport { launchpadSectionId } from \"./launchpad-services.js\";\nimport type { ServiceGroup, ServiceGroupDefinition } from \"../data/launchpad-services.js\";\n\nexport interface LaunchpadFilterBarProps {\n query: string;\n onQueryChange: (value: string) => void;\n sections: Array<{ group: ServiceGroupDefinition; count: number }>;\n}\n\nexport function LaunchpadFilterBar({ query, onQueryChange, sections }: LaunchpadFilterBarProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== \"/\" || e.metaKey || e.ctrlKey || e.altKey) return;\n const target = e.target as HTMLElement | null;\n if (target && (target.tagName === \"INPUT\" || target.tagName === \"TEXTAREA\" || target.isContentEditable)) return;\n e.preventDefault();\n inputRef.current?.focus();\n };\n window.addEventListener(\"keydown\", onKeyDown);\n return () => window.removeEventListener(\"keydown\", onKeyDown);\n }, []);\n\n const jumpTo = (key: ServiceGroup) => {\n const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n document.getElementById(launchpadSectionId(key))?.scrollIntoView({ behavior: reduce ? \"auto\" : \"smooth\", block: \"start\" });\n };\n\n return (\n <div className=\"sticky top-0 z-20 -mx-4 sm:-mx-6 lg:-mx-8 px-4 sm:px-6 lg:px-8 py-3 bg-background/95 backdrop-blur-sm flex flex-col lg:flex-row gap-3 lg:items-center\">\n <div className=\"relative lg:w-72 lg:shrink-0\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none\" />\n <input\n ref={inputRef}\n type=\"text\"\n value={query}\n onChange={(e) => onQueryChange(e.target.value)}\n placeholder=\"Search services\"\n className=\"w-full h-10 rounded-full border border-border bg-card pl-9 pr-9 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40\"\n />\n {query ? (\n <button\n type=\"button\"\n onClick={() => onQueryChange(\"\")}\n aria-label=\"Clear search\"\n className=\"absolute right-2.5 top-1/2 -translate-y-1/2 h-5 w-5 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground transition-colors\"\n >\n <X className=\"h-3.5 w-3.5\" />\n </button>\n ) : (\n <kbd className=\"absolute right-3 top-1/2 -translate-y-1/2 hidden sm:flex h-5 w-5 items-center justify-center rounded border border-border bg-muted/40 text-2xs font-medium text-muted-foreground pointer-events-none\">\n /\n </kbd>\n )}\n </div>\n\n <nav aria-label=\"Launchpad sections\" className=\"flex gap-2 overflow-x-auto lg:flex-wrap lg:overflow-visible -mx-4 px-4 sm:mx-0 sm:px-0\">\n {sections.map(({ group, count }) => (\n <button\n key={group.key}\n type=\"button\"\n onClick={() => jumpTo(group.key)}\n className=\"h-8 shrink-0 px-3.5 rounded-full text-xs font-semibold transition-colors border inline-flex items-center gap-1.5 bg-card text-muted-foreground border-border active:bg-muted/60 sm:hover:bg-muted/40 sm:hover:text-foreground\"\n >\n {group.title}\n <span className=\"tabular-nums text-muted-foreground/60\">{count}</span>\n </button>\n ))}\n </nav>\n </div>\n );\n}\n"],"mappings":";AAmCM,SACE,KADF;AAjCN,SAAS,WAAW,cAAc;AAClC,SAAS,QAAQ,SAAS;AAC1B,SAAS,0BAA0B;AAS5B,SAAS,mBAAmB,EAAE,OAAO,eAAe,SAAS,GAA4B;AAC9F,QAAM,WAAW,OAAyB,IAAI;AAE9C,YAAU,MAAM;AACd,UAAM,YAAY,CAAC,MAAqB;AACtC,UAAI,EAAE,QAAQ,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAQ;AACzD,YAAM,SAAS,EAAE;AACjB,UAAI,WAAW,OAAO,YAAY,WAAW,OAAO,YAAY,cAAc,OAAO,mBAAoB;AACzG,QAAE,eAAe;AACjB,eAAS,SAAS,MAAM;AAAA,IAC1B;AACA,WAAO,iBAAiB,WAAW,SAAS;AAC5C,WAAO,MAAM,OAAO,oBAAoB,WAAW,SAAS;AAAA,EAC9D,GAAG,CAAC,CAAC;AAEL,QAAM,SAAS,CAAC,QAAsB;AACpC,UAAM,SAAS,OAAO,WAAW,kCAAkC,EAAE;AACrE,aAAS,eAAe,mBAAmB,GAAG,CAAC,GAAG,eAAe,EAAE,UAAU,SAAS,SAAS,UAAU,OAAO,QAAQ,CAAC;AAAA,EAC3H;AAEA,SACE,qBAAC,SAAI,WAAU,yJACb;AAAA,yBAAC,SAAI,WAAU,gCACb;AAAA,0BAAC,UAAO,WAAU,8FAA6F;AAAA,MAC/G;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,MAAK;AAAA,UACL,OAAO;AAAA,UACP,UAAU,CAAC,MAAM,cAAc,EAAE,OAAO,KAAK;AAAA,UAC7C,aAAY;AAAA,UACZ,WAAU;AAAA;AAAA,MACZ;AAAA,MACC,QACC;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,cAAc,EAAE;AAAA,UAC/B,cAAW;AAAA,UACX,WAAU;AAAA,UAEV,8BAAC,KAAE,WAAU,eAAc;AAAA;AAAA,MAC7B,IAEA,oBAAC,SAAI,WAAU,wMAAuM,eAEtN;AAAA,OAEJ;AAAA,IAEA,oBAAC,SAAI,cAAW,sBAAqB,WAAU,0FAC5C,mBAAS,IAAI,CAAC,EAAE,OAAO,MAAM,MAC5B;AAAA,MAAC;AAAA;AAAA,QAEC,MAAK;AAAA,QACL,SAAS,MAAM,OAAO,MAAM,GAAG;AAAA,QAC/B,WAAU;AAAA,QAET;AAAA,gBAAM;AAAA,UACP,oBAAC,UAAK,WAAU,yCAAyC,iBAAM;AAAA;AAAA;AAAA,MAN1D,MAAM;AAAA,IAOb,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -27,9 +27,11 @@ var import_react = require("react");
|
|
|
27
27
|
var import_sdk = require("@medialane/sdk");
|
|
28
28
|
var import_motion_primitives = require("./motion-primitives.js");
|
|
29
29
|
var import_launchpad_services = require("./launchpad-services.js");
|
|
30
|
+
var import_launchpad_services2 = require("../data/launchpad-services.js");
|
|
30
31
|
var import_launchpad_filter_bar = require("./launchpad-filter-bar.js");
|
|
31
32
|
var import_medialane_app = require("./medialane-app.js");
|
|
32
33
|
var import_use_collections = require("../utils/use-collections.js");
|
|
34
|
+
const NOT_ON_LAUNCHPAD = ["claim-collection-name"];
|
|
33
35
|
function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }) {
|
|
34
36
|
const { walletAddress } = (0, import_medialane_app.useMedialaneApp)();
|
|
35
37
|
const filter = (0, import_launchpad_services.useLaunchpadFilter)();
|
|
@@ -40,33 +42,19 @@ function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }) {
|
|
|
40
42
|
const withMeta = (key, count) => count > 0 ? { [key]: { ...import_launchpad_services.LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? "" : "s"}` } } : {};
|
|
41
43
|
return { ...import_launchpad_services.LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta("nfts", nftCount), ...withMeta("limited-editions", editionsCount) };
|
|
42
44
|
}, [collections]);
|
|
45
|
+
const defs = (0, import_react.useMemo)(
|
|
46
|
+
() => (0, import_launchpad_services.selectLaunchpadServices)({ query: filter.query, hideGroups, excludeKeys: [...NOT_ON_LAUNCHPAD, ...excludeKeys ?? []] }),
|
|
47
|
+
[filter.query, hideGroups, excludeKeys]
|
|
48
|
+
);
|
|
49
|
+
const sections = import_launchpad_services2.LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== "coming-soon").map((group) => ({ group, count: defs.filter((d) => d.group === group.key).length })).filter((s) => s.count > 0);
|
|
43
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative pb-20 space-y-16 sm:space-y-24", children: [
|
|
44
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6", children: [
|
|
45
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-3xl sm:text-4xl font-semibold leading-tight", children: "Creator Launchpad" }) }),
|
|
46
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.06, children: fastMint })
|
|
47
54
|
] }),
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-
|
|
49
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
-
import_launchpad_filter_bar.LaunchpadFilterBar,
|
|
52
|
-
{
|
|
53
|
-
query: filter.query,
|
|
54
|
-
onQueryChange: filter.setQuery,
|
|
55
|
-
groups: filter.filterableGroups.filter((g) => !hideGroups.includes(g.key)),
|
|
56
|
-
activeGroups: filter.activeGroups,
|
|
57
|
-
onToggleGroup: filter.toggleGroup
|
|
58
|
-
}
|
|
59
|
-
) }),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
-
import_launchpad_services.LaunchpadGroupedSections,
|
|
62
|
-
{
|
|
63
|
-
overrides,
|
|
64
|
-
query: filter.query,
|
|
65
|
-
activeGroups: filter.activeGroups,
|
|
66
|
-
onClearFilters: filter.clear,
|
|
67
|
-
excludeKeys
|
|
68
|
-
}
|
|
69
|
-
)
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-8", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.06, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_launchpad_filter_bar.LaunchpadFilterBar, { query: filter.query, onQueryChange: filter.setQuery, sections }) }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_launchpad_services.LaunchpadGroupedSections, { overrides, defs, onClearFilters: filter.clear })
|
|
70
58
|
] })
|
|
71
59
|
] });
|
|
72
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/launchpad-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, type ReactNode } from \"react\";\nimport { getService } from \"@medialane/sdk\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, useLaunchpadFilter, type ServiceOverrides } from \"./launchpad-services.js\";\nimport { LaunchpadFilterBar } from \"./launchpad-filter-bar.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useCollectionsByOwner } from \"../utils/use-collections.js\";\n\nexport interface LaunchpadPageProps {\n fastMint: ReactNode;\n hideGroups?: string[];\n excludeKeys?: string[];\n}\n\nexport function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }: LaunchpadPageProps) {\n const { walletAddress } = useMedialaneApp();\n const filter = useLaunchpadFilter();\n const { collections } = useCollectionsByOwner(walletAddress);\n\n const overrides = useMemo<ServiceOverrides>(() => {\n const nftCount = collections.filter((c) => getService(c.service)?.id === \"mip-erc721\").length;\n const editionsCount = collections.filter((c) => c.standard === \"ERC1155\").length;\n const withMeta = (key: string, count: number): ServiceOverrides =>\n count > 0 ? { [key]: { ...LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? \"\" : \"s\"}` } } : {};\n return { ...LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta(\"nfts\", nftCount), ...withMeta(\"limited-editions\", editionsCount) };\n }, [collections]);\n\n return (\n <div className=\"relative pb-20 space-y-16 sm:space-y-24\">\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6\">\n <FadeIn>\n <h1 className=\"text-3xl sm:text-4xl font-semibold leading-tight\">Creator Launchpad</h1>\n </FadeIn>\n <FadeIn delay={0.06}>{fastMint}</FadeIn>\n </section>\n\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-
|
|
1
|
+
{"version":3,"sources":["../../src/components/launchpad-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, type ReactNode } from \"react\";\nimport { getService } from \"@medialane/sdk\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, selectLaunchpadServices, useLaunchpadFilter, type ServiceOverrides } from \"./launchpad-services.js\";\nimport { LAUNCHPAD_SERVICE_GROUPS } from \"../data/launchpad-services.js\";\nimport { LaunchpadFilterBar } from \"./launchpad-filter-bar.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useCollectionsByOwner } from \"../utils/use-collections.js\";\n\nexport interface LaunchpadPageProps {\n fastMint: ReactNode;\n hideGroups?: string[];\n excludeKeys?: string[];\n}\n\nconst NOT_ON_LAUNCHPAD = [\"claim-collection-name\"];\n\nexport function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }: LaunchpadPageProps) {\n const { walletAddress } = useMedialaneApp();\n const filter = useLaunchpadFilter();\n const { collections } = useCollectionsByOwner(walletAddress);\n\n const overrides = useMemo<ServiceOverrides>(() => {\n const nftCount = collections.filter((c) => getService(c.service)?.id === \"mip-erc721\").length;\n const editionsCount = collections.filter((c) => c.standard === \"ERC1155\").length;\n const withMeta = (key: string, count: number): ServiceOverrides =>\n count > 0 ? { [key]: { ...LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? \"\" : \"s\"}` } } : {};\n return { ...LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta(\"nfts\", nftCount), ...withMeta(\"limited-editions\", editionsCount) };\n }, [collections]);\n\n const defs = useMemo(\n () => selectLaunchpadServices({ query: filter.query, hideGroups, excludeKeys: [...NOT_ON_LAUNCHPAD, ...(excludeKeys ?? [])] }),\n [filter.query, hideGroups, excludeKeys],\n );\n\n const sections = LAUNCHPAD_SERVICE_GROUPS\n .filter((g) => g.key !== \"coming-soon\")\n .map((group) => ({ group, count: defs.filter((d) => d.group === group.key).length }))\n .filter((s) => s.count > 0);\n\n return (\n <div className=\"relative pb-20 space-y-16 sm:space-y-24\">\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6\">\n <FadeIn>\n <h1 className=\"text-3xl sm:text-4xl font-semibold leading-tight\">Creator Launchpad</h1>\n </FadeIn>\n <FadeIn delay={0.06}>{fastMint}</FadeIn>\n </section>\n\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-8\">\n <FadeIn delay={0.06}>\n <LaunchpadFilterBar query={filter.query} onQueryChange={filter.setQuery} sections={sections} />\n </FadeIn>\n <LaunchpadGroupedSections overrides={overrides} defs={defs} onClearFilters={filter.clear} />\n </section>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CM;AA1CN,mBAAwC;AACxC,iBAA2B;AAC3B,+BAAuB;AACvB,gCAAwI;AACxI,IAAAA,6BAAyC;AACzC,kCAAmC;AACnC,2BAAgC;AAChC,6BAAsC;AAQtC,MAAM,mBAAmB,CAAC,uBAAuB;AAE1C,SAAS,cAAc,EAAE,UAAU,aAAa,CAAC,GAAG,YAAY,GAAuB;AAC5F,QAAM,EAAE,cAAc,QAAI,sCAAgB;AAC1C,QAAM,aAAS,8CAAmB;AAClC,QAAM,EAAE,YAAY,QAAI,8CAAsB,aAAa;AAE3D,QAAM,gBAAY,sBAA0B,MAAM;AAChD,UAAM,WAAW,YAAY,OAAO,CAAC,UAAM,uBAAW,EAAE,OAAO,GAAG,OAAO,YAAY,EAAE;AACvF,UAAM,gBAAgB,YAAY,OAAO,CAAC,MAAM,EAAE,aAAa,SAAS,EAAE;AAC1E,UAAM,WAAW,CAAC,KAAa,UAC7B,QAAQ,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,oDAA0B,GAAG,GAAG,MAAM,GAAG,KAAK,cAAc,UAAU,IAAI,KAAK,GAAG,GAAG,EAAE,IAAI,CAAC;AACxH,WAAO,EAAE,GAAG,qDAA2B,GAAG,SAAS,QAAQ,QAAQ,GAAG,GAAG,SAAS,oBAAoB,aAAa,EAAE;AAAA,EACvH,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,WAAO;AAAA,IACX,UAAM,mDAAwB,EAAE,OAAO,OAAO,OAAO,YAAY,aAAa,CAAC,GAAG,kBAAkB,GAAI,eAAe,CAAC,CAAE,EAAE,CAAC;AAAA,IAC7H,CAAC,OAAO,OAAO,YAAY,WAAW;AAAA,EACxC;AAEA,QAAM,WAAW,oDACd,OAAO,CAAC,MAAM,EAAE,QAAQ,aAAa,EACrC,IAAI,CAAC,WAAW,EAAE,OAAO,OAAO,KAAK,OAAO,CAAC,MAAM,EAAE,UAAU,MAAM,GAAG,EAAE,OAAO,EAAE,EACnF,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;AAE5B,SACE,6CAAC,SAAI,WAAU,2CACb;AAAA,iDAAC,aAAQ,WAAU,wEACjB;AAAA,kDAAC,mCACC,sDAAC,QAAG,WAAU,oDAAmD,+BAAiB,GACpF;AAAA,MACA,4CAAC,mCAAO,OAAO,MAAO,oBAAS;AAAA,OACjC;AAAA,IAEA,6CAAC,aAAQ,WAAU,yDACjB;AAAA,kDAAC,mCAAO,OAAO,MACb,sDAAC,kDAAmB,OAAO,OAAO,OAAO,eAAe,OAAO,UAAU,UAAoB,GAC/F;AAAA,MACA,4CAAC,sDAAyB,WAAsB,MAAY,gBAAgB,OAAO,OAAO;AAAA,OAC5F;AAAA,KACF;AAEJ;","names":["import_launchpad_services"]}
|
|
@@ -3,10 +3,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { getService } from "@medialane/sdk";
|
|
5
5
|
import { FadeIn } from "./motion-primitives.js";
|
|
6
|
-
import { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, useLaunchpadFilter } from "./launchpad-services.js";
|
|
6
|
+
import { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, selectLaunchpadServices, useLaunchpadFilter } from "./launchpad-services.js";
|
|
7
|
+
import { LAUNCHPAD_SERVICE_GROUPS } from "../data/launchpad-services.js";
|
|
7
8
|
import { LaunchpadFilterBar } from "./launchpad-filter-bar.js";
|
|
8
9
|
import { useMedialaneApp } from "./medialane-app.js";
|
|
9
10
|
import { useCollectionsByOwner } from "../utils/use-collections.js";
|
|
11
|
+
const NOT_ON_LAUNCHPAD = ["claim-collection-name"];
|
|
10
12
|
function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }) {
|
|
11
13
|
const { walletAddress } = useMedialaneApp();
|
|
12
14
|
const filter = useLaunchpadFilter();
|
|
@@ -17,33 +19,19 @@ function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }) {
|
|
|
17
19
|
const withMeta = (key, count) => count > 0 ? { [key]: { ...LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? "" : "s"}` } } : {};
|
|
18
20
|
return { ...LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta("nfts", nftCount), ...withMeta("limited-editions", editionsCount) };
|
|
19
21
|
}, [collections]);
|
|
22
|
+
const defs = useMemo(
|
|
23
|
+
() => selectLaunchpadServices({ query: filter.query, hideGroups, excludeKeys: [...NOT_ON_LAUNCHPAD, ...excludeKeys ?? []] }),
|
|
24
|
+
[filter.query, hideGroups, excludeKeys]
|
|
25
|
+
);
|
|
26
|
+
const sections = LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== "coming-soon").map((group) => ({ group, count: defs.filter((d) => d.group === group.key).length })).filter((s) => s.count > 0);
|
|
20
27
|
return /* @__PURE__ */ jsxs("div", { className: "relative pb-20 space-y-16 sm:space-y-24", children: [
|
|
21
28
|
/* @__PURE__ */ jsxs("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6", children: [
|
|
22
29
|
/* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsx("h1", { className: "text-3xl sm:text-4xl font-semibold leading-tight", children: "Creator Launchpad" }) }),
|
|
23
30
|
/* @__PURE__ */ jsx(FadeIn, { delay: 0.06, children: fastMint })
|
|
24
31
|
] }),
|
|
25
|
-
/* @__PURE__ */ jsxs("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-
|
|
26
|
-
/* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsx(
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
LaunchpadFilterBar,
|
|
29
|
-
{
|
|
30
|
-
query: filter.query,
|
|
31
|
-
onQueryChange: filter.setQuery,
|
|
32
|
-
groups: filter.filterableGroups.filter((g) => !hideGroups.includes(g.key)),
|
|
33
|
-
activeGroups: filter.activeGroups,
|
|
34
|
-
onToggleGroup: filter.toggleGroup
|
|
35
|
-
}
|
|
36
|
-
) }),
|
|
37
|
-
/* @__PURE__ */ jsx(
|
|
38
|
-
LaunchpadGroupedSections,
|
|
39
|
-
{
|
|
40
|
-
overrides,
|
|
41
|
-
query: filter.query,
|
|
42
|
-
activeGroups: filter.activeGroups,
|
|
43
|
-
onClearFilters: filter.clear,
|
|
44
|
-
excludeKeys
|
|
45
|
-
}
|
|
46
|
-
)
|
|
32
|
+
/* @__PURE__ */ jsxs("section", { className: "max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-8", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(FadeIn, { delay: 0.06, children: /* @__PURE__ */ jsx(LaunchpadFilterBar, { query: filter.query, onQueryChange: filter.setQuery, sections }) }),
|
|
34
|
+
/* @__PURE__ */ jsx(LaunchpadGroupedSections, { overrides, defs, onClearFilters: filter.clear })
|
|
47
35
|
] })
|
|
48
36
|
] });
|
|
49
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/launchpad-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, type ReactNode } from \"react\";\nimport { getService } from \"@medialane/sdk\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, useLaunchpadFilter, type ServiceOverrides } from \"./launchpad-services.js\";\nimport { LaunchpadFilterBar } from \"./launchpad-filter-bar.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useCollectionsByOwner } from \"../utils/use-collections.js\";\n\nexport interface LaunchpadPageProps {\n fastMint: ReactNode;\n hideGroups?: string[];\n excludeKeys?: string[];\n}\n\nexport function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }: LaunchpadPageProps) {\n const { walletAddress } = useMedialaneApp();\n const filter = useLaunchpadFilter();\n const { collections } = useCollectionsByOwner(walletAddress);\n\n const overrides = useMemo<ServiceOverrides>(() => {\n const nftCount = collections.filter((c) => getService(c.service)?.id === \"mip-erc721\").length;\n const editionsCount = collections.filter((c) => c.standard === \"ERC1155\").length;\n const withMeta = (key: string, count: number): ServiceOverrides =>\n count > 0 ? { [key]: { ...LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? \"\" : \"s\"}` } } : {};\n return { ...LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta(\"nfts\", nftCount), ...withMeta(\"limited-editions\", editionsCount) };\n }, [collections]);\n\n return (\n <div className=\"relative pb-20 space-y-16 sm:space-y-24\">\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6\">\n <FadeIn>\n <h1 className=\"text-3xl sm:text-4xl font-semibold leading-tight\">Creator Launchpad</h1>\n </FadeIn>\n <FadeIn delay={0.06}>{fastMint}</FadeIn>\n </section>\n\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-
|
|
1
|
+
{"version":3,"sources":["../../src/components/launchpad-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, type ReactNode } from \"react\";\nimport { getService } from \"@medialane/sdk\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { LaunchpadGroupedSections, LAUNCHPAD_ROUTE_OVERRIDES, selectLaunchpadServices, useLaunchpadFilter, type ServiceOverrides } from \"./launchpad-services.js\";\nimport { LAUNCHPAD_SERVICE_GROUPS } from \"../data/launchpad-services.js\";\nimport { LaunchpadFilterBar } from \"./launchpad-filter-bar.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useCollectionsByOwner } from \"../utils/use-collections.js\";\n\nexport interface LaunchpadPageProps {\n fastMint: ReactNode;\n hideGroups?: string[];\n excludeKeys?: string[];\n}\n\nconst NOT_ON_LAUNCHPAD = [\"claim-collection-name\"];\n\nexport function LaunchpadPage({ fastMint, hideGroups = [], excludeKeys }: LaunchpadPageProps) {\n const { walletAddress } = useMedialaneApp();\n const filter = useLaunchpadFilter();\n const { collections } = useCollectionsByOwner(walletAddress);\n\n const overrides = useMemo<ServiceOverrides>(() => {\n const nftCount = collections.filter((c) => getService(c.service)?.id === \"mip-erc721\").length;\n const editionsCount = collections.filter((c) => c.standard === \"ERC1155\").length;\n const withMeta = (key: string, count: number): ServiceOverrides =>\n count > 0 ? { [key]: { ...LAUNCHPAD_ROUTE_OVERRIDES[key], meta: `${count} collection${count === 1 ? \"\" : \"s\"}` } } : {};\n return { ...LAUNCHPAD_ROUTE_OVERRIDES, ...withMeta(\"nfts\", nftCount), ...withMeta(\"limited-editions\", editionsCount) };\n }, [collections]);\n\n const defs = useMemo(\n () => selectLaunchpadServices({ query: filter.query, hideGroups, excludeKeys: [...NOT_ON_LAUNCHPAD, ...(excludeKeys ?? [])] }),\n [filter.query, hideGroups, excludeKeys],\n );\n\n const sections = LAUNCHPAD_SERVICE_GROUPS\n .filter((g) => g.key !== \"coming-soon\")\n .map((group) => ({ group, count: defs.filter((d) => d.group === group.key).length }))\n .filter((s) => s.count > 0);\n\n return (\n <div className=\"relative pb-20 space-y-16 sm:space-y-24\">\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 pt-20 sm:pt-24 space-y-6\">\n <FadeIn>\n <h1 className=\"text-3xl sm:text-4xl font-semibold leading-tight\">Creator Launchpad</h1>\n </FadeIn>\n <FadeIn delay={0.06}>{fastMint}</FadeIn>\n </section>\n\n <section className=\"max-w-[1400px] mx-auto px-4 sm:px-6 lg:px-8 space-y-8\">\n <FadeIn delay={0.06}>\n <LaunchpadFilterBar query={filter.query} onQueryChange={filter.setQuery} sections={sections} />\n </FadeIn>\n <LaunchpadGroupedSections overrides={overrides} defs={defs} onClearFilters={filter.clear} />\n </section>\n </div>\n );\n}\n"],"mappings":";AA4CM,SAEI,KAFJ;AA1CN,SAAS,eAA+B;AACxC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,0BAA0B,2BAA2B,yBAAyB,0BAAiD;AACxI,SAAS,gCAAgC;AACzC,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AAQtC,MAAM,mBAAmB,CAAC,uBAAuB;AAE1C,SAAS,cAAc,EAAE,UAAU,aAAa,CAAC,GAAG,YAAY,GAAuB;AAC5F,QAAM,EAAE,cAAc,IAAI,gBAAgB;AAC1C,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,YAAY,IAAI,sBAAsB,aAAa;AAE3D,QAAM,YAAY,QAA0B,MAAM;AAChD,UAAM,WAAW,YAAY,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,GAAG,OAAO,YAAY,EAAE;AACvF,UAAM,gBAAgB,YAAY,OAAO,CAAC,MAAM,EAAE,aAAa,SAAS,EAAE;AAC1E,UAAM,WAAW,CAAC,KAAa,UAC7B,QAAQ,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,0BAA0B,GAAG,GAAG,MAAM,GAAG,KAAK,cAAc,UAAU,IAAI,KAAK,GAAG,GAAG,EAAE,IAAI,CAAC;AACxH,WAAO,EAAE,GAAG,2BAA2B,GAAG,SAAS,QAAQ,QAAQ,GAAG,GAAG,SAAS,oBAAoB,aAAa,EAAE;AAAA,EACvH,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,OAAO;AAAA,IACX,MAAM,wBAAwB,EAAE,OAAO,OAAO,OAAO,YAAY,aAAa,CAAC,GAAG,kBAAkB,GAAI,eAAe,CAAC,CAAE,EAAE,CAAC;AAAA,IAC7H,CAAC,OAAO,OAAO,YAAY,WAAW;AAAA,EACxC;AAEA,QAAM,WAAW,yBACd,OAAO,CAAC,MAAM,EAAE,QAAQ,aAAa,EACrC,IAAI,CAAC,WAAW,EAAE,OAAO,OAAO,KAAK,OAAO,CAAC,MAAM,EAAE,UAAU,MAAM,GAAG,EAAE,OAAO,EAAE,EACnF,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;AAE5B,SACE,qBAAC,SAAI,WAAU,2CACb;AAAA,yBAAC,aAAQ,WAAU,wEACjB;AAAA,0BAAC,UACC,8BAAC,QAAG,WAAU,oDAAmD,+BAAiB,GACpF;AAAA,MACA,oBAAC,UAAO,OAAO,MAAO,oBAAS;AAAA,OACjC;AAAA,IAEA,qBAAC,aAAQ,WAAU,yDACjB;AAAA,0BAAC,UAAO,OAAO,MACb,8BAAC,sBAAmB,OAAO,OAAO,OAAO,eAAe,OAAO,UAAU,UAAoB,GAC/F;AAAA,MACA,oBAAC,4BAAyB,WAAsB,MAAY,gBAAgB,OAAO,OAAO;AAAA,OAC5F;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -34,6 +34,8 @@ __export(launchpad_services_exports, {
|
|
|
34
34
|
LaunchpadGroupedSections: () => LaunchpadGroupedSections,
|
|
35
35
|
LaunchpadServiceCard: () => LaunchpadServiceCard,
|
|
36
36
|
SERVICE_HUES: () => SERVICE_HUES,
|
|
37
|
+
launchpadSectionId: () => launchpadSectionId,
|
|
38
|
+
selectLaunchpadServices: () => selectLaunchpadServices,
|
|
37
39
|
serviceMatchesQuery: () => serviceMatchesQuery,
|
|
38
40
|
useLaunchpadFilter: () => useLaunchpadFilter
|
|
39
41
|
});
|
|
@@ -68,10 +70,11 @@ const DEFAULT_SLICE = {
|
|
|
68
70
|
border: "border-border/60"
|
|
69
71
|
};
|
|
70
72
|
const GROUP_SLICES = {
|
|
71
|
-
"nfts": { tint: "bg-brand-blue/10", text: "text-brand-blue", border: "border-brand-blue/30" },
|
|
73
|
+
"single-nfts": { tint: "bg-brand-blue/10", text: "text-brand-blue", border: "border-brand-blue/30" },
|
|
72
74
|
"limited-editions": { tint: "bg-brand-maeve/10", text: "text-brand-maeve", border: "border-brand-maeve/30" },
|
|
73
75
|
"coins": { tint: "bg-brand-purple/10", text: "text-brand-purple", border: "border-brand-purple/30" },
|
|
74
|
-
"
|
|
76
|
+
"membership": { tint: "bg-brand-rose/10", text: "text-brand-rose", border: "border-brand-rose/30" },
|
|
77
|
+
"licensing": { tint: "bg-brand-orange/10", text: "text-brand-orange", border: "border-brand-orange/30" },
|
|
75
78
|
"claims": { tint: "bg-brand-orange/10", text: "text-brand-orange", border: "border-brand-orange/30" },
|
|
76
79
|
"coming-soon": DEFAULT_SLICE
|
|
77
80
|
};
|
|
@@ -91,7 +94,6 @@ const SERVICE_HUES = {
|
|
|
91
94
|
const GROUP_TITLE_BY_KEY = Object.fromEntries(
|
|
92
95
|
import_launchpad_services.LAUNCHPAD_SERVICE_GROUPS.map((g) => [g.key, g.title])
|
|
93
96
|
);
|
|
94
|
-
const GROUP_KEYS = new Set(import_launchpad_services.LAUNCHPAD_SERVICE_GROUPS.map((g) => g.key));
|
|
95
97
|
function LaunchpadServiceCard({ def, override = {}, index = 0 }) {
|
|
96
98
|
const { icon: Icon, title, group, features, cta } = def;
|
|
97
99
|
const status = override.status ?? def.status;
|
|
@@ -161,83 +163,68 @@ function serviceMatchesQuery(def, query) {
|
|
|
161
163
|
const haystack = `${def.title} ${def.blurb} ${def.subtitle} ${GROUP_TITLE_BY_KEY[def.group] ?? ""}`.toLowerCase();
|
|
162
164
|
return haystack.includes(query.trim().toLowerCase());
|
|
163
165
|
}
|
|
164
|
-
function syncFilterUrl(query
|
|
166
|
+
function syncFilterUrl(query) {
|
|
165
167
|
if (typeof window === "undefined") return;
|
|
166
168
|
const params = new URLSearchParams(window.location.search);
|
|
167
169
|
if (query.trim()) params.set("q", query.trim());
|
|
168
170
|
else params.delete("q");
|
|
169
|
-
if (groups.size > 0) params.set("groups", [...groups].join(","));
|
|
170
|
-
else params.delete("groups");
|
|
171
171
|
const qs = params.toString();
|
|
172
172
|
window.history.replaceState(null, "", qs ? `${window.location.pathname}?${qs}` : window.location.pathname);
|
|
173
173
|
}
|
|
174
174
|
function useLaunchpadFilter() {
|
|
175
175
|
const [query, setQueryState] = (0, import_react.useState)("");
|
|
176
|
-
const [activeGroups, setActiveGroups] = (0, import_react.useState)(/* @__PURE__ */ new Set());
|
|
177
176
|
(0, import_react.useEffect)(() => {
|
|
178
|
-
const
|
|
179
|
-
const q = params.get("q");
|
|
177
|
+
const q = new URLSearchParams(window.location.search).get("q");
|
|
180
178
|
if (q) setQueryState(q);
|
|
181
|
-
const g = params.get("groups");
|
|
182
|
-
if (g) {
|
|
183
|
-
const groups = g.split(",").filter((k) => GROUP_KEYS.has(k));
|
|
184
|
-
if (groups.length > 0) setActiveGroups(new Set(groups));
|
|
185
|
-
}
|
|
186
179
|
}, []);
|
|
187
|
-
const filterableGroups = import_launchpad_services.LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== "coming-soon");
|
|
188
180
|
const setQuery = (value) => {
|
|
189
181
|
setQueryState(value);
|
|
190
|
-
syncFilterUrl(value
|
|
191
|
-
};
|
|
192
|
-
const toggleGroup = (key) => {
|
|
193
|
-
setActiveGroups((prev) => {
|
|
194
|
-
const next = new Set(prev);
|
|
195
|
-
if (next.has(key)) next.delete(key);
|
|
196
|
-
else next.add(key);
|
|
197
|
-
syncFilterUrl(query, next);
|
|
198
|
-
return next;
|
|
199
|
-
});
|
|
182
|
+
syncFilterUrl(value);
|
|
200
183
|
};
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
() => import_launchpad_services.LAUNCHPAD_SERVICE_DEFINITIONS.filter(matches).length,
|
|
208
|
-
[query, activeGroups]
|
|
184
|
+
const clear = () => setQuery("");
|
|
185
|
+
return { query, setQuery, clear };
|
|
186
|
+
}
|
|
187
|
+
function selectLaunchpadServices({ query, hideGroups = [], excludeKeys = [] }) {
|
|
188
|
+
return import_launchpad_services.LAUNCHPAD_SERVICE_DEFINITIONS.filter(
|
|
189
|
+
(d) => !excludeKeys.includes(d.key) && !hideGroups.includes(d.group) && (d.group === "coming-soon" || d.status === "live") && serviceMatchesQuery(d, query)
|
|
209
190
|
);
|
|
210
|
-
const clear = () => {
|
|
211
|
-
setQueryState("");
|
|
212
|
-
setActiveGroups(/* @__PURE__ */ new Set());
|
|
213
|
-
syncFilterUrl("", /* @__PURE__ */ new Set());
|
|
214
|
-
};
|
|
215
|
-
return { query, setQuery, activeGroups, toggleGroup, filterableGroups, totalMatches, clear };
|
|
216
191
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
const liveDefs = import_launchpad_services.LAUNCHPAD_SERVICE_DEFINITIONS.filter((d) => d.group !== "coming-soon" && d.status === "live" && notExcluded(d) && inActiveGroup(d) && inSearch(d)).sort((a, b) => (groupOrder[a.group] ?? 99) - (groupOrder[b.group] ?? 99));
|
|
192
|
+
function launchpadSectionId(group) {
|
|
193
|
+
return `launchpad-${group}`;
|
|
194
|
+
}
|
|
195
|
+
function LaunchpadGroupedSections({ overrides, defs, onClearFilters, className }) {
|
|
196
|
+
const sections = import_launchpad_services.LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== "coming-soon").map((group) => ({ group, defs: defs.filter((d) => d.group === group.key) })).filter((s) => s.defs.length > 0);
|
|
223
197
|
const comingSoonGroup = import_launchpad_services.LAUNCHPAD_SERVICE_GROUPS.find((g) => g.key === "coming-soon");
|
|
224
|
-
const comingSoonDefs =
|
|
225
|
-
|
|
226
|
-
);
|
|
227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("space-y-8", className), children: liveDefs.length === 0 && comingSoonDefs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center py-16 space-y-3", children: [
|
|
198
|
+
const comingSoonDefs = defs.filter((d) => d.group === "coming-soon");
|
|
199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("space-y-12 sm:space-y-16", className), children: sections.length === 0 && comingSoonDefs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center py-16 space-y-3", children: [
|
|
228
200
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-lg font-semibold", children: "No services match" }),
|
|
229
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "Try a different search or clear your
|
|
201
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "Try a different search or clear your search." }),
|
|
230
202
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
231
203
|
"button",
|
|
232
204
|
{
|
|
233
205
|
type: "button",
|
|
234
206
|
onClick: onClearFilters,
|
|
235
207
|
className: "inline-flex items-center h-9 px-4 rounded-full text-sm font-semibold bg-primary text-primary-foreground",
|
|
236
|
-
children: "Clear
|
|
208
|
+
children: "Clear search"
|
|
237
209
|
}
|
|
238
210
|
)
|
|
239
211
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
240
|
-
|
|
212
|
+
sections.map(({ group, defs: groupDefs }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
213
|
+
"section",
|
|
214
|
+
{
|
|
215
|
+
id: launchpadSectionId(group.key),
|
|
216
|
+
"aria-labelledby": `${launchpadSectionId(group.key)}-title`,
|
|
217
|
+
className: "scroll-mt-20 space-y-5",
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1", children: [
|
|
220
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { id: `${launchpadSectionId(group.key)}-title`, className: "text-2xl sm:text-3xl font-semibold leading-tight", children: group.title }),
|
|
221
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm sm:text-base text-muted-foreground", children: group.tagline })
|
|
222
|
+
] }),
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.div, { layout: true, className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-5 sm:gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { mode: "popLayout", children: groupDefs.map((def, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LaunchpadServiceCard, { def, override: overrides[def.key], index: i }, def.key)) }) })
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
group.key
|
|
227
|
+
)),
|
|
241
228
|
comingSoonGroup && comingSoonDefs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComingSoonStrip, { group: comingSoonGroup, defs: comingSoonDefs })
|
|
242
229
|
] }) });
|
|
243
230
|
}
|
|
@@ -248,6 +235,8 @@ function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilte
|
|
|
248
235
|
LaunchpadGroupedSections,
|
|
249
236
|
LaunchpadServiceCard,
|
|
250
237
|
SERVICE_HUES,
|
|
238
|
+
launchpadSectionId,
|
|
239
|
+
selectLaunchpadServices,
|
|
251
240
|
serviceMatchesQuery,
|
|
252
241
|
useLaunchpadFilter
|
|
253
242
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/launchpad-services.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useMemo, useState } from \"react\";\nimport Link from \"./link.js\";\nimport { AnimatePresence, motion, useReducedMotion } from \"framer-motion\";\nimport { Lock, ArrowRight, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport {\n LAUNCHPAD_SERVICE_DEFINITIONS,\n LAUNCHPAD_SERVICE_GROUPS,\n type ServiceDefinition,\n type ServiceGroup,\n type ServiceGroupDefinition,\n type ServiceStatus,\n} from \"../data/launchpad-services.js\";\n\nexport interface ServiceOverride {\n\n href?: string;\n\n browseHref?: string;\n\n status?: ServiceStatus;\n\n blurb?: string;\n\n meta?: string;\n}\n\nexport type ServiceOverrides = Record<string, ServiceOverride>;\n\nexport const LAUNCHPAD_ROUTE_OVERRIDES: ServiceOverrides = {\n \"nfts\": { href: \"/launchpad/single-editions\" },\n \"create-collection\": { href: \"/launchpad/single-editions/collection\" },\n \"limited-editions\": { href: \"/launchpad/nfteditions\" },\n \"create-1155\": { href: \"/launchpad/nfteditions/create\" },\n \"remix-asset\": { href: \"/launchpad/remix\" },\n \"pop-protocol\": { href: \"/launchpad/pop\" },\n \"collection-drop\": { href: \"/launchpad/drop\" },\n \"creator-coins\": { href: \"/launchpad/coin/create\" },\n \"claim-memecoin\": { href: \"/launchpad/memecoin\" },\n \"claim-username\": { href: \"/claim/username\" },\n \"claim-collection\": { href: \"/claim/collection\" },\n \"claim-collection-name\": { href: \"/claim/collection-name\" },\n \"ip-tickets\": { href: \"/launchpad/tickets\" },\n \"ip-club\": { href: \"/launchpad/club\" },\n \"ip-sponsorship\": { href: \"/launchpad/sponsorship\" },\n};\n\ninterface GroupSlice {\n\n tint: string;\n\n text: string;\n\n border: string;\n}\n\nconst DEFAULT_SLICE: GroupSlice = {\n tint: \"bg-muted/60\",\n text: \"text-muted-foreground/60\",\n border: \"border-border/60\",\n};\n\nexport const GROUP_SLICES: Record<ServiceGroup, GroupSlice> = {\n \"nfts\": { tint: \"bg-brand-blue/10\", text: \"text-brand-blue\", border: \"border-brand-blue/30\" },\n \"limited-editions\": { tint: \"bg-brand-maeve/10\", text: \"text-brand-maeve\", border: \"border-brand-maeve/30\" },\n \"coins\": { tint: \"bg-brand-purple/10\", text: \"text-brand-purple\", border: \"border-brand-purple/30\" },\n \"community\": { tint: \"bg-brand-rose/10\", text: \"text-brand-rose\", border: \"border-brand-rose/30\" },\n \"claims\": { tint: \"bg-brand-orange/10\", text: \"text-brand-orange\", border: \"border-brand-orange/30\" },\n \"coming-soon\": DEFAULT_SLICE,\n};\n\ninterface ServiceHue {\n text: string;\n solid: string;\n border: string;\n tint: string;\n}\n\nexport const SERVICE_HUES: Record<string, ServiceHue> = {\n \"nfts\": { text: \"text-brand-blue\", solid: \"bg-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n \"limited-editions\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"creator-coins\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"claim-memecoin\": { text: \"text-brand-orange\", solid: \"bg-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n \"collection-drop\": { text: \"text-brand-purple\", solid: \"bg-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n \"pop-protocol\": { text: \"text-brand-rose\", solid: \"bg-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n \"ip-tickets\": { text: \"text-brand-orange\", solid: \"bg-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n \"remix-asset\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"claim-username\": { text: \"text-brand-purple\", solid: \"bg-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n \"claim-collection\": { text: \"text-brand-blue\", solid: \"bg-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n \"claim-collection-name\": { text: \"text-brand-rose\", solid: \"bg-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n};\n\nconst GROUP_TITLE_BY_KEY = Object.fromEntries(\n LAUNCHPAD_SERVICE_GROUPS.map((g) => [g.key, g.title]),\n) as Record<ServiceGroup, string>;\n\nconst GROUP_KEYS = new Set(LAUNCHPAD_SERVICE_GROUPS.map((g) => g.key));\n\nexport interface LaunchpadServiceCardProps {\n def: ServiceDefinition;\n override?: ServiceOverride;\n\n index?: number;\n}\n\nexport function LaunchpadServiceCard({ def, override = {}, index = 0 }: LaunchpadServiceCardProps) {\n const { icon: Icon, title, group, features, cta } = def;\n const status = override.status ?? def.status;\n const blurb = override.blurb ?? def.blurb;\n const { href } = override;\n const reduceMotion = useReducedMotion();\n\n const live = status === \"live\";\n const slice = GROUP_SLICES[group] ?? DEFAULT_SLICE;\n\n const body = (\n <>\n\n <div className=\"flex items-start justify-between gap-3\">\n <span className={cn(\"flex h-14 w-14 items-center justify-center rounded-2xl\", live ? slice.tint : \"bg-muted/40\")}>\n <Icon className={cn(\"h-7 w-7\", live ? slice.text : \"text-muted-foreground/50\")} />\n </span>\n {!live ? (\n <span className=\"flex items-center gap-1 text-2xs font-medium text-muted-foreground/60 pt-1\">\n <Lock className=\"h-3 w-3\" />\n Coming soon\n </span>\n ) : override.meta ? (\n <span className=\"text-xs font-semibold tabular-nums px-2.5 py-1 rounded-full bg-muted/50 text-foreground/80\">\n {override.meta}\n </span>\n ) : null}\n </div>\n\n <div className=\"mt-auto space-y-2 pt-6\">\n <h3 className=\"text-2xl font-bold tracking-tight leading-tight\">{title}</h3>\n <p className={cn(\"text-sm leading-relaxed\", live ? \"text-muted-foreground\" : \"text-muted-foreground/60\")}>\n {blurb}\n </p>\n </div>\n\n {live && features.length > 0 && (\n <ul className=\"space-y-1.5 pt-4\">\n {features.slice(0, 3).map((feature) => (\n <li key={feature} className=\"flex items-start gap-2 text-xs text-muted-foreground leading-relaxed\">\n <Check className={cn(\"h-3.5 w-3.5 shrink-0 mt-px\", slice.text)} />\n {feature}\n </li>\n ))}\n </ul>\n )}\n\n {live && (\n <div className=\"pt-5\">\n <span className=\"inline-flex items-center gap-1.5 text-sm font-semibold\">\n {cta}\n <ArrowRight className=\"h-4 w-4 transition-transform duration-200 sm:group-hover:translate-x-0.5 motion-reduce:transform-none\" />\n </span>\n </div>\n )}\n </>\n );\n\n return (\n <motion.div\n layout={!reduceMotion}\n initial={{ opacity: 0, y: reduceMotion ? 0 : 16 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\n whileTap={live ? { scale: 0.97 } : undefined}\n transition={{ duration: 0.35, delay: index * 0.04, ease: [0.25, 0.46, 0.45, 0.94] }}\n className=\"flex\"\n >\n {live && href ? (\n <Link\n href={href}\n className={cn(\n \"group flex flex-1 flex-col rounded-3xl border bg-card p-6 sm:aspect-[4/5]\",\n \"ml-grad-hover-border\",\n slice.border,\n )}\n >\n {body}\n </Link>\n ) : (\n <div className=\"flex flex-1 flex-col rounded-3xl border border-border/30 bg-card p-6 sm:aspect-[4/5] opacity-75\">\n {body}\n </div>\n )}\n </motion.div>\n );\n}\n\nfunction ComingSoonStrip({ group, defs }: { group: ServiceGroupDefinition; defs: ServiceDefinition[] }) {\n return (\n <div className=\"rounded-2xl border border-border/40 p-5\">\n <p className=\"font-semibold text-sm\">{group.title}</p>\n <p className=\"text-sm text-muted-foreground mt-0.5\">{group.tagline}</p>\n <div className=\"flex flex-wrap gap-2 mt-4\">\n {defs.map(({ key, icon: Icon, title }) => (\n <div key={key} className=\"flex items-center gap-2 px-3 py-2 rounded-full bg-muted/30 border border-border/25\">\n <Icon className=\"h-3.5 w-3.5 text-muted-foreground/60\" />\n <span className=\"text-xs font-medium text-muted-foreground\">{title}</span>\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nexport function serviceMatchesQuery(def: ServiceDefinition, query: string): boolean {\n if (query.trim() === \"\") return true;\n const haystack = `${def.title} ${def.blurb} ${def.subtitle} ${GROUP_TITLE_BY_KEY[def.group] ?? \"\"}`.toLowerCase();\n return haystack.includes(query.trim().toLowerCase());\n}\n\nfunction syncFilterUrl(query: string, groups: Set<ServiceGroup>) {\n if (typeof window === \"undefined\") return;\n const params = new URLSearchParams(window.location.search);\n if (query.trim()) params.set(\"q\", query.trim());\n else params.delete(\"q\");\n if (groups.size > 0) params.set(\"groups\", [...groups].join(\",\"));\n else params.delete(\"groups\");\n const qs = params.toString();\n window.history.replaceState(null, \"\", qs ? `${window.location.pathname}?${qs}` : window.location.pathname);\n}\n\nexport function useLaunchpadFilter() {\n const [query, setQueryState] = useState(\"\");\n const [activeGroups, setActiveGroups] = useState<Set<ServiceGroup>>(new Set());\n\n useEffect(() => {\n const params = new URLSearchParams(window.location.search);\n const q = params.get(\"q\");\n if (q) setQueryState(q);\n const g = params.get(\"groups\");\n if (g) {\n const groups = g.split(\",\").filter((k): k is ServiceGroup => GROUP_KEYS.has(k as ServiceGroup));\n if (groups.length > 0) setActiveGroups(new Set(groups));\n }\n }, []);\n\n const filterableGroups = LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== \"coming-soon\");\n\n const setQuery = (value: string) => {\n setQueryState(value);\n syncFilterUrl(value, activeGroups);\n };\n\n const toggleGroup = (key: ServiceGroup) => {\n setActiveGroups((prev) => {\n const next = new Set(prev);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n syncFilterUrl(query, next);\n return next;\n });\n };\n\n const matches = (def: ServiceDefinition): boolean => {\n if (activeGroups.size > 0 && !activeGroups.has(def.group)) return false;\n if (def.status !== \"live\") return false;\n return serviceMatchesQuery(def, query);\n };\n\n const totalMatches = useMemo(\n () => LAUNCHPAD_SERVICE_DEFINITIONS.filter(matches).length,\n\n [query, activeGroups],\n );\n\n const clear = () => {\n setQueryState(\"\");\n setActiveGroups(new Set());\n syncFilterUrl(\"\", new Set());\n };\n\n return { query, setQuery, activeGroups, toggleGroup, filterableGroups, totalMatches, clear };\n}\n\nexport interface LaunchpadGroupedSectionsProps {\n\n overrides: ServiceOverrides;\n\n query: string;\n\n activeGroups: Set<ServiceGroup>;\n\n onClearFilters: () => void;\n className?: string;\n\n excludeKeys?: string[];\n}\n\nexport function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilters, className, excludeKeys }: LaunchpadGroupedSectionsProps) {\n const inActiveGroup = (d: ServiceDefinition) => activeGroups.size === 0 || activeGroups.has(d.group);\n const inSearch = (d: ServiceDefinition) => serviceMatchesQuery(d, query);\n const notExcluded = (d: ServiceDefinition) => !excludeKeys?.includes(d.key);\n\n const groupOrder = Object.fromEntries(LAUNCHPAD_SERVICE_GROUPS.map((g, i) => [g.key, i]));\n\n const liveDefs = LAUNCHPAD_SERVICE_DEFINITIONS\n .filter((d) => d.group !== \"coming-soon\" && d.status === \"live\" && notExcluded(d) && inActiveGroup(d) && inSearch(d))\n .sort((a, b) => (groupOrder[a.group] ?? 99) - (groupOrder[b.group] ?? 99));\n\n const comingSoonGroup = LAUNCHPAD_SERVICE_GROUPS.find((g) => g.key === \"coming-soon\");\n const comingSoonDefs = LAUNCHPAD_SERVICE_DEFINITIONS.filter(\n (d) => d.group === \"coming-soon\" && notExcluded(d) && inActiveGroup(d) && inSearch(d),\n );\n\n return (\n <div className={cn(\"space-y-8\", className)}>\n {liveDefs.length === 0 && comingSoonDefs.length === 0 ? (\n <div className=\"text-center py-16 space-y-3\">\n <p className=\"text-lg font-semibold\">No services match</p>\n <p className=\"text-sm text-muted-foreground\">Try a different search or clear your filters.</p>\n <button\n type=\"button\"\n onClick={onClearFilters}\n className=\"inline-flex items-center h-9 px-4 rounded-full text-sm font-semibold bg-primary text-primary-foreground\"\n >\n Clear filters\n </button>\n </div>\n ) : (\n <>\n <motion.div layout className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-5 sm:gap-6\">\n <AnimatePresence mode=\"popLayout\">\n {liveDefs.map((def, i) => (\n <LaunchpadServiceCard key={def.key} def={def} override={overrides[def.key]} index={i} />\n ))}\n </AnimatePresence>\n </motion.div>\n {comingSoonGroup && comingSoonDefs.length > 0 && (\n <ComingSoonStrip group={comingSoonGroup} defs={comingSoonDefs} />\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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KAAK,OAAO,WAAW,EAAE,KAAK,KAAK,GAAG;AAE3E,QAAM,kBAAkB,mDAAyB,KAAK,CAAC,MAAM,EAAE,QAAQ,aAAa;AACpF,QAAM,iBAAiB,wDAA8B;AAAA,IACnD,CAAC,MAAM,EAAE,UAAU,iBAAiB,YAAY,CAAC,KAAK,cAAc,CAAC,KAAK,SAAS,CAAC;AAAA,EACtF;AAEA,SACE,4CAAC,SAAI,eAAW,cAAG,aAAa,SAAS,GACtC,mBAAS,WAAW,KAAK,eAAe,WAAW,IAClD,6CAAC,SAAI,WAAU,+BACb;AAAA,gDAAC,OAAE,WAAU,yBAAwB,+BAAiB;AAAA,IACtD,4CAAC,OAAE,WAAU,iCAAgC,2DAA6C;AAAA,IAC1F;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,WAAU;AAAA,QACX;AAAA;AAAA,IAED;AAAA,KACF,IAEA,4EACE;AAAA,gDAAC,4BAAO,KAAP,EAAW,QAAM,MAAC,WAAU,gFAC3B,sDAAC,wCAAgB,MAAK,aACnB,mBAAS,IAAI,CAAC,KAAK,MAClB,4CAAC,wBAAmC,KAAU,UAAU,UAAU,IAAI,GAAG,GAAG,OAAO,KAAxD,IAAI,GAAuD,CACvF,GACH,GACF;AAAA,IACC,mBAAmB,eAAe,SAAS,KAC1C,4CAAC,mBAAgB,OAAO,iBAAiB,MAAM,gBAAgB;AAAA,KAEnE,GAEJ;AAEJ;","names":["Link"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/launchpad-services.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport Link from \"./link.js\";\nimport { AnimatePresence, motion, useReducedMotion } from \"framer-motion\";\nimport { Lock, ArrowRight, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport {\n LAUNCHPAD_SERVICE_DEFINITIONS,\n LAUNCHPAD_SERVICE_GROUPS,\n type ServiceDefinition,\n type ServiceGroup,\n type ServiceGroupDefinition,\n type ServiceStatus,\n} from \"../data/launchpad-services.js\";\n\nexport interface ServiceOverride {\n\n href?: string;\n\n browseHref?: string;\n\n status?: ServiceStatus;\n\n blurb?: string;\n\n meta?: string;\n}\n\nexport type ServiceOverrides = Record<string, ServiceOverride>;\n\nexport const LAUNCHPAD_ROUTE_OVERRIDES: ServiceOverrides = {\n \"nfts\": { href: \"/launchpad/single-editions\" },\n \"create-collection\": { href: \"/launchpad/single-editions/collection\" },\n \"limited-editions\": { href: \"/launchpad/nfteditions\" },\n \"create-1155\": { href: \"/launchpad/nfteditions/create\" },\n \"remix-asset\": { href: \"/launchpad/remix\" },\n \"pop-protocol\": { href: \"/launchpad/pop\" },\n \"collection-drop\": { href: \"/launchpad/drop\" },\n \"creator-coins\": { href: \"/launchpad/coin/create\" },\n \"claim-memecoin\": { href: \"/launchpad/memecoin\" },\n \"claim-username\": { href: \"/claim/username\" },\n \"claim-collection\": { href: \"/claim/collection\" },\n \"claim-collection-name\": { href: \"/claim/collection-name\" },\n \"ip-tickets\": { href: \"/launchpad/tickets\" },\n \"ip-club\": { href: \"/launchpad/club\" },\n \"ip-sponsorship\": { href: \"/launchpad/sponsorship\" },\n};\n\ninterface GroupSlice {\n\n tint: string;\n\n text: string;\n\n border: string;\n}\n\nconst DEFAULT_SLICE: GroupSlice = {\n tint: \"bg-muted/60\",\n text: \"text-muted-foreground/60\",\n border: \"border-border/60\",\n};\n\nexport const GROUP_SLICES: Record<ServiceGroup, GroupSlice> = {\n \"single-nfts\": { tint: \"bg-brand-blue/10\", text: \"text-brand-blue\", border: \"border-brand-blue/30\" },\n \"limited-editions\": { tint: \"bg-brand-maeve/10\", text: \"text-brand-maeve\", border: \"border-brand-maeve/30\" },\n \"coins\": { tint: \"bg-brand-purple/10\", text: \"text-brand-purple\", border: \"border-brand-purple/30\" },\n \"membership\": { tint: \"bg-brand-rose/10\", text: \"text-brand-rose\", border: \"border-brand-rose/30\" },\n \"licensing\": { tint: \"bg-brand-orange/10\", text: \"text-brand-orange\", border: \"border-brand-orange/30\" },\n \"claims\": { tint: \"bg-brand-orange/10\", text: \"text-brand-orange\", border: \"border-brand-orange/30\" },\n \"coming-soon\": DEFAULT_SLICE,\n};\n\ninterface ServiceHue {\n text: string;\n solid: string;\n border: string;\n tint: string;\n}\n\nexport const SERVICE_HUES: Record<string, ServiceHue> = {\n \"nfts\": { text: \"text-brand-blue\", solid: \"bg-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n \"limited-editions\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"creator-coins\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"claim-memecoin\": { text: \"text-brand-orange\", solid: \"bg-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n \"collection-drop\": { text: \"text-brand-purple\", solid: \"bg-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n \"pop-protocol\": { text: \"text-brand-rose\", solid: \"bg-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n \"ip-tickets\": { text: \"text-brand-orange\", solid: \"bg-brand-orange\", border: \"border-brand-orange/30\", tint: \"bg-brand-orange/10\" },\n \"remix-asset\": { text: \"text-brand-maeve\", solid: \"bg-brand-maeve\", border: \"border-brand-maeve/30\", tint: \"bg-brand-maeve/10\" },\n \"claim-username\": { text: \"text-brand-purple\", solid: \"bg-brand-purple\", border: \"border-brand-purple/30\", tint: \"bg-brand-purple/10\" },\n \"claim-collection\": { text: \"text-brand-blue\", solid: \"bg-brand-blue\", border: \"border-brand-blue/30\", tint: \"bg-brand-blue/10\" },\n \"claim-collection-name\": { text: \"text-brand-rose\", solid: \"bg-brand-rose\", border: \"border-brand-rose/30\", tint: \"bg-brand-rose/10\" },\n};\n\nconst GROUP_TITLE_BY_KEY = Object.fromEntries(\n LAUNCHPAD_SERVICE_GROUPS.map((g) => [g.key, g.title]),\n) as Record<ServiceGroup, string>;\n\nexport interface LaunchpadServiceCardProps {\n def: ServiceDefinition;\n override?: ServiceOverride;\n\n index?: number;\n}\n\nexport function LaunchpadServiceCard({ def, override = {}, index = 0 }: LaunchpadServiceCardProps) {\n const { icon: Icon, title, group, features, cta } = def;\n const status = override.status ?? def.status;\n const blurb = override.blurb ?? def.blurb;\n const { href } = override;\n const reduceMotion = useReducedMotion();\n\n const live = status === \"live\";\n const slice = GROUP_SLICES[group] ?? DEFAULT_SLICE;\n\n const body = (\n <>\n\n <div className=\"flex items-start justify-between gap-3\">\n <span className={cn(\"flex h-14 w-14 items-center justify-center rounded-2xl\", live ? slice.tint : \"bg-muted/40\")}>\n <Icon className={cn(\"h-7 w-7\", live ? slice.text : \"text-muted-foreground/50\")} />\n </span>\n {!live ? (\n <span className=\"flex items-center gap-1 text-2xs font-medium text-muted-foreground/60 pt-1\">\n <Lock className=\"h-3 w-3\" />\n Coming soon\n </span>\n ) : override.meta ? (\n <span className=\"text-xs font-semibold tabular-nums px-2.5 py-1 rounded-full bg-muted/50 text-foreground/80\">\n {override.meta}\n </span>\n ) : null}\n </div>\n\n <div className=\"mt-auto space-y-2 pt-6\">\n <h3 className=\"text-2xl font-bold tracking-tight leading-tight\">{title}</h3>\n <p className={cn(\"text-sm leading-relaxed\", live ? \"text-muted-foreground\" : \"text-muted-foreground/60\")}>\n {blurb}\n </p>\n </div>\n\n {live && features.length > 0 && (\n <ul className=\"space-y-1.5 pt-4\">\n {features.slice(0, 3).map((feature) => (\n <li key={feature} className=\"flex items-start gap-2 text-xs text-muted-foreground leading-relaxed\">\n <Check className={cn(\"h-3.5 w-3.5 shrink-0 mt-px\", slice.text)} />\n {feature}\n </li>\n ))}\n </ul>\n )}\n\n {live && (\n <div className=\"pt-5\">\n <span className=\"inline-flex items-center gap-1.5 text-sm font-semibold\">\n {cta}\n <ArrowRight className=\"h-4 w-4 transition-transform duration-200 sm:group-hover:translate-x-0.5 motion-reduce:transform-none\" />\n </span>\n </div>\n )}\n </>\n );\n\n return (\n <motion.div\n layout={!reduceMotion}\n initial={{ opacity: 0, y: reduceMotion ? 0 : 16 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\n whileTap={live ? { scale: 0.97 } : undefined}\n transition={{ duration: 0.35, delay: index * 0.04, ease: [0.25, 0.46, 0.45, 0.94] }}\n className=\"flex\"\n >\n {live && href ? (\n <Link\n href={href}\n className={cn(\n \"group flex flex-1 flex-col rounded-3xl border bg-card p-6 sm:aspect-[4/5]\",\n \"ml-grad-hover-border\",\n slice.border,\n )}\n >\n {body}\n </Link>\n ) : (\n <div className=\"flex flex-1 flex-col rounded-3xl border border-border/30 bg-card p-6 sm:aspect-[4/5] opacity-75\">\n {body}\n </div>\n )}\n </motion.div>\n );\n}\n\nfunction ComingSoonStrip({ group, defs }: { group: ServiceGroupDefinition; defs: ServiceDefinition[] }) {\n return (\n <div className=\"rounded-2xl border border-border/40 p-5\">\n <p className=\"font-semibold text-sm\">{group.title}</p>\n <p className=\"text-sm text-muted-foreground mt-0.5\">{group.tagline}</p>\n <div className=\"flex flex-wrap gap-2 mt-4\">\n {defs.map(({ key, icon: Icon, title }) => (\n <div key={key} className=\"flex items-center gap-2 px-3 py-2 rounded-full bg-muted/30 border border-border/25\">\n <Icon className=\"h-3.5 w-3.5 text-muted-foreground/60\" />\n <span className=\"text-xs font-medium text-muted-foreground\">{title}</span>\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nexport function serviceMatchesQuery(def: ServiceDefinition, query: string): boolean {\n if (query.trim() === \"\") return true;\n const haystack = `${def.title} ${def.blurb} ${def.subtitle} ${GROUP_TITLE_BY_KEY[def.group] ?? \"\"}`.toLowerCase();\n return haystack.includes(query.trim().toLowerCase());\n}\n\nfunction syncFilterUrl(query: string) {\n if (typeof window === \"undefined\") return;\n const params = new URLSearchParams(window.location.search);\n if (query.trim()) params.set(\"q\", query.trim());\n else params.delete(\"q\");\n const qs = params.toString();\n window.history.replaceState(null, \"\", qs ? `${window.location.pathname}?${qs}` : window.location.pathname);\n}\n\nexport function useLaunchpadFilter() {\n const [query, setQueryState] = useState(\"\");\n\n useEffect(() => {\n const q = new URLSearchParams(window.location.search).get(\"q\");\n if (q) setQueryState(q);\n }, []);\n\n const setQuery = (value: string) => {\n setQueryState(value);\n syncFilterUrl(value);\n };\n\n const clear = () => setQuery(\"\");\n\n return { query, setQuery, clear };\n}\n\nexport interface LaunchpadServiceSelection {\n query: string;\n hideGroups?: string[];\n excludeKeys?: string[];\n}\n\nexport function selectLaunchpadServices({ query, hideGroups = [], excludeKeys = [] }: LaunchpadServiceSelection): ServiceDefinition[] {\n return LAUNCHPAD_SERVICE_DEFINITIONS.filter(\n (d) =>\n !excludeKeys.includes(d.key) &&\n !hideGroups.includes(d.group) &&\n (d.group === \"coming-soon\" || d.status === \"live\") &&\n serviceMatchesQuery(d, query),\n );\n}\n\nexport interface LaunchpadGroupedSectionsProps {\n\n overrides: ServiceOverrides;\n\n defs: ServiceDefinition[];\n\n onClearFilters: () => void;\n className?: string;\n}\n\nexport function launchpadSectionId(group: ServiceGroup): string {\n return `launchpad-${group}`;\n}\n\nexport function LaunchpadGroupedSections({ overrides, defs, onClearFilters, className }: LaunchpadGroupedSectionsProps) {\n const sections = LAUNCHPAD_SERVICE_GROUPS\n .filter((g) => g.key !== \"coming-soon\")\n .map((group) => ({ group, defs: defs.filter((d) => d.group === group.key) }))\n .filter((s) => s.defs.length > 0);\n\n const comingSoonGroup = LAUNCHPAD_SERVICE_GROUPS.find((g) => g.key === \"coming-soon\");\n const comingSoonDefs = defs.filter((d) => d.group === \"coming-soon\");\n\n return (\n <div className={cn(\"space-y-12 sm:space-y-16\", className)}>\n {sections.length === 0 && comingSoonDefs.length === 0 ? (\n <div className=\"text-center py-16 space-y-3\">\n <p className=\"text-lg font-semibold\">No services match</p>\n <p className=\"text-sm text-muted-foreground\">Try a different search or clear your search.</p>\n <button\n type=\"button\"\n onClick={onClearFilters}\n className=\"inline-flex items-center h-9 px-4 rounded-full text-sm font-semibold bg-primary text-primary-foreground\"\n >\n Clear search\n </button>\n </div>\n ) : (\n <>\n {sections.map(({ group, defs: groupDefs }) => (\n <section\n key={group.key}\n id={launchpadSectionId(group.key)}\n aria-labelledby={`${launchpadSectionId(group.key)}-title`}\n className=\"scroll-mt-20 space-y-5\"\n >\n <div className=\"space-y-1\">\n <h2 id={`${launchpadSectionId(group.key)}-title`} className=\"text-2xl sm:text-3xl font-semibold leading-tight\">\n {group.title}\n </h2>\n <p className=\"text-sm sm:text-base text-muted-foreground\">{group.tagline}</p>\n </div>\n <motion.div layout className=\"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-5 sm:gap-6\">\n <AnimatePresence mode=\"popLayout\">\n {groupDefs.map((def, i) => (\n <LaunchpadServiceCard key={def.key} def={def} override={overrides[def.key]} index={i} />\n ))}\n </AnimatePresence>\n </motion.div>\n </section>\n ))}\n {comingSoonGroup && comingSoonDefs.length > 0 && (\n <ComingSoonStrip group={comingSoonGroup} defs={comingSoonDefs} />\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqHI;AAnHJ,mBAAoC;AACpC,kBAAiB;AACjB,2BAA0D;AAC1D,0BAAwC;AACxC,gBAAmB;AACnB,gCAOO;AAiBA,MAAM,4BAA8C;AAAA,EACzD,QAAQ,EAAE,MAAM,6BAA6B;AAAA,EAC7C,qBAAqB,EAAE,MAAM,wCAAwC;AAAA,EACrE,oBAAoB,EAAE,MAAM,yBAAyB;AAAA,EACrD,eAAe,EAAE,MAAM,gCAAgC;AAAA,EACvD,eAAe,EAAE,MAAM,mBAAmB;AAAA,EAC1C,gBAAgB,EAAE,MAAM,iBAAiB;A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AE,WAAU,iCAAgC,0DAA4C;AAAA,IACzF;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,WAAU;AAAA,QACX;AAAA;AAAA,IAED;AAAA,KACF,IAEA,4EACG;AAAA,aAAS,IAAI,CAAC,EAAE,OAAO,MAAM,UAAU,MACtC;AAAA,MAAC;AAAA;AAAA,QAEC,IAAI,mBAAmB,MAAM,GAAG;AAAA,QAChC,mBAAiB,GAAG,mBAAmB,MAAM,GAAG,CAAC;AAAA,QACjD,WAAU;AAAA,QAEV;AAAA,uDAAC,SAAI,WAAU,aACb;AAAA,wDAAC,QAAG,IAAI,GAAG,mBAAmB,MAAM,GAAG,CAAC,UAAU,WAAU,oDACzD,gBAAM,OACT;AAAA,YACA,4CAAC,OAAE,WAAU,8CAA8C,gBAAM,SAAQ;AAAA,aAC3E;AAAA,UACA,4CAAC,4BAAO,KAAP,EAAW,QAAM,MAAC,WAAU,gFAC3B,sDAAC,wCAAgB,MAAK,aACnB,oBAAU,IAAI,CAAC,KAAK,MACnB,4CAAC,wBAAmC,KAAU,UAAU,UAAU,IAAI,GAAG,GAAG,OAAO,KAAxD,IAAI,GAAuD,CACvF,GACH,GACF;AAAA;AAAA;AAAA,MAjBK,MAAM;AAAA,IAkBb,CACD;AAAA,IACA,mBAAmB,eAAe,SAAS,KAC1C,4CAAC,mBAAgB,OAAO,iBAAiB,MAAM,gBAAgB;AAAA,KAEnE,GAEJ;AAEJ;","names":["Link"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ServiceStatus,
|
|
2
|
+
import { ServiceStatus, ServiceDefinition, ServiceGroup } from '../data/launchpad-services.cjs';
|
|
3
3
|
import 'lucide-react';
|
|
4
4
|
|
|
5
5
|
interface ServiceOverride {
|
|
@@ -34,20 +34,21 @@ declare function serviceMatchesQuery(def: ServiceDefinition, query: string): boo
|
|
|
34
34
|
declare function useLaunchpadFilter(): {
|
|
35
35
|
query: string;
|
|
36
36
|
setQuery: (value: string) => void;
|
|
37
|
-
activeGroups: Set<ServiceGroup>;
|
|
38
|
-
toggleGroup: (key: ServiceGroup) => void;
|
|
39
|
-
filterableGroups: ServiceGroupDefinition[];
|
|
40
|
-
totalMatches: number;
|
|
41
37
|
clear: () => void;
|
|
42
38
|
};
|
|
39
|
+
interface LaunchpadServiceSelection {
|
|
40
|
+
query: string;
|
|
41
|
+
hideGroups?: string[];
|
|
42
|
+
excludeKeys?: string[];
|
|
43
|
+
}
|
|
44
|
+
declare function selectLaunchpadServices({ query, hideGroups, excludeKeys }: LaunchpadServiceSelection): ServiceDefinition[];
|
|
43
45
|
interface LaunchpadGroupedSectionsProps {
|
|
44
46
|
overrides: ServiceOverrides;
|
|
45
|
-
|
|
46
|
-
activeGroups: Set<ServiceGroup>;
|
|
47
|
+
defs: ServiceDefinition[];
|
|
47
48
|
onClearFilters: () => void;
|
|
48
49
|
className?: string;
|
|
49
|
-
excludeKeys?: string[];
|
|
50
50
|
}
|
|
51
|
-
declare function
|
|
51
|
+
declare function launchpadSectionId(group: ServiceGroup): string;
|
|
52
|
+
declare function LaunchpadGroupedSections({ overrides, defs, onClearFilters, className }: LaunchpadGroupedSectionsProps): react_jsx_runtime.JSX.Element;
|
|
52
53
|
|
|
53
|
-
export { GROUP_SLICES, LAUNCHPAD_ROUTE_OVERRIDES, LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, serviceMatchesQuery, useLaunchpadFilter };
|
|
54
|
+
export { GROUP_SLICES, LAUNCHPAD_ROUTE_OVERRIDES, LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, type LaunchpadServiceSelection, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, launchpadSectionId, selectLaunchpadServices, serviceMatchesQuery, useLaunchpadFilter };
|