@burdenoff/microfe-coolandlovely 2026.706.2 → 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 (75) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/components/AddToLookbookButton.js +22 -22
  4. package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -1
  5. package/dist/coolandlovely/components/BrandCover.js +39 -0
  6. package/dist/coolandlovely/components/BrandCover.js.map +1 -0
  7. package/dist/coolandlovely/components/BrandCreatorAvatars.js +57 -0
  8. package/dist/coolandlovely/components/BrandCreatorAvatars.js.map +1 -0
  9. package/dist/coolandlovely/components/ColourSwatchRow.js +86 -0
  10. package/dist/coolandlovely/components/ColourSwatchRow.js.map +1 -0
  11. package/dist/coolandlovely/components/Comments.js +4 -4
  12. package/dist/coolandlovely/components/Comments.js.map +1 -1
  13. package/dist/coolandlovely/components/FileImage.js.map +1 -1
  14. package/dist/coolandlovely/components/ImageUploadField.js +139 -57
  15. package/dist/coolandlovely/components/ImageUploadField.js.map +1 -1
  16. package/dist/coolandlovely/components/LookCard.js +77 -0
  17. package/dist/coolandlovely/components/LookCard.js.map +1 -0
  18. package/dist/coolandlovely/components/MetricsCard.js +1 -1
  19. package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
  20. package/dist/coolandlovely/components/ShopItemCard.js +45 -0
  21. package/dist/coolandlovely/components/ShopItemCard.js.map +1 -0
  22. package/dist/coolandlovely/components/StepTracker.js +35 -0
  23. package/dist/coolandlovely/components/StepTracker.js.map +1 -0
  24. package/dist/coolandlovely/components/Thumbnail.js +15 -11
  25. package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
  26. package/dist/coolandlovely/components/VisibilityChip.js +32 -0
  27. package/dist/coolandlovely/components/VisibilityChip.js.map +1 -0
  28. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +94 -69
  29. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  30. package/dist/coolandlovely/hooks/useFiles.js +49 -32
  31. package/dist/coolandlovely/hooks/useFiles.js.map +1 -1
  32. package/dist/coolandlovely/pages/HomePage.js +112 -133
  33. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  34. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +253 -242
  35. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  36. package/dist/coolandlovely/pages/brands/BrandFormPage.js +116 -112
  37. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
  38. package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -13
  39. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
  40. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +117 -95
  41. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  42. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +1 -1
  43. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +50 -43
  44. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  45. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +131 -108
  46. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  47. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +1 -1
  48. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -56
  49. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
  50. package/dist/coolandlovely/pages/discover/DiscoverPage.js +1 -1
  51. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
  52. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +175 -147
  53. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +1 -1
  55. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +71 -62
  56. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
  57. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +149 -127
  58. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  59. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +69 -53
  60. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
  61. package/dist/coolandlovely/pages/looks/LookDetailPage.js +135 -113
  62. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  63. package/dist/coolandlovely/pages/looks/LookFormPage.js +122 -110
  64. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
  65. package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -97
  66. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  67. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +372 -210
  68. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  69. package/dist/coolandlovely/pages/trends/TrendsPage.js +1 -1
  70. package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -1
  71. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +130 -94
  72. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
  73. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -76
  74. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  75. package/package.json +1 -1
@@ -1,284 +1,446 @@
1
- import { PageLayout as e } from "../../components/PageLayout.js";
2
- import { StatusBadge as t } from "../../components/StatusBadge.js";
3
- import { ErrorView as n, LoadingView as r } from "../../components/StateViews.js";
4
- import { useMyFollowing as i, useMyStyleProfile as a, useUpsertStyleProfile as o } from "../../hooks/useCoolAndLovelyApi.js";
1
+ import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
+ import { cn as t } from "../../utils/cn.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { ErrorView as r, LoadingView as i } from "../../components/StateViews.js";
5
+ import { Thumbnail as a } from "../../components/Thumbnail.js";
6
+ import { useLooks as o, useMyFollowing as s, useMyStyleProfile as c, useUpsertStyleProfile as l, useWardrobeItems as u } from "../../hooks/useCoolAndLovelyApi.js";
7
+ import { parseCsv as d, titleCase as f } from "../../utils/formatters.js";
5
8
  import "../../hooks/index.js";
6
- import { parseCsv as s, titleCase as c } from "../../utils/formatters.js";
7
- import { TagList as l } from "../../components/TagList.js";
8
- import { ActorName as u } from "../../components/ActorName.js";
9
- import { SelectField as d, TextAreaField as f, TextField as p } from "../../components/Field.js";
10
- import { FollowButton as m } from "../../components/FollowButton.js";
11
- import { useEffect as h, useState as g } from "react";
12
- import { Loader2 as _, Pencil as v, Save as y, UserCircle as b, Users as x, X as S } from "lucide-react";
13
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
14
- import { GlassCard as T } from "@burdenoff/fe-libs/ui";
9
+ import { ActorName as p } from "../../components/ActorName.js";
10
+ import { categoryIcon as m } from "../../utils/icons.js";
11
+ import { SelectField as h, TextAreaField as g, TextField as _ } from "../../components/Field.js";
12
+ import { ColourSwatchRow as v } from "../../components/ColourSwatchRow.js";
13
+ import { VisibilityChip as y } from "../../components/VisibilityChip.js";
14
+ import { FollowButton as b } from "../../components/FollowButton.js";
15
+ import { useEffect as x, useState as S } from "react";
16
+ import { Loader2 as C, Pencil as w, Save as T, Shirt as E, Sparkles as D, UserCircle as O, Users as k, X as A } from "lucide-react";
17
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
18
+ import { GlassCard as N } from "@burdenoff/fe-libs/ui";
15
19
  //#region src/coolandlovely/pages/profile/StyleProfilePage.tsx
16
- var E = [
20
+ var P = [
17
21
  "PUBLIC",
18
22
  "FOLLOWERS",
19
23
  "PRIVATE"
20
- ], D = {
24
+ ], F = [
25
+ "Tops",
26
+ "Bottoms",
27
+ "Dresses",
28
+ "Shoes",
29
+ "Outerwear"
30
+ ], I = {
21
31
  displayName: "",
22
32
  bio: "",
23
33
  visibility: "PRIVATE",
24
34
  stylePreferences: "",
25
35
  palette: "",
26
- favouriteBrands: ""
36
+ favouriteBrands: "",
37
+ sizes: {}
27
38
  };
28
- function O() {
29
- let O = a(), k = o(), A = i(), [j, M] = g(!1), [N, P] = g(D), F = O.data, I = !!F, L = A.data ?? [];
30
- h(() => {
31
- F && P({
32
- displayName: F.displayName ?? "",
33
- bio: F.bio ?? "",
34
- visibility: F.visibility,
35
- stylePreferences: F.stylePreferences.join(", "),
36
- palette: F.palette.join(", "),
37
- favouriteBrands: F.favouriteBrands.join(", ")
39
+ function L(e) {
40
+ let t = e.trim().split(/\s+/).filter(Boolean);
41
+ return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
42
+ }
43
+ function R({ title: e, children: n, className: r }) {
44
+ return /* @__PURE__ */ M(N, {
45
+ treatment: "plain",
46
+ className: t("p-5", r),
47
+ children: [/* @__PURE__ */ j("h3", {
48
+ className: "mb-3 text-sm font-semibold text-text-primary",
49
+ children: e
50
+ }), n]
51
+ });
52
+ }
53
+ function z() {
54
+ let { navigateTo: z, currentUser: B } = e(), V = c(), H = l(), U = s(), W = u(), G = o({
55
+ authorId: V.data?.ownerId,
56
+ pagination: {
57
+ limit: 6,
58
+ offset: 0
59
+ }
60
+ }), [K, q] = S(!1), [J, Y] = S(I), X = V.data, Z = !!X, Q = U.data ?? [];
61
+ x(() => {
62
+ X && Y({
63
+ displayName: X.displayName ?? "",
64
+ bio: X.bio ?? "",
65
+ visibility: X.visibility,
66
+ stylePreferences: X.stylePreferences.join(", "),
67
+ palette: X.palette.join(", "),
68
+ favouriteBrands: X.favouriteBrands.join(", "),
69
+ sizes: Object.fromEntries(Object.entries(X.sizes ?? {}).map(([e, t]) => [e, String(t ?? "")]))
38
70
  });
39
- }, [F]), h(() => {
40
- !O.isLoading && !I && M(!0);
41
- }, [O.isLoading, I]);
42
- let R = (e, t) => P((n) => ({
71
+ }, [X]), x(() => {
72
+ !V.isLoading && !Z && q(!0);
73
+ }, [V.isLoading, Z]);
74
+ let $ = (e, t) => Y((n) => ({
43
75
  ...n,
44
76
  [e]: t
45
- })), z = E.map((e) => ({
77
+ })), ee = (e, t) => Y((n) => ({
78
+ ...n,
79
+ sizes: {
80
+ ...n.sizes,
81
+ [e]: t
82
+ }
83
+ })), te = P.map((e) => ({
46
84
  value: e,
47
- label: c(e)
48
- }));
49
- return O.isLoading ? /* @__PURE__ */ C(e, {
85
+ label: f(e)
86
+ })), ne = (e) => {
87
+ e.preventDefault();
88
+ let t = Object.fromEntries(Object.entries(J.sizes).map(([e, t]) => [e, t.trim()]).filter(([, e]) => e.length > 0));
89
+ H.mutate({
90
+ displayName: J.displayName.trim() || void 0,
91
+ bio: J.bio.trim() || void 0,
92
+ visibility: J.visibility,
93
+ stylePreferences: d(J.stylePreferences),
94
+ palette: d(J.palette),
95
+ favouriteBrands: d(J.favouriteBrands),
96
+ sizes: t
97
+ }, { onSuccess: () => q(!1) });
98
+ };
99
+ if (V.isLoading) return /* @__PURE__ */ j(n, {
50
100
  title: "Style Profile",
51
- children: /* @__PURE__ */ C(r, { label: "Loading your style profile…" })
52
- }) : O.isError ? /* @__PURE__ */ C(e, {
53
- title: "Style Profile",
54
- children: /* @__PURE__ */ C(n, { onRetry: () => void O.refetch() })
55
- }) : !j && F ? /* @__PURE__ */ C(e, {
101
+ children: /* @__PURE__ */ j(i, { label: "Loading your style profile…" })
102
+ });
103
+ if (V.isError) return /* @__PURE__ */ j(n, {
56
104
  title: "Style Profile",
57
- description: "Your taste, palette and sizing — the spine of personalised discovery",
58
- actions: /* @__PURE__ */ w("button", {
59
- type: "button",
60
- onClick: () => M(!0),
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 transition-colors hover:bg-action-primary-bg/90",
62
- children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), " Edit"]
63
- }),
64
- children: /* @__PURE__ */ w("div", {
65
- className: "mx-auto max-w-2xl",
66
- children: [/* @__PURE__ */ w(T, {
67
- treatment: "glass",
68
- className: "p-6",
105
+ children: /* @__PURE__ */ j(r, { onRetry: () => void V.refetch() })
106
+ });
107
+ if (!K && X) {
108
+ let e = B?.profilePicture || B?.avatar, r = (W.data ?? []).slice(0, 6), i = G.data?.items ?? [], o = Object.entries(X.sizes ?? {});
109
+ return /* @__PURE__ */ j(n, {
110
+ title: "Style Profile",
111
+ description: "Your taste, palette and sizing — the spine of personalised discovery",
112
+ actions: /* @__PURE__ */ M("button", {
113
+ type: "button",
114
+ onClick: () => q(!0),
115
+ 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",
116
+ children: [/* @__PURE__ */ j(w, { className: "h-4 w-4" }), " Edit"]
117
+ }),
118
+ children: /* @__PURE__ */ M("div", {
119
+ className: "mx-auto max-w-5xl",
69
120
  children: [
70
- /* @__PURE__ */ w("div", {
71
- className: "flex items-center gap-4",
72
- children: [/* @__PURE__ */ C("div", {
73
- className: "flex h-14 w-14 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
74
- children: /* @__PURE__ */ C(b, { className: "h-7 w-7" })
75
- }), /* @__PURE__ */ w("div", {
76
- className: "min-w-0 flex-1",
77
- children: [/* @__PURE__ */ C("h2", {
78
- className: "truncate text-xl font-semibold text-text-primary",
79
- children: F.displayName || "Your style profile"
80
- }), /* @__PURE__ */ C(t, {
81
- status: F.visibility,
82
- className: "mt-1"
121
+ /* @__PURE__ */ j(N, {
122
+ treatment: "glass",
123
+ className: "p-6",
124
+ children: /* @__PURE__ */ M("div", {
125
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center",
126
+ children: [e ? /* @__PURE__ */ j("img", {
127
+ src: e,
128
+ alt: X.displayName || "Your avatar",
129
+ className: "h-16 w-16 shrink-0 rounded-full object-cover ring-2 ring-bg-surface"
130
+ }) : /* @__PURE__ */ j("div", {
131
+ className: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
132
+ children: /* @__PURE__ */ j(O, { className: "h-8 w-8" })
133
+ }), /* @__PURE__ */ M("div", {
134
+ className: "min-w-0 flex-1",
135
+ children: [
136
+ /* @__PURE__ */ M("div", {
137
+ className: "flex flex-wrap items-center gap-2",
138
+ children: [/* @__PURE__ */ j("h2", {
139
+ className: "truncate text-xl font-semibold text-text-primary",
140
+ children: X.displayName || B?.name || "Your style profile"
141
+ }), /* @__PURE__ */ j(y, { visibility: X.visibility })]
142
+ }),
143
+ X.bio && /* @__PURE__ */ j("p", {
144
+ className: "mt-1 line-clamp-2 text-sm text-text-secondary",
145
+ children: X.bio
146
+ }),
147
+ /* @__PURE__ */ M("div", {
148
+ className: "mt-2 flex items-center gap-6",
149
+ children: [/* @__PURE__ */ M("span", {
150
+ className: "text-sm text-text-secondary",
151
+ children: [
152
+ /* @__PURE__ */ j("span", {
153
+ className: "font-semibold text-text-primary tabular-nums",
154
+ children: X.followerCount ?? 0
155
+ }),
156
+ " ",
157
+ X.followerCount === 1 ? "follower" : "followers"
158
+ ]
159
+ }), /* @__PURE__ */ M("span", {
160
+ className: "text-sm text-text-secondary",
161
+ children: [
162
+ /* @__PURE__ */ j("span", {
163
+ className: "font-semibold text-text-primary tabular-nums",
164
+ children: X.followingCount ?? 0
165
+ }),
166
+ " ",
167
+ "following"
168
+ ]
169
+ })]
170
+ })
171
+ ]
83
172
  })]
84
- })]
85
- }),
86
- F.bio && /* @__PURE__ */ C("p", {
87
- className: "mt-4 text-sm text-text-secondary",
88
- children: F.bio
173
+ })
89
174
  }),
90
- /* @__PURE__ */ w("div", {
91
- className: "mt-4 flex items-center gap-6",
92
- children: [/* @__PURE__ */ w("span", {
93
- className: "text-sm text-text-secondary",
175
+ /* @__PURE__ */ M("div", {
176
+ className: "mt-6 grid gap-6 lg:grid-cols-5",
177
+ children: [/* @__PURE__ */ M("div", {
178
+ className: "space-y-6 lg:col-span-3",
94
179
  children: [
95
- /* @__PURE__ */ C("span", {
96
- className: "font-semibold text-text-primary tabular-nums",
97
- children: F.followerCount ?? 0
180
+ /* @__PURE__ */ j(R, {
181
+ title: "Style preferences",
182
+ children: X.stylePreferences.length ? /* @__PURE__ */ j("div", {
183
+ className: "flex flex-wrap gap-2",
184
+ children: X.stylePreferences.map((e, n) => /* @__PURE__ */ j("span", {
185
+ className: t("rounded-full px-3 py-1 text-sm font-medium", n === 0 ? "bg-accent-purple-subtle text-text-primary ring-1 ring-[var(--color-accent-soft)]" : "bg-bg-sunken text-text-secondary"),
186
+ children: e
187
+ }, `${e}-${n}`))
188
+ }) : /* @__PURE__ */ j("p", {
189
+ className: "text-sm text-text-secondary",
190
+ children: "No preferences yet — add a few in Edit."
191
+ })
98
192
  }),
99
- " ",
100
- F.followerCount === 1 ? "follower" : "followers"
101
- ]
102
- }), /* @__PURE__ */ w("span", {
103
- className: "text-sm text-text-secondary",
104
- children: [
105
- /* @__PURE__ */ C("span", {
106
- className: "font-semibold text-text-primary tabular-nums",
107
- children: F.followingCount ?? 0
193
+ /* @__PURE__ */ j(R, {
194
+ title: "Palette",
195
+ children: X.palette.length ? /* @__PURE__ */ j(v, {
196
+ colours: X.palette,
197
+ max: 12,
198
+ className: "gap-2.5"
199
+ }) : /* @__PURE__ */ j("p", {
200
+ className: "text-sm text-text-secondary",
201
+ children: "No palette yet."
202
+ })
108
203
  }),
109
- " ",
110
- "following"
204
+ /* @__PURE__ */ M("div", {
205
+ className: "grid gap-6 sm:grid-cols-2",
206
+ children: [/* @__PURE__ */ j(R, {
207
+ title: "Favourite brands",
208
+ children: X.favouriteBrands.length ? /* @__PURE__ */ j("div", {
209
+ className: "grid grid-cols-1 gap-2",
210
+ children: X.favouriteBrands.map((e, t) => /* @__PURE__ */ M("div", {
211
+ className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2",
212
+ children: [/* @__PURE__ */ j("span", {
213
+ className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-accent-purple-subtle text-xs font-bold text-text-primary",
214
+ children: L(e)
215
+ }), /* @__PURE__ */ j("span", {
216
+ className: "truncate text-sm font-medium text-text-primary",
217
+ children: e
218
+ })]
219
+ }, `${e}-${t}`))
220
+ }) : /* @__PURE__ */ j("p", {
221
+ className: "text-sm text-text-secondary",
222
+ children: "No brands yet."
223
+ })
224
+ }), /* @__PURE__ */ j(R, {
225
+ title: "Sizes",
226
+ children: o.length ? /* @__PURE__ */ j("dl", {
227
+ className: "space-y-0",
228
+ children: o.map(([e, t]) => /* @__PURE__ */ M("div", {
229
+ className: "flex items-center justify-between border-b border-border-seam/60 py-1.5 last:border-0",
230
+ children: [/* @__PURE__ */ j("dt", {
231
+ className: "text-sm text-text-secondary",
232
+ children: f(e)
233
+ }), /* @__PURE__ */ j("dd", {
234
+ className: "text-sm font-medium text-text-primary tabular-nums",
235
+ children: String(t)
236
+ })]
237
+ }, e))
238
+ }) : /* @__PURE__ */ j("p", {
239
+ className: "text-sm text-text-secondary",
240
+ children: "No sizes recorded yet."
241
+ })
242
+ })]
243
+ })
111
244
  ]
245
+ }), /* @__PURE__ */ M("div", {
246
+ className: "space-y-6 lg:col-span-2",
247
+ children: [/* @__PURE__ */ j(R, {
248
+ title: "Her wardrobe",
249
+ children: W.isLoading ? /* @__PURE__ */ M("div", {
250
+ className: "flex items-center gap-2 text-sm text-text-secondary",
251
+ children: [/* @__PURE__ */ j(C, { className: "h-4 w-4 animate-spin" }), " Loading…"]
252
+ }) : r.length ? /* @__PURE__ */ j("div", {
253
+ className: "grid grid-cols-3 gap-2",
254
+ children: r.map((e) => /* @__PURE__ */ j("button", {
255
+ type: "button",
256
+ onClick: () => z("/wardrobe"),
257
+ "aria-label": e.name,
258
+ className: "group overflow-hidden rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
259
+ children: /* @__PURE__ */ j(a, {
260
+ icon: m(e.category, 18),
261
+ seed: e.id,
262
+ fileId: e.image?.id,
263
+ alt: e.name,
264
+ className: "aspect-square w-full rounded-lg"
265
+ })
266
+ }, e.id))
267
+ }) : /* @__PURE__ */ M("button", {
268
+ type: "button",
269
+ onClick: () => z("/wardrobe/new"),
270
+ className: "flex w-full items-center gap-2 rounded-lg border border-dashed border-border-seam px-3 py-3 text-left text-sm text-text-secondary transition-colors hover:text-text-primary",
271
+ children: [/* @__PURE__ */ j(E, { className: "h-4 w-4" }), " Add pieces to your wardrobe"]
272
+ })
273
+ }), /* @__PURE__ */ j(R, {
274
+ title: "Recent looks",
275
+ children: G.isLoading ? /* @__PURE__ */ M("div", {
276
+ className: "flex items-center gap-2 text-sm text-text-secondary",
277
+ children: [/* @__PURE__ */ j(C, { className: "h-4 w-4 animate-spin" }), " Loading…"]
278
+ }) : i.length ? /* @__PURE__ */ j("div", {
279
+ className: "-mx-1 flex gap-3 overflow-x-auto px-1 pb-1",
280
+ children: i.map((e) => /* @__PURE__ */ M("button", {
281
+ type: "button",
282
+ onClick: () => z(`/looks/${e.id}`),
283
+ className: "group w-24 shrink-0 text-left focus-visible:outline-none",
284
+ children: [/* @__PURE__ */ j(a, {
285
+ icon: /* @__PURE__ */ j(D, { className: "h-5 w-5" }),
286
+ seed: e.id,
287
+ fileId: e.image?.id,
288
+ alt: e.title,
289
+ className: "aspect-[3/4] w-full rounded-lg"
290
+ }), /* @__PURE__ */ j("p", {
291
+ className: "mt-1 truncate text-xs text-text-secondary",
292
+ children: e.title
293
+ })]
294
+ }, e.id))
295
+ }) : /* @__PURE__ */ j("p", {
296
+ className: "text-sm text-text-secondary",
297
+ children: "You have not published any looks yet."
298
+ })
299
+ })]
112
300
  })]
113
301
  }),
114
- /* @__PURE__ */ w("div", {
115
- className: "mt-6 space-y-4",
116
- children: [
117
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
118
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
119
- children: "Style preferences"
120
- }), F.stylePreferences.length ? /* @__PURE__ */ C(l, {
121
- tags: F.stylePreferences,
122
- tone: "accent",
123
- max: 20
124
- }) : /* @__PURE__ */ C("p", {
125
- className: "text-sm text-text-secondary",
126
- children: "—"
127
- })] }),
128
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
129
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
130
- children: "Palette"
131
- }), F.palette.length ? /* @__PURE__ */ C(l, {
132
- tags: F.palette,
133
- max: 20
134
- }) : /* @__PURE__ */ C("p", {
135
- className: "text-sm text-text-secondary",
136
- children: "—"
137
- })] }),
138
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
139
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
140
- children: "Favourite brands"
141
- }), F.favouriteBrands.length ? /* @__PURE__ */ C(l, {
142
- tags: F.favouriteBrands,
143
- max: 20
144
- }) : /* @__PURE__ */ C("p", {
145
- className: "text-sm text-text-secondary",
146
- children: "—"
147
- })] })
148
- ]
302
+ /* @__PURE__ */ M("section", {
303
+ className: "mt-6",
304
+ children: [/* @__PURE__ */ M("h3", {
305
+ className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
306
+ children: [
307
+ /* @__PURE__ */ j(k, { className: "h-5 w-5" }),
308
+ " People you follow (",
309
+ Q.length,
310
+ ")"
311
+ ]
312
+ }), U.isLoading ? /* @__PURE__ */ M("div", {
313
+ className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
314
+ children: [/* @__PURE__ */ j(C, { className: "h-4 w-4 animate-spin" }), " Loading…"]
315
+ }) : Q.length === 0 ? /* @__PURE__ */ j("p", {
316
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
317
+ children: "You are not following anyone yet. Follow creators from their looks to see their latest in Discover."
318
+ }) : /* @__PURE__ */ j("ul", {
319
+ className: "divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface",
320
+ children: Q.map((e) => /* @__PURE__ */ M("li", {
321
+ className: "flex items-center gap-3 px-4 py-3",
322
+ children: [
323
+ /* @__PURE__ */ j("div", {
324
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
325
+ children: /* @__PURE__ */ j(O, { className: "h-5 w-5" })
326
+ }),
327
+ /* @__PURE__ */ M("div", {
328
+ className: "min-w-0 flex-1",
329
+ children: [/* @__PURE__ */ j("p", {
330
+ className: "truncate text-sm font-medium text-text-primary",
331
+ children: e.displayName || /* @__PURE__ */ j(p, { id: e.ownerId })
332
+ }), e.bio && /* @__PURE__ */ j("p", {
333
+ className: "truncate text-xs text-text-secondary",
334
+ children: e.bio
335
+ })]
336
+ }),
337
+ /* @__PURE__ */ j(b, {
338
+ followeeId: e.ownerId,
339
+ size: "sm"
340
+ })
341
+ ]
342
+ }, e.id))
343
+ })]
149
344
  })
150
345
  ]
151
- }), /* @__PURE__ */ w("section", {
152
- className: "mt-6",
153
- children: [/* @__PURE__ */ w("h3", {
154
- className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
155
- children: [
156
- /* @__PURE__ */ C(x, { className: "h-5 w-5" }),
157
- " People you follow (",
158
- L.length,
159
- ")"
160
- ]
161
- }), A.isLoading ? /* @__PURE__ */ w("div", {
162
- className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
163
- children: [/* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }), " Loading…"]
164
- }) : L.length === 0 ? /* @__PURE__ */ C("p", {
165
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
166
- children: "You are not following anyone yet. Follow creators from their looks to see their latest in Discover."
167
- }) : /* @__PURE__ */ C("ul", {
168
- className: "divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface",
169
- children: L.map((e) => /* @__PURE__ */ w("li", {
170
- className: "flex items-center gap-3 px-4 py-3",
171
- children: [
172
- /* @__PURE__ */ C("div", {
173
- className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
174
- children: /* @__PURE__ */ C(b, { className: "h-5 w-5" })
175
- }),
176
- /* @__PURE__ */ w("div", {
177
- className: "min-w-0 flex-1",
178
- children: [/* @__PURE__ */ C("p", {
179
- className: "truncate text-sm font-medium text-text-primary",
180
- children: e.displayName || /* @__PURE__ */ C(u, { id: e.ownerId })
181
- }), e.bio && /* @__PURE__ */ C("p", {
182
- className: "truncate text-xs text-text-secondary",
183
- children: e.bio
184
- })]
185
- }),
186
- /* @__PURE__ */ C(m, {
187
- followeeId: e.ownerId,
188
- size: "sm"
189
- })
190
- ]
191
- }, e.id))
192
- })]
193
- })]
194
- })
195
- }) : /* @__PURE__ */ C(e, {
196
- title: I ? "Edit style profile" : "Create your style profile",
346
+ })
347
+ });
348
+ }
349
+ let re = Array.from(new Set([...F, ...Object.keys(J.sizes)]));
350
+ return /* @__PURE__ */ j(n, {
351
+ title: Z ? "Edit style profile" : "Create your style profile",
197
352
  description: "This powers your personalised discovery feed",
198
- actions: I ? /* @__PURE__ */ w("button", {
353
+ actions: Z ? /* @__PURE__ */ M("button", {
199
354
  type: "button",
200
- onClick: () => M(!1),
355
+ onClick: () => q(!1),
201
356
  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",
202
- children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), " Cancel"]
357
+ children: [/* @__PURE__ */ j(A, { className: "h-4 w-4" }), " Cancel"]
203
358
  }) : void 0,
204
- children: /* @__PURE__ */ C("form", {
205
- onSubmit: (e) => {
206
- e.preventDefault(), k.mutate({
207
- displayName: N.displayName.trim() || void 0,
208
- bio: N.bio.trim() || void 0,
209
- visibility: N.visibility,
210
- stylePreferences: s(N.stylePreferences),
211
- palette: s(N.palette),
212
- favouriteBrands: s(N.favouriteBrands)
213
- }, { onSuccess: () => M(!1) });
214
- },
359
+ children: /* @__PURE__ */ j("form", {
360
+ onSubmit: ne,
215
361
  className: "mx-auto max-w-2xl",
216
- children: /* @__PURE__ */ w(T, {
362
+ children: /* @__PURE__ */ M(N, {
217
363
  treatment: "plain",
218
364
  className: "p-6",
219
365
  children: [
220
- /* @__PURE__ */ C(p, {
366
+ /* @__PURE__ */ j(_, {
221
367
  id: "displayName",
222
368
  label: "Display name",
223
- value: N.displayName,
224
- onChange: (e) => R("displayName", e),
369
+ value: J.displayName,
370
+ onChange: (e) => $("displayName", e),
225
371
  placeholder: "How you want to appear"
226
372
  }),
227
- /* @__PURE__ */ C(f, {
373
+ /* @__PURE__ */ j(g, {
228
374
  id: "bio",
229
375
  label: "Bio",
230
- value: N.bio,
231
- onChange: (e) => R("bio", e),
376
+ value: J.bio,
377
+ onChange: (e) => $("bio", e),
232
378
  placeholder: "A sentence about your style…",
233
379
  rows: 3,
234
380
  className: "mt-4"
235
381
  }),
236
- /* @__PURE__ */ C(d, {
382
+ /* @__PURE__ */ j(h, {
237
383
  id: "visibility",
238
384
  label: "Visibility",
239
- value: N.visibility,
240
- onChange: (e) => R("visibility", e),
241
- options: z,
385
+ value: J.visibility,
386
+ onChange: (e) => $("visibility", e),
387
+ options: te,
242
388
  className: "mt-4"
243
389
  }),
244
- /* @__PURE__ */ C(p, {
390
+ /* @__PURE__ */ j(_, {
245
391
  id: "stylePreferences",
246
392
  label: "Style preferences",
247
- value: N.stylePreferences,
248
- onChange: (e) => R("stylePreferences", e),
393
+ value: J.stylePreferences,
394
+ onChange: (e) => $("stylePreferences", e),
249
395
  placeholder: "minimal, tailored, vintage",
250
396
  hint: "Comma-separated",
251
397
  className: "mt-4"
252
398
  }),
253
- /* @__PURE__ */ C(p, {
399
+ /* @__PURE__ */ j(_, {
254
400
  id: "palette",
255
401
  label: "Palette",
256
- value: N.palette,
257
- onChange: (e) => R("palette", e),
402
+ value: J.palette,
403
+ onChange: (e) => $("palette", e),
258
404
  placeholder: "neutrals, navy, rust",
259
- hint: "Comma-separated",
405
+ hint: "Comma-separated colour names — shown as swatches",
260
406
  className: "mt-4"
261
407
  }),
262
- /* @__PURE__ */ C(p, {
408
+ /* @__PURE__ */ j(_, {
263
409
  id: "favouriteBrands",
264
410
  label: "Favourite brands",
265
- value: N.favouriteBrands,
266
- onChange: (e) => R("favouriteBrands", e),
411
+ value: J.favouriteBrands,
412
+ onChange: (e) => $("favouriteBrands", e),
267
413
  placeholder: "Aurora Atelier, …",
268
414
  hint: "Comma-separated",
269
415
  className: "mt-4"
270
416
  }),
271
- k.isError && /* @__PURE__ */ C("p", {
417
+ /* @__PURE__ */ M("div", {
418
+ className: "mt-4",
419
+ children: [/* @__PURE__ */ j("span", {
420
+ className: "mb-2 block text-sm font-medium text-text-primary",
421
+ children: "Sizes"
422
+ }), /* @__PURE__ */ j("div", {
423
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
424
+ children: re.map((e) => /* @__PURE__ */ j(_, {
425
+ id: `size-${e}`,
426
+ label: f(e),
427
+ value: J.sizes[e] ?? "",
428
+ onChange: (t) => ee(e, t),
429
+ placeholder: "e.g. M · 26 · 39"
430
+ }, e))
431
+ })]
432
+ }),
433
+ H.isError && /* @__PURE__ */ j("p", {
272
434
  className: "mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
273
- children: k.error instanceof Error ? k.error.message : "Something went wrong"
435
+ children: H.error instanceof Error ? H.error.message : "Something went wrong"
274
436
  }),
275
- /* @__PURE__ */ C("div", {
437
+ /* @__PURE__ */ j("div", {
276
438
  className: "mt-6 flex justify-end gap-2",
277
- children: /* @__PURE__ */ w("button", {
439
+ children: /* @__PURE__ */ M("button", {
278
440
  type: "submit",
279
- disabled: k.isPending,
441
+ disabled: H.isPending,
280
442
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
281
- children: [k.isPending ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(y, { className: "h-4 w-4" }), I ? "Save changes" : "Create profile"]
443
+ children: [H.isPending ? /* @__PURE__ */ j(C, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ j(T, { className: "h-4 w-4" }), Z ? "Save changes" : "Create profile"]
282
444
  })
283
445
  })
284
446
  ]
@@ -287,6 +449,6 @@ function O() {
287
449
  });
288
450
  }
289
451
  //#endregion
290
- export { O as StyleProfilePage };
452
+ export { z as StyleProfilePage };
291
453
 
292
454
  //# sourceMappingURL=StyleProfilePage.js.map