@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.
- package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/components/AddToLookbookButton.js +22 -22
- package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -1
- package/dist/coolandlovely/components/BrandCover.js +39 -0
- package/dist/coolandlovely/components/BrandCover.js.map +1 -0
- package/dist/coolandlovely/components/BrandCreatorAvatars.js +57 -0
- package/dist/coolandlovely/components/BrandCreatorAvatars.js.map +1 -0
- package/dist/coolandlovely/components/ColourSwatchRow.js +86 -0
- package/dist/coolandlovely/components/ColourSwatchRow.js.map +1 -0
- package/dist/coolandlovely/components/Comments.js +4 -4
- package/dist/coolandlovely/components/Comments.js.map +1 -1
- package/dist/coolandlovely/components/FileImage.js.map +1 -1
- package/dist/coolandlovely/components/ImageUploadField.js +139 -57
- package/dist/coolandlovely/components/ImageUploadField.js.map +1 -1
- package/dist/coolandlovely/components/LookCard.js +77 -0
- package/dist/coolandlovely/components/LookCard.js.map +1 -0
- package/dist/coolandlovely/components/MetricsCard.js +1 -1
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
- package/dist/coolandlovely/components/ShopItemCard.js +45 -0
- package/dist/coolandlovely/components/ShopItemCard.js.map +1 -0
- package/dist/coolandlovely/components/StepTracker.js +35 -0
- package/dist/coolandlovely/components/StepTracker.js.map +1 -0
- package/dist/coolandlovely/components/Thumbnail.js +15 -11
- package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
- package/dist/coolandlovely/components/VisibilityChip.js +32 -0
- package/dist/coolandlovely/components/VisibilityChip.js.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +94 -69
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/hooks/useFiles.js +49 -32
- package/dist/coolandlovely/hooks/useFiles.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +112 -133
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +253 -242
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +116 -112
- package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -13
- package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +117 -95
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +50 -43
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +131 -108
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +1 -1
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -56
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +175 -147
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +1 -1
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js +71 -62
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +149 -127
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +69 -53
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +135 -113
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookFormPage.js +122 -110
- package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -97
- package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +372 -210
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/trends/TrendsPage.js +1 -1
- package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +130 -94
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -76
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,284 +1,446 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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
|
|
20
|
+
var P = [
|
|
17
21
|
"PUBLIC",
|
|
18
22
|
"FOLLOWERS",
|
|
19
23
|
"PRIVATE"
|
|
20
|
-
],
|
|
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
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
}, [
|
|
40
|
-
!
|
|
41
|
-
}, [
|
|
42
|
-
let
|
|
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
|
-
})),
|
|
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:
|
|
48
|
-
}))
|
|
49
|
-
|
|
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__ */
|
|
52
|
-
})
|
|
53
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className: "
|
|
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__ */
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
className: "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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__ */
|
|
91
|
-
className: "mt-
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
className: "
|
|
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__ */
|
|
96
|
-
|
|
97
|
-
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
|
+
})
|
|
98
192
|
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
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__ */
|
|
115
|
-
className: "mt-6
|
|
116
|
-
children: [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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:
|
|
353
|
+
actions: Z ? /* @__PURE__ */ M("button", {
|
|
199
354
|
type: "button",
|
|
200
|
-
onClick: () =>
|
|
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__ */
|
|
357
|
+
children: [/* @__PURE__ */ j(A, { className: "h-4 w-4" }), " Cancel"]
|
|
203
358
|
}) : void 0,
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
onSubmit:
|
|
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__ */
|
|
362
|
+
children: /* @__PURE__ */ M(N, {
|
|
217
363
|
treatment: "plain",
|
|
218
364
|
className: "p-6",
|
|
219
365
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ j(_, {
|
|
221
367
|
id: "displayName",
|
|
222
368
|
label: "Display name",
|
|
223
|
-
value:
|
|
224
|
-
onChange: (e) =>
|
|
369
|
+
value: J.displayName,
|
|
370
|
+
onChange: (e) => $("displayName", e),
|
|
225
371
|
placeholder: "How you want to appear"
|
|
226
372
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ j(g, {
|
|
228
374
|
id: "bio",
|
|
229
375
|
label: "Bio",
|
|
230
|
-
value:
|
|
231
|
-
onChange: (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__ */
|
|
382
|
+
/* @__PURE__ */ j(h, {
|
|
237
383
|
id: "visibility",
|
|
238
384
|
label: "Visibility",
|
|
239
|
-
value:
|
|
240
|
-
onChange: (e) =>
|
|
241
|
-
options:
|
|
385
|
+
value: J.visibility,
|
|
386
|
+
onChange: (e) => $("visibility", e),
|
|
387
|
+
options: te,
|
|
242
388
|
className: "mt-4"
|
|
243
389
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ j(_, {
|
|
245
391
|
id: "stylePreferences",
|
|
246
392
|
label: "Style preferences",
|
|
247
|
-
value:
|
|
248
|
-
onChange: (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__ */
|
|
399
|
+
/* @__PURE__ */ j(_, {
|
|
254
400
|
id: "palette",
|
|
255
401
|
label: "Palette",
|
|
256
|
-
value:
|
|
257
|
-
onChange: (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__ */
|
|
408
|
+
/* @__PURE__ */ j(_, {
|
|
263
409
|
id: "favouriteBrands",
|
|
264
410
|
label: "Favourite brands",
|
|
265
|
-
value:
|
|
266
|
-
onChange: (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
|
-
|
|
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:
|
|
435
|
+
children: H.error instanceof Error ? H.error.message : "Something went wrong"
|
|
274
436
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ j("div", {
|
|
276
438
|
className: "mt-6 flex justify-end gap-2",
|
|
277
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ M("button", {
|
|
278
440
|
type: "submit",
|
|
279
|
-
disabled:
|
|
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: [
|
|
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 {
|
|
452
|
+
export { z as StyleProfilePage };
|
|
291
453
|
|
|
292
454
|
//# sourceMappingURL=StyleProfilePage.js.map
|