@burdenoff/microfe-coolandlovely 2026.706.1 → 2026.706.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +14 -6
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/ActorName.js +29 -0
  6. package/dist/coolandlovely/components/ActorName.js.map +1 -0
  7. package/dist/coolandlovely/components/AddToLookbookButton.js +81 -0
  8. package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -0
  9. package/dist/coolandlovely/components/BrandCover.js +39 -0
  10. package/dist/coolandlovely/components/BrandCover.js.map +1 -0
  11. package/dist/coolandlovely/components/BrandCreatorAvatars.js +57 -0
  12. package/dist/coolandlovely/components/BrandCreatorAvatars.js.map +1 -0
  13. package/dist/coolandlovely/components/ColourSwatchRow.js +86 -0
  14. package/dist/coolandlovely/components/ColourSwatchRow.js.map +1 -0
  15. package/dist/coolandlovely/components/Comments.js +109 -0
  16. package/dist/coolandlovely/components/Comments.js.map +1 -0
  17. package/dist/coolandlovely/components/Field.js +22 -2
  18. package/dist/coolandlovely/components/Field.js.map +1 -1
  19. package/dist/coolandlovely/components/FileImage.js +17 -0
  20. package/dist/coolandlovely/components/FileImage.js.map +1 -0
  21. package/dist/coolandlovely/components/FollowButton.js +24 -0
  22. package/dist/coolandlovely/components/FollowButton.js.map +1 -0
  23. package/dist/coolandlovely/components/ImageUploadField.js +153 -0
  24. package/dist/coolandlovely/components/ImageUploadField.js.map +1 -0
  25. package/dist/coolandlovely/components/LookCard.js +77 -0
  26. package/dist/coolandlovely/components/LookCard.js.map +1 -0
  27. package/dist/coolandlovely/components/MetricsCard.js +1 -1
  28. package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
  29. package/dist/coolandlovely/components/ShopItemCard.js +45 -0
  30. package/dist/coolandlovely/components/ShopItemCard.js.map +1 -0
  31. package/dist/coolandlovely/components/StepTracker.js +35 -0
  32. package/dist/coolandlovely/components/StepTracker.js.map +1 -0
  33. package/dist/coolandlovely/components/Thumbnail.js +25 -14
  34. package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
  35. package/dist/coolandlovely/components/VisibilityChip.js +32 -0
  36. package/dist/coolandlovely/components/VisibilityChip.js.map +1 -0
  37. package/dist/coolandlovely/hooks/index.js +2 -0
  38. package/dist/coolandlovely/hooks/useComments.js +68 -0
  39. package/dist/coolandlovely/hooks/useComments.js.map +1 -0
  40. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +155 -60
  41. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  42. package/dist/coolandlovely/hooks/useFiles.js +111 -0
  43. package/dist/coolandlovely/hooks/useFiles.js.map +1 -0
  44. package/dist/coolandlovely/pages/HomePage.js +130 -133
  45. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  46. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +261 -228
  47. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  48. package/dist/coolandlovely/pages/brands/BrandFormPage.js +146 -104
  49. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
  50. package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -11
  51. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
  52. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +117 -95
  53. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  54. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +1 -1
  55. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +50 -43
  56. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  57. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +134 -107
  58. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
  59. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +117 -102
  60. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -1
  61. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -54
  62. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
  63. package/dist/coolandlovely/pages/discover/DiscoverPage.js +223 -0
  64. package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -0
  65. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +176 -144
  66. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  67. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +144 -130
  68. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -1
  69. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +73 -62
  70. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
  71. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +215 -102
  72. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  73. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +115 -86
  74. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
  75. package/dist/coolandlovely/pages/looks/LookDetailPage.js +217 -155
  76. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
  77. package/dist/coolandlovely/pages/looks/LookFormPage.js +147 -96
  78. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
  79. package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -95
  80. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
  81. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +376 -146
  82. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  83. package/dist/coolandlovely/pages/trends/TrendsPage.js +249 -0
  84. package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -0
  85. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +136 -88
  86. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
  87. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -74
  88. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  89. package/package.json +1 -1
@@ -1,202 +1,264 @@
1
1
  import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { StatusBadge as n } from "../../components/StatusBadge.js";
4
- import { ErrorView as r, LoadingView as i } from "../../components/StateViews.js";
5
- import { Thumbnail as a } from "../../components/Thumbnail.js";
6
- import { useDeleteLook as o, useLikeLook as s, useLook as c, usePublishLook as l } from "../../hooks/useCoolAndLovelyApi.js";
2
+ import { cn as t } from "../../utils/cn.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { StatusBadge as r } from "../../components/StatusBadge.js";
5
+ import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
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
10
  import "../../hooks/index.js";
8
- import { formatDate as u, formatPrice as d, titleCase as f } from "../../utils/formatters.js";
9
- import { TagList as p } from "../../components/TagList.js";
10
- import { ArrowLeft as m, Bookmark as h, Heart as g, Loader2 as _, Rocket as v, Sparkles as y, Star as b, Trash2 as x } from "lucide-react";
11
- import { useParams as S } from "react-router-dom";
12
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
13
- import { GlassCard as T } from "@burdenoff/fe-libs/ui";
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";
14
21
  //#region src/coolandlovely/pages/looks/LookDetailPage.tsx
15
- function E() {
16
- let { lookId: E } = S(), { navigateTo: D } = e(), O = c(E), k = s(), A = l(), j = o();
17
- if (O.isLoading) return /* @__PURE__ */ C(t, {
22
+ function P(e) {
23
+ let t = e.trim().split(/\s+/).filter(Boolean);
24
+ return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
25
+ }
26
+ function F({ authorId: t }) {
27
+ let { apiGatewayUrl: n, authToken: r, workspaceId: i } = e(), [a, o] = b(!1), s = N(y(() => [{
28
+ actorId: t,
29
+ actorType: "user"
30
+ }], [t]), {
31
+ apiGatewayUrl: n,
32
+ authToken: r,
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,
39
+ 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,
43
+ loading: "lazy",
44
+ onError: () => o(!0),
45
+ className: "h-full w-full object-cover"
46
+ }) : /* @__PURE__ */ A("span", {
47
+ className: "text-[10px] font-semibold text-text-secondary",
48
+ children: P(c)
49
+ })
50
+ }), /* @__PURE__ */ A("span", {
51
+ className: "font-medium text-text-primary",
52
+ title: s?.email ?? t,
53
+ children: c
54
+ })]
55
+ });
56
+ }
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, {
18
60
  title: "Look",
19
- children: /* @__PURE__ */ C(i, { label: "Loading look…" })
61
+ children: /* @__PURE__ */ A(a, { label: "Loading look…" })
20
62
  });
21
- if (O.isError || !O.data) return /* @__PURE__ */ C(t, {
63
+ if (P.isError || !P.data) return /* @__PURE__ */ A(n, {
22
64
  title: "Look",
23
- children: /* @__PURE__ */ C(r, {
65
+ children: /* @__PURE__ */ A(i, {
24
66
  title: "Look not found",
25
- onRetry: () => void O.refetch()
67
+ onRetry: () => void P.refetch()
26
68
  })
27
69
  });
28
- let M = O.data, N = M.items ?? [], P = M.publishedAt !== null;
29
- return /* @__PURE__ */ C(t, {
30
- title: M.title,
31
- description: f(M.occasion),
32
- actions: /* @__PURE__ */ w("div", {
33
- className: "flex items-center gap-2",
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", {
75
+ className: "flex flex-wrap items-center gap-2",
34
76
  children: [
35
- /* @__PURE__ */ w("button", {
77
+ /* @__PURE__ */ j("button", {
36
78
  type: "button",
37
- onClick: () => D("/looks"),
79
+ onClick: () => b("/looks"),
38
80
  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",
39
- children: [/* @__PURE__ */ C(m, { className: "h-4 w-4" }), " Back"]
81
+ children: [/* @__PURE__ */ A(x, { className: "h-4 w-4" }), " Back"]
82
+ }),
83
+ /* @__PURE__ */ A(f, { lookId: B.id }),
84
+ /* @__PURE__ */ j("button", {
85
+ type: "button",
86
+ disabled: z.isPending,
87
+ onClick: () => z.mutate({
88
+ id: B.id,
89
+ input: { isFeatured: !B.isFeatured }
90
+ }),
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"]
40
94
  }),
41
- !P && /* @__PURE__ */ w("button", {
95
+ !H && /* @__PURE__ */ j("button", {
42
96
  type: "button",
43
- disabled: A.isPending,
44
- onClick: () => A.mutate(M.id),
97
+ disabled: L.isPending,
98
+ onClick: () => L.mutate(B.id),
45
99
  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",
46
- children: [A.isPending ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Publish"]
100
+ children: [L.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(T, { className: "h-4 w-4" }), "Publish"]
47
101
  }),
48
- /* @__PURE__ */ w("button", {
102
+ /* @__PURE__ */ j("button", {
49
103
  type: "button",
50
- disabled: j.isPending,
51
- onClick: () => j.mutate(M.id, { onSuccess: () => D("/looks") }),
104
+ disabled: R.isPending,
105
+ onClick: () => R.mutate(B.id, { onSuccess: () => b("/looks") }),
52
106
  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",
53
- children: [j.isPending ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(x, { className: "h-4 w-4" }), "Delete"]
107
+ children: [R.isPending ? /* @__PURE__ */ A(w, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ A(O, { className: "h-4 w-4" }), "Delete"]
54
108
  })
55
109
  ]
56
110
  }),
57
- children: /* @__PURE__ */ w("div", {
111
+ children: /* @__PURE__ */ j("div", {
58
112
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
59
- children: [/* @__PURE__ */ w("div", {
113
+ children: [/* @__PURE__ */ j("div", {
60
114
  className: "lg:col-span-2",
61
- children: [/* @__PURE__ */ w(T, {
62
- treatment: "glass",
63
- className: "overflow-hidden p-0",
64
- children: [/* @__PURE__ */ C(a, {
65
- icon: /* @__PURE__ */ C(y, { className: "h-14 w-14" }),
66
- seed: M.id,
67
- className: "h-60 w-full"
68
- }), /* @__PURE__ */ w("div", {
69
- className: "p-6",
70
- children: [
71
- /* @__PURE__ */ w("div", {
72
- className: "flex items-center gap-2",
73
- children: [
74
- /* @__PURE__ */ C("h2", {
75
- className: "text-xl font-semibold text-text-primary",
76
- children: M.title
77
- }),
78
- M.isFeatured && /* @__PURE__ */ C(b, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }),
79
- /* @__PURE__ */ C(n, {
80
- status: P ? "published" : "draft",
81
- className: "ml-auto"
82
- })
83
- ]
84
- }),
85
- M.caption && /* @__PURE__ */ C("p", {
86
- className: "mt-3 text-sm text-text-secondary",
87
- children: M.caption
88
- }),
89
- M.tags.length > 0 && /* @__PURE__ */ C(p, {
90
- tags: M.tags,
91
- className: "mt-4",
92
- tone: "accent"
93
- }),
94
- /* @__PURE__ */ w("div", {
95
- className: "mt-5 flex items-center gap-3",
96
- children: [/* @__PURE__ */ w("button", {
97
- type: "button",
98
- disabled: k.isPending,
99
- onClick: () => k.mutate(M.id),
100
- 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",
101
- children: [
102
- k.isPending ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(g, { className: "h-4 w-4" }),
103
- "Like · ",
104
- M.likeCount
105
- ]
106
- }), /* @__PURE__ */ w("span", {
107
- className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
115
+ children: [
116
+ /* @__PURE__ */ j(M, {
117
+ treatment: "glass",
118
+ 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,
124
+ className: "aspect-[4/5] max-h-[38rem] w-full rounded-none"
125
+ }), /* @__PURE__ */ j("div", {
126
+ className: "p-6",
127
+ children: [
128
+ /* @__PURE__ */ j("div", {
129
+ className: "flex items-center gap-2",
108
130
  children: [
109
- /* @__PURE__ */ C(h, { className: "h-4 w-4" }),
110
- " ",
111
- M.saveCount,
112
- " saves"
131
+ /* @__PURE__ */ A("h2", {
132
+ className: "text-xl font-semibold text-text-primary",
133
+ children: B.title
134
+ }),
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",
138
+ className: "ml-auto"
139
+ })
113
140
  ]
114
- })]
115
- })
116
- ]
117
- })]
118
- }), /* @__PURE__ */ w("section", {
119
- className: "mt-6",
120
- children: [/* @__PURE__ */ w("h3", {
121
- className: "mb-3 text-lg font-semibold text-text-primary",
122
- children: [
123
- "Shop the look (",
124
- N.length,
125
- ")"
126
- ]
127
- }), N.length === 0 ? /* @__PURE__ */ C("p", {
128
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
129
- children: "No items tagged in this look yet."
130
- }) : /* @__PURE__ */ C("div", {
131
- className: "divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface",
132
- children: [...N].sort((e, t) => e.position - t.position).map((e) => /* @__PURE__ */ w("button", {
133
- type: "button",
134
- onClick: () => e.styleItem && D(`/items/${e.styleItem.id}`),
135
- className: "flex w-full items-center gap-4 px-4 py-3 text-left transition-colors hover:bg-bg-sunken/50",
136
- children: [
137
- /* @__PURE__ */ C(a, {
138
- icon: /* @__PURE__ */ C(y, { className: "h-5 w-5" }),
139
- seed: e.id,
140
- className: "h-11 w-11 shrink-0"
141
141
  }),
142
- /* @__PURE__ */ w("div", {
143
- className: "min-w-0 flex-1",
144
- children: [/* @__PURE__ */ C("p", {
145
- className: "truncate text-sm font-medium text-text-primary",
146
- children: e.styleItem?.name ?? "Catalogue piece"
147
- }), e.styling && /* @__PURE__ */ C("p", {
148
- className: "truncate text-xs text-text-secondary",
149
- children: e.styling
142
+ B.caption && /* @__PURE__ */ A("p", {
143
+ className: "mt-3 text-sm text-text-secondary",
144
+ children: B.caption
145
+ }),
146
+ B.tags.length > 0 && /* @__PURE__ */ A(h, {
147
+ tags: B.tags,
148
+ className: "mt-4",
149
+ tone: "accent"
150
+ }),
151
+ /* @__PURE__ */ j("div", {
152
+ 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
+ size: "sm"
150
156
  })]
151
157
  }),
152
- e.styleItem && /* @__PURE__ */ C("span", {
153
- className: "shrink-0 text-sm font-semibold text-text-primary",
154
- children: d(e.styleItem.price, e.styleItem.currency)
158
+ /* @__PURE__ */ j("div", {
159
+ className: "mt-5 flex items-center gap-3",
160
+ children: [/* @__PURE__ */ j("button", {
161
+ 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",
165
+ 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
+ ]
170
+ }), /* @__PURE__ */ j("span", {
171
+ className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
172
+ children: [
173
+ /* @__PURE__ */ A(S, { className: "h-4 w-4" }),
174
+ " ",
175
+ B.saveCount,
176
+ " saves"
177
+ ]
178
+ })]
155
179
  })
156
180
  ]
157
- }, e.id))
158
- })]
159
- })]
160
- }), /* @__PURE__ */ w("div", {
181
+ })]
182
+ }),
183
+ /* @__PURE__ */ j("section", {
184
+ className: "mt-6",
185
+ children: [/* @__PURE__ */ j("h3", {
186
+ className: "mb-3 text-lg font-semibold text-text-primary",
187
+ children: [
188
+ "Shop the look (",
189
+ V.length,
190
+ ")"
191
+ ]
192
+ }), V.length === 0 ? /* @__PURE__ */ A("p", {
193
+ className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
194
+ children: "No items tagged in this look yet."
195
+ }) : /* @__PURE__ */ A("div", {
196
+ 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, {
198
+ id: e.styleItem.id,
199
+ name: e.styleItem.name,
200
+ brandName: e.styleItem.brand?.name,
201
+ price: e.styleItem.price,
202
+ currency: e.styleItem.currency,
203
+ imageFileId: e.styleItem.image?.id,
204
+ onOpen: () => b(`/items/${e.styleItem?.id}`)
205
+ }, e.id) : /* @__PURE__ */ j("div", {
206
+ className: "flex flex-col justify-center rounded-xl border border-border-seam bg-bg-surface p-4",
207
+ children: [/* @__PURE__ */ A("p", {
208
+ className: "truncate text-sm font-medium text-text-primary",
209
+ children: "Catalogue piece"
210
+ }), e.styling && /* @__PURE__ */ A("p", {
211
+ className: "mt-0.5 truncate text-xs text-text-secondary",
212
+ children: e.styling
213
+ })]
214
+ }, e.id))
215
+ })]
216
+ }),
217
+ /* @__PURE__ */ A(g, {
218
+ entityType: "CooLook",
219
+ entityId: B.id
220
+ })
221
+ ]
222
+ }), /* @__PURE__ */ j("div", {
161
223
  className: "space-y-4",
162
224
  children: [
163
- /* @__PURE__ */ w(T, {
225
+ /* @__PURE__ */ j(M, {
164
226
  treatment: "plain",
165
227
  className: "p-5",
166
- children: [/* @__PURE__ */ C("h3", {
228
+ children: [/* @__PURE__ */ A("h3", {
167
229
  className: "mb-3 text-sm font-semibold text-text-primary",
168
230
  children: "Details"
169
- }), /* @__PURE__ */ w("dl", {
231
+ }), /* @__PURE__ */ j("dl", {
170
232
  className: "space-y-2 text-sm",
171
233
  children: [
172
- /* @__PURE__ */ w("div", {
234
+ /* @__PURE__ */ j("div", {
173
235
  className: "flex justify-between gap-2",
174
- children: [/* @__PURE__ */ C("dt", {
236
+ children: [/* @__PURE__ */ A("dt", {
175
237
  className: "text-text-secondary",
176
238
  children: "Occasion"
177
- }), /* @__PURE__ */ C("dd", {
239
+ }), /* @__PURE__ */ A("dd", {
178
240
  className: "text-text-primary",
179
- children: f(M.occasion)
241
+ children: m(B.occasion)
180
242
  })]
181
243
  }),
182
- /* @__PURE__ */ w("div", {
244
+ /* @__PURE__ */ j("div", {
183
245
  className: "flex justify-between gap-2",
184
- children: [/* @__PURE__ */ C("dt", {
246
+ children: [/* @__PURE__ */ A("dt", {
185
247
  className: "text-text-secondary",
186
248
  children: "Visibility"
187
- }), /* @__PURE__ */ C("dd", {
249
+ }), /* @__PURE__ */ A("dd", {
188
250
  className: "text-text-primary",
189
- children: f(M.visibility)
251
+ children: m(B.visibility)
190
252
  })]
191
253
  }),
192
- /* @__PURE__ */ w("div", {
254
+ /* @__PURE__ */ j("div", {
193
255
  className: "flex justify-between gap-2",
194
- children: [/* @__PURE__ */ C("dt", {
256
+ children: [/* @__PURE__ */ A("dt", {
195
257
  className: "text-text-secondary",
196
258
  children: "Published"
197
- }), /* @__PURE__ */ C("dd", {
259
+ }), /* @__PURE__ */ A("dd", {
198
260
  className: "text-text-primary",
199
- children: M.publishedAt ? u(M.publishedAt, {
261
+ children: B.publishedAt ? p(B.publishedAt, {
200
262
  hour: void 0,
201
263
  minute: void 0
202
264
  }) : "—"
@@ -205,27 +267,27 @@ function E() {
205
267
  ]
206
268
  })]
207
269
  }),
208
- M.collaborationId && /* @__PURE__ */ w("button", {
270
+ B.collaborationId && /* @__PURE__ */ j("button", {
209
271
  type: "button",
210
- onClick: () => D(`/collaborations/${M.collaborationId}`),
272
+ onClick: () => b(`/collaborations/${B.collaborationId}`),
211
273
  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",
212
- children: [/* @__PURE__ */ C("div", {
274
+ children: [/* @__PURE__ */ A("div", {
213
275
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text",
214
- children: /* @__PURE__ */ C(y, { className: "h-5 w-5" })
215
- }), /* @__PURE__ */ w("div", {
276
+ children: /* @__PURE__ */ A(E, { className: "h-5 w-5" })
277
+ }), /* @__PURE__ */ j("div", {
216
278
  className: "min-w-0",
217
- children: [/* @__PURE__ */ C("p", {
279
+ children: [/* @__PURE__ */ A("p", {
218
280
  className: "truncate text-sm font-medium text-text-primary",
219
281
  children: "Part of a collaboration"
220
- }), /* @__PURE__ */ C("p", {
282
+ }), /* @__PURE__ */ A("p", {
221
283
  className: "truncate text-xs text-text-secondary",
222
284
  children: "View collaboration"
223
285
  })]
224
286
  })]
225
287
  }),
226
- (A.isError || j.isError || k.isError) && /* @__PURE__ */ C("p", {
288
+ (L.isError || R.isError || I.isError) && /* @__PURE__ */ A("p", {
227
289
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
228
- children: (A.error ?? j.error ?? k.error) instanceof Error ? (A.error ?? j.error ?? k.error)?.message : "Action failed"
290
+ children: (L.error ?? R.error ?? I.error) instanceof Error ? (L.error ?? R.error ?? I.error)?.message : "Action failed"
229
291
  })
230
292
  ]
231
293
  })]
@@ -233,6 +295,6 @@ function E() {
233
295
  });
234
296
  }
235
297
  //#endregion
236
- export { E as LookDetailPage };
298
+ export { I as LookDetailPage };
237
299
 
238
300
  //# 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 { 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 { 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 { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useLook, useLikeLook, usePublishLook, useDeleteLook } from '../../hooks';\nimport { formatPrice, formatDate, titleCase } from '../../utils/formatters';\n\nexport function LookDetailPage() {\n const { lookId } = useParams<{ lookId: string }>();\n const { navigateTo } = useCoolAndLovely();\n const query = useLook(lookId);\n const like = useLikeLook();\n const publish = usePublishLook();\n const remove = useDeleteLook();\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\n return (\n <PageLayout\n title={look.title}\n description={titleCase(look.occasion)}\n actions={\n <div className=\"flex 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 {!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=\"overflow-hidden p-0\">\n <Thumbnail\n icon={<Sparkles className=\"h-14 w-14\" />}\n seed={look.id}\n className=\"h-60 w-full\"\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-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=\"divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface\">\n {[...items]\n .sort((a, b) => a.position - b.position)\n .map((li) => (\n <button\n key={li.id}\n type=\"button\"\n onClick={() => li.styleItem && navigateTo(`/items/${li.styleItem.id}`)}\n className=\"flex w-full items-center gap-4 px-4 py-3 text-left transition-colors hover:bg-bg-sunken/50\"\n >\n <Thumbnail\n icon={<Sparkles className=\"h-5 w-5\" />}\n seed={li.id}\n className=\"h-11 w-11 shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {li.styleItem?.name ?? 'Catalogue piece'}\n </p>\n {li.styling && (\n <p className=\"truncate text-xs text-text-secondary\">{li.styling}</p>\n )}\n </div>\n {li.styleItem && (\n <span className=\"shrink-0 text-sm font-semibold text-text-primary\">\n {formatPrice(li.styleItem.price, li.styleItem.currency)}\n </span>\n )}\n </button>\n ))}\n </div>\n )}\n </section>\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":";;;;;;;;;;;;;;AAoBA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,cAAW,GAA+B,EAC5C,EAAE,kBAAe,GA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AAI,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, 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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