@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
@@ -1,216 +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 { useMyStyleProfile as i, useUpsertStyleProfile as a } 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 o, titleCase as s } from "../../utils/formatters.js";
7
- import { TagList as c } from "../../components/TagList.js";
8
- import { SelectField as l, TextAreaField as u, TextField as d } from "../../components/Field.js";
9
- import { useEffect as f, useState as p } from "react";
10
- import { Loader2 as m, Pencil as h, Save as g, UserCircle as _, X as v } from "lucide-react";
11
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
12
- import { GlassCard as x } 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";
13
19
  //#region src/coolandlovely/pages/profile/StyleProfilePage.tsx
14
- var S = [
20
+ var P = [
15
21
  "PUBLIC",
16
22
  "FOLLOWERS",
17
23
  "PRIVATE"
18
- ], C = {
24
+ ], F = [
25
+ "Tops",
26
+ "Bottoms",
27
+ "Dresses",
28
+ "Shoes",
29
+ "Outerwear"
30
+ ], I = {
19
31
  displayName: "",
20
32
  bio: "",
21
33
  visibility: "PRIVATE",
22
34
  stylePreferences: "",
23
35
  palette: "",
24
- favouriteBrands: ""
36
+ favouriteBrands: "",
37
+ sizes: {}
25
38
  };
26
- function w() {
27
- let w = i(), T = a(), [E, D] = p(!1), [O, k] = p(C), A = w.data, j = !!A;
28
- f(() => {
29
- A && k({
30
- displayName: A.displayName ?? "",
31
- bio: A.bio ?? "",
32
- visibility: A.visibility,
33
- stylePreferences: A.stylePreferences.join(", "),
34
- palette: A.palette.join(", "),
35
- favouriteBrands: A.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 ?? "")]))
36
70
  });
37
- }, [A]), f(() => {
38
- !w.isLoading && !j && D(!0);
39
- }, [w.isLoading, j]);
40
- let M = (e, t) => k((n) => ({
71
+ }, [X]), x(() => {
72
+ !V.isLoading && !Z && q(!0);
73
+ }, [V.isLoading, Z]);
74
+ let $ = (e, t) => Y((n) => ({
41
75
  ...n,
42
76
  [e]: t
43
- })), N = S.map((e) => ({
77
+ })), ee = (e, t) => Y((n) => ({
78
+ ...n,
79
+ sizes: {
80
+ ...n.sizes,
81
+ [e]: t
82
+ }
83
+ })), te = P.map((e) => ({
44
84
  value: e,
45
- label: s(e)
46
- }));
47
- return w.isLoading ? /* @__PURE__ */ y(e, {
48
- title: "Style Profile",
49
- children: /* @__PURE__ */ y(r, { label: "Loading your style profile…" })
50
- }) : w.isError ? /* @__PURE__ */ y(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, {
51
100
  title: "Style Profile",
52
- children: /* @__PURE__ */ y(n, { onRetry: () => void w.refetch() })
53
- }) : !E && A ? /* @__PURE__ */ y(e, {
101
+ children: /* @__PURE__ */ j(i, { label: "Loading your style profile…" })
102
+ });
103
+ if (V.isError) return /* @__PURE__ */ j(n, {
54
104
  title: "Style Profile",
55
- description: "Your taste, palette and sizing — the spine of personalised discovery",
56
- actions: /* @__PURE__ */ b("button", {
57
- type: "button",
58
- onClick: () => D(!0),
59
- 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",
60
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), " Edit"]
61
- }),
62
- children: /* @__PURE__ */ y("div", {
63
- className: "mx-auto max-w-2xl",
64
- children: /* @__PURE__ */ b(x, {
65
- treatment: "glass",
66
- 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",
67
120
  children: [
68
- /* @__PURE__ */ b("div", {
69
- className: "flex items-center gap-4",
70
- children: [/* @__PURE__ */ y("div", {
71
- className: "flex h-14 w-14 items-center justify-center rounded-full bg-accent-purple-subtle text-text-primary",
72
- children: /* @__PURE__ */ y(_, { className: "h-7 w-7" })
73
- }), /* @__PURE__ */ b("div", {
74
- className: "min-w-0 flex-1",
75
- children: [/* @__PURE__ */ y("h2", {
76
- className: "truncate text-xl font-semibold text-text-primary",
77
- children: A.displayName || "Your style profile"
78
- }), /* @__PURE__ */ y(t, {
79
- status: A.visibility,
80
- 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
+ ]
81
172
  })]
82
- })]
173
+ })
83
174
  }),
84
- A.bio && /* @__PURE__ */ y("p", {
85
- className: "mt-4 text-sm text-text-secondary",
86
- children: A.bio
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",
179
+ children: [
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
+ })
192
+ }),
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
+ })
203
+ }),
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
+ })
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
+ })]
300
+ })]
87
301
  }),
88
- /* @__PURE__ */ b("div", {
89
- className: "mt-6 space-y-4",
90
- children: [
91
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
92
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
93
- children: "Style preferences"
94
- }), A.stylePreferences.length ? /* @__PURE__ */ y(c, {
95
- tags: A.stylePreferences,
96
- tone: "accent",
97
- max: 20
98
- }) : /* @__PURE__ */ y("p", {
99
- className: "text-sm text-text-secondary",
100
- children: "—"
101
- })] }),
102
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
103
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
104
- children: "Palette"
105
- }), A.palette.length ? /* @__PURE__ */ y(c, {
106
- tags: A.palette,
107
- max: 20
108
- }) : /* @__PURE__ */ y("p", {
109
- className: "text-sm text-text-secondary",
110
- children: "—"
111
- })] }),
112
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
113
- className: "mb-1.5 text-xs font-medium uppercase tracking-wide text-text-secondary",
114
- children: "Favourite brands"
115
- }), A.favouriteBrands.length ? /* @__PURE__ */ y(c, {
116
- tags: A.favouriteBrands,
117
- max: 20
118
- }) : /* @__PURE__ */ y("p", {
119
- className: "text-sm text-text-secondary",
120
- children: "—"
121
- })] })
122
- ]
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
+ })]
123
344
  })
124
345
  ]
125
346
  })
126
- })
127
- }) : /* @__PURE__ */ y(e, {
128
- title: j ? "Edit style profile" : "Create your style profile",
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",
129
352
  description: "This powers your personalised discovery feed",
130
- actions: j ? /* @__PURE__ */ b("button", {
353
+ actions: Z ? /* @__PURE__ */ M("button", {
131
354
  type: "button",
132
- onClick: () => D(!1),
355
+ onClick: () => q(!1),
133
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",
134
- children: [/* @__PURE__ */ y(v, { className: "h-4 w-4" }), " Cancel"]
357
+ children: [/* @__PURE__ */ j(A, { className: "h-4 w-4" }), " Cancel"]
135
358
  }) : void 0,
136
- children: /* @__PURE__ */ y("form", {
137
- onSubmit: (e) => {
138
- e.preventDefault(), T.mutate({
139
- displayName: O.displayName.trim() || void 0,
140
- bio: O.bio.trim() || void 0,
141
- visibility: O.visibility,
142
- stylePreferences: o(O.stylePreferences),
143
- palette: o(O.palette),
144
- favouriteBrands: o(O.favouriteBrands)
145
- }, { onSuccess: () => D(!1) });
146
- },
359
+ children: /* @__PURE__ */ j("form", {
360
+ onSubmit: ne,
147
361
  className: "mx-auto max-w-2xl",
148
- children: /* @__PURE__ */ b(x, {
362
+ children: /* @__PURE__ */ M(N, {
149
363
  treatment: "plain",
150
364
  className: "p-6",
151
365
  children: [
152
- /* @__PURE__ */ y(d, {
366
+ /* @__PURE__ */ j(_, {
153
367
  id: "displayName",
154
368
  label: "Display name",
155
- value: O.displayName,
156
- onChange: (e) => M("displayName", e),
369
+ value: J.displayName,
370
+ onChange: (e) => $("displayName", e),
157
371
  placeholder: "How you want to appear"
158
372
  }),
159
- /* @__PURE__ */ y(u, {
373
+ /* @__PURE__ */ j(g, {
160
374
  id: "bio",
161
375
  label: "Bio",
162
- value: O.bio,
163
- onChange: (e) => M("bio", e),
376
+ value: J.bio,
377
+ onChange: (e) => $("bio", e),
164
378
  placeholder: "A sentence about your style…",
165
379
  rows: 3,
166
380
  className: "mt-4"
167
381
  }),
168
- /* @__PURE__ */ y(l, {
382
+ /* @__PURE__ */ j(h, {
169
383
  id: "visibility",
170
384
  label: "Visibility",
171
- value: O.visibility,
172
- onChange: (e) => M("visibility", e),
173
- options: N,
385
+ value: J.visibility,
386
+ onChange: (e) => $("visibility", e),
387
+ options: te,
174
388
  className: "mt-4"
175
389
  }),
176
- /* @__PURE__ */ y(d, {
390
+ /* @__PURE__ */ j(_, {
177
391
  id: "stylePreferences",
178
392
  label: "Style preferences",
179
- value: O.stylePreferences,
180
- onChange: (e) => M("stylePreferences", e),
393
+ value: J.stylePreferences,
394
+ onChange: (e) => $("stylePreferences", e),
181
395
  placeholder: "minimal, tailored, vintage",
182
396
  hint: "Comma-separated",
183
397
  className: "mt-4"
184
398
  }),
185
- /* @__PURE__ */ y(d, {
399
+ /* @__PURE__ */ j(_, {
186
400
  id: "palette",
187
401
  label: "Palette",
188
- value: O.palette,
189
- onChange: (e) => M("palette", e),
402
+ value: J.palette,
403
+ onChange: (e) => $("palette", e),
190
404
  placeholder: "neutrals, navy, rust",
191
- hint: "Comma-separated",
405
+ hint: "Comma-separated colour names — shown as swatches",
192
406
  className: "mt-4"
193
407
  }),
194
- /* @__PURE__ */ y(d, {
408
+ /* @__PURE__ */ j(_, {
195
409
  id: "favouriteBrands",
196
410
  label: "Favourite brands",
197
- value: O.favouriteBrands,
198
- onChange: (e) => M("favouriteBrands", e),
411
+ value: J.favouriteBrands,
412
+ onChange: (e) => $("favouriteBrands", e),
199
413
  placeholder: "Aurora Atelier, …",
200
414
  hint: "Comma-separated",
201
415
  className: "mt-4"
202
416
  }),
203
- T.isError && /* @__PURE__ */ y("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", {
204
434
  className: "mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
205
- children: T.error instanceof Error ? T.error.message : "Something went wrong"
435
+ children: H.error instanceof Error ? H.error.message : "Something went wrong"
206
436
  }),
207
- /* @__PURE__ */ y("div", {
437
+ /* @__PURE__ */ j("div", {
208
438
  className: "mt-6 flex justify-end gap-2",
209
- children: /* @__PURE__ */ b("button", {
439
+ children: /* @__PURE__ */ M("button", {
210
440
  type: "submit",
211
- disabled: T.isPending,
441
+ disabled: H.isPending,
212
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",
213
- children: [T.isPending ? /* @__PURE__ */ y(m, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(g, { className: "h-4 w-4" }), j ? "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"]
214
444
  })
215
445
  })
216
446
  ]
@@ -219,6 +449,6 @@ function w() {
219
449
  });
220
450
  }
221
451
  //#endregion
222
- export { w as StyleProfilePage };
452
+ export { z as StyleProfilePage };
223
453
 
224
454
  //# sourceMappingURL=StyleProfilePage.js.map