@burdenoff/microfe-coolandlovely 2026.716.1 → 2026.720.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.
- package/dist/coolandlovely/components/LookCard.d.ts +3 -1
- package/dist/coolandlovely/components/LookCard.d.ts.map +1 -1
- package/dist/coolandlovely/components/LookCard.js +80 -44
- package/dist/coolandlovely/components/LookCard.js.map +1 -1
- package/dist/coolandlovely/hooks/index.d.ts +1 -1
- package/dist/coolandlovely/hooks/index.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +3 -0
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +58 -22
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
- package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/HomePage.js +2 -0
- package/dist/coolandlovely/pages/HomePage.js.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +2 -0
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts +4 -2
- package/dist/coolandlovely/pages/looks/LookDetailPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +134 -128
- package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/looks/LooksListPage.js +2 -0
- package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +46 -23
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +70 -63
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
- package/dist/coolandlovely/types/index.d.ts +11 -0
- package/dist/coolandlovely/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,10 @@ interface LookCardProps {
|
|
|
7
7
|
occasion: string;
|
|
8
8
|
imageFileId?: string | null;
|
|
9
9
|
likeCount?: number;
|
|
10
|
+
isLikedByMe?: boolean;
|
|
11
|
+
isSavedByMe?: boolean;
|
|
10
12
|
onOpen: () => void;
|
|
11
|
-
/** Show the hover like/add-to-lookbook overlay cluster. */
|
|
13
|
+
/** Show the hover like/save/add-to-lookbook overlay cluster. */
|
|
12
14
|
showActions?: boolean;
|
|
13
15
|
className?: string;
|
|
14
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LookCard.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/LookCard.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"LookCard.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/components/LookCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAiHhC,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA2DtC,CAAC"}
|
|
@@ -1,77 +1,113 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { Thumbnail as t } from "./Thumbnail.js";
|
|
3
|
-
import { useLikeLook as n } from "../hooks/useCoolAndLovelyApi.js";
|
|
4
|
-
import { AddToLookbookButton as
|
|
5
|
-
import { titleCase as
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { Heart as
|
|
8
|
-
import { jsx as
|
|
3
|
+
import { useLikeLook as n, useSaveLook as r, useUnlikeLook as i, useUnsaveLook as a } from "../hooks/useCoolAndLovelyApi.js";
|
|
4
|
+
import { AddToLookbookButton as o } from "./AddToLookbookButton.js";
|
|
5
|
+
import { titleCase as s } from "../utils/formatters.js";
|
|
6
|
+
import { useEffect as c, useState as l } from "react";
|
|
7
|
+
import { Bookmark as u, Heart as d, Sparkles as f } from "lucide-react";
|
|
8
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
9
|
//#region src/coolandlovely/components/LookCard.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}, [
|
|
10
|
+
var h = ({ lookId: t, likeCount: r, isLikedByMe: a }) => {
|
|
11
|
+
let o = n(), s = i(), [u, f] = l(!!a), [h, g] = l(r), _ = o.isPending || s.isPending;
|
|
12
|
+
return c(() => {
|
|
13
|
+
_ || (f(!!a), g(r));
|
|
14
|
+
}, [
|
|
15
|
+
r,
|
|
16
|
+
a,
|
|
17
|
+
_
|
|
18
|
+
]), /* @__PURE__ */ m("button", {
|
|
15
19
|
type: "button",
|
|
16
20
|
onClick: () => {
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
if (_) return;
|
|
22
|
+
let e = !u;
|
|
23
|
+
f(e), g((t) => t + (e ? 1 : -1)), (e ? o : s).mutate(t, {
|
|
24
|
+
onSuccess: (e) => {
|
|
25
|
+
f(!!e.isLikedByMe), g(e.likeCount);
|
|
26
|
+
},
|
|
19
27
|
onError: () => {
|
|
20
|
-
|
|
28
|
+
f(!e), g(r);
|
|
21
29
|
}
|
|
22
|
-
})
|
|
30
|
+
});
|
|
23
31
|
},
|
|
24
|
-
disabled:
|
|
25
|
-
"aria-pressed":
|
|
26
|
-
"aria-label":
|
|
32
|
+
disabled: _,
|
|
33
|
+
"aria-pressed": u,
|
|
34
|
+
"aria-label": u ? "Unlike this look" : "Like this look",
|
|
27
35
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-surface/90 px-2 py-1 text-xs font-medium text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ p(d, { className: e("h-3.5 w-3.5", u ? "fill-current text-accent-primary" : "text-text-secondary") }), /* @__PURE__ */ p("span", {
|
|
29
37
|
className: "tabular-nums",
|
|
30
|
-
children:
|
|
38
|
+
children: h
|
|
31
39
|
})]
|
|
32
40
|
});
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
}, g = ({ lookId: t, isSavedByMe: n }) => {
|
|
42
|
+
let i = r(), o = a(), [s, d] = l(!!n), f = i.isPending || o.isPending;
|
|
43
|
+
return c(() => {
|
|
44
|
+
f || d(!!n);
|
|
45
|
+
}, [n, f]), /* @__PURE__ */ p("button", {
|
|
36
46
|
type: "button",
|
|
37
|
-
onClick:
|
|
38
|
-
|
|
47
|
+
onClick: () => {
|
|
48
|
+
if (f) return;
|
|
49
|
+
let e = !s;
|
|
50
|
+
d(e), (e ? i : o).mutate(t, {
|
|
51
|
+
onSuccess: (e) => d(!!e.isSavedByMe),
|
|
52
|
+
onError: () => d(!e)
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
disabled: f,
|
|
56
|
+
"aria-pressed": s,
|
|
57
|
+
"aria-label": s ? "Remove from saved" : "Save this look",
|
|
58
|
+
className: "inline-flex items-center justify-center rounded-full bg-bg-surface/90 p-1.5 text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
59
|
+
children: /* @__PURE__ */ p(u, { className: e("h-3.5 w-3.5", s ? "fill-current text-accent-primary" : "text-text-secondary") })
|
|
60
|
+
});
|
|
61
|
+
}, _ = ({ id: n, title: r, occasion: i, imageFileId: a, likeCount: c, isLikedByMe: l, isSavedByMe: u, onOpen: _, showActions: v = !1, className: y }) => /* @__PURE__ */ m("div", {
|
|
62
|
+
className: e("group relative overflow-hidden rounded-xl border border-border-seam bg-bg-surface transition-shadow hover:shadow-lg", y),
|
|
63
|
+
children: [/* @__PURE__ */ p("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: _,
|
|
66
|
+
"aria-label": `Open look ${r}`,
|
|
39
67
|
className: "block w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-focus-ring)]",
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
-
icon: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ p(t, {
|
|
69
|
+
icon: /* @__PURE__ */ p(f, { className: "h-8 w-8" }),
|
|
42
70
|
seed: n,
|
|
43
|
-
fileId:
|
|
44
|
-
alt:
|
|
71
|
+
fileId: a,
|
|
72
|
+
alt: r,
|
|
45
73
|
className: "aspect-[3/4] w-full rounded-none",
|
|
46
|
-
overlay: /* @__PURE__ */
|
|
74
|
+
overlay: /* @__PURE__ */ m("div", {
|
|
47
75
|
className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-1.5 bg-gradient-to-t from-bg-canvas/90 via-bg-canvas/45 to-transparent p-3 pt-10",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ p("p", {
|
|
49
77
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
50
|
-
children:
|
|
51
|
-
}), /* @__PURE__ */
|
|
78
|
+
children: r
|
|
79
|
+
}), /* @__PURE__ */ m("div", {
|
|
52
80
|
className: "flex items-center justify-between gap-2",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ p("span", {
|
|
54
82
|
className: "inline-flex items-center rounded-full bg-bg-surface/85 px-2 py-0.5 text-[11px] font-medium text-text-primary backdrop-blur",
|
|
55
|
-
children: i
|
|
56
|
-
}), !
|
|
83
|
+
children: s(i)
|
|
84
|
+
}), !v && typeof c == "number" && c > 0 ? /* @__PURE__ */ m("span", {
|
|
57
85
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ p(d, { className: "h-3.5 w-3.5 fill-current text-accent-primary" }), /* @__PURE__ */ p("span", {
|
|
59
87
|
className: "tabular-nums",
|
|
60
|
-
children:
|
|
88
|
+
children: c
|
|
61
89
|
})]
|
|
62
90
|
}) : null]
|
|
63
91
|
})]
|
|
64
92
|
})
|
|
65
93
|
})
|
|
66
|
-
}),
|
|
94
|
+
}), v ? /* @__PURE__ */ m("div", {
|
|
67
95
|
className: "absolute right-2 top-2 flex items-center gap-1.5 opacity-100 transition-opacity duration-200 sm:opacity-0 sm:focus-within:opacity-100 sm:group-hover:opacity-100",
|
|
68
|
-
children: [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ p(h, {
|
|
98
|
+
lookId: n,
|
|
99
|
+
likeCount: c ?? 0,
|
|
100
|
+
isLikedByMe: l
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ p(g, {
|
|
103
|
+
lookId: n,
|
|
104
|
+
isSavedByMe: u
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ p(o, { lookId: n })
|
|
107
|
+
]
|
|
72
108
|
}) : null]
|
|
73
109
|
});
|
|
74
110
|
//#endregion
|
|
75
|
-
export {
|
|
111
|
+
export { _ as LookCard };
|
|
76
112
|
|
|
77
113
|
//# sourceMappingURL=LookCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LookCard.js","names":[],"sources":["../../../src/coolandlovely/components/LookCard.tsx"],"sourcesContent":["/**\n * LookCard — an editorial, image-forward card for a look.\n * @module coolandlovely/components\n *\n * A portrait `Thumbnail` (the look photo) with a frosted bottom caption (title +\n * occasion pill) and, when `showActions`, a hover-revealed top-right cluster: a\n * Like heart (optimistic, via `useLikeLook`) + `AddToLookbookButton
|
|
1
|
+
{"version":3,"file":"LookCard.js","names":[],"sources":["../../../src/coolandlovely/components/LookCard.tsx"],"sourcesContent":["/**\n * LookCard — an editorial, image-forward card for a look.\n * @module coolandlovely/components\n *\n * A portrait `Thumbnail` (the look photo) with a frosted bottom caption (title +\n * occasion pill) and, when `showActions`, a hover-revealed top-right cluster: a\n * true toggle Like heart (optimistic, via `useLikeLook`/`useUnlikeLook`), a\n * Save bookmark (optimistic, via `useSaveLook`/`useUnsaveLook` — distinct from\n * both liking and clipping into a named lookbook) + `AddToLookbookButton`.\n * Reused by the home latest-looks, Discover, the looks list and the\n * collaboration attributed-looks grid. Token-only; reuses `Thumbnail`/\n * `FileImage` for imagery.\n */\n\nimport type { FC } from 'react';\nimport { useEffect, useState } from 'react';\nimport { Bookmark, Heart, Sparkles } from 'lucide-react';\nimport { Thumbnail } from './Thumbnail';\nimport { AddToLookbookButton } from './AddToLookbookButton';\nimport {\n useLikeLook,\n useSaveLook,\n useUnlikeLook,\n useUnsaveLook,\n} from '../hooks/useCoolAndLovelyApi';\nimport { titleCase } from '../utils/formatters';\nimport { cn } from '../utils/cn';\n\n/** Optimistic, true-toggle like heart (cooLikeLook / cooUnlikeLook). */\nconst LikeHeart: FC<{ lookId: string; likeCount: number; isLikedByMe?: boolean }> = ({\n lookId,\n likeCount,\n isLikedByMe,\n}) => {\n const like = useLikeLook();\n const unlike = useUnlikeLook();\n const [liked, setLiked] = useState(Boolean(isLikedByMe));\n const [count, setCount] = useState(likeCount);\n const pending = like.isPending || unlike.isPending;\n\n // Keep in sync with the server state as long as no toggle is in flight.\n useEffect(() => {\n if (!pending) {\n setLiked(Boolean(isLikedByMe));\n setCount(likeCount);\n }\n }, [likeCount, isLikedByMe, pending]);\n\n const handleClick = () => {\n if (pending) return;\n const next = !liked;\n setLiked(next);\n setCount((current) => current + (next ? 1 : -1));\n const mutation = next ? like : unlike;\n mutation.mutate(lookId, {\n onSuccess: (look) => {\n setLiked(Boolean(look.isLikedByMe));\n setCount(look.likeCount);\n },\n onError: () => {\n setLiked(!next);\n setCount(likeCount);\n },\n });\n };\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={pending}\n aria-pressed={liked}\n aria-label={liked ? 'Unlike this look' : 'Like this look'}\n className=\"inline-flex items-center gap-1 rounded-full bg-bg-surface/90 px-2 py-1 text-xs font-medium text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <Heart\n className={cn(\n 'h-3.5 w-3.5',\n liked ? 'fill-current text-accent-primary' : 'text-text-secondary'\n )}\n />\n <span className=\"tabular-nums\">{count}</span>\n </button>\n );\n};\n\n/** Optimistic, true-toggle save/bookmark (cooSaveLook / cooUnsaveLook). */\nconst SaveButton: FC<{ lookId: string; isSavedByMe?: boolean }> = ({ lookId, isSavedByMe }) => {\n const save = useSaveLook();\n const unsave = useUnsaveLook();\n const [saved, setSaved] = useState(Boolean(isSavedByMe));\n const pending = save.isPending || unsave.isPending;\n\n useEffect(() => {\n if (!pending) setSaved(Boolean(isSavedByMe));\n }, [isSavedByMe, pending]);\n\n const handleClick = () => {\n if (pending) return;\n const next = !saved;\n setSaved(next);\n const mutation = next ? save : unsave;\n mutation.mutate(lookId, {\n onSuccess: (look) => setSaved(Boolean(look.isSavedByMe)),\n onError: () => setSaved(!next),\n });\n };\n\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n disabled={pending}\n aria-pressed={saved}\n aria-label={saved ? 'Remove from saved' : 'Save this look'}\n className=\"inline-flex items-center justify-center rounded-full bg-bg-surface/90 p-1.5 text-text-primary shadow-sm backdrop-blur transition-colors hover:bg-bg-surface disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <Bookmark\n className={cn(\n 'h-3.5 w-3.5',\n saved ? 'fill-current text-accent-primary' : 'text-text-secondary'\n )}\n />\n </button>\n );\n};\n\ninterface LookCardProps {\n id: string;\n title: string;\n /** Occasion label/value (rendered as a pill; enum values are title-cased). */\n occasion: string;\n imageFileId?: string | null;\n likeCount?: number;\n isLikedByMe?: boolean;\n isSavedByMe?: boolean;\n onOpen: () => void;\n /** Show the hover like/save/add-to-lookbook overlay cluster. */\n showActions?: boolean;\n className?: string;\n}\n\nexport const LookCard: FC<LookCardProps> = ({\n id,\n title,\n occasion,\n imageFileId,\n likeCount,\n isLikedByMe,\n isSavedByMe,\n onOpen,\n showActions = false,\n className,\n}) => {\n return (\n <div\n className={cn(\n 'group relative overflow-hidden rounded-xl border border-border-seam bg-bg-surface transition-shadow hover:shadow-lg',\n className\n )}\n >\n <button\n type=\"button\"\n onClick={onOpen}\n aria-label={`Open look ${title}`}\n className=\"block w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <Thumbnail\n icon={<Sparkles className=\"h-8 w-8\" />}\n seed={id}\n fileId={imageFileId}\n alt={title}\n className=\"aspect-[3/4] w-full rounded-none\"\n overlay={\n <div className=\"pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-1.5 bg-gradient-to-t from-bg-canvas/90 via-bg-canvas/45 to-transparent p-3 pt-10\">\n <p className=\"truncate text-sm font-semibold text-text-primary\">{title}</p>\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"inline-flex items-center rounded-full bg-bg-surface/85 px-2 py-0.5 text-[11px] font-medium text-text-primary backdrop-blur\">\n {titleCase(occasion)}\n </span>\n {!showActions && typeof likeCount === 'number' && likeCount > 0 ? (\n <span className=\"inline-flex items-center gap-1 text-xs text-text-secondary\">\n <Heart className=\"h-3.5 w-3.5 fill-current text-accent-primary\" />\n <span className=\"tabular-nums\">{likeCount}</span>\n </span>\n ) : null}\n </div>\n </div>\n }\n />\n </button>\n\n {showActions ? (\n <div className=\"absolute right-2 top-2 flex items-center gap-1.5 opacity-100 transition-opacity duration-200 sm:opacity-0 sm:focus-within:opacity-100 sm:group-hover:opacity-100\">\n <LikeHeart lookId={id} likeCount={likeCount ?? 0} isLikedByMe={isLikedByMe} />\n <SaveButton lookId={id} isSavedByMe={isSavedByMe} />\n <AddToLookbookButton lookId={id} />\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AA6BA,IAAM,KAA+E,EACnF,WACA,cACA,qBACI;CACJ,IAAM,IAAO,GAAa,EACpB,IAAS,GAAe,EACxB,CAAC,GAAO,KAAY,EAAS,EAAQ,EAAa,EAClD,CAAC,GAAO,KAAY,EAAS,EAAU,EACvC,IAAU,EAAK,aAAa,EAAO;AA4BzC,QAzBA,QAAgB;AACd,EAAK,MACH,EAAS,EAAQ,EAAa,EAC9B,EAAS,EAAU;IAEpB;EAAC;EAAW;EAAa;EAAQ,CAAC,EAqBnC,kBAAC,UAAD;EACE,MAAK;EACL,eArBsB;AACxB,OAAI,EAAS;GACb,IAAM,IAAO,CAAC;AAId,GAHA,EAAS,EAAK,EACd,GAAU,MAAY,KAAW,IAAO,IAAI,IAAI,GAC/B,IAAO,IAAO,GACtB,OAAO,GAAQ;IACtB,YAAY,MAAS;AAEnB,KADA,EAAS,EAAQ,EAAK,YAAa,EACnC,EAAS,EAAK,UAAU;;IAE1B,eAAe;AAEb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ACE,kBAAC,KAAD;KAAG,WAAU;eAAoD;KAAU,CAAA,EAC3E,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAU,EAAS;MACf,CAAA,EACN,CAAC,KAAe,OAAO,KAAc,YAAY,IAAY,IAC5D,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD,EAAO,WAAU,gDAAiD,CAAA,EAClE,kBAAC,QAAD;OAAM,WAAU;iBAAgB;OAAiB,CAAA,CAC5C;UACL,KACA;OACF;;GAER,CAAA;EACK,CAAA,EAER,IACC,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAW,QAAQ;IAAI,WAAW,KAAa;IAAgB;IAAe,CAAA;GAC9E,kBAAC,GAAD;IAAY,QAAQ;IAAiB;IAAe,CAAA;GACpD,kBAAC,GAAD,EAAqB,QAAQ,GAAM,CAAA;GAC/B;MACJ,KACA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Hooks Index
|
|
3
3
|
* @module coolandlovely/hooks
|
|
4
4
|
*/
|
|
5
|
-
export { useBrands, useBrand, useCreateBrand, useUpdateBrand, useTransitionBrand, useArchiveBrand, useCollections, useCollection, useCreateCollection, useUpdateCollection, usePublishCollection, useStyleItems, useStyleItem, useCreateStyleItem, useUpdateStyleItem, useArchiveStyleItem, useLooks, useLooksWithItems, useLook, useCreateLook, useUpdateLook, usePublishLook, useLikeLook, useDeleteLook, useCollaborations, useCollaboration, useCreateCollaboration, useTransitionCollaboration, useWardrobeItems, useCreateWardrobeItem, useUpdateWardrobeItem, useLogWardrobeWear, useRemoveWardrobeItem, useMyStyleProfile, useUpsertStyleProfile, useLookbooks, useLookbook, useCreateLookbook, useAddLookbookEntry, useRemoveLookbookEntry, useIsFollowing, useFollow, useUnfollow, useMyFollowing, useMyFollowers, } from './useCoolAndLovelyApi';
|
|
5
|
+
export { useBrands, useBrand, useCreateBrand, useUpdateBrand, useTransitionBrand, useArchiveBrand, useCollections, useCollection, useCreateCollection, useUpdateCollection, usePublishCollection, useStyleItems, useStyleItem, useCreateStyleItem, useUpdateStyleItem, useArchiveStyleItem, useLooks, useLooksWithItems, useLook, useCreateLook, useUpdateLook, usePublishLook, useLikeLook, useUnlikeLook, useSaveLook, useUnsaveLook, useDeleteLook, useCollaborations, useCollaboration, useCreateCollaboration, useTransitionCollaboration, useWardrobeItems, useCreateWardrobeItem, useUpdateWardrobeItem, useLogWardrobeWear, useRemoveWardrobeItem, useMyStyleProfile, useUpsertStyleProfile, useLookbooks, useLookbook, useCreateLookbook, useAddLookbookEntry, useRemoveLookbookEntry, useIsFollowing, useFollow, useUnfollow, useMyFollowing, useMyFollowers, } from './useCoolAndLovelyApi';
|
|
6
6
|
export type { ListBrandsArgs, ListCollectionsArgs, ListStyleItemsArgs, ListLooksArgs, ListCollaborationsArgs, ListWardrobeArgs, } from './useCoolAndLovelyApi';
|
|
7
7
|
export { uploadImageToFiles, useFileUrl, COO_FILE_FOLDERS } from './useFiles';
|
|
8
8
|
export type { UploadedImage, CooFileFolder } from './useFiles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EAEpB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EAEb,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAE1B,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,iBAAiB,EACjB,qBAAqB,EAErB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EAEtB,cAAc,EACd,SAAS,EACT,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,SAAS,EACT,QAAQ,EACR,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EAEpB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EAEb,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAE1B,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EAErB,iBAAiB,EACjB,qBAAqB,EAErB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EAEtB,cAAc,EACd,SAAS,EACT,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -60,6 +60,9 @@ export declare const useUpdateLook: () => import('@tanstack/react-query').UseMut
|
|
|
60
60
|
}, unknown>;
|
|
61
61
|
export declare const usePublishLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, string, unknown>;
|
|
62
62
|
export declare const useLikeLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, string, unknown>;
|
|
63
|
+
export declare const useUnlikeLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, string, unknown>;
|
|
64
|
+
export declare const useSaveLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, string, unknown>;
|
|
65
|
+
export declare const useUnsaveLook: () => import('@tanstack/react-query').UseMutationResult<CooLook, Error, string, unknown>;
|
|
63
66
|
export declare const useDeleteLook: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
64
67
|
export interface ListCollaborationsArgs {
|
|
65
68
|
brandId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCoolAndLovelyApi.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/useCoolAndLovelyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,eAAe,EAChB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useCoolAndLovelyApi.d.ts","sourceRoot":"","sources":["../../../src/coolandlovely/hooks/useCoolAndLovelyApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,eAAe,EAChB,MAAM,UAAU,CAAC;AAmGlB,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe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AAM,gBAAgB,GAAI,OAAM,gBAAqB,sFAe3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,sHAkBjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;QAIU,MAAM;WAAS,0BAA0B;WAcpF,CAAC;AAEF,eAAO,MAAM,kBAAkB,kGAkB9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,0FAgBjC,CAAC;AAMF,eAAO,MAAM,iBAAiB,8FAa7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,sHAkBjC,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,kFAkB5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,8GAkB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;QAKgC,MAAM;gBAAc,MAAM;4CAiBzF,CAAC;AAEF,eAAO,MAAM,sBAAsB,0FAiBlC,CAAC;AAYF,yDAAyD;AACzD,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,GAAG,SAAS,mEAc5D,CAAC;AAEF,eAAO,MAAM,SAAS,0FAmBrB,CAAC;AAEF,eAAO,MAAM,WAAW,0FAmBvB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,yFAa1B,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,cAAc,yFAa1B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,MAAM,GAAG,SAAS,uFAmBjD,CAAC"}
|
|
@@ -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 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
|
|
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 isLikedByMe isSavedByMe\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 purchasePrice currency costPerWear timesWorn lastWornAt tags\n 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: [
|
|
@@ -374,6 +374,42 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
}, R = () => {
|
|
377
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
378
|
+
return t({
|
|
379
|
+
mutationFn: async (e) => (await s(`mutation CooUnlikeLook($id: ID!) { cooUnlikeLook(id: $id) { ${d} } }`, { id: e }, i)).cooUnlikeLook,
|
|
380
|
+
onSuccess: (e) => {
|
|
381
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
382
|
+
o,
|
|
383
|
+
"look",
|
|
384
|
+
e.id
|
|
385
|
+
] });
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}, z = () => {
|
|
389
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
390
|
+
return t({
|
|
391
|
+
mutationFn: async (e) => (await s(`mutation CooSaveLook($id: ID!) { cooSaveLook(id: $id) { ${d} } }`, { id: e }, i)).cooSaveLook,
|
|
392
|
+
onSuccess: (e) => {
|
|
393
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
394
|
+
o,
|
|
395
|
+
"look",
|
|
396
|
+
e.id
|
|
397
|
+
] });
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
}, B = () => {
|
|
401
|
+
let n = r(), { apiGatewayUrl: i } = e();
|
|
402
|
+
return t({
|
|
403
|
+
mutationFn: async (e) => (await s(`mutation CooUnsaveLook($id: ID!) { cooUnsaveLook(id: $id) { ${d} } }`, { id: e }, i)).cooUnsaveLook,
|
|
404
|
+
onSuccess: (e) => {
|
|
405
|
+
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] }), n.invalidateQueries({ queryKey: [
|
|
406
|
+
o,
|
|
407
|
+
"look",
|
|
408
|
+
e.id
|
|
409
|
+
] });
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
}, V = () => {
|
|
377
413
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
378
414
|
return t({
|
|
379
415
|
mutationFn: async (e) => (await s("mutation CooDeleteLook($id: ID!) { cooDeleteLook(id: $id) }", { id: e }, i)).cooDeleteLook,
|
|
@@ -381,7 +417,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
381
417
|
n.invalidateQueries({ queryKey: [o, "looks"] }), n.invalidateQueries({ queryKey: [o, "looks-with-items"] });
|
|
382
418
|
}
|
|
383
419
|
});
|
|
384
|
-
},
|
|
420
|
+
}, H = (t = {}) => {
|
|
385
421
|
let { apiGatewayUrl: r } = e();
|
|
386
422
|
return n({
|
|
387
423
|
queryKey: [
|
|
@@ -400,7 +436,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
400
436
|
status: t.status
|
|
401
437
|
}, r)).cooListCollaborations
|
|
402
438
|
});
|
|
403
|
-
},
|
|
439
|
+
}, U = (t) => {
|
|
404
440
|
let { apiGatewayUrl: r } = e();
|
|
405
441
|
return n({
|
|
406
442
|
queryKey: [
|
|
@@ -417,7 +453,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
417
453
|
}`, { id: t }, r)).cooCollaboration,
|
|
418
454
|
enabled: !!t
|
|
419
455
|
});
|
|
420
|
-
},
|
|
456
|
+
}, W = () => {
|
|
421
457
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
422
458
|
return t({
|
|
423
459
|
mutationFn: async (e) => (await s(`mutation CooCreateCollaboration($input: CooCreateCollaborationInput!) {
|
|
@@ -427,7 +463,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
427
463
|
n.invalidateQueries({ queryKey: [o, "collaborations"] });
|
|
428
464
|
}
|
|
429
465
|
});
|
|
430
|
-
},
|
|
466
|
+
}, G = () => {
|
|
431
467
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
432
468
|
return t({
|
|
433
469
|
mutationFn: async ({ id: e, status: t }) => (await s(`mutation CooTransitionCollaboration($id: ID!, $status: CooCollaborationStatus!) {
|
|
@@ -444,7 +480,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
444
480
|
] });
|
|
445
481
|
}
|
|
446
482
|
});
|
|
447
|
-
},
|
|
483
|
+
}, K = (t = {}) => {
|
|
448
484
|
let { apiGatewayUrl: r } = e();
|
|
449
485
|
return n({
|
|
450
486
|
queryKey: [
|
|
@@ -459,7 +495,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
459
495
|
source: t.source
|
|
460
496
|
}, r)).cooListWardrobeItems
|
|
461
497
|
});
|
|
462
|
-
},
|
|
498
|
+
}, q = () => {
|
|
463
499
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
464
500
|
return t({
|
|
465
501
|
mutationFn: async (e) => (await s(`mutation CooCreateWardrobeItem($input: CooCreateWardrobeItemInput!) {
|
|
@@ -469,7 +505,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
469
505
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
470
506
|
}
|
|
471
507
|
});
|
|
472
|
-
},
|
|
508
|
+
}, J = () => {
|
|
473
509
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
474
510
|
return t({
|
|
475
511
|
mutationFn: async (e) => (await s(`mutation CooLogWardrobeWear($id: ID!) {
|
|
@@ -479,7 +515,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
479
515
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
480
516
|
}
|
|
481
517
|
});
|
|
482
|
-
},
|
|
518
|
+
}, Y = () => {
|
|
483
519
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
484
520
|
return t({
|
|
485
521
|
mutationFn: async (e) => (await s("mutation CooRemoveWardrobeItem($id: ID!) { cooRemoveWardrobeItem(id: $id) }", { id: e }, i)).cooRemoveWardrobeItem,
|
|
@@ -487,13 +523,13 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
487
523
|
n.invalidateQueries({ queryKey: [o, "wardrobe"] });
|
|
488
524
|
}
|
|
489
525
|
});
|
|
490
|
-
},
|
|
526
|
+
}, X = () => {
|
|
491
527
|
let { apiGatewayUrl: t } = e();
|
|
492
528
|
return n({
|
|
493
529
|
queryKey: [o, "my-style-profile"],
|
|
494
530
|
queryFn: async () => (await s(`query CooMyStyleProfile { cooMyStyleProfile { ${h} } }`, {}, t)).cooMyStyleProfile
|
|
495
531
|
});
|
|
496
|
-
},
|
|
532
|
+
}, Z = () => {
|
|
497
533
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
498
534
|
return t({
|
|
499
535
|
mutationFn: async (e) => (await s(`mutation CooUpsertStyleProfile($input: CooUpsertStyleProfileInput!) {
|
|
@@ -503,7 +539,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
503
539
|
n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
504
540
|
}
|
|
505
541
|
});
|
|
506
|
-
},
|
|
542
|
+
}, Q = (t) => {
|
|
507
543
|
let { apiGatewayUrl: r } = e();
|
|
508
544
|
return n({
|
|
509
545
|
queryKey: [
|
|
@@ -518,7 +554,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
518
554
|
}
|
|
519
555
|
}`, { ownerId: t }, r)).cooListLookbooks
|
|
520
556
|
});
|
|
521
|
-
},
|
|
557
|
+
}, $ = () => {
|
|
522
558
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
523
559
|
return t({
|
|
524
560
|
mutationFn: async (e) => (await s(`mutation CooCreateLookbook($input: CooCreateLookbookInput!) {
|
|
@@ -528,7 +564,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
528
564
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] });
|
|
529
565
|
}
|
|
530
566
|
});
|
|
531
|
-
},
|
|
567
|
+
}, te = () => {
|
|
532
568
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
533
569
|
return t({
|
|
534
570
|
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,
|
|
@@ -540,7 +576,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
540
576
|
] });
|
|
541
577
|
}
|
|
542
578
|
});
|
|
543
|
-
},
|
|
579
|
+
}, ne = () => {
|
|
544
580
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
545
581
|
return t({
|
|
546
582
|
mutationFn: async (e) => (await s("mutation CooRemoveLookbookEntry($id: ID!) { cooRemoveLookbookEntry(id: $id) }", { id: e }, i)).cooRemoveLookbookEntry,
|
|
@@ -548,7 +584,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
548
584
|
n.invalidateQueries({ queryKey: [o, "lookbooks"] }), n.invalidateQueries({ queryKey: [o, "lookbook"] });
|
|
549
585
|
}
|
|
550
586
|
});
|
|
551
|
-
},
|
|
587
|
+
}, re = "\n id workspaceId ownerId displayName bio visibility\n stylePreferences palette favouriteBrands\n isFollowedByMe followerCount followingCount\n", ie = (t) => {
|
|
552
588
|
let { apiGatewayUrl: r } = e();
|
|
553
589
|
return n({
|
|
554
590
|
queryKey: [
|
|
@@ -559,7 +595,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
559
595
|
enabled: !!t,
|
|
560
596
|
queryFn: async () => (await s("query CooIsFollowing($followeeId: ID!) { cooIsFollowing(followeeId: $followeeId) }", { followeeId: t }, r)).cooIsFollowing
|
|
561
597
|
});
|
|
562
|
-
},
|
|
598
|
+
}, ae = () => {
|
|
563
599
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
564
600
|
return t({
|
|
565
601
|
mutationFn: async (e) => (await s("mutation CooFollow($followeeId: ID!) { cooFollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooFollow,
|
|
@@ -571,7 +607,7 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
571
607
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
572
608
|
}
|
|
573
609
|
});
|
|
574
|
-
},
|
|
610
|
+
}, oe = () => {
|
|
575
611
|
let n = r(), { apiGatewayUrl: i } = e();
|
|
576
612
|
return t({
|
|
577
613
|
mutationFn: async (e) => (await s("mutation CooUnfollow($followeeId: ID!) { cooUnfollow(followeeId: $followeeId) }", { followeeId: e }, i)).cooUnfollow,
|
|
@@ -583,13 +619,13 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
583
619
|
] }), n.invalidateQueries({ queryKey: [o, "my-following"] }), n.invalidateQueries({ queryKey: [o, "my-followers"] }), n.invalidateQueries({ queryKey: [o, "my-style-profile"] });
|
|
584
620
|
}
|
|
585
621
|
});
|
|
586
|
-
},
|
|
622
|
+
}, se = () => {
|
|
587
623
|
let { apiGatewayUrl: t } = e();
|
|
588
624
|
return n({
|
|
589
625
|
queryKey: [o, "my-following"],
|
|
590
|
-
queryFn: async () => (await s(`query CooMyFollowing { cooMyFollowing { ${
|
|
626
|
+
queryFn: async () => (await s(`query CooMyFollowing { cooMyFollowing { ${re} } }`, {}, t)).cooMyFollowing
|
|
591
627
|
});
|
|
592
|
-
},
|
|
628
|
+
}, ce = (t) => {
|
|
593
629
|
let { apiGatewayUrl: r } = e();
|
|
594
630
|
return n({
|
|
595
631
|
queryKey: [
|
|
@@ -607,6 +643,6 @@ var o = "coolandlovely", s = async (e, t, n) => {
|
|
|
607
643
|
});
|
|
608
644
|
};
|
|
609
645
|
//#endregion
|
|
610
|
-
export {
|
|
646
|
+
export { te as useAddLookbookEntry, j as useArchiveStyleItem, v as useBrand, _ as useBrands, U as useCollaboration, H as useCollaborations, C as useCollection, S as useCollections, y as useCreateBrand, W as useCreateCollaboration, w as useCreateCollection, F as useCreateLook, $ as useCreateLookbook, k as useCreateStyleItem, q as useCreateWardrobeItem, V as useDeleteLook, ae as useFollow, ie as useIsFollowing, L as useLikeLook, J as useLogWardrobeWear, N as useLook, ce as useLookbook, Q as useLookbooks, M as useLooks, P as useLooksWithItems, se as useMyFollowing, X as useMyStyleProfile, E as usePublishCollection, ee as usePublishLook, ne as useRemoveLookbookEntry, Y as useRemoveWardrobeItem, z as useSaveLook, O as useStyleItem, D as useStyleItems, x as useTransitionBrand, G as useTransitionCollaboration, oe as useUnfollow, R as useUnlikeLook, B as useUnsaveLook, b as useUpdateBrand, T as useUpdateCollection, I as useUpdateLook, A as useUpdateStyleItem, Z as useUpsertStyleProfile, K as useWardrobeItems };
|
|
611
647
|
|
|
612
648
|
//# sourceMappingURL=useCoolAndLovelyApi.js.map
|