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