@burdenoff/microfe-coolandlovely 2026.716.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.
Files changed (74) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  2. package/dist/coolandlovely/CoolAndLovelyRoutes.js +8 -0
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  4. package/dist/coolandlovely/components/Field.d.ts +3 -0
  5. package/dist/coolandlovely/components/Field.d.ts.map +1 -1
  6. package/dist/coolandlovely/components/Field.js +12 -9
  7. package/dist/coolandlovely/components/Field.js.map +1 -1
  8. package/dist/coolandlovely/components/LookCard.d.ts +3 -1
  9. package/dist/coolandlovely/components/LookCard.d.ts.map +1 -1
  10. package/dist/coolandlovely/components/LookCard.js +80 -44
  11. package/dist/coolandlovely/components/LookCard.js.map +1 -1
  12. package/dist/coolandlovely/components/MetricsCard.d.ts +7 -0
  13. package/dist/coolandlovely/components/MetricsCard.d.ts.map +1 -1
  14. package/dist/coolandlovely/components/MetricsCard.js +37 -13
  15. package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
  16. package/dist/coolandlovely/hooks/index.d.ts +1 -1
  17. package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +57 -4
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
  20. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +233 -79
  21. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  22. package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
  23. package/dist/coolandlovely/pages/HomePage.js +114 -101
  24. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  25. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +9 -9
  26. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
  27. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +135 -111
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  29. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts +5 -4
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +201 -107
  32. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
  33. package/dist/coolandlovely/pages/collections/CollectionDetailPage.d.ts.map +1 -1
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -99
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  36. package/dist/coolandlovely/pages/discover/DiscoverPage.js +7 -6
  37. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
  38. package/dist/coolandlovely/pages/items/StyleItemDetailPage.d.ts.map +1 -1
  39. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +6 -4
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  41. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
  42. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +116 -104
  43. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  44. package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts +4 -2
  45. package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
  46. package/dist/coolandlovely/pages/looks/LookDetailPage.js +145 -137
  47. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  48. package/dist/coolandlovely/pages/looks/LooksListPage.d.ts.map +1 -1
  49. package/dist/coolandlovely/pages/looks/LooksListPage.js +2 -0
  50. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  51. package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts +11 -6
  52. package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
  53. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +195 -176
  54. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  55. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.d.ts.map +1 -1
  56. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +46 -23
  57. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +70 -63
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  61. package/dist/coolandlovely/types/index.d.ts +51 -0
  62. package/dist/coolandlovely/types/index.d.ts.map +1 -1
  63. package/dist/coolandlovely/utils/index.d.ts +1 -0
  64. package/dist/coolandlovely/utils/index.d.ts.map +1 -1
  65. package/dist/coolandlovely/utils/index.js +5 -0
  66. package/dist/coolandlovely/utils/sparkline.d.ts +31 -0
  67. package/dist/coolandlovely/utils/sparkline.d.ts.map +1 -0
  68. package/dist/coolandlovely/utils/sparkline.js +29 -0
  69. package/dist/coolandlovely/utils/sparkline.js.map +1 -0
  70. package/dist/utils/pageContext.d.ts +8 -1
  71. package/dist/utils/pageContext.d.ts.map +1 -1
  72. package/dist/utils/pageContext.js +22 -27
  73. package/dist/utils/pageContext.js.map +1 -1
  74. package/package.json +1 -1
@@ -4,261 +4,269 @@ import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as r } from "../../components/StatusBadge.js";
5
5
  import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
6
6
  import { Thumbnail as o } from "../../components/Thumbnail.js";
7
- import { useDeleteLook as s, useLikeLook as c, useLook as l, usePublishLook as u, useUpdateLook as d } from "../../hooks/useCoolAndLovelyApi.js";
8
- import { AddToLookbookButton as f } from "../../components/AddToLookbookButton.js";
9
- import { formatDate as p, titleCase as m } from "../../utils/formatters.js";
7
+ import { useDeleteLook as s, useLikeLook as c, useLook as l, usePublishLook as u, useSaveLook as d, useUnlikeLook as f, useUnsaveLook as p, useUpdateLook as m } from "../../hooks/useCoolAndLovelyApi.js";
8
+ import { AddToLookbookButton as h } from "../../components/AddToLookbookButton.js";
9
+ import { formatDate as g, titleCase as _ } from "../../utils/formatters.js";
10
10
  import "../../hooks/index.js";
11
- import { TagList as h } from "../../components/TagList.js";
12
- import { Comments as g } from "../../components/Comments.js";
13
- import { FollowButton as _ } from "../../components/FollowButton.js";
14
- import { ShopItemCard as v } from "../../components/ShopItemCard.js";
15
- import { useMemo as y, useState as b } from "react";
16
- import { ArrowLeft as x, Bookmark as S, Heart as C, Loader2 as w, Rocket as T, Sparkles as E, Star as D, Trash2 as O } from "lucide-react";
17
- import { useParams as k } from "react-router-dom";
18
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
19
- import { GlassCard as M } from "@burdenoff/fe-libs/ui";
20
- import { useActorProfiles as N } from "@burdenoff/fe-libs/shared";
11
+ import { TagList as v } from "../../components/TagList.js";
12
+ import { Comments as y } from "../../components/Comments.js";
13
+ import { FollowButton as b } from "../../components/FollowButton.js";
14
+ import { ShopItemCard as x } from "../../components/ShopItemCard.js";
15
+ import { useMemo as S, useState as C } from "react";
16
+ import { ArrowLeft as w, Bookmark as T, Heart as E, Loader2 as D, Rocket as O, Sparkles as k, Star as A, Trash2 as j } from "lucide-react";
17
+ import { useParams as M } from "react-router-dom";
18
+ import { jsx as N, jsxs as P } from "react/jsx-runtime";
19
+ import { GlassCard as F } from "@burdenoff/fe-libs/ui";
20
+ import { useActorProfiles as I } from "@burdenoff/fe-libs/shared";
21
21
  //#region src/coolandlovely/pages/looks/LookDetailPage.tsx
22
- function P(e) {
22
+ function L(e) {
23
23
  let t = e.trim().split(/\s+/).filter(Boolean);
24
24
  return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
25
25
  }
26
- function F({ authorId: t }) {
27
- let { apiGatewayUrl: n, authToken: r, workspaceId: i } = e(), [a, o] = b(!1), s = N(y(() => [{
26
+ function R({ authorId: t }) {
27
+ let { apiGatewayUrl: n, authToken: r, workspaceId: i, navigateTo: a } = e(), [o, s] = C(!1), c = I(S(() => [{
28
28
  actorId: t,
29
29
  actorType: "user"
30
30
  }], [t]), {
31
31
  apiGatewayUrl: n,
32
32
  authToken: r,
33
33
  workspaceId: i
34
- })[t], c = s?.displayName ?? "Creator", l = s?.avatarUrl;
35
- return /* @__PURE__ */ j("span", {
36
- className: "inline-flex items-center gap-2",
37
- children: [/* @__PURE__ */ A("span", {
38
- title: c,
34
+ })[t], l = c?.displayName ?? "Creator", u = c?.avatarUrl;
35
+ return /* @__PURE__ */ P("button", {
36
+ type: "button",
37
+ onClick: () => a(`/profile/${t}`),
38
+ className: "inline-flex items-center gap-2 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
39
+ children: [/* @__PURE__ */ N("span", {
40
+ title: l,
39
41
  className: "relative flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-full bg-bg-sunken ring-1 ring-border-seam",
40
- children: l && !a ? /* @__PURE__ */ A("img", {
41
- src: l,
42
- alt: c,
42
+ children: u && !o ? /* @__PURE__ */ N("img", {
43
+ src: u,
44
+ alt: l,
43
45
  loading: "lazy",
44
- onError: () => o(!0),
46
+ onError: () => s(!0),
45
47
  className: "h-full w-full object-cover"
46
- }) : /* @__PURE__ */ A("span", {
48
+ }) : /* @__PURE__ */ N("span", {
47
49
  className: "text-[10px] font-semibold text-text-secondary",
48
- children: P(c)
50
+ children: L(l)
49
51
  })
50
- }), /* @__PURE__ */ A("span", {
51
- className: "font-medium text-text-primary",
52
- title: s?.email ?? t,
53
- children: c
52
+ }), /* @__PURE__ */ N("span", {
53
+ className: "font-medium text-text-primary hover:underline",
54
+ title: c?.email ?? t,
55
+ children: l
54
56
  })]
55
57
  });
56
58
  }
57
- function I() {
58
- let { lookId: y } = k(), { navigateTo: b, currentUser: N } = e(), P = l(y), I = c(), L = u(), R = s(), z = d();
59
- if (P.isLoading) return /* @__PURE__ */ A(n, {
59
+ function z() {
60
+ let { lookId: S } = M(), { navigateTo: C, currentUser: I } = e(), L = l(S), z = c(), B = f(), V = d(), H = p(), U = u(), W = s(), G = m();
61
+ if (L.isLoading) return /* @__PURE__ */ N(n, {
60
62
  title: "Look",
61
- children: /* @__PURE__ */ A(a, { label: "Loading look…" })
63
+ children: /* @__PURE__ */ N(a, { label: "Loading look…" })
62
64
  });
63
- if (P.isError || !P.data) return /* @__PURE__ */ A(n, {
65
+ if (L.isError || !L.data) return /* @__PURE__ */ N(n, {
64
66
  title: "Look",
65
- children: /* @__PURE__ */ A(i, {
67
+ children: /* @__PURE__ */ N(i, {
66
68
  title: "Look not found",
67
- onRetry: () => void P.refetch()
69
+ onRetry: () => void L.refetch()
68
70
  })
69
71
  });
70
- let B = P.data, V = B.items ?? [], H = B.publishedAt !== null, U = !!(N?.id && N.id === B.authorId);
71
- return /* @__PURE__ */ A(n, {
72
- title: B.title,
73
- description: m(B.occasion),
74
- actions: /* @__PURE__ */ j("div", {
72
+ let K = L.data, q = K.items ?? [], J = K.publishedAt !== null, Y = !!(I?.id && I.id === K.authorId);
73
+ return /* @__PURE__ */ N(n, {
74
+ title: K.title,
75
+ description: _(K.occasion),
76
+ actions: /* @__PURE__ */ P("div", {
75
77
  className: "flex flex-wrap items-center gap-2",
76
78
  children: [
77
- /* @__PURE__ */ j("button", {
79
+ /* @__PURE__ */ P("button", {
78
80
  type: "button",
79
- onClick: () => b("/looks"),
81
+ onClick: () => C("/looks"),
80
82
  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",
81
- children: [/* @__PURE__ */ A(x, { className: "h-4 w-4" }), " Back"]
83
+ children: [/* @__PURE__ */ N(w, { className: "h-4 w-4" }), " Back"]
82
84
  }),
83
- /* @__PURE__ */ A(f, { lookId: B.id }),
84
- /* @__PURE__ */ j("button", {
85
+ /* @__PURE__ */ N(h, { lookId: K.id }),
86
+ /* @__PURE__ */ P("button", {
85
87
  type: "button",
86
- disabled: z.isPending,
87
- onClick: () => z.mutate({
88
- id: B.id,
89
- input: { isFeatured: !B.isFeatured }
88
+ disabled: G.isPending,
89
+ onClick: () => G.mutate({
90
+ id: K.id,
91
+ input: { isFeatured: !K.isFeatured }
90
92
  }),
91
- "aria-pressed": B.isFeatured,
92
- className: t("inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50", B.isFeatured ? "border-status-warning-text/40 bg-status-warning-bg-subtle text-status-warning-text" : "border-border-seam text-text-primary hover:bg-bg-sunken"),
93
- children: [z.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(D, { className: t("h-4 w-4", B.isFeatured && "fill-status-warning-text") }), B.isFeatured ? "Featured" : "Feature"]
93
+ "aria-pressed": K.isFeatured,
94
+ className: t("inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50", K.isFeatured ? "border-status-warning-text/40 bg-status-warning-bg-subtle text-status-warning-text" : "border-border-seam text-text-primary hover:bg-bg-sunken"),
95
+ children: [G.isPending ? /* @__PURE__ */ N(D, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ N(A, { className: t("h-4 w-4", K.isFeatured && "fill-status-warning-text") }), K.isFeatured ? "Featured" : "Feature"]
94
96
  }),
95
- !H && /* @__PURE__ */ j("button", {
97
+ !J && /* @__PURE__ */ P("button", {
96
98
  type: "button",
97
- disabled: L.isPending,
98
- onClick: () => L.mutate(B.id),
99
+ disabled: U.isPending,
100
+ onClick: () => U.mutate(K.id),
99
101
  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 disabled:opacity-50",
100
- children: [L.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(T, { className: "h-4 w-4" }), "Publish"]
102
+ children: [U.isPending ? /* @__PURE__ */ N(D, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ N(O, { className: "h-4 w-4" }), "Publish"]
101
103
  }),
102
- /* @__PURE__ */ j("button", {
104
+ /* @__PURE__ */ P("button", {
103
105
  type: "button",
104
- disabled: R.isPending,
105
- onClick: () => R.mutate(B.id, { onSuccess: () => b("/looks") }),
106
+ disabled: W.isPending,
107
+ onClick: () => W.mutate(K.id, { onSuccess: () => C("/looks") }),
106
108
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50",
107
- children: [R.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(O, { className: "h-4 w-4" }), "Delete"]
109
+ children: [W.isPending ? /* @__PURE__ */ N(D, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ N(j, { className: "h-4 w-4" }), "Delete"]
108
110
  })
109
111
  ]
110
112
  }),
111
- children: /* @__PURE__ */ j("div", {
113
+ children: /* @__PURE__ */ P("div", {
112
114
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
113
- children: [/* @__PURE__ */ j("div", {
115
+ children: [/* @__PURE__ */ P("div", {
114
116
  className: "lg:col-span-2",
115
117
  children: [
116
- /* @__PURE__ */ j(M, {
118
+ /* @__PURE__ */ P(F, {
117
119
  treatment: "glass",
118
120
  className: "group overflow-hidden p-0",
119
- children: [/* @__PURE__ */ A(o, {
120
- icon: /* @__PURE__ */ A(E, { className: "h-14 w-14" }),
121
- seed: B.id,
122
- fileId: B.image?.id,
123
- alt: B.title,
121
+ children: [/* @__PURE__ */ N(o, {
122
+ icon: /* @__PURE__ */ N(k, { className: "h-14 w-14" }),
123
+ seed: K.id,
124
+ fileId: K.image?.id,
125
+ alt: K.title,
124
126
  className: "aspect-[4/5] max-h-[38rem] w-full rounded-none"
125
- }), /* @__PURE__ */ j("div", {
127
+ }), /* @__PURE__ */ P("div", {
126
128
  className: "p-6",
127
129
  children: [
128
- /* @__PURE__ */ j("div", {
130
+ /* @__PURE__ */ P("div", {
129
131
  className: "flex items-center gap-2",
130
132
  children: [
131
- /* @__PURE__ */ A("h2", {
133
+ /* @__PURE__ */ N("h2", {
132
134
  className: "text-xl font-semibold text-text-primary",
133
- children: B.title
135
+ children: K.title
134
136
  }),
135
- B.isFeatured && /* @__PURE__ */ A(D, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }),
136
- /* @__PURE__ */ A(r, {
137
- status: H ? "published" : "draft",
137
+ K.isFeatured && /* @__PURE__ */ N(A, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }),
138
+ /* @__PURE__ */ N(r, {
139
+ status: J ? "published" : "draft",
138
140
  className: "ml-auto"
139
141
  })
140
142
  ]
141
143
  }),
142
- B.caption && /* @__PURE__ */ A("p", {
144
+ K.caption && /* @__PURE__ */ N("p", {
143
145
  className: "mt-3 text-sm text-text-secondary",
144
- children: B.caption
146
+ children: K.caption
145
147
  }),
146
- B.tags.length > 0 && /* @__PURE__ */ A(h, {
147
- tags: B.tags,
148
+ K.tags.length > 0 && /* @__PURE__ */ N(v, {
149
+ tags: K.tags,
148
150
  className: "mt-4",
149
151
  tone: "accent"
150
152
  }),
151
- /* @__PURE__ */ j("div", {
153
+ /* @__PURE__ */ P("div", {
152
154
  className: "mt-4 flex flex-wrap items-center gap-3 text-sm text-text-secondary",
153
- children: [/* @__PURE__ */ A(F, { authorId: B.authorId }), !U && /* @__PURE__ */ A(_, {
154
- followeeId: B.authorId,
155
+ children: [/* @__PURE__ */ N(R, { authorId: K.authorId }), !Y && /* @__PURE__ */ N(b, {
156
+ followeeId: K.authorId,
155
157
  size: "sm"
156
158
  })]
157
159
  }),
158
- /* @__PURE__ */ j("div", {
160
+ /* @__PURE__ */ P("div", {
159
161
  className: "mt-5 flex items-center gap-3",
160
- children: [/* @__PURE__ */ j("button", {
162
+ children: [/* @__PURE__ */ P("button", {
161
163
  type: "button",
162
- disabled: I.isPending,
163
- onClick: () => I.mutate(B.id),
164
- 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-status-error-bg-subtle disabled:opacity-50",
164
+ disabled: z.isPending || B.isPending,
165
+ "aria-pressed": !!K.isLikedByMe,
166
+ onClick: () => (K.isLikedByMe ? B : z).mutate(K.id),
167
+ className: t("inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50", K.isLikedByMe ? "border-status-error-text/40 bg-status-error-bg-subtle text-status-error-text" : "border-border-seam text-text-primary hover:bg-status-error-bg-subtle"),
165
168
  children: [
166
- I.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(C, { className: "h-4 w-4" }),
167
- "Like · ",
168
- B.likeCount
169
+ z.isPending || B.isPending ? /* @__PURE__ */ N(D, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ N(E, { className: t("h-4 w-4", K.isLikedByMe && "fill-current") }),
170
+ K.isLikedByMe ? "Liked" : "Like",
171
+ " · ",
172
+ K.likeCount
169
173
  ]
170
- }), /* @__PURE__ */ j("span", {
171
- className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
174
+ }), /* @__PURE__ */ P("button", {
175
+ type: "button",
176
+ disabled: V.isPending || H.isPending,
177
+ "aria-pressed": !!K.isSavedByMe,
178
+ onClick: () => (K.isSavedByMe ? H : V).mutate(K.id),
179
+ className: t("inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50", K.isSavedByMe ? "border-accent-primary/40 bg-accent-primary/10 text-accent-primary" : "border-border-seam text-text-secondary hover:bg-bg-sunken"),
172
180
  children: [
173
- /* @__PURE__ */ A(S, { className: "h-4 w-4" }),
174
- " ",
175
- B.saveCount,
176
- " saves"
181
+ V.isPending || H.isPending ? /* @__PURE__ */ N(D, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ N(T, { className: t("h-4 w-4", K.isSavedByMe && "fill-current") }),
182
+ K.isSavedByMe ? "Saved" : "Save",
183
+ " · ",
184
+ K.saveCount
177
185
  ]
178
186
  })]
179
187
  })
180
188
  ]
181
189
  })]
182
190
  }),
183
- /* @__PURE__ */ j("section", {
191
+ /* @__PURE__ */ P("section", {
184
192
  className: "mt-6",
185
- children: [/* @__PURE__ */ j("h3", {
193
+ children: [/* @__PURE__ */ P("h3", {
186
194
  className: "mb-3 text-lg font-semibold text-text-primary",
187
195
  children: [
188
196
  "Shop the look (",
189
- V.length,
197
+ q.length,
190
198
  ")"
191
199
  ]
192
- }), V.length === 0 ? /* @__PURE__ */ A("p", {
200
+ }), q.length === 0 ? /* @__PURE__ */ N("p", {
193
201
  className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
194
202
  children: "No items tagged in this look yet."
195
- }) : /* @__PURE__ */ A("div", {
203
+ }) : /* @__PURE__ */ N("div", {
196
204
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
197
- children: [...V].sort((e, t) => e.position - t.position).map((e) => e.styleItem ? /* @__PURE__ */ A(v, {
205
+ children: [...q].sort((e, t) => e.position - t.position).map((e) => e.styleItem ? /* @__PURE__ */ N(x, {
198
206
  id: e.styleItem.id,
199
207
  name: e.styleItem.name,
200
208
  brandName: e.styleItem.brand?.name,
201
209
  price: e.styleItem.price,
202
210
  currency: e.styleItem.currency,
203
211
  imageFileId: e.styleItem.image?.id,
204
- onOpen: () => b(`/items/${e.styleItem?.id}`)
205
- }, e.id) : /* @__PURE__ */ j("div", {
212
+ onOpen: () => C(`/items/${e.styleItem?.id}`)
213
+ }, e.id) : /* @__PURE__ */ P("div", {
206
214
  className: "flex flex-col justify-center rounded-xl border border-border-seam bg-bg-surface p-4",
207
- children: [/* @__PURE__ */ A("p", {
215
+ children: [/* @__PURE__ */ N("p", {
208
216
  className: "truncate text-sm font-medium text-text-primary",
209
217
  children: "Catalogue piece"
210
- }), e.styling && /* @__PURE__ */ A("p", {
218
+ }), e.styling && /* @__PURE__ */ N("p", {
211
219
  className: "mt-0.5 truncate text-xs text-text-secondary",
212
220
  children: e.styling
213
221
  })]
214
222
  }, e.id))
215
223
  })]
216
224
  }),
217
- /* @__PURE__ */ A(g, {
225
+ /* @__PURE__ */ N(y, {
218
226
  entityType: "CooLook",
219
- entityId: B.id
227
+ entityId: K.id
220
228
  })
221
229
  ]
222
- }), /* @__PURE__ */ j("div", {
230
+ }), /* @__PURE__ */ P("div", {
223
231
  className: "space-y-4",
224
232
  children: [
225
- /* @__PURE__ */ j(M, {
233
+ /* @__PURE__ */ P(F, {
226
234
  treatment: "plain",
227
235
  className: "p-5",
228
- children: [/* @__PURE__ */ A("h3", {
236
+ children: [/* @__PURE__ */ N("h3", {
229
237
  className: "mb-3 text-sm font-semibold text-text-primary",
230
238
  children: "Details"
231
- }), /* @__PURE__ */ j("dl", {
239
+ }), /* @__PURE__ */ P("dl", {
232
240
  className: "space-y-2 text-sm",
233
241
  children: [
234
- /* @__PURE__ */ j("div", {
242
+ /* @__PURE__ */ P("div", {
235
243
  className: "flex justify-between gap-2",
236
- children: [/* @__PURE__ */ A("dt", {
244
+ children: [/* @__PURE__ */ N("dt", {
237
245
  className: "text-text-secondary",
238
246
  children: "Occasion"
239
- }), /* @__PURE__ */ A("dd", {
247
+ }), /* @__PURE__ */ N("dd", {
240
248
  className: "text-text-primary",
241
- children: m(B.occasion)
249
+ children: _(K.occasion)
242
250
  })]
243
251
  }),
244
- /* @__PURE__ */ j("div", {
252
+ /* @__PURE__ */ P("div", {
245
253
  className: "flex justify-between gap-2",
246
- children: [/* @__PURE__ */ A("dt", {
254
+ children: [/* @__PURE__ */ N("dt", {
247
255
  className: "text-text-secondary",
248
256
  children: "Visibility"
249
- }), /* @__PURE__ */ A("dd", {
257
+ }), /* @__PURE__ */ N("dd", {
250
258
  className: "text-text-primary",
251
- children: m(B.visibility)
259
+ children: _(K.visibility)
252
260
  })]
253
261
  }),
254
- /* @__PURE__ */ j("div", {
262
+ /* @__PURE__ */ P("div", {
255
263
  className: "flex justify-between gap-2",
256
- children: [/* @__PURE__ */ A("dt", {
264
+ children: [/* @__PURE__ */ N("dt", {
257
265
  className: "text-text-secondary",
258
266
  children: "Published"
259
- }), /* @__PURE__ */ A("dd", {
267
+ }), /* @__PURE__ */ N("dd", {
260
268
  className: "text-text-primary",
261
- children: B.publishedAt ? p(B.publishedAt, {
269
+ children: K.publishedAt ? g(K.publishedAt, {
262
270
  hour: void 0,
263
271
  minute: void 0
264
272
  }) : "—"
@@ -267,27 +275,27 @@ function I() {
267
275
  ]
268
276
  })]
269
277
  }),
270
- B.collaborationId && /* @__PURE__ */ j("button", {
278
+ K.collaborationId && /* @__PURE__ */ P("button", {
271
279
  type: "button",
272
- onClick: () => b(`/collaborations/${B.collaborationId}`),
280
+ onClick: () => C(`/collaborations/${K.collaborationId}`),
273
281
  className: "flex w-full items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50",
274
- children: [/* @__PURE__ */ A("div", {
282
+ children: [/* @__PURE__ */ N("div", {
275
283
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text",
276
- children: /* @__PURE__ */ A(E, { className: "h-5 w-5" })
277
- }), /* @__PURE__ */ j("div", {
284
+ children: /* @__PURE__ */ N(k, { className: "h-5 w-5" })
285
+ }), /* @__PURE__ */ P("div", {
278
286
  className: "min-w-0",
279
- children: [/* @__PURE__ */ A("p", {
287
+ children: [/* @__PURE__ */ N("p", {
280
288
  className: "truncate text-sm font-medium text-text-primary",
281
289
  children: "Part of a collaboration"
282
- }), /* @__PURE__ */ A("p", {
290
+ }), /* @__PURE__ */ N("p", {
283
291
  className: "truncate text-xs text-text-secondary",
284
292
  children: "View collaboration"
285
293
  })]
286
294
  })]
287
295
  }),
288
- (L.isError || R.isError || I.isError) && /* @__PURE__ */ A("p", {
296
+ (U.isError || W.isError || z.isError || B.isError || V.isError || H.isError) && /* @__PURE__ */ N("p", {
289
297
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
290
- children: (L.error ?? R.error ?? I.error) instanceof Error ? (L.error ?? R.error ?? I.error)?.message : "Action failed"
298
+ children: (U.error ?? W.error ?? z.error ?? B.error ?? V.error ?? H.error) instanceof Error ? (U.error ?? W.error ?? z.error ?? B.error ?? V.error ?? H.error)?.message : "Action failed"
291
299
  })
292
300
  ]
293
301
  })]
@@ -295,6 +303,6 @@ function I() {
295
303
  });
296
304
  }
297
305
  //#endregion
298
- export { I as LookDetailPage };
306
+ export { z as LookDetailPage };
299
307
 
300
308
  //# sourceMappingURL=LookDetailPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LookDetailPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/looks/LookDetailPage.tsx"],"sourcesContent":["/**\n * Look Detail Page\n * @module coolandlovely/pages/looks\n *\n * Single look (`cooLook`) with its look items, like (`cooLikeLook`), publish\n * (`cooPublishLook`) and delete (`cooDeleteLook`) actions.\n */\n\nimport { useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { ArrowLeft, Heart, Bookmark, Rocket, Trash2, Loader2, Sparkles, Star } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { useActorProfiles, type ActorInput } from '@burdenoff/fe-libs/shared';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { Thumbnail } from '../../components/Thumbnail';\nimport { TagList } from '../../components/TagList';\nimport { Comments } from '../../components/Comments';\nimport { FollowButton } from '../../components/FollowButton';\nimport { AddToLookbookButton } from '../../components/AddToLookbookButton';\nimport { ShopItemCard } from '../../components/ShopItemCard';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useLook, useLikeLook, usePublishLook, useDeleteLook, useUpdateLook } from '../../hooks';\nimport { formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\n\n/** Compute up-to-two-letter initials for the avatar fallback. */\nfunction initials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return '?';\n if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();\n return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n}\n\n/**\n * Author chip — avatar + display name resolved via fe-libs `useActorProfiles`\n * on the GLOBAL gateway (never select firstName on a federated wspace User).\n */\nfunction LookAuthor({ authorId }: { authorId: string }) {\n const { apiGatewayUrl, authToken, workspaceId } = useCoolAndLovely();\n const [avatarFailed, setAvatarFailed] = useState(false);\n const actors = useMemo<ActorInput[]>(\n () => [{ actorId: authorId, actorType: 'user' }],\n [authorId]\n );\n const profiles = useActorProfiles(actors, { apiGatewayUrl, authToken, workspaceId });\n const profile = profiles[authorId];\n const name = profile?.displayName ?? 'Creator';\n const avatarUrl = profile?.avatarUrl;\n\n return (\n <span className=\"inline-flex items-center gap-2\">\n <span\n title={name}\n className=\"relative flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-full bg-bg-sunken ring-1 ring-border-seam\"\n >\n {avatarUrl && !avatarFailed ? (\n <img\n src={avatarUrl}\n alt={name}\n loading=\"lazy\"\n onError={() => setAvatarFailed(true)}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <span className=\"text-[10px] font-semibold text-text-secondary\">{initials(name)}</span>\n )}\n </span>\n <span className=\"font-medium text-text-primary\" title={profile?.email ?? authorId}>\n {name}\n </span>\n </span>\n );\n}\n\nexport function LookDetailPage() {\n const { lookId } = useParams<{ lookId: string }>();\n const { navigateTo, currentUser } = useCoolAndLovely();\n const query = useLook(lookId);\n const like = useLikeLook();\n const publish = usePublishLook();\n const remove = useDeleteLook();\n const update = useUpdateLook();\n\n if (query.isLoading) {\n return (\n <PageLayout title=\"Look\">\n <LoadingView label=\"Loading look…\" />\n </PageLayout>\n );\n }\n\n if (query.isError || !query.data) {\n return (\n <PageLayout title=\"Look\">\n <ErrorView title=\"Look not found\" onRetry={() => void query.refetch()} />\n </PageLayout>\n );\n }\n\n const look = query.data;\n const items = look.items ?? [];\n const isPublished = look.publishedAt !== null;\n const isOwnLook = Boolean(currentUser?.id && currentUser.id === look.authorId);\n\n return (\n <PageLayout\n title={look.title}\n description={titleCase(look.occasion)}\n actions={\n <div className=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/looks')}\n 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\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> Back\n </button>\n <AddToLookbookButton lookId={look.id} />\n <button\n type=\"button\"\n disabled={update.isPending}\n onClick={() => update.mutate({ id: look.id, input: { isFeatured: !look.isFeatured } })}\n aria-pressed={look.isFeatured}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50',\n look.isFeatured\n ? 'border-status-warning-text/40 bg-status-warning-bg-subtle text-status-warning-text'\n : 'border-border-seam text-text-primary hover:bg-bg-sunken'\n )}\n >\n {update.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Star className={cn('h-4 w-4', look.isFeatured && 'fill-status-warning-text')} />\n )}\n {look.isFeatured ? 'Featured' : 'Feature'}\n </button>\n {!isPublished && (\n <button\n type=\"button\"\n disabled={publish.isPending}\n onClick={() => publish.mutate(look.id)}\n 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 disabled:opacity-50\"\n >\n {publish.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Rocket className=\"h-4 w-4\" />\n )}\n Publish\n </button>\n )}\n <button\n type=\"button\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(look.id, { onSuccess: () => navigateTo('/looks') })}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50\"\n >\n {remove.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Trash2 className=\"h-4 w-4\" />\n )}\n Delete\n </button>\n </div>\n }\n >\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"lg:col-span-2\">\n <GlassCard treatment=\"glass\" className=\"group overflow-hidden p-0\">\n <Thumbnail\n icon={<Sparkles className=\"h-14 w-14\" />}\n seed={look.id}\n fileId={look.image?.id}\n alt={look.title}\n className=\"aspect-[4/5] max-h-[38rem] w-full rounded-none\"\n />\n <div className=\"p-6\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"text-xl font-semibold text-text-primary\">{look.title}</h2>\n {look.isFeatured && (\n <Star className=\"h-4 w-4 fill-status-warning-text text-status-warning-text\" />\n )}\n <StatusBadge status={isPublished ? 'published' : 'draft'} className=\"ml-auto\" />\n </div>\n {look.caption && <p className=\"mt-3 text-sm text-text-secondary\">{look.caption}</p>}\n {look.tags.length > 0 && <TagList tags={look.tags} className=\"mt-4\" tone=\"accent\" />}\n\n <div className=\"mt-4 flex flex-wrap items-center gap-3 text-sm text-text-secondary\">\n <LookAuthor authorId={look.authorId} />\n {!isOwnLook && <FollowButton followeeId={look.authorId} size=\"sm\" />}\n </div>\n\n <div className=\"mt-5 flex items-center gap-3\">\n <button\n type=\"button\"\n disabled={like.isPending}\n onClick={() => like.mutate(look.id)}\n 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-status-error-bg-subtle disabled:opacity-50\"\n >\n {like.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Heart className=\"h-4 w-4\" />\n )}\n Like · {look.likeCount}\n </button>\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-secondary\">\n <Bookmark className=\"h-4 w-4\" /> {look.saveCount} saves\n </span>\n </div>\n </div>\n </GlassCard>\n\n {/* Shop the look */}\n <section className=\"mt-6\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n Shop the look ({items.length})\n </h3>\n {items.length === 0 ? (\n <p className=\"rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary\">\n No items tagged in this look yet.\n </p>\n ) : (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {[...items]\n .sort((a, b) => a.position - b.position)\n .map((li) =>\n li.styleItem ? (\n <ShopItemCard\n key={li.id}\n id={li.styleItem.id}\n name={li.styleItem.name}\n brandName={li.styleItem.brand?.name}\n price={li.styleItem.price}\n currency={li.styleItem.currency}\n imageFileId={li.styleItem.image?.id}\n onOpen={() => navigateTo(`/items/${li.styleItem?.id}`)}\n />\n ) : (\n <div\n key={li.id}\n className=\"flex flex-col justify-center rounded-xl border border-border-seam bg-bg-surface p-4\"\n >\n <p className=\"truncate text-sm font-medium text-text-primary\">\n Catalogue piece\n </p>\n {li.styling && (\n <p className=\"mt-0.5 truncate text-xs text-text-secondary\">\n {li.styling}\n </p>\n )}\n </div>\n )\n )}\n </div>\n )}\n </section>\n\n <Comments entityType=\"CooLook\" entityId={look.id} />\n </div>\n\n <div className=\"space-y-4\">\n <GlassCard treatment=\"plain\" className=\"p-5\">\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">Details</h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Occasion</dt>\n <dd className=\"text-text-primary\">{titleCase(look.occasion)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Visibility</dt>\n <dd className=\"text-text-primary\">{titleCase(look.visibility)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Published</dt>\n <dd className=\"text-text-primary\">\n {look.publishedAt\n ? formatDate(look.publishedAt, { hour: undefined, minute: undefined })\n : '—'}\n </dd>\n </div>\n </dl>\n </GlassCard>\n\n {look.collaborationId && (\n <button\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${look.collaborationId}`)}\n className=\"flex w-full items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text\">\n <Sparkles className=\"h-5 w-5\" />\n </div>\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n Part of a collaboration\n </p>\n <p className=\"truncate text-xs text-text-secondary\">View collaboration</p>\n </div>\n </button>\n )}\n\n {(publish.isError || remove.isError || like.isError) && (\n <p className=\"rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text\">\n {(publish.error ?? remove.error ?? like.error) instanceof Error\n ? (publish.error ?? remove.error ?? like.error)?.message\n : 'Action failed'}\n </p>\n )}\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,EAAS,GAAsB;CACtC,IAAM,IAAQ,EAAK,MAAM,CAAC,MAAM,MAAM,CAAC,OAAO,QAAQ;AAGtD,QAFI,EAAM,WAAW,IAAU,MAC3B,EAAM,WAAW,IAAU,EAAM,GAAG,MAAM,GAAG,EAAE,CAAC,aAAa,IACzD,EAAM,GAAG,KAAK,EAAM,EAAM,SAAS,GAAG,IAAI,aAAa;;AAOjE,SAAS,EAAW,EAAE,eAAkC;CACtD,IAAM,EAAE,kBAAe,cAAW,mBAAgB,GAAkB,EAC9D,CAAC,GAAc,KAAmB,EAAS,GAAM,EAMjD,IADW,E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MAAD;UAAI,WAAU;oBAAsB;UAAc,CAAA,EAClD,kBAAC,MAAD;UAAI,WAAU;oBACX,EAAK,cACF,EAAW,EAAK,aAAa;WAAE,MAAM,KAAA;WAAW,QAAQ,KAAA;WAAW,CAAC,GACpE;UACD,CAAA,CACD;;QACH;SACK;;KAEX,EAAK,mBACJ,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAW,mBAAmB,EAAK,kBAAkB;MACpE,WAAU;gBAHZ,CAKE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA;OAC5B,CAAA,EACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,KAAD;QAAG,WAAU;kBAAiD;QAE1D,CAAA,EACJ,kBAAC,KAAD;QAAG,WAAU;kBAAuC;QAAsB,CAAA,CACtE;SACC;;MAGT,EAAQ,WAAW,EAAO,WAAW,EAAK,YAC1C,kBAAC,KAAD;MAAG,WAAU;iBACT,EAAQ,SAAS,EAAO,SAAS,EAAK,kBAAkB,SACrD,EAAQ,SAAS,EAAO,SAAS,EAAK,QAAQ,UAC/C;MACF,CAAA;KAEF;MACF;;EACK,CAAA"}
1
+ {"version":3,"file":"LookDetailPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/looks/LookDetailPage.tsx"],"sourcesContent":["/**\n * Look Detail Page\n * @module coolandlovely/pages/looks\n *\n * Single look (`cooLook`) with its look items, a true-toggle like\n * (`cooLikeLook` / `cooUnlikeLook`), a true-toggle save (`cooSaveLook` /\n * `cooUnsaveLook`), publish (`cooPublishLook`) and delete (`cooDeleteLook`)\n * actions.\n */\n\nimport { useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { ArrowLeft, Heart, Bookmark, Rocket, Trash2, Loader2, Sparkles, Star } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { useActorProfiles, type ActorInput } from '@burdenoff/fe-libs/shared';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { Thumbnail } from '../../components/Thumbnail';\nimport { TagList } from '../../components/TagList';\nimport { Comments } from '../../components/Comments';\nimport { FollowButton } from '../../components/FollowButton';\nimport { AddToLookbookButton } from '../../components/AddToLookbookButton';\nimport { ShopItemCard } from '../../components/ShopItemCard';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport {\n useLook,\n useLikeLook,\n useUnlikeLook,\n useSaveLook,\n useUnsaveLook,\n usePublishLook,\n useDeleteLook,\n useUpdateLook,\n} from '../../hooks';\nimport { formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\n\n/** Compute up-to-two-letter initials for the avatar fallback. */\nfunction initials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return '?';\n if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();\n return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n}\n\n/**\n * Author chip — avatar + display name resolved via fe-libs `useActorProfiles`\n * on the GLOBAL gateway (never select firstName on a federated wspace User).\n * Clicking it opens the author's public style profile (`/profile/:userId`).\n */\nfunction LookAuthor({ authorId }: { authorId: string }) {\n const { apiGatewayUrl, authToken, workspaceId, navigateTo } = useCoolAndLovely();\n const [avatarFailed, setAvatarFailed] = useState(false);\n const actors = useMemo<ActorInput[]>(\n () => [{ actorId: authorId, actorType: 'user' }],\n [authorId]\n );\n const profiles = useActorProfiles(actors, { apiGatewayUrl, authToken, workspaceId });\n const profile = profiles[authorId];\n const name = profile?.displayName ?? 'Creator';\n const avatarUrl = profile?.avatarUrl;\n\n return (\n <button\n type=\"button\"\n onClick={() => navigateTo(`/profile/${authorId}`)}\n className=\"inline-flex items-center gap-2 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <span\n title={name}\n className=\"relative flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-full bg-bg-sunken ring-1 ring-border-seam\"\n >\n {avatarUrl && !avatarFailed ? (\n <img\n src={avatarUrl}\n alt={name}\n loading=\"lazy\"\n onError={() => setAvatarFailed(true)}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <span className=\"text-[10px] font-semibold text-text-secondary\">{initials(name)}</span>\n )}\n </span>\n <span\n className=\"font-medium text-text-primary hover:underline\"\n title={profile?.email ?? authorId}\n >\n {name}\n </span>\n </button>\n );\n}\n\nexport function LookDetailPage() {\n const { lookId } = useParams<{ lookId: string }>();\n const { navigateTo, currentUser } = useCoolAndLovely();\n const query = useLook(lookId);\n const like = useLikeLook();\n const unlike = useUnlikeLook();\n const save = useSaveLook();\n const unsave = useUnsaveLook();\n const publish = usePublishLook();\n const remove = useDeleteLook();\n const update = useUpdateLook();\n\n if (query.isLoading) {\n return (\n <PageLayout title=\"Look\">\n <LoadingView label=\"Loading look…\" />\n </PageLayout>\n );\n }\n\n if (query.isError || !query.data) {\n return (\n <PageLayout title=\"Look\">\n <ErrorView title=\"Look not found\" onRetry={() => void query.refetch()} />\n </PageLayout>\n );\n }\n\n const look = query.data;\n const items = look.items ?? [];\n const isPublished = look.publishedAt !== null;\n const isOwnLook = Boolean(currentUser?.id && currentUser.id === look.authorId);\n\n return (\n <PageLayout\n title={look.title}\n description={titleCase(look.occasion)}\n actions={\n <div className=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/looks')}\n 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\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> Back\n </button>\n <AddToLookbookButton lookId={look.id} />\n <button\n type=\"button\"\n disabled={update.isPending}\n onClick={() => update.mutate({ id: look.id, input: { isFeatured: !look.isFeatured } })}\n aria-pressed={look.isFeatured}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50',\n look.isFeatured\n ? 'border-status-warning-text/40 bg-status-warning-bg-subtle text-status-warning-text'\n : 'border-border-seam text-text-primary hover:bg-bg-sunken'\n )}\n >\n {update.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Star className={cn('h-4 w-4', look.isFeatured && 'fill-status-warning-text')} />\n )}\n {look.isFeatured ? 'Featured' : 'Feature'}\n </button>\n {!isPublished && (\n <button\n type=\"button\"\n disabled={publish.isPending}\n onClick={() => publish.mutate(look.id)}\n 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 disabled:opacity-50\"\n >\n {publish.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Rocket className=\"h-4 w-4\" />\n )}\n Publish\n </button>\n )}\n <button\n type=\"button\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(look.id, { onSuccess: () => navigateTo('/looks') })}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-50\"\n >\n {remove.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Trash2 className=\"h-4 w-4\" />\n )}\n Delete\n </button>\n </div>\n }\n >\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"lg:col-span-2\">\n <GlassCard treatment=\"glass\" className=\"group overflow-hidden p-0\">\n <Thumbnail\n icon={<Sparkles className=\"h-14 w-14\" />}\n seed={look.id}\n fileId={look.image?.id}\n alt={look.title}\n className=\"aspect-[4/5] max-h-[38rem] w-full rounded-none\"\n />\n <div className=\"p-6\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"text-xl font-semibold text-text-primary\">{look.title}</h2>\n {look.isFeatured && (\n <Star className=\"h-4 w-4 fill-status-warning-text text-status-warning-text\" />\n )}\n <StatusBadge status={isPublished ? 'published' : 'draft'} className=\"ml-auto\" />\n </div>\n {look.caption && <p className=\"mt-3 text-sm text-text-secondary\">{look.caption}</p>}\n {look.tags.length > 0 && <TagList tags={look.tags} className=\"mt-4\" tone=\"accent\" />}\n\n <div className=\"mt-4 flex flex-wrap items-center gap-3 text-sm text-text-secondary\">\n <LookAuthor authorId={look.authorId} />\n {!isOwnLook && <FollowButton followeeId={look.authorId} size=\"sm\" />}\n </div>\n\n <div className=\"mt-5 flex items-center gap-3\">\n <button\n type=\"button\"\n disabled={like.isPending || unlike.isPending}\n aria-pressed={Boolean(look.isLikedByMe)}\n onClick={() => (look.isLikedByMe ? unlike : like).mutate(look.id)}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50',\n look.isLikedByMe\n ? 'border-status-error-text/40 bg-status-error-bg-subtle text-status-error-text'\n : 'border-border-seam text-text-primary hover:bg-status-error-bg-subtle'\n )}\n >\n {like.isPending || unlike.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Heart className={cn('h-4 w-4', look.isLikedByMe && 'fill-current')} />\n )}\n {look.isLikedByMe ? 'Liked' : 'Like'} · {look.likeCount}\n </button>\n <button\n type=\"button\"\n disabled={save.isPending || unsave.isPending}\n aria-pressed={Boolean(look.isSavedByMe)}\n onClick={() => (look.isSavedByMe ? unsave : save).mutate(look.id)}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium transition-colors disabled:opacity-50',\n look.isSavedByMe\n ? 'border-accent-primary/40 bg-accent-primary/10 text-accent-primary'\n : 'border-border-seam text-text-secondary hover:bg-bg-sunken'\n )}\n >\n {save.isPending || unsave.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Bookmark className={cn('h-4 w-4', look.isSavedByMe && 'fill-current')} />\n )}\n {look.isSavedByMe ? 'Saved' : 'Save'} · {look.saveCount}\n </button>\n </div>\n </div>\n </GlassCard>\n\n {/* Shop the look */}\n <section className=\"mt-6\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n Shop the look ({items.length})\n </h3>\n {items.length === 0 ? (\n <p className=\"rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary\">\n No items tagged in this look yet.\n </p>\n ) : (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {[...items]\n .sort((a, b) => a.position - b.position)\n .map((li) =>\n li.styleItem ? (\n <ShopItemCard\n key={li.id}\n id={li.styleItem.id}\n name={li.styleItem.name}\n brandName={li.styleItem.brand?.name}\n price={li.styleItem.price}\n currency={li.styleItem.currency}\n imageFileId={li.styleItem.image?.id}\n onOpen={() => navigateTo(`/items/${li.styleItem?.id}`)}\n />\n ) : (\n <div\n key={li.id}\n className=\"flex flex-col justify-center rounded-xl border border-border-seam bg-bg-surface p-4\"\n >\n <p className=\"truncate text-sm font-medium text-text-primary\">\n Catalogue piece\n </p>\n {li.styling && (\n <p className=\"mt-0.5 truncate text-xs text-text-secondary\">\n {li.styling}\n </p>\n )}\n </div>\n )\n )}\n </div>\n )}\n </section>\n\n <Comments entityType=\"CooLook\" entityId={look.id} />\n </div>\n\n <div className=\"space-y-4\">\n <GlassCard treatment=\"plain\" className=\"p-5\">\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">Details</h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Occasion</dt>\n <dd className=\"text-text-primary\">{titleCase(look.occasion)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Visibility</dt>\n <dd className=\"text-text-primary\">{titleCase(look.visibility)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">Published</dt>\n <dd className=\"text-text-primary\">\n {look.publishedAt\n ? formatDate(look.publishedAt, { hour: undefined, minute: undefined })\n : '—'}\n </dd>\n </div>\n </dl>\n </GlassCard>\n\n {look.collaborationId && (\n <button\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${look.collaborationId}`)}\n className=\"flex w-full items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text\">\n <Sparkles className=\"h-5 w-5\" />\n </div>\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n Part of a collaboration\n </p>\n <p className=\"truncate text-xs text-text-secondary\">View collaboration</p>\n </div>\n </button>\n )}\n\n {(publish.isError ||\n remove.isError ||\n like.isError ||\n unlike.isError ||\n save.isError ||\n unsave.isError) && (\n <p className=\"rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text\">\n {(publish.error ??\n remove.error ??\n like.error ??\n unlike.error ??\n save.error ??\n unsave.error) instanceof Error\n ? (\n publish.error ??\n remove.error ??\n like.error ??\n unlike.error ??\n save.error ??\n unsave.error\n )?.message\n : 'Action failed'}\n </p>\n )}\n </div>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,EAAS,GAAsB;CACtC,IAAM,IAAQ,EAAK,MAAM,CAAC,MAAM,MAAM,CAAC,OAAO,QAAQ;AAGtD,QAFI,EAAM,WAAW,IAAU,MAC3B,EAAM,WAAW,IAAU,EAAM,GAAG,MAAM,GAAG,EAAE,CAAC,aAAa,IACzD,EAAM,GAAG,KAAK,EAAM,EAAM,SAAS,GAAG,IAAI,aAAa;;AAQjE,SAAS,EAAW,EAAE,eAAkC;CACtD,IAAM,EAAE,kBAAe,cAAW,gBAAa,kBAAe,GAAkB,EAC1E,CAAC,GAAc,KAAmB,EAAS,GAAM,EAMjD,IADW,EAJF,QACP,CAAC;EAAE,SAAS;EAAU,WAAW;EAAQ,CAAC,EAChD,CAAC,EAAS,CACX,EACyC;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ACH;MACF,CAAA;KAEF;MACF;;EACK,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"LooksListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/looks/LooksListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4BH,wBAAgB,aAAa,gCA2I5B"}
1
+ {"version":3,"file":"LooksListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/looks/LooksListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4BH,wBAAgB,aAAa,gCA6I5B"}
@@ -109,6 +109,8 @@ function b() {
109
109
  occasion: e.occasion,
110
110
  imageFileId: e.image?.id,
111
111
  likeCount: e.likeCount,
112
+ isLikedByMe: e.isLikedByMe,
113
+ isSavedByMe: e.isSavedByMe,
112
114
  onOpen: () => b(`/looks/${e.id}`),
113
115
  showActions: !0
114
116
  }), (e.isFeatured || e.publishedAt === null) && /* @__PURE__ */ _("div", {