@burdenoff/microfe-coolandlovely 2026.827.1 → 2026.1024.1

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 (71) hide show
  1. package/dist/coolandlovely/components/ActivityTrail.js +7 -7
  2. package/dist/coolandlovely/components/Comments.js +4 -4
  3. package/dist/coolandlovely/components/FeedbackWidget.d.ts.map +1 -1
  4. package/dist/coolandlovely/components/FeedbackWidget.js +72 -70
  5. package/dist/coolandlovely/components/FeedbackWidget.js.map +1 -1
  6. package/dist/coolandlovely/components/LookCard.js +24 -24
  7. package/dist/coolandlovely/components/StateViews.d.ts.map +1 -1
  8. package/dist/coolandlovely/components/StateViews.js +35 -26
  9. package/dist/coolandlovely/components/StateViews.js.map +1 -1
  10. package/dist/coolandlovely/components/StatusBadge.d.ts.map +1 -1
  11. package/dist/coolandlovely/components/StatusBadge.js +45 -15
  12. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  13. package/dist/coolandlovely/components/VisibilityChip.d.ts.map +1 -1
  14. package/dist/coolandlovely/components/VisibilityChip.js +22 -17
  15. package/dist/coolandlovely/components/VisibilityChip.js.map +1 -1
  16. package/dist/coolandlovely/hooks/index.d.ts +1 -0
  17. package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
  18. package/dist/coolandlovely/hooks/index.js +2 -1
  19. package/dist/coolandlovely/hooks/useTr.d.ts +2 -0
  20. package/dist/coolandlovely/hooks/useTr.d.ts.map +1 -0
  21. package/dist/coolandlovely/hooks/useTr.js +14 -0
  22. package/dist/coolandlovely/hooks/useTr.js.map +1 -0
  23. package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
  24. package/dist/coolandlovely/pages/HomePage.js +172 -132
  25. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  26. package/dist/coolandlovely/pages/admin/AdminBrandsPage.js +10 -10
  27. package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.js +16 -16
  28. package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.js +17 -17
  29. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +22 -22
  30. package/dist/coolandlovely/pages/brands/BrandFormPage.js +9 -9
  31. package/dist/coolandlovely/pages/brands/BrandsListPage.d.ts.map +1 -1
  32. package/dist/coolandlovely/pages/brands/BrandsListPage.js +80 -76
  33. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
  34. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +21 -21
  35. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +7 -7
  36. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.d.ts.map +1 -1
  37. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +82 -81
  38. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  39. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +19 -19
  40. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +9 -9
  41. package/dist/coolandlovely/pages/collections/CollectionsListPage.d.ts.map +1 -1
  42. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +54 -55
  43. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
  44. package/dist/coolandlovely/pages/discover/DiscoverPage.d.ts.map +1 -1
  45. package/dist/coolandlovely/pages/discover/DiscoverPage.js +322 -315
  46. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
  47. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +21 -21
  48. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +10 -10
  49. package/dist/coolandlovely/pages/items/StyleItemsListPage.d.ts.map +1 -1
  50. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +105 -95
  51. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
  52. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +20 -20
  53. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.d.ts.map +1 -1
  55. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +88 -79
  56. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
  57. package/dist/coolandlovely/pages/looks/LookDetailPage.js +18 -18
  58. package/dist/coolandlovely/pages/looks/LookFormPage.js +6 -6
  59. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
  60. package/dist/coolandlovely/pages/looks/LooksListPage.d.ts.map +1 -1
  61. package/dist/coolandlovely/pages/looks/LooksListPage.js +94 -94
  62. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  63. package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
  64. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +226 -199
  65. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  66. package/dist/coolandlovely/pages/trends/TrendsPage.js +8 -8
  67. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +5 -5
  68. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
  69. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +71 -69
  70. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  71. package/package.json +1 -1
@@ -1,129 +1,130 @@
1
1
  import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
6
- import { useCollaborations as o } from "../../hooks/useCoolAndLovelyApi.js";
7
- import { formatDate as s, formatPrice as c, titleCase as l } from "../../utils/formatters.js";
4
+ import { useCollaborations as r } from "../../hooks/useCoolAndLovelyApi.js";
5
+ import { useTr as i } from "../../hooks/useTr.js";
8
6
  import "../../hooks/index.js";
9
- import { EmptyState as u } from "../../components/EmptyState.js";
10
- import { ActorName as d } from "../../components/ActorName.js";
11
- import { BrandCreatorAvatars as f } from "../../components/BrandCreatorAvatars.js";
12
- import { useState as p } from "react";
13
- import { Handshake as m, Plus as h } from "lucide-react";
14
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
7
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
8
+ import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
9
+ import { formatDate as c, formatPrice as l, titleCase as u } from "../../utils/formatters.js";
10
+ import { EmptyState as d } from "../../components/EmptyState.js";
11
+ import { ActorName as f } from "../../components/ActorName.js";
12
+ import { BrandCreatorAvatars as p } from "../../components/BrandCreatorAvatars.js";
13
+ import { useMemo as m, useState as h } from "react";
14
+ import { Handshake as g, Plus as _ } from "lucide-react";
15
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
16
  //#region src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx
16
- var v = [
17
- {
18
- value: "ALL",
19
- label: "All"
20
- },
21
- {
22
- value: "PROPOSED",
23
- label: "Proposed"
24
- },
25
- {
26
- value: "ACCEPTED",
27
- label: "Accepted"
28
- },
29
- {
30
- value: "IN_PROGRESS",
31
- label: "In progress"
32
- },
33
- {
34
- value: "PUBLISHED",
35
- label: "Published"
36
- },
37
- {
38
- value: "DECLINED",
39
- label: "Declined"
40
- },
41
- {
42
- value: "CANCELLED",
43
- label: "Cancelled"
44
- }
17
+ var b = [
18
+ "PROPOSED",
19
+ "ACCEPTED",
20
+ "IN_PROGRESS",
21
+ "PUBLISHED",
22
+ "DECLINED",
23
+ "CANCELLED"
45
24
  ];
46
- function y() {
47
- let { navigateTo: y } = e(), [b, x] = p("ALL"), S = o({ status: b === "ALL" ? void 0 : b }), C = S.data ?? [];
48
- return /* @__PURE__ */ _(n, {
49
- title: "Collaborations",
50
- description: "Brand × creator partnerships with a real lifecycle",
51
- actions: /* @__PURE__ */ _("button", {
25
+ function x(e) {
26
+ return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
27
+ }
28
+ function S() {
29
+ let { navigateTo: S } = e(), C = i(), [w, T] = h("ALL"), E = m(() => [{
30
+ value: "ALL",
31
+ label: C("coolandlovely.filters.all", "All")
32
+ }, ...b.map((e) => ({
33
+ value: e,
34
+ label: C(`coolandlovely.status.${e.toLowerCase()}`, x(e))
35
+ }))], [C]), D = r({ status: w === "ALL" ? void 0 : w }), O = D.data ?? [];
36
+ return /* @__PURE__ */ y(n, {
37
+ title: C("coolandlovely.page.collaborationsTitle", "Collaborations"),
38
+ description: C("coolandlovely.page.collaborationsSubtitle", "Brand × creator partnerships with a real lifecycle"),
39
+ actions: /* @__PURE__ */ y("button", {
52
40
  type: "button",
53
- onClick: () => y("/collaborations/new"),
41
+ onClick: () => S("/collaborations/new"),
54
42
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
55
- children: [/* @__PURE__ */ g(h, { className: "h-4 w-4" }), " New collaboration"]
43
+ children: [
44
+ /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
45
+ " ",
46
+ C("coolandlovely.actions.newCollaboration", "New collaboration")
47
+ ]
56
48
  }),
57
- children: [/* @__PURE__ */ g("div", {
49
+ children: [/* @__PURE__ */ v("div", {
58
50
  className: "mb-6 flex flex-wrap items-center gap-2",
59
- children: v.map((e) => /* @__PURE__ */ g("button", {
51
+ children: E.map((e) => /* @__PURE__ */ v("button", {
60
52
  type: "button",
61
- onClick: () => x(e.value),
62
- className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", b === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
53
+ onClick: () => T(e.value),
54
+ className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", w === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
63
55
  children: e.label
64
56
  }, e.value))
65
- }), S.isLoading ? /* @__PURE__ */ g(a, { label: "Loading collaborations…" }) : S.isError ? /* @__PURE__ */ g(i, { onRetry: () => void S.refetch() }) : C.length === 0 ? /* @__PURE__ */ g(u, {
57
+ }), D.isLoading ? /* @__PURE__ */ v(s, { label: C("coolandlovely.loading.collaborations", "Loading collaborations…") }) : D.isError ? /* @__PURE__ */ v(o, { onRetry: () => void D.refetch() }) : O.length === 0 ? /* @__PURE__ */ v(d, {
66
58
  illustration: "empty-data",
67
- icon: /* @__PURE__ */ g(m, { className: "h-10 w-10" }),
68
- title: "No collaborations yet",
69
- description: "Propose a brand × creator partnership to get started.",
70
- action: /* @__PURE__ */ _("button", {
59
+ icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
60
+ title: C("coolandlovely.empty.collaborationsTitle", "No collaborations yet"),
61
+ description: C("coolandlovely.empty.collaborationsDescription", "Propose a brand × creator partnership to get started."),
62
+ action: /* @__PURE__ */ y("button", {
71
63
  type: "button",
72
- onClick: () => y("/collaborations/new"),
64
+ onClick: () => S("/collaborations/new"),
73
65
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
74
- children: [/* @__PURE__ */ g(h, { className: "h-4 w-4" }), " New collaboration"]
66
+ children: [
67
+ /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
68
+ " ",
69
+ C("coolandlovely.actions.newCollaboration", "New collaboration")
70
+ ]
75
71
  })
76
- }) : /* @__PURE__ */ g("div", {
72
+ }) : /* @__PURE__ */ v("div", {
77
73
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
78
- children: C.map((e) => /* @__PURE__ */ _("button", {
74
+ children: O.map((e) => /* @__PURE__ */ y("button", {
79
75
  type: "button",
80
- onClick: () => y(`/collaborations/${e.id}`),
76
+ onClick: () => S(`/collaborations/${e.id}`),
81
77
  className: "flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md",
82
78
  children: [
83
- /* @__PURE__ */ _("div", {
79
+ /* @__PURE__ */ y("div", {
84
80
  className: "flex items-start gap-3",
85
81
  children: [
86
- /* @__PURE__ */ g(f, {
82
+ /* @__PURE__ */ v(p, {
87
83
  brandLogoFileId: e.brand?.logo?.id,
88
84
  brandSeed: e.brandId,
89
85
  creatorId: e.creatorId,
90
86
  size: "sm",
91
87
  className: "shrink-0"
92
88
  }),
93
- /* @__PURE__ */ _("div", {
89
+ /* @__PURE__ */ y("div", {
94
90
  className: "min-w-0 flex-1",
95
- children: [/* @__PURE__ */ g("h3", {
91
+ children: [/* @__PURE__ */ v("h3", {
96
92
  className: "truncate text-base font-semibold text-text-primary",
97
93
  children: e.title
98
- }), /* @__PURE__ */ _("p", {
94
+ }), /* @__PURE__ */ y("p", {
99
95
  className: "truncate text-xs text-text-secondary",
100
96
  children: [
101
- e.brand?.name ?? "Brand",
102
- " × ",
103
- /* @__PURE__ */ g(d, { id: e.creatorId })
97
+ e.brand?.name ?? C("coolandlovely.common.brand", "Brand"),
98
+ " ×",
99
+ " ",
100
+ /* @__PURE__ */ v(f, { id: e.creatorId })
104
101
  ]
105
102
  })]
106
103
  }),
107
- /* @__PURE__ */ g(r, { status: e.status })
104
+ /* @__PURE__ */ v(a, { status: e.status })
108
105
  ]
109
106
  }),
110
- e.brief && /* @__PURE__ */ g("p", {
107
+ e.brief && /* @__PURE__ */ v("p", {
111
108
  className: "mt-3 line-clamp-2 text-sm text-text-secondary",
112
109
  children: e.brief
113
110
  }),
114
- /* @__PURE__ */ _("div", {
111
+ /* @__PURE__ */ y("div", {
115
112
  className: "mt-3 flex items-center justify-between text-xs text-text-secondary",
116
- children: [/* @__PURE__ */ g("span", {
113
+ children: [/* @__PURE__ */ v("span", {
117
114
  className: "rounded-full bg-bg-sunken px-2 py-0.5",
118
- children: l(e.role)
119
- }), /* @__PURE__ */ g("span", { children: c(e.compensation, e.currency) })]
115
+ children: C(`coolandlovely.role.${e.role.toLowerCase()}`, u(e.role))
116
+ }), /* @__PURE__ */ v("span", { children: l(e.compensation, e.currency) })]
120
117
  }),
121
- e.startDate && /* @__PURE__ */ _("p", {
118
+ e.startDate && /* @__PURE__ */ y("p", {
122
119
  className: "mt-2 text-xs text-text-secondary",
123
- children: ["Starts ", s(e.startDate, {
124
- hour: void 0,
125
- minute: void 0
126
- })]
120
+ children: [
121
+ C("coolandlovely.common.starts", "Starts"),
122
+ " ",
123
+ c(e.startDate, {
124
+ hour: void 0,
125
+ minute: void 0
126
+ })
127
+ ]
127
128
  })
128
129
  ]
129
130
  }, e.id))
@@ -131,6 +132,6 @@ function y() {
131
132
  });
132
133
  }
133
134
  //#endregion
134
- export { y as CollaborationsListPage };
135
+ export { S as CollaborationsListPage };
135
136
 
136
137
  //# sourceMappingURL=CollaborationsListPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"sourcesContent":["/**\n * Collaborations List Page\n * @module coolandlovely/pages/collaborations\n *\n * Lists brand × creator partnerships (`cooListCollaborations`) with status\n * filter.\n */\n\nimport { useState } from 'react';\nimport { Plus, Handshake } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { BrandCreatorAvatars } from '../../components/BrandCreatorAvatars';\nimport { ActorName } from '../../components/ActorName';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useCollaborations } from '../../hooks';\nimport { formatPrice, formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\nimport type { CooCollaborationStatus } from '../../types';\n\nconst STATUS_OPTIONS: Array<{ value: CooCollaborationStatus | 'ALL'; label: string }> = [\n { value: 'ALL', label: 'All' },\n { value: 'PROPOSED', label: 'Proposed' },\n { value: 'ACCEPTED', label: 'Accepted' },\n { value: 'IN_PROGRESS', label: 'In progress' },\n { value: 'PUBLISHED', label: 'Published' },\n { value: 'DECLINED', label: 'Declined' },\n { value: 'CANCELLED', label: 'Cancelled' },\n];\n\nexport function CollaborationsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const [status, setStatus] = useState<CooCollaborationStatus | 'ALL'>('ALL');\n\n const query = useCollaborations({ status: status === 'ALL' ? undefined : status });\n const collaborations = query.data ?? [];\n\n return (\n <PageLayout\n title=\"Collaborations\"\n description=\"Brand × creator partnerships with a real lifecycle\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" /> New collaboration\n </button>\n }\n >\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {STATUS_OPTIONS.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView label=\"Loading collaborations…\" />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collaborations.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Handshake className=\"h-10 w-10\" />}\n title=\"No collaborations yet\"\n description=\"Propose a brand × creator partnership to get started.\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" /> New collaboration\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collaborations.map((c) => (\n <button\n key={c.id}\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${c.id}`)}\n className=\"flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md\"\n >\n <div className=\"flex items-start gap-3\">\n <BrandCreatorAvatars\n brandLogoFileId={c.brand?.logo?.id}\n brandSeed={c.brandId}\n creatorId={c.creatorId}\n size=\"sm\"\n className=\"shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary\">{c.title}</h3>\n <p className=\"truncate text-xs text-text-secondary\">\n {c.brand?.name ?? 'Brand'} × <ActorName id={c.creatorId} />\n </p>\n </div>\n <StatusBadge status={c.status} />\n </div>\n {c.brief && (\n <p className=\"mt-3 line-clamp-2 text-sm text-text-secondary\">{c.brief}</p>\n )}\n <div className=\"mt-3 flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"rounded-full bg-bg-sunken px-2 py-0.5\">{titleCase(c.role)}</span>\n <span>{formatPrice(c.compensation, c.currency)}</span>\n </div>\n {c.startDate && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n Starts {formatDate(c.startDate, { hour: undefined, minute: undefined })}\n </p>\n )}\n </button>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,IAAM,IAAkF;CACtF;EAAE,OAAO;EAAO,OAAO;EAAO;CAC9B;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAe,OAAO;EAAe;CAC9C;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAa,OAAO;EAAa;CAC3C;AAED,SAAgB,IAAyB;CACvC,IAAM,EAAE,kBAAe,GAAkB,EACnC,CAAC,GAAQ,KAAa,EAAyC,MAAM,EAErE,IAAQ,EAAkB,EAAE,QAAQ,MAAW,QAAQ,KAAA,IAAY,GAAQ,CAAC,EAC5E,IAAiB,EAAM,QAAQ,EAAE;AAEvC,QACE,kBAAC,GAAD;EACE,OAAM;EACN,aAAY;EACZ,SACE,kBAAC,UAAD;GACE,MAAK;GACL,eAAe,EAAW,sBAAsB;GAChD,WAAU;aAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,qBACrB;;YAVb,CAaE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAe,KAAK,MACnB,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe,EAAU,EAAI,MAAM;IACnC,WAAW,EACT,kEACA,MAAW,EAAI,QACX,kDACA,2DACL;cAEA,EAAI;IACE,EAXF,EAAI,MAWF,CACT;GACE,CAAA,EAEL,EAAM,YACL,kBAAC,GAAD,EAAa,OAAM,2BAA4B,CAAA,GAC7C,EAAM,UACR,kBAAC,GAAD,EAAW,eAAe,KAAK,EAAM,SAAS,EAAI,CAAA,GAChD,EAAe,WAAW,IAC5B,kBAAC,GAAD;GACE,cAAa;GACb,MAAM,kBAAC,GAAD,EAAW,WAAU,aAAc,CAAA;GACzC,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAW,sBAAsB;IAChD,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,qBACrB;;GAEX,CAAA,GAEF,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAe,KAAK,MACnB,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe,EAAW,mBAAmB,EAAE,KAAK;IACpD,WAAU;cAJZ;KAME,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,GAAD;QACE,iBAAiB,EAAE,OAAO,MAAM;QAChC,WAAW,EAAE;QACb,WAAW,EAAE;QACb,MAAK;QACL,WAAU;QACV,CAAA;OACF,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,MAAD;SAAI,WAAU;mBAAsD,EAAE;SAAW,CAAA,EACjF,kBAAC,KAAD;SAAG,WAAU;mBAAb;UACG,EAAE,OAAO,QAAQ;UAAQ;UAAG,kBAAC,GAAD,EAAW,IAAI,EAAE,WAAa,CAAA;UACzD;WACA;;OACN,kBAAC,GAAD,EAAa,QAAQ,EAAE,QAAU,CAAA;OAC7B;;KACL,EAAE,SACD,kBAAC,KAAD;MAAG,WAAU;gBAAiD,EAAE;MAAU,CAAA;KAE5E,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAyC,EAAU,EAAE,KAAK;OAAQ,CAAA,EAClF,kBAAC,QAAD,EAAA,UAAO,EAAY,EAAE,cAAc,EAAE,SAAS,EAAQ,CAAA,CAClD;;KACL,EAAE,aACD,kBAAC,KAAD;MAAG,WAAU;gBAAb,CAAgD,WACtC,EAAW,EAAE,WAAW;OAAE,MAAM,KAAA;OAAW,QAAQ,KAAA;OAAW,CAAC,CACrE;;KAEC;MAjCF,EAAE,GAiCA,CACT;GACE,CAAA,CAEG"}
1
+ {"version":3,"file":"CollaborationsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"sourcesContent":["/**\n * Collaborations List Page\n * @module coolandlovely/pages/collaborations\n *\n * Lists brand × creator partnerships (`cooListCollaborations`) with status\n * filter.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Plus, Handshake } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { BrandCreatorAvatars } from '../../components/BrandCreatorAvatars';\nimport { ActorName } from '../../components/ActorName';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useCollaborations, useTr } from '../../hooks';\nimport { formatPrice, formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\nimport type { CooCollaborationStatus } from '../../types';\n\nconst STATUS_ORDER: CooCollaborationStatus[] = [\n 'PROPOSED',\n 'ACCEPTED',\n 'IN_PROGRESS',\n 'PUBLISHED',\n 'DECLINED',\n 'CANCELLED',\n];\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\nexport function CollaborationsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const tr = useTr();\n const [status, setStatus] = useState<CooCollaborationStatus | 'ALL'>('ALL');\n\n const statusOptions = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('coolandlovely.filters.all', 'All') },\n ...STATUS_ORDER.map((value) => ({\n value,\n label: tr(`coolandlovely.status.${value.toLowerCase()}`, formatStatusLabel(value)),\n })),\n ],\n [tr]\n );\n\n const query = useCollaborations({ status: status === 'ALL' ? undefined : status });\n const collaborations = query.data ?? [];\n\n return (\n <PageLayout\n title={tr('coolandlovely.page.collaborationsTitle', 'Collaborations')}\n description={tr(\n 'coolandlovely.page.collaborationsSubtitle',\n 'Brand × creator partnerships with a real lifecycle'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n >\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {statusOptions.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView\n label={tr('coolandlovely.loading.collaborations', 'Loading collaborations…')}\n />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collaborations.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Handshake className=\"h-10 w-10\" />}\n title={tr('coolandlovely.empty.collaborationsTitle', 'No collaborations yet')}\n description={tr(\n 'coolandlovely.empty.collaborationsDescription',\n 'Propose a brand × creator partnership to get started.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collaborations.map((c) => (\n <button\n key={c.id}\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${c.id}`)}\n className=\"flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md\"\n >\n <div className=\"flex items-start gap-3\">\n <BrandCreatorAvatars\n brandLogoFileId={c.brand?.logo?.id}\n brandSeed={c.brandId}\n creatorId={c.creatorId}\n size=\"sm\"\n className=\"shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary\">{c.title}</h3>\n <p className=\"truncate text-xs text-text-secondary\">\n {c.brand?.name ?? tr('coolandlovely.common.brand', 'Brand')} ×{' '}\n <ActorName id={c.creatorId} />\n </p>\n </div>\n <StatusBadge status={c.status} />\n </div>\n {c.brief && (\n <p className=\"mt-3 line-clamp-2 text-sm text-text-secondary\">{c.brief}</p>\n )}\n <div className=\"mt-3 flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"rounded-full bg-bg-sunken px-2 py-0.5\">\n {tr(`coolandlovely.role.${c.role.toLowerCase()}`, titleCase(c.role))}\n </span>\n <span>{formatPrice(c.compensation, c.currency)}</span>\n </div>\n {c.startDate && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {tr('coolandlovely.common.starts', 'Starts')}{' '}\n {formatDate(c.startDate, { hour: undefined, minute: undefined })}\n </p>\n )}\n </button>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":"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"}
@@ -1,12 +1,12 @@
1
1
  import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { StatusBadge as n } from "../../components/StatusBadge.js";
4
- import { ErrorView as r, LoadingView as i } from "../../components/StateViews.js";
5
- import { Thumbnail as a } from "../../components/Thumbnail.js";
6
- import { useArchiveCollection as o, useCollection as s, usePublishCollection as c } from "../../hooks/useCoolAndLovelyApi.js";
7
- import { formatDate as l, formatPrice as u, titleCase as d } from "../../utils/formatters.js";
8
- import { useAssistantEntityName as f } from "../../hooks/useAssistantEntity.js";
3
+ import { useArchiveCollection as n, useCollection as r, usePublishCollection as i } from "../../hooks/useCoolAndLovelyApi.js";
4
+ import { useAssistantEntityName as a } from "../../hooks/useAssistantEntity.js";
9
5
  import "../../hooks/index.js";
6
+ import { StatusBadge as o } from "../../components/StatusBadge.js";
7
+ import { ErrorView as s, LoadingView as c } from "../../components/StateViews.js";
8
+ import { Thumbnail as l } from "../../components/Thumbnail.js";
9
+ import { formatDate as u, formatPrice as d, titleCase as f } from "../../utils/formatters.js";
10
10
  import { categoryIcon as p } from "../../utils/icons.js";
11
11
  import { TagList as m } from "../../components/TagList.js";
12
12
  import { ColourSwatchRow as h } from "../../components/ColourSwatchRow.js";
@@ -16,14 +16,14 @@ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
16
16
  import { GlassCard as O } from "@burdenoff/fe-libs/ui";
17
17
  //#region src/coolandlovely/pages/collections/CollectionDetailPage.tsx
18
18
  function k() {
19
- let { collectionId: k } = w(), { navigateTo: A } = e(), j = s(k), M = c(), N = o();
20
- if (f(k, j.data?.name), j.isLoading) return /* @__PURE__ */ E(t, {
19
+ let { collectionId: k } = w(), { navigateTo: A } = e(), j = r(k), M = i(), N = n();
20
+ if (a(k, j.data?.name), j.isLoading) return /* @__PURE__ */ E(t, {
21
21
  title: "Collection",
22
- children: /* @__PURE__ */ E(i, { label: "Loading collection…" })
22
+ children: /* @__PURE__ */ E(c, { label: "Loading collection…" })
23
23
  });
24
24
  if (j.isError || !j.data) return /* @__PURE__ */ E(t, {
25
25
  title: "Collection",
26
- children: /* @__PURE__ */ E(r, {
26
+ children: /* @__PURE__ */ E(s, {
27
27
  title: "Collection not found",
28
28
  onRetry: () => void j.refetch()
29
29
  })
@@ -70,7 +70,7 @@ function k() {
70
70
  children: [/* @__PURE__ */ D(O, {
71
71
  treatment: "glass",
72
72
  className: "group overflow-hidden p-0",
73
- children: [/* @__PURE__ */ E(a, {
73
+ children: [/* @__PURE__ */ E(l, {
74
74
  icon: /* @__PURE__ */ E(S, { className: "h-12 w-12" }),
75
75
  seed: P.id,
76
76
  fileId: P.cover?.id,
@@ -94,11 +94,11 @@ function k() {
94
94
  }),
95
95
  /* @__PURE__ */ E("span", {
96
96
  className: "rounded-full border border-border-seam bg-bg-surface/80 px-2.5 py-0.5 text-xs font-medium text-text-primary backdrop-blur-sm",
97
- children: d(P.season)
97
+ children: f(P.season)
98
98
  })
99
99
  ]
100
100
  })]
101
- }), /* @__PURE__ */ E(n, {
101
+ }), /* @__PURE__ */ E(o, {
102
102
  status: P.status,
103
103
  className: "shrink-0 shadow-sm"
104
104
  })]
@@ -133,7 +133,7 @@ function k() {
133
133
  type: "button",
134
134
  onClick: () => A(`/items/${e.id}`),
135
135
  className: "group overflow-hidden rounded-lg border border-border-seam bg-bg-surface text-left transition-all hover:border-accent-foreground/20 hover:shadow-md",
136
- children: [/* @__PURE__ */ E(a, {
136
+ children: [/* @__PURE__ */ E(l, {
137
137
  icon: p(e.category, 28),
138
138
  seed: e.id,
139
139
  fileId: e.image?.id,
@@ -148,7 +148,7 @@ function k() {
148
148
  }),
149
149
  /* @__PURE__ */ E("p", {
150
150
  className: "mt-0.5 text-xs font-semibold text-text-primary tabular-nums",
151
- children: u(e.price, e.currency)
151
+ children: d(e.price, e.currency)
152
152
  }),
153
153
  e.colours.length > 0 && /* @__PURE__ */ E(h, {
154
154
  colours: e.colours,
@@ -186,7 +186,7 @@ function k() {
186
186
  children: "Season"
187
187
  }), /* @__PURE__ */ E("dd", {
188
188
  className: "text-text-primary",
189
- children: d(P.season)
189
+ children: f(P.season)
190
190
  })]
191
191
  }),
192
192
  /* @__PURE__ */ D("div", {
@@ -196,7 +196,7 @@ function k() {
196
196
  children: "Publish at"
197
197
  }), /* @__PURE__ */ E("dd", {
198
198
  className: "text-text-primary",
199
- children: P.publishAt ? l(P.publishAt, {
199
+ children: P.publishAt ? u(P.publishAt, {
200
200
  hour: void 0,
201
201
  minute: void 0
202
202
  }) : "—"
@@ -209,7 +209,7 @@ function k() {
209
209
  children: "Ends at"
210
210
  }), /* @__PURE__ */ E("dd", {
211
211
  className: "text-text-primary",
212
- children: P.endAt ? l(P.endAt, {
212
+ children: P.endAt ? u(P.endAt, {
213
213
  hour: void 0,
214
214
  minute: void 0
215
215
  }) : "—"
@@ -222,7 +222,7 @@ function k() {
222
222
  type: "button",
223
223
  onClick: () => A(`/brands/${P.brand?.id}`),
224
224
  className: "flex w-full items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50",
225
- children: [/* @__PURE__ */ E(a, {
225
+ children: [/* @__PURE__ */ E(l, {
226
226
  icon: /* @__PURE__ */ E(C, { className: "h-5 w-5" }),
227
227
  seed: P.brand.id,
228
228
  className: "h-10 w-10 shrink-0"
@@ -1,10 +1,10 @@
1
1
  import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { ErrorView as n, LoadingView as r } from "../../components/StateViews.js";
4
- import { COO_FILE_FOLDERS as i } from "../../hooks/useFiles.js";
5
- import { useBrands as a, useCollection as o, useCreateCollection as s, useUpdateCollection as c } from "../../hooks/useCoolAndLovelyApi.js";
6
- import { parseCsv as l, titleCase as u } from "../../utils/formatters.js";
3
+ import { useBrands as n, useCollection as r, useCreateCollection as i, useUpdateCollection as a } from "../../hooks/useCoolAndLovelyApi.js";
4
+ import { COO_FILE_FOLDERS as o } from "../../hooks/useFiles.js";
7
5
  import "../../hooks/index.js";
6
+ import { ErrorView as s, LoadingView as c } from "../../components/StateViews.js";
7
+ import { parseCsv as l, titleCase as u } from "../../utils/formatters.js";
8
8
  import { SelectField as d, TextAreaField as f, TextField as p } from "../../components/Field.js";
9
9
  import { ImageUploadField as m } from "../../components/ImageUploadField.js";
10
10
  import { useEffect as h, useMemo as g, useState as _ } from "react";
@@ -41,10 +41,10 @@ function A(e) {
41
41
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
42
42
  }
43
43
  function j() {
44
- let { collectionId: j } = S(), [M] = C(), N = !!j, { navigateTo: P } = e(), F = o(N ? j : void 0), I = a({ pagination: {
44
+ let { collectionId: j } = S(), [M] = C(), N = !!j, { navigateTo: P } = e(), F = r(N ? j : void 0), I = n({ pagination: {
45
45
  limit: 100,
46
46
  offset: 0
47
- } }), L = s(), R = c(), [z, B] = _(() => ({
47
+ } }), L = i(), R = a(), [z, B] = _(() => ({
48
48
  ...O,
49
49
  brandId: M.get("brandId") ?? ""
50
50
  })), [V, H] = _({});
@@ -78,10 +78,10 @@ function j() {
78
78
  };
79
79
  return N && F.isLoading ? /* @__PURE__ */ w(t, {
80
80
  title: "Edit collection",
81
- children: /* @__PURE__ */ w(r, { label: "Loading collection…" })
81
+ children: /* @__PURE__ */ w(c, { label: "Loading collection…" })
82
82
  }) : N && (F.isError || !F.data) ? /* @__PURE__ */ w(t, {
83
83
  title: "Edit collection",
84
- children: /* @__PURE__ */ w(n, {
84
+ children: /* @__PURE__ */ w(s, {
85
85
  title: "Collection not found",
86
86
  onRetry: () => void F.refetch()
87
87
  })
@@ -204,7 +204,7 @@ function j() {
204
204
  aspect: "wide",
205
205
  value: z.coverFileId,
206
206
  onChange: (e) => U("coverFileId", e),
207
- folder: i.collections,
207
+ folder: o.collections,
208
208
  hint: "Represents the drop on cards and the collection page",
209
209
  className: "mt-4"
210
210
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collections/CollectionsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,wBAAgB,mBAAmB,gCAwElC"}
1
+ {"version":3,"file":"CollectionsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collections/CollectionsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,wBAAgB,mBAAmB,gCA2FlC"}
@@ -1,81 +1,80 @@
1
1
  import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { ErrorView as r, LoadingView as i } from "../../components/StateViews.js";
5
- import { useCollections as a } from "../../hooks/useCoolAndLovelyApi.js";
4
+ import { useCollections as r } from "../../hooks/useCoolAndLovelyApi.js";
5
+ import { useTr as i } from "../../hooks/useTr.js";
6
6
  import "../../hooks/index.js";
7
- import { EmptyState as o } from "../../components/EmptyState.js";
8
- import { CollectionCard as s } from "../../components/CollectionCard.js";
9
- import { useState as c } from "react";
10
- import { Plus as l, Shapes as u } from "lucide-react";
11
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
8
+ import { EmptyState as s } from "../../components/EmptyState.js";
9
+ import { CollectionCard as c } from "../../components/CollectionCard.js";
10
+ import { useMemo as l, useState as u } from "react";
11
+ import { Plus as d, Shapes as f } from "lucide-react";
12
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
13
  //#region src/coolandlovely/pages/collections/CollectionsListPage.tsx
13
- var p = [
14
- {
15
- value: "ALL",
16
- label: "All"
17
- },
18
- {
19
- value: "LIVE",
20
- label: "Live"
21
- },
22
- {
23
- value: "SCHEDULED",
24
- label: "Scheduled"
25
- },
26
- {
27
- value: "DRAFT",
28
- label: "Draft"
29
- },
30
- {
31
- value: "ENDED",
32
- label: "Ended"
33
- },
34
- {
35
- value: "ARCHIVED",
36
- label: "Archived"
37
- }
14
+ var h = [
15
+ "LIVE",
16
+ "SCHEDULED",
17
+ "DRAFT",
18
+ "ENDED",
19
+ "ARCHIVED"
38
20
  ];
39
- function m() {
40
- let { navigateTo: m } = e(), [h, g] = c("ALL"), _ = a({ status: h === "ALL" ? void 0 : h }), v = _.data ?? [];
41
- return /* @__PURE__ */ f(n, {
42
- title: "Collections",
43
- description: "Seasonal drops and curated edits grouped by brand",
44
- actions: /* @__PURE__ */ f("button", {
21
+ function g(e) {
22
+ return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
23
+ }
24
+ function _() {
25
+ let { navigateTo: _ } = e(), v = i(), [y, b] = u("ALL"), x = l(() => [{
26
+ value: "ALL",
27
+ label: v("coolandlovely.filters.all", "All")
28
+ }, ...h.map((e) => ({
29
+ value: e,
30
+ label: v(`coolandlovely.status.${e.toLowerCase()}`, g(e))
31
+ }))], [v]), S = r({ status: y === "ALL" ? void 0 : y }), C = S.data ?? [];
32
+ return /* @__PURE__ */ m(n, {
33
+ title: v("coolandlovely.page.collectionsTitle", "Collections"),
34
+ description: v("coolandlovely.page.collectionsSubtitle", "Seasonal drops and curated edits grouped by brand"),
35
+ actions: /* @__PURE__ */ m("button", {
45
36
  type: "button",
46
- onClick: () => m("/collections/new"),
37
+ onClick: () => _("/collections/new"),
47
38
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
48
- children: [/* @__PURE__ */ d(l, { className: "h-4 w-4" }), " New collection"]
39
+ children: [
40
+ /* @__PURE__ */ p(d, { className: "h-4 w-4" }),
41
+ " ",
42
+ v("coolandlovely.actions.newCollection", "New collection")
43
+ ]
49
44
  }),
50
- children: [/* @__PURE__ */ d("div", {
45
+ children: [/* @__PURE__ */ p("div", {
51
46
  className: "mb-6 flex flex-wrap items-center gap-2",
52
- children: p.map((e) => /* @__PURE__ */ d("button", {
47
+ children: x.map((e) => /* @__PURE__ */ p("button", {
53
48
  type: "button",
54
- onClick: () => g(e.value),
55
- className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", h === e.value ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
49
+ onClick: () => b(e.value),
50
+ className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", y === e.value ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
56
51
  children: e.label
57
52
  }, e.value))
58
- }), _.isLoading ? /* @__PURE__ */ d(i, { label: "Loading collections…" }) : _.isError ? /* @__PURE__ */ d(r, { onRetry: () => void _.refetch() }) : v.length === 0 ? /* @__PURE__ */ d(o, {
53
+ }), S.isLoading ? /* @__PURE__ */ p(o, { label: v("coolandlovely.loading.collections", "Loading collections…") }) : S.isError ? /* @__PURE__ */ p(a, { onRetry: () => void S.refetch() }) : C.length === 0 ? /* @__PURE__ */ p(s, {
59
54
  illustration: "empty-data",
60
- icon: /* @__PURE__ */ d(u, { className: "h-10 w-10" }),
61
- title: "No collections yet",
62
- description: "Group pieces into a seasonal drop to start a collection.",
63
- action: /* @__PURE__ */ f("button", {
55
+ icon: /* @__PURE__ */ p(f, { className: "h-10 w-10" }),
56
+ title: v("coolandlovely.empty.collectionsTitle", "No collections yet"),
57
+ description: v("coolandlovely.empty.collectionsDescription", "Group pieces into a seasonal drop to start a collection."),
58
+ action: /* @__PURE__ */ m("button", {
64
59
  type: "button",
65
- onClick: () => m("/collections/new"),
60
+ onClick: () => _("/collections/new"),
66
61
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
67
- children: [/* @__PURE__ */ d(l, { className: "h-4 w-4" }), " New collection"]
62
+ children: [
63
+ /* @__PURE__ */ p(d, { className: "h-4 w-4" }),
64
+ " ",
65
+ v("coolandlovely.actions.newCollection", "New collection")
66
+ ]
68
67
  })
69
- }) : /* @__PURE__ */ d("div", {
68
+ }) : /* @__PURE__ */ p("div", {
70
69
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
71
- children: v.map((e) => /* @__PURE__ */ d(s, {
70
+ children: C.map((e) => /* @__PURE__ */ p(c, {
72
71
  collection: e,
73
- onClick: () => m(`/collections/${e.id}`)
72
+ onClick: () => _(`/collections/${e.id}`)
74
73
  }, e.id))
75
74
  })]
76
75
  });
77
76
  }
78
77
  //#endregion
79
- export { m as CollectionsListPage };
78
+ export { _ as CollectionsListPage };
80
79
 
81
80
  //# sourceMappingURL=CollectionsListPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collections/CollectionsListPage.tsx"],"sourcesContent":["/**\n * Collections List Page\n * @module coolandlovely/pages/collections\n *\n * Lists seasonal collections (`cooListCollections`) with status filter.\n */\n\nimport { useState } from 'react';\nimport { Plus, Shapes } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { CollectionCard } from '../../components/CollectionCard';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useCollections } from '../../hooks';\nimport { cn } from '../../utils/cn';\nimport type { CooCollectionStatus } from '../../types';\n\nconst STATUS_OPTIONS: Array<{ value: CooCollectionStatus | 'ALL'; label: string }> = [\n { value: 'ALL', label: 'All' },\n { value: 'LIVE', label: 'Live' },\n { value: 'SCHEDULED', label: 'Scheduled' },\n { value: 'DRAFT', label: 'Draft' },\n { value: 'ENDED', label: 'Ended' },\n { value: 'ARCHIVED', label: 'Archived' },\n];\n\nexport function CollectionsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const [status, setStatus] = useState<CooCollectionStatus | 'ALL'>('ALL');\n\n const query = useCollections({ status: status === 'ALL' ? undefined : status });\n const collections = query.data ?? [];\n\n return (\n <PageLayout\n title=\"Collections\"\n description=\"Seasonal drops and curated edits grouped by brand\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collections/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" /> New collection\n </button>\n }\n >\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {STATUS_OPTIONS.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-accent-purple-subtle text-text-primary'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView label=\"Loading collections…\" />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collections.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Shapes className=\"h-10 w-10\" />}\n title=\"No collections yet\"\n description=\"Group pieces into a seasonal drop to start a collection.\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collections/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" /> New collection\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collections.map((collection) => (\n <CollectionCard\n key={collection.id}\n collection={collection}\n onClick={() => navigateTo(`/collections/${collection.id}`)}\n />\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAM,IAA+E;CACnF;EAAE,OAAO;EAAO,OAAO;EAAO;CAC9B;EAAE,OAAO;EAAQ,OAAO;EAAQ;CAChC;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAS,OAAO;EAAS;CAClC;EAAE,OAAO;EAAS,OAAO;EAAS;CAClC;EAAE,OAAO;EAAY,OAAO;EAAY;CACzC;AAED,SAAgB,IAAsB;CACpC,IAAM,EAAE,kBAAe,GAAkB,EACnC,CAAC,GAAQ,KAAa,EAAsC,MAAM,EAElE,IAAQ,EAAe,EAAE,QAAQ,MAAW,QAAQ,KAAA,IAAY,GAAQ,CAAC,EACzE,IAAc,EAAM,QAAQ,EAAE;AAEpC,QACE,kBAAC,GAAD;EACE,OAAM;EACN,aAAY;EACZ,SACE,kBAAC,UAAD;GACE,MAAK;GACL,eAAe,EAAW,mBAAmB;GAC7C,WAAU;aAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,kBACrB;;YAVb,CAaE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAe,KAAK,MACnB,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe,EAAU,EAAI,MAAM;IACnC,WAAW,EACT,kEACA,MAAW,EAAI,QACX,8CACA,2DACL;cAEA,EAAI;IACE,EAXF,EAAI,MAWF,CACT;GACE,CAAA,EAEL,EAAM,YACL,kBAAC,GAAD,EAAa,OAAM,wBAAyB,CAAA,GAC1C,EAAM,UACR,kBAAC,GAAD,EAAW,eAAe,KAAK,EAAM,SAAS,EAAI,CAAA,GAChD,EAAY,WAAW,IACzB,kBAAC,GAAD;GACE,cAAa;GACb,MAAM,kBAAC,GAAD,EAAQ,WAAU,aAAc,CAAA;GACtC,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAW,mBAAmB;IAC7C,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,kBACrB;;GAEX,CAAA,GAEF,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAY,KAAK,MAChB,kBAAC,GAAD;IAEc;IACZ,eAAe,EAAW,gBAAgB,EAAW,KAAK;IAC1D,EAHK,EAAW,GAGhB,CACF;GACE,CAAA,CAEG"}
1
+ {"version":3,"file":"CollectionsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collections/CollectionsListPage.tsx"],"sourcesContent":["/**\n * Collections List Page\n * @module coolandlovely/pages/collections\n *\n * Lists seasonal collections (`cooListCollections`) with status filter.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Plus, Shapes } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { CollectionCard } from '../../components/CollectionCard';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useCollections, useTr } from '../../hooks';\nimport { cn } from '../../utils/cn';\nimport type { CooCollectionStatus } from '../../types';\n\nconst STATUS_ORDER: CooCollectionStatus[] = ['LIVE', 'SCHEDULED', 'DRAFT', 'ENDED', 'ARCHIVED'];\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\nexport function CollectionsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const tr = useTr();\n const [status, setStatus] = useState<CooCollectionStatus | 'ALL'>('ALL');\n\n const statusOptions = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('coolandlovely.filters.all', 'All') },\n ...STATUS_ORDER.map((value) => ({\n value,\n label: tr(`coolandlovely.status.${value.toLowerCase()}`, formatStatusLabel(value)),\n })),\n ],\n [tr]\n );\n\n const query = useCollections({ status: status === 'ALL' ? undefined : status });\n const collections = query.data ?? [];\n\n return (\n <PageLayout\n title={tr('coolandlovely.page.collectionsTitle', 'Collections')}\n description={tr(\n 'coolandlovely.page.collectionsSubtitle',\n 'Seasonal drops and curated edits grouped by brand'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collections/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" /> {tr('coolandlovely.actions.newCollection', 'New collection')}\n </button>\n }\n >\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {statusOptions.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-accent-purple-subtle text-text-primary'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView label={tr('coolandlovely.loading.collections', 'Loading collections…')} />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collections.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Shapes className=\"h-10 w-10\" />}\n title={tr('coolandlovely.empty.collectionsTitle', 'No collections yet')}\n description={tr(\n 'coolandlovely.empty.collectionsDescription',\n 'Group pieces into a seasonal drop to start a collection.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collections/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollection', 'New collection')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collections.map((collection) => (\n <CollectionCard\n key={collection.id}\n collection={collection}\n onClick={() => navigateTo(`/collections/${collection.id}`)}\n />\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAM,IAAsC;CAAC;CAAQ;CAAa;CAAS;CAAS;CAAW;AAE/F,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAM,EAAE,aAAa,CAAC;;AAG3E,SAAgB,IAAsB;CACpC,IAAM,EAAE,kBAAe,GAAkB,EACnC,IAAK,GAAO,EACZ,CAAC,GAAQ,KAAa,EAAsC,MAAM,EAElE,IAAgB,QACd,CACJ;EAAE,OAAO;EAAgB,OAAO,EAAG,6BAA6B,MAAM;EAAE,EACxE,GAAG,EAAa,KAAK,OAAW;EAC9B;EACA,OAAO,EAAG,wBAAwB,EAAM,aAAa,IAAI,EAAkB,EAAM,CAAC;EACnF,EAAE,CACJ,EACD,CAAC,EAAG,CACL,EAEK,IAAQ,EAAe,EAAE,QAAQ,MAAW,QAAQ,KAAA,IAAY,GAAQ,CAAC,EACzE,IAAc,EAAM,QAAQ,EAAE;AAEpC,QACE,kBAAC,GAAD;EACE,OAAO,EAAG,uCAAuC,cAAc;EAC/D,aAAa,EACX,0CACA,oDACD;EACD,SACE,kBAAC,UAAD;GACE,MAAK;GACL,eAAe,EAAW,mBAAmB;GAC7C,WAAU;aAHZ;IAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA;;IAAE,EAAG,uCAAuC,iBAAiB;IAClF;;YAbb,CAgBE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAc,KAAK,MAClB,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe,EAAU,EAAI,MAAM;IACnC,WAAW,EACT,kEACA,MAAW,EAAI,QACX,8CACA,2DACL;cAEA,EAAI;IACE,EAXF,EAAI,MAWF,CACT;GACE,CAAA,EAEL,EAAM,YACL,kBAAC,GAAD,EAAa,OAAO,EAAG,qCAAqC,uBAAuB,EAAI,CAAA,GACrF,EAAM,UACR,kBAAC,GAAD,EAAW,eAAe,KAAK,EAAM,SAAS,EAAI,CAAA,GAChD,EAAY,WAAW,IACzB,kBAAC,GAAD;GACE,cAAa;GACb,MAAM,kBAAC,GAAD,EAAQ,WAAU,aAAc,CAAA;GACtC,OAAO,EAAG,wCAAwC,qBAAqB;GACvE,aAAa,EACX,8CACA,2DACD;GACD,QACE,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAW,mBAAmB;IAC7C,WAAU;cAHZ;KAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA;KAAC;KAC5B,EAAG,uCAAuC,iBAAiB;KACrD;;GAEX,CAAA,GAEF,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAY,KAAK,MAChB,kBAAC,GAAD;IAEc;IACZ,eAAe,EAAW,gBAAgB,EAAW,KAAK;IAC1D,EAHK,EAAW,GAGhB,CACF;GACE,CAAA,CAEG"}
@@ -1 +1 @@
1
- {"version":3,"file":"DiscoverPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/discover/DiscoverPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAsKH,wBAAgB,YAAY,gCA+pB3B"}
1
+ {"version":3,"file":"DiscoverPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/discover/DiscoverPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA6JH,wBAAgB,YAAY,gCAkxB3B"}