@burdenoff/microfe-coolandlovely 2026.706.2 → 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.
- package/dist/coolandlovely/CoolAndLovelyRoot.js +62 -46
- package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
- package/dist/coolandlovely/components/AddToLookbookButton.js +22 -22
- package/dist/coolandlovely/components/AddToLookbookButton.js.map +1 -1
- package/dist/coolandlovely/components/BrandCover.js +39 -0
- package/dist/coolandlovely/components/BrandCover.js.map +1 -0
- package/dist/coolandlovely/components/BrandCreatorAvatars.js +57 -0
- package/dist/coolandlovely/components/BrandCreatorAvatars.js.map +1 -0
- package/dist/coolandlovely/components/ColourSwatchRow.js +86 -0
- package/dist/coolandlovely/components/ColourSwatchRow.js.map +1 -0
- package/dist/coolandlovely/components/Comments.js +4 -4
- package/dist/coolandlovely/components/Comments.js.map +1 -1
- package/dist/coolandlovely/components/FileImage.js.map +1 -1
- package/dist/coolandlovely/components/ImageUploadField.js +139 -57
- package/dist/coolandlovely/components/ImageUploadField.js.map +1 -1
- package/dist/coolandlovely/components/LookCard.js +77 -0
- package/dist/coolandlovely/components/LookCard.js.map +1 -0
- package/dist/coolandlovely/components/MetricsCard.js +1 -1
- package/dist/coolandlovely/components/MetricsCard.js.map +1 -1
- package/dist/coolandlovely/components/ShopItemCard.js +45 -0
- package/dist/coolandlovely/components/ShopItemCard.js.map +1 -0
- package/dist/coolandlovely/components/StepTracker.js +35 -0
- package/dist/coolandlovely/components/StepTracker.js.map +1 -0
- package/dist/coolandlovely/components/Thumbnail.js +15 -11
- package/dist/coolandlovely/components/Thumbnail.js.map +1 -1
- package/dist/coolandlovely/components/VisibilityChip.js +32 -0
- package/dist/coolandlovely/components/VisibilityChip.js.map +1 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +94 -69
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/hooks/useFiles.js +49 -32
- package/dist/coolandlovely/hooks/useFiles.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +112 -133
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +253 -242
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +116 -112
- package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +13 -13
- package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +117 -95
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +1 -1
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +50 -43
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +131 -108
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +1 -1
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +59 -56
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +1 -1
- package/dist/coolandlovely/pages/discover/DiscoverPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +175 -147
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +1 -1
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js +71 -62
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +149 -127
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +69 -53
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +135 -113
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookFormPage.js +122 -110
- package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.js +60 -97
- package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +372 -210
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
- package/dist/coolandlovely/pages/trends/TrendsPage.js +1 -1
- package/dist/coolandlovely/pages/trends/TrendsPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +130 -94
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +75 -76
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { titleCase as t } from "../utils/formatters.js";
|
|
3
|
+
import { Globe as n, Lock as r, Users as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/coolandlovely/components/VisibilityChip.tsx
|
|
6
|
+
var s = {
|
|
7
|
+
public: {
|
|
8
|
+
icon: n,
|
|
9
|
+
label: "Public"
|
|
10
|
+
},
|
|
11
|
+
followers: {
|
|
12
|
+
icon: i,
|
|
13
|
+
label: "Followers"
|
|
14
|
+
},
|
|
15
|
+
private: {
|
|
16
|
+
icon: r,
|
|
17
|
+
label: "Private"
|
|
18
|
+
}
|
|
19
|
+
}, c = ({ visibility: n, className: i }) => {
|
|
20
|
+
let c = s[n.trim().toLowerCase()], l = c?.icon ?? r, u = c?.label ?? t(n);
|
|
21
|
+
return /* @__PURE__ */ o("span", {
|
|
22
|
+
className: e("inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary", i),
|
|
23
|
+
children: [/* @__PURE__ */ a(l, {
|
|
24
|
+
className: "h-3.5 w-3.5",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}), u]
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { c as VisibilityChip };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=VisibilityChip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisibilityChip.js","names":[],"sources":["../../../src/coolandlovely/components/VisibilityChip.tsx"],"sourcesContent":["/**\n * VisibilityChip — a small icon + label chip for a look/lookbook/profile\n * visibility (PRIVATE / FOLLOWERS / PUBLIC).\n * @module coolandlovely/components\n *\n * Token-only. The lock/users/globe glyph makes the visibility scannable at a\n * glance on lookbook cards, the lookbook detail header and the style profile.\n */\n\nimport type { FC } from 'react';\nimport { Globe, Lock, Users } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { titleCase } from '../utils/formatters';\n\ninterface VisibilityChipProps {\n /** A `CooVisibility` value (PUBLIC / FOLLOWERS / PRIVATE) — case-insensitive. */\n visibility: string;\n className?: string;\n}\n\nconst CONFIG: Record<string, { icon: typeof Globe; label: string }> = {\n public: { icon: Globe, label: 'Public' },\n followers: { icon: Users, label: 'Followers' },\n private: { icon: Lock, label: 'Private' },\n};\n\nexport const VisibilityChip: FC<VisibilityChipProps> = ({ visibility, className }) => {\n const key = visibility.trim().toLowerCase();\n const config = CONFIG[key];\n const Icon = config?.icon ?? Lock;\n const label = config?.label ?? titleCase(visibility);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary',\n className\n )}\n >\n <Icon className=\"h-3.5 w-3.5\" aria-hidden=\"true\" />\n {label}\n </span>\n );\n};\n"],"mappings":";;;;;AAoBA,IAAM,IAAgE;CACpE,QAAQ;EAAE,MAAM;EAAO,OAAO;EAAU;CACxC,WAAW;EAAE,MAAM;EAAO,OAAO;EAAa;CAC9C,SAAS;EAAE,MAAM;EAAM,OAAO;EAAW;CAC1C,EAEY,KAA2C,EAAE,eAAY,mBAAgB;CAEpF,IAAM,IAAS,EADH,EAAW,MAAM,CAAC,aAAa,GAErC,IAAO,GAAQ,QAAQ,GACvB,IAAQ,GAAQ,SAAS,EAAU,EAAW;AAEpD,QACE,kBAAC,QAAD;EACE,WAAW,EACT,gHACA,EACD;YAJH,CAME,kBAAC,GAAD;GAAM,WAAU;GAAc,eAAY;GAAS,CAAA,EAClD,EACI"}
|
|
@@ -15,7 +15,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
15
15
|
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
16
16
|
if (!r.data) throw Error("GraphQL response did not include data");
|
|
17
17
|
return /^\s*mutation\b/.test(e) && a(), r.data;
|
|
18
|
-
}, c = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", l = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", u = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", d = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt\n", f = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n",
|
|
18
|
+
}, c = "\n id workspaceId name handle tagline bio aesthetics tags websiteUrl\n isFeatured status logo { id } cover { id } createdAt updatedAt\n", l = "\n id workspaceId brandId name description season status tags\n cover { id } publishAt endAt createdAt updatedAt\n", u = "\n id workspaceId brandId collectionId name description category status\n sku price currency colours sizes materials tags image { id }\n createdAt updatedAt\n", d = "\n id workspaceId authorId title caption occasion visibility isFeatured\n likeCount saveCount collaborationId image { id } tags publishedAt\n createdAt updatedAt\n", f = "\n id workspaceId lookId styleItemId position styling createdAt updatedAt\n styleItem { id name category price currency brand { id name handle } image { id } }\n", p = "\n id workspaceId brandId creatorId collectionId title brief role status\n compensation currency tags startDate endDate publishedAt createdAt updatedAt\n", m = "\n id workspaceId profileId name category source brandName colour size notes\n styleItemId timesWorn lastWornAt tags image { id } createdAt updatedAt\n", h = "\n id workspaceId ownerId displayName bio visibility stylePreferences\n palette favouriteBrands sizes createdAt updatedAt\n isFollowedByMe followerCount followingCount\n", g = "\n id workspaceId ownerId profileId name description visibility tags\n cover { id } createdAt updatedAt\n", _ = (t = {}) => {
|
|
19
19
|
let { apiGatewayUrl: r } = e();
|
|
20
20
|
return n({
|
|
21
21
|
queryKey: [
|
|
@@ -37,7 +37,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
37
37
|
}
|
|
38
38
|
}, r)).cooListBrands
|
|
39
39
|
});
|
|
40
|
-
},
|
|
40
|
+
}, v = (t) => {
|
|
41
41
|
let { apiGatewayUrl: r } = e();
|
|
42
42
|
return n({
|
|
43
43
|
queryKey: [
|
|
@@ -54,7 +54,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
54
54
|
}`, { id: t }, r)).cooBrand,
|
|
55
55
|
enabled: !!t
|
|
56
56
|
});
|
|
57
|
-
},
|
|
57
|
+
}, y = () => {
|
|
58
58
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
59
59
|
return t({
|
|
60
60
|
mutationFn: async (e) => (await s(`mutation CooCreateBrand($input: CooCreateBrandInput!) {
|
|
@@ -64,7 +64,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
64
64
|
n.invalidateQueries({ queryKey: [o, "brands"] });
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
},
|
|
67
|
+
}, b = () => {
|
|
68
68
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
69
69
|
return t({
|
|
70
70
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateBrand($id: ID!, $input: CooUpdateBrandInput!) {
|
|
@@ -81,7 +81,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
81
81
|
] });
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
},
|
|
84
|
+
}, x = () => {
|
|
85
85
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
86
86
|
return t({
|
|
87
87
|
mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionBrand($id: ID!, $status: CooBrandStatus!) {
|
|
@@ -98,7 +98,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
98
98
|
] });
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
|
-
},
|
|
101
|
+
}, S = (t = {}) => {
|
|
102
102
|
let { apiGatewayUrl: r } = e();
|
|
103
103
|
return n({
|
|
104
104
|
queryKey: [
|
|
@@ -116,7 +116,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
116
116
|
status: t.status
|
|
117
117
|
}, r)).cooListCollections
|
|
118
118
|
});
|
|
119
|
-
},
|
|
119
|
+
}, C = (t) => {
|
|
120
120
|
let { apiGatewayUrl: r } = e();
|
|
121
121
|
return n({
|
|
122
122
|
queryKey: [
|
|
@@ -133,7 +133,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
133
133
|
}`, { id: t }, r)).cooCollection,
|
|
134
134
|
enabled: !!t
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, w = () => {
|
|
137
137
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
138
138
|
return t({
|
|
139
139
|
mutationFn: async (e) => (await s(`mutation CooCreateCollection($input: CooCreateCollectionInput!) {
|
|
@@ -143,7 +143,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
143
143
|
n.invalidateQueries({ queryKey: [o, "collections"] });
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
|
-
},
|
|
146
|
+
}, T = () => {
|
|
147
147
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
148
148
|
return t({
|
|
149
149
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateCollection($id: ID!, $input: CooUpdateCollectionInput!) {
|
|
@@ -160,7 +160,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
160
160
|
] });
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
},
|
|
163
|
+
}, E = () => {
|
|
164
164
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
165
165
|
return t({
|
|
166
166
|
mutationFn: async (e) => (await s(`mutation CooPublishCollection($id: ID!) {
|
|
@@ -174,7 +174,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
174
174
|
] });
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
},
|
|
177
|
+
}, D = (t = {}) => {
|
|
178
178
|
let { apiGatewayUrl: r } = e();
|
|
179
179
|
return n({
|
|
180
180
|
queryKey: [
|
|
@@ -204,7 +204,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
204
204
|
}
|
|
205
205
|
}, r)).cooListStyleItems
|
|
206
206
|
});
|
|
207
|
-
},
|
|
207
|
+
}, O = (t) => {
|
|
208
208
|
let { apiGatewayUrl: r } = e();
|
|
209
209
|
return n({
|
|
210
210
|
queryKey: [
|
|
@@ -221,7 +221,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
221
221
|
}`, { id: t }, r)).cooStyleItem,
|
|
222
222
|
enabled: !!t
|
|
223
223
|
});
|
|
224
|
-
},
|
|
224
|
+
}, k = () => {
|
|
225
225
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
226
226
|
return t({
|
|
227
227
|
mutationFn: async (e) => (await s(`mutation CooCreateStyleItem($input: CooCreateStyleItemInput!) {
|
|
@@ -231,7 +231,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
231
231
|
n.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
|
-
},
|
|
234
|
+
}, A = () => {
|
|
235
235
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
236
236
|
return t({
|
|
237
237
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateStyleItem($id: ID!, $input: CooUpdateStyleItemInput!) {
|
|
@@ -248,7 +248,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
248
248
|
] });
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
|
-
},
|
|
251
|
+
}, j = () => {
|
|
252
252
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
253
253
|
return t({
|
|
254
254
|
mutationFn: async (e) => (await s("mutation CooArchiveStyleItem($id: ID!) { cooArchiveStyleItem(id: $id) }", { id: e }, i)).cooArchiveStyleItem,
|
|
@@ -256,7 +256,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
256
256
|
n.invalidateQueries({ queryKey: [o, "style-items"] });
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
|
-
},
|
|
259
|
+
}, M = (t = {}) => {
|
|
260
260
|
let { apiGatewayUrl: r } = e();
|
|
261
261
|
return n({
|
|
262
262
|
queryKey: [
|
|
@@ -281,7 +281,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
281
281
|
}
|
|
282
282
|
}, r)).cooListLooks
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, N = (t) => {
|
|
285
285
|
let { apiGatewayUrl: r } = e();
|
|
286
286
|
return n({
|
|
287
287
|
queryKey: [
|
|
@@ -292,25 +292,47 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
292
292
|
queryFn: async () => (await s(`query CooLook($id: ID!) {
|
|
293
293
|
cooLook(id: $id) {
|
|
294
294
|
${d}
|
|
295
|
-
items {
|
|
296
|
-
id lookId styleItemId position styling
|
|
297
|
-
styleItem { id name category price currency }
|
|
298
|
-
}
|
|
295
|
+
items { ${f} }
|
|
299
296
|
}
|
|
300
297
|
}`, { id: t }, r)).cooLook,
|
|
301
298
|
enabled: !!t
|
|
302
299
|
});
|
|
303
|
-
},
|
|
300
|
+
}, P = (t = {}) => {
|
|
301
|
+
let { apiGatewayUrl: r } = e();
|
|
302
|
+
return n({
|
|
303
|
+
queryKey: [
|
|
304
|
+
o,
|
|
305
|
+
"looks-with-items",
|
|
306
|
+
t
|
|
307
|
+
],
|
|
308
|
+
queryFn: async () => (await s(`query CooListLooksWithItems(
|
|
309
|
+
$authorId: ID, $occasion: CooLookOccasion, $featured: Boolean, $pagination: PaginationInput
|
|
310
|
+
) {
|
|
311
|
+
cooListLooks(authorId: $authorId, occasion: $occasion, featured: $featured, pagination: $pagination) {
|
|
312
|
+
items { ${d} items { ${f} } }
|
|
313
|
+
pageInfo { cursor hasMore }
|
|
314
|
+
}
|
|
315
|
+
}`, {
|
|
316
|
+
authorId: t.authorId,
|
|
317
|
+
occasion: t.occasion,
|
|
318
|
+
featured: t.featured,
|
|
319
|
+
pagination: t.pagination ?? {
|
|
320
|
+
limit: 50,
|
|
321
|
+
offset: 0
|
|
322
|
+
}
|
|
323
|
+
}, r)).cooListLooks
|
|
324
|
+
});
|
|
325
|
+
}, F = () => {
|
|
304
326
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
305
327
|
return t({
|
|
306
328
|
mutationFn: async (e) => (await s(`mutation CooCreateLook($input: CooCreateLookInput!) {
|
|
307
329
|
cooCreateLook(input: $input) { ${d} }
|
|
308
330
|
}`, { input: e }, i)).cooCreateLook,
|
|
309
331
|
onSuccess: () => {
|
|
310
|
-
n.invalidateQueries({ queryKey: [o, "looks"] });
|
|
332
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
311
333
|
}
|
|
312
334
|
});
|
|
313
|
-
},
|
|
335
|
+
}, I = () => {
|
|
314
336
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
315
337
|
return t({
|
|
316
338
|
mutationFn: async ({ id: e, input: t }) => (await s(`mutation CooUpdateLook($id: ID!, $input: CooUpdateLookInput!) {
|
|
@@ -320,46 +342,46 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
320
342
|
input: t
|
|
321
343
|
}, i)).cooUpdateLook,
|
|
322
344
|
onSuccess: (e) => {
|
|
323
|
-
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
|
|
345
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
324
346
|
o,
|
|
325
347
|
"look",
|
|
326
348
|
e.id
|
|
327
349
|
] });
|
|
328
350
|
}
|
|
329
351
|
});
|
|
330
|
-
},
|
|
352
|
+
}, ee = () => {
|
|
331
353
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
332
354
|
return t({
|
|
333
355
|
mutationFn: async (e) => (await s(`mutation CooPublishLook($id: ID!) { cooPublishLook(id: $id) { ${d} } }`, { id: e }, i)).cooPublishLook,
|
|
334
356
|
onSuccess: (e) => {
|
|
335
|
-
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
|
|
357
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
336
358
|
o,
|
|
337
359
|
"look",
|
|
338
360
|
e.id
|
|
339
361
|
] });
|
|
340
362
|
}
|
|
341
363
|
});
|
|
342
|
-
},
|
|
364
|
+
}, L = () => {
|
|
343
365
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
344
366
|
return t({
|
|
345
367
|
mutationFn: async (e) => (await s(`mutation CooLikeLook($id: ID!) { cooLikeLook(id: $id) { ${d} } }`, { id: e }, i)).cooLikeLook,
|
|
346
368
|
onSuccess: (e) => {
|
|
347
|
-
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [
|
|
369
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
348
370
|
o,
|
|
349
371
|
"look",
|
|
350
372
|
e.id
|
|
351
373
|
] });
|
|
352
374
|
}
|
|
353
375
|
});
|
|
354
|
-
},
|
|
376
|
+
}, R = () => {
|
|
355
377
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
356
378
|
return t({
|
|
357
379
|
mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
|
|
358
380
|
onSuccess: () => {
|
|
359
|
-
n.invalidateQueries({ queryKey: [o, "looks"] });
|
|
381
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
360
382
|
}
|
|
361
383
|
});
|
|
362
|
-
},
|
|
384
|
+
}, z = (t = {}) => {
|
|
363
385
|
let { apiGatewayUrl: r } = e();
|
|
364
386
|
return n({
|
|
365
387
|
queryKey: [
|
|
@@ -369,8 +391,8 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
369
391
|
],
|
|
370
392
|
queryFn: async () => (await s(`query CooListCollaborations($brandId: ID, $creatorId: ID, $status: CooCollaborationStatus) {
|
|
371
393
|
cooListCollaborations(brandId: $brandId, creatorId: $creatorId, status: $status) {
|
|
372
|
-
${
|
|
373
|
-
brand { id name handle }
|
|
394
|
+
${p}
|
|
395
|
+
brand { id name handle logo { id } }
|
|
374
396
|
}
|
|
375
397
|
}`, {
|
|
376
398
|
brandId: t.brandId,
|
|
@@ -378,7 +400,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
378
400
|
status: t.status
|
|
379
401
|
}, r)).cooListCollaborations
|
|
380
402
|
});
|
|
381
|
-
},
|
|
403
|
+
}, B = (t) => {
|
|
382
404
|
let { apiGatewayUrl: r } = e();
|
|
383
405
|
return n({
|
|
384
406
|
queryKey: [
|
|
@@ -388,28 +410,28 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
388
410
|
],
|
|
389
411
|
queryFn: async () => (await s(`query CooCollaboration($id: ID!) {
|
|
390
412
|
cooCollaboration(id: $id) {
|
|
391
|
-
${
|
|
392
|
-
brand { id name handle }
|
|
413
|
+
${p}
|
|
414
|
+
brand { id name handle logo { id } }
|
|
393
415
|
looks { ${d} }
|
|
394
416
|
}
|
|
395
417
|
}`, { id: t }, r)).cooCollaboration,
|
|
396
418
|
enabled: !!t
|
|
397
419
|
});
|
|
398
|
-
},
|
|
420
|
+
}, V = () => {
|
|
399
421
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
400
422
|
return t({
|
|
401
423
|
mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
402
|
-
cooCreateCollaboration(input: $input) { ${
|
|
424
|
+
cooCreateCollaboration(input: $input) { ${p} }
|
|
403
425
|
}`, { input: e }, i)).cooCreateCollaboration,
|
|
404
426
|
onSuccess: () => {
|
|
405
427
|
n.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
406
428
|
}
|
|
407
429
|
});
|
|
408
|
-
},
|
|
430
|
+
}, H = () => {
|
|
409
431
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
410
432
|
return t({
|
|
411
433
|
mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
|
|
412
|
-
cooTransitionCollaboration(id: $id, status: $status) { ${
|
|
434
|
+
cooTransitionCollaboration(id: $id, status: $status) { ${p} }
|
|
413
435
|
}`, {
|
|
414
436
|
id: e,
|
|
415
437
|
status: t
|
|
@@ -422,7 +444,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
422
444
|
] });
|
|
423
445
|
}
|
|
424
446
|
});
|
|
425
|
-
},
|
|
447
|
+
}, U = (t = {}) => {
|
|
426
448
|
let { apiGatewayUrl: r } = e();
|
|
427
449
|
return n({
|
|
428
450
|
queryKey: [
|
|
@@ -431,33 +453,33 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
431
453
|
t
|
|
432
454
|
],
|
|
433
455
|
queryFn: async () => (await s(`query CooListWardrobeItems($category: CooStyleCategory, $source: CooWardrobeSource) {
|
|
434
|
-
cooListWardrobeItems(category: $category, source: $source) { ${
|
|
456
|
+
cooListWardrobeItems(category: $category, source: $source) { ${m} }
|
|
435
457
|
}`, {
|
|
436
458
|
category: t.category,
|
|
437
459
|
source: t.source
|
|
438
460
|
}, r)).cooListWardrobeItems
|
|
439
461
|
});
|
|
440
|
-
},
|
|
462
|
+
}, W = () => {
|
|
441
463
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
442
464
|
return t({
|
|
443
465
|
mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
444
|
-
cooCreateWardrobeItem(input: $input) { ${
|
|
466
|
+
cooCreateWardrobeItem(input: $input) { ${m} }
|
|
445
467
|
}`, { input: e }, i)).cooCreateWardrobeItem,
|
|
446
468
|
onSuccess: () => {
|
|
447
469
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
448
470
|
}
|
|
449
471
|
});
|
|
450
|
-
},
|
|
472
|
+
}, G = () => {
|
|
451
473
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
452
474
|
return t({
|
|
453
475
|
mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
|
|
454
|
-
cooLogWardrobeWear(id: $id) { ${
|
|
476
|
+
cooLogWardrobeWear(id: $id) { ${m} }
|
|
455
477
|
}`, { id: e }, i)).cooLogWardrobeWear,
|
|
456
478
|
onSuccess: () => {
|
|
457
479
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
458
480
|
}
|
|
459
481
|
});
|
|
460
|
-
},
|
|
482
|
+
}, K = () => {
|
|
461
483
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
462
484
|
return t({
|
|
463
485
|
mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
|
|
@@ -465,23 +487,23 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
465
487
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
466
488
|
}
|
|
467
489
|
});
|
|
468
|
-
},
|
|
490
|
+
}, q = () => {
|
|
469
491
|
let { apiGatewayUrl: t } = e();
|
|
470
492
|
return n({
|
|
471
493
|
queryKey: [o, "my-style-profile"],
|
|
472
|
-
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${
|
|
494
|
+
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${h} } }`, {}, t)).cooMyStyleProfile
|
|
473
495
|
});
|
|
474
|
-
},
|
|
496
|
+
}, J = () => {
|
|
475
497
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
476
498
|
return t({
|
|
477
499
|
mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
478
|
-
cooUpsertStyleProfile(input: $input) { ${
|
|
500
|
+
cooUpsertStyleProfile(input: $input) { ${h} }
|
|
479
501
|
}`, { input: e }, i)).cooUpsertStyleProfile,
|
|
480
502
|
onSuccess: () => {
|
|
481
503
|
n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
482
504
|
}
|
|
483
505
|
});
|
|
484
|
-
},
|
|
506
|
+
}, Y = (t) => {
|
|
485
507
|
let { apiGatewayUrl: r } = e();
|
|
486
508
|
return n({
|
|
487
509
|
queryKey: [
|
|
@@ -490,40 +512,43 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
490
512
|
t
|
|
491
513
|
],
|
|
492
514
|
queryFn: async () => (await s(`query CooListLookbooks($ownerId: ID) {
|
|
493
|
-
cooListLookbooks(ownerId: $ownerId) {
|
|
515
|
+
cooListLookbooks(ownerId: $ownerId) {
|
|
516
|
+
${g}
|
|
517
|
+
entries { id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt }
|
|
518
|
+
}
|
|
494
519
|
}`, { ownerId: t }, r)).cooListLookbooks
|
|
495
520
|
});
|
|
496
|
-
},
|
|
521
|
+
}, X = () => {
|
|
497
522
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
498
523
|
return t({
|
|
499
524
|
mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
500
|
-
cooCreateLookbook(input: $input) { ${
|
|
525
|
+
cooCreateLookbook(input: $input) { ${g} }
|
|
501
526
|
}`, { input: e }, i)).cooCreateLookbook,
|
|
502
527
|
onSuccess: () => {
|
|
503
528
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] });
|
|
504
529
|
}
|
|
505
530
|
});
|
|
506
|
-
},
|
|
531
|
+
}, Z = () => {
|
|
507
532
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
508
533
|
return t({
|
|
509
534
|
mutationFn: async (e) => (await s("mutation CooAddLookbookEntry($input: CooAddLookbookEntryInput!) {\n cooAddLookbookEntry(input: $input) {\n id lookbookId lookId styleItemId note position createdAt updatedAt\n }\n }", { input: e }, i)).cooAddLookbookEntry,
|
|
510
535
|
onSuccess: (e) => {
|
|
511
|
-
n.invalidateQueries({ queryKey: [o, "lookbook"] }), n.invalidateQueries({ queryKey: [
|
|
536
|
+
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] }), n.invalidateQueries({ queryKey: [
|
|
512
537
|
o,
|
|
513
538
|
"lookbook",
|
|
514
539
|
e.lookbookId
|
|
515
540
|
] });
|
|
516
541
|
}
|
|
517
542
|
});
|
|
518
|
-
},
|
|
543
|
+
}, Q = () => {
|
|
519
544
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
520
545
|
return t({
|
|
521
546
|
mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
|
|
522
547
|
onSuccess: () => {
|
|
523
|
-
n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
548
|
+
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
524
549
|
}
|
|
525
550
|
});
|
|
526
|
-
},
|
|
551
|
+
}, $ = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", te = (t) => {
|
|
527
552
|
let { apiGatewayUrl: r } = e();
|
|
528
553
|
return n({
|
|
529
554
|
queryKey: [
|
|
@@ -534,7 +559,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
534
559
|
enabled: !!t,
|
|
535
560
|
queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
|
|
536
561
|
});
|
|
537
|
-
},
|
|
562
|
+
}, ne = () => {
|
|
538
563
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
539
564
|
return t({
|
|
540
565
|
mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
|
|
@@ -546,7 +571,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
546
571
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
547
572
|
}
|
|
548
573
|
});
|
|
549
|
-
},
|
|
574
|
+
}, re = () => {
|
|
550
575
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
551
576
|
return t({
|
|
552
577
|
mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
|
|
@@ -558,13 +583,13 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
558
583
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
559
584
|
}
|
|
560
585
|
});
|
|
561
|
-
},
|
|
586
|
+
}, ie = () => {
|
|
562
587
|
let { apiGatewayUrl: t } = e();
|
|
563
588
|
return n({
|
|
564
589
|
queryKey: [o, "my-following"],
|
|
565
|
-
queryFn: async () => (await s(`query CooMyFollowing { cooMyFollowing { ${
|
|
590
|
+
queryFn: async () => (await s(`query CooMyFollowing { cooMyFollowing { ${$} } }`, {}, t)).cooMyFollowing
|
|
566
591
|
});
|
|
567
|
-
},
|
|
592
|
+
}, ae = (t) => {
|
|
568
593
|
let { apiGatewayUrl: r } = e();
|
|
569
594
|
return n({
|
|
570
595
|
queryKey: [
|
|
@@ -574,14 +599,14 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
574
599
|
],
|
|
575
600
|
queryFn: async () => (await s(`query CooLookbook($id: ID!) {
|
|
576
601
|
cooLookbook(id: $id) {
|
|
577
|
-
${
|
|
578
|
-
entries { id lookbookId lookId styleItemId note position createdAt updatedAt }
|
|
602
|
+
${g}
|
|
603
|
+
entries { id workspaceId lookbookId lookId styleItemId note position createdAt updatedAt }
|
|
579
604
|
}
|
|
580
605
|
}`, { id: t }, r)).cooLookbook,
|
|
581
606
|
enabled: !!t
|
|
582
607
|
});
|
|
583
608
|
};
|
|
584
609
|
//#endregion
|
|
585
|
-
export {
|
|
610
|
+
export { Z as useAddLookbookEntry, j as useArchiveStyleItem, v as useBrand, _ as useBrands, B as useCollaboration, z as useCollaborations, C as useCollection, S as useCollections, y as useCreateBrand, V as useCreateCollaboration, w as useCreateCollection, F as useCreateLook, X as useCreateLookbook, k as useCreateStyleItem, W as useCreateWardrobeItem, R as useDeleteLook, ne as useFollow, te as useIsFollowing, L as useLikeLook, G as useLogWardrobeWear, N as useLook, ae as useLookbook, Y as useLookbooks, M as useLooks, P as useLooksWithItems, ie as useMyFollowing, q as useMyStyleProfile, E as usePublishCollection, ee as usePublishLook, Q as useRemoveLookbookEntry, K as useRemoveWardrobeItem, O as useStyleItem, D as useStyleItems, x as useTransitionBrand, H as useTransitionCollaboration, re as useUnfollow, b as useUpdateBrand, T as useUpdateCollection, I as useUpdateLook, A as useUpdateStyleItem, J as useUpsertStyleProfile, U as useWardrobeItems };
|
|
586
611
|
|
|
587
612
|
//# sourceMappingURL=useCoolAndLovelyApi.js.map
|