@medialane/ui 0.100.1 → 0.101.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.
Files changed (75) hide show
  1. package/dist/components/coin-launch-preview.cjs +1 -1
  2. package/dist/components/coin-launch-preview.cjs.map +1 -1
  3. package/dist/components/coin-launch-preview.js +1 -1
  4. package/dist/components/coin-launch-preview.js.map +1 -1
  5. package/dist/components/launchpad-services.cjs +4 -4
  6. package/dist/components/launchpad-services.cjs.map +1 -1
  7. package/dist/components/launchpad-services.js +4 -4
  8. package/dist/components/launchpad-services.js.map +1 -1
  9. package/dist/components/launchpad-strip.cjs +4 -4
  10. package/dist/components/launchpad-strip.cjs.map +1 -1
  11. package/dist/components/launchpad-strip.js +4 -4
  12. package/dist/components/launchpad-strip.js.map +1 -1
  13. package/dist/components/portfolio-bento-tile.cjs +2 -2
  14. package/dist/components/portfolio-bento-tile.cjs.map +1 -1
  15. package/dist/components/portfolio-bento-tile.js +2 -2
  16. package/dist/components/portfolio-bento-tile.js.map +1 -1
  17. package/dist/components/portfolio-chip-filter.cjs +1 -1
  18. package/dist/components/portfolio-chip-filter.cjs.map +1 -1
  19. package/dist/components/portfolio-chip-filter.js +1 -1
  20. package/dist/components/portfolio-chip-filter.js.map +1 -1
  21. package/dist/components/portfolio-header.cjs +5 -5
  22. package/dist/components/portfolio-header.cjs.map +1 -1
  23. package/dist/components/portfolio-header.js +5 -5
  24. package/dist/components/portfolio-header.js.map +1 -1
  25. package/dist/components/rewards/badge-catalog.cjs +49 -0
  26. package/dist/components/rewards/badge-catalog.cjs.map +1 -0
  27. package/dist/components/rewards/badge-catalog.d.cts +22 -0
  28. package/dist/components/rewards/badge-catalog.d.ts +22 -0
  29. package/dist/components/rewards/badge-catalog.js +25 -0
  30. package/dist/components/rewards/badge-catalog.js.map +1 -0
  31. package/dist/components/rewards/level-badge.cjs +7 -16
  32. package/dist/components/rewards/level-badge.cjs.map +1 -1
  33. package/dist/components/rewards/level-badge.d.cts +10 -4
  34. package/dist/components/rewards/level-badge.d.ts +10 -4
  35. package/dist/components/rewards/level-badge.js +8 -17
  36. package/dist/components/rewards/level-badge.js.map +1 -1
  37. package/dist/components/rewards/level-journey-list.cjs +52 -0
  38. package/dist/components/rewards/level-journey-list.cjs.map +1 -0
  39. package/dist/components/rewards/level-journey-list.d.cts +22 -0
  40. package/dist/components/rewards/level-journey-list.d.ts +22 -0
  41. package/dist/components/rewards/level-journey-list.js +28 -0
  42. package/dist/components/rewards/level-journey-list.js.map +1 -0
  43. package/dist/components/token-glyph.cjs.map +1 -1
  44. package/dist/components/token-glyph.d.cts +1 -1
  45. package/dist/components/token-glyph.d.ts +1 -1
  46. package/dist/components/token-glyph.js.map +1 -1
  47. package/dist/data/brand.cjs +4 -4
  48. package/dist/data/brand.cjs.map +1 -1
  49. package/dist/data/brand.d.cts +4 -4
  50. package/dist/data/brand.d.ts +4 -4
  51. package/dist/data/brand.js +4 -4
  52. package/dist/data/brand.js.map +1 -1
  53. package/dist/index.cjs +6 -6
  54. package/dist/index.cjs.map +1 -1
  55. package/dist/index.d.cts +2 -2
  56. package/dist/index.d.ts +2 -2
  57. package/dist/index.js +4 -4
  58. package/dist/index.js.map +1 -1
  59. package/dist/preset/tailwind.cjs +1 -1
  60. package/dist/preset/tailwind.cjs.map +1 -1
  61. package/dist/preset/tailwind.js +1 -1
  62. package/dist/preset/tailwind.js.map +1 -1
  63. package/package.json +1 -1
  64. package/dist/components/portfolio-nav.cjs +0 -128
  65. package/dist/components/portfolio-nav.cjs.map +0 -1
  66. package/dist/components/portfolio-nav.d.cts +0 -36
  67. package/dist/components/portfolio-nav.d.ts +0 -36
  68. package/dist/components/portfolio-nav.js +0 -94
  69. package/dist/components/portfolio-nav.js.map +0 -1
  70. package/dist/components/rewards/level-ladder.cjs +0 -54
  71. package/dist/components/rewards/level-ladder.cjs.map +0 -1
  72. package/dist/components/rewards/level-ladder.d.cts +0 -17
  73. package/dist/components/rewards/level-ladder.d.ts +0 -17
  74. package/dist/components/rewards/level-ladder.js +0 -30
  75. package/dist/components/rewards/level-ladder.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/preset/tailwind.ts"],"sourcesContent":["import type { Config } from \"tailwindcss\";\n\nconst medialanePreset: Partial<Config> = {\n theme: {\n extend: {\n colors: {\n // Each resolves via the app's own --brand-* CSS var when defined\n // (medialane-io, medialane-starknet); the fallback keeps every\n // color working standalone for any consumer that defines none\n // (medialane-portal today, or a future app).\n \"brand-blue\": \"hsl(var(--brand-blue, 220 100% 62%))\",\n \"brand-purple\": \"hsl(var(--brand-purple, 258 90% 66%))\",\n \"brand-rose\": \"hsl(var(--brand-rose, 341 89% 67%))\",\n \"brand-orange\": \"hsl(var(--brand-orange, 23 96% 63%))\",\n \"brand-price\": \"hsl(var(--brand-price, 25 95% 53%))\",\n \"brand-navy\": \"hsl(var(--brand-navy, 229 51% 8%))\",\n },\n borderRadius: {\n brand: \"11px\",\n },\n fontFamily: {\n // Brand display face (headings). Apps define --font-display via\n // next/font (Urbanist); falls back to the body face when unset.\n display: [\"var(--font-display)\", \"Urbanist\", \"Inter\", \"system-ui\", \"sans-serif\"],\n },\n fontSize: {\n // Floor for true micro-text (timestamps, counts) — nothing in the\n // package should go below this. Everything else uses Tailwind's\n // built-in scale (xs=12px and up).\n \"2xs\": [\"11px\", { lineHeight: \"14px\" }],\n },\n },\n },\n};\n\nexport default medialanePreset;\n"],"mappings":"AAEA,MAAM,kBAAmC;AAAA,EACvC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,QAKN,cAAkB;AAAA,QAClB,gBAAkB;AAAA,QAClB,cAAkB;AAAA,QAClB,gBAAkB;AAAA,QAClB,eAAkB;AAAA,QAClB,cAAkB;AAAA,MACpB;AAAA,MACA,cAAc;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA,YAAY;AAAA;AAAA;AAAA,QAGV,SAAS,CAAC,uBAAuB,YAAY,SAAS,aAAa,YAAY;AAAA,MACjF;AAAA,MACA,UAAU;AAAA;AAAA;AAAA;AAAA,QAIR,OAAO,CAAC,QAAQ,EAAE,YAAY,OAAO,CAAC;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,mBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../src/preset/tailwind.ts"],"sourcesContent":["import type { Config } from \"tailwindcss\";\n\nconst medialanePreset: Partial<Config> = {\n theme: {\n extend: {\n colors: {\n // Each resolves via the app's own --brand-* CSS var when defined\n // (medialane-io, medialane-starknet); the fallback keeps every\n // color working standalone for any consumer that defines none\n // (medialane-portal today, or a future app).\n \"brand-blue\": \"hsl(var(--brand-blue, 220 100% 62%))\",\n \"brand-purple\": \"hsl(var(--brand-purple, 258 90% 66%))\",\n \"brand-rose\": \"hsl(var(--brand-rose, 341 89% 67%))\",\n \"brand-orange\": \"hsl(var(--brand-orange, 23 96% 63%))\",\n \"brand-maeve\": \"hsl(var(--brand-maeve, 327 64% 67%))\",\n \"brand-navy\": \"hsl(var(--brand-navy, 229 51% 8%))\",\n },\n borderRadius: {\n brand: \"11px\",\n },\n fontFamily: {\n // Brand display face (headings). Apps define --font-display via\n // next/font (Urbanist); falls back to the body face when unset.\n display: [\"var(--font-display)\", \"Urbanist\", \"Inter\", \"system-ui\", \"sans-serif\"],\n },\n fontSize: {\n // Floor for true micro-text (timestamps, counts) — nothing in the\n // package should go below this. Everything else uses Tailwind's\n // built-in scale (xs=12px and up).\n \"2xs\": [\"11px\", { lineHeight: \"14px\" }],\n },\n },\n },\n};\n\nexport default medialanePreset;\n"],"mappings":"AAEA,MAAM,kBAAmC;AAAA,EACvC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,QAKN,cAAkB;AAAA,QAClB,gBAAkB;AAAA,QAClB,cAAkB;AAAA,QAClB,gBAAkB;AAAA,QAClB,eAAkB;AAAA,QAClB,cAAkB;AAAA,MACpB;AAAA,MACA,cAAc;AAAA,QACZ,OAAO;AAAA,MACT;AAAA,MACA,YAAY;AAAA;AAAA;AAAA,QAGV,SAAS,CAAC,uBAAuB,YAAY,SAAS,aAAa,YAAY;AAAA,MACjF;AAAA,MACA,UAAU;AAAA;AAAA;AAAA;AAAA,QAIR,OAAO,CAAC,QAAQ,EAAE,YAAY,OAAO,CAAC;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,mBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medialane/ui",
3
- "version": "0.100.1",
3
+ "version": "0.101.0",
4
4
  "description": "Shared UI components for Medialane apps",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,128 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var portfolio_nav_exports = {};
31
- __export(portfolio_nav_exports, {
32
- PortfolioNav: () => PortfolioNav
33
- });
34
- module.exports = __toCommonJS(portfolio_nav_exports);
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_link = __toESM(require("next/link"), 1);
37
- var import_cn = require("../utils/cn.js");
38
- const BADGE_VARIANT_CLASS = {
39
- destructive: "bg-destructive text-destructive-foreground",
40
- primary: "bg-primary text-primary-foreground",
41
- warning: "bg-amber-500 text-white"
42
- };
43
- function CountBadge({
44
- count,
45
- variant
46
- }) {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
- "span",
49
- {
50
- className: (0, import_cn.cn)(
51
- "h-4 min-w-4 rounded-full text-2xs font-bold flex items-center justify-center px-1",
52
- BADGE_VARIANT_CLASS[variant ?? "primary"]
53
- ),
54
- children: count
55
- }
56
- );
57
- }
58
- function matches(pathname, href) {
59
- return pathname === href || pathname.startsWith(href + "/");
60
- }
61
- function PortfolioNav({
62
- sections,
63
- pathname,
64
- badgeCounts = {},
65
- className
66
- }) {
67
- const count = (badge) => badge ? badgeCounts[badge.key] ?? 0 : 0;
68
- let activeSection = null;
69
- let bestLen = -1;
70
- for (const section of sections) {
71
- const hrefs = [section.href, ...(section.children ?? []).map((c) => c.href)];
72
- for (const href of hrefs) {
73
- if (matches(pathname, href) && href.length > bestLen) {
74
- bestLen = href.length;
75
- activeSection = section;
76
- }
77
- }
78
- }
79
- const edgeBleed = "overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8";
80
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className, children: [
81
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: (0, import_cn.cn)(edgeBleed, "border-b border-border/60"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center min-w-max", children: sections.map((section) => {
82
- const active = section === activeSection;
83
- const rollup = (section.children ?? []).reduce(
84
- (sum, child) => sum + count(child.badge),
85
- 0
86
- );
87
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
88
- import_link.default,
89
- {
90
- href: section.href,
91
- className: (0, import_cn.cn)(
92
- "relative flex items-center gap-1.5 px-3 py-2.5 text-sm whitespace-nowrap transition-colors shrink-0 border-b-2 min-h-10",
93
- active ? "border-primary text-foreground font-medium" : "border-transparent text-muted-foreground hover:text-foreground"
94
- ),
95
- children: [
96
- section.label,
97
- rollup > 0 && !active && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CountBadge, { count: rollup, variant: "destructive" })
98
- ]
99
- },
100
- section.href
101
- );
102
- }) }) }),
103
- activeSection?.children && activeSection.children.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: (0, import_cn.cn)(edgeBleed, "pt-3"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center min-w-max gap-1.5", children: activeSection.children.map((child) => {
104
- const active = matches(pathname, child.href);
105
- const childCount = count(child.badge);
106
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
107
- import_link.default,
108
- {
109
- href: child.href,
110
- className: (0, import_cn.cn)(
111
- "flex items-center gap-1.5 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors shrink-0",
112
- active ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:text-foreground"
113
- ),
114
- children: [
115
- child.label,
116
- child.badge && childCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CountBadge, { count: childCount, variant: child.badge.variant })
117
- ]
118
- },
119
- child.href
120
- );
121
- }) }) })
122
- ] });
123
- }
124
- // Annotate the CommonJS export names for ESM import in node:
125
- 0 && (module.exports = {
126
- PortfolioNav
127
- });
128
- //# sourceMappingURL=portfolio-nav.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/portfolio-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioBadgeVariant = \"destructive\" | \"primary\" | \"warning\";\n\nexport interface PortfolioNavChild {\n label: string;\n href: string;\n /** Optional count badge. `key` indexes `badgeCounts`; `variant` sets color. */\n badge?: { key: string; variant?: PortfolioBadgeVariant };\n}\n\nexport interface PortfolioNavSection {\n label: string;\n /** Where the top-level tab links. For sections with children this is the first child. */\n href: string;\n /** Inner segments rendered as a pill row when the section is active. */\n children?: PortfolioNavChild[];\n}\n\nexport interface PortfolioNavProps {\n sections: PortfolioNavSection[];\n /** Current pathname — caller passes `usePathname()`. */\n pathname: string;\n /** Badge counts keyed by `child.badge.key`. A badge renders only when > 0. */\n badgeCounts?: Record<string, number>;\n className?: string;\n}\n\nconst BADGE_VARIANT_CLASS: Record<PortfolioBadgeVariant, string> = {\n destructive: \"bg-destructive text-destructive-foreground\",\n primary: \"bg-primary text-primary-foreground\",\n warning: \"bg-amber-500 text-white\",\n};\n\nfunction CountBadge({\n count,\n variant,\n}: {\n count: number;\n variant?: PortfolioBadgeVariant;\n}) {\n return (\n <span\n className={cn(\n \"h-4 min-w-4 rounded-full text-2xs font-bold flex items-center justify-center px-1\",\n BADGE_VARIANT_CLASS[variant ?? \"primary\"],\n )}\n >\n {count}\n </span>\n );\n}\n\nfunction matches(pathname: string, href: string): boolean {\n return pathname === href || pathname.startsWith(href + \"/\");\n}\n\n/**\n * Two-level portfolio navigation: top-level underline tabs + a segmented pill\n * row when the active section has children. The active section is resolved by\n * the longest href match across section hrefs and child hrefs, so a root\n * \"Overview\" section (`/portfolio`) doesn't swallow every route.\n */\nexport function PortfolioNav({\n sections,\n pathname,\n badgeCounts = {},\n className,\n}: PortfolioNavProps) {\n const count = (badge?: { key: string }) =>\n badge ? (badgeCounts[badge.key] ?? 0) : 0;\n\n // Longest-match resolution of the active section.\n let activeSection: PortfolioNavSection | null = null;\n let bestLen = -1;\n for (const section of sections) {\n const hrefs = [section.href, ...(section.children ?? []).map((c) => c.href)];\n for (const href of hrefs) {\n if (matches(pathname, href) && href.length > bestLen) {\n bestLen = href.length;\n activeSection = section;\n }\n }\n }\n\n const edgeBleed =\n \"overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8\";\n\n return (\n <div className={className}>\n <nav className={cn(edgeBleed, \"border-b border-border/60\")}>\n <div className=\"flex items-center min-w-max\">\n {sections.map((section) => {\n const active = section === activeSection;\n // Rolled-up pending count across the section's children.\n const rollup = (section.children ?? []).reduce(\n (sum, child) => sum + count(child.badge),\n 0,\n );\n return (\n <Link\n key={section.href}\n href={section.href}\n className={cn(\n \"relative flex items-center gap-1.5 px-3 py-2.5 text-sm whitespace-nowrap transition-colors shrink-0 border-b-2 min-h-10\",\n active\n ? \"border-primary text-foreground font-medium\"\n : \"border-transparent text-muted-foreground hover:text-foreground\",\n )}\n >\n {section.label}\n {rollup > 0 && !active && (\n <CountBadge count={rollup} variant=\"destructive\" />\n )}\n </Link>\n );\n })}\n </div>\n </nav>\n {activeSection?.children && activeSection.children.length > 0 && (\n <nav className={cn(edgeBleed, \"pt-3\")}>\n <div className=\"flex items-center min-w-max gap-1.5\">\n {activeSection.children.map((child) => {\n const active = matches(pathname, child.href);\n const childCount = count(child.badge);\n return (\n <Link\n key={child.href}\n href={child.href}\n className={cn(\n \"flex items-center gap-1.5 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors shrink-0\",\n active\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-muted text-muted-foreground hover:text-foreground\",\n )}\n >\n {child.label}\n {child.badge && childCount > 0 && (\n <CountBadge count={childCount} variant={child.badge.variant} />\n )}\n </Link>\n );\n })}\n </div>\n </nav>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6CI;AA3CJ,kBAAiB;AACjB,gBAAmB;AA4BnB,MAAM,sBAA6D;AAAA,EACjE,aAAa;AAAA,EACb,SAAS;AAAA,EACT,SAAS;AACX;AAEA,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AACF,GAGG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,oBAAoB,WAAW,SAAS;AAAA,MAC1C;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,QAAQ,UAAkB,MAAuB;AACxD,SAAO,aAAa,QAAQ,SAAS,WAAW,OAAO,GAAG;AAC5D;AAQO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,cAAc,CAAC;AAAA,EACf;AACF,GAAsB;AACpB,QAAM,QAAQ,CAAC,UACb,QAAS,YAAY,MAAM,GAAG,KAAK,IAAK;AAG1C,MAAI,gBAA4C;AAChD,MAAI,UAAU;AACd,aAAW,WAAW,UAAU;AAC9B,UAAM,QAAQ,CAAC,QAAQ,MAAM,IAAI,QAAQ,YAAY,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AAC3E,eAAW,QAAQ,OAAO;AACxB,UAAI,QAAQ,UAAU,IAAI,KAAK,KAAK,SAAS,SAAS;AACpD,kBAAU,KAAK;AACf,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,QAAM,YACJ;AAEF,SACE,6CAAC,SAAI,WACH;AAAA,gDAAC,SAAI,eAAW,cAAG,WAAW,2BAA2B,GACvD,sDAAC,SAAI,WAAU,+BACZ,mBAAS,IAAI,CAAC,YAAY;AACzB,YAAM,SAAS,YAAY;AAE3B,YAAM,UAAU,QAAQ,YAAY,CAAC,GAAG;AAAA,QACtC,CAAC,KAAK,UAAU,MAAM,MAAM,MAAM,KAAK;AAAA,QACvC;AAAA,MACF;AACA,aACE;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UAEC,MAAM,QAAQ;AAAA,UACd,eAAW;AAAA,YACT;AAAA,YACA,SACI,+CACA;AAAA,UACN;AAAA,UAEC;AAAA,oBAAQ;AAAA,YACR,SAAS,KAAK,CAAC,UACd,4CAAC,cAAW,OAAO,QAAQ,SAAQ,eAAc;AAAA;AAAA;AAAA,QAX9C,QAAQ;AAAA,MAaf;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,IACC,eAAe,YAAY,cAAc,SAAS,SAAS,KAC1D,4CAAC,SAAI,eAAW,cAAG,WAAW,MAAM,GAClC,sDAAC,SAAI,WAAU,uCACZ,wBAAc,SAAS,IAAI,CAAC,UAAU;AACrC,YAAM,SAAS,QAAQ,UAAU,MAAM,IAAI;AAC3C,YAAM,aAAa,MAAM,MAAM,KAAK;AACpC,aACE;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UAEC,MAAM,MAAM;AAAA,UACZ,eAAW;AAAA,YACT;AAAA,YACA,SACI,mDACA;AAAA,UACN;AAAA,UAEC;AAAA,kBAAM;AAAA,YACN,MAAM,SAAS,aAAa,KAC3B,4CAAC,cAAW,OAAO,YAAY,SAAS,MAAM,MAAM,SAAS;AAAA;AAAA;AAAA,QAX1D,MAAM;AAAA,MAab;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,KAEJ;AAEJ;","names":["Link"]}
@@ -1,36 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type PortfolioBadgeVariant = "destructive" | "primary" | "warning";
4
- interface PortfolioNavChild {
5
- label: string;
6
- href: string;
7
- /** Optional count badge. `key` indexes `badgeCounts`; `variant` sets color. */
8
- badge?: {
9
- key: string;
10
- variant?: PortfolioBadgeVariant;
11
- };
12
- }
13
- interface PortfolioNavSection {
14
- label: string;
15
- /** Where the top-level tab links. For sections with children this is the first child. */
16
- href: string;
17
- /** Inner segments rendered as a pill row when the section is active. */
18
- children?: PortfolioNavChild[];
19
- }
20
- interface PortfolioNavProps {
21
- sections: PortfolioNavSection[];
22
- /** Current pathname — caller passes `usePathname()`. */
23
- pathname: string;
24
- /** Badge counts keyed by `child.badge.key`. A badge renders only when > 0. */
25
- badgeCounts?: Record<string, number>;
26
- className?: string;
27
- }
28
- /**
29
- * Two-level portfolio navigation: top-level underline tabs + a segmented pill
30
- * row when the active section has children. The active section is resolved by
31
- * the longest href match across section hrefs and child hrefs, so a root
32
- * "Overview" section (`/portfolio`) doesn't swallow every route.
33
- */
34
- declare function PortfolioNav({ sections, pathname, badgeCounts, className, }: PortfolioNavProps): react_jsx_runtime.JSX.Element;
35
-
36
- export { type PortfolioBadgeVariant, PortfolioNav, type PortfolioNavChild, type PortfolioNavProps, type PortfolioNavSection };
@@ -1,36 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- type PortfolioBadgeVariant = "destructive" | "primary" | "warning";
4
- interface PortfolioNavChild {
5
- label: string;
6
- href: string;
7
- /** Optional count badge. `key` indexes `badgeCounts`; `variant` sets color. */
8
- badge?: {
9
- key: string;
10
- variant?: PortfolioBadgeVariant;
11
- };
12
- }
13
- interface PortfolioNavSection {
14
- label: string;
15
- /** Where the top-level tab links. For sections with children this is the first child. */
16
- href: string;
17
- /** Inner segments rendered as a pill row when the section is active. */
18
- children?: PortfolioNavChild[];
19
- }
20
- interface PortfolioNavProps {
21
- sections: PortfolioNavSection[];
22
- /** Current pathname — caller passes `usePathname()`. */
23
- pathname: string;
24
- /** Badge counts keyed by `child.badge.key`. A badge renders only when > 0. */
25
- badgeCounts?: Record<string, number>;
26
- className?: string;
27
- }
28
- /**
29
- * Two-level portfolio navigation: top-level underline tabs + a segmented pill
30
- * row when the active section has children. The active section is resolved by
31
- * the longest href match across section hrefs and child hrefs, so a root
32
- * "Overview" section (`/portfolio`) doesn't swallow every route.
33
- */
34
- declare function PortfolioNav({ sections, pathname, badgeCounts, className, }: PortfolioNavProps): react_jsx_runtime.JSX.Element;
35
-
36
- export { type PortfolioBadgeVariant, PortfolioNav, type PortfolioNavChild, type PortfolioNavProps, type PortfolioNavSection };
@@ -1,94 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import Link from "next/link";
4
- import { cn } from "../utils/cn.js";
5
- const BADGE_VARIANT_CLASS = {
6
- destructive: "bg-destructive text-destructive-foreground",
7
- primary: "bg-primary text-primary-foreground",
8
- warning: "bg-amber-500 text-white"
9
- };
10
- function CountBadge({
11
- count,
12
- variant
13
- }) {
14
- return /* @__PURE__ */ jsx(
15
- "span",
16
- {
17
- className: cn(
18
- "h-4 min-w-4 rounded-full text-2xs font-bold flex items-center justify-center px-1",
19
- BADGE_VARIANT_CLASS[variant ?? "primary"]
20
- ),
21
- children: count
22
- }
23
- );
24
- }
25
- function matches(pathname, href) {
26
- return pathname === href || pathname.startsWith(href + "/");
27
- }
28
- function PortfolioNav({
29
- sections,
30
- pathname,
31
- badgeCounts = {},
32
- className
33
- }) {
34
- const count = (badge) => badge ? badgeCounts[badge.key] ?? 0 : 0;
35
- let activeSection = null;
36
- let bestLen = -1;
37
- for (const section of sections) {
38
- const hrefs = [section.href, ...(section.children ?? []).map((c) => c.href)];
39
- for (const href of hrefs) {
40
- if (matches(pathname, href) && href.length > bestLen) {
41
- bestLen = href.length;
42
- activeSection = section;
43
- }
44
- }
45
- }
46
- const edgeBleed = "overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8";
47
- return /* @__PURE__ */ jsxs("div", { className, children: [
48
- /* @__PURE__ */ jsx("nav", { className: cn(edgeBleed, "border-b border-border/60"), children: /* @__PURE__ */ jsx("div", { className: "flex items-center min-w-max", children: sections.map((section) => {
49
- const active = section === activeSection;
50
- const rollup = (section.children ?? []).reduce(
51
- (sum, child) => sum + count(child.badge),
52
- 0
53
- );
54
- return /* @__PURE__ */ jsxs(
55
- Link,
56
- {
57
- href: section.href,
58
- className: cn(
59
- "relative flex items-center gap-1.5 px-3 py-2.5 text-sm whitespace-nowrap transition-colors shrink-0 border-b-2 min-h-10",
60
- active ? "border-primary text-foreground font-medium" : "border-transparent text-muted-foreground hover:text-foreground"
61
- ),
62
- children: [
63
- section.label,
64
- rollup > 0 && !active && /* @__PURE__ */ jsx(CountBadge, { count: rollup, variant: "destructive" })
65
- ]
66
- },
67
- section.href
68
- );
69
- }) }) }),
70
- activeSection?.children && activeSection.children.length > 0 && /* @__PURE__ */ jsx("nav", { className: cn(edgeBleed, "pt-3"), children: /* @__PURE__ */ jsx("div", { className: "flex items-center min-w-max gap-1.5", children: activeSection.children.map((child) => {
71
- const active = matches(pathname, child.href);
72
- const childCount = count(child.badge);
73
- return /* @__PURE__ */ jsxs(
74
- Link,
75
- {
76
- href: child.href,
77
- className: cn(
78
- "flex items-center gap-1.5 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors shrink-0",
79
- active ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:text-foreground"
80
- ),
81
- children: [
82
- child.label,
83
- child.badge && childCount > 0 && /* @__PURE__ */ jsx(CountBadge, { count: childCount, variant: child.badge.variant })
84
- ]
85
- },
86
- child.href
87
- );
88
- }) }) })
89
- ] });
90
- }
91
- export {
92
- PortfolioNav
93
- };
94
- //# sourceMappingURL=portfolio-nav.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/portfolio-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\n\nexport type PortfolioBadgeVariant = \"destructive\" | \"primary\" | \"warning\";\n\nexport interface PortfolioNavChild {\n label: string;\n href: string;\n /** Optional count badge. `key` indexes `badgeCounts`; `variant` sets color. */\n badge?: { key: string; variant?: PortfolioBadgeVariant };\n}\n\nexport interface PortfolioNavSection {\n label: string;\n /** Where the top-level tab links. For sections with children this is the first child. */\n href: string;\n /** Inner segments rendered as a pill row when the section is active. */\n children?: PortfolioNavChild[];\n}\n\nexport interface PortfolioNavProps {\n sections: PortfolioNavSection[];\n /** Current pathname — caller passes `usePathname()`. */\n pathname: string;\n /** Badge counts keyed by `child.badge.key`. A badge renders only when > 0. */\n badgeCounts?: Record<string, number>;\n className?: string;\n}\n\nconst BADGE_VARIANT_CLASS: Record<PortfolioBadgeVariant, string> = {\n destructive: \"bg-destructive text-destructive-foreground\",\n primary: \"bg-primary text-primary-foreground\",\n warning: \"bg-amber-500 text-white\",\n};\n\nfunction CountBadge({\n count,\n variant,\n}: {\n count: number;\n variant?: PortfolioBadgeVariant;\n}) {\n return (\n <span\n className={cn(\n \"h-4 min-w-4 rounded-full text-2xs font-bold flex items-center justify-center px-1\",\n BADGE_VARIANT_CLASS[variant ?? \"primary\"],\n )}\n >\n {count}\n </span>\n );\n}\n\nfunction matches(pathname: string, href: string): boolean {\n return pathname === href || pathname.startsWith(href + \"/\");\n}\n\n/**\n * Two-level portfolio navigation: top-level underline tabs + a segmented pill\n * row when the active section has children. The active section is resolved by\n * the longest href match across section hrefs and child hrefs, so a root\n * \"Overview\" section (`/portfolio`) doesn't swallow every route.\n */\nexport function PortfolioNav({\n sections,\n pathname,\n badgeCounts = {},\n className,\n}: PortfolioNavProps) {\n const count = (badge?: { key: string }) =>\n badge ? (badgeCounts[badge.key] ?? 0) : 0;\n\n // Longest-match resolution of the active section.\n let activeSection: PortfolioNavSection | null = null;\n let bestLen = -1;\n for (const section of sections) {\n const hrefs = [section.href, ...(section.children ?? []).map((c) => c.href)];\n for (const href of hrefs) {\n if (matches(pathname, href) && href.length > bestLen) {\n bestLen = href.length;\n activeSection = section;\n }\n }\n }\n\n const edgeBleed =\n \"overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8\";\n\n return (\n <div className={className}>\n <nav className={cn(edgeBleed, \"border-b border-border/60\")}>\n <div className=\"flex items-center min-w-max\">\n {sections.map((section) => {\n const active = section === activeSection;\n // Rolled-up pending count across the section's children.\n const rollup = (section.children ?? []).reduce(\n (sum, child) => sum + count(child.badge),\n 0,\n );\n return (\n <Link\n key={section.href}\n href={section.href}\n className={cn(\n \"relative flex items-center gap-1.5 px-3 py-2.5 text-sm whitespace-nowrap transition-colors shrink-0 border-b-2 min-h-10\",\n active\n ? \"border-primary text-foreground font-medium\"\n : \"border-transparent text-muted-foreground hover:text-foreground\",\n )}\n >\n {section.label}\n {rollup > 0 && !active && (\n <CountBadge count={rollup} variant=\"destructive\" />\n )}\n </Link>\n );\n })}\n </div>\n </nav>\n {activeSection?.children && activeSection.children.length > 0 && (\n <nav className={cn(edgeBleed, \"pt-3\")}>\n <div className=\"flex items-center min-w-max gap-1.5\">\n {activeSection.children.map((child) => {\n const active = matches(pathname, child.href);\n const childCount = count(child.badge);\n return (\n <Link\n key={child.href}\n href={child.href}\n className={cn(\n \"flex items-center gap-1.5 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors shrink-0\",\n active\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-muted text-muted-foreground hover:text-foreground\",\n )}\n >\n {child.label}\n {child.badge && childCount > 0 && (\n <CountBadge count={childCount} variant={child.badge.variant} />\n )}\n </Link>\n );\n })}\n </div>\n </nav>\n )}\n </div>\n );\n}\n"],"mappings":";AA6CI,cA0DU,YA1DV;AA3CJ,OAAO,UAAU;AACjB,SAAS,UAAU;AA4BnB,MAAM,sBAA6D;AAAA,EACjE,aAAa;AAAA,EACb,SAAS;AAAA,EACT,SAAS;AACX;AAEA,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AACF,GAGG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,oBAAoB,WAAW,SAAS;AAAA,MAC1C;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,QAAQ,UAAkB,MAAuB;AACxD,SAAO,aAAa,QAAQ,SAAS,WAAW,OAAO,GAAG;AAC5D;AAQO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,cAAc,CAAC;AAAA,EACf;AACF,GAAsB;AACpB,QAAM,QAAQ,CAAC,UACb,QAAS,YAAY,MAAM,GAAG,KAAK,IAAK;AAG1C,MAAI,gBAA4C;AAChD,MAAI,UAAU;AACd,aAAW,WAAW,UAAU;AAC9B,UAAM,QAAQ,CAAC,QAAQ,MAAM,IAAI,QAAQ,YAAY,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AAC3E,eAAW,QAAQ,OAAO;AACxB,UAAI,QAAQ,UAAU,IAAI,KAAK,KAAK,SAAS,SAAS;AACpD,kBAAU,KAAK;AACf,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,QAAM,YACJ;AAEF,SACE,qBAAC,SAAI,WACH;AAAA,wBAAC,SAAI,WAAW,GAAG,WAAW,2BAA2B,GACvD,8BAAC,SAAI,WAAU,+BACZ,mBAAS,IAAI,CAAC,YAAY;AACzB,YAAM,SAAS,YAAY;AAE3B,YAAM,UAAU,QAAQ,YAAY,CAAC,GAAG;AAAA,QACtC,CAAC,KAAK,UAAU,MAAM,MAAM,MAAM,KAAK;AAAA,QACvC;AAAA,MACF;AACA,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAM,QAAQ;AAAA,UACd,WAAW;AAAA,YACT;AAAA,YACA,SACI,+CACA;AAAA,UACN;AAAA,UAEC;AAAA,oBAAQ;AAAA,YACR,SAAS,KAAK,CAAC,UACd,oBAAC,cAAW,OAAO,QAAQ,SAAQ,eAAc;AAAA;AAAA;AAAA,QAX9C,QAAQ;AAAA,MAaf;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,IACC,eAAe,YAAY,cAAc,SAAS,SAAS,KAC1D,oBAAC,SAAI,WAAW,GAAG,WAAW,MAAM,GAClC,8BAAC,SAAI,WAAU,uCACZ,wBAAc,SAAS,IAAI,CAAC,UAAU;AACrC,YAAM,SAAS,QAAQ,UAAU,MAAM,IAAI;AAC3C,YAAM,aAAa,MAAM,MAAM,KAAK;AACpC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAM,MAAM;AAAA,UACZ,WAAW;AAAA,YACT;AAAA,YACA,SACI,mDACA;AAAA,UACN;AAAA,UAEC;AAAA,kBAAM;AAAA,YACN,MAAM,SAAS,aAAa,KAC3B,oBAAC,cAAW,OAAO,YAAY,SAAS,MAAM,MAAM,SAAS;AAAA;AAAA;AAAA,QAX1D,MAAM;AAAA,MAab;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,KAEJ;AAEJ;","names":[]}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var level_ladder_exports = {};
20
- __export(level_ladder_exports, {
21
- LevelLadder: () => LevelLadder
22
- });
23
- module.exports = __toCommonJS(level_ladder_exports);
24
- var import_jsx_runtime = require("react/jsx-runtime");
25
- var import_cn = require("../../utils/cn.js");
26
- function LevelLadder({ levels, currentLevel, className }) {
27
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("flex gap-2 overflow-x-auto pb-2", className), children: levels.map((l) => {
28
- const state = l.level < currentLevel ? "done" : l.level === currentLevel ? "current" : "future";
29
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
30
- "div",
31
- {
32
- title: `${l.xpRequired.toLocaleString()} XP`,
33
- className: (0, import_cn.cn)(
34
- "flex shrink-0 select-none flex-col items-center gap-0.5 rounded-lg border px-2.5 py-1.5",
35
- state === "future" && "opacity-45"
36
- ),
37
- style: {
38
- borderColor: state === "current" ? l.badgeColor : `${l.badgeColor}40`,
39
- backgroundColor: state === "current" ? `${l.badgeColor}22` : `${l.badgeColor}0d`
40
- },
41
- children: [
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-2xs font-black tabular-nums", style: { color: l.badgeColor }, children: l.level }),
43
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "whitespace-nowrap text-2xs font-semibold", style: { color: l.badgeColor }, children: l.name })
44
- ]
45
- },
46
- l.level
47
- );
48
- }) });
49
- }
50
- // Annotate the CommonJS export names for ESM import in node:
51
- 0 && (module.exports = {
52
- LevelLadder
53
- });
54
- //# sourceMappingURL=level-ladder.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/rewards/level-ladder.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelLadderProps {\n levels: { level: number; name: string; xpRequired: number; badgeColor: string }[];\n currentLevel: number;\n className?: string;\n}\n\n/** The full level arc as a horizontally scrollable chip rail; the current\n * level is highlighted, passed levels render solid, future ones muted. */\nexport function LevelLadder({ levels, currentLevel, className }: LevelLadderProps) {\n return (\n <div className={cn(\"flex gap-2 overflow-x-auto pb-2\", className)}>\n {levels.map((l) => {\n const state = l.level < currentLevel ? \"done\" : l.level === currentLevel ? \"current\" : \"future\";\n return (\n <div\n key={l.level}\n title={`${l.xpRequired.toLocaleString()} XP`}\n className={cn(\n \"flex shrink-0 select-none flex-col items-center gap-0.5 rounded-lg border px-2.5 py-1.5\",\n state === \"future\" && \"opacity-45\"\n )}\n style={{\n borderColor: state === \"current\" ? l.badgeColor : `${l.badgeColor}40`,\n backgroundColor: state === \"current\" ? `${l.badgeColor}22` : `${l.badgeColor}0d`,\n }}\n >\n <span className=\"text-2xs font-black tabular-nums\" style={{ color: l.badgeColor }}>\n {l.level}\n </span>\n <span className=\"whitespace-nowrap text-2xs font-semibold\" style={{ color: l.badgeColor }}>\n {l.name}\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBU;AAhBV,gBAAmB;AAUZ,SAAS,YAAY,EAAE,QAAQ,cAAc,UAAU,GAAqB;AACjF,SACE,4CAAC,SAAI,eAAW,cAAG,mCAAmC,SAAS,GAC5D,iBAAO,IAAI,CAAC,MAAM;AACjB,UAAM,QAAQ,EAAE,QAAQ,eAAe,SAAS,EAAE,UAAU,eAAe,YAAY;AACvF,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,GAAG,EAAE,WAAW,eAAe,CAAC;AAAA,QACvC,eAAW;AAAA,UACT;AAAA,UACA,UAAU,YAAY;AAAA,QACxB;AAAA,QACA,OAAO;AAAA,UACL,aAAa,UAAU,YAAY,EAAE,aAAa,GAAG,EAAE,UAAU;AAAA,UACjE,iBAAiB,UAAU,YAAY,GAAG,EAAE,UAAU,OAAO,GAAG,EAAE,UAAU;AAAA,QAC9E;AAAA,QAEA;AAAA,sDAAC,UAAK,WAAU,oCAAmC,OAAO,EAAE,OAAO,EAAE,WAAW,GAC7E,YAAE,OACL;AAAA,UACA,4CAAC,UAAK,WAAU,4CAA2C,OAAO,EAAE,OAAO,EAAE,WAAW,GACrF,YAAE,MACL;AAAA;AAAA;AAAA,MAhBK,EAAE;AAAA,IAiBT;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- interface LevelLadderProps {
4
- levels: {
5
- level: number;
6
- name: string;
7
- xpRequired: number;
8
- badgeColor: string;
9
- }[];
10
- currentLevel: number;
11
- className?: string;
12
- }
13
- /** The full level arc as a horizontally scrollable chip rail; the current
14
- * level is highlighted, passed levels render solid, future ones muted. */
15
- declare function LevelLadder({ levels, currentLevel, className }: LevelLadderProps): react_jsx_runtime.JSX.Element;
16
-
17
- export { LevelLadder, type LevelLadderProps };
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- interface LevelLadderProps {
4
- levels: {
5
- level: number;
6
- name: string;
7
- xpRequired: number;
8
- badgeColor: string;
9
- }[];
10
- currentLevel: number;
11
- className?: string;
12
- }
13
- /** The full level arc as a horizontally scrollable chip rail; the current
14
- * level is highlighted, passed levels render solid, future ones muted. */
15
- declare function LevelLadder({ levels, currentLevel, className }: LevelLadderProps): react_jsx_runtime.JSX.Element;
16
-
17
- export { LevelLadder, type LevelLadderProps };
@@ -1,30 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../utils/cn.js";
3
- function LevelLadder({ levels, currentLevel, className }) {
4
- return /* @__PURE__ */ jsx("div", { className: cn("flex gap-2 overflow-x-auto pb-2", className), children: levels.map((l) => {
5
- const state = l.level < currentLevel ? "done" : l.level === currentLevel ? "current" : "future";
6
- return /* @__PURE__ */ jsxs(
7
- "div",
8
- {
9
- title: `${l.xpRequired.toLocaleString()} XP`,
10
- className: cn(
11
- "flex shrink-0 select-none flex-col items-center gap-0.5 rounded-lg border px-2.5 py-1.5",
12
- state === "future" && "opacity-45"
13
- ),
14
- style: {
15
- borderColor: state === "current" ? l.badgeColor : `${l.badgeColor}40`,
16
- backgroundColor: state === "current" ? `${l.badgeColor}22` : `${l.badgeColor}0d`
17
- },
18
- children: [
19
- /* @__PURE__ */ jsx("span", { className: "text-2xs font-black tabular-nums", style: { color: l.badgeColor }, children: l.level }),
20
- /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-2xs font-semibold", style: { color: l.badgeColor }, children: l.name })
21
- ]
22
- },
23
- l.level
24
- );
25
- }) });
26
- }
27
- export {
28
- LevelLadder
29
- };
30
- //# sourceMappingURL=level-ladder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/rewards/level-ladder.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelLadderProps {\n levels: { level: number; name: string; xpRequired: number; badgeColor: string }[];\n currentLevel: number;\n className?: string;\n}\n\n/** The full level arc as a horizontally scrollable chip rail; the current\n * level is highlighted, passed levels render solid, future ones muted. */\nexport function LevelLadder({ levels, currentLevel, className }: LevelLadderProps) {\n return (\n <div className={cn(\"flex gap-2 overflow-x-auto pb-2\", className)}>\n {levels.map((l) => {\n const state = l.level < currentLevel ? \"done\" : l.level === currentLevel ? \"current\" : \"future\";\n return (\n <div\n key={l.level}\n title={`${l.xpRequired.toLocaleString()} XP`}\n className={cn(\n \"flex shrink-0 select-none flex-col items-center gap-0.5 rounded-lg border px-2.5 py-1.5\",\n state === \"future\" && \"opacity-45\"\n )}\n style={{\n borderColor: state === \"current\" ? l.badgeColor : `${l.badgeColor}40`,\n backgroundColor: state === \"current\" ? `${l.badgeColor}22` : `${l.badgeColor}0d`,\n }}\n >\n <span className=\"text-2xs font-black tabular-nums\" style={{ color: l.badgeColor }}>\n {l.level}\n </span>\n <span className=\"whitespace-nowrap text-2xs font-semibold\" style={{ color: l.badgeColor }}>\n {l.name}\n </span>\n </div>\n );\n })}\n </div>\n );\n}\n"],"mappings":"AAgBU,SAYE,KAZF;AAhBV,SAAS,UAAU;AAUZ,SAAS,YAAY,EAAE,QAAQ,cAAc,UAAU,GAAqB;AACjF,SACE,oBAAC,SAAI,WAAW,GAAG,mCAAmC,SAAS,GAC5D,iBAAO,IAAI,CAAC,MAAM;AACjB,UAAM,QAAQ,EAAE,QAAQ,eAAe,SAAS,EAAE,UAAU,eAAe,YAAY;AACvF,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,GAAG,EAAE,WAAW,eAAe,CAAC;AAAA,QACvC,WAAW;AAAA,UACT;AAAA,UACA,UAAU,YAAY;AAAA,QACxB;AAAA,QACA,OAAO;AAAA,UACL,aAAa,UAAU,YAAY,EAAE,aAAa,GAAG,EAAE,UAAU;AAAA,UACjE,iBAAiB,UAAU,YAAY,GAAG,EAAE,UAAU,OAAO,GAAG,EAAE,UAAU;AAAA,QAC9E;AAAA,QAEA;AAAA,8BAAC,UAAK,WAAU,oCAAmC,OAAO,EAAE,OAAO,EAAE,WAAW,GAC7E,YAAE,OACL;AAAA,UACA,oBAAC,UAAK,WAAU,4CAA2C,OAAO,EAAE,OAAO,EAAE,WAAW,GACrF,YAAE,MACL;AAAA;AAAA;AAAA,MAhBK,EAAE;AAAA,IAiBT;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}