@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,123 +1,127 @@
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 { useBrands as a } from "../../hooks/useCoolAndLovelyApi.js";
4
+ import { useBrands 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 { BrandCard as s } from "../../components/BrandCard.js";
9
- import { useState as c } from "react";
10
- import { ChevronLeft as l, ChevronRight as u, Plus as d, Star as f, Store as p } from "lucide-react";
11
- import { Fragment as m, jsx as h, jsxs as g } 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 { BrandCard as c } from "../../components/BrandCard.js";
10
+ import { useMemo as l, useState as u } from "react";
11
+ import { ChevronLeft as d, ChevronRight as f, Plus as p, Star as m, Store as h } from "lucide-react";
12
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
12
13
  //#region src/coolandlovely/pages/brands/BrandsListPage.tsx
13
- var _ = 24, v = [
14
- {
15
- value: "ALL",
16
- label: "All"
17
- },
18
- {
19
- value: "PUBLISHED",
20
- label: "Published"
21
- },
22
- {
23
- value: "DRAFT",
24
- label: "Draft"
25
- },
26
- {
27
- value: "PENDING_REVIEW",
28
- label: "In review"
29
- },
30
- {
31
- value: "SUSPENDED",
32
- label: "Suspended"
33
- },
34
- {
35
- value: "ARCHIVED",
36
- label: "Archived"
37
- }
14
+ var y = 24, b = [
15
+ "PUBLISHED",
16
+ "DRAFT",
17
+ "PENDING_REVIEW",
18
+ "SUSPENDED",
19
+ "ARCHIVED"
38
20
  ];
39
- function y() {
40
- let { navigateTo: y } = e(), [b, x] = c("ALL"), [S, C] = c(!1), [w, T] = c(0), E = a({
41
- status: b === "ALL" ? void 0 : b,
42
- featured: S ? !0 : void 0,
21
+ function x() {
22
+ let { navigateTo: x } = e(), S = i(), [C, w] = u("ALL"), [T, E] = u(!1), [D, O] = u(0), k = l(() => [{
23
+ value: "ALL",
24
+ label: S("coolandlovely.filters.all", "All")
25
+ }, ...b.map((e) => ({
26
+ value: e,
27
+ label: S(`coolandlovely.status.${e.toLowerCase()}`, e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()))
28
+ }))], [S]), A = r({
29
+ status: C === "ALL" ? void 0 : C,
30
+ featured: T ? !0 : void 0,
43
31
  pagination: {
44
- limit: _,
45
- offset: w
32
+ limit: y,
33
+ offset: D
46
34
  }
47
- }), D = E.data?.items ?? [], O = E.data?.pageInfo.hasMore ?? !1;
48
- return /* @__PURE__ */ g(n, {
49
- title: "Brands",
50
- description: "Storefronts on the platform with a real publish lifecycle",
51
- actions: /* @__PURE__ */ g("button", {
35
+ }), j = A.data?.items ?? [], M = A.data?.pageInfo.hasMore ?? !1;
36
+ return /* @__PURE__ */ v(n, {
37
+ title: S("coolandlovely.page.brandsTitle", "Brands"),
38
+ description: S("coolandlovely.page.brandsSubtitle", "Storefronts on the platform with a real publish lifecycle"),
39
+ actions: /* @__PURE__ */ v("button", {
52
40
  type: "button",
53
- onClick: () => y("/brands/new"),
41
+ onClick: () => x("/brands/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__ */ h(d, { className: "h-4 w-4" }), " New brand"]
43
+ children: [
44
+ /* @__PURE__ */ _(p, { className: "h-4 w-4" }),
45
+ " ",
46
+ S("coolandlovely.actions.newBrand", "New brand")
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__ */ h("button", {
51
+ children: [k.map((e) => /* @__PURE__ */ _("button", {
60
52
  type: "button",
61
53
  onClick: () => {
62
- x(e.value), T(0);
54
+ w(e.value), O(0);
63
55
  },
64
- 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"),
56
+ className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", C === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
65
57
  children: e.label
66
- }, e.value)), /* @__PURE__ */ g("button", {
58
+ }, e.value)), /* @__PURE__ */ v("button", {
67
59
  type: "button",
68
60
  onClick: () => {
69
- C((e) => !e), T(0);
61
+ E((e) => !e), O(0);
70
62
  },
71
- className: t("ml-auto inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors", S ? "bg-status-warning-bg-subtle text-status-warning-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
63
+ className: t("ml-auto inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors", T ? "bg-status-warning-bg-subtle text-status-warning-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
72
64
  children: [
73
- /* @__PURE__ */ h(f, { className: t("h-3.5 w-3.5", S && "fill-status-warning-text") }),
65
+ /* @__PURE__ */ _(m, { className: t("h-3.5 w-3.5", T && "fill-status-warning-text") }),
74
66
  " ",
75
- "Featured"
67
+ S("coolandlovely.filters.featured", "Featured")
76
68
  ]
77
69
  })]
78
- }), E.isLoading ? /* @__PURE__ */ h(i, { label: "Loading brands…" }) : E.isError ? /* @__PURE__ */ h(r, { onRetry: () => void E.refetch() }) : D.length === 0 ? /* @__PURE__ */ h(o, {
70
+ }), A.isLoading ? /* @__PURE__ */ _(o, { label: S("coolandlovely.loading.brands", "Loading brands…") }) : A.isError ? /* @__PURE__ */ _(a, { onRetry: () => void A.refetch() }) : j.length === 0 ? /* @__PURE__ */ _(s, {
79
71
  illustration: "empty-data",
80
- icon: /* @__PURE__ */ h(p, { className: "h-10 w-10" }),
81
- title: "No brands yet",
82
- description: "Launch the first storefront to start building the catalogue.",
83
- action: /* @__PURE__ */ g("button", {
72
+ icon: /* @__PURE__ */ _(h, { className: "h-10 w-10" }),
73
+ title: S("coolandlovely.empty.brandsTitle", "No brands yet"),
74
+ description: S("coolandlovely.empty.brandsDescription", "Launch the first storefront to start building the catalogue."),
75
+ action: /* @__PURE__ */ v("button", {
84
76
  type: "button",
85
- onClick: () => y("/brands/new"),
77
+ onClick: () => x("/brands/new"),
86
78
  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",
87
- children: [/* @__PURE__ */ h(d, { className: "h-4 w-4" }), " New brand"]
79
+ children: [
80
+ /* @__PURE__ */ _(p, { className: "h-4 w-4" }),
81
+ " ",
82
+ S("coolandlovely.actions.newBrand", "New brand")
83
+ ]
88
84
  })
89
- }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
85
+ }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
90
86
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
91
- children: D.map((e) => /* @__PURE__ */ h(s, {
87
+ children: j.map((e) => /* @__PURE__ */ _(c, {
92
88
  brand: e,
93
- onClick: () => y(`/brands/${e.id}`)
89
+ onClick: () => x(`/brands/${e.id}`)
94
90
  }, e.id))
95
- }), (w > 0 || O) && /* @__PURE__ */ g("div", {
91
+ }), (D > 0 || M) && /* @__PURE__ */ v("div", {
96
92
  className: "mt-6 flex items-center justify-center gap-2",
97
93
  children: [
98
- /* @__PURE__ */ g("button", {
94
+ /* @__PURE__ */ v("button", {
99
95
  type: "button",
100
- disabled: w === 0,
101
- onClick: () => T((e) => Math.max(0, e - _)),
96
+ disabled: D === 0,
97
+ onClick: () => O((e) => Math.max(0, e - y)),
102
98
  className: "inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
103
- children: [/* @__PURE__ */ h(l, { className: "h-4 w-4" }), " Previous"]
99
+ children: [
100
+ /* @__PURE__ */ _(d, { className: "h-4 w-4" }),
101
+ " ",
102
+ S("coolandlovely.pagination.previous", "Previous")
103
+ ]
104
104
  }),
105
- /* @__PURE__ */ g("span", {
105
+ /* @__PURE__ */ _("span", {
106
106
  className: "text-sm text-text-secondary",
107
- children: ["Page ", w / _ + 1]
107
+ children: S("coolandlovely.pagination.page", "Page {{page}}", { page: D / y + 1 })
108
108
  }),
109
- /* @__PURE__ */ g("button", {
109
+ /* @__PURE__ */ v("button", {
110
110
  type: "button",
111
- disabled: !O,
112
- onClick: () => T((e) => e + _),
111
+ disabled: !M,
112
+ onClick: () => O((e) => e + y),
113
113
  className: "inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
114
- children: ["Next ", /* @__PURE__ */ h(u, { className: "h-4 w-4" })]
114
+ children: [
115
+ S("coolandlovely.pagination.next", "Next"),
116
+ " ",
117
+ /* @__PURE__ */ _(f, { className: "h-4 w-4" })
118
+ ]
115
119
  })
116
120
  ]
117
121
  })] })]
118
122
  });
119
123
  }
120
124
  //#endregion
121
- export { y as BrandsListPage };
125
+ export { x as BrandsListPage };
122
126
 
123
127
  //# sourceMappingURL=BrandsListPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrandsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/brands/BrandsListPage.tsx"],"sourcesContent":["/**\n * Brands List Page\n * @module coolandlovely/pages/brands\n *\n * Lists brand storefronts (cursor-paginated `cooListBrands`) with status &\n * featured filters. Each card links to the brand detail page.\n */\n\nimport { useState } from 'react';\nimport { Store, Plus, ChevronLeft, ChevronRight, Star } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useBrands } from '../../hooks';\nimport { BrandCard } from '../../components/BrandCard';\nimport { cn } from '../../utils/cn';\nimport type { CooBrandStatus } from '../../types';\n\nconst PAGE_SIZE = 24;\n\nconst STATUS_OPTIONS: Array<{ value: CooBrandStatus | 'ALL'; label: string }> = [\n { value: 'ALL', label: 'All' },\n { value: 'PUBLISHED', label: 'Published' },\n { value: 'DRAFT', label: 'Draft' },\n { value: 'PENDING_REVIEW', label: 'In review' },\n { value: 'SUSPENDED', label: 'Suspended' },\n { value: 'ARCHIVED', label: 'Archived' },\n];\n\nexport function BrandsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const [status, setStatus] = useState<CooBrandStatus | 'ALL'>('ALL');\n const [featuredOnly, setFeaturedOnly] = useState(false);\n const [offset, setOffset] = useState(0);\n\n const query = useBrands({\n status: status === 'ALL' ? undefined : status,\n featured: featuredOnly ? true : undefined,\n pagination: { limit: PAGE_SIZE, offset },\n });\n\n const brands = query.data?.items ?? [];\n const hasMore = query.data?.pageInfo.hasMore ?? false;\n\n return (\n <PageLayout\n title=\"Brands\"\n description=\"Storefronts on the platform with a real publish lifecycle\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/brands/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 brand\n </button>\n }\n >\n {/* Filters */}\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={() => {\n setStatus(opt.value);\n setOffset(0);\n }}\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 <button\n type=\"button\"\n onClick={() => {\n setFeaturedOnly((v) => !v);\n setOffset(0);\n }}\n className={cn(\n 'ml-auto inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n featuredOnly\n ? 'bg-status-warning-bg-subtle text-status-warning-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n <Star className={cn('h-3.5 w-3.5', featuredOnly && 'fill-status-warning-text')} />{' '}\n Featured\n </button>\n </div>\n\n {query.isLoading ? (\n <LoadingView label=\"Loading brands…\" />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : brands.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Store className=\"h-10 w-10\" />}\n title=\"No brands yet\"\n description=\"Launch the first storefront to start building the catalogue.\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/brands/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 brand\n </button>\n }\n />\n ) : (\n <>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {brands.map((brand) => (\n <BrandCard\n key={brand.id}\n brand={brand}\n onClick={() => navigateTo(`/brands/${brand.id}`)}\n />\n ))}\n </div>\n\n {/* Pagination */}\n {(offset > 0 || hasMore) && (\n <div className=\"mt-6 flex items-center justify-center gap-2\">\n <button\n type=\"button\"\n disabled={offset === 0}\n onClick={() => setOffset((o) => Math.max(0, o - PAGE_SIZE))}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <ChevronLeft className=\"h-4 w-4\" /> Previous\n </button>\n <span className=\"text-sm text-text-secondary\">Page {offset / PAGE_SIZE + 1}</span>\n <button\n type=\"button\"\n disabled={!hasMore}\n onClick={() => setOffset((o) => o + PAGE_SIZE)}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40\"\n >\n Next <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n )}\n </>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAM,IAAY,IAEZ,IAA0E;CAC9E;EAAE,OAAO;EAAO,OAAO;EAAO;CAC9B;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAS,OAAO;EAAS;CAClC;EAAE,OAAO;EAAkB,OAAO;EAAa;CAC/C;EAAE,OAAO;EAAa,OAAO;EAAa;CAC1C;EAAE,OAAO;EAAY,OAAO;EAAY;CACzC;AAED,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAkB,EACnC,CAAC,GAAQ,KAAa,EAAiC,MAAM,EAC7D,CAAC,GAAc,KAAmB,EAAS,GAAM,EACjD,CAAC,GAAQ,KAAa,EAAS,EAAE,EAEjC,IAAQ,EAAU;EACtB,QAAQ,MAAW,QAAQ,KAAA,IAAY;EACvC,UAAU,IAAe,KAAO,KAAA;EAChC,YAAY;GAAE,OAAO;GAAW;GAAQ;EACzC,CAAC,EAEI,IAAS,EAAM,MAAM,SAAS,EAAE,EAChC,IAAU,EAAM,MAAM,SAAS,WAAW;AAEhD,QACE,kBAAC,GAAD;EACE,OAAM;EACN,aAAY;EACZ,SACE,kBAAC,UAAD;GACE,MAAK;GACL,eAAe,EAAW,cAAc;GACxC,WAAU;aAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,aACrB;;YAVb,CAcE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACG,EAAe,KAAK,MACnB,kBAAC,UAAD;IAEE,MAAK;IACL,eAAe;AAEb,KADA,EAAU,EAAI,MAAM,EACpB,EAAU,EAAE;;IAEd,WAAW,EACT,kEACA,MAAW,EAAI,QACX,kDACA,2DACL;cAEA,EAAI;IACE,EAdF,EAAI,MAcF,CACT,EACF,kBAAC,UAAD;IACE,MAAK;IACL,eAAe;AAEb,KADA,GAAiB,MAAM,CAAC,EAAE,EAC1B,EAAU,EAAE;;IAEd,WAAW,EACT,2GACA,IACI,yDACA,2DACL;cAXH;KAaE,kBAAC,GAAD,EAAM,WAAW,EAAG,eAAe,KAAgB,2BAA2B,EAAI,CAAA;KAAC;KAAI;KAEhF;MACL;MAEL,EAAM,YACL,kBAAC,GAAD,EAAa,OAAM,mBAAoB,CAAA,GACrC,EAAM,UACR,kBAAC,GAAD,EAAW,eAAe,KAAK,EAAM,SAAS,EAAI,CAAA,GAChD,EAAO,WAAW,IACpB,kBAAC,GAAD;GACE,cAAa;GACb,MAAM,kBAAC,GAAD,EAAO,WAAU,aAAc,CAAA;GACrC,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,EAAW,cAAc;IACxC,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,aACrB;;GAEX,CAAA,GAEF,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAO,KAAK,MACX,kBAAC,GAAD;IAES;IACP,eAAe,EAAW,WAAW,EAAM,KAAK;IAChD,EAHK,EAAM,GAGX,CACF;GACE,CAAA,GAGJ,IAAS,KAAK,MACd,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,UAAD;KACE,MAAK;KACL,UAAU,MAAW;KACrB,eAAe,GAAW,MAAM,KAAK,IAAI,GAAG,IAAI,EAAU,CAAC;KAC3D,WAAU;eAJZ,CAME,kBAAC,GAAD,EAAa,WAAU,WAAY,CAAA,EAAA,YAC5B;;IACT,kBAAC,QAAD;KAAM,WAAU;eAAhB,CAA8C,SAAM,IAAS,IAAY,EAAS;;IAClF,kBAAC,UAAD;KACE,MAAK;KACL,UAAU,CAAC;KACX,eAAe,GAAW,MAAM,IAAI,EAAU;KAC9C,WAAU;eAJZ,CAKC,SACM,kBAAC,GAAD,EAAc,WAAU,WAAY,CAAA,CAClC;;IACL;KAEP,EAAA,CAAA,CAEM"}
1
+ {"version":3,"file":"BrandsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/brands/BrandsListPage.tsx"],"sourcesContent":["/**\n * Brands List Page\n * @module coolandlovely/pages/brands\n *\n * Lists brand storefronts (cursor-paginated `cooListBrands`) with status &\n * featured filters. Each card links to the brand detail page.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Store, Plus, ChevronLeft, ChevronRight, Star } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useBrands, useTr } from '../../hooks';\nimport { BrandCard } from '../../components/BrandCard';\nimport { cn } from '../../utils/cn';\nimport type { CooBrandStatus } from '../../types';\n\nconst PAGE_SIZE = 24;\n\nconst STATUS_ORDER: CooBrandStatus[] = [\n 'PUBLISHED',\n 'DRAFT',\n 'PENDING_REVIEW',\n 'SUSPENDED',\n 'ARCHIVED',\n];\n\nexport function BrandsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const tr = useTr();\n const [status, setStatus] = useState<CooBrandStatus | 'ALL'>('ALL');\n const [featuredOnly, setFeaturedOnly] = useState(false);\n const [offset, setOffset] = useState(0);\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(\n `coolandlovely.status.${value.toLowerCase()}`,\n value.replace(/_/g, ' ').replace(/\\b\\w/g, (c) => c.toUpperCase())\n ),\n })),\n ],\n [tr]\n );\n\n const query = useBrands({\n status: status === 'ALL' ? undefined : status,\n featured: featuredOnly ? true : undefined,\n pagination: { limit: PAGE_SIZE, offset },\n });\n\n const brands = query.data?.items ?? [];\n const hasMore = query.data?.pageInfo.hasMore ?? false;\n\n return (\n <PageLayout\n title={tr('coolandlovely.page.brandsTitle', 'Brands')}\n description={tr(\n 'coolandlovely.page.brandsSubtitle',\n 'Storefronts on the platform with a real publish lifecycle'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/brands/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.newBrand', 'New brand')}\n </button>\n }\n >\n {/* Filters */}\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={() => {\n setStatus(opt.value);\n setOffset(0);\n }}\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 <button\n type=\"button\"\n onClick={() => {\n setFeaturedOnly((v) => !v);\n setOffset(0);\n }}\n className={cn(\n 'ml-auto inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n featuredOnly\n ? 'bg-status-warning-bg-subtle text-status-warning-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n <Star className={cn('h-3.5 w-3.5', featuredOnly && 'fill-status-warning-text')} />{' '}\n {tr('coolandlovely.filters.featured', 'Featured')}\n </button>\n </div>\n\n {query.isLoading ? (\n <LoadingView label={tr('coolandlovely.loading.brands', 'Loading brands…')} />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : brands.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Store className=\"h-10 w-10\" />}\n title={tr('coolandlovely.empty.brandsTitle', 'No brands yet')}\n description={tr(\n 'coolandlovely.empty.brandsDescription',\n 'Launch the first storefront to start building the catalogue.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/brands/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\" /> {tr('coolandlovely.actions.newBrand', 'New brand')}\n </button>\n }\n />\n ) : (\n <>\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {brands.map((brand) => (\n <BrandCard\n key={brand.id}\n brand={brand}\n onClick={() => navigateTo(`/brands/${brand.id}`)}\n />\n ))}\n </div>\n\n {/* Pagination */}\n {(offset > 0 || hasMore) && (\n <div className=\"mt-6 flex items-center justify-center gap-2\">\n <button\n type=\"button\"\n disabled={offset === 0}\n onClick={() => setOffset((o) => Math.max(0, o - PAGE_SIZE))}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <ChevronLeft className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.pagination.previous', 'Previous')}\n </button>\n <span className=\"text-sm text-text-secondary\">\n {tr('coolandlovely.pagination.page', 'Page {{page}}', {\n page: offset / PAGE_SIZE + 1,\n })}\n </span>\n <button\n type=\"button\"\n disabled={!hasMore}\n onClick={() => setOffset((o) => o + PAGE_SIZE)}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40\"\n >\n {tr('coolandlovely.pagination.next', 'Next')} <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n )}\n </>\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 { useCollaboration as o, useDeleteCollaboration as s, useTransitionCollaboration 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 { useCollaboration as n, useDeleteCollaboration as r, useTransitionCollaboration 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 { TagList as p } from "../../components/TagList.js";
11
11
  import { ActorName as m } from "../../components/ActorName.js";
12
12
  import { StepTracker as h } from "../../components/StepTracker.js";
@@ -34,14 +34,14 @@ var D = {
34
34
  "PUBLISHED"
35
35
  ];
36
36
  function k() {
37
- let { collaborationId: k } = C(), { navigateTo: A } = e(), j = o(k), M = c(), N = s();
38
- if (f(k, j.data?.title), j.isLoading) return /* @__PURE__ */ w(t, {
37
+ let { collaborationId: k } = C(), { navigateTo: A } = e(), j = n(k), M = i(), N = r();
38
+ if (a(k, j.data?.title), j.isLoading) return /* @__PURE__ */ w(t, {
39
39
  title: "Collaboration",
40
- children: /* @__PURE__ */ w(i, { label: "Loading collaboration…" })
40
+ children: /* @__PURE__ */ w(c, { label: "Loading collaboration…" })
41
41
  });
42
42
  if (j.isError || !j.data) return /* @__PURE__ */ w(t, {
43
43
  title: "Collaboration",
44
- children: /* @__PURE__ */ w(r, {
44
+ children: /* @__PURE__ */ w(s, {
45
45
  title: "Collaboration not found",
46
46
  onRetry: () => void j.refetch()
47
47
  })
@@ -110,12 +110,12 @@ function k() {
110
110
  }),
111
111
  " ",
112
112
  "· ",
113
- d(P.role),
113
+ f(P.role),
114
114
  " collaboration"
115
115
  ]
116
116
  })]
117
117
  }),
118
- /* @__PURE__ */ w(n, { status: P.status })
118
+ /* @__PURE__ */ w(o, { status: P.status })
119
119
  ]
120
120
  }),
121
121
  P.brief && /* @__PURE__ */ w("p", {
@@ -146,7 +146,7 @@ function k() {
146
146
  type: "button",
147
147
  onClick: () => A(`/looks/${e.id}`),
148
148
  className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface text-left transition-all hover:border-accent-foreground/20 hover:shadow-md",
149
- children: [/* @__PURE__ */ w(a, {
149
+ children: [/* @__PURE__ */ w(l, {
150
150
  icon: /* @__PURE__ */ w(b, { className: "h-6 w-6" }),
151
151
  seed: e.id,
152
152
  className: "h-24 w-full"
@@ -157,7 +157,7 @@ function k() {
157
157
  children: e.title
158
158
  }), /* @__PURE__ */ w("p", {
159
159
  className: "mt-0.5 text-xs text-text-secondary",
160
- children: d(e.occasion)
160
+ children: f(e.occasion)
161
161
  })]
162
162
  })]
163
163
  }, e.id))
@@ -184,7 +184,7 @@ function k() {
184
184
  children: [/* @__PURE__ */ w("span", {
185
185
  className: "text-sm text-text-secondary",
186
186
  children: "Current:"
187
- }), /* @__PURE__ */ w(n, { status: P.status })]
187
+ }), /* @__PURE__ */ w(o, { status: P.status })]
188
188
  }),
189
189
  I.length === 0 ? /* @__PURE__ */ w("p", {
190
190
  className: "text-xs text-text-secondary",
@@ -202,7 +202,7 @@ function k() {
202
202
  children: [
203
203
  M.isPending && /* @__PURE__ */ w(v, { className: "h-3.5 w-3.5 animate-spin" }),
204
204
  "Move to ",
205
- d(e)
205
+ f(e)
206
206
  ]
207
207
  }, e))
208
208
  }),
@@ -228,7 +228,7 @@ function k() {
228
228
  children: "Role"
229
229
  }), /* @__PURE__ */ w("dd", {
230
230
  className: "text-text-primary",
231
- children: d(P.role)
231
+ children: f(P.role)
232
232
  })]
233
233
  }),
234
234
  /* @__PURE__ */ T("div", {
@@ -238,7 +238,7 @@ function k() {
238
238
  children: "Compensation"
239
239
  }), /* @__PURE__ */ w("dd", {
240
240
  className: "text-text-primary",
241
- children: u(P.compensation, P.currency)
241
+ children: d(P.compensation, P.currency)
242
242
  })]
243
243
  }),
244
244
  /* @__PURE__ */ T("div", {
@@ -248,7 +248,7 @@ function k() {
248
248
  children: "Starts"
249
249
  }), /* @__PURE__ */ w("dd", {
250
250
  className: "text-text-primary",
251
- children: P.startDate ? l(P.startDate, {
251
+ children: P.startDate ? u(P.startDate, {
252
252
  hour: void 0,
253
253
  minute: void 0
254
254
  }) : "—"
@@ -261,7 +261,7 @@ function k() {
261
261
  children: "Ends"
262
262
  }), /* @__PURE__ */ w("dd", {
263
263
  className: "text-text-primary",
264
- children: P.endDate ? l(P.endDate, {
264
+ children: P.endDate ? u(P.endDate, {
265
265
  hour: void 0,
266
266
  minute: void 0
267
267
  }) : "—"
@@ -274,7 +274,7 @@ function k() {
274
274
  type: "button",
275
275
  onClick: () => A(`/brands/${P.brand?.id}`),
276
276
  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",
277
- children: [/* @__PURE__ */ w(a, {
277
+ children: [/* @__PURE__ */ w(l, {
278
278
  icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" }),
279
279
  seed: P.brand.id,
280
280
  className: "h-10 w-10 shrink-0"
@@ -1,9 +1,9 @@
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 { useBrands as i, useCollaboration as a, useCreateCollaboration as o, useUpdateCollaboration as s } from "../../hooks/useCoolAndLovelyApi.js";
5
- import { parseCsv as c, titleCase as l } from "../../utils/formatters.js";
3
+ import { useBrands as n, useCollaboration as r, useCreateCollaboration as i, useUpdateCollaboration as a } from "../../hooks/useCoolAndLovelyApi.js";
6
4
  import "../../hooks/index.js";
5
+ import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
6
+ import { parseCsv as c, titleCase as l } from "../../utils/formatters.js";
7
7
  import { SelectField as u, TextAreaField as d, TextField as f } from "../../components/Field.js";
8
8
  import { ActorName as p } from "../../components/ActorName.js";
9
9
  import { useEffect as m, useMemo as h, useState as g } from "react";
@@ -45,10 +45,10 @@ var k = {
45
45
  endDate: ""
46
46
  };
47
47
  function A() {
48
- let { collaborationId: A } = x(), j = !!A, { navigateTo: M, currentUser: N } = e(), P = o(), F = s(), I = i({ pagination: {
48
+ let { collaborationId: A } = x(), j = !!A, { navigateTo: M, currentUser: N } = e(), P = i(), F = a(), I = n({ pagination: {
49
49
  limit: 100,
50
50
  offset: 0
51
- } }), L = a(j ? A : void 0), [R, z] = g({
51
+ } }), L = r(j ? A : void 0), [R, z] = g({
52
52
  ...k,
53
53
  creatorId: N?.id ?? ""
54
54
  }), [B, V] = g({});
@@ -80,11 +80,11 @@ function A() {
80
80
  }));
81
81
  if (j && L.isLoading) return /* @__PURE__ */ S(t, {
82
82
  title: "Edit collaboration",
83
- children: /* @__PURE__ */ S(r, { label: "Loading collaboration…" })
83
+ children: /* @__PURE__ */ S(s, { label: "Loading collaboration…" })
84
84
  });
85
85
  if (j && (L.isError || !L.data)) return /* @__PURE__ */ S(t, {
86
86
  title: "Edit collaboration",
87
- children: /* @__PURE__ */ S(n, {
87
+ children: /* @__PURE__ */ S(o, {
88
88
  title: "Collaboration not found",
89
89
  onRetry: () => void L.refetch()
90
90
  })
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,wBAAgB,sBAAsB,gCAsGrC"}
1
+ {"version":3,"file":"CollaborationsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6BH,wBAAgB,sBAAsB,gCAgIrC"}