@burdenoff/microfe-coolandlovely 2026.1123.2 → 2026.1124.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.
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +29 -25
- package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.d.ts +6 -0
- package/dist/coolandlovely/components/intelligence/BrandCreatorMatchPanel.js +147 -0
- package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.d.ts +8 -0
- package/dist/coolandlovely/components/intelligence/CollectionCurationCallout.js +109 -0
- package/dist/coolandlovely/components/intelligence/ProvenanceChip.d.ts +8 -0
- package/dist/coolandlovely/components/intelligence/ProvenanceChip.js +36 -0
- package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.d.ts +2 -0
- package/dist/coolandlovely/components/intelligence/WardrobeIntelligenceStrip.js +123 -0
- package/dist/coolandlovely/hooks/index.d.ts +1 -0
- package/dist/coolandlovely/hooks/index.js +1 -0
- package/dist/coolandlovely/hooks/useStyleIntelligenceApi.d.ts +24 -0
- package/dist/coolandlovely/hooks/useStyleIntelligenceApi.js +266 -0
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +157 -155
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +110 -105
- package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.d.ts +15 -0
- package/dist/coolandlovely/pages/intelligence/StyleIntelligencePage.js +1007 -0
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +71 -69
- package/dist/coolandlovely/types/index.d.ts +1 -0
- package/dist/coolandlovely/types/intelligence.d.ts +128 -0
- 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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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
|
|
13
|
-
import { titleCase as
|
|
14
|
-
import { cn as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { Heart as
|
|
17
|
-
import { jsx as
|
|
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
|
|
20
|
+
var w = [
|
|
20
21
|
"OWNED",
|
|
21
22
|
"WISHLIST",
|
|
22
23
|
"PURCHASED_ON_PLATFORM",
|
|
23
24
|
"GIFTED"
|
|
24
25
|
];
|
|
25
|
-
function
|
|
26
|
+
function T(e) {
|
|
26
27
|
return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
let
|
|
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:
|
|
32
|
-
}, ...
|
|
32
|
+
label: D("coolandlovely.filters.all", "All")
|
|
33
|
+
}, ...w.map((e) => ({
|
|
33
34
|
value: e,
|
|
34
|
-
label:
|
|
35
|
-
}))], [
|
|
36
|
-
category:
|
|
37
|
-
source:
|
|
38
|
-
}),
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
title:
|
|
41
|
-
description:
|
|
42
|
-
actions: /* @__PURE__ */
|
|
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: () =>
|
|
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
|
|
48
|
+
/* @__PURE__ */ S(x, { className: "h-4 w-4" }),
|
|
48
49
|
" ",
|
|
49
|
-
|
|
50
|
+
D("coolandlovely.actions.addPiece", "Add piece")
|
|
50
51
|
]
|
|
51
52
|
}),
|
|
52
53
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
/* @__PURE__ */ S(c, {}),
|
|
55
|
+
/* @__PURE__ */ S(o, {
|
|
56
|
+
value: M,
|
|
57
|
+
onChange: N
|
|
56
58
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ C("p", {
|
|
58
60
|
className: "mb-3 text-xs text-text-secondary",
|
|
59
61
|
children: [
|
|
60
62
|
"Retailer quotes use ",
|
|
61
|
-
|
|
63
|
+
M,
|
|
62
64
|
" without currency conversion.",
|
|
63
|
-
|
|
65
|
+
z.length > 100 ? " Pricing covers the first 100 linked pieces on this page." : ""
|
|
64
66
|
]
|
|
65
67
|
}),
|
|
66
|
-
|
|
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__ */
|
|
74
|
+
/* @__PURE__ */ S("button", {
|
|
73
75
|
type: "button",
|
|
74
76
|
className: "underline",
|
|
75
|
-
onClick: () => void
|
|
77
|
+
onClick: () => void B.refetch(),
|
|
76
78
|
children: "Retry prices"
|
|
77
79
|
})
|
|
78
80
|
]
|
|
79
81
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ S("div", {
|
|
81
83
|
className: "mb-3 flex flex-wrap items-center gap-2",
|
|
82
|
-
children:
|
|
84
|
+
children: P.map((e) => /* @__PURE__ */ S("button", {
|
|
83
85
|
type: "button",
|
|
84
|
-
onClick: () =>
|
|
85
|
-
className:
|
|
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__ */
|
|
91
|
+
/* @__PURE__ */ C("div", {
|
|
90
92
|
className: "mb-6 flex flex-wrap items-center gap-2",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ S("button", {
|
|
92
94
|
type: "button",
|
|
93
|
-
onClick: () =>
|
|
94
|
-
className:
|
|
95
|
-
children:
|
|
96
|
-
}),
|
|
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: () =>
|
|
99
|
-
className:
|
|
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
|
-
|
|
103
|
+
h(e, 14),
|
|
102
104
|
" ",
|
|
103
|
-
|
|
105
|
+
D(`coolandlovely.category.${e.toLowerCase()}`, g(e))
|
|
104
106
|
]
|
|
105
107
|
}, e))]
|
|
106
108
|
}),
|
|
107
|
-
|
|
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__ */
|
|
110
|
-
title:
|
|
111
|
-
description:
|
|
112
|
-
action: /* @__PURE__ */
|
|
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: () =>
|
|
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
|
|
119
|
+
/* @__PURE__ */ S(x, { className: "h-4 w-4" }),
|
|
118
120
|
" ",
|
|
119
|
-
|
|
121
|
+
D("coolandlovely.actions.addPiece", "Add piece")
|
|
120
122
|
]
|
|
121
123
|
})
|
|
122
|
-
}) : /* @__PURE__ */
|
|
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:
|
|
126
|
+
children: R.map((e) => /* @__PURE__ */ S(l, {
|
|
125
127
|
item: e,
|
|
126
|
-
retailerPrice: e.styleItemId ? /* @__PURE__ */
|
|
127
|
-
summary:
|
|
128
|
-
onOpen: () =>
|
|
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: () =>
|
|
131
|
-
onRemove: () =>
|
|
132
|
-
isLoggingWear:
|
|
133
|
-
isRemoving:
|
|
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 {
|
|
141
|
+
export { E as WardrobeListPage };
|
|
@@ -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
|
+
}
|