@medialane/ui 0.65.1 → 0.67.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/launchpad-filter-bar.cjs +28 -5
- package/dist/components/launchpad-filter-bar.cjs.map +1 -1
- package/dist/components/launchpad-filter-bar.d.cts +5 -4
- package/dist/components/launchpad-filter-bar.d.ts +5 -4
- package/dist/components/launchpad-filter-bar.js +30 -5
- package/dist/components/launchpad-filter-bar.js.map +1 -1
- package/dist/components/launchpad-services.cjs +101 -152
- package/dist/components/launchpad-services.cjs.map +1 -1
- package/dist/components/launchpad-services.d.cts +23 -14
- package/dist/components/launchpad-services.d.ts +23 -14
- package/dist/components/launchpad-services.js +102 -155
- package/dist/components/launchpad-services.js.map +1 -1
- package/dist/components/launchpad-strip.cjs +5 -5
- package/dist/components/launchpad-strip.cjs.map +1 -1
- package/dist/components/launchpad-strip.js +5 -5
- package/dist/components/launchpad-strip.js.map +1 -1
- package/dist/components/nav-command-menu.cjs +1 -37
- package/dist/components/nav-command-menu.cjs.map +1 -1
- package/dist/components/nav-command-menu.js +1 -37
- package/dist/components/nav-command-menu.js.map +1 -1
- package/dist/data/launchpad-services.cjs +45 -84
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.d.cts +2 -2
- package/dist/data/launchpad-services.d.ts +2 -2
- package/dist/data/launchpad-services.js +45 -85
- package/dist/data/launchpad-services.js.map +1 -1
- package/package.json +1 -1
|
@@ -48,24 +48,6 @@ function useNavCommandMenu() {
|
|
|
48
48
|
close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE))
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
const RECENT_KEY = "ml.nav.recent";
|
|
52
|
-
const RECENT_MAX = 3;
|
|
53
|
-
function readRecents() {
|
|
54
|
-
try {
|
|
55
|
-
const raw = localStorage.getItem(RECENT_KEY);
|
|
56
|
-
const ids = raw ? JSON.parse(raw) : [];
|
|
57
|
-
return Array.isArray(ids) ? ids.filter((x) => typeof x === "string") : [];
|
|
58
|
-
} catch {
|
|
59
|
-
return [];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function pushRecent(id) {
|
|
63
|
-
try {
|
|
64
|
-
const next = [id, ...readRecents().filter((x) => x !== id)].slice(0, RECENT_MAX);
|
|
65
|
-
localStorage.setItem(RECENT_KEY, JSON.stringify(next));
|
|
66
|
-
} catch {
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
51
|
function Kbd({ children, className }) {
|
|
70
52
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
53
|
"kbd",
|
|
@@ -141,13 +123,11 @@ const GROUP_HEADING_CLASSES = (0, import_cn.cn)(
|
|
|
141
123
|
function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
142
124
|
const [open, setOpen] = React.useState(false);
|
|
143
125
|
const [query, setQuery] = React.useState("");
|
|
144
|
-
const [recentIds, setRecentIds] = React.useState([]);
|
|
145
126
|
const router = (0, import_navigation.useRouter)();
|
|
146
127
|
const inputRef = React.useRef(null);
|
|
147
128
|
React.useEffect(() => {
|
|
148
129
|
if (!open) return;
|
|
149
130
|
setQuery("");
|
|
150
|
-
setRecentIds(readRecents());
|
|
151
131
|
const t = setTimeout(() => inputRef.current?.focus(), 60);
|
|
152
132
|
return () => clearTimeout(t);
|
|
153
133
|
}, [open]);
|
|
@@ -172,19 +152,12 @@ function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
|
172
152
|
}, []);
|
|
173
153
|
const runCommand = React.useCallback(
|
|
174
154
|
(cmd) => {
|
|
175
|
-
pushRecent(cmd.id);
|
|
176
155
|
setOpen(false);
|
|
177
156
|
if (cmd.href) router.push(cmd.href);
|
|
178
157
|
else cmd.action?.();
|
|
179
158
|
},
|
|
180
159
|
[router]
|
|
181
160
|
);
|
|
182
|
-
const recentItems = React.useMemo(() => {
|
|
183
|
-
if (recentIds.length === 0) return [];
|
|
184
|
-
const all = new Map(commands.flatMap((g) => g.items.map((it) => [it.id, it])));
|
|
185
|
-
return recentIds.map((id) => all.get(id)).filter((it) => Boolean(it));
|
|
186
|
-
}, [recentIds, commands]);
|
|
187
|
-
const showRecents = query === "" && recentItems.length > 0;
|
|
188
161
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
189
162
|
trigger,
|
|
190
163
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: open && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
@@ -251,19 +224,10 @@ function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
|
251
224
|
] }),
|
|
252
225
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_cmdk.Command.List, { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain p-2", children: [
|
|
253
226
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cmdk.Command.Empty, { className: "py-8 text-center text-sm text-muted-foreground", children: "No results found." }),
|
|
254
|
-
showRecents && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cmdk.Command.Group, { heading: "Recent", className: GROUP_HEADING_CLASSES, children: recentItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
255
|
-
CommandRow,
|
|
256
|
-
{
|
|
257
|
-
item,
|
|
258
|
-
primary: false,
|
|
259
|
-
onSelect: () => runCommand(item)
|
|
260
|
-
},
|
|
261
|
-
`recent-${item.id}`
|
|
262
|
-
)) }),
|
|
263
227
|
commands.map((group, i) => {
|
|
264
228
|
const primary = !group.heading;
|
|
265
229
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(React.Fragment, { children: [
|
|
266
|
-
|
|
230
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cmdk.Command.Separator, { className: "my-1.5 h-px bg-border/40" }),
|
|
267
231
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cmdk.Command.Group, { heading: group.heading, className: GROUP_HEADING_CLASSES, children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
268
232
|
CommandRow,
|
|
269
233
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/nav-command-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Command } from \"cmdk\";\nimport { useRouter } from \"next/navigation\";\nimport { Search, X, ArrowRight } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface NavCommand {\n id: string;\n label: string;\n icon: React.ComponentType<{ className?: string }>;\n href?: string;\n action?: () => void;\n /** Extra search terms beyond the label */\n keywords?: string[];\n /** Optional one-line description shown under the label */\n description?: string;\n}\n\nexport interface NavCommandGroup {\n /**\n * Optional group heading. Omit it for the primary group so its items\n * read as the top-level menu — they render first, emphasized, with no\n * label, separated from the headed groups below.\n */\n heading?: string;\n items: NavCommand[];\n}\n\nexport interface NavCommandMenuProps {\n commands: NavCommandGroup[];\n /**\n * Optional trigger element rendered inline at the component's mount point.\n * For most apps, omit this and call `useNavCommandMenu().open()` from a\n * separate button — that keeps the trigger in the right place in the layout.\n */\n trigger?: React.ReactNode;\n /**\n * Optional pinned account/connect area rendered below command results.\n * Apps own the auth implementation here (Clerk, ChipiPay, wallet connectors,\n * Privy, Cartridge, etc.) so the shared nav stays framework-agnostic.\n */\n accountSlot?: React.ReactNode;\n /**\n * Optional control rendered in the footer row (e.g. a theme toggle).\n * Apps own theme state (next-themes etc.) so the shared nav stays\n * framework-agnostic — same pattern as `accountSlot`.\n */\n footerSlot?: React.ReactNode;\n}\n\n// ── Singleton hook ─────────────────────────────────────────────────────────────\n\nconst ML_NAV_OPEN = \"ml:nav-open\";\nconst ML_NAV_CLOSE = \"ml:nav-close\";\n\nexport function useNavCommandMenu() {\n return {\n open: () => document.dispatchEvent(new CustomEvent(ML_NAV_OPEN)),\n close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE)),\n };\n}\n\n// ── Recents (localStorage) ─────────────────────────────────────────────────────\n\nconst RECENT_KEY = \"ml.nav.recent\";\nconst RECENT_MAX = 3;\n\nfunction readRecents(): string[] {\n try {\n const raw = localStorage.getItem(RECENT_KEY);\n const ids = raw ? (JSON.parse(raw) as unknown) : [];\n return Array.isArray(ids) ? ids.filter((x): x is string => typeof x === \"string\") : [];\n } catch {\n return [];\n }\n}\n\nfunction pushRecent(id: string) {\n try {\n const next = [id, ...readRecents().filter((x) => x !== id)].slice(0, RECENT_MAX);\n localStorage.setItem(RECENT_KEY, JSON.stringify(next));\n } catch {\n /* storage unavailable — recents are a nicety, never an error */\n }\n}\n\n// ── Small primitives ──────────────────────────────────────────────────────────\n\nfunction Kbd({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <kbd\n className={cn(\n \"inline-flex min-w-[18px] items-center justify-center rounded-md bg-muted/60 px-1.5 py-0.5\",\n \"font-sans text-[10px] leading-none text-muted-foreground\",\n className\n )}\n >\n {children}\n </kbd>\n );\n}\n\nfunction CommandRow({ item, primary, onSelect }: { item: NavCommand; primary: boolean; onSelect: () => void }) {\n return (\n <Command.Item\n value={[item.label, ...(item.keywords ?? [])].join(\" \")}\n onSelect={onSelect}\n className={cn(\n \"group/item flex cursor-pointer items-center gap-3 rounded-xl\",\n \"transition-colors duration-150 aria-selected:bg-primary/10\",\n primary ? \"px-2.5 py-2.5\" : \"px-2.5 py-2\"\n )}\n >\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg transition-colors\",\n \"bg-muted/50 group-aria-selected/item:bg-primary/15\",\n primary ? \"h-9 w-9\" : \"h-8 w-8\"\n )}\n >\n <item.icon\n className={cn(\n \"text-foreground/80 transition-colors group-aria-selected/item:text-primary\",\n primary ? \"h-[18px] w-[18px]\" : \"h-4 w-4\"\n )}\n />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span\n className={cn(\n \"block truncate leading-tight\",\n primary ? \"text-[15px] font-medium\" : \"text-sm\"\n )}\n >\n {item.label}\n </span>\n {item.description && (\n <span className=\"mt-0.5 block truncate text-[11.5px] leading-tight text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n <ArrowRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground/30 transition-colors group-aria-selected/item:text-primary/70\" />\n </Command.Item>\n );\n}\n\nconst GROUP_HEADING_CLASSES = cn(\n \"[&_[cmdk-group-heading]]:px-2.5\",\n \"[&_[cmdk-group-heading]]:pt-2\",\n \"[&_[cmdk-group-heading]]:pb-1\",\n \"[&_[cmdk-group-heading]]:text-[10.5px]\",\n \"[&_[cmdk-group-heading]]:font-semibold\",\n \"[&_[cmdk-group-heading]]:uppercase\",\n \"[&_[cmdk-group-heading]]:tracking-[0.08em]\",\n \"[&_[cmdk-group-heading]]:text-muted-foreground/60\"\n);\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }: NavCommandMenuProps) {\n const [open, setOpen] = React.useState(false);\n const [query, setQuery] = React.useState(\"\");\n const [recentIds, setRecentIds] = React.useState<string[]>([]);\n const router = useRouter();\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n React.useEffect(() => {\n if (!open) return;\n setQuery(\"\");\n setRecentIds(readRecents());\n const t = setTimeout(() => inputRef.current?.focus(), 60);\n return () => clearTimeout(t);\n }, [open]);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((prev) => !prev);\n }\n if (e.key === \"Escape\") setOpen(false);\n };\n const onOpen = () => setOpen(true);\n const onClose = () => setOpen(false);\n\n document.addEventListener(\"keydown\", onKey);\n document.addEventListener(ML_NAV_OPEN, onOpen);\n document.addEventListener(ML_NAV_CLOSE, onClose);\n return () => {\n document.removeEventListener(\"keydown\", onKey);\n document.removeEventListener(ML_NAV_OPEN, onOpen);\n document.removeEventListener(ML_NAV_CLOSE, onClose);\n };\n }, []);\n\n const runCommand = React.useCallback(\n (cmd: NavCommand) => {\n pushRecent(cmd.id);\n setOpen(false);\n if (cmd.href) router.push(cmd.href);\n else cmd.action?.();\n },\n [router]\n );\n\n // Recents only render while the query is empty (search results replace them).\n const recentItems = React.useMemo(() => {\n if (recentIds.length === 0) return [];\n const all = new Map(commands.flatMap((g) => g.items.map((it) => [it.id, it] as const)));\n return recentIds.map((id) => all.get(id)).filter((it): it is NavCommand => Boolean(it));\n }, [recentIds, commands]);\n const showRecents = query === \"\" && recentItems.length > 0;\n\n return (\n <>\n {trigger}\n\n <AnimatePresence>\n {open && (\n <>\n {/* Backdrop blur */}\n <motion.div\n className=\"nav-canvas-overlay\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.15 }}\n onClick={() => setOpen(false)}\n />\n\n {/* Command panel — centered on desktop, bottom sheet on mobile */}\n <motion.div\n className=\"fixed inset-0 z-[101] flex items-end justify-center p-3 pb-4 sm:items-center sm:p-4\"\n initial={{ opacity: 0, y: 24, scale: 1 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: 24 }}\n transition={{ duration: 0.18, ease: \"easeOut\" }}\n onClick={() => setOpen(false)}\n >\n <div\n className={cn(\n \"flex w-full max-h-[85dvh] flex-col overflow-hidden rounded-[20px] sm:max-h-[min(680px,88dvh)] sm:max-w-[620px]\",\n \"border border-border/40 bg-background/90 shadow-2xl backdrop-blur-2xl backdrop-saturate-150\"\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Command shouldFilter label=\"Medialane navigation\" className=\"flex min-h-0 flex-1 flex-col\">\n {/* Drag handle (mobile) */}\n <div className=\"flex justify-center pt-2.5 sm:hidden\" aria-hidden=\"true\">\n <span className=\"h-1 w-9 rounded-full bg-muted-foreground/30\" />\n </div>\n\n {/* Search bar */}\n <div className=\"flex items-center gap-3 border-b border-border/40 px-4 py-3.5\">\n <Search\n className={cn(\n \"h-[18px] w-[18px] shrink-0 transition-colors\",\n query ? \"text-primary\" : \"text-muted-foreground\"\n )}\n />\n <Command.Input\n ref={inputRef}\n value={query}\n onValueChange={setQuery}\n placeholder=\"Search or run a command…\"\n className=\"flex-1 bg-transparent text-[15px] outline-none placeholder:text-muted-foreground\"\n />\n <Kbd className=\"hidden sm:inline-flex\">esc</Kbd>\n <button\n onClick={() => setOpen(false)}\n className=\"rounded-md p-1 transition-colors hover:bg-muted/50 sm:hidden\"\n aria-label=\"Close\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n\n {/* Results */}\n <Command.List className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain p-2\">\n <Command.Empty className=\"py-8 text-center text-sm text-muted-foreground\">\n No results found.\n </Command.Empty>\n\n {showRecents && (\n <Command.Group heading=\"Recent\" className={GROUP_HEADING_CLASSES}>\n {recentItems.map((item) => (\n <CommandRow\n key={`recent-${item.id}`}\n item={item}\n primary={false}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n )}\n\n {commands.map((group, i) => {\n const primary = !group.heading;\n return (\n <React.Fragment key={group.heading ?? `__primary-${i}`}>\n {(i > 0 || showRecents) && (\n <Command.Separator className=\"my-1.5 h-px bg-border/40\" />\n )}\n <Command.Group heading={group.heading} className={GROUP_HEADING_CLASSES}>\n {group.items.map((item) => (\n <CommandRow\n key={item.id}\n item={item}\n primary={primary}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n </React.Fragment>\n );\n })}\n </Command.List>\n\n {accountSlot && (\n <div className=\"border-t border-border/40 bg-muted/20 px-3 py-3\">\n {accountSlot}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-3 border-t border-border/40 bg-muted/20 px-3 py-2\">\n <div className=\"flex items-center gap-3\">\n {footerSlot}\n <span className=\"hidden items-center gap-3 text-[10.5px] text-muted-foreground/70 sm:flex\">\n <span className=\"flex items-center gap-1\"><Kbd>↑</Kbd><Kbd>↓</Kbd> Navigate</span>\n <span className=\"flex items-center gap-1\"><Kbd>↵</Kbd> Open</span>\n </span>\n </div>\n <span className=\"flex shrink-0 items-center gap-2 text-[10px] text-muted-foreground/50\">\n medialane\n <Kbd className=\"hidden sm:inline-flex\">⌘K</Kbd>\n </span>\n </div>\n </Command>\n </div>\n </motion.div>\n </>\n )}\n </AnimatePresence>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+FI;AA7FJ,YAAuB;AACvB,kBAAwB;AACxB,wBAA0B;AAC1B,0BAAsC;AACtC,2BAAwC;AACxC,gBAAmB;AAkDnB,MAAM,cAAe;AACrB,MAAM,eAAe;AAEd,SAAS,oBAAoB;AAClC,SAAO;AAAA,IACL,MAAO,MAAM,SAAS,cAAc,IAAI,YAAY,WAAW,CAAC;AAAA,IAChE,OAAO,MAAM,SAAS,cAAc,IAAI,YAAY,YAAY,CAAC;AAAA,EACnE;AACF;AAIA,MAAM,aAAa;AACnB,MAAM,aAAa;AAEnB,SAAS,cAAwB;AAC/B,MAAI;AACF,UAAM,MAAM,aAAa,QAAQ,UAAU;AAC3C,UAAM,MAAM,MAAO,KAAK,MAAM,GAAG,IAAgB,CAAC;AAClD,WAAO,MAAM,QAAQ,GAAG,IAAI,IAAI,OAAO,CAAC,MAAmB,OAAO,MAAM,QAAQ,IAAI,CAAC;AAAA,EACvF,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAEA,SAAS,WAAW,IAAY;AAC9B,MAAI;AACF,UAAM,OAAO,CAAC,IAAI,GAAG,YAAY,EAAE,OAAO,CAAC,MAAM,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU;AAC/E,iBAAa,QAAQ,YAAY,KAAK,UAA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CAAC,SAChB;AAAA,wBAAC;AAAA;AAAA,0BAEC;AAAA,0BACA;AAAA,0BACA,UAAU,MAAM,WAAW,IAAI;AAAA;AAAA,wBAH1B,KAAK;AAAA,sBAIZ,CACD,GACH;AAAA,yBAbmB,MAAM,WAAW,aAAa,CAAC,EAcpD;AAAA,kBAEF,CAAC;AAAA,mBACH;AAAA,gBAEC,eACC,4CAAC,SAAI,WAAU,mDACZ,uBACH;AAAA,gBAIF,6CAAC,SAAI,WAAU,2FACb;AAAA,+DAAC,SAAI,WAAU,2BACZ;AAAA;AAAA,oBACD,6CAAC,UAAK,WAAU,4EACd;AAAA,mEAAC,UAAK,WAAU,2BAA0B;AAAA,oEAAC,OAAI,oBAAC;AAAA,wBAAM,4CAAC,OAAI,oBAAC;AAAA,wBAAM;AAAA,yBAAS;AAAA,sBAC3E,6CAAC,UAAK,WAAU,2BAA0B;AAAA,oEAAC,OAAI,oBAAC;AAAA,wBAAM;AAAA,yBAAK;AAAA,uBAC7D;AAAA,qBACF;AAAA,kBACA,6CAAC,UAAK,WAAU,yEAAwE;AAAA;AAAA,oBAEtF,4CAAC,OAAI,WAAU,yBAAwB,qBAAE;AAAA,qBAC3C;AAAA,mBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,OACF,GAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/nav-command-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Command } from \"cmdk\";\nimport { useRouter } from \"next/navigation\";\nimport { Search, X, ArrowRight } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface NavCommand {\n id: string;\n label: string;\n icon: React.ComponentType<{ className?: string }>;\n href?: string;\n action?: () => void;\n /** Extra search terms beyond the label */\n keywords?: string[];\n /** Optional one-line description shown under the label */\n description?: string;\n}\n\nexport interface NavCommandGroup {\n /**\n * Optional group heading. Omit it for the primary group so its items\n * read as the top-level menu — they render first, emphasized, with no\n * label, separated from the headed groups below.\n */\n heading?: string;\n items: NavCommand[];\n}\n\nexport interface NavCommandMenuProps {\n commands: NavCommandGroup[];\n /**\n * Optional trigger element rendered inline at the component's mount point.\n * For most apps, omit this and call `useNavCommandMenu().open()` from a\n * separate button — that keeps the trigger in the right place in the layout.\n */\n trigger?: React.ReactNode;\n /**\n * Optional pinned account/connect area rendered below command results.\n * Apps own the auth implementation here (Clerk, ChipiPay, wallet connectors,\n * Privy, Cartridge, etc.) so the shared nav stays framework-agnostic.\n */\n accountSlot?: React.ReactNode;\n /**\n * Optional control rendered in the footer row (e.g. a theme toggle).\n * Apps own theme state (next-themes etc.) so the shared nav stays\n * framework-agnostic — same pattern as `accountSlot`.\n */\n footerSlot?: React.ReactNode;\n}\n\n// ── Singleton hook ─────────────────────────────────────────────────────────────\n\nconst ML_NAV_OPEN = \"ml:nav-open\";\nconst ML_NAV_CLOSE = \"ml:nav-close\";\n\nexport function useNavCommandMenu() {\n return {\n open: () => document.dispatchEvent(new CustomEvent(ML_NAV_OPEN)),\n close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE)),\n };\n}\n\n// ── Small primitives ──────────────────────────────────────────────────────────\n\nfunction Kbd({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <kbd\n className={cn(\n \"inline-flex min-w-[18px] items-center justify-center rounded-md bg-muted/60 px-1.5 py-0.5\",\n \"font-sans text-[10px] leading-none text-muted-foreground\",\n className\n )}\n >\n {children}\n </kbd>\n );\n}\n\nfunction CommandRow({ item, primary, onSelect }: { item: NavCommand; primary: boolean; onSelect: () => void }) {\n return (\n <Command.Item\n value={[item.label, ...(item.keywords ?? [])].join(\" \")}\n onSelect={onSelect}\n className={cn(\n \"group/item flex cursor-pointer items-center gap-3 rounded-xl\",\n \"transition-colors duration-150 aria-selected:bg-primary/10\",\n primary ? \"px-2.5 py-2.5\" : \"px-2.5 py-2\"\n )}\n >\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg transition-colors\",\n \"bg-muted/50 group-aria-selected/item:bg-primary/15\",\n primary ? \"h-9 w-9\" : \"h-8 w-8\"\n )}\n >\n <item.icon\n className={cn(\n \"text-foreground/80 transition-colors group-aria-selected/item:text-primary\",\n primary ? \"h-[18px] w-[18px]\" : \"h-4 w-4\"\n )}\n />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span\n className={cn(\n \"block truncate leading-tight\",\n primary ? \"text-[15px] font-medium\" : \"text-sm\"\n )}\n >\n {item.label}\n </span>\n {item.description && (\n <span className=\"mt-0.5 block truncate text-[11.5px] leading-tight text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n <ArrowRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground/30 transition-colors group-aria-selected/item:text-primary/70\" />\n </Command.Item>\n );\n}\n\nconst GROUP_HEADING_CLASSES = cn(\n \"[&_[cmdk-group-heading]]:px-2.5\",\n \"[&_[cmdk-group-heading]]:pt-2\",\n \"[&_[cmdk-group-heading]]:pb-1\",\n \"[&_[cmdk-group-heading]]:text-[10.5px]\",\n \"[&_[cmdk-group-heading]]:font-semibold\",\n \"[&_[cmdk-group-heading]]:uppercase\",\n \"[&_[cmdk-group-heading]]:tracking-[0.08em]\",\n \"[&_[cmdk-group-heading]]:text-muted-foreground/60\"\n);\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }: NavCommandMenuProps) {\n const [open, setOpen] = React.useState(false);\n const [query, setQuery] = React.useState(\"\");\n const router = useRouter();\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n React.useEffect(() => {\n if (!open) return;\n setQuery(\"\");\n const t = setTimeout(() => inputRef.current?.focus(), 60);\n return () => clearTimeout(t);\n }, [open]);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((prev) => !prev);\n }\n if (e.key === \"Escape\") setOpen(false);\n };\n const onOpen = () => setOpen(true);\n const onClose = () => setOpen(false);\n\n document.addEventListener(\"keydown\", onKey);\n document.addEventListener(ML_NAV_OPEN, onOpen);\n document.addEventListener(ML_NAV_CLOSE, onClose);\n return () => {\n document.removeEventListener(\"keydown\", onKey);\n document.removeEventListener(ML_NAV_OPEN, onOpen);\n document.removeEventListener(ML_NAV_CLOSE, onClose);\n };\n }, []);\n\n const runCommand = React.useCallback(\n (cmd: NavCommand) => {\n setOpen(false);\n if (cmd.href) router.push(cmd.href);\n else cmd.action?.();\n },\n [router]\n );\n\n return (\n <>\n {trigger}\n\n <AnimatePresence>\n {open && (\n <>\n {/* Backdrop blur */}\n <motion.div\n className=\"nav-canvas-overlay\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.15 }}\n onClick={() => setOpen(false)}\n />\n\n {/* Command panel — centered on desktop, bottom sheet on mobile */}\n <motion.div\n className=\"fixed inset-0 z-[101] flex items-end justify-center p-3 pb-4 sm:items-center sm:p-4\"\n initial={{ opacity: 0, y: 24, scale: 1 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: 24 }}\n transition={{ duration: 0.18, ease: \"easeOut\" }}\n onClick={() => setOpen(false)}\n >\n <div\n className={cn(\n \"flex w-full max-h-[85dvh] flex-col overflow-hidden rounded-[20px] sm:max-h-[min(680px,88dvh)] sm:max-w-[620px]\",\n \"border border-border/40 bg-background/90 shadow-2xl backdrop-blur-2xl backdrop-saturate-150\"\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Command shouldFilter label=\"Medialane navigation\" className=\"flex min-h-0 flex-1 flex-col\">\n {/* Drag handle (mobile) */}\n <div className=\"flex justify-center pt-2.5 sm:hidden\" aria-hidden=\"true\">\n <span className=\"h-1 w-9 rounded-full bg-muted-foreground/30\" />\n </div>\n\n {/* Search bar */}\n <div className=\"flex items-center gap-3 border-b border-border/40 px-4 py-3.5\">\n <Search\n className={cn(\n \"h-[18px] w-[18px] shrink-0 transition-colors\",\n query ? \"text-primary\" : \"text-muted-foreground\"\n )}\n />\n <Command.Input\n ref={inputRef}\n value={query}\n onValueChange={setQuery}\n placeholder=\"Search or run a command…\"\n className=\"flex-1 bg-transparent text-[15px] outline-none placeholder:text-muted-foreground\"\n />\n <Kbd className=\"hidden sm:inline-flex\">esc</Kbd>\n <button\n onClick={() => setOpen(false)}\n className=\"rounded-md p-1 transition-colors hover:bg-muted/50 sm:hidden\"\n aria-label=\"Close\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n\n {/* Results */}\n <Command.List className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain p-2\">\n <Command.Empty className=\"py-8 text-center text-sm text-muted-foreground\">\n No results found.\n </Command.Empty>\n\n {commands.map((group, i) => {\n const primary = !group.heading;\n return (\n <React.Fragment key={group.heading ?? `__primary-${i}`}>\n {i > 0 && (\n <Command.Separator className=\"my-1.5 h-px bg-border/40\" />\n )}\n <Command.Group heading={group.heading} className={GROUP_HEADING_CLASSES}>\n {group.items.map((item) => (\n <CommandRow\n key={item.id}\n item={item}\n primary={primary}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n </React.Fragment>\n );\n })}\n </Command.List>\n\n {accountSlot && (\n <div className=\"border-t border-border/40 bg-muted/20 px-3 py-3\">\n {accountSlot}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-3 border-t border-border/40 bg-muted/20 px-3 py-2\">\n <div className=\"flex items-center gap-3\">\n {footerSlot}\n <span className=\"hidden items-center gap-3 text-[10.5px] text-muted-foreground/70 sm:flex\">\n <span className=\"flex items-center gap-1\"><Kbd>↑</Kbd><Kbd>↓</Kbd> Navigate</span>\n <span className=\"flex items-center gap-1\"><Kbd>↵</Kbd> Open</span>\n </span>\n </div>\n <span className=\"flex shrink-0 items-center gap-2 text-[10px] text-muted-foreground/50\">\n medialane\n <Kbd className=\"hidden sm:inline-flex\">⌘K</Kbd>\n </span>\n </div>\n </Command>\n </div>\n </motion.div>\n </>\n )}\n </AnimatePresence>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuEI;AArEJ,YAAuB;AACvB,kBAAwB;AACxB,wBAA0B;AAC1B,0BAAsC;AACtC,2BAAwC;AACxC,gBAAmB;AAkDnB,MAAM,cAAe;AACrB,MAAM,eAAe;AAEd,SAAS,oBAAoB;AAClC,SAAO;AAAA,IACL,MAAO,MAAM,SAAS,cAAc,IAAI,YAAY,WAAW,CAAC;AAAA,IAChE,OAAO,MAAM,SAAS,cAAc,IAAI,YAAY,YAAY,CAAC;AAAA,EACnE;AACF;AAIA,SAAS,IAAI,EAAE,UAAU,UAAU,GAAsD;AACvF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,WAAW,EAAE,MAAM,SAAS,SAAS,GAAiE;AAC7G,SACE;AAAA,IAAC,oBAAQ;AAAA,IAAR;AAAA,MACC,OAAO,CAAC,KAAK,OAAO,GAAI,KAAK,YAAY,CAAC,CAAE,EAAE,KAAK,GAAG;AAAA,MACtD;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,kBAAkB;AAAA,MAC9B;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,UAAU,YAAY;AAAA,YACxB;AAAA,YAEA;AAAA,cAAC,KAAK;AAAA,cAAL;AAAA,gBACC,eAAW;AAAA,kBACT;AAAA,kBACA,UAAU,sBAAsB;AAAA,gBAClC;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA,QACA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,6CAAC,SAAI,WAAU,2FACb;AAAA,+DAAC,SAAI,WAAU,2BACZ;AAAA;AAAA,oBACD,6CAAC,UAAK,WAAU,4EACd;AAAA,mEAAC,UAAK,WAAU,2BAA0B;AAAA,oEAAC,OAAI,oBAAC;AAAA,wBAAM,4CAAC,OAAI,oBAAC;AAAA,wBAAM;AAAA,yBAAS;AAAA,sBAC3E,6CAAC,UAAK,WAAU,2BAA0B;AAAA,oEAAC,OAAI,oBAAC;AAAA,wBAAM;AAAA,yBAAK;AAAA,uBAC7D;AAAA,qBACF;AAAA,kBACA,6CAAC,UAAK,WAAU,yEAAwE;AAAA;AAAA,oBAEtF,4CAAC,OAAI,WAAU,yBAAwB,qBAAE;AAAA,qBAC3C;AAAA,mBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,OACF,GAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -14,24 +14,6 @@ function useNavCommandMenu() {
|
|
|
14
14
|
close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE))
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const RECENT_KEY = "ml.nav.recent";
|
|
18
|
-
const RECENT_MAX = 3;
|
|
19
|
-
function readRecents() {
|
|
20
|
-
try {
|
|
21
|
-
const raw = localStorage.getItem(RECENT_KEY);
|
|
22
|
-
const ids = raw ? JSON.parse(raw) : [];
|
|
23
|
-
return Array.isArray(ids) ? ids.filter((x) => typeof x === "string") : [];
|
|
24
|
-
} catch {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function pushRecent(id) {
|
|
29
|
-
try {
|
|
30
|
-
const next = [id, ...readRecents().filter((x) => x !== id)].slice(0, RECENT_MAX);
|
|
31
|
-
localStorage.setItem(RECENT_KEY, JSON.stringify(next));
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
17
|
function Kbd({ children, className }) {
|
|
36
18
|
return /* @__PURE__ */ jsx(
|
|
37
19
|
"kbd",
|
|
@@ -107,13 +89,11 @@ const GROUP_HEADING_CLASSES = cn(
|
|
|
107
89
|
function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
108
90
|
const [open, setOpen] = React.useState(false);
|
|
109
91
|
const [query, setQuery] = React.useState("");
|
|
110
|
-
const [recentIds, setRecentIds] = React.useState([]);
|
|
111
92
|
const router = useRouter();
|
|
112
93
|
const inputRef = React.useRef(null);
|
|
113
94
|
React.useEffect(() => {
|
|
114
95
|
if (!open) return;
|
|
115
96
|
setQuery("");
|
|
116
|
-
setRecentIds(readRecents());
|
|
117
97
|
const t = setTimeout(() => inputRef.current?.focus(), 60);
|
|
118
98
|
return () => clearTimeout(t);
|
|
119
99
|
}, [open]);
|
|
@@ -138,19 +118,12 @@ function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
|
138
118
|
}, []);
|
|
139
119
|
const runCommand = React.useCallback(
|
|
140
120
|
(cmd) => {
|
|
141
|
-
pushRecent(cmd.id);
|
|
142
121
|
setOpen(false);
|
|
143
122
|
if (cmd.href) router.push(cmd.href);
|
|
144
123
|
else cmd.action?.();
|
|
145
124
|
},
|
|
146
125
|
[router]
|
|
147
126
|
);
|
|
148
|
-
const recentItems = React.useMemo(() => {
|
|
149
|
-
if (recentIds.length === 0) return [];
|
|
150
|
-
const all = new Map(commands.flatMap((g) => g.items.map((it) => [it.id, it])));
|
|
151
|
-
return recentIds.map((id) => all.get(id)).filter((it) => Boolean(it));
|
|
152
|
-
}, [recentIds, commands]);
|
|
153
|
-
const showRecents = query === "" && recentItems.length > 0;
|
|
154
127
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
155
128
|
trigger,
|
|
156
129
|
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -217,19 +190,10 @@ function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }) {
|
|
|
217
190
|
] }),
|
|
218
191
|
/* @__PURE__ */ jsxs(Command.List, { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain p-2", children: [
|
|
219
192
|
/* @__PURE__ */ jsx(Command.Empty, { className: "py-8 text-center text-sm text-muted-foreground", children: "No results found." }),
|
|
220
|
-
showRecents && /* @__PURE__ */ jsx(Command.Group, { heading: "Recent", className: GROUP_HEADING_CLASSES, children: recentItems.map((item) => /* @__PURE__ */ jsx(
|
|
221
|
-
CommandRow,
|
|
222
|
-
{
|
|
223
|
-
item,
|
|
224
|
-
primary: false,
|
|
225
|
-
onSelect: () => runCommand(item)
|
|
226
|
-
},
|
|
227
|
-
`recent-${item.id}`
|
|
228
|
-
)) }),
|
|
229
193
|
commands.map((group, i) => {
|
|
230
194
|
const primary = !group.heading;
|
|
231
195
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
232
|
-
|
|
196
|
+
i > 0 && /* @__PURE__ */ jsx(Command.Separator, { className: "my-1.5 h-px bg-border/40" }),
|
|
233
197
|
/* @__PURE__ */ jsx(Command.Group, { heading: group.heading, className: GROUP_HEADING_CLASSES, children: group.items.map((item) => /* @__PURE__ */ jsx(
|
|
234
198
|
CommandRow,
|
|
235
199
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/nav-command-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Command } from \"cmdk\";\nimport { useRouter } from \"next/navigation\";\nimport { Search, X, ArrowRight } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface NavCommand {\n id: string;\n label: string;\n icon: React.ComponentType<{ className?: string }>;\n href?: string;\n action?: () => void;\n /** Extra search terms beyond the label */\n keywords?: string[];\n /** Optional one-line description shown under the label */\n description?: string;\n}\n\nexport interface NavCommandGroup {\n /**\n * Optional group heading. Omit it for the primary group so its items\n * read as the top-level menu — they render first, emphasized, with no\n * label, separated from the headed groups below.\n */\n heading?: string;\n items: NavCommand[];\n}\n\nexport interface NavCommandMenuProps {\n commands: NavCommandGroup[];\n /**\n * Optional trigger element rendered inline at the component's mount point.\n * For most apps, omit this and call `useNavCommandMenu().open()` from a\n * separate button — that keeps the trigger in the right place in the layout.\n */\n trigger?: React.ReactNode;\n /**\n * Optional pinned account/connect area rendered below command results.\n * Apps own the auth implementation here (Clerk, ChipiPay, wallet connectors,\n * Privy, Cartridge, etc.) so the shared nav stays framework-agnostic.\n */\n accountSlot?: React.ReactNode;\n /**\n * Optional control rendered in the footer row (e.g. a theme toggle).\n * Apps own theme state (next-themes etc.) so the shared nav stays\n * framework-agnostic — same pattern as `accountSlot`.\n */\n footerSlot?: React.ReactNode;\n}\n\n// ── Singleton hook ─────────────────────────────────────────────────────────────\n\nconst ML_NAV_OPEN = \"ml:nav-open\";\nconst ML_NAV_CLOSE = \"ml:nav-close\";\n\nexport function useNavCommandMenu() {\n return {\n open: () => document.dispatchEvent(new CustomEvent(ML_NAV_OPEN)),\n close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE)),\n };\n}\n\n// ── Recents (localStorage) ─────────────────────────────────────────────────────\n\nconst RECENT_KEY = \"ml.nav.recent\";\nconst RECENT_MAX = 3;\n\nfunction readRecents(): string[] {\n try {\n const raw = localStorage.getItem(RECENT_KEY);\n const ids = raw ? (JSON.parse(raw) as unknown) : [];\n return Array.isArray(ids) ? ids.filter((x): x is string => typeof x === \"string\") : [];\n } catch {\n return [];\n }\n}\n\nfunction pushRecent(id: string) {\n try {\n const next = [id, ...readRecents().filter((x) => x !== id)].slice(0, RECENT_MAX);\n localStorage.setItem(RECENT_KEY, JSON.stringify(next));\n } catch {\n /* storage unavailable — recents are a nicety, never an error */\n }\n}\n\n// ── Small primitives ──────────────────────────────────────────────────────────\n\nfunction Kbd({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <kbd\n className={cn(\n \"inline-flex min-w-[18px] items-center justify-center rounded-md bg-muted/60 px-1.5 py-0.5\",\n \"font-sans text-[10px] leading-none text-muted-foreground\",\n className\n )}\n >\n {children}\n </kbd>\n );\n}\n\nfunction CommandRow({ item, primary, onSelect }: { item: NavCommand; primary: boolean; onSelect: () => void }) {\n return (\n <Command.Item\n value={[item.label, ...(item.keywords ?? [])].join(\" \")}\n onSelect={onSelect}\n className={cn(\n \"group/item flex cursor-pointer items-center gap-3 rounded-xl\",\n \"transition-colors duration-150 aria-selected:bg-primary/10\",\n primary ? \"px-2.5 py-2.5\" : \"px-2.5 py-2\"\n )}\n >\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg transition-colors\",\n \"bg-muted/50 group-aria-selected/item:bg-primary/15\",\n primary ? \"h-9 w-9\" : \"h-8 w-8\"\n )}\n >\n <item.icon\n className={cn(\n \"text-foreground/80 transition-colors group-aria-selected/item:text-primary\",\n primary ? \"h-[18px] w-[18px]\" : \"h-4 w-4\"\n )}\n />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span\n className={cn(\n \"block truncate leading-tight\",\n primary ? \"text-[15px] font-medium\" : \"text-sm\"\n )}\n >\n {item.label}\n </span>\n {item.description && (\n <span className=\"mt-0.5 block truncate text-[11.5px] leading-tight text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n <ArrowRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground/30 transition-colors group-aria-selected/item:text-primary/70\" />\n </Command.Item>\n );\n}\n\nconst GROUP_HEADING_CLASSES = cn(\n \"[&_[cmdk-group-heading]]:px-2.5\",\n \"[&_[cmdk-group-heading]]:pt-2\",\n \"[&_[cmdk-group-heading]]:pb-1\",\n \"[&_[cmdk-group-heading]]:text-[10.5px]\",\n \"[&_[cmdk-group-heading]]:font-semibold\",\n \"[&_[cmdk-group-heading]]:uppercase\",\n \"[&_[cmdk-group-heading]]:tracking-[0.08em]\",\n \"[&_[cmdk-group-heading]]:text-muted-foreground/60\"\n);\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }: NavCommandMenuProps) {\n const [open, setOpen] = React.useState(false);\n const [query, setQuery] = React.useState(\"\");\n const [recentIds, setRecentIds] = React.useState<string[]>([]);\n const router = useRouter();\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n React.useEffect(() => {\n if (!open) return;\n setQuery(\"\");\n setRecentIds(readRecents());\n const t = setTimeout(() => inputRef.current?.focus(), 60);\n return () => clearTimeout(t);\n }, [open]);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((prev) => !prev);\n }\n if (e.key === \"Escape\") setOpen(false);\n };\n const onOpen = () => setOpen(true);\n const onClose = () => setOpen(false);\n\n document.addEventListener(\"keydown\", onKey);\n document.addEventListener(ML_NAV_OPEN, onOpen);\n document.addEventListener(ML_NAV_CLOSE, onClose);\n return () => {\n document.removeEventListener(\"keydown\", onKey);\n document.removeEventListener(ML_NAV_OPEN, onOpen);\n document.removeEventListener(ML_NAV_CLOSE, onClose);\n };\n }, []);\n\n const runCommand = React.useCallback(\n (cmd: NavCommand) => {\n pushRecent(cmd.id);\n setOpen(false);\n if (cmd.href) router.push(cmd.href);\n else cmd.action?.();\n },\n [router]\n );\n\n // Recents only render while the query is empty (search results replace them).\n const recentItems = React.useMemo(() => {\n if (recentIds.length === 0) return [];\n const all = new Map(commands.flatMap((g) => g.items.map((it) => [it.id, it] as const)));\n return recentIds.map((id) => all.get(id)).filter((it): it is NavCommand => Boolean(it));\n }, [recentIds, commands]);\n const showRecents = query === \"\" && recentItems.length > 0;\n\n return (\n <>\n {trigger}\n\n <AnimatePresence>\n {open && (\n <>\n {/* Backdrop blur */}\n <motion.div\n className=\"nav-canvas-overlay\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.15 }}\n onClick={() => setOpen(false)}\n />\n\n {/* Command panel — centered on desktop, bottom sheet on mobile */}\n <motion.div\n className=\"fixed inset-0 z-[101] flex items-end justify-center p-3 pb-4 sm:items-center sm:p-4\"\n initial={{ opacity: 0, y: 24, scale: 1 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: 24 }}\n transition={{ duration: 0.18, ease: \"easeOut\" }}\n onClick={() => setOpen(false)}\n >\n <div\n className={cn(\n \"flex w-full max-h-[85dvh] flex-col overflow-hidden rounded-[20px] sm:max-h-[min(680px,88dvh)] sm:max-w-[620px]\",\n \"border border-border/40 bg-background/90 shadow-2xl backdrop-blur-2xl backdrop-saturate-150\"\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Command shouldFilter label=\"Medialane navigation\" className=\"flex min-h-0 flex-1 flex-col\">\n {/* Drag handle (mobile) */}\n <div className=\"flex justify-center pt-2.5 sm:hidden\" aria-hidden=\"true\">\n <span className=\"h-1 w-9 rounded-full bg-muted-foreground/30\" />\n </div>\n\n {/* Search bar */}\n <div className=\"flex items-center gap-3 border-b border-border/40 px-4 py-3.5\">\n <Search\n className={cn(\n \"h-[18px] w-[18px] shrink-0 transition-colors\",\n query ? \"text-primary\" : \"text-muted-foreground\"\n )}\n />\n <Command.Input\n ref={inputRef}\n value={query}\n onValueChange={setQuery}\n placeholder=\"Search or run a command…\"\n className=\"flex-1 bg-transparent text-[15px] outline-none placeholder:text-muted-foreground\"\n />\n <Kbd className=\"hidden sm:inline-flex\">esc</Kbd>\n <button\n onClick={() => setOpen(false)}\n className=\"rounded-md p-1 transition-colors hover:bg-muted/50 sm:hidden\"\n aria-label=\"Close\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n\n {/* Results */}\n <Command.List className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain p-2\">\n <Command.Empty className=\"py-8 text-center text-sm text-muted-foreground\">\n No results found.\n </Command.Empty>\n\n {showRecents && (\n <Command.Group heading=\"Recent\" className={GROUP_HEADING_CLASSES}>\n {recentItems.map((item) => (\n <CommandRow\n key={`recent-${item.id}`}\n item={item}\n primary={false}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n )}\n\n {commands.map((group, i) => {\n const primary = !group.heading;\n return (\n <React.Fragment key={group.heading ?? `__primary-${i}`}>\n {(i > 0 || showRecents) && (\n <Command.Separator className=\"my-1.5 h-px bg-border/40\" />\n )}\n <Command.Group heading={group.heading} className={GROUP_HEADING_CLASSES}>\n {group.items.map((item) => (\n <CommandRow\n key={item.id}\n item={item}\n primary={primary}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n </React.Fragment>\n );\n })}\n </Command.List>\n\n {accountSlot && (\n <div className=\"border-t border-border/40 bg-muted/20 px-3 py-3\">\n {accountSlot}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-3 border-t border-border/40 bg-muted/20 px-3 py-2\">\n <div className=\"flex items-center gap-3\">\n {footerSlot}\n <span className=\"hidden items-center gap-3 text-[10.5px] text-muted-foreground/70 sm:flex\">\n <span className=\"flex items-center gap-1\"><Kbd>↑</Kbd><Kbd>↓</Kbd> Navigate</span>\n <span className=\"flex items-center gap-1\"><Kbd>↵</Kbd> Open</span>\n </span>\n </div>\n <span className=\"flex shrink-0 items-center gap-2 text-[10px] text-muted-foreground/50\">\n medialane\n <Kbd className=\"hidden sm:inline-flex\">⌘K</Kbd>\n </span>\n </div>\n </Command>\n </div>\n </motion.div>\n </>\n )}\n </AnimatePresence>\n </>\n );\n}\n"],"mappings":";AA+FI,SAkIM,UAlIN,KAqCE,YArCF;AA7FJ,YAAY,WAAW;AACvB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,GAAG,kBAAkB;AACtC,SAAS,iBAAiB,cAAc;AACxC,SAAS,UAAU;AAkDnB,MAAM,cAAe;AACrB,MAAM,eAAe;AAEd,SAAS,oBAAoB;AAClC,SAAO;AAAA,IACL,MAAO,MAAM,SAAS,cAAc,IAAI,YAAY,WA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;AAAA,oBAEtF,oBAAC,OAAI,WAAU,yBAAwB,qBAAE;AAAA,qBAC3C;AAAA,mBACF;AAAA,iBACF;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,OACF,GAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/nav-command-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Command } from \"cmdk\";\nimport { useRouter } from \"next/navigation\";\nimport { Search, X, ArrowRight } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface NavCommand {\n id: string;\n label: string;\n icon: React.ComponentType<{ className?: string }>;\n href?: string;\n action?: () => void;\n /** Extra search terms beyond the label */\n keywords?: string[];\n /** Optional one-line description shown under the label */\n description?: string;\n}\n\nexport interface NavCommandGroup {\n /**\n * Optional group heading. Omit it for the primary group so its items\n * read as the top-level menu — they render first, emphasized, with no\n * label, separated from the headed groups below.\n */\n heading?: string;\n items: NavCommand[];\n}\n\nexport interface NavCommandMenuProps {\n commands: NavCommandGroup[];\n /**\n * Optional trigger element rendered inline at the component's mount point.\n * For most apps, omit this and call `useNavCommandMenu().open()` from a\n * separate button — that keeps the trigger in the right place in the layout.\n */\n trigger?: React.ReactNode;\n /**\n * Optional pinned account/connect area rendered below command results.\n * Apps own the auth implementation here (Clerk, ChipiPay, wallet connectors,\n * Privy, Cartridge, etc.) so the shared nav stays framework-agnostic.\n */\n accountSlot?: React.ReactNode;\n /**\n * Optional control rendered in the footer row (e.g. a theme toggle).\n * Apps own theme state (next-themes etc.) so the shared nav stays\n * framework-agnostic — same pattern as `accountSlot`.\n */\n footerSlot?: React.ReactNode;\n}\n\n// ── Singleton hook ─────────────────────────────────────────────────────────────\n\nconst ML_NAV_OPEN = \"ml:nav-open\";\nconst ML_NAV_CLOSE = \"ml:nav-close\";\n\nexport function useNavCommandMenu() {\n return {\n open: () => document.dispatchEvent(new CustomEvent(ML_NAV_OPEN)),\n close: () => document.dispatchEvent(new CustomEvent(ML_NAV_CLOSE)),\n };\n}\n\n// ── Small primitives ──────────────────────────────────────────────────────────\n\nfunction Kbd({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <kbd\n className={cn(\n \"inline-flex min-w-[18px] items-center justify-center rounded-md bg-muted/60 px-1.5 py-0.5\",\n \"font-sans text-[10px] leading-none text-muted-foreground\",\n className\n )}\n >\n {children}\n </kbd>\n );\n}\n\nfunction CommandRow({ item, primary, onSelect }: { item: NavCommand; primary: boolean; onSelect: () => void }) {\n return (\n <Command.Item\n value={[item.label, ...(item.keywords ?? [])].join(\" \")}\n onSelect={onSelect}\n className={cn(\n \"group/item flex cursor-pointer items-center gap-3 rounded-xl\",\n \"transition-colors duration-150 aria-selected:bg-primary/10\",\n primary ? \"px-2.5 py-2.5\" : \"px-2.5 py-2\"\n )}\n >\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg transition-colors\",\n \"bg-muted/50 group-aria-selected/item:bg-primary/15\",\n primary ? \"h-9 w-9\" : \"h-8 w-8\"\n )}\n >\n <item.icon\n className={cn(\n \"text-foreground/80 transition-colors group-aria-selected/item:text-primary\",\n primary ? \"h-[18px] w-[18px]\" : \"h-4 w-4\"\n )}\n />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span\n className={cn(\n \"block truncate leading-tight\",\n primary ? \"text-[15px] font-medium\" : \"text-sm\"\n )}\n >\n {item.label}\n </span>\n {item.description && (\n <span className=\"mt-0.5 block truncate text-[11.5px] leading-tight text-muted-foreground\">\n {item.description}\n </span>\n )}\n </span>\n <ArrowRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground/30 transition-colors group-aria-selected/item:text-primary/70\" />\n </Command.Item>\n );\n}\n\nconst GROUP_HEADING_CLASSES = cn(\n \"[&_[cmdk-group-heading]]:px-2.5\",\n \"[&_[cmdk-group-heading]]:pt-2\",\n \"[&_[cmdk-group-heading]]:pb-1\",\n \"[&_[cmdk-group-heading]]:text-[10.5px]\",\n \"[&_[cmdk-group-heading]]:font-semibold\",\n \"[&_[cmdk-group-heading]]:uppercase\",\n \"[&_[cmdk-group-heading]]:tracking-[0.08em]\",\n \"[&_[cmdk-group-heading]]:text-muted-foreground/60\"\n);\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function NavCommandMenu({ commands, trigger, accountSlot, footerSlot }: NavCommandMenuProps) {\n const [open, setOpen] = React.useState(false);\n const [query, setQuery] = React.useState(\"\");\n const router = useRouter();\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n React.useEffect(() => {\n if (!open) return;\n setQuery(\"\");\n const t = setTimeout(() => inputRef.current?.focus(), 60);\n return () => clearTimeout(t);\n }, [open]);\n\n React.useEffect(() => {\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n setOpen((prev) => !prev);\n }\n if (e.key === \"Escape\") setOpen(false);\n };\n const onOpen = () => setOpen(true);\n const onClose = () => setOpen(false);\n\n document.addEventListener(\"keydown\", onKey);\n document.addEventListener(ML_NAV_OPEN, onOpen);\n document.addEventListener(ML_NAV_CLOSE, onClose);\n return () => {\n document.removeEventListener(\"keydown\", onKey);\n document.removeEventListener(ML_NAV_OPEN, onOpen);\n document.removeEventListener(ML_NAV_CLOSE, onClose);\n };\n }, []);\n\n const runCommand = React.useCallback(\n (cmd: NavCommand) => {\n setOpen(false);\n if (cmd.href) router.push(cmd.href);\n else cmd.action?.();\n },\n [router]\n );\n\n return (\n <>\n {trigger}\n\n <AnimatePresence>\n {open && (\n <>\n {/* Backdrop blur */}\n <motion.div\n className=\"nav-canvas-overlay\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.15 }}\n onClick={() => setOpen(false)}\n />\n\n {/* Command panel — centered on desktop, bottom sheet on mobile */}\n <motion.div\n className=\"fixed inset-0 z-[101] flex items-end justify-center p-3 pb-4 sm:items-center sm:p-4\"\n initial={{ opacity: 0, y: 24, scale: 1 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, y: 24 }}\n transition={{ duration: 0.18, ease: \"easeOut\" }}\n onClick={() => setOpen(false)}\n >\n <div\n className={cn(\n \"flex w-full max-h-[85dvh] flex-col overflow-hidden rounded-[20px] sm:max-h-[min(680px,88dvh)] sm:max-w-[620px]\",\n \"border border-border/40 bg-background/90 shadow-2xl backdrop-blur-2xl backdrop-saturate-150\"\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <Command shouldFilter label=\"Medialane navigation\" className=\"flex min-h-0 flex-1 flex-col\">\n {/* Drag handle (mobile) */}\n <div className=\"flex justify-center pt-2.5 sm:hidden\" aria-hidden=\"true\">\n <span className=\"h-1 w-9 rounded-full bg-muted-foreground/30\" />\n </div>\n\n {/* Search bar */}\n <div className=\"flex items-center gap-3 border-b border-border/40 px-4 py-3.5\">\n <Search\n className={cn(\n \"h-[18px] w-[18px] shrink-0 transition-colors\",\n query ? \"text-primary\" : \"text-muted-foreground\"\n )}\n />\n <Command.Input\n ref={inputRef}\n value={query}\n onValueChange={setQuery}\n placeholder=\"Search or run a command…\"\n className=\"flex-1 bg-transparent text-[15px] outline-none placeholder:text-muted-foreground\"\n />\n <Kbd className=\"hidden sm:inline-flex\">esc</Kbd>\n <button\n onClick={() => setOpen(false)}\n className=\"rounded-md p-1 transition-colors hover:bg-muted/50 sm:hidden\"\n aria-label=\"Close\"\n >\n <X className=\"h-4 w-4 text-muted-foreground\" />\n </button>\n </div>\n\n {/* Results */}\n <Command.List className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain p-2\">\n <Command.Empty className=\"py-8 text-center text-sm text-muted-foreground\">\n No results found.\n </Command.Empty>\n\n {commands.map((group, i) => {\n const primary = !group.heading;\n return (\n <React.Fragment key={group.heading ?? `__primary-${i}`}>\n {i > 0 && (\n <Command.Separator className=\"my-1.5 h-px bg-border/40\" />\n )}\n <Command.Group heading={group.heading} className={GROUP_HEADING_CLASSES}>\n {group.items.map((item) => (\n <CommandRow\n key={item.id}\n item={item}\n primary={primary}\n onSelect={() => runCommand(item)}\n />\n ))}\n </Command.Group>\n </React.Fragment>\n );\n })}\n </Command.List>\n\n {accountSlot && (\n <div className=\"border-t border-border/40 bg-muted/20 px-3 py-3\">\n {accountSlot}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-3 border-t border-border/40 bg-muted/20 px-3 py-2\">\n <div className=\"flex items-center gap-3\">\n {footerSlot}\n <span className=\"hidden items-center gap-3 text-[10.5px] text-muted-foreground/70 sm:flex\">\n <span className=\"flex items-center gap-1\"><Kbd>↑</Kbd><Kbd>↓</Kbd> Navigate</span>\n <span className=\"flex items-center gap-1\"><Kbd>↵</Kbd> Open</span>\n </span>\n </div>\n <span className=\"flex shrink-0 items-center gap-2 text-[10px] text-muted-foreground/50\">\n medialane\n <Kbd className=\"hidden sm:inline-flex\">⌘K</Kbd>\n </span>\n </div>\n </Command>\n </div>\n </motion.div>\n </>\n )}\n </AnimatePresence>\n </>\n );\n}\n"],"mappings":";AAuEI,SAuHM,UAvHN,KAqCE,YArCF;AArEJ,YAAY,WAAW;AACvB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,GAAG,kBAAkB;AACtC,SAAS,iBAAiB,cAAc;AACxC,SAAS,UAAU;AAkDnB,MAAM,cAAe;AACrB,MAAM,eAAe;AAEd,SAAS,oBAAoB;AAClC,SAAO;AAAA,IACL,MAAO,MAAM,SAAS,cAAc,IAAI,YAAY,WAAW,CAAC;AAAA,IAChE,OAAO,MAAM,SAAS,cAAc,IAAI,YAAY,YAAY,CAAC;AAAA,EACnE;AACF;AAIA,SAAS,IAAI,EAAE,UAAU,UAAU,GAAsD;AACvF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF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? "Freely transferable" : "Stays with the original holder";
|
|
28
28
|
const LAUNCHPAD_SERVICE_GROUPS = [
|
|
29
29
|
{
|
|
30
|
-
key: "
|
|
31
|
-
title: "
|
|
32
|
-
tagline: "
|
|
30
|
+
key: "nfts",
|
|
31
|
+
title: "NFTs",
|
|
32
|
+
tagline: "Singular works, your own collections, timed drops, and remixes."
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
key: "limited-editions",
|
|
36
36
|
title: "Limited Editions",
|
|
37
|
-
tagline: "
|
|
37
|
+
tagline: "Numbered copies of your work."
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
key: "coins",
|
|
41
41
|
title: "Coins",
|
|
42
|
-
tagline: "Launch your own coin
|
|
42
|
+
tagline: "Launch your own coin, or bring one you already made."
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
key: "community",
|
|
@@ -49,7 +49,7 @@ const LAUNCHPAD_SERVICE_GROUPS = [
|
|
|
49
49
|
{
|
|
50
50
|
key: "claims",
|
|
51
51
|
title: "Claims",
|
|
52
|
-
tagline: "
|
|
52
|
+
tagline: "Reserve your username, your collection's name, or bring in a collection you already made."
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
key: "coming-soon",
|
|
@@ -60,14 +60,13 @@ const LAUNCHPAD_SERVICE_GROUPS = [
|
|
|
60
60
|
const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
61
61
|
// ── Create ────────────────────────────────────────────────────────────────
|
|
62
62
|
{
|
|
63
|
-
key: "
|
|
64
|
-
cta: "
|
|
65
|
-
blurb: "
|
|
66
|
-
title: "
|
|
67
|
-
subtitle: "
|
|
68
|
-
description: "
|
|
69
|
-
|
|
70
|
-
features: ["Free to publish", "Your file, stored forever", "You set the license terms"],
|
|
63
|
+
key: "nfts",
|
|
64
|
+
cta: "Create",
|
|
65
|
+
blurb: "Publish one-of-a-kind works and keep them in collections of your own.",
|
|
66
|
+
title: "NFTs",
|
|
67
|
+
subtitle: "Singular works and your own collections",
|
|
68
|
+
description: "Publish any photo, video, audio, or document as a one-of-a-kind work inside a collection you own. Licensing, provenance, and ownership live on-chain.",
|
|
69
|
+
features: ["One-of-a-kind works", "Your own branded collections", "You set the license terms"],
|
|
71
70
|
example: "A song, a photo, an ebook, a short film",
|
|
72
71
|
icon: import_lucide_react.ImagePlus,
|
|
73
72
|
gradient: "from-blue-500/10 via-sky-400/4 to-transparent",
|
|
@@ -77,60 +76,22 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
77
76
|
badge: "Create",
|
|
78
77
|
status: "live",
|
|
79
78
|
category: "create",
|
|
80
|
-
group: "
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: "create-collection",
|
|
84
|
-
cta: "Create",
|
|
85
|
-
blurb: "Give your works a home of their own, with its own page and name.",
|
|
86
|
-
title: "Create NFT Collection",
|
|
87
|
-
subtitle: "Group your NFTs under a shared identity",
|
|
88
|
-
description: "Deploy a branded ERC-721 collection with its own page and on-chain identity. Add assets to it at any time and share it with collectors.",
|
|
89
|
-
features: ["Your own branded page", "Add new work anytime", "One link to share with fans"],
|
|
90
|
-
example: "A photography portfolio, a music catalog, a comic series",
|
|
91
|
-
icon: import_lucide_react.Layers,
|
|
92
|
-
gradient: "from-violet-500/10 via-purple-400/4 to-transparent",
|
|
93
|
-
borderColor: "border-violet-500/20",
|
|
94
|
-
iconColor: "text-violet-500",
|
|
95
|
-
buttonColor: "bg-brand-purple hover:bg-brand-purple/90",
|
|
96
|
-
badge: "Create",
|
|
97
|
-
status: "live",
|
|
98
|
-
category: "create",
|
|
99
|
-
group: "single-edition"
|
|
79
|
+
group: "nfts"
|
|
100
80
|
},
|
|
101
81
|
{
|
|
102
|
-
key: "
|
|
103
|
-
cta: "
|
|
104
|
-
blurb: "
|
|
105
|
-
title: "Limited Editions
|
|
106
|
-
subtitle: "
|
|
107
|
-
description: "Create
|
|
82
|
+
key: "limited-editions",
|
|
83
|
+
cta: "Mint",
|
|
84
|
+
blurb: "Release your work in numbered copies that can be collected and traded.",
|
|
85
|
+
title: "Limited Editions",
|
|
86
|
+
subtitle: "Numbered copies from a collection you own",
|
|
87
|
+
description: "Create an editions collection and release each work in as many numbered copies as you choose.",
|
|
108
88
|
features: ["Numbered copies, set by you", "Fans collect and trade", "One home for every release"],
|
|
109
89
|
example: "50 copies of a limited print, a music EP in 100 editions",
|
|
110
90
|
icon: import_lucide_react.Layers,
|
|
111
91
|
gradient: "from-violet-500/10 via-purple-400/4 to-transparent",
|
|
112
92
|
borderColor: "border-violet-500/20",
|
|
113
93
|
iconColor: "text-violet-500",
|
|
114
|
-
buttonColor: "bg-
|
|
115
|
-
badge: "Create",
|
|
116
|
-
status: "live",
|
|
117
|
-
category: "create",
|
|
118
|
-
group: "limited-editions"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
key: "mint-editions",
|
|
122
|
-
cta: "Mint",
|
|
123
|
-
blurb: "Release a new piece in as many copies as you choose.",
|
|
124
|
-
title: "Mint Limited Edition",
|
|
125
|
-
subtitle: "Add new editions to an existing collection",
|
|
126
|
-
description: "Pick one of your Limited Edition contracts, upload artwork, set the supply, and release to collectors \u2014 all in a few clicks.",
|
|
127
|
-
features: ["You choose how many copies", "Numbered automatically", "Ready to sell right away"],
|
|
128
|
-
example: "Drop 25 numbered prints from your art series",
|
|
129
|
-
icon: import_lucide_react.PlusCircle,
|
|
130
|
-
gradient: "from-fuchsia-500/10 via-violet-400/4 to-transparent",
|
|
131
|
-
borderColor: "border-fuchsia-500/20",
|
|
132
|
-
iconColor: "text-fuchsia-500",
|
|
133
|
-
buttonColor: "bg-fuchsia-600 hover:bg-fuchsia-700",
|
|
94
|
+
buttonColor: "bg-brand-purple hover:bg-brand-purple/90",
|
|
134
95
|
badge: "Create",
|
|
135
96
|
status: "live",
|
|
136
97
|
category: "create",
|
|
@@ -139,10 +100,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
139
100
|
{
|
|
140
101
|
key: "remix-asset",
|
|
141
102
|
cta: "Browse",
|
|
142
|
-
blurb: "Create from another work
|
|
103
|
+
blurb: "Create from another work. Credit and royalties are handled automatically.",
|
|
143
104
|
title: "Remix Asset",
|
|
144
105
|
subtitle: "Derivative works with on-chain attribution",
|
|
145
|
-
description: "Create a licensed derivative of
|
|
106
|
+
description: "Create a licensed derivative of another work. Attribution and provenance flow back to the original creator.",
|
|
146
107
|
features: ["Credit handled automatically", "Royalties flow to the original", "License respected at mint"],
|
|
147
108
|
example: "A remix of a song, an artwork inspired by an original",
|
|
148
109
|
icon: import_lucide_react.GitBranch,
|
|
@@ -153,17 +114,17 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
153
114
|
badge: "Create",
|
|
154
115
|
status: "live",
|
|
155
116
|
category: "create",
|
|
156
|
-
group: "
|
|
117
|
+
group: "nfts"
|
|
157
118
|
},
|
|
158
119
|
// ── Launch ────────────────────────────────────────────────────────────────
|
|
159
120
|
{
|
|
160
121
|
key: "pop-protocol",
|
|
161
122
|
cta: "Create",
|
|
162
|
-
blurb: "
|
|
123
|
+
blurb: "Badges your community claims and keeps forever.",
|
|
163
124
|
title: "POP Protocol",
|
|
164
|
-
subtitle: "Proof-of-participation for
|
|
165
|
-
description: "
|
|
166
|
-
features: ["Free for your community to claim", "Invite-list gating optional", "Branded
|
|
125
|
+
subtitle: "Proof-of-participation badges for your community",
|
|
126
|
+
description: "Give out permanent badges. Each person can claim one, and it cannot be transferred or faked.",
|
|
127
|
+
features: ["Free for your community to claim", "Invite-list gating optional", "Branded claim page to share"],
|
|
167
128
|
example: "Hackathon attendance badge, community membership, conference pass",
|
|
168
129
|
icon: import_lucide_react.Award,
|
|
169
130
|
gradient: "from-emerald-500/10 via-green-400/4 to-transparent",
|
|
@@ -171,7 +132,7 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
171
132
|
iconColor: "text-emerald-500",
|
|
172
133
|
buttonColor: "bg-green-600 hover:bg-green-700",
|
|
173
134
|
badge: "Launch",
|
|
174
|
-
browseLinkLabel: "Browse
|
|
135
|
+
browseLinkLabel: "Browse badges",
|
|
175
136
|
status: "live",
|
|
176
137
|
category: "launch",
|
|
177
138
|
group: "community"
|
|
@@ -179,10 +140,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
179
140
|
{
|
|
180
141
|
key: "collection-drop",
|
|
181
142
|
cta: "Launch",
|
|
182
|
-
blurb: "
|
|
143
|
+
blurb: "Release a limited run at a set price and time window.",
|
|
183
144
|
title: "Collection Drop",
|
|
184
145
|
subtitle: "Timed NFT releases with mint windows",
|
|
185
|
-
description: "
|
|
146
|
+
description: "Set a price, a supply, and a start and end time. Collectors mint directly from your drop page.",
|
|
186
147
|
features: ["You set price and supply", "Opens and closes on your schedule", "Branded drop page to share"],
|
|
187
148
|
example: "A 48-hour drop of 200 pieces at 5 USDC each",
|
|
188
149
|
icon: import_lucide_react.Package,
|
|
@@ -194,7 +155,7 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
194
155
|
browseLinkLabel: "Browse drops",
|
|
195
156
|
status: "live",
|
|
196
157
|
category: "launch",
|
|
197
|
-
group: "
|
|
158
|
+
group: "nfts"
|
|
198
159
|
},
|
|
199
160
|
{
|
|
200
161
|
key: "ip-tickets",
|
|
@@ -220,10 +181,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
220
181
|
{
|
|
221
182
|
key: "ip-club",
|
|
222
183
|
cta: "Create",
|
|
223
|
-
blurb: "
|
|
184
|
+
blurb: "Membership passes for your community.",
|
|
224
185
|
title: "IP Club",
|
|
225
186
|
subtitle: "Membership passes with an on-chain card",
|
|
226
|
-
description: "Create a
|
|
187
|
+
description: "Create a club with an on-chain membership card. Set an entry fee and a member cap, and open or close joining anytime.",
|
|
227
188
|
features: ["On-chain membership card", "Optional entry fee", "Open or close joining anytime"],
|
|
228
189
|
icon: import_lucide_react.Users,
|
|
229
190
|
gradient: "from-indigo-500/10 via-violet-400/4 to-transparent",
|
|
@@ -244,8 +205,8 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
244
205
|
blurb: "Let a sponsor back your work directly, for a license in return.",
|
|
245
206
|
title: "IP Sponsorship",
|
|
246
207
|
subtitle: "Direct sponsorship offers, settled asset-to-asset",
|
|
247
|
-
description: "Create a sponsorship offer on an asset you own
|
|
248
|
-
features: ["
|
|
208
|
+
description: "Create a sponsorship offer on an asset you own. Sponsors bid, you accept, and they receive a license. Payment settles directly between sponsor and author.",
|
|
209
|
+
features: ["Direct settlement", "Owner-verified on-chain", "Open bidding or one invited sponsor"],
|
|
249
210
|
example: "Sponsor a song, an artwork, or a patent for a license",
|
|
250
211
|
icon: import_lucide_react.Handshake,
|
|
251
212
|
gradient: "from-rose-500/10 via-pink-400/4 to-transparent",
|
|
@@ -264,10 +225,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
264
225
|
{
|
|
265
226
|
key: "creator-coins",
|
|
266
227
|
cta: "Launch",
|
|
267
|
-
blurb: "Launch your coin in a few clicks
|
|
228
|
+
blurb: "Launch your coin in a few clicks and stay in control of it.",
|
|
268
229
|
title: "Creator Coin",
|
|
269
230
|
subtitle: "Your own coin, your liquidity",
|
|
270
|
-
description: "Launch
|
|
231
|
+
description: "Launch your own coin with a public trading pool. You set the supply and allocation and stay in control of the liquidity.",
|
|
271
232
|
features: ["Launch in a few clicks", "You keep control of the liquidity", "Traded on a public pool"],
|
|
272
233
|
example: "A fan coin for your channel, a coin for your music project",
|
|
273
234
|
icon: import_lucide_react.TrendingUp,
|
|
@@ -284,10 +245,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
284
245
|
{
|
|
285
246
|
key: "claim-memecoin",
|
|
286
247
|
cta: "Claim",
|
|
287
|
-
blurb: "
|
|
248
|
+
blurb: "Add a coin you already launched to your profile.",
|
|
288
249
|
title: "Claim Memecoin",
|
|
289
|
-
subtitle: "Bring
|
|
290
|
-
description: "
|
|
250
|
+
subtitle: "Bring a coin you already launched",
|
|
251
|
+
description: "Claim a coin you already launched to list it on the Coins page and your profile. Claims are reviewed before going live.",
|
|
291
252
|
features: ["Bring a coin you already launched", "Reviewed by our team", "Featured on the Coins page"],
|
|
292
253
|
example: "Your unrug memecoin, listed on your creator profile",
|
|
293
254
|
icon: import_lucide_react.Coins,
|
|
@@ -324,10 +285,10 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
324
285
|
cta: "Claim",
|
|
325
286
|
blurb: "Made a collection somewhere else? Bring it to your profile.",
|
|
326
287
|
title: "Claim Collection",
|
|
327
|
-
subtitle: "
|
|
328
|
-
description: "
|
|
288
|
+
subtitle: "Bring a collection you already made",
|
|
289
|
+
description: "Claim a collection you made elsewhere to link it to your profile and give it a branded collection page.",
|
|
329
290
|
features: ["Bring an existing collection", "Linked to your profile", "Branded collection page"],
|
|
330
|
-
example: "A collection you
|
|
291
|
+
example: "A collection you made elsewhere joins your profile",
|
|
331
292
|
icon: import_lucide_react.FolderInput,
|
|
332
293
|
gradient: "from-blue-500/10 via-sky-400/4 to-transparent",
|
|
333
294
|
borderColor: "border-blue-500/20",
|
|
@@ -344,7 +305,7 @@ const LAUNCHPAD_SERVICE_DEFINITIONS = [
|
|
|
344
305
|
blurb: "Give your collection a clean, memorable web address of its own.",
|
|
345
306
|
title: "Claim Collection Name",
|
|
346
307
|
subtitle: "Reserve your collection page URL",
|
|
347
|
-
description: "Claim a custom name for your collection page
|
|
308
|
+
description: "Claim a custom name for your collection page and get a clean, shareable URL instead of a long technical address.",
|
|
348
309
|
features: ["Free claim", "Clean shareable URL", "Easy to remember and share"],
|
|
349
310
|
example: "medialane.io/collections/your-collection",
|
|
350
311
|
icon: import_lucide_react.Link2,
|