@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
@@ -4,136 +4,138 @@ import { useLogWardrobeWear as n, useRemoveWardrobeItem as r, useWardrobeItems a
4
4
  import { useTr as a } from "../../hooks/useTr.js";
5
5
  import { PriceCurrencySelect as o } from "../../components/prices/PriceCurrencySelect.js";
6
6
  import { PageLayout as s } from "../../components/PageLayout.js";
7
- import { WardrobeItemCard as c } from "../../components/WardrobeItemCard.js";
8
- import { EmptyState as l } from "../../components/EmptyState.js";
9
- import { ErrorView as u, LoadingView as d } from "../../components/StateViews.js";
10
- import { useContextNavigation as f } from "../../hooks/useContextNavigation.js";
7
+ import { WardrobeIntelligenceStrip as c } from "../../components/intelligence/WardrobeIntelligenceStrip.js";
8
+ import { WardrobeItemCard as l } from "../../components/WardrobeItemCard.js";
9
+ import { EmptyState as u } from "../../components/EmptyState.js";
10
+ import { ErrorView as d, LoadingView as f } from "../../components/StateViews.js";
11
+ import { useContextNavigation as p } from "../../hooks/useContextNavigation.js";
11
12
  import "../../hooks/index.js";
12
- import { STYLE_CATEGORIES as p, categoryIcon as m } from "../../utils/icons.js";
13
- import { titleCase as h } from "../../utils/formatters.js";
14
- import { cn as g } from "../../utils/cn.js";
15
- import { useMemo as _, useState as v } from "react";
16
- import { Heart as y, Plus as b } from "lucide-react";
17
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
13
+ import { STYLE_CATEGORIES as m, categoryIcon as h } from "../../utils/icons.js";
14
+ import { titleCase as g } from "../../utils/formatters.js";
15
+ import { cn as _ } from "../../utils/cn.js";
16
+ import { useMemo as v, useState as y } from "react";
17
+ import { Heart as b, Plus as x } from "lucide-react";
18
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
18
19
  // src/coolandlovely/pages/wardrobe/WardrobeListPage.tsx
19
- var C = [
20
+ var w = [
20
21
  "OWNED",
21
22
  "WISHLIST",
22
23
  "PURCHASED_ON_PLATFORM",
23
24
  "GIFTED"
24
25
  ];
25
- function w(e) {
26
+ function T(e) {
26
27
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
27
28
  }
28
- function T() {
29
- let T = f(), E = a(), [D, O] = v("ALL"), [k, A] = v("ALL"), [j, M] = v("USD"), N = _(() => [{
29
+ function E() {
30
+ let E = p(), D = a(), [O, k] = y("ALL"), [A, j] = y("ALL"), [M, N] = y("USD"), P = v(() => [{
30
31
  value: "ALL",
31
- label: E("coolandlovely.filters.all", "All")
32
- }, ...C.map((e) => ({
32
+ label: D("coolandlovely.filters.all", "All")
33
+ }, ...w.map((e) => ({
33
34
  value: e,
34
- label: E(`coolandlovely.source.${e.toLowerCase()}`, w(e))
35
- }))], [E]), P = i({
36
- category: D === "ALL" ? void 0 : D,
37
- source: k === "ALL" ? void 0 : k
38
- }), F = n(), I = r(), L = _(() => P.data ?? [], [P.data]), R = _(() => [...new Set(L.map((e) => e.styleItemId).filter((e) => !!e))], [L]), z = e(R.slice(0, 100), j), B = _(() => new Map(z.data?.map((e) => [e.styleItemId, e])), [z.data]);
39
- return /* @__PURE__ */ S(s, {
40
- title: E("coolandlovely.page.wardrobeTitle", "My Wardrobe"),
41
- description: E("coolandlovely.page.wardrobeSubtitle", "A private catalogue of what you own — with a wear log"),
42
- actions: /* @__PURE__ */ S("button", {
35
+ label: D(`coolandlovely.source.${e.toLowerCase()}`, T(e))
36
+ }))], [D]), F = i({
37
+ category: O === "ALL" ? void 0 : O,
38
+ source: A === "ALL" ? void 0 : A
39
+ }), I = n(), L = r(), R = v(() => F.data ?? [], [F.data]), z = v(() => [...new Set(R.map((e) => e.styleItemId).filter((e) => !!e))], [R]), B = e(z.slice(0, 100), M), V = v(() => new Map(B.data?.map((e) => [e.styleItemId, e])), [B.data]);
40
+ return /* @__PURE__ */ C(s, {
41
+ title: D("coolandlovely.page.wardrobeTitle", "My Wardrobe"),
42
+ description: D("coolandlovely.page.wardrobeSubtitle", "A private catalogue of what you own — with a wear log"),
43
+ actions: /* @__PURE__ */ C("button", {
43
44
  type: "button",
44
- onClick: () => T("/wardrobe/new"),
45
+ onClick: () => E("/wardrobe/new"),
45
46
  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",
46
47
  children: [
47
- /* @__PURE__ */ x(b, { className: "h-4 w-4" }),
48
+ /* @__PURE__ */ S(x, { className: "h-4 w-4" }),
48
49
  " ",
49
- E("coolandlovely.actions.addPiece", "Add piece")
50
+ D("coolandlovely.actions.addPiece", "Add piece")
50
51
  ]
51
52
  }),
52
53
  children: [
53
- /* @__PURE__ */ x(o, {
54
- value: j,
55
- onChange: M
54
+ /* @__PURE__ */ S(c, {}),
55
+ /* @__PURE__ */ S(o, {
56
+ value: M,
57
+ onChange: N
56
58
  }),
57
- /* @__PURE__ */ S("p", {
59
+ /* @__PURE__ */ C("p", {
58
60
  className: "mb-3 text-xs text-text-secondary",
59
61
  children: [
60
62
  "Retailer quotes use ",
61
- j,
63
+ M,
62
64
  " without currency conversion.",
63
- R.length > 100 ? " Pricing covers the first 100 linked pieces on this page." : ""
65
+ z.length > 100 ? " Pricing covers the first 100 linked pieces on this page." : ""
64
66
  ]
65
67
  }),
66
- z.isError && /* @__PURE__ */ S("p", {
68
+ B.isError && /* @__PURE__ */ C("p", {
67
69
  role: "alert",
68
70
  className: "mb-3 text-sm text-status-error-text",
69
71
  children: [
70
72
  "Retailer prices could not be loaded.",
71
73
  " ",
72
- /* @__PURE__ */ x("button", {
74
+ /* @__PURE__ */ S("button", {
73
75
  type: "button",
74
76
  className: "underline",
75
- onClick: () => void z.refetch(),
77
+ onClick: () => void B.refetch(),
76
78
  children: "Retry prices"
77
79
  })
78
80
  ]
79
81
  }),
80
- /* @__PURE__ */ x("div", {
82
+ /* @__PURE__ */ S("div", {
81
83
  className: "mb-3 flex flex-wrap items-center gap-2",
82
- children: N.map((e) => /* @__PURE__ */ x("button", {
84
+ children: P.map((e) => /* @__PURE__ */ S("button", {
83
85
  type: "button",
84
- onClick: () => A(e.value),
85
- className: g("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", k === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
86
+ onClick: () => j(e.value),
87
+ className: _("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", A === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
86
88
  children: e.label
87
89
  }, e.value))
88
90
  }),
89
- /* @__PURE__ */ S("div", {
91
+ /* @__PURE__ */ C("div", {
90
92
  className: "mb-6 flex flex-wrap items-center gap-2",
91
- children: [/* @__PURE__ */ x("button", {
93
+ children: [/* @__PURE__ */ S("button", {
92
94
  type: "button",
93
- onClick: () => O("ALL"),
94
- className: g("rounded-full px-3 py-1.5 text-xs font-medium transition-colors", D === "ALL" ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
95
- children: E("coolandlovely.filters.allCategories", "All categories")
96
- }), p.map((e) => /* @__PURE__ */ S("button", {
95
+ onClick: () => k("ALL"),
96
+ className: _("rounded-full px-3 py-1.5 text-xs font-medium transition-colors", O === "ALL" ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
97
+ children: D("coolandlovely.filters.allCategories", "All categories")
98
+ }), m.map((e) => /* @__PURE__ */ C("button", {
97
99
  type: "button",
98
- onClick: () => O(e),
99
- className: g("inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium transition-colors", D === e ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
100
+ onClick: () => k(e),
101
+ className: _("inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium transition-colors", O === e ? "bg-accent-purple-subtle text-text-primary" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
100
102
  children: [
101
- m(e, 14),
103
+ h(e, 14),
102
104
  " ",
103
- E(`coolandlovely.category.${e.toLowerCase()}`, h(e))
105
+ D(`coolandlovely.category.${e.toLowerCase()}`, g(e))
104
106
  ]
105
107
  }, e))]
106
108
  }),
107
- P.isLoading ? /* @__PURE__ */ x(d, { label: E("coolandlovely.loading.wardrobe", "Loading your wardrobe…") }) : P.isError ? /* @__PURE__ */ x(u, { onRetry: () => void P.refetch() }) : L.length === 0 ? /* @__PURE__ */ x(l, {
109
+ F.isLoading ? /* @__PURE__ */ S(f, { label: D("coolandlovely.loading.wardrobe", "Loading your wardrobe…") }) : F.isError ? /* @__PURE__ */ S(d, { onRetry: () => void F.refetch() }) : R.length === 0 ? /* @__PURE__ */ S(u, {
108
110
  illustration: "empty-data",
109
- icon: /* @__PURE__ */ x(y, { className: "h-10 w-10" }),
110
- title: E("coolandlovely.empty.wardrobeTitle", "Your wardrobe is empty"),
111
- description: E("coolandlovely.empty.wardrobeDescription", "Add the pieces you already own (or want) to start your digital closet."),
112
- action: /* @__PURE__ */ S("button", {
111
+ icon: /* @__PURE__ */ S(b, { className: "h-10 w-10" }),
112
+ title: D("coolandlovely.empty.wardrobeTitle", "Your wardrobe is empty"),
113
+ description: D("coolandlovely.empty.wardrobeDescription", "Add the pieces you already own (or want) to start your digital closet."),
114
+ action: /* @__PURE__ */ C("button", {
113
115
  type: "button",
114
- onClick: () => T("/wardrobe/new"),
116
+ onClick: () => E("/wardrobe/new"),
115
117
  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",
116
118
  children: [
117
- /* @__PURE__ */ x(b, { className: "h-4 w-4" }),
119
+ /* @__PURE__ */ S(x, { className: "h-4 w-4" }),
118
120
  " ",
119
- E("coolandlovely.actions.addPiece", "Add piece")
121
+ D("coolandlovely.actions.addPiece", "Add piece")
120
122
  ]
121
123
  })
122
- }) : /* @__PURE__ */ x("div", {
124
+ }) : /* @__PURE__ */ S("div", {
123
125
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
124
- children: L.map((e) => /* @__PURE__ */ x(c, {
126
+ children: R.map((e) => /* @__PURE__ */ S(l, {
125
127
  item: e,
126
- retailerPrice: e.styleItemId ? /* @__PURE__ */ x(t, {
127
- summary: B.get(e.styleItemId),
128
- onOpen: () => T(`/items/${e.styleItemId}`)
128
+ retailerPrice: e.styleItemId ? /* @__PURE__ */ S(t, {
129
+ summary: V.get(e.styleItemId),
130
+ onOpen: () => E(`/items/${e.styleItemId}`)
129
131
  }) : void 0,
130
- onLogWear: () => F.mutate(e.id),
131
- onRemove: () => I.mutate(e.id),
132
- isLoggingWear: F.isPending && F.variables === e.id,
133
- isRemoving: I.isPending && I.variables === e.id
132
+ onLogWear: () => I.mutate(e.id),
133
+ onRemove: () => L.mutate(e.id),
134
+ isLoggingWear: I.isPending && I.variables === e.id,
135
+ isRemoving: L.isPending && L.variables === e.id
134
136
  }, e.id))
135
137
  })
136
138
  ]
137
139
  });
138
140
  }
139
- export { T as WardrobeListPage };
141
+ export { E as WardrobeListPage };
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CooCollaborationPayout } from './commerce';
3
+ export type * from './intelligence';
3
4
  /** Navigation item for shell integration */
4
5
  export interface NavItem {
5
6
  id: string;
@@ -0,0 +1,128 @@
1
+ import { CooCollaborationStatus, CooCollaboratorRole, CooLookOccasion, CooSeason, CooStyleCategory, CooStyleItem, CooWardrobeItem } from './index';
2
+ export type CooWeatherHint = 'HOT' | 'WARM' | 'MILD' | 'COLD' | 'RAINY';
3
+ export type CooOutfitSlot = 'DRESS' | 'TOP' | 'BOTTOM' | 'FOOTWEAR' | 'OUTERWEAR' | 'BAG' | 'ACCESSORY';
4
+ export type CooWardrobeFindingKind = 'OCCASION_GAP' | 'CATEGORY_GAP' | 'PALETTE_GAP' | 'DORMANT_PIECE' | 'NEVER_WORN' | 'COST_PER_WEAR_OUTLIER';
5
+ export type CooPublishBlockerCode = 'MISSING_PRIMARY_IMAGE' | 'NO_COLOURWAYS' | 'NO_MATERIALS' | 'NO_SKU' | 'NO_SIZES' | 'ZERO_PRICE' | 'PRICE_OUTLIER';
6
+ export interface CooDecisionProvenance {
7
+ decisionId: string;
8
+ decision: string;
9
+ engine: string;
10
+ modelBacked: boolean;
11
+ generatedAt: string;
12
+ candidateCount: number;
13
+ }
14
+ export interface CooDecisionReason {
15
+ code: string;
16
+ message: string;
17
+ evidenceIds: string[];
18
+ }
19
+ export interface CooOutfitPiece {
20
+ slot: CooOutfitSlot;
21
+ wardrobeItemId: string;
22
+ wardrobeItem: Pick<CooWardrobeItem, 'id' | 'name' | 'category' | 'colour' | 'brandName' | 'styleItemId' | 'image'>;
23
+ score: number;
24
+ reasons: CooDecisionReason[];
25
+ }
26
+ export interface CooOutfitGapPiece {
27
+ slot: CooOutfitSlot;
28
+ styleItemId: string;
29
+ styleItem: Pick<CooStyleItem, 'id' | 'name' | 'category' | 'price' | 'currency' | 'colours' | 'status' | 'image'>;
30
+ score: number;
31
+ reasons: CooDecisionReason[];
32
+ }
33
+ export interface CooOutfitSuggestion {
34
+ provenance: CooDecisionProvenance;
35
+ occasion: CooLookOccasion;
36
+ weatherHint: CooWeatherHint | null;
37
+ date: string | null;
38
+ draftTitle: string;
39
+ pieces: CooOutfitPiece[];
40
+ gapPieces: CooOutfitGapPiece[];
41
+ missingSlots: CooOutfitSlot[];
42
+ excludedForSizeIds: string[];
43
+ supportingLookIds: string[];
44
+ confidence: number;
45
+ summary: string;
46
+ }
47
+ export interface CooSuggestOutfitInput {
48
+ occasion: CooLookOccasion;
49
+ date?: string;
50
+ weatherHint?: CooWeatherHint;
51
+ includeCatalogGapPieces?: boolean;
52
+ }
53
+ export interface CooWardrobeFinding {
54
+ kind: CooWardrobeFindingKind;
55
+ severity: number;
56
+ title: string;
57
+ detail: string;
58
+ occasion: CooLookOccasion | null;
59
+ category: CooStyleCategory | null;
60
+ colour: string | null;
61
+ missingSlots: CooOutfitSlot[];
62
+ wardrobeItemIds: string[];
63
+ suggestedStyleItemIds: string[];
64
+ }
65
+ export interface CooWardrobeGapAnalysis {
66
+ provenance: CooDecisionProvenance;
67
+ wardrobeItemCount: number;
68
+ findings: CooWardrobeFinding[];
69
+ }
70
+ export interface CooPublishBlocker {
71
+ code: CooPublishBlockerCode;
72
+ message: string;
73
+ }
74
+ export interface CooCurationItem {
75
+ styleItemId: string;
76
+ styleItem: Pick<CooStyleItem, 'id' | 'name' | 'category' | 'status' | 'price' | 'currency' | 'colours' | 'image'>;
77
+ position: number | null;
78
+ coherence: number;
79
+ blockers: CooPublishBlocker[];
80
+ suggestedSeason: CooSeason | null;
81
+ reasons: CooDecisionReason[];
82
+ }
83
+ export interface CooCollectionCuration {
84
+ provenance: CooDecisionProvenance;
85
+ brandId: string;
86
+ season: CooSeason;
87
+ storyPalette: string[];
88
+ storyMaterials: string[];
89
+ proposed: CooCurationItem[];
90
+ outliers: CooCurationItem[];
91
+ blockedCount: number;
92
+ }
93
+ export interface CooCollaborationDraft {
94
+ title: string;
95
+ brief: string;
96
+ status: CooCollaborationStatus;
97
+ role: CooCollaboratorRole;
98
+ brandId: string;
99
+ creatorId: string;
100
+ }
101
+ export interface CooCreatorMatch {
102
+ creatorId: string;
103
+ fitScore: number;
104
+ sharedColours: string[];
105
+ sharedMaterials: string[];
106
+ sharedCategories: CooStyleCategory[];
107
+ evidenceLookIds: string[];
108
+ featuredBrandItemIds: string[];
109
+ reasons: CooDecisionReason[];
110
+ draft: CooCollaborationDraft;
111
+ }
112
+ export interface CooCollaborationMatchResult {
113
+ provenance: CooDecisionProvenance;
114
+ brandId: string;
115
+ brandStyleItemIds: string[];
116
+ matches: CooCreatorMatch[];
117
+ excludedCreatorIds: string[];
118
+ }
119
+ export interface CooAiCreditStatus {
120
+ productKey: string;
121
+ quotaName: string;
122
+ provisioned: boolean;
123
+ noLimit: boolean;
124
+ used: number;
125
+ limit: number | null;
126
+ remaining: number | null;
127
+ exhausted: boolean;
128
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-coolandlovely",
3
- "version": "2026.1123.2",
3
+ "version": "2026.1124.1",
4
4
  "description": "Burdenoff CoolAndLovely Microfrontend",
5
5
  "type": "module",
6
6
  "files": [