@burdenoff/microfe-coolandlovely 2026.1109.10 → 2026.1110.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/CoolAndLovelyRoot.js +1 -2
- package/dist/coolandlovely/CoolAndLovelyRoutes.js +1 -2
- package/dist/coolandlovely/api/creatorMarketplaceRequest.js +9 -10
- package/dist/coolandlovely/api/resaleTransport.js +1 -2
- package/dist/coolandlovely/components/ActivityTrail.js +11 -12
- package/dist/coolandlovely/components/ActorName.js +6 -7
- package/dist/coolandlovely/components/AddToCartPanel.js +10 -11
- package/dist/coolandlovely/components/AddToLookbookButton.js +5 -6
- package/dist/coolandlovely/components/BrandCard.js +9 -10
- package/dist/coolandlovely/components/BrandCover.js +6 -7
- package/dist/coolandlovely/components/BrandCreatorAvatars.js +18 -19
- package/dist/coolandlovely/components/CollaborationFeeCard.js +11 -12
- package/dist/coolandlovely/components/CollectionCard.js +7 -8
- package/dist/coolandlovely/components/ColourSwatchRow.js +1 -2
- package/dist/coolandlovely/components/Comments.js +12 -13
- package/dist/coolandlovely/components/EmptyState.js +1 -2
- package/dist/coolandlovely/components/FeedbackWidget.js +15 -16
- package/dist/coolandlovely/components/Field.js +1 -2
- package/dist/coolandlovely/components/FileImage.js +5 -6
- package/dist/coolandlovely/components/FollowButton.js +6 -7
- package/dist/coolandlovely/components/FulfilmentTimeline.js +28 -29
- package/dist/coolandlovely/components/ImageUploadField.js +9 -10
- package/dist/coolandlovely/components/LookCard.js +37 -38
- package/dist/coolandlovely/components/LookbookCard.js +9 -10
- package/dist/coolandlovely/components/MetricsCard.js +6 -7
- package/dist/coolandlovely/components/PageLayout.js +6 -5
- package/dist/coolandlovely/components/PayForOrder.js +3 -4
- package/dist/coolandlovely/components/RefundPanel.js +10 -11
- package/dist/coolandlovely/components/ResaleListingActions.js +1 -2
- package/dist/coolandlovely/components/ResaleListingEditor.js +1 -2
- package/dist/coolandlovely/components/ResalePhotoPicker.js +8 -9
- package/dist/coolandlovely/components/ResalePhotoUpload.js +16 -17
- package/dist/coolandlovely/components/ReturnRequests.js +35 -36
- package/dist/coolandlovely/components/ShopItemCard.js +7 -8
- package/dist/coolandlovely/components/StateViews.js +1 -2
- package/dist/coolandlovely/components/StatusBadge.js +1 -2
- package/dist/coolandlovely/components/StepTracker.js +1 -2
- package/dist/coolandlovely/components/StockEditor.js +1 -2
- package/dist/coolandlovely/components/StoreListingCard.js +7 -8
- package/dist/coolandlovely/components/TagList.js +1 -2
- package/dist/coolandlovely/components/Thumbnail.js +1 -2
- package/dist/coolandlovely/components/VisibilityChip.js +2 -3
- package/dist/coolandlovely/components/WardrobeItemCard.js +7 -8
- package/dist/coolandlovely/components/index.js +9 -10
- package/dist/coolandlovely/components/prices/BestPriceBadge.js +1 -2
- package/dist/coolandlovely/components/prices/LookbookPriceBoard.js +17 -18
- package/dist/coolandlovely/components/prices/PriceComparison.js +2 -3
- package/dist/coolandlovely/components/prices/PriceCurrencySelect.js +1 -2
- package/dist/coolandlovely/components/prices/PricePanel.js +1 -2
- package/dist/coolandlovely/components/prices/PriceWatchDisclosure.js +1 -2
- package/dist/coolandlovely/components/prices/PriceWatchForm.js +12 -13
- package/dist/coolandlovely/components/prices/PriceWatches.js +1 -2
- package/dist/coolandlovely/components/prices/RetailerOfferLink.js +1 -2
- package/dist/coolandlovely/components/prices/money.js +1 -2
- package/dist/coolandlovely/context/CoolAndLovelyContext.js +1 -2
- package/dist/coolandlovely/context/QueryScope.js +2 -3
- package/dist/coolandlovely/context/index.js +1 -2
- package/dist/coolandlovely/context/queryScopeKey.js +1 -2
- package/dist/coolandlovely/hooks/contextNavigationTarget.js +1 -2
- package/dist/coolandlovely/hooks/useActivity.js +1 -2
- package/dist/coolandlovely/hooks/useAssistantEntity.js +2 -3
- package/dist/coolandlovely/hooks/useBrandOrdersApi.js +62 -63
- package/dist/coolandlovely/hooks/useCatalogImport.js +5 -4
- package/dist/coolandlovely/hooks/useComments.js +1 -2
- package/dist/coolandlovely/hooks/useCommerceApi.js +5 -6
- package/dist/coolandlovely/hooks/useContextNavigation.js +1 -2
- package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +1 -2
- package/dist/coolandlovely/hooks/useCreatorAnalytics.d.ts +1 -2
- package/dist/coolandlovely/hooks/useCreatorAnalytics.js +4 -5
- package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts +28 -40
- package/dist/coolandlovely/hooks/useCreatorMarketplace.js +26 -27
- package/dist/coolandlovely/hooks/useEditorialApi.js +1 -2
- package/dist/coolandlovely/hooks/useFiles.js +2 -3
- package/dist/coolandlovely/hooks/useInventoryApi.js +1 -2
- package/dist/coolandlovely/hooks/usePriceApi.d.ts +8 -15
- package/dist/coolandlovely/hooks/usePriceApi.js +42 -43
- package/dist/coolandlovely/hooks/useResale.js +28 -29
- package/dist/coolandlovely/hooks/useTr.js +1 -2
- package/dist/coolandlovely/index.js +3 -3
- package/dist/coolandlovely/pages/HomePage.js +26 -27
- package/dist/coolandlovely/pages/admin/AdminBrandsPage.js +28 -29
- package/dist/coolandlovely/pages/admin/AdminCollaborationsPage.js +37 -38
- package/dist/coolandlovely/pages/admin/AdminFeaturedItemsPage.js +43 -44
- package/dist/coolandlovely/pages/brands/BrandDetailPage.js +45 -46
- package/dist/coolandlovely/pages/brands/BrandFormPage.js +26 -27
- package/dist/coolandlovely/pages/brands/BrandsListPage.js +16 -17
- package/dist/coolandlovely/pages/brands/ImportCatalogPage.js +25 -26
- package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +26 -27
- package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +44 -51
- package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +21 -22
- package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +28 -29
- package/dist/coolandlovely/pages/collections/CollectionFormPage.js +28 -29
- package/dist/coolandlovely/pages/collections/CollectionsListPage.js +12 -13
- package/dist/coolandlovely/pages/commerce/BrandOrdersPage.js +117 -118
- package/dist/coolandlovely/pages/commerce/CartPage.js +28 -29
- package/dist/coolandlovely/pages/commerce/CreatorAnalyticsSection.js +11 -12
- package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +43 -44
- package/dist/coolandlovely/pages/commerce/OrdersPage.js +84 -85
- package/dist/coolandlovely/pages/discover/DiscoverPage.js +196 -197
- package/dist/coolandlovely/pages/editorial/EditorialPage.js +2 -3
- package/dist/coolandlovely/pages/items/StoreListedPieceView.js +90 -91
- package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +26 -27
- package/dist/coolandlovely/pages/items/StyleItemFormPage.js +45 -46
- package/dist/coolandlovely/pages/items/StyleItemsListPage.js +26 -27
- package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +16 -17
- package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +24 -29
- package/dist/coolandlovely/pages/looks/LookDetailPage.js +50 -51
- package/dist/coolandlovely/pages/looks/LookFormPage.js +80 -81
- package/dist/coolandlovely/pages/looks/LooksListPage.js +18 -19
- package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js +139 -139
- package/dist/coolandlovely/pages/profile/StyleProfilePage.js +228 -229
- package/dist/coolandlovely/pages/resale/ResaleBrowsePage.js +17 -18
- package/dist/coolandlovely/pages/resale/ResaleListingPage.js +20 -27
- package/dist/coolandlovely/pages/resale/ResaleReportsPage.js +11 -12
- package/dist/coolandlovely/pages/resale/ResaleSellerPage.js +57 -64
- package/dist/coolandlovely/pages/trends/TrendsPage.js +52 -53
- package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +28 -29
- package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +31 -32
- package/dist/coolandlovely/store/coolandlovelyStore.d.ts +1 -1
- package/dist/coolandlovely/store/coolandlovelyStore.js +1 -2
- package/dist/coolandlovely/store/index.js +1 -2
- package/dist/coolandlovely/utils/cn.js +1 -2
- package/dist/coolandlovely/utils/formatters.js +1 -2
- package/dist/coolandlovely/utils/icons.js +1 -2
- package/dist/coolandlovely/utils/index.js +1 -2
- package/dist/coolandlovely/utils/navigation.js +1 -2
- package/dist/coolandlovely/utils/paymentProviders.js +1 -2
- package/dist/coolandlovely/utils/resaleCreateIntent.js +1 -2
- package/dist/coolandlovely/utils/resalePhotoUpload.js +2 -3
- package/dist/coolandlovely/utils/resalePhotoUploadIntent.js +3 -4
- package/dist/coolandlovely/utils/resalePresentation.js +1 -2
- package/dist/coolandlovely/utils/sparkline.js +0 -1
- package/dist/generated/global-operations.d.ts +4 -1
- package/dist/generated/global-types.d.ts +2 -21
- package/dist/generated/wspace-operations.d.ts +261 -297
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/generated/wspace-types.d.ts +4 -23
- package/dist/generated/wspace-types.js +1 -2
- package/dist/node_modules/clsx/dist/clsx.js +7 -6
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +4 -21
- package/dist/services/createSandboxAssistantTransport.js +1 -2
- package/dist/utils/pageContext.js +2 -3
- package/package.json +86 -55
|
@@ -10,7 +10,7 @@ import { BookHeart as c, Compass as l, Handshake as u, Heart as d, Home as f, Pa
|
|
|
10
10
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
11
11
|
import { FeatureFlagProvider as T } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
12
12
|
import { useFeatureFlag as E } from "@burdenoff/fe-libs/shared/feature-flags/useFeatureFlag";
|
|
13
|
-
|
|
13
|
+
// src/coolandlovely/CoolAndLovelyRoot.tsx
|
|
14
14
|
var D = (D) => {
|
|
15
15
|
let { registerNavItems: O, registerFooterItems: k, basePath: A = "/" } = D, { t: j } = s(), M = a((e, t) => {
|
|
16
16
|
let n = j(e);
|
|
@@ -216,5 +216,4 @@ var D = (D) => {
|
|
|
216
216
|
})
|
|
217
217
|
}) }, n(D));
|
|
218
218
|
};
|
|
219
|
-
//#endregion
|
|
220
219
|
export { D as CoolAndLovelyRoot };
|
|
@@ -3,7 +3,7 @@ import { HomePage as t } from "./pages/HomePage.js";
|
|
|
3
3
|
import { Suspense as n, lazy as r } from "react";
|
|
4
4
|
import { Navigate as i, Route as a, Routes as o, useLocation as s } from "react-router";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/coolandlovely/CoolAndLovelyRoutes.tsx
|
|
7
7
|
var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ default: e.BrandsListPage }))), d = r(() => import("./pages/brands/BrandDetailPage.js").then((e) => ({ default: e.BrandDetailPage }))), f = r(() => import("./pages/brands/BrandFormPage.js").then((e) => ({ default: e.BrandFormPage }))), p = r(() => import("./pages/brands/ImportCatalogPage.js").then((e) => ({ default: e.ImportCatalogPage }))), m = r(() => import("./pages/collections/CollectionsListPage.js").then((e) => ({ default: e.CollectionsListPage }))), h = r(() => import("./pages/collections/CollectionDetailPage.js").then((e) => ({ default: e.CollectionDetailPage }))), g = r(() => import("./pages/collections/CollectionFormPage.js").then((e) => ({ default: e.CollectionFormPage }))), _ = r(() => import("./pages/items/StyleItemsListPage.js").then((e) => ({ default: e.StyleItemsListPage }))), v = r(() => import("./pages/items/StyleItemDetailPage.js").then((e) => ({ default: e.StyleItemDetailPage }))), y = r(() => import("./pages/items/StyleItemFormPage.js").then((e) => ({ default: e.StyleItemFormPage }))), b = r(() => import("./pages/looks/LooksListPage.js").then((e) => ({ default: e.LooksListPage }))), x = r(() => import("./pages/looks/LookDetailPage.js").then((e) => ({ default: e.LookDetailPage }))), S = r(() => import("./pages/looks/LookFormPage.js").then((e) => ({ default: e.LookFormPage }))), C = r(() => import("./pages/collaborations/CollaborationsListPage.js").then((e) => ({ default: e.CollaborationsListPage }))), w = r(() => import("./pages/collaborations/CollaborationDetailPage.js").then((e) => ({ default: e.CollaborationDetailPage }))), T = r(() => import("./pages/collaborations/CollaborationFormPage.js").then((e) => ({ default: e.CollaborationFormPage }))), E = r(() => import("./pages/wardrobe/WardrobeListPage.js").then((e) => ({ default: e.WardrobeListPage }))), D = r(() => import("./pages/wardrobe/WardrobeFormPage.js").then((e) => ({ default: e.WardrobeFormPage }))), O = r(() => import("./pages/lookbooks/LookbooksListPage.js").then((e) => ({ default: e.LookbooksListPage }))), k = r(() => import("./pages/lookbooks/LookbookDetailPage.js").then((e) => ({ default: e.LookbookDetailPage }))), A = r(() => import("./pages/profile/StyleProfilePage.js").then((e) => ({ default: e.StyleProfilePage }))), j = r(() => import("./pages/discover/DiscoverPage.js").then((e) => ({ default: e.DiscoverPage }))), M = r(() => import("./pages/trends/TrendsPage.js").then((e) => ({ default: e.TrendsPage }))), N = r(() => import("./pages/editorial/EditorialPage.js").then((e) => ({ default: e.EditorialPage }))), P = r(() => import("./pages/marketplace/CreatorMarketplacePage.js").then((e) => ({ default: e.CreatorMarketplacePage }))), F = r(() => import("./pages/resale/ResaleBrowsePage.js").then((e) => ({ default: e.ResaleBrowsePage }))), I = r(() => import("./pages/resale/ResaleListingPage.js").then((e) => ({ default: e.ResaleListingPage }))), L = r(() => import("./pages/resale/ResaleSellerPage.js").then((e) => ({ default: e.ResaleSellerPage }))), R = r(() => import("./pages/resale/ResaleReportsPage.js").then((e) => ({ default: e.ResaleReportsPage }))), z = r(() => import("./pages/commerce/CartPage.js").then((e) => ({ default: e.CartPage }))), B = r(() => import("./pages/commerce/BrandOrdersPage.js").then((e) => ({ default: e.BrandOrdersPage }))), V = r(() => import("./pages/commerce/BrandOrdersPage.js").then((e) => ({ default: e.BrandOrderDetailPage }))), H = r(() => import("./pages/commerce/OrdersPage.js").then((e) => ({ default: e.OrdersPage }))), U = r(() => import("./pages/commerce/OrdersPage.js").then((e) => ({ default: e.OrderDetailPage }))), W = r(() => import("./pages/commerce/CreatorEarningsPage.js").then((e) => ({ default: e.CreatorEarningsPage }))), G = r(() => import("./pages/admin/AdminBrandsPage.js").then((e) => ({ default: e.AdminBrandsPage }))), K = r(() => import("./pages/admin/AdminCollaborationsPage.js").then((e) => ({ default: e.AdminCollaborationsPage }))), q = r(() => import("./pages/admin/AdminFeaturedItemsPage.js").then((e) => ({ default: e.AdminFeaturedItemsPage }))), J = () => /* @__PURE__ */ c("div", {
|
|
8
8
|
className: "flex min-h-[400px] items-center justify-center",
|
|
9
9
|
children: /* @__PURE__ */ c("div", { className: "h-8 w-8 animate-spin rounded-full border-b-2 border-primary" })
|
|
@@ -208,5 +208,4 @@ var u = r(() => import("./pages/brands/BrandsListPage.js").then((e) => ({ defaul
|
|
|
208
208
|
})
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
|
-
//#endregion
|
|
212
211
|
export { Y as CoolAndLovelyRoutes };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getStoredOrganizationId as e, getStoredProjectId as t, graphqlFetchPinned as n, prepareWorkspaceRequest as r, resolveGatewayUrl as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
2
|
-
|
|
2
|
+
// src/coolandlovely/api/creatorMarketplaceRequest.ts
|
|
3
3
|
async function a(a, o, s, c) {
|
|
4
4
|
let l = { ...a }, u = () => {
|
|
5
5
|
if ((l.organizationId ?? null) !== (e() ?? null) || (l.projectId ?? null) !== (t() ?? null)) throw Error("The active context changed. Review the marketplace action again.");
|
|
6
6
|
};
|
|
7
7
|
u();
|
|
8
|
-
let d = await r({
|
|
9
|
-
url:
|
|
8
|
+
let d = i("workspace", l.apiGatewayUrl), f = await r({
|
|
9
|
+
url: d,
|
|
10
10
|
authToken: l.authToken,
|
|
11
11
|
actorId: l.actorId,
|
|
12
12
|
workspaceId: l.workspaceId,
|
|
@@ -15,12 +15,12 @@ async function a(a, o, s, c) {
|
|
|
15
15
|
currentQuery: o,
|
|
16
16
|
signal: c
|
|
17
17
|
});
|
|
18
|
-
u(),
|
|
19
|
-
let
|
|
18
|
+
u(), f.assertCurrent();
|
|
19
|
+
let p = await n({
|
|
20
20
|
gateway: "workspace",
|
|
21
21
|
baseUrl: l.apiGatewayUrl,
|
|
22
22
|
authToken: l.authToken,
|
|
23
|
-
workspaceToken:
|
|
23
|
+
workspaceToken: f.workspaceToken,
|
|
24
24
|
workspaceId: l.workspaceId,
|
|
25
25
|
organizationId: l.organizationId ?? !1,
|
|
26
26
|
tenantId: l.tenantId ?? !1,
|
|
@@ -31,9 +31,8 @@ async function a(a, o, s, c) {
|
|
|
31
31
|
}).catch((e) => {
|
|
32
32
|
throw e instanceof Error && "errors" in e && Array.isArray(e.errors) ? Object.assign(e, { graphQLErrors: e.errors }) : e;
|
|
33
33
|
});
|
|
34
|
-
if (u(),
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
34
|
+
if (u(), f.assertCurrent(), p.errors?.length) throw Object.assign(Error(p.errors[0]?.message ?? "The request could not be completed."), { graphQLErrors: p.errors });
|
|
35
|
+
if (p.data == null) throw Error("The request did not return data.");
|
|
36
|
+
return p.data;
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { a as creatorMarketplaceRequest };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getStoredOrganizationId as e, getStoredProjectId as t, graphqlFetchPinned as n, prepareWorkspaceRequest as r, resolveGatewayUrl as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
2
2
|
import { print as a } from "graphql";
|
|
3
|
-
|
|
3
|
+
// src/coolandlovely/api/resaleTransport.ts
|
|
4
4
|
async function o(o, s, c, l) {
|
|
5
5
|
let u = { ...o }, d = () => {
|
|
6
6
|
if ((u.organizationId ?? null) !== (e() ?? null) || (u.projectId ?? null) !== (t() ?? null)) throw Error("The active context changed. Reopen the resale page before continuing.");
|
|
@@ -32,5 +32,4 @@ async function o(o, s, c, l) {
|
|
|
32
32
|
if (d(), m.assertCurrent(), h.errors?.length || h.data == null) throw Error("The resale operation was not confirmed. Refresh its authoritative status before retrying.");
|
|
33
33
|
return h.data;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { o as resaleRequest };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActorName as e } from "./ActorName.js";
|
|
2
2
|
import { useEntityActivity as t } from "../hooks/useActivity.js";
|
|
3
3
|
import { formatDate as n, formatRelativeTime as r, titleCase as i } from "../utils/formatters.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as a } from "../utils/cn.js";
|
|
5
5
|
import { History as o, Loader2 as s, RotateCw as c } from "lucide-react";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
import { GlassCard as d } from "@burdenoff/fe-libs/ui";
|
|
8
|
-
|
|
8
|
+
// src/coolandlovely/components/ActivityTrail.tsx
|
|
9
9
|
function f(e) {
|
|
10
10
|
let t = e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e;
|
|
11
11
|
if (!/^[a-z0-9_]+$/.test(t)) return e;
|
|
@@ -16,7 +16,7 @@ var p = ({ resourceType: i, resourceId: p, title: m = "Audit trail", limit: h =
|
|
|
16
16
|
let _ = t(i, p, h), v = _.data ?? [];
|
|
17
17
|
return /* @__PURE__ */ u(d, {
|
|
18
18
|
treatment: "plain",
|
|
19
|
-
className:
|
|
19
|
+
className: a("p-5", g),
|
|
20
20
|
children: [/* @__PURE__ */ u("h3", {
|
|
21
21
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
22
22
|
children: [
|
|
@@ -40,29 +40,28 @@ var p = ({ resourceType: i, resourceId: p, title: m = "Audit trail", limit: h =
|
|
|
40
40
|
children: "No changes recorded yet. Edits, lifecycle transitions and archival are logged here as they happen."
|
|
41
41
|
}) : /* @__PURE__ */ l("ul", {
|
|
42
42
|
className: "divide-y divide-border-seam",
|
|
43
|
-
children: v.map((
|
|
43
|
+
children: v.map((t) => /* @__PURE__ */ u("li", {
|
|
44
44
|
className: "flex items-start justify-between gap-3 py-2.5 first:pt-0",
|
|
45
45
|
children: [/* @__PURE__ */ u("div", {
|
|
46
46
|
className: "min-w-0",
|
|
47
47
|
children: [/* @__PURE__ */ l("p", {
|
|
48
48
|
className: "truncate text-sm font-medium text-text-primary",
|
|
49
|
-
children: f(
|
|
49
|
+
children: f(t.action)
|
|
50
50
|
}), /* @__PURE__ */ l("p", {
|
|
51
51
|
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
52
|
-
children: /* @__PURE__ */ l(
|
|
52
|
+
children: /* @__PURE__ */ l(e, { id: t.userId })
|
|
53
53
|
})]
|
|
54
54
|
}), /* @__PURE__ */ l("time", {
|
|
55
|
-
dateTime:
|
|
56
|
-
title: n(
|
|
55
|
+
dateTime: t.timestamp,
|
|
56
|
+
title: n(t.timestamp),
|
|
57
57
|
className: "shrink-0 whitespace-nowrap text-xs text-text-secondary",
|
|
58
|
-
children: r(
|
|
58
|
+
children: r(t.timestamp)
|
|
59
59
|
})]
|
|
60
|
-
},
|
|
60
|
+
}, t.id))
|
|
61
61
|
}) : /* @__PURE__ */ u("p", {
|
|
62
62
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
63
63
|
children: [/* @__PURE__ */ l(s, { className: "h-4 w-4 animate-spin" }), " Loading activity…"]
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { p as ActivityTrail, f as formatActivityAction };
|
|
@@ -2,12 +2,12 @@ import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
import { useActorProfiles as r } from "@burdenoff/fe-libs/shared";
|
|
5
|
-
|
|
5
|
+
// src/coolandlovely/components/ActorName.tsx
|
|
6
6
|
var i = ({ id: i, actorType: a = "user", className: o, fallback: s = "—" }) => {
|
|
7
|
-
let { apiGatewayUrl: c, authToken: l, workspaceId: u } = e(), d =
|
|
7
|
+
let { apiGatewayUrl: c, authToken: l, workspaceId: u } = e(), d = t(() => i ? [{
|
|
8
8
|
actorId: i,
|
|
9
9
|
actorType: a
|
|
10
|
-
}] : [], [i, a]), {
|
|
10
|
+
}] : [], [i, a]), f = r(d, {
|
|
11
11
|
apiGatewayUrl: c,
|
|
12
12
|
authToken: l,
|
|
13
13
|
workspaceId: u
|
|
@@ -16,12 +16,11 @@ var i = ({ id: i, actorType: a = "user", className: o, fallback: s = "—" }) =>
|
|
|
16
16
|
className: o,
|
|
17
17
|
children: s
|
|
18
18
|
});
|
|
19
|
-
let
|
|
19
|
+
let p = f[i], m = p?.displayName ?? i;
|
|
20
20
|
return /* @__PURE__ */ n("span", {
|
|
21
21
|
className: o,
|
|
22
|
-
title:
|
|
23
|
-
children:
|
|
22
|
+
title: p?.email ?? i,
|
|
23
|
+
children: m
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { i as ActorName };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
|
|
2
|
-
import { cn as t } from "../utils/cn.js";
|
|
3
|
-
import { useTr as n } from "../hooks/useTr.js";
|
|
4
2
|
import "../hooks/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useTr as t } from "../hooks/useTr.js";
|
|
4
|
+
import { useAddToCart as n } from "../hooks/useCommerceApi.js";
|
|
5
|
+
import { useStyleItemInventory as r } from "../hooks/useInventoryApi.js";
|
|
6
|
+
import { cn as i } from "../utils/cn.js";
|
|
7
7
|
import { useState as a } from "react";
|
|
8
8
|
import { Check as o, Loader2 as s, ShoppingBag as c, Sparkles as l } from "lucide-react";
|
|
9
9
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/coolandlovely/components/AddToCartPanel.tsx
|
|
11
11
|
var f = 10, p = 5;
|
|
12
12
|
function m(e, t, n) {
|
|
13
13
|
return e?.trackInventory ? e.variants.filter((e) => (t === null || (e.size ?? "") === t) && (n === null || (e.colour ?? "") === n)).reduce((e, t) => e + t.stockQuantity, 0) : null;
|
|
14
14
|
}
|
|
15
|
-
var h = (e) =>
|
|
16
|
-
let v =
|
|
15
|
+
var h = (e) => i("inline-flex min-w-9 items-center justify-center rounded-full border px-3 py-1 text-sm font-medium transition-colors", e ? "border-action-primary-bg bg-action-primary-bg text-action-primary-text" : "border-border-seam text-text-primary hover:bg-bg-sunken"), g = ({ item: g, lookId: _ }) => {
|
|
16
|
+
let v = t(), { navigateTo: y } = e(), b = n(), x = r(g.id), [S, C] = a(g.sizes.length === 1 ? g.sizes[0] ?? null : null), [w, T] = a(g.colours.length === 1 ? g.colours[0] ?? null : null), [E, D] = a(1), O = g.status === "ACTIVE" && g.price > 0, k = g.sizes.length > 0 && !S, A = g.colours.length > 0 && !w, j = x.data, M = k || A ? null : m(j, S ?? "", w ?? ""), N = M !== null && M <= 0, P = M === null ? f : Math.max(1, Math.min(f, M));
|
|
17
17
|
return O ? /* @__PURE__ */ d("div", {
|
|
18
18
|
className: "space-y-4",
|
|
19
19
|
"data-testid": "add-to-cart-panel",
|
|
@@ -34,7 +34,7 @@ var h = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full b
|
|
|
34
34
|
onClick: () => {
|
|
35
35
|
C(e), D(1);
|
|
36
36
|
},
|
|
37
|
-
className:
|
|
37
|
+
className: i(h(S === e), "disabled:opacity-40 disabled:line-through"),
|
|
38
38
|
children: e
|
|
39
39
|
}, e))
|
|
40
40
|
})] }),
|
|
@@ -50,7 +50,7 @@ var h = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full b
|
|
|
50
50
|
onClick: () => {
|
|
51
51
|
T(e), D(1);
|
|
52
52
|
},
|
|
53
|
-
className:
|
|
53
|
+
className: i(h(w === e), "disabled:opacity-40 disabled:line-through"),
|
|
54
54
|
children: e
|
|
55
55
|
}, e))
|
|
56
56
|
})] }),
|
|
@@ -73,7 +73,7 @@ var h = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full b
|
|
|
73
73
|
}),
|
|
74
74
|
M !== null && /* @__PURE__ */ u("p", {
|
|
75
75
|
"data-testid": "stock-left",
|
|
76
|
-
className:
|
|
76
|
+
className: i("text-sm font-medium", N || M <= p ? "text-status-warning-text" : "text-text-secondary"),
|
|
77
77
|
children: N ? v("coolandlovely.cart.soldOut", "Sold out in this size and colour") : M <= p ? v("coolandlovely.cart.onlyLeft", "Only {{count}} left", { count: M }) : v("coolandlovely.cart.inStock", "In stock")
|
|
78
78
|
}),
|
|
79
79
|
b.error && /* @__PURE__ */ u("p", {
|
|
@@ -107,5 +107,4 @@ var h = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full b
|
|
|
107
107
|
children: v("coolandlovely.cart.notForSale", "This piece is not available to buy right now.")
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
-
//#endregion
|
|
111
110
|
export { g as AddToCartPanel };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useAddLookbookEntry as t, useLookbooks as n } from "../hooks/useCoolAndLovelyApi.js";
|
|
3
|
+
import { cn as r } from "../utils/cn.js";
|
|
4
4
|
import { useEffect as i, useRef as a, useState as o } from "react";
|
|
5
5
|
import { BookHeart as s, Check as c, ChevronDown as l, Loader2 as u, Plus as d } from "lucide-react";
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/coolandlovely/components/AddToLookbookButton.tsx
|
|
8
8
|
var m = ({ lookId: m, styleItemId: h, className: g }) => {
|
|
9
|
-
let { navigateTo: _, currentUser: v } = e(), y =
|
|
9
|
+
let { navigateTo: _, currentUser: v } = e(), y = n(v?.id), b = t(), [x, S] = o(!1), [C, w] = o(null), T = a(null);
|
|
10
10
|
i(() => {
|
|
11
11
|
if (!x) return;
|
|
12
12
|
let e = (e) => {
|
|
@@ -27,7 +27,7 @@ var m = ({ lookId: m, styleItemId: h, className: g }) => {
|
|
|
27
27
|
};
|
|
28
28
|
return /* @__PURE__ */ p("div", {
|
|
29
29
|
ref: T,
|
|
30
|
-
className:
|
|
30
|
+
className: r("relative", g),
|
|
31
31
|
children: [/* @__PURE__ */ p("button", {
|
|
32
32
|
type: "button",
|
|
33
33
|
onClick: () => S((e) => !e),
|
|
@@ -76,5 +76,4 @@ var m = ({ lookId: m, styleItemId: h, className: g }) => {
|
|
|
76
76
|
})]
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { m as AddToLookbookButton };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BrandCover as e } from "./BrandCover.js";
|
|
2
2
|
import { StatusBadge as t } from "./StatusBadge.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { TagList as n } from "./TagList.js";
|
|
4
|
+
import { titleCase as r } from "../utils/formatters.js";
|
|
5
|
+
import { cn as i } from "../utils/cn.js";
|
|
6
6
|
import { Star as a } from "lucide-react";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/coolandlovely/components/BrandCard.tsx
|
|
9
9
|
var c = ({ brand: c, onClick: l, className: u }) => /* @__PURE__ */ s("button", {
|
|
10
10
|
type: "button",
|
|
11
11
|
onClick: l,
|
|
12
12
|
"aria-label": `Open brand ${c.name}`,
|
|
13
|
-
className:
|
|
14
|
-
children: [/* @__PURE__ */ o(
|
|
13
|
+
className: i("group flex flex-col overflow-hidden rounded-xl border border-border-seam bg-bg-surface text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--color-focus-ring)]", u),
|
|
14
|
+
children: [/* @__PURE__ */ o(e, {
|
|
15
15
|
coverFileId: c.cover?.id,
|
|
16
16
|
logoFileId: c.logo?.id,
|
|
17
17
|
name: c.name,
|
|
@@ -40,8 +40,8 @@ var c = ({ brand: c, onClick: l, className: u }) => /* @__PURE__ */ s("button",
|
|
|
40
40
|
className: "mt-2 line-clamp-2 text-sm text-text-secondary",
|
|
41
41
|
children: c.tagline
|
|
42
42
|
}),
|
|
43
|
-
c.aesthetics.length > 0 && /* @__PURE__ */ o(
|
|
44
|
-
tags: c.aesthetics.map(
|
|
43
|
+
c.aesthetics.length > 0 && /* @__PURE__ */ o(n, {
|
|
44
|
+
tags: c.aesthetics.map(r),
|
|
45
45
|
max: 4,
|
|
46
46
|
className: "mt-3",
|
|
47
47
|
tone: "accent"
|
|
@@ -49,5 +49,4 @@ var c = ({ brand: c, onClick: l, className: u }) => /* @__PURE__ */ s("button",
|
|
|
49
49
|
]
|
|
50
50
|
})]
|
|
51
51
|
});
|
|
52
|
-
//#endregion
|
|
53
52
|
export { c as BrandCard };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Thumbnail as e } from "./Thumbnail.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { Store as n } from "lucide-react";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/coolandlovely/components/BrandCover.tsx
|
|
6
6
|
var a = ({ coverFileId: a, logoFileId: o, name: s, seed: c, className: l, showLogo: u = !1, overlay: d }) => {
|
|
7
7
|
let f = c ?? s;
|
|
8
8
|
return /* @__PURE__ */ i("div", {
|
|
9
|
-
className:
|
|
9
|
+
className: t("relative", l),
|
|
10
10
|
children: [
|
|
11
|
-
/* @__PURE__ */ r(
|
|
11
|
+
/* @__PURE__ */ r(e, {
|
|
12
12
|
icon: /* @__PURE__ */ r(n, { className: "h-8 w-8" }),
|
|
13
13
|
seed: f,
|
|
14
14
|
fileId: a,
|
|
@@ -22,7 +22,7 @@ var a = ({ coverFileId: a, logoFileId: o, name: s, seed: c, className: l, showLo
|
|
|
22
22
|
}) : null,
|
|
23
23
|
u ? /* @__PURE__ */ r("div", {
|
|
24
24
|
className: "absolute bottom-0 left-4 translate-y-1/2",
|
|
25
|
-
children: /* @__PURE__ */ r(
|
|
25
|
+
children: /* @__PURE__ */ r(e, {
|
|
26
26
|
icon: /* @__PURE__ */ r(n, { className: "h-6 w-6" }),
|
|
27
27
|
seed: f,
|
|
28
28
|
fileId: o,
|
|
@@ -33,5 +33,4 @@ var a = ({ coverFileId: a, logoFileId: o, name: s, seed: c, className: l, showLo
|
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { a as BrandCover };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Thumbnail as e } from "./Thumbnail.js";
|
|
2
|
+
import { useCoolAndLovely as t } from "../context/CoolAndLovelyContext.js";
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { useMemo as r, useState as i } from "react";
|
|
5
5
|
import { Store as a } from "lucide-react";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { useActorProfiles as c } from "@burdenoff/fe-libs/shared";
|
|
8
|
-
|
|
8
|
+
// src/coolandlovely/components/BrandCreatorAvatars.tsx
|
|
9
9
|
function l(e) {
|
|
10
10
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
11
11
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
12
12
|
}
|
|
13
13
|
var u = ({ brandLogoFileId: u, brandSeed: d, creatorId: f, size: p = "md", className: m }) => {
|
|
14
|
-
let { apiGatewayUrl: h, authToken: g, workspaceId: _ } =
|
|
14
|
+
let { apiGatewayUrl: h, authToken: g, workspaceId: _ } = t(), [v, y] = i(!1), b = r(() => [{
|
|
15
15
|
actorId: f,
|
|
16
16
|
actorType: "user"
|
|
17
|
-
}], [f]), {
|
|
17
|
+
}], [f]), x = c(b, {
|
|
18
18
|
apiGatewayUrl: h,
|
|
19
19
|
authToken: g,
|
|
20
20
|
workspaceId: _
|
|
21
|
-
})[f],
|
|
21
|
+
})[f], S = x?.displayName ?? "Creator", C = x?.avatarUrl, w = p === "sm" ? "h-7 w-7" : "h-10 w-10", T = p === "sm" ? "h-3.5 w-3.5" : "h-5 w-5", E = p === "sm" ? "text-[10px]" : "text-xs";
|
|
22
22
|
return /* @__PURE__ */ s("div", {
|
|
23
|
-
className:
|
|
23
|
+
className: n("flex items-center gap-1.5", m),
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ o(
|
|
26
|
-
icon: /* @__PURE__ */ o(a, { className:
|
|
25
|
+
/* @__PURE__ */ o(e, {
|
|
26
|
+
icon: /* @__PURE__ */ o(a, { className: T }),
|
|
27
27
|
seed: d,
|
|
28
28
|
fileId: u,
|
|
29
29
|
alt: "Brand logo",
|
|
30
|
-
className:
|
|
30
|
+
className: n(w, "rounded-full ring-2 ring-bg-surface")
|
|
31
31
|
}),
|
|
32
32
|
/* @__PURE__ */ o("span", {
|
|
33
33
|
className: "text-xs font-medium text-text-secondary",
|
|
@@ -35,21 +35,20 @@ var u = ({ brandLogoFileId: u, brandSeed: d, creatorId: f, size: p = "md", class
|
|
|
35
35
|
children: "×"
|
|
36
36
|
}),
|
|
37
37
|
/* @__PURE__ */ o("span", {
|
|
38
|
-
title:
|
|
39
|
-
className:
|
|
40
|
-
children:
|
|
41
|
-
src:
|
|
42
|
-
alt:
|
|
38
|
+
title: S,
|
|
39
|
+
className: n("relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-bg-sunken ring-2 ring-bg-surface", w),
|
|
40
|
+
children: C && !v ? /* @__PURE__ */ o("img", {
|
|
41
|
+
src: C,
|
|
42
|
+
alt: S,
|
|
43
43
|
loading: "lazy",
|
|
44
44
|
onError: () => y(!0),
|
|
45
45
|
className: "h-full w-full object-cover"
|
|
46
46
|
}) : /* @__PURE__ */ o("span", {
|
|
47
|
-
className:
|
|
48
|
-
children: l(
|
|
47
|
+
className: n("font-semibold text-text-secondary", E),
|
|
48
|
+
children: l(S)
|
|
49
49
|
})
|
|
50
50
|
})
|
|
51
51
|
]
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { u as BrandCreatorAvatars };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useCoolAndLovely as e } from "../context/CoolAndLovelyContext.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
3
|
import "../hooks/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { formatDate as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { usePayCollaborationFee as n, useSyncCollaborationPayment as r } from "../hooks/useCommerceApi.js";
|
|
5
|
+
import { formatDate as i, formatPrice as a } from "../utils/formatters.js";
|
|
6
|
+
import { PayForOrder as o } from "./PayForOrder.js";
|
|
7
|
+
import { StatusBadge as s } from "./StatusBadge.js";
|
|
8
8
|
import { useState as c } from "react";
|
|
9
9
|
import { CheckCircle2 as l, Loader2 as u, RefreshCw as d, Wallet as f } from "lucide-react";
|
|
10
10
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
11
|
import { GlassCard as h } from "@burdenoff/fe-libs/ui";
|
|
12
|
-
|
|
12
|
+
// src/coolandlovely/components/CollaborationFeeCard.tsx
|
|
13
13
|
var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50", _ = "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50", v = ({ collaboration: v }) => {
|
|
14
|
-
let y = t(), { currentUser: b, navigateTo: x } = e(), S =
|
|
14
|
+
let y = t(), { currentUser: b, navigateTo: x } = e(), S = n(), C = r(), [w, T] = c(null), E = v.payout ?? null, D = !!b?.id && b.id === v.creatorId;
|
|
15
15
|
if (!E && v.compensation <= 0) return null;
|
|
16
16
|
let O = async () => {
|
|
17
17
|
(await C.mutateAsync(v.id)).status === "PAID" && T(null);
|
|
@@ -20,7 +20,7 @@ var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border
|
|
|
20
20
|
className: "space-y-1 text-sm",
|
|
21
21
|
children: [/* @__PURE__ */ m("p", {
|
|
22
22
|
className: "inline-flex items-center gap-1.5 font-medium text-status-success-text",
|
|
23
|
-
children: [/* @__PURE__ */ p(l, { className: "h-4 w-4" }), y("coolandlovely.collaborationFee.paidOn", "Paid on {{date}}", { date: E.paidAt ?
|
|
23
|
+
children: [/* @__PURE__ */ p(l, { className: "h-4 w-4" }), y("coolandlovely.collaborationFee.paidOn", "Paid on {{date}}", { date: E.paidAt ? i(E.paidAt, {
|
|
24
24
|
hour: void 0,
|
|
25
25
|
minute: void 0
|
|
26
26
|
}) : "—" })]
|
|
@@ -41,7 +41,7 @@ var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border
|
|
|
41
41
|
className: "text-sm text-text-secondary",
|
|
42
42
|
children: y("coolandlovely.collaborationFee.payHint", "This collaboration is published. Pay the agreed fee to the creator.")
|
|
43
43
|
}),
|
|
44
|
-
w ? /* @__PURE__ */ p(
|
|
44
|
+
w ? /* @__PURE__ */ p(o, {
|
|
45
45
|
checkout: w,
|
|
46
46
|
onSettle: O,
|
|
47
47
|
description: y("coolandlovely.collaborationFee.paymentLabel", "Collaboration fee: {{title}}", { title: v.title }),
|
|
@@ -63,7 +63,7 @@ var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border
|
|
|
63
63
|
]
|
|
64
64
|
}) : /* @__PURE__ */ p("p", {
|
|
65
65
|
className: "text-sm text-text-secondary",
|
|
66
|
-
children: v.status === "PUBLISHED" ? y("coolandlovely.collaborationFee.offPlatform", "No on-platform fee is due for this collaboration.") : y("coolandlovely.collaborationFee.dueOnPublish", "The agreed fee of {{amount}} becomes due from the brand when the collaboration is published.", { amount:
|
|
66
|
+
children: v.status === "PUBLISHED" ? y("coolandlovely.collaborationFee.offPlatform", "No on-platform fee is due for this collaboration.") : y("coolandlovely.collaborationFee.dueOnPublish", "The agreed fee of {{amount}} becomes due from the brand when the collaboration is published.", { amount: a(v.compensation, v.currency) })
|
|
67
67
|
});
|
|
68
68
|
let A = S.error ?? C.error;
|
|
69
69
|
return /* @__PURE__ */ p("div", {
|
|
@@ -77,11 +77,11 @@ var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border
|
|
|
77
77
|
children: [/* @__PURE__ */ p("h3", {
|
|
78
78
|
className: "text-sm font-semibold text-text-primary",
|
|
79
79
|
children: y("coolandlovely.collaborationFee.title", "Collaboration fee")
|
|
80
|
-
}), E && /* @__PURE__ */ p(
|
|
80
|
+
}), E && /* @__PURE__ */ p(s, { status: E.status })]
|
|
81
81
|
}),
|
|
82
82
|
/* @__PURE__ */ p("p", {
|
|
83
83
|
className: "text-2xl font-semibold tabular-nums text-text-primary",
|
|
84
|
-
children:
|
|
84
|
+
children: a(E?.amount ?? v.compensation, E?.currency ?? v.currency)
|
|
85
85
|
}),
|
|
86
86
|
k,
|
|
87
87
|
A && /* @__PURE__ */ p("p", {
|
|
@@ -92,5 +92,4 @@ var g = "inline-flex w-full items-center justify-center gap-2 rounded-lg border
|
|
|
92
92
|
})
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
-
//#endregion
|
|
96
95
|
export { v as CollaborationFeeCard };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Thumbnail as e } from "./Thumbnail.js";
|
|
2
2
|
import { StatusBadge as t } from "./StatusBadge.js";
|
|
3
|
-
import {
|
|
3
|
+
import { TagList as n } from "./TagList.js";
|
|
4
4
|
import { formatDate as r, titleCase as i } from "../utils/formatters.js";
|
|
5
|
-
import {
|
|
5
|
+
import { cn as a } from "../utils/cn.js";
|
|
6
6
|
import { Shapes as o } from "lucide-react";
|
|
7
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/coolandlovely/components/CollectionCard.tsx
|
|
9
9
|
var u = ({ collection: u, onClick: d, className: f }) => /* @__PURE__ */ l("button", {
|
|
10
10
|
type: "button",
|
|
11
11
|
onClick: d,
|
|
12
12
|
"aria-label": `Open collection ${u.name}`,
|
|
13
|
-
className:
|
|
13
|
+
className: a("group overflow-hidden rounded-xl border border-border-seam bg-bg-surface text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", f),
|
|
14
14
|
children: [/* @__PURE__ */ l("div", {
|
|
15
15
|
className: "relative",
|
|
16
|
-
children: [/* @__PURE__ */ c(
|
|
16
|
+
children: [/* @__PURE__ */ c(e, {
|
|
17
17
|
icon: /* @__PURE__ */ c(o, { className: "h-10 w-10" }),
|
|
18
18
|
seed: u.id,
|
|
19
19
|
fileId: u.cover?.id,
|
|
@@ -47,12 +47,11 @@ var u = ({ collection: u, onClick: d, className: f }) => /* @__PURE__ */ l("butt
|
|
|
47
47
|
hour: void 0,
|
|
48
48
|
minute: void 0
|
|
49
49
|
})]
|
|
50
|
-
}), u.tags.length > 0 && /* @__PURE__ */ c(
|
|
50
|
+
}), u.tags.length > 0 && /* @__PURE__ */ c(n, {
|
|
51
51
|
tags: u.tags,
|
|
52
52
|
max: 4,
|
|
53
53
|
className: u.publishAt ? "mt-2" : void 0
|
|
54
54
|
})]
|
|
55
55
|
})]
|
|
56
56
|
});
|
|
57
|
-
//#endregion
|
|
58
57
|
export { u as CollectionCard };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/coolandlovely/components/ColourSwatchRow.tsx
|
|
4
4
|
var r = {
|
|
5
5
|
black: "#111111",
|
|
6
6
|
white: "#ffffff",
|
|
@@ -80,5 +80,4 @@ var o = ({ colours: r, max: i = 6, className: o }) => {
|
|
|
80
80
|
}) : null]
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
|
-
//#endregion
|
|
84
83
|
export { o as ColourSwatchRow };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActorName as e } from "./ActorName.js";
|
|
2
2
|
import { useAddComment as t, useEntityComments as n } from "../hooks/useComments.js";
|
|
3
3
|
import { formatRelativeTime as r } from "../utils/formatters.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as i } from "../utils/cn.js";
|
|
5
5
|
import { useState as a } from "react";
|
|
6
6
|
import { Loader2 as o, MessageSquare as s, Send as c } from "lucide-react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
import { GlassCard as d } from "@burdenoff/fe-libs/ui";
|
|
9
|
-
|
|
9
|
+
// src/coolandlovely/components/Comments.tsx
|
|
10
10
|
var f = ({ entityType: f, entityId: p, title: m = "Reviews & feedback", className: h }) => {
|
|
11
11
|
let g = n(f, p), _ = t(), [v, y] = a(""), b = g.data?.comments ?? [], x = g.data?.total ?? b.length;
|
|
12
12
|
return /* @__PURE__ */ u("section", {
|
|
13
|
-
className:
|
|
13
|
+
className: i("mt-6", h),
|
|
14
14
|
children: [
|
|
15
15
|
/* @__PURE__ */ u("h3", {
|
|
16
16
|
className: "mb-3 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
@@ -30,7 +30,7 @@ var f = ({ entityType: f, entityId: p, title: m = "Reviews & feedback", classNam
|
|
|
30
30
|
onSubmit: (e) => {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
let t = v.trim();
|
|
33
|
-
|
|
33
|
+
t && p && _.mutate({
|
|
34
34
|
entityType: f,
|
|
35
35
|
entityId: p,
|
|
36
36
|
text: t
|
|
@@ -81,27 +81,26 @@ var f = ({ entityType: f, entityId: p, title: m = "Reviews & feedback", classNam
|
|
|
81
81
|
children: "No reviews yet. Be the first to share feedback."
|
|
82
82
|
}) : /* @__PURE__ */ l("ul", {
|
|
83
83
|
className: "divide-y divide-border-seam rounded-lg border border-border-seam bg-bg-surface",
|
|
84
|
-
children: b.map((
|
|
84
|
+
children: b.map((t) => /* @__PURE__ */ u("li", {
|
|
85
85
|
className: "px-4 py-3",
|
|
86
86
|
children: [/* @__PURE__ */ u("div", {
|
|
87
87
|
className: "flex items-center justify-between gap-2",
|
|
88
|
-
children: [/* @__PURE__ */ l(
|
|
89
|
-
id:
|
|
90
|
-
actorType:
|
|
88
|
+
children: [/* @__PURE__ */ l(e, {
|
|
89
|
+
id: t.authorId,
|
|
90
|
+
actorType: t.authorType,
|
|
91
91
|
className: "truncate text-sm font-medium text-text-primary"
|
|
92
92
|
}), /* @__PURE__ */ u("span", {
|
|
93
93
|
className: "shrink-0 text-xs text-text-secondary",
|
|
94
|
-
children: [r(
|
|
94
|
+
children: [r(t.createdAt), t.edited ? " · edited" : ""]
|
|
95
95
|
})]
|
|
96
96
|
}), /* @__PURE__ */ l("p", {
|
|
97
97
|
className: "mt-1 whitespace-pre-wrap break-words text-sm text-text-secondary",
|
|
98
|
-
children:
|
|
98
|
+
children: t.text
|
|
99
99
|
})]
|
|
100
|
-
},
|
|
100
|
+
}, t.id))
|
|
101
101
|
})
|
|
102
102
|
})
|
|
103
103
|
]
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
|
-
//#endregion
|
|
107
106
|
export { f as Comments };
|