@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/launchpad-services.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * Launchpad grouped services — the single source for the /launchpad page UI\n * in medialane-io and medialane-starknet.\n *\n * Card philosophy (creator-first redesign 2026-06-10; flat card pass\n * 2026-07-05): the whole card is the action. One title, one creator-language\n * sentence (def.blurb), one unique hue per service. The hue lives in a soft\n * icon-tile tint and a static border — no ambient aurora glow, no blurred\n * light-leaks, no gradient wash behind the card. Those read as washed-out\n * noise on light backgrounds and don't match the rest of the design system\n * (flat surfaces, solid accents). A staggered entrance reveal and a quiet\n * border/lift microinteraction on hover are still here; hover is desktop\n * polish only (gated to sm+, degraded under reduced-motion).\n *\n * Filter state (search + group pills) lives in `useLaunchpadFilter()` so a\n * page can render `LaunchpadFilterBar` wherever it wants (e.g. right under\n * the h1) while `LaunchpadGroupedSections` — now fully controlled — renders\n * only the grid reacting to that same state.\n *\n * Apps own: hrefs + per-app rollout status flips. Everything else lives here.\n */\n\nimport { useMemo, useState } from \"react\";\nimport Link from \"next/link\";\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\n// ── Per-app injection points ─────────────────────────────────────────────────\n\nexport interface ServiceOverride {\n /** Primary destination — the whole card links here (required for live services) */\n href?: string;\n /** Secondary browse link href (pairs with the def's browseLinkLabel) */\n browseHref?: string;\n /** Per-app rollout flips (e.g. coins live on one app first) */\n status?: ServiceStatus;\n /** Per-app one-liner override (rarely needed) */\n blurb?: string;\n}\n\nexport type ServiceOverrides = Record<string, ServiceOverride>;\n\n// ── One unique hue per service — never repeated inside a group ───────────────\n\ninterface ServiceHue {\n /** icon glyph tint (600 for light surfaces, 400 for dark) */\n text: string;\n /** solid fill — CTA button background */\n solid: string;\n /** static card border (visible on both themes, not just on hover) */\n border: string;\n /** soft icon-tile background (10% tint, both themes) */\n tint: string;\n}\n\nconst DEFAULT_HUE: ServiceHue = {\n text: \"text-sky-600 dark:text-sky-400\",\n solid: \"bg-sky-600\",\n border: \"border-sky-500/30 dark:border-sky-400/25\",\n tint: \"bg-sky-500/10\",\n};\n\nexport const SERVICE_HUES: Record<string, ServiceHue> = {\n // Single Editions — blue + green\n \"mint-ip-asset\": { text: \"text-blue-600 dark:text-blue-400\", solid: \"bg-blue-600\", border: \"border-blue-500/30 dark:border-blue-400/25\", tint: \"bg-blue-500/10\" },\n \"create-collection\": { text: \"text-green-600 dark:text-green-400\", solid: \"bg-green-600\", border: \"border-green-500/30 dark:border-green-400/25\", tint: \"bg-green-500/10\" },\n // Limited Editions — purple + red\n \"ip-collection-1155\": { text: \"text-purple-600 dark:text-purple-400\", solid: \"bg-purple-600\", border: \"border-purple-500/30 dark:border-purple-400/25\", tint: \"bg-purple-500/10\" },\n \"mint-editions\": { text: \"text-red-600 dark:text-red-400\", solid: \"bg-red-600\", border: \"border-red-500/30 dark:border-red-400/25\", tint: \"bg-red-500/10\" },\n // Creator Coins & Memecoins — yellow + orange\n \"creator-coins\": { text: \"text-yellow-600 dark:text-yellow-400\", solid: \"bg-yellow-600\", border: \"border-yellow-500/30 dark:border-yellow-400/25\", tint: \"bg-yellow-500/10\" },\n \"claim-memecoin\": { text: \"text-orange-600 dark:text-orange-400\", solid: \"bg-orange-600\", border: \"border-orange-500/30 dark:border-orange-400/25\", tint: \"bg-orange-500/10\" },\n \"collection-drop\": { text: \"text-orange-600 dark:text-orange-400\", solid: \"bg-orange-600\", border: \"border-orange-500/30 dark:border-orange-400/25\", tint: \"bg-orange-500/10\" },\n \"pop-protocol\": { text: \"text-emerald-600 dark:text-emerald-400\", solid: \"bg-emerald-600\", border: \"border-emerald-500/30 dark:border-emerald-400/25\", tint: \"bg-emerald-500/10\" },\n \"remix-asset\": { text: \"text-indigo-600 dark:text-indigo-400\", solid: \"bg-indigo-600\", border: \"border-indigo-500/30 dark:border-indigo-400/25\", tint: \"bg-indigo-500/10\" },\n \"claim-username\": { text: \"text-violet-600 dark:text-violet-400\", solid: \"bg-violet-600\", border: \"border-violet-500/30 dark:border-violet-400/25\", tint: \"bg-violet-500/10\" },\n \"claim-collection\": { text: \"text-cyan-600 dark:text-cyan-400\", solid: \"bg-cyan-600\", border: \"border-cyan-500/30 dark:border-cyan-400/25\", tint: \"bg-cyan-500/10\" },\n \"claim-collection-name\": { text: \"text-pink-600 dark:text-pink-400\", solid: \"bg-pink-600\", border: \"border-pink-500/30 dark:border-pink-400/25\", tint: \"bg-pink-500/10\" },\n};\n\n// ── Service card — the whole card is the action ─────────────────────────────\n\nexport interface LaunchpadServiceCardProps {\n def: ServiceDefinition;\n override?: ServiceOverride;\n /** Showcase layout — spans the full grid width (e.g. POP Protocol) */\n featured?: boolean;\n /** Grid position — drives the staggered entrance reveal. */\n index?: number;\n}\n\nexport function LaunchpadServiceCard({ def, override = {}, featured = false, index = 0 }: LaunchpadServiceCardProps) {\n const { key, icon: Icon, title, browseLinkLabel, features } = def;\n const status = override.status ?? def.status;\n const blurb = override.blurb ?? def.blurb;\n const { href, browseHref } = override;\n const reduceMotion = useReducedMotion();\n\n const live = status === \"live\";\n const hue = SERVICE_HUES[key] ?? DEFAULT_HUE;\n\n return (\n <motion.div\n layout={!reduceMotion}\n initial={{ opacity: 0, y: reduceMotion ? 0 : 16 }}\n whileInView={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\n viewport={{ once: true, margin: \"-40px\" }}\n transition={{ duration: 0.45, delay: index * 0.06, ease: [0.25, 0.46, 0.45, 0.94] }}\n className={cn(\"flex\", featured && \"sm:col-span-2\")}\n >\n <div\n className={cn(\n \"group relative flex flex-1 flex-col overflow-hidden min-h-[200px] rounded-2xl border bg-card transition-all duration-300 ease-out\",\n live\n ? cn(\"active:scale-[0.985] sm:hover:-translate-y-1 motion-reduce:transform-none motion-reduce:transition-none\", hue.border, \"sm:hover:shadow-md sm:hover:shadow-black/5 dark:sm:hover:shadow-black/20\")\n : \"border-border/30 opacity-75\",\n )}\n >\n <div className=\"relative flex flex-col flex-1 p-5 sm:p-6 gap-3 sm:gap-4\">\n <div className=\"flex items-start justify-between gap-3\">\n {live ? (\n <span className={cn(\"flex h-12 w-12 items-center justify-center rounded-xl\", hue.tint)}>\n <Icon className={cn(\"h-6 w-6\", hue.text)} />\n </span>\n ) : (\n <Icon className=\"h-8 w-8 shrink-0 text-muted-foreground/50\" />\n )}\n {!live && (\n <span className=\"flex items-center gap-1 text-[11px] font-medium text-muted-foreground/60 pt-1\">\n <Lock className=\"h-3 w-3\" />\n Coming soon\n </span>\n )}\n </div>\n\n <div className=\"space-y-1.5\">\n <h3 className=\"text-xl sm:text-2xl font-black tracking-tight leading-snug\">{title}</h3>\n <p className={cn(\"text-sm leading-relaxed\", live ? \"text-muted-foreground\" : \"text-muted-foreground/60\", !featured && \"max-w-[36ch]\")}>\n {blurb}\n </p>\n </div>\n\n {/* Feature showcase — plain-language chips, capped at 2 for card density */}\n {live && features.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {features.slice(0, 2).map((feature) => (\n <span\n key={feature}\n className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-muted/40 border border-border/30 text-xs font-medium text-muted-foreground\"\n >\n <Check className={cn(\"h-3 w-3 shrink-0\", hue.text)} />\n {feature}\n </span>\n ))}\n </div>\n )}\n\n {/* Stretched link — the whole card is the action; the button is the visual cue */}\n {live && href && <Link href={href} aria-label={`${def.cta} — ${title}`} className=\"absolute inset-0 z-10\" />}\n\n <div className=\"mt-auto pt-1 flex items-end justify-between gap-3\">\n {live && browseHref && browseLinkLabel ? (\n <Link\n href={browseHref}\n className=\"relative z-20 inline-flex items-center gap-1 text-xs font-medium text-muted-foreground active:text-foreground sm:hover:text-foreground transition-colors\"\n >\n {browseLinkLabel}\n <ArrowRight className=\"h-3 w-3\" />\n </Link>\n ) : (\n <span />\n )}\n {live && (\n <span\n className={cn(\n \"inline-flex items-center gap-2 h-10 px-5 rounded-full\",\n \"text-sm font-semibold text-white\",\n hue.solid,\n )}\n >\n {def.cta}\n <ArrowRight className=\"h-4 w-4 transition-transform duration-300 sm:group-hover:translate-x-0.5 motion-reduce:transform-none\" />\n </span>\n )}\n </div>\n </div>\n </div>\n </motion.div>\n );\n}\n\n// ── Group sections ───────────────────────────────────────────────────────────\n\n/** Vivid gradient titles give special sections identity without boxing them in\n * (no panels inside panels — color carries the distinction, space does the rest). */\nconst GROUP_TITLE_ACCENTS: Partial<Record<ServiceGroup, string>> = {\n \"coins\": \"bg-gradient-to-r from-yellow-500 via-amber-500 to-orange-500 bg-clip-text text-transparent\",\n \"community\": \"bg-gradient-to-r from-emerald-500 to-green-600 bg-clip-text text-transparent\",\n};\n\nfunction GroupHeader({ group }: { group: ServiceGroupDefinition }) {\n return (\n <div className=\"space-y-2\">\n <h2 className={cn(\"text-3xl sm:text-4xl font-black tracking-tight\", GROUP_TITLE_ACCENTS[group.key])}>\n {group.title}\n </h2>\n <p className=\"text-base sm:text-lg text-muted-foreground leading-relaxed max-w-2xl\">{group.tagline}</p>\n </div>\n );\n}\n\n/** POP Protocol companion column — open how-it-works steps, no extra panel. */\nconst POP_STEPS = [\n { title: \"Create your event badge\", body: \"Name it, add your artwork, and set who can claim — ready in minutes.\" },\n { title: \"Share the claim link\", body: \"Your community claims for free — one badge per person, no faking.\" },\n { title: \"It stays with them forever\", body: \"Badges can't be sold or transferred — lasting proof they were there.\" },\n];\n\nfunction PopHowItWorks() {\n return (\n <div className=\"flex flex-col justify-center gap-5 sm:gap-6 px-2 py-4 sm:py-0 sm:pl-6\">\n {POP_STEPS.map((step, i) => (\n <div key={step.title} className=\"flex gap-4\">\n <span className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 text-sm font-bold\">\n {i + 1}\n </span>\n <div className=\"space-y-0.5\">\n <p className=\"font-semibold\">{step.title}</p>\n <p className=\"text-sm text-muted-foreground leading-relaxed\">{step.body}</p>\n </div>\n </div>\n ))}\n </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\n/**\n * Owns the search + group-filter state for the launchpad page. A page renders\n * `LaunchpadFilterBar` wherever it wants (e.g. right under the h1) wired to\n * this hook's fields, then passes `query`/`activeGroups` straight through to\n * `LaunchpadGroupedSections` so the grid reacts to the same state.\n */\nexport function useLaunchpadFilter() {\n const [query, setQuery] = useState(\"\");\n const [activeGroups, setActiveGroups] = useState<Set<ServiceGroup>>(new Set());\n\n const filterableGroups = LAUNCHPAD_SERVICE_GROUPS.filter((g) => g.key !== \"coming-soon\");\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 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 if (query.trim() === \"\") return true;\n const haystack = `${def.title} ${def.blurb} ${def.subtitle}`.toLowerCase();\n return haystack.includes(query.trim().toLowerCase());\n };\n\n const totalMatches = useMemo(\n () => LAUNCHPAD_SERVICE_DEFINITIONS.filter(matches).length,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [query, activeGroups],\n );\n\n const clear = () => { setQuery(\"\"); setActiveGroups(new Set()); };\n\n return { query, setQuery, activeGroups, toggleGroup, filterableGroups, totalMatches, clear };\n}\n\nexport interface LaunchpadGroupedSectionsProps {\n /** Per-app hrefs / rollout flips, keyed by service key. */\n overrides: ServiceOverrides;\n /** Current search query — from `useLaunchpadFilter()`. */\n query: string;\n /** Current active group filters — from `useLaunchpadFilter()`. */\n activeGroups: Set<ServiceGroup>;\n /** Reset both — from `useLaunchpadFilter()`. */\n onClearFilters: () => void;\n className?: string;\n}\n\n/** The full grouped launchpad services grid — section order comes from\n * LAUNCHPAD_SERVICE_GROUPS; cards from LAUNCHPAD_SERVICE_DEFINITIONS.\n * Fully controlled by `useLaunchpadFilter()` state passed in from the page. */\nexport function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilters, className }: LaunchpadGroupedSectionsProps) {\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 if (query.trim() === \"\") return true;\n const haystack = `${def.title} ${def.blurb} ${def.subtitle}`.toLowerCase();\n return haystack.includes(query.trim().toLowerCase());\n };\n\n const totalMatches = useMemo(\n () => LAUNCHPAD_SERVICE_DEFINITIONS.filter(matches).length,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [query, activeGroups],\n );\n\n return (\n <div className={cn(\"space-y-8 sm:space-y-10\", className)}>\n {totalMatches === 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 <div className=\"space-y-20 sm:space-y-28\">\n <AnimatePresence>\n {LAUNCHPAD_SERVICE_GROUPS.map((group) => {\n if (group.key === \"coming-soon\") {\n // Coming-soon items are never \"live\" by definition, so they can't\n // go through matches() (which requires status === \"live\") — only\n // the group/search filters apply here, not the live-status gate.\n const inActiveGroup = (d: ServiceDefinition) => activeGroups.size === 0 || activeGroups.has(d.group);\n const inSearch = (d: ServiceDefinition) =>\n query.trim() === \"\" ||\n `${d.title} ${d.blurb} ${d.subtitle}`.toLowerCase().includes(query.trim().toLowerCase());\n const comingSoonDefs = LAUNCHPAD_SERVICE_DEFINITIONS.filter(\n (d) => d.group === group.key && inActiveGroup(d) && inSearch(d),\n );\n if (comingSoonDefs.length === 0) return null;\n return <ComingSoonStrip key={group.key} group={group} defs={comingSoonDefs} />;\n }\n\n const defs = LAUNCHPAD_SERVICE_DEFINITIONS.filter((d) => d.group === group.key && matches(d));\n if (defs.length === 0) return null;\n\n const showPopHowItWorks = group.key === \"community\" && defs.some((d) => d.key === \"pop-protocol\");\n\n return (\n <motion.div\n key={group.key}\n layout\n initial={{ opacity: 0, y: 8 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] }}\n className=\"space-y-7 sm:space-y-10\"\n >\n <GroupHeader group={group} />\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-5\">\n {defs.map((def, i) => (\n <LaunchpadServiceCard key={def.key} def={def} override={overrides[def.key]} index={i} />\n ))}\n {showPopHowItWorks && <PopHowItWorks />}\n </div>\n </motion.div>\n );\n })}\n </AnimatePresence>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsIkB;AA9GlB,mBAAkC;AAClC,kBAAiB;AACjB,2BAA0D;AAC1D,0BAAwC;AACxC,gBAAmB;AACnB,gCAOO;AA8BP,MAAM,cAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AAEO,MAAM,eAA2C;AAAA;AAAA,EAEtD,iBAAiB,EAAE,MAAM,oCAAoC,OAAO,eAAe,QAAQ,8CAA8C,MAAM,iBAAiB;AAAA,EAChK,qBAAqB,EAAE,MAAM,sCAAsC,OAAO,gBAAgB,QAAQ,gDAAgD,MAAM,kBAAkB;AAAA;AAAA,EAE1K,sBAAsB,EAAE,MAAM,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,CAAC,KAAK,MACd,4CAAC,wBAAmC,KAAU,UAAU,UAAU,IAAI,GAAG,GAAG,OAAO,KAAxD,IAAI,GAAuD,CACvF;AAAA,YACA,qBAAqB,4CAAC,iBAAc;AAAA,aACvC;AAAA;AAAA;AAAA,MAdK,MAAM;AAAA,IAeb;AAAA,EAEJ,CAAC,GACH,GACF,GAEJ;AAEJ;","names":["Link"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/launchpad-services.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * Launchpad services — the single source for the /launchpad page UI in\n * medialane-io and medialane-starknet.\n *\n * One dynamic grid (2026-07-13 redesign): one card per service, no group\n * sections. Groups exist as tags — a small accent label on the card and the\n * filter pills above the grid. The card is a single link to the service's own\n * page (its complete control surface); it carries no second link, no feature\n * chips, and no per-service color identity. Five group accents are the only\n * color voice, applied to the icon tile and the tag text.\n *\n * Filter state (search + group pills) lives in `useLaunchpadFilter()` so a\n * page can render `LaunchpadFilterBar` wherever it wants while\n * `LaunchpadGroupedSections` — fully controlled — renders the grid reacting\n * to that same state.\n *\n * Apps own: hrefs + per-app rollout status flips. Everything else lives here.\n */\n\nimport { useEffect, useMemo, useState } from \"react\";\nimport Link from \"next/link\";\nimport { AnimatePresence, motion, useReducedMotion } from \"framer-motion\";\nimport { Lock, ArrowRight } 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\n// ── Per-app injection points ─────────────────────────────────────────────────\n\nexport interface ServiceOverride {\n /** Primary destination — the whole card links here (required for live services) */\n href?: string;\n /** Legacy secondary link — the redesigned card renders a single link, so this is unused. */\n browseHref?: string;\n /** Per-app rollout flips (e.g. coins live on one app first) */\n status?: ServiceStatus;\n /** Per-app one-liner override (rarely needed) */\n blurb?: string;\n}\n\nexport type ServiceOverrides = Record<string, ServiceOverride>;\n\n// ── Group accents — the grid's only color voice ─────────────────────────────\n\ninterface GroupAccent {\n /** icon glyph + tag text tint */\n text: string;\n /** soft icon-tile background */\n tint: string;\n /** card border tint on desktop hover (polish only) */\n hoverBorder: string;\n}\n\nconst DEFAULT_ACCENT: GroupAccent = {\n text: \"text-muted-foreground\",\n tint: \"bg-muted/60\",\n hoverBorder: \"sm:hover:border-border\",\n};\n\nexport const GROUP_ACCENTS: Record<ServiceGroup, GroupAccent> = {\n \"nfts\": { text: \"text-brand-blue\", tint: \"bg-brand-blue/10\", hoverBorder: \"sm:hover:border-brand-blue/40\" },\n \"limited-editions\": { text: \"text-brand-purple\", tint: \"bg-brand-purple/10\", hoverBorder: \"sm:hover:border-brand-purple/40\" },\n \"community\": { text: \"text-emerald-600 dark:text-emerald-400\", tint: \"bg-emerald-500/10\", hoverBorder: \"sm:hover:border-emerald-500/40\" },\n \"coins\": { text: \"text-brand-orange\", tint: \"bg-brand-orange/10\", hoverBorder: \"sm:hover:border-brand-orange/40\" },\n \"claims\": { text: \"text-brand-rose\", tint: \"bg-brand-rose/10\", hoverBorder: \"sm:hover:border-brand-rose/40\" },\n \"coming-soon\": DEFAULT_ACCENT,\n};\n\n/** Legacy per-service hue table — kept for LaunchpadStrip (homepage). The grid\n * no longer uses it. */\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-blue-600 dark:text-blue-400\", solid: \"bg-blue-600\", border: \"border-blue-500/30 dark:border-blue-400/25\", tint: \"bg-blue-500/10\" },\n \"limited-editions\": { text: \"text-purple-600 dark:text-purple-400\", solid: \"bg-purple-600\", border: \"border-purple-500/30 dark:border-purple-400/25\", tint: \"bg-purple-500/10\" },\n \"creator-coins\": { text: \"text-yellow-600 dark:text-yellow-400\", solid: \"bg-yellow-600\", border: \"border-yellow-500/30 dark:border-yellow-400/25\", tint: \"bg-yellow-500/10\" },\n \"claim-memecoin\": { text: \"text-orange-600 dark:text-orange-400\", solid: \"bg-orange-600\", border: \"border-orange-500/30 dark:border-orange-400/25\", tint: \"bg-orange-500/10\" },\n \"collection-drop\": { text: \"text-orange-600 dark:text-orange-400\", solid: \"bg-orange-600\", border: \"border-orange-500/30 dark:border-orange-400/25\", tint: \"bg-orange-500/10\" },\n \"pop-protocol\": { text: \"text-emerald-600 dark:text-emerald-400\", solid: \"bg-emerald-600\", border: \"border-emerald-500/30 dark:border-emerald-400/25\", tint: \"bg-emerald-500/10\" },\n \"ip-tickets\": { text: \"text-teal-600 dark:text-teal-400\", solid: \"bg-teal-600\", border: \"border-teal-500/30 dark:border-teal-400/25\", tint: \"bg-teal-500/10\" },\n \"remix-asset\": { text: \"text-indigo-600 dark:text-indigo-400\", solid: \"bg-indigo-600\", border: \"border-indigo-500/30 dark:border-indigo-400/25\", tint: \"bg-indigo-500/10\" },\n \"claim-username\": { text: \"text-violet-600 dark:text-violet-400\", solid: \"bg-violet-600\", border: \"border-violet-500/30 dark:border-violet-400/25\", tint: \"bg-violet-500/10\" },\n \"claim-collection\": { text: \"text-cyan-600 dark:text-cyan-400\", solid: \"bg-cyan-600\", border: \"border-cyan-500/30 dark:border-cyan-400/25\", tint: \"bg-cyan-500/10\" },\n \"claim-collection-name\": { text: \"text-pink-600 dark:text-pink-400\", solid: \"bg-pink-600\", border: \"border-pink-500/30 dark:border-pink-400/25\", tint: \"bg-pink-500/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\n// ── Service card — one link, one accent, title + one sentence ────────────────\n\nexport interface LaunchpadServiceCardProps {\n def: ServiceDefinition;\n override?: ServiceOverride;\n /** Grid position — drives the staggered entrance reveal. */\n index?: number;\n}\n\nexport function LaunchpadServiceCard({ def, override = {}, index = 0 }: LaunchpadServiceCardProps) {\n const { icon: Icon, title, group } = 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 accent = GROUP_ACCENTS[group] ?? DEFAULT_ACCENT;\n\n const body = (\n <>\n <div className=\"flex items-start justify-between gap-3\">\n <span className={cn(\"flex h-12 w-12 items-center justify-center rounded-2xl\", live ? accent.tint : \"bg-muted/40\")}>\n <Icon className={cn(\"h-6 w-6\", live ? accent.text : \"text-muted-foreground/50\")} />\n </span>\n {!live && (\n <span className=\"flex items-center gap-1 text-[11px] font-medium text-muted-foreground/60 pt-1\">\n <Lock className=\"h-3 w-3\" />\n Coming soon\n </span>\n )}\n </div>\n <div className=\"space-y-1.5 mt-auto\">\n <h3 className=\"flex items-center gap-1.5 text-xl font-bold tracking-tight leading-snug\">\n {title}\n {live && (\n <ArrowRight className=\"h-4 w-4 shrink-0 text-muted-foreground/40 transition-transform duration-200 sm:group-hover:translate-x-0.5 motion-reduce:transform-none\" />\n )}\n </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 );\n\n return (\n <motion.div\n layout={!reduceMotion}\n initial={{ opacity: 0, y: reduceMotion ? 0 : 12 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0 }}\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 gap-5 rounded-2xl border border-border/60 bg-card p-6 min-h-[200px]\",\n \"transition-colors duration-200 active:scale-[0.99] motion-reduce:transform-none\",\n accent.hoverBorder,\n )}\n >\n {body}\n </Link>\n ) : (\n <div className=\"flex flex-1 flex-col gap-5 rounded-2xl border border-border/30 bg-card p-6 min-h-[200px] opacity-75\">\n {body}\n </div>\n )}\n </motion.div>\n );\n}\n\n// ── Coming-soon strip ────────────────────────────────────────────────────────\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\n// ── Filter state ─────────────────────────────────────────────────────────────\n\n/** Shared search predicate — group titles count as search terms so a query\n * like \"editions\" or \"community\" finds the whole group. */\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\n/** Sync filter state into the URL (?q=…&groups=…) via replaceState — the\n * filtered launchpad becomes shareable and survives reload, without touching\n * the router (this package is router-agnostic). */\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\n/**\n * Owns the search + group-filter state for the launchpad page. A page renders\n * `LaunchpadFilterBar` wherever it wants (e.g. right under the h1) wired to\n * this hook's fields, then passes `query`/`activeGroups` straight through to\n * `LaunchpadGroupedSections` so the grid reacts to the same state.\n * State is mirrored into the URL (?q=…&groups=…) so a filtered view can be\n * shared and survives reload.\n */\nexport function useLaunchpadFilter() {\n const [query, setQueryState] = useState(\"\");\n const [activeGroups, setActiveGroups] = useState<Set<ServiceGroup>>(new Set());\n\n // Hydrate once from the URL (client only).\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 // eslint-disable-next-line react-hooks/exhaustive-deps\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\n// ── The grid ─────────────────────────────────────────────────────────────────\n\nexport interface LaunchpadGroupedSectionsProps {\n /** Per-app hrefs / rollout flips, keyed by service key. */\n overrides: ServiceOverrides;\n /** Current search query — from `useLaunchpadFilter()`. */\n query: string;\n /** Current active group filters — from `useLaunchpadFilter()`. */\n activeGroups: Set<ServiceGroup>;\n /** Reset both — from `useLaunchpadFilter()`. */\n onClearFilters: () => void;\n className?: string;\n}\n\n/** The full launchpad services grid — one dynamic grid of all live services,\n * ordered by group, plus the coming-soon strip. Fully controlled by\n * `useLaunchpadFilter()` state passed in from the page. */\nexport function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilters, className }: LaunchpadGroupedSectionsProps) {\n const inActiveGroup = (d: ServiceDefinition) => activeGroups.size === 0 || activeGroups.has(d.group);\n const inSearch = (d: ServiceDefinition) => serviceMatchesQuery(d, query);\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\" && 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\" && 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 lg:grid-cols-3 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 &&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AC,CAAC,CAAC;AAExF,QAAM,WAAW,wDACd,OAAO,CAAC,MAAM,EAAE,UAAU,iBAAiB,EAAE,WAAW,UAAU,cAAc,CAAC,KAAK,SAAS,CAAC,CAAC,EACjG,KAAK,CAAC,GAAG,OAAO,WAAW,EAAE,KAAK,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,cAAc,CAAC,KAAK,SAAS,CAAC;AAAA,EACpE;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,iEAC3B,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,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import { ServiceStatus, ServiceGroup, ServiceDefinition, ServiceGroupDefinition } from '../data/launchpad-services.cjs';
|
|
4
3
|
import 'lucide-react';
|
|
@@ -6,7 +5,7 @@ import 'lucide-react';
|
|
|
6
5
|
interface ServiceOverride {
|
|
7
6
|
/** Primary destination — the whole card links here (required for live services) */
|
|
8
7
|
href?: string;
|
|
9
|
-
/**
|
|
8
|
+
/** Legacy secondary link — the redesigned card renders a single link, so this is unused. */
|
|
10
9
|
browseHref?: string;
|
|
11
10
|
/** Per-app rollout flips (e.g. coins live on one app first) */
|
|
12
11
|
status?: ServiceStatus;
|
|
@@ -14,35 +13,45 @@ interface ServiceOverride {
|
|
|
14
13
|
blurb?: string;
|
|
15
14
|
}
|
|
16
15
|
type ServiceOverrides = Record<string, ServiceOverride>;
|
|
16
|
+
interface GroupAccent {
|
|
17
|
+
/** icon glyph + tag text tint */
|
|
18
|
+
text: string;
|
|
19
|
+
/** soft icon-tile background */
|
|
20
|
+
tint: string;
|
|
21
|
+
/** card border tint on desktop hover (polish only) */
|
|
22
|
+
hoverBorder: string;
|
|
23
|
+
}
|
|
24
|
+
declare const GROUP_ACCENTS: Record<ServiceGroup, GroupAccent>;
|
|
25
|
+
/** Legacy per-service hue table — kept for LaunchpadStrip (homepage). The grid
|
|
26
|
+
* no longer uses it. */
|
|
17
27
|
interface ServiceHue {
|
|
18
|
-
/** icon glyph tint (600 for light surfaces, 400 for dark) */
|
|
19
28
|
text: string;
|
|
20
|
-
/** solid fill — CTA button background */
|
|
21
29
|
solid: string;
|
|
22
|
-
/** static card border (visible on both themes, not just on hover) */
|
|
23
30
|
border: string;
|
|
24
|
-
/** soft icon-tile background (10% tint, both themes) */
|
|
25
31
|
tint: string;
|
|
26
32
|
}
|
|
27
33
|
declare const SERVICE_HUES: Record<string, ServiceHue>;
|
|
28
34
|
interface LaunchpadServiceCardProps {
|
|
29
35
|
def: ServiceDefinition;
|
|
30
36
|
override?: ServiceOverride;
|
|
31
|
-
/** Showcase layout — spans the full grid width (e.g. POP Protocol) */
|
|
32
|
-
featured?: boolean;
|
|
33
37
|
/** Grid position — drives the staggered entrance reveal. */
|
|
34
38
|
index?: number;
|
|
35
39
|
}
|
|
36
|
-
declare function LaunchpadServiceCard({ def, override,
|
|
40
|
+
declare function LaunchpadServiceCard({ def, override, index }: LaunchpadServiceCardProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
/** Shared search predicate — group titles count as search terms so a query
|
|
42
|
+
* like "editions" or "community" finds the whole group. */
|
|
43
|
+
declare function serviceMatchesQuery(def: ServiceDefinition, query: string): boolean;
|
|
37
44
|
/**
|
|
38
45
|
* Owns the search + group-filter state for the launchpad page. A page renders
|
|
39
46
|
* `LaunchpadFilterBar` wherever it wants (e.g. right under the h1) wired to
|
|
40
47
|
* this hook's fields, then passes `query`/`activeGroups` straight through to
|
|
41
48
|
* `LaunchpadGroupedSections` so the grid reacts to the same state.
|
|
49
|
+
* State is mirrored into the URL (?q=…&groups=…) so a filtered view can be
|
|
50
|
+
* shared and survives reload.
|
|
42
51
|
*/
|
|
43
52
|
declare function useLaunchpadFilter(): {
|
|
44
53
|
query: string;
|
|
45
|
-
setQuery:
|
|
54
|
+
setQuery: (value: string) => void;
|
|
46
55
|
activeGroups: Set<ServiceGroup>;
|
|
47
56
|
toggleGroup: (key: ServiceGroup) => void;
|
|
48
57
|
filterableGroups: ServiceGroupDefinition[];
|
|
@@ -60,9 +69,9 @@ interface LaunchpadGroupedSectionsProps {
|
|
|
60
69
|
onClearFilters: () => void;
|
|
61
70
|
className?: string;
|
|
62
71
|
}
|
|
63
|
-
/** The full
|
|
64
|
-
*
|
|
65
|
-
*
|
|
72
|
+
/** The full launchpad services grid — one dynamic grid of all live services,
|
|
73
|
+
* ordered by group, plus the coming-soon strip. Fully controlled by
|
|
74
|
+
* `useLaunchpadFilter()` state passed in from the page. */
|
|
66
75
|
declare function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilters, className }: LaunchpadGroupedSectionsProps): react_jsx_runtime.JSX.Element;
|
|
67
76
|
|
|
68
|
-
export { LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, useLaunchpadFilter };
|
|
77
|
+
export { GROUP_ACCENTS, LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, serviceMatchesQuery, useLaunchpadFilter };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import { ServiceStatus, ServiceGroup, ServiceDefinition, ServiceGroupDefinition } from '../data/launchpad-services.js';
|
|
4
3
|
import 'lucide-react';
|
|
@@ -6,7 +5,7 @@ import 'lucide-react';
|
|
|
6
5
|
interface ServiceOverride {
|
|
7
6
|
/** Primary destination — the whole card links here (required for live services) */
|
|
8
7
|
href?: string;
|
|
9
|
-
/**
|
|
8
|
+
/** Legacy secondary link — the redesigned card renders a single link, so this is unused. */
|
|
10
9
|
browseHref?: string;
|
|
11
10
|
/** Per-app rollout flips (e.g. coins live on one app first) */
|
|
12
11
|
status?: ServiceStatus;
|
|
@@ -14,35 +13,45 @@ interface ServiceOverride {
|
|
|
14
13
|
blurb?: string;
|
|
15
14
|
}
|
|
16
15
|
type ServiceOverrides = Record<string, ServiceOverride>;
|
|
16
|
+
interface GroupAccent {
|
|
17
|
+
/** icon glyph + tag text tint */
|
|
18
|
+
text: string;
|
|
19
|
+
/** soft icon-tile background */
|
|
20
|
+
tint: string;
|
|
21
|
+
/** card border tint on desktop hover (polish only) */
|
|
22
|
+
hoverBorder: string;
|
|
23
|
+
}
|
|
24
|
+
declare const GROUP_ACCENTS: Record<ServiceGroup, GroupAccent>;
|
|
25
|
+
/** Legacy per-service hue table — kept for LaunchpadStrip (homepage). The grid
|
|
26
|
+
* no longer uses it. */
|
|
17
27
|
interface ServiceHue {
|
|
18
|
-
/** icon glyph tint (600 for light surfaces, 400 for dark) */
|
|
19
28
|
text: string;
|
|
20
|
-
/** solid fill — CTA button background */
|
|
21
29
|
solid: string;
|
|
22
|
-
/** static card border (visible on both themes, not just on hover) */
|
|
23
30
|
border: string;
|
|
24
|
-
/** soft icon-tile background (10% tint, both themes) */
|
|
25
31
|
tint: string;
|
|
26
32
|
}
|
|
27
33
|
declare const SERVICE_HUES: Record<string, ServiceHue>;
|
|
28
34
|
interface LaunchpadServiceCardProps {
|
|
29
35
|
def: ServiceDefinition;
|
|
30
36
|
override?: ServiceOverride;
|
|
31
|
-
/** Showcase layout — spans the full grid width (e.g. POP Protocol) */
|
|
32
|
-
featured?: boolean;
|
|
33
37
|
/** Grid position — drives the staggered entrance reveal. */
|
|
34
38
|
index?: number;
|
|
35
39
|
}
|
|
36
|
-
declare function LaunchpadServiceCard({ def, override,
|
|
40
|
+
declare function LaunchpadServiceCard({ def, override, index }: LaunchpadServiceCardProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
/** Shared search predicate — group titles count as search terms so a query
|
|
42
|
+
* like "editions" or "community" finds the whole group. */
|
|
43
|
+
declare function serviceMatchesQuery(def: ServiceDefinition, query: string): boolean;
|
|
37
44
|
/**
|
|
38
45
|
* Owns the search + group-filter state for the launchpad page. A page renders
|
|
39
46
|
* `LaunchpadFilterBar` wherever it wants (e.g. right under the h1) wired to
|
|
40
47
|
* this hook's fields, then passes `query`/`activeGroups` straight through to
|
|
41
48
|
* `LaunchpadGroupedSections` so the grid reacts to the same state.
|
|
49
|
+
* State is mirrored into the URL (?q=…&groups=…) so a filtered view can be
|
|
50
|
+
* shared and survives reload.
|
|
42
51
|
*/
|
|
43
52
|
declare function useLaunchpadFilter(): {
|
|
44
53
|
query: string;
|
|
45
|
-
setQuery:
|
|
54
|
+
setQuery: (value: string) => void;
|
|
46
55
|
activeGroups: Set<ServiceGroup>;
|
|
47
56
|
toggleGroup: (key: ServiceGroup) => void;
|
|
48
57
|
filterableGroups: ServiceGroupDefinition[];
|
|
@@ -60,9 +69,9 @@ interface LaunchpadGroupedSectionsProps {
|
|
|
60
69
|
onClearFilters: () => void;
|
|
61
70
|
className?: string;
|
|
62
71
|
}
|
|
63
|
-
/** The full
|
|
64
|
-
*
|
|
65
|
-
*
|
|
72
|
+
/** The full launchpad services grid — one dynamic grid of all live services,
|
|
73
|
+
* ordered by group, plus the coming-soon strip. Fully controlled by
|
|
74
|
+
* `useLaunchpadFilter()` state passed in from the page. */
|
|
66
75
|
declare function LaunchpadGroupedSections({ overrides, query, activeGroups, onClearFilters, className }: LaunchpadGroupedSectionsProps): react_jsx_runtime.JSX.Element;
|
|
67
76
|
|
|
68
|
-
export { LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, useLaunchpadFilter };
|
|
77
|
+
export { GROUP_ACCENTS, LaunchpadGroupedSections, type LaunchpadGroupedSectionsProps, LaunchpadServiceCard, type LaunchpadServiceCardProps, SERVICE_HUES, type ServiceOverride, type ServiceOverrides, serviceMatchesQuery, useLaunchpadFilter };
|