@burdenoff/microfe-coolandlovely 2026.706.1 → 2026.706.3

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 (89) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +14 -6
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/ActorName.js +29 -0
  6. package/dist/coolandlovely/components/ActorName.js.map +1 -0
  7. package/dist/coolandlovely/components/AddToLookbookButton.js +81 -0
  8. package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -0
  9. package/dist/coolandlovely/components/BrandCover.js +39 -0
  10. package/dist/coolandlovely/components/BrandCover.js.map +1 -0
  11. package/dist/coolandlovely/components/BrandCreatorAvatars.js +57 -0
  12. package/dist/coolandlovely/components/BrandCreatorAvatars.js.map +1 -0
  13. package/dist/coolandlovely/components/ColourSwatchRow.js +86 -0
  14. package/dist/coolandlovely/components/ColourSwatchRow.js.map +1 -0
  15. package/dist/coolandlovely/components/Comments.js +109 -0
  16. package/dist/coolandlovely/components/Comments.js.map +1 -0
  17. package/dist/coolandlovely/components/Field.js +22 -2
  18. package/dist/coolandlovely/components/Field.js.map +1 -1
  19. package/dist/coolandlovely/components/FileImage.js +17 -0
  20. package/dist/coolandlovely/components/FileImage.js.map +1 -0
  21. package/dist/coolandlovely/components/FollowButton.js +24 -0
  22. package/dist/coolandlovely/components/FollowButton.js.map +1 -0
  23. package/dist/coolandlovely/components/ImageUploadField.js +153 -0
  24. package/dist/coolandlovely/components/ImageUploadField.js.map +1 -0
  25. package/dist/coolandlovely/components/LookCard.js +77 -0
  26. package/dist/coolandlovely/components/LookCard.js.map +1 -0
  27. package/dist/coolandlovely/components/MetricsCard.js +1 -1
  28. package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
  29. package/dist/coolandlovely/components/ShopItemCard.js +45 -0
  30. package/dist/coolandlovely/components/ShopItemCard.js.map +1 -0
  31. package/dist/coolandlovely/components/StepTracker.js +35 -0
  32. package/dist/coolandlovely/components/StepTracker.js.map +1 -0
  33. package/dist/coolandlovely/components/Thumbnail.js +25 -14
  34. package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
  35. package/dist/coolandlovely/components/VisibilityChip.js +32 -0
  36. package/dist/coolandlovely/components/VisibilityChip.js.map +1 -0
  37. package/dist/coolandlovely/hooks/index.js +2 -0
  38. package/dist/coolandlovely/hooks/useComments.js +68 -0
  39. package/dist/coolandlovely/hooks/useComments.js.map +1 -0
  40. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +155 -60
  41. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  42. package/dist/coolandlovely/hooks/useFiles.js +111 -0
  43. package/dist/coolandlovely/hooks/useFiles.js.map +1 -0
  44. package/dist/coolandlovely/pages/HomePage.js +130 -133
  45. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  46. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +261 -228
  47. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  48. package/dist/coolandlovely/pages/brands/BrandFormPage.js +146 -104
  49. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
  50. package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -11
  51. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
  52. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +117 -95
  53. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +1 -1
  55. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +50 -43
  56. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  57. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +134 -107
  58. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  59. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +117 -102
  60. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -1
  61. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -54
  62. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
  63. package/dist/coolandlovely/pages/discover/DiscoverPage.js +223 -0
  64. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -0
  65. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +176 -144
  66. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  67. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +144 -130
  68. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -1
  69. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +73 -62
  70. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
  71. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +215 -102
  72. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  73. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +115 -86
  74. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
  75. package/dist/coolandlovely/pages/looks/LookDetailPage.js +217 -155
  76. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  77. package/dist/coolandlovely/pages/looks/LookFormPage.js +147 -96
  78. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
  79. package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -95
  80. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  81. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +376 -146
  82. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  83. package/dist/coolandlovely/pages/trends/TrendsPage.js +249 -0
  84. package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -0
  85. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +136 -88
  86. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
  87. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -74
  88. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  89. package/package.json +1 -1
@@ -4,17 +4,19 @@ import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as r } from "../../components/StatusBadge.js";
5
5
  import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
6
6
  import { Thumbnail as o } from "../../components/Thumbnail.js";
7
- import { useBrand as s, useTransitionBrand as c } from "../../hooks/useCoolAndLovelyApi.js";
7
+ import { useBrand as s, useTransitionBrand as c, useUpdateBrand as l } from "../../hooks/useCoolAndLovelyApi.js";
8
+ import { formatDate as u, formatPrice as d, titleCase as f } from "../../utils/formatters.js";
8
9
  import "../../hooks/index.js";
9
- import { formatDate as l, formatPrice as u, titleCase as d } from "../../utils/formatters.js";
10
- import { TagList as f } from "../../components/TagList.js";
11
- import { categoryIcon as p } from "../../utils/icons.js";
12
- import { ArrowLeft as m, ExternalLink as h, Loader2 as g, Pencil as _, Shapes as v, Shirt as y, Star as b, Store as x } from "lucide-react";
13
- import { useParams as S } from "react-router-dom";
14
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
15
- import { GlassCard as T } from "@burdenoff/fe-libs/ui";
10
+ import { BrandCover as p } from "../../components/BrandCover.js";
11
+ import { TagList as m } from "../../components/TagList.js";
12
+ import { Comments as h } from "../../components/Comments.js";
13
+ import { categoryIcon as g } from "../../utils/icons.js";
14
+ import { ArrowLeft as _, ExternalLink as v, Loader2 as y, Pencil as b, Plus as x, Shapes as S, Shirt as C, Store as w } from "lucide-react";
15
+ import { useParams as T } from "react-router-dom";
16
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
17
+ import { GlassCard as k } from "@burdenoff/fe-libs/ui";
16
18
  //#region src/coolandlovely/pages/brands/BrandDetailPage.tsx
17
- var E = {
19
+ var A = {
18
20
  DRAFT: ["PENDING_REVIEW", "ARCHIVED"],
19
21
  PENDING_REVIEW: [
20
22
  "PUBLISHED",
@@ -25,295 +27,326 @@ var E = {
25
27
  SUSPENDED: ["PUBLISHED", "ARCHIVED"],
26
28
  ARCHIVED: []
27
29
  };
28
- function D() {
29
- let { brandId: D } = S(), { navigateTo: O } = e(), k = s(D), A = c();
30
- if (k.isLoading) return /* @__PURE__ */ C(n, {
30
+ function j() {
31
+ let { brandId: j } = T(), { navigateTo: M } = e(), N = s(j), P = c(), F = l();
32
+ if (N.isLoading) return /* @__PURE__ */ D(n, {
31
33
  title: "Brand",
32
- children: /* @__PURE__ */ C(a, { label: "Loading brand…" })
34
+ children: /* @__PURE__ */ D(a, { label: "Loading brand…" })
33
35
  });
34
- if (k.isError || !k.data) return /* @__PURE__ */ C(n, {
36
+ if (N.isError || !N.data) return /* @__PURE__ */ D(n, {
35
37
  title: "Brand",
36
- children: /* @__PURE__ */ C(i, {
38
+ children: /* @__PURE__ */ D(i, {
37
39
  title: "Brand not found",
38
40
  message: "This storefront could not be loaded or does not exist.",
39
- onRetry: () => void k.refetch()
41
+ onRetry: () => void N.refetch()
40
42
  })
41
43
  });
42
- let j = k.data, M = j.collections ?? [], N = j.items ?? [], P = E[j.status];
43
- return /* @__PURE__ */ C(n, {
44
- title: j.name,
45
- description: `@${j.handle}`,
46
- actions: /* @__PURE__ */ w("div", {
47
- className: "flex items-center gap-2",
48
- children: [/* @__PURE__ */ w("button", {
49
- type: "button",
50
- onClick: () => O("/brands"),
51
- className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
52
- children: [/* @__PURE__ */ C(m, { className: "h-4 w-4" }), " Back"]
53
- }), /* @__PURE__ */ w("button", {
54
- type: "button",
55
- onClick: () => O(`/brands/${j.id}/edit`),
56
- 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",
57
- children: [/* @__PURE__ */ C(_, { className: "h-4 w-4" }), " Edit"]
58
- })]
59
- }),
60
- children: /* @__PURE__ */ w("div", {
44
+ let I = N.data, L = I.collections ?? [], R = I.items ?? [], z = A[I.status], B = I.websiteUrl && /^https?:\/\//i.test(I.websiteUrl) ? I.websiteUrl : void 0;
45
+ return /* @__PURE__ */ D(n, {
46
+ title: I.name,
47
+ description: `@${I.handle}`,
48
+ children: /* @__PURE__ */ O("div", {
61
49
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
62
- children: [/* @__PURE__ */ w("div", {
63
- className: "lg:col-span-2",
50
+ children: [/* @__PURE__ */ O("div", {
51
+ className: "space-y-6 lg:col-span-2",
64
52
  children: [
65
- /* @__PURE__ */ w(T, {
66
- treatment: "glass",
67
- className: "overflow-hidden p-0",
68
- children: [/* @__PURE__ */ C(o, {
69
- icon: /* @__PURE__ */ C(x, { className: "h-12 w-12" }),
70
- seed: j.id,
71
- className: "h-44 w-full"
72
- }), /* @__PURE__ */ w("div", {
73
- className: "p-6",
74
- children: [
75
- /* @__PURE__ */ w("div", {
76
- className: "flex items-center gap-2",
77
- children: [
78
- /* @__PURE__ */ C("h2", {
79
- className: "text-xl font-semibold text-text-primary",
80
- children: j.name
81
- }),
82
- j.isFeatured && /* @__PURE__ */ C(b, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }),
83
- /* @__PURE__ */ C(r, {
84
- status: j.status,
85
- className: "ml-auto"
86
- })
87
- ]
88
- }),
89
- j.tagline && /* @__PURE__ */ C("p", {
90
- className: "mt-2 text-sm text-text-primary",
91
- children: j.tagline
92
- }),
93
- j.bio && /* @__PURE__ */ C("p", {
94
- className: "mt-3 text-sm text-text-secondary",
95
- children: j.bio
96
- }),
97
- j.aesthetics.length > 0 && /* @__PURE__ */ w("div", {
98
- className: "mt-4",
99
- children: [/* @__PURE__ */ C("p", {
100
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
101
- children: "Aesthetics"
102
- }), /* @__PURE__ */ C(f, {
103
- tags: j.aesthetics.map(d),
104
- tone: "accent",
105
- max: 12
106
- })]
107
- }),
108
- j.tags.length > 0 && /* @__PURE__ */ w("div", {
109
- className: "mt-3",
110
- children: [/* @__PURE__ */ C("p", {
111
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
112
- children: "Tags"
113
- }), /* @__PURE__ */ C(f, {
114
- tags: j.tags,
115
- max: 12
53
+ /* @__PURE__ */ D(p, {
54
+ coverFileId: I.cover?.id,
55
+ logoFileId: I.logo?.id,
56
+ name: I.name,
57
+ seed: I.id,
58
+ className: "overflow-hidden rounded-xl border border-border-seam shadow-sm",
59
+ overlay: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", {
60
+ className: "absolute right-3 top-3 flex flex-wrap items-center justify-end gap-2",
61
+ children: [/* @__PURE__ */ O("button", {
62
+ type: "button",
63
+ onClick: () => M("/brands"),
64
+ className: "inline-flex items-center gap-1.5 rounded-lg bg-bg-surface/80 px-3 py-2 text-sm font-medium text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface",
65
+ children: [/* @__PURE__ */ D(_, { className: "h-4 w-4" }), " Back"]
66
+ }), /* @__PURE__ */ O("button", {
67
+ type: "button",
68
+ onClick: () => M(`/brands/${I.id}/edit`),
69
+ 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 shadow-sm transition-colors hover:bg-action-primary-bg/90",
70
+ children: [/* @__PURE__ */ D(b, { className: "h-4 w-4" }), " Edit"]
71
+ })]
72
+ }), /* @__PURE__ */ O("div", {
73
+ className: "absolute inset-x-0 bottom-0 flex items-end gap-3 p-4 sm:gap-4 sm:p-5",
74
+ children: [/* @__PURE__ */ D(o, {
75
+ icon: /* @__PURE__ */ D(w, { className: "h-7 w-7" }),
76
+ seed: I.id,
77
+ fileId: I.logo?.id,
78
+ alt: `${I.name} logo`,
79
+ className: "h-16 w-16 shrink-0 rounded-full shadow-md ring-2 ring-bg-surface"
80
+ }), /* @__PURE__ */ O("div", {
81
+ className: "min-w-0 pb-1",
82
+ children: [/* @__PURE__ */ O("div", {
83
+ className: "flex flex-wrap items-center gap-x-2 gap-y-0.5",
84
+ children: [/* @__PURE__ */ D("h2", {
85
+ className: "truncate text-xl font-semibold text-text-primary sm:text-2xl",
86
+ children: I.name
87
+ }), /* @__PURE__ */ O("span", {
88
+ className: "text-sm text-text-secondary",
89
+ children: ["@", I.handle]
116
90
  })]
117
- }),
118
- j.websiteUrl && /* @__PURE__ */ w("a", {
119
- href: j.websiteUrl,
120
- target: "_blank",
121
- rel: "noreferrer",
122
- className: "mt-4 inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
123
- children: [
124
- /* @__PURE__ */ C(h, { className: "h-4 w-4" }),
125
- " ",
126
- j.websiteUrl
127
- ]
128
- })
129
- ]
130
- })]
91
+ }), I.tagline && /* @__PURE__ */ D("p", {
92
+ className: "mt-1 line-clamp-2 text-sm text-text-primary",
93
+ children: I.tagline
94
+ })]
95
+ })]
96
+ })] })
97
+ }),
98
+ /* @__PURE__ */ O("section", {
99
+ className: "space-y-3",
100
+ children: [
101
+ /* @__PURE__ */ O("div", {
102
+ className: "flex flex-wrap items-center justify-between gap-3",
103
+ children: [I.aesthetics.length > 0 ? /* @__PURE__ */ D(m, {
104
+ tags: I.aesthetics.map(f),
105
+ tone: "accent",
106
+ max: 12
107
+ }) : /* @__PURE__ */ D("span", {}), /* @__PURE__ */ D(r, { status: I.status })]
108
+ }),
109
+ I.bio && /* @__PURE__ */ D("p", {
110
+ className: "text-sm text-text-secondary",
111
+ children: I.bio
112
+ }),
113
+ I.tags.length > 0 && /* @__PURE__ */ D(m, {
114
+ tags: I.tags,
115
+ max: 12
116
+ }),
117
+ B ? /* @__PURE__ */ O("a", {
118
+ href: B,
119
+ target: "_blank",
120
+ rel: "noopener noreferrer",
121
+ className: "inline-flex max-w-full items-center gap-1.5 text-sm font-medium text-action-primary-bg hover:underline",
122
+ children: [
123
+ /* @__PURE__ */ D(v, { className: "h-4 w-4 shrink-0" }),
124
+ " ",
125
+ /* @__PURE__ */ D("span", {
126
+ className: "break-all",
127
+ children: B
128
+ })
129
+ ]
130
+ }) : I.websiteUrl ? /* @__PURE__ */ D("p", {
131
+ className: "break-all text-sm text-text-secondary",
132
+ children: I.websiteUrl
133
+ }) : null
134
+ ]
131
135
  }),
132
- /* @__PURE__ */ w("section", {
136
+ /* @__PURE__ */ O("section", {
133
137
  className: "mt-6",
134
- children: [/* @__PURE__ */ C("div", {
135
- className: "mb-3 flex items-center justify-between",
136
- children: /* @__PURE__ */ w("h3", {
138
+ children: [/* @__PURE__ */ O("div", {
139
+ className: "mb-3 flex items-center justify-between gap-2",
140
+ children: [/* @__PURE__ */ O("h3", {
137
141
  className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
138
142
  children: [
139
- /* @__PURE__ */ C(v, { className: "h-5 w-5" }),
143
+ /* @__PURE__ */ D(S, { className: "h-5 w-5" }),
140
144
  " Collections (",
141
- M.length,
145
+ L.length,
142
146
  ")"
143
147
  ]
144
- })
145
- }), M.length === 0 ? /* @__PURE__ */ C("p", {
148
+ }), /* @__PURE__ */ O("button", {
149
+ type: "button",
150
+ onClick: () => M(`/collections/new?brandId=${I.id}`),
151
+ className: "inline-flex shrink-0 items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
152
+ children: [/* @__PURE__ */ D(x, { className: "h-4 w-4" }), " Add collection"]
153
+ })]
154
+ }), L.length === 0 ? /* @__PURE__ */ D("p", {
146
155
  className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
147
156
  children: "No collections yet."
148
- }) : /* @__PURE__ */ C("div", {
157
+ }) : /* @__PURE__ */ D("div", {
149
158
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
150
- children: M.map((e) => /* @__PURE__ */ w("button", {
159
+ children: L.map((e) => /* @__PURE__ */ O("button", {
151
160
  type: "button",
152
- onClick: () => O(`/collections/${e.id}`),
161
+ onClick: () => M(`/collections/${e.id}`),
153
162
  className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-3 text-left transition-colors hover:bg-bg-sunken/50",
154
163
  children: [
155
- /* @__PURE__ */ C(o, {
156
- icon: /* @__PURE__ */ C(v, { className: "h-5 w-5" }),
164
+ /* @__PURE__ */ D(o, {
165
+ icon: /* @__PURE__ */ D(S, { className: "h-5 w-5" }),
157
166
  seed: e.id,
167
+ fileId: e.cover?.id,
168
+ alt: e.name,
158
169
  className: "h-11 w-11 shrink-0"
159
170
  }),
160
- /* @__PURE__ */ w("div", {
171
+ /* @__PURE__ */ O("div", {
161
172
  className: "min-w-0 flex-1",
162
- children: [/* @__PURE__ */ C("p", {
173
+ children: [/* @__PURE__ */ D("p", {
163
174
  className: "truncate text-sm font-medium text-text-primary",
164
175
  children: e.name
165
- }), /* @__PURE__ */ C("p", {
176
+ }), /* @__PURE__ */ D("p", {
166
177
  className: "text-xs text-text-secondary",
167
- children: d(e.season)
178
+ children: f(e.season)
168
179
  })]
169
180
  }),
170
- /* @__PURE__ */ C(r, { status: e.status })
181
+ /* @__PURE__ */ D(r, { status: e.status })
171
182
  ]
172
183
  }, e.id))
173
184
  })]
174
185
  }),
175
- /* @__PURE__ */ w("section", {
186
+ /* @__PURE__ */ O("section", {
176
187
  className: "mt-6",
177
- children: [/* @__PURE__ */ w("h3", {
188
+ children: [/* @__PURE__ */ O("h3", {
178
189
  className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
179
190
  children: [
180
- /* @__PURE__ */ C(y, { className: "h-5 w-5" }),
191
+ /* @__PURE__ */ D(C, { className: "h-5 w-5" }),
181
192
  " Style items (",
182
- N.length,
193
+ R.length,
183
194
  ")"
184
195
  ]
185
- }), N.length === 0 ? /* @__PURE__ */ C("p", {
196
+ }), R.length === 0 ? /* @__PURE__ */ D("p", {
186
197
  className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
187
198
  children: "No items yet."
188
- }) : /* @__PURE__ */ C("div", {
199
+ }) : /* @__PURE__ */ D("div", {
189
200
  className: "grid grid-cols-2 gap-3 sm:grid-cols-3",
190
- children: N.map((e) => /* @__PURE__ */ w("button", {
201
+ children: R.map((e) => /* @__PURE__ */ O("button", {
191
202
  type: "button",
192
- onClick: () => O(`/items/${e.id}`),
203
+ onClick: () => M(`/items/${e.id}`),
193
204
  className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface text-left transition-all hover:border-accent-foreground/20 hover:shadow-md",
194
- children: [/* @__PURE__ */ C(o, {
195
- icon: p(e.category, 24),
205
+ children: [/* @__PURE__ */ D(o, {
206
+ icon: g(e.category, 24),
196
207
  seed: e.id,
208
+ fileId: e.image?.id,
209
+ alt: e.name,
197
210
  className: "h-24 w-full"
198
- }), /* @__PURE__ */ w("div", {
211
+ }), /* @__PURE__ */ O("div", {
199
212
  className: "p-3",
200
- children: [/* @__PURE__ */ C("p", {
213
+ children: [/* @__PURE__ */ D("p", {
201
214
  className: "truncate text-sm font-medium text-text-primary",
202
215
  children: e.name
203
- }), /* @__PURE__ */ C("p", {
216
+ }), /* @__PURE__ */ D("p", {
204
217
  className: "mt-0.5 text-xs text-text-secondary",
205
- children: u(e.price, e.currency)
218
+ children: d(e.price, e.currency)
206
219
  })]
207
220
  })]
208
221
  }, e.id))
209
222
  })]
210
223
  })
211
224
  ]
212
- }), /* @__PURE__ */ w("div", {
225
+ }), /* @__PURE__ */ O("div", {
213
226
  className: "space-y-4",
214
- children: [/* @__PURE__ */ w(T, {
215
- treatment: "insight",
216
- className: "p-5",
217
- children: [
218
- /* @__PURE__ */ C("h3", {
219
- className: "mb-3 text-sm font-semibold text-text-primary",
220
- children: "Lifecycle"
221
- }),
222
- /* @__PURE__ */ w("div", {
223
- className: "mb-3 flex items-center gap-2",
224
- children: [/* @__PURE__ */ C("span", {
225
- className: "text-sm text-text-secondary",
226
- children: "Current:"
227
- }), /* @__PURE__ */ C(r, { status: j.status })]
228
- }),
229
- P.length === 0 ? /* @__PURE__ */ C("p", {
230
- className: "text-xs text-text-secondary",
231
- children: "This brand is archived (terminal state)."
232
- }) : /* @__PURE__ */ C("div", {
233
- className: "flex flex-col gap-2",
234
- children: P.map((e) => /* @__PURE__ */ w("button", {
235
- type: "button",
236
- disabled: A.isPending,
237
- onClick: () => A.mutate({
238
- id: j.id,
239
- status: e
240
- }),
241
- className: t("inline-flex items-center justify-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50"),
242
- children: [
243
- A.isPending && /* @__PURE__ */ C(g, { className: "h-3.5 w-3.5 animate-spin" }),
244
- "Move to ",
245
- d(e)
246
- ]
247
- }, e))
248
- }),
249
- A.isError && /* @__PURE__ */ C("p", {
250
- className: "mt-2 text-xs text-status-error-text",
251
- children: A.error instanceof Error ? A.error.message : "Transition failed"
252
- })
253
- ]
254
- }), /* @__PURE__ */ w(T, {
255
- treatment: "plain",
256
- className: "p-5",
257
- children: [/* @__PURE__ */ C("h3", {
258
- className: "mb-3 text-sm font-semibold text-text-primary",
259
- children: "Details"
260
- }), /* @__PURE__ */ w("dl", {
261
- className: "space-y-2 text-sm",
227
+ children: [
228
+ /* @__PURE__ */ O(k, {
229
+ treatment: "insight",
230
+ className: "p-5",
262
231
  children: [
263
- /* @__PURE__ */ w("div", {
264
- className: "flex justify-between gap-2",
265
- children: [/* @__PURE__ */ C("dt", {
266
- className: "text-text-secondary",
267
- children: "Handle"
268
- }), /* @__PURE__ */ w("dd", {
269
- className: "text-text-primary",
270
- children: ["@", j.handle]
271
- })]
232
+ /* @__PURE__ */ D("h3", {
233
+ className: "mb-3 text-sm font-semibold text-text-primary",
234
+ children: "Lifecycle"
272
235
  }),
273
- /* @__PURE__ */ w("div", {
274
- className: "flex justify-between gap-2",
275
- children: [/* @__PURE__ */ C("dt", {
276
- className: "text-text-secondary",
277
- children: "Featured"
278
- }), /* @__PURE__ */ C("dd", {
279
- className: "text-text-primary",
280
- children: j.isFeatured ? "Yes" : "No"
281
- })]
236
+ /* @__PURE__ */ O("div", {
237
+ className: "mb-3 flex items-center gap-2",
238
+ children: [/* @__PURE__ */ D("span", {
239
+ className: "text-sm text-text-secondary",
240
+ children: "Current:"
241
+ }), /* @__PURE__ */ D(r, { status: I.status })]
282
242
  }),
283
- /* @__PURE__ */ w("div", {
284
- className: "flex justify-between gap-2",
285
- children: [/* @__PURE__ */ C("dt", {
286
- className: "text-text-secondary",
287
- children: "Created"
288
- }), /* @__PURE__ */ C("dd", {
289
- className: "text-text-primary",
290
- children: l(j.createdAt, {
291
- hour: void 0,
292
- minute: void 0
293
- })
294
- })]
243
+ z.length === 0 ? /* @__PURE__ */ D("p", {
244
+ className: "text-xs text-text-secondary",
245
+ children: "This brand is archived (terminal state)."
246
+ }) : /* @__PURE__ */ D("div", {
247
+ className: "flex flex-col gap-2",
248
+ children: z.map((e) => /* @__PURE__ */ O("button", {
249
+ type: "button",
250
+ disabled: P.isPending,
251
+ onClick: () => P.mutate({
252
+ id: I.id,
253
+ status: e
254
+ }),
255
+ className: t("inline-flex items-center justify-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50"),
256
+ children: [
257
+ P.isPending && /* @__PURE__ */ D(y, { className: "h-3.5 w-3.5 animate-spin" }),
258
+ "Move to ",
259
+ f(e)
260
+ ]
261
+ }, e))
295
262
  }),
296
- /* @__PURE__ */ w("div", {
297
- className: "flex justify-between gap-2",
298
- children: [/* @__PURE__ */ C("dt", {
299
- className: "text-text-secondary",
300
- children: "Updated"
301
- }), /* @__PURE__ */ C("dd", {
302
- className: "text-text-primary",
303
- children: l(j.updatedAt, {
304
- hour: void 0,
305
- minute: void 0
306
- })
307
- })]
263
+ P.isError && /* @__PURE__ */ D("p", {
264
+ className: "mt-2 text-xs text-status-error-text",
265
+ children: P.error instanceof Error ? P.error.message : "Transition failed"
308
266
  })
309
267
  ]
310
- })]
311
- })]
268
+ }),
269
+ /* @__PURE__ */ O(k, {
270
+ treatment: "plain",
271
+ className: "p-5",
272
+ children: [/* @__PURE__ */ D("h3", {
273
+ className: "mb-3 text-sm font-semibold text-text-primary",
274
+ children: "Details"
275
+ }), /* @__PURE__ */ O("dl", {
276
+ className: "space-y-2 text-sm",
277
+ children: [
278
+ /* @__PURE__ */ O("div", {
279
+ className: "flex justify-between gap-2",
280
+ children: [/* @__PURE__ */ D("dt", {
281
+ className: "text-text-secondary",
282
+ children: "Handle"
283
+ }), /* @__PURE__ */ O("dd", {
284
+ className: "text-text-primary",
285
+ children: ["@", I.handle]
286
+ })]
287
+ }),
288
+ /* @__PURE__ */ O("div", {
289
+ className: "flex items-center justify-between gap-2",
290
+ children: [/* @__PURE__ */ D("dt", {
291
+ className: "text-text-secondary",
292
+ children: "Featured"
293
+ }), /* @__PURE__ */ O("dd", {
294
+ className: "flex items-center gap-2",
295
+ children: [/* @__PURE__ */ D("button", {
296
+ type: "button",
297
+ role: "switch",
298
+ "aria-checked": I.isFeatured,
299
+ "aria-label": I.isFeatured ? "Unfeature this brand" : "Feature this brand",
300
+ disabled: F.isPending,
301
+ onClick: () => F.mutate({
302
+ id: I.id,
303
+ input: { isFeatured: !I.isFeatured }
304
+ }),
305
+ className: t("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", I.isFeatured ? "bg-action-primary-bg" : "bg-bg-sunken"),
306
+ children: /* @__PURE__ */ D("span", { className: t("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", I.isFeatured ? "translate-x-[1.125rem]" : "translate-x-0.5") })
307
+ }), F.isPending && /* @__PURE__ */ D(y, { className: "h-3.5 w-3.5 animate-spin text-text-secondary" })]
308
+ })]
309
+ }),
310
+ /* @__PURE__ */ O("div", {
311
+ className: "flex justify-between gap-2",
312
+ children: [/* @__PURE__ */ D("dt", {
313
+ className: "text-text-secondary",
314
+ children: "Created"
315
+ }), /* @__PURE__ */ D("dd", {
316
+ className: "text-text-primary",
317
+ children: u(I.createdAt, {
318
+ hour: void 0,
319
+ minute: void 0
320
+ })
321
+ })]
322
+ }),
323
+ /* @__PURE__ */ O("div", {
324
+ className: "flex justify-between gap-2",
325
+ children: [/* @__PURE__ */ D("dt", {
326
+ className: "text-text-secondary",
327
+ children: "Updated"
328
+ }), /* @__PURE__ */ D("dd", {
329
+ className: "text-text-primary",
330
+ children: u(I.updatedAt, {
331
+ hour: void 0,
332
+ minute: void 0
333
+ })
334
+ })]
335
+ })
336
+ ]
337
+ })]
338
+ }),
339
+ /* @__PURE__ */ D(h, {
340
+ entityType: "CooBrand",
341
+ entityId: I.id,
342
+ className: "mt-0"
343
+ })
344
+ ]
312
345
  })]
313
346
  })
314
347
  });
315
348
  }
316
349
  //#endregion
317
- export { D as BrandDetailPage };
350
+ export { j as BrandDetailPage };
318
351
 
319
352
  //# sourceMappingURL=BrandDetailPage.js.map