@burdenoff/microfe-coolandlovely 2026.1123.2 → 2026.1124.1

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 (21) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoutes.js +29 -25
  2. package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.d.ts +6 -0
  3. package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.js +147 -0
  4. package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.d.ts +8 -0
  5. package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.js +109 -0
  6. package/dist/coolandlovely/components/intelligence/ProvenanceChip.d.ts +8 -0
  7. package/dist/coolandlovely/components/intelligence/ProvenanceChip.js +36 -0
  8. package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.d.ts +2 -0
  9. package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.js +123 -0
  10. package/dist/coolandlovely/hooks/index.d.ts +1 -0
  11. package/dist/coolandlovely/hooks/index.js +1 -0
  12. package/dist/coolandlovely/hooks/useStyleIntelligenceApi.d.ts +24 -0
  13. package/dist/coolandlovely/hooks/useStyleIntelligenceApi.js +266 -0
  14. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +157 -155
  15. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -105
  16. package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.d.ts +15 -0
  17. package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.js +1007 -0
  18. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +71 -69
  19. package/dist/coolandlovely/types/index.d.ts +1 -0
  20. package/dist/coolandlovely/types/intelligence.d.ts +128 -0
  21. package/package.json +1 -1
@@ -6,151 +6,152 @@ import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js
6
6
  import { Thumbnail as c } from "../../components/Thumbnail.js";
7
7
  import { TagList as l } from "../../components/TagList.js";
8
8
  import { ColourSwatchRow as u } from "../../components/ColourSwatchRow.js";
9
- import { useCoolAndLovely as d } from "../../context/CoolAndLovelyContext.js";
9
+ import { CollectionCurationCallout as d } from "../../components/intelligence/CollectionCurationCallout.js";
10
+ import { useCoolAndLovely as f } from "../../context/CoolAndLovelyContext.js";
10
11
  import "../../hooks/index.js";
11
- import { categoryIcon as f } from "../../utils/icons.js";
12
- import { formatDate as p, formatPrice as m, titleCase as h } from "../../utils/formatters.js";
13
- import { Archive as g, ArrowLeft as _, Loader2 as v, Pencil as y, Plus as b, Rocket as x, Shapes as S, Store as C } from "lucide-react";
14
- import { useParams as w } from "react-router";
15
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
16
- import { GlassCard as O } from "@burdenoff/fe-libs/ui";
12
+ import { categoryIcon as p } from "../../utils/icons.js";
13
+ import { formatDate as m, formatPrice as h, titleCase as g } from "../../utils/formatters.js";
14
+ import { Archive as _, ArrowLeft as v, Loader2 as y, Pencil as b, Plus as x, Rocket as S, Shapes as C, Store as w } from "lucide-react";
15
+ import { useParams as T } from "react-router";
16
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
17
+ import { GlassCard as k } from "@burdenoff/fe-libs/ui";
17
18
  // src/coolandlovely/pages/collections/CollectionDetailPage.tsx
18
- function k() {
19
- let { collectionId: k } = w(), { navigateTo: A } = d(), j = r(k), M = i(), N = n();
20
- if (a(k, j.data?.name), j.isLoading) return /* @__PURE__ */ E(e, {
19
+ function A() {
20
+ let { collectionId: A } = T(), { navigateTo: j } = f(), M = r(A), N = i(), P = n();
21
+ if (a(A, M.data?.name), M.isLoading) return /* @__PURE__ */ D(e, {
21
22
  title: "Collection",
22
- children: /* @__PURE__ */ E(s, { label: "Loading collection…" })
23
+ children: /* @__PURE__ */ D(s, { label: "Loading collection…" })
23
24
  });
24
- if (j.isError || !j.data) return /* @__PURE__ */ E(e, {
25
+ if (M.isError || !M.data) return /* @__PURE__ */ D(e, {
25
26
  title: "Collection",
26
- children: /* @__PURE__ */ E(o, {
27
+ children: /* @__PURE__ */ D(o, {
27
28
  title: "Collection not found",
28
- onRetry: () => void j.refetch()
29
+ onRetry: () => void M.refetch()
29
30
  })
30
31
  });
31
- let P = j.data, F = P.items ?? [], I = P.status === "DRAFT" || P.status === "SCHEDULED", L = P.status === "ARCHIVED";
32
- return /* @__PURE__ */ E(e, {
33
- title: P.name,
34
- description: P.brand?.name ?? void 0,
35
- actions: /* @__PURE__ */ D("div", {
32
+ let F = M.data, I = F.items ?? [], L = F.status === "DRAFT" || F.status === "SCHEDULED", R = F.status === "ARCHIVED";
33
+ return /* @__PURE__ */ D(e, {
34
+ title: F.name,
35
+ description: F.brand?.name ?? void 0,
36
+ actions: /* @__PURE__ */ O("div", {
36
37
  className: "flex flex-wrap items-center gap-2",
37
38
  children: [
38
- /* @__PURE__ */ D("button", {
39
+ /* @__PURE__ */ O("button", {
39
40
  type: "button",
40
- onClick: () => A("/collections"),
41
+ onClick: () => j("/collections"),
41
42
  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",
42
- children: [/* @__PURE__ */ E(_, { className: "h-4 w-4" }), " Back"]
43
+ children: [/* @__PURE__ */ D(v, { className: "h-4 w-4" }), " Back"]
43
44
  }),
44
- /* @__PURE__ */ D("button", {
45
+ /* @__PURE__ */ O("button", {
45
46
  type: "button",
46
- onClick: () => A(`/collections/${P.id}/edit`),
47
+ onClick: () => j(`/collections/${F.id}/edit`),
47
48
  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",
48
- children: [/* @__PURE__ */ E(y, { className: "h-4 w-4" }), " Edit"]
49
+ children: [/* @__PURE__ */ D(b, { className: "h-4 w-4" }), " Edit"]
49
50
  }),
50
- I && /* @__PURE__ */ D("button", {
51
+ L && /* @__PURE__ */ O("button", {
51
52
  type: "button",
52
- disabled: M.isPending,
53
- onClick: () => M.mutate(P.id),
53
+ disabled: N.isPending,
54
+ onClick: () => N.mutate(F.id),
54
55
  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",
55
- children: [M.isPending ? /* @__PURE__ */ E(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(x, { className: "h-4 w-4" }), "Publish"]
56
+ children: [N.isPending ? /* @__PURE__ */ D(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ D(S, { className: "h-4 w-4" }), "Publish"]
56
57
  }),
57
- !L && /* @__PURE__ */ D("button", {
58
+ !R && /* @__PURE__ */ O("button", {
58
59
  type: "button",
59
- disabled: N.isPending,
60
- onClick: () => N.mutate(P.id, { onSuccess: () => A("/collections") }),
60
+ disabled: P.isPending,
61
+ onClick: () => P.mutate(F.id, { onSuccess: () => j("/collections") }),
61
62
  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",
62
- children: [N.isPending ? /* @__PURE__ */ E(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(g, { className: "h-4 w-4" }), "Archive"]
63
+ children: [P.isPending ? /* @__PURE__ */ D(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ D(_, { className: "h-4 w-4" }), "Archive"]
63
64
  })
64
65
  ]
65
66
  }),
66
- children: /* @__PURE__ */ D("div", {
67
+ children: /* @__PURE__ */ O("div", {
67
68
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
68
- children: [/* @__PURE__ */ D("div", {
69
+ children: [/* @__PURE__ */ O("div", {
69
70
  className: "lg:col-span-2",
70
- children: [/* @__PURE__ */ D(O, {
71
+ children: [/* @__PURE__ */ O(k, {
71
72
  treatment: "glass",
72
73
  className: "group overflow-hidden p-0",
73
- children: [/* @__PURE__ */ E(c, {
74
- icon: /* @__PURE__ */ E(S, { className: "h-12 w-12" }),
75
- seed: P.id,
76
- fileId: P.cover?.id,
77
- alt: P.name,
74
+ children: [/* @__PURE__ */ D(c, {
75
+ icon: /* @__PURE__ */ D(C, { className: "h-12 w-12" }),
76
+ seed: F.id,
77
+ fileId: F.cover?.id,
78
+ alt: F.name,
78
79
  className: "aspect-[16/9] w-full sm:aspect-[21/9]",
79
- overlay: /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-bg-canvas via-bg-canvas/55 to-transparent" }), /* @__PURE__ */ D("div", {
80
+ overlay: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-bg-canvas via-bg-canvas/55 to-transparent" }), /* @__PURE__ */ O("div", {
80
81
  className: "absolute inset-x-0 bottom-0 flex flex-wrap items-end justify-between gap-3 p-6",
81
- children: [/* @__PURE__ */ D("div", {
82
+ children: [/* @__PURE__ */ O("div", {
82
83
  className: "min-w-0",
83
- children: [/* @__PURE__ */ E("h2", {
84
+ children: [/* @__PURE__ */ D("h2", {
84
85
  className: "font-serif text-3xl font-semibold leading-tight text-text-primary",
85
- children: P.name
86
- }), /* @__PURE__ */ D("div", {
86
+ children: F.name
87
+ }), /* @__PURE__ */ O("div", {
87
88
  className: "mt-2 flex flex-wrap items-center gap-2 text-sm text-text-secondary",
88
89
  children: [
89
- P.brand?.name && /* @__PURE__ */ E("span", { children: P.brand.name }),
90
- P.brand?.name && /* @__PURE__ */ E("span", {
90
+ F.brand?.name && /* @__PURE__ */ D("span", { children: F.brand.name }),
91
+ F.brand?.name && /* @__PURE__ */ D("span", {
91
92
  "aria-hidden": "true",
92
93
  className: "opacity-60",
93
94
  children: "·"
94
95
  }),
95
- /* @__PURE__ */ E("span", {
96
+ /* @__PURE__ */ D("span", {
96
97
  className: "rounded-full border border-border-seam bg-bg-surface/80 px-2.5 py-0.5 text-xs font-medium text-text-primary backdrop-blur-sm",
97
- children: h(P.season)
98
+ children: g(F.season)
98
99
  })
99
100
  ]
100
101
  })]
101
- }), /* @__PURE__ */ E(t, {
102
- status: P.status,
102
+ }), /* @__PURE__ */ D(t, {
103
+ status: F.status,
103
104
  className: "shrink-0 shadow-sm"
104
105
  })]
105
106
  })] })
106
- }), (P.description || P.tags.length > 0) && /* @__PURE__ */ D("div", {
107
+ }), (F.description || F.tags.length > 0) && /* @__PURE__ */ O("div", {
107
108
  className: "p-6",
108
- children: [P.description && /* @__PURE__ */ E("p", {
109
+ children: [F.description && /* @__PURE__ */ D("p", {
109
110
  className: "text-sm text-text-secondary",
110
- children: P.description
111
- }), P.tags.length > 0 && /* @__PURE__ */ E(l, {
112
- tags: P.tags,
113
- className: P.description ? "mt-4" : void 0
111
+ children: F.description
112
+ }), F.tags.length > 0 && /* @__PURE__ */ D(l, {
113
+ tags: F.tags,
114
+ className: F.description ? "mt-4" : void 0
114
115
  })]
115
116
  })]
116
- }), /* @__PURE__ */ D("section", {
117
+ }), /* @__PURE__ */ O("section", {
117
118
  className: "mt-6",
118
119
  children: [
119
- /* @__PURE__ */ D("h3", {
120
+ /* @__PURE__ */ O("h3", {
120
121
  className: "mb-3 text-lg font-semibold text-text-primary",
121
122
  children: [
122
123
  "Items (",
123
- F.length,
124
+ I.length,
124
125
  ")"
125
126
  ]
126
127
  }),
127
- F.length === 0 ? /* @__PURE__ */ E("p", {
128
+ I.length === 0 ? /* @__PURE__ */ D("p", {
128
129
  className: "rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary",
129
130
  children: "No items in this collection yet."
130
- }) : /* @__PURE__ */ E("div", {
131
+ }) : /* @__PURE__ */ D("div", {
131
132
  className: "grid grid-cols-2 gap-3 sm:grid-cols-3",
132
- children: F.map((e) => /* @__PURE__ */ D("button", {
133
+ children: I.map((e) => /* @__PURE__ */ O("button", {
133
134
  type: "button",
134
- onClick: () => A(`/items/${e.id}`),
135
+ onClick: () => j(`/items/${e.id}`),
135
136
  className: "group overflow-hidden rounded-lg border border-border-seam bg-bg-surface text-left transition-all hover:border-accent-foreground/20 hover:shadow-md",
136
- children: [/* @__PURE__ */ E(c, {
137
- icon: f(e.category, 28),
137
+ children: [/* @__PURE__ */ D(c, {
138
+ icon: p(e.category, 28),
138
139
  seed: e.id,
139
140
  fileId: e.image?.id,
140
141
  alt: e.name,
141
142
  className: "aspect-[3/4] w-full"
142
- }), /* @__PURE__ */ D("div", {
143
+ }), /* @__PURE__ */ O("div", {
143
144
  className: "p-3",
144
145
  children: [
145
- /* @__PURE__ */ E("p", {
146
+ /* @__PURE__ */ D("p", {
146
147
  className: "truncate text-sm font-medium text-text-primary",
147
148
  children: e.name
148
149
  }),
149
- /* @__PURE__ */ E("p", {
150
+ /* @__PURE__ */ D("p", {
150
151
  className: "mt-0.5 text-xs font-semibold text-text-primary tabular-nums",
151
- children: m(e.price, e.currency)
152
+ children: h(e.price, e.currency)
152
153
  }),
153
- e.colours.length > 0 && /* @__PURE__ */ E(u, {
154
+ e.colours.length > 0 && /* @__PURE__ */ D(u, {
154
155
  colours: e.colours,
155
156
  max: 5,
156
157
  className: "mt-2"
@@ -159,57 +160,57 @@ function k() {
159
160
  })]
160
161
  }, e.id))
161
162
  }),
162
- /* @__PURE__ */ D("button", {
163
+ /* @__PURE__ */ O("button", {
163
164
  type: "button",
164
- onClick: () => A(`/items/new?brandId=${P.brandId}&collectionId=${P.id}`),
165
+ onClick: () => j(`/items/new?brandId=${F.brandId}&collectionId=${F.id}`),
165
166
  className: "mt-3 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",
166
- children: [/* @__PURE__ */ E(b, { className: "h-4 w-4" }), " Add item to this collection"]
167
+ children: [/* @__PURE__ */ D(x, { className: "h-4 w-4" }), " Add item to this collection"]
167
168
  })
168
169
  ]
169
170
  })]
170
- }), /* @__PURE__ */ D("div", {
171
+ }), /* @__PURE__ */ O("div", {
171
172
  className: "space-y-4",
172
173
  children: [
173
- /* @__PURE__ */ D(O, {
174
+ /* @__PURE__ */ O(k, {
174
175
  treatment: "plain",
175
176
  className: "p-5",
176
- children: [/* @__PURE__ */ E("h3", {
177
+ children: [/* @__PURE__ */ D("h3", {
177
178
  className: "mb-3 text-sm font-semibold text-text-primary",
178
179
  children: "Details"
179
- }), /* @__PURE__ */ D("dl", {
180
+ }), /* @__PURE__ */ O("dl", {
180
181
  className: "space-y-2 text-sm",
181
182
  children: [
182
- /* @__PURE__ */ D("div", {
183
+ /* @__PURE__ */ O("div", {
183
184
  className: "flex justify-between gap-2",
184
- children: [/* @__PURE__ */ E("dt", {
185
+ children: [/* @__PURE__ */ D("dt", {
185
186
  className: "text-text-secondary",
186
187
  children: "Season"
187
- }), /* @__PURE__ */ E("dd", {
188
+ }), /* @__PURE__ */ D("dd", {
188
189
  className: "text-text-primary",
189
- children: h(P.season)
190
+ children: g(F.season)
190
191
  })]
191
192
  }),
192
- /* @__PURE__ */ D("div", {
193
+ /* @__PURE__ */ O("div", {
193
194
  className: "flex justify-between gap-2",
194
- children: [/* @__PURE__ */ E("dt", {
195
+ children: [/* @__PURE__ */ D("dt", {
195
196
  className: "text-text-secondary",
196
197
  children: "Publish at"
197
- }), /* @__PURE__ */ E("dd", {
198
+ }), /* @__PURE__ */ D("dd", {
198
199
  className: "text-text-primary",
199
- children: P.publishAt ? p(P.publishAt, {
200
+ children: F.publishAt ? m(F.publishAt, {
200
201
  hour: void 0,
201
202
  minute: void 0
202
203
  }) : "—"
203
204
  })]
204
205
  }),
205
- /* @__PURE__ */ D("div", {
206
+ /* @__PURE__ */ O("div", {
206
207
  className: "flex justify-between gap-2",
207
- children: [/* @__PURE__ */ E("dt", {
208
+ children: [/* @__PURE__ */ D("dt", {
208
209
  className: "text-text-secondary",
209
210
  children: "Ends at"
210
- }), /* @__PURE__ */ E("dd", {
211
+ }), /* @__PURE__ */ D("dd", {
211
212
  className: "text-text-primary",
212
- children: P.endAt ? p(P.endAt, {
213
+ children: F.endAt ? m(F.endAt, {
213
214
  hour: void 0,
214
215
  minute: void 0
215
216
  }) : "—"
@@ -218,36 +219,40 @@ function k() {
218
219
  ]
219
220
  })]
220
221
  }),
221
- P.brand && /* @__PURE__ */ D("button", {
222
+ /* @__PURE__ */ D(d, {
223
+ brandId: F.brandId,
224
+ season: F.season
225
+ }),
226
+ F.brand && /* @__PURE__ */ O("button", {
222
227
  type: "button",
223
- onClick: () => A(`/brands/${P.brand?.id}`),
228
+ onClick: () => j(`/brands/${F.brand?.id}`),
224
229
  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",
225
- children: [/* @__PURE__ */ E(c, {
226
- icon: /* @__PURE__ */ E(C, { className: "h-5 w-5" }),
227
- seed: P.brand.id,
230
+ children: [/* @__PURE__ */ D(c, {
231
+ icon: /* @__PURE__ */ D(w, { className: "h-5 w-5" }),
232
+ seed: F.brand.id,
228
233
  className: "h-10 w-10 shrink-0"
229
- }), /* @__PURE__ */ D("div", {
234
+ }), /* @__PURE__ */ O("div", {
230
235
  className: "min-w-0",
231
- children: [/* @__PURE__ */ E("p", {
236
+ children: [/* @__PURE__ */ D("p", {
232
237
  className: "truncate text-sm font-medium text-text-primary",
233
- children: P.brand.name
234
- }), /* @__PURE__ */ E("p", {
238
+ children: F.brand.name
239
+ }), /* @__PURE__ */ D("p", {
235
240
  className: "truncate text-xs text-text-secondary",
236
241
  children: "View brand"
237
242
  })]
238
243
  })]
239
244
  }),
240
- M.isError && /* @__PURE__ */ E("p", {
245
+ N.isError && /* @__PURE__ */ D("p", {
241
246
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
242
- children: M.error instanceof Error ? M.error.message : "Publish failed"
247
+ children: N.error instanceof Error ? N.error.message : "Publish failed"
243
248
  }),
244
- N.isError && /* @__PURE__ */ E("p", {
249
+ P.isError && /* @__PURE__ */ D("p", {
245
250
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
246
- children: N.error instanceof Error ? N.error.message : "Archive failed"
251
+ children: P.error instanceof Error ? P.error.message : "Archive failed"
247
252
  })
248
253
  ]
249
254
  })]
250
255
  })
251
256
  });
252
257
  }
253
- export { k as CollectionDetailPage };
258
+ export { A as CollectionDetailPage };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Style Intelligence Page (BOFF-3642 / BOFF-3614)
3
+ * @module coolandlovely/pages/intelligence
4
+ *
5
+ * Fashion-domain AI decision surface wired to the live `wspace-coolandlovely-svc`
6
+ * decision engine (`cooSuggestOutfit`, `cooAnalyzeWardrobeGaps`,
7
+ * `cooCurateCollection`, `cooSuggestCollaborationMatch`), platform AI credit
8
+ * status (`aiCreditStatus`), and recorded AI decision provenance
9
+ * (`getActivities` for `coolandlovely-ai-decision`).
10
+ *
11
+ * Shared AI Operations (model catalog, workspace model route controls and V2
12
+ * invocation ledger) stay on the shell's `/ai` route (`@burdenoff/fe-libs`
13
+ * `AiPage`) — never rebuilt here.
14
+ */
15
+ export declare function StyleIntelligencePage(): import('react').JSX.Element;