@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.
- package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +14 -6
- package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
- package/dist/coolandlovely/components/ActorName.js +29 -0
- package/dist/coolandlovely/components/ActorName.js.map +1 -0
- package/dist/coolandlovely/components/AddToLookbookButton.js +81 -0
- package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -0
- 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 +109 -0
- package/dist/coolandlovely/components/Comments.js.map +1 -0
- package/dist/coolandlovely/components/Field.js +22 -2
- package/dist/coolandlovely/components/Field.js.map +1 -1
- package/dist/coolandlovely/components/FileImage.js +17 -0
- package/dist/coolandlovely/components/FileImage.js.map +1 -0
- package/dist/coolandlovely/components/FollowButton.js +24 -0
- package/dist/coolandlovely/components/FollowButton.js.map +1 -0
- package/dist/coolandlovely/components/ImageUploadField.js +153 -0
- package/dist/coolandlovely/components/ImageUploadField.js.map +1 -0
- 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 +25 -14
- 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/index.js +2 -0
- package/dist/coolandlovely/hooks/useComments.js +68 -0
- package/dist/coolandlovely/hooks/useComments.js.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +155 -60
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/hooks/useFiles.js +111 -0
- package/dist/coolandlovely/hooks/useFiles.js.map +1 -0
- package/dist/coolandlovely/pages/HomePage.js +130 -133
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +261 -228
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +146 -104
- package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -11
- 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 +134 -107
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +117 -102
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -54
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +223 -0
- package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -0
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +176 -144
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +144 -130
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js +73 -62
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +215 -102
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +115 -86
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +217 -155
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookFormPage.js +147 -96
- package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -95
- package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +376 -146
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/trends/TrendsPage.js +249 -0
- package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +136 -88
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -74
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,216 +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 { SelectField as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
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";
|
|
13
19
|
//#region src/coolandlovely/pages/profile/StyleProfilePage.tsx
|
|
14
|
-
var
|
|
20
|
+
var P = [
|
|
15
21
|
"PUBLIC",
|
|
16
22
|
"FOLLOWERS",
|
|
17
23
|
"PRIVATE"
|
|
18
|
-
],
|
|
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
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
}, [
|
|
38
|
-
!
|
|
39
|
-
}, [
|
|
40
|
-
let
|
|
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
|
-
})),
|
|
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:
|
|
46
|
-
}))
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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__ */
|
|
53
|
-
})
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
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",
|
|
67
120
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className: "
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
85
|
-
className: "mt-
|
|
86
|
-
children:
|
|
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__ */
|
|
89
|
-
className: "mt-6
|
|
90
|
-
children: [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
}
|
|
128
|
-
|
|
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:
|
|
353
|
+
actions: Z ? /* @__PURE__ */ M("button", {
|
|
131
354
|
type: "button",
|
|
132
|
-
onClick: () =>
|
|
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__ */
|
|
357
|
+
children: [/* @__PURE__ */ j(A, { className: "h-4 w-4" }), " Cancel"]
|
|
135
358
|
}) : void 0,
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
-
onSubmit:
|
|
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__ */
|
|
362
|
+
children: /* @__PURE__ */ M(N, {
|
|
149
363
|
treatment: "plain",
|
|
150
364
|
className: "p-6",
|
|
151
365
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ j(_, {
|
|
153
367
|
id: "displayName",
|
|
154
368
|
label: "Display name",
|
|
155
|
-
value:
|
|
156
|
-
onChange: (e) =>
|
|
369
|
+
value: J.displayName,
|
|
370
|
+
onChange: (e) => $("displayName", e),
|
|
157
371
|
placeholder: "How you want to appear"
|
|
158
372
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ j(g, {
|
|
160
374
|
id: "bio",
|
|
161
375
|
label: "Bio",
|
|
162
|
-
value:
|
|
163
|
-
onChange: (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__ */
|
|
382
|
+
/* @__PURE__ */ j(h, {
|
|
169
383
|
id: "visibility",
|
|
170
384
|
label: "Visibility",
|
|
171
|
-
value:
|
|
172
|
-
onChange: (e) =>
|
|
173
|
-
options:
|
|
385
|
+
value: J.visibility,
|
|
386
|
+
onChange: (e) => $("visibility", e),
|
|
387
|
+
options: te,
|
|
174
388
|
className: "mt-4"
|
|
175
389
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ j(_, {
|
|
177
391
|
id: "stylePreferences",
|
|
178
392
|
label: "Style preferences",
|
|
179
|
-
value:
|
|
180
|
-
onChange: (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__ */
|
|
399
|
+
/* @__PURE__ */ j(_, {
|
|
186
400
|
id: "palette",
|
|
187
401
|
label: "Palette",
|
|
188
|
-
value:
|
|
189
|
-
onChange: (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__ */
|
|
408
|
+
/* @__PURE__ */ j(_, {
|
|
195
409
|
id: "favouriteBrands",
|
|
196
410
|
label: "Favourite brands",
|
|
197
|
-
value:
|
|
198
|
-
onChange: (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
|
-
|
|
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:
|
|
435
|
+
children: H.error instanceof Error ? H.error.message : "Something went wrong"
|
|
206
436
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ j("div", {
|
|
208
438
|
className: "mt-6 flex justify-end gap-2",
|
|
209
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ M("button", {
|
|
210
440
|
type: "submit",
|
|
211
|
-
disabled:
|
|
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: [
|
|
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 {
|
|
452
|
+
export { z as StyleProfilePage };
|
|
223
453
|
|
|
224
454
|
//# sourceMappingURL=StyleProfilePage.js.map
|