@burdenoff/microfe-coolandlovely 2026.1102.1 → 2026.1102.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +15 -0
  2. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoot.js +8 -0
  4. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  5. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  6. package/dist/coolandlovely/CoolAndLovelyRoutes.js +20 -16
  7. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  8. package/dist/coolandlovely/hooks/useContextNavigation.d.ts +3 -0
  9. package/dist/coolandlovely/hooks/useContextNavigation.d.ts.map +1 -0
  10. package/dist/coolandlovely/hooks/useContextNavigation.js +31 -0
  11. package/dist/coolandlovely/hooks/useContextNavigation.js.map +1 -0
  12. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
  13. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +1 -1
  14. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  15. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts +118 -0
  16. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts.map +1 -0
  17. package/dist/coolandlovely/hooks/useCreatorMarketplace.js +120 -0
  18. package/dist/coolandlovely/hooks/useCreatorMarketplace.js.map +1 -0
  19. package/dist/coolandlovely/hooks/usePriceApi.d.ts.map +1 -1
  20. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
  21. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +139 -121
  22. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  23. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
  24. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +140 -137
  25. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
  26. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.d.ts.map +1 -1
  27. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +104 -95
  28. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  29. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.d.ts.map +1 -1
  30. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +49 -40
  31. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js.map +1 -1
  32. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts +2 -0
  33. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts.map +1 -0
  34. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js +714 -0
  35. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js.map +1 -0
  36. package/dist/coolandlovely/types/index.d.ts +5 -0
  37. package/dist/coolandlovely/types/index.d.ts.map +1 -1
  38. package/dist/generated/wspace-operations.d.ts +649 -0
  39. package/dist/generated/wspace-operations.d.ts.map +1 -1
  40. package/dist/generated/wspace-operations.js +141 -7
  41. package/dist/generated/wspace-operations.js.map +1 -1
  42. package/dist/generated/wspace-types.d.ts +315 -1
  43. package/dist/generated/wspace-types.d.ts.map +1 -1
  44. package/dist/generated/wspace-types.js +7 -1
  45. package/dist/generated/wspace-types.js.map +1 -1
  46. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { useCollaborations as r } from "../../hooks/useCoolAndLovelyApi.js";
5
- import { useTr as i } from "../../hooks/useTr.js";
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { useCollaborations as n } from "../../hooks/useCoolAndLovelyApi.js";
4
+ import { useTr as r } from "../../hooks/useTr.js";
6
5
  import "../../hooks/index.js";
7
- import { StatusBadge as a } from "../../components/StatusBadge.js";
8
- import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
9
- import { formatDate as c, formatPrice as l, titleCase as u } from "../../utils/formatters.js";
10
- import { EmptyState as d } from "../../components/EmptyState.js";
11
- import { ActorName as f } from "../../components/ActorName.js";
12
- import { BrandCreatorAvatars as p } from "../../components/BrandCreatorAvatars.js";
6
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
7
+ import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
8
+ import { formatDate as s, formatPrice as c, titleCase as l } from "../../utils/formatters.js";
9
+ import { EmptyState as u } from "../../components/EmptyState.js";
10
+ import { ActorName as d } from "../../components/ActorName.js";
11
+ import { BrandCreatorAvatars as f } from "../../components/BrandCreatorAvatars.js";
12
+ import { useContextNavigation as p } from "../../hooks/useContextNavigation.js";
13
13
  import { useMemo as m, useState as h } from "react";
14
14
  import { Handshake as g, Plus as _ } from "lucide-react";
15
15
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
@@ -26,14 +26,14 @@ function x(e) {
26
26
  return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
27
27
  }
28
28
  function S() {
29
- let { navigateTo: S } = e(), C = i(), [w, T] = h("ALL"), E = m(() => [{
29
+ let S = p(), C = r(), [w, T] = h("ALL"), E = m(() => [{
30
30
  value: "ALL",
31
31
  label: C("coolandlovely.filters.all", "All")
32
32
  }, ...b.map((e) => ({
33
33
  value: e,
34
34
  label: C(`coolandlovely.status.${e.toLowerCase()}`, x(e))
35
- }))], [C]), D = r({ status: w === "ALL" ? void 0 : w }), O = D.data ?? [];
36
- return /* @__PURE__ */ y(n, {
35
+ }))], [C]), D = n({ status: w === "ALL" ? void 0 : w }), O = D.data ?? [];
36
+ return /* @__PURE__ */ y(t, {
37
37
  title: C("coolandlovely.page.collaborationsTitle", "Collaborations"),
38
38
  description: C("coolandlovely.page.collaborationsSubtitle", "Brand × creator partnerships with a real lifecycle"),
39
39
  actions: /* @__PURE__ */ y("button", {
@@ -46,89 +46,98 @@ function S() {
46
46
  C("coolandlovely.actions.newCollaboration", "New collaboration")
47
47
  ]
48
48
  }),
49
- children: [/* @__PURE__ */ v("div", {
50
- className: "mb-6 flex flex-wrap items-center gap-2",
51
- children: E.map((e) => /* @__PURE__ */ v("button", {
49
+ children: [
50
+ /* @__PURE__ */ v("button", {
52
51
  type: "button",
53
- onClick: () => T(e.value),
54
- className: t("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", w === e.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
55
- children: e.label
56
- }, e.value))
57
- }), D.isLoading ? /* @__PURE__ */ v(s, { label: C("coolandlovely.loading.collaborations", "Loading collaborations…") }) : D.isError ? /* @__PURE__ */ v(o, { onRetry: () => void D.refetch() }) : O.length === 0 ? /* @__PURE__ */ v(d, {
58
- illustration: "empty-data",
59
- icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
60
- title: C("coolandlovely.empty.collaborationsTitle", "No collaborations yet"),
61
- description: C("coolandlovely.empty.collaborationsDescription", "Propose a brand × creator partnership to get started."),
62
- action: /* @__PURE__ */ y("button", {
63
- type: "button",
64
- onClick: () => S("/collaborations/new"),
65
- className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
66
- children: [
67
- /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
68
- " ",
69
- C("coolandlovely.actions.newCollaboration", "New collaboration")
70
- ]
52
+ className: "mb-4 rounded-lg border border-border-seam px-4 py-2 text-sm text-text-primary",
53
+ onClick: () => S("/creator-marketplace"),
54
+ children: C("coolandlovely.marketplace.open", "Open creator marketplace")
55
+ }),
56
+ /* @__PURE__ */ v("div", {
57
+ className: "mb-6 flex flex-wrap items-center gap-2",
58
+ children: E.map((t) => /* @__PURE__ */ v("button", {
59
+ type: "button",
60
+ onClick: () => T(t.value),
61
+ className: e("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", w === t.value ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
62
+ children: t.label
63
+ }, t.value))
64
+ }),
65
+ D.isLoading ? /* @__PURE__ */ v(o, { label: C("coolandlovely.loading.collaborations", "Loading collaborations…") }) : D.isError ? /* @__PURE__ */ v(a, { onRetry: () => void D.refetch() }) : O.length === 0 ? /* @__PURE__ */ v(u, {
66
+ illustration: "empty-data",
67
+ icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
68
+ title: C("coolandlovely.empty.collaborationsTitle", "No collaborations yet"),
69
+ description: C("coolandlovely.empty.collaborationsDescription", "Propose a brand × creator partnership to get started."),
70
+ action: /* @__PURE__ */ y("button", {
71
+ type: "button",
72
+ onClick: () => S("/collaborations/new"),
73
+ className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
74
+ children: [
75
+ /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
76
+ " ",
77
+ C("coolandlovely.actions.newCollaboration", "New collaboration")
78
+ ]
79
+ })
80
+ }) : /* @__PURE__ */ v("div", {
81
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
82
+ children: O.map((e) => /* @__PURE__ */ y("button", {
83
+ type: "button",
84
+ onClick: () => S(`/collaborations/${e.id}`),
85
+ className: "flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md",
86
+ children: [
87
+ /* @__PURE__ */ y("div", {
88
+ className: "flex items-start gap-3",
89
+ children: [
90
+ /* @__PURE__ */ v(f, {
91
+ brandLogoFileId: e.brand?.logo?.id,
92
+ brandSeed: e.brandId,
93
+ creatorId: e.creatorId,
94
+ size: "sm",
95
+ className: "shrink-0"
96
+ }),
97
+ /* @__PURE__ */ y("div", {
98
+ className: "min-w-0 flex-1",
99
+ children: [/* @__PURE__ */ v("h3", {
100
+ className: "truncate text-base font-semibold text-text-primary",
101
+ children: e.title
102
+ }), /* @__PURE__ */ y("p", {
103
+ className: "truncate text-xs text-text-secondary",
104
+ children: [
105
+ e.brand?.name ?? C("coolandlovely.common.brand", "Brand"),
106
+ " ×",
107
+ " ",
108
+ /* @__PURE__ */ v(d, { id: e.creatorId })
109
+ ]
110
+ })]
111
+ }),
112
+ /* @__PURE__ */ v(i, { status: e.status })
113
+ ]
114
+ }),
115
+ e.brief && /* @__PURE__ */ v("p", {
116
+ className: "mt-3 line-clamp-2 text-sm text-text-secondary",
117
+ children: e.brief
118
+ }),
119
+ /* @__PURE__ */ y("div", {
120
+ className: "mt-3 flex items-center justify-between text-xs text-text-secondary",
121
+ children: [/* @__PURE__ */ v("span", {
122
+ className: "rounded-full bg-bg-sunken px-2 py-0.5",
123
+ children: C(`coolandlovely.role.${e.role.toLowerCase()}`, l(e.role))
124
+ }), /* @__PURE__ */ v("span", { children: c(e.compensation, e.currency) })]
125
+ }),
126
+ e.startDate && /* @__PURE__ */ y("p", {
127
+ className: "mt-2 text-xs text-text-secondary",
128
+ children: [
129
+ C("coolandlovely.common.starts", "Starts"),
130
+ " ",
131
+ s(e.startDate, {
132
+ hour: void 0,
133
+ minute: void 0
134
+ })
135
+ ]
136
+ })
137
+ ]
138
+ }, e.id))
71
139
  })
72
- }) : /* @__PURE__ */ v("div", {
73
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
74
- children: O.map((e) => /* @__PURE__ */ y("button", {
75
- type: "button",
76
- onClick: () => S(`/collaborations/${e.id}`),
77
- className: "flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md",
78
- children: [
79
- /* @__PURE__ */ y("div", {
80
- className: "flex items-start gap-3",
81
- children: [
82
- /* @__PURE__ */ v(p, {
83
- brandLogoFileId: e.brand?.logo?.id,
84
- brandSeed: e.brandId,
85
- creatorId: e.creatorId,
86
- size: "sm",
87
- className: "shrink-0"
88
- }),
89
- /* @__PURE__ */ y("div", {
90
- className: "min-w-0 flex-1",
91
- children: [/* @__PURE__ */ v("h3", {
92
- className: "truncate text-base font-semibold text-text-primary",
93
- children: e.title
94
- }), /* @__PURE__ */ y("p", {
95
- className: "truncate text-xs text-text-secondary",
96
- children: [
97
- e.brand?.name ?? C("coolandlovely.common.brand", "Brand"),
98
- " ×",
99
- " ",
100
- /* @__PURE__ */ v(f, { id: e.creatorId })
101
- ]
102
- })]
103
- }),
104
- /* @__PURE__ */ v(a, { status: e.status })
105
- ]
106
- }),
107
- e.brief && /* @__PURE__ */ v("p", {
108
- className: "mt-3 line-clamp-2 text-sm text-text-secondary",
109
- children: e.brief
110
- }),
111
- /* @__PURE__ */ y("div", {
112
- className: "mt-3 flex items-center justify-between text-xs text-text-secondary",
113
- children: [/* @__PURE__ */ v("span", {
114
- className: "rounded-full bg-bg-sunken px-2 py-0.5",
115
- children: C(`coolandlovely.role.${e.role.toLowerCase()}`, u(e.role))
116
- }), /* @__PURE__ */ v("span", { children: l(e.compensation, e.currency) })]
117
- }),
118
- e.startDate && /* @__PURE__ */ y("p", {
119
- className: "mt-2 text-xs text-text-secondary",
120
- children: [
121
- C("coolandlovely.common.starts", "Starts"),
122
- " ",
123
- c(e.startDate, {
124
- hour: void 0,
125
- minute: void 0
126
- })
127
- ]
128
- })
129
- ]
130
- }, e.id))
131
- })]
140
+ ]
132
141
  });
133
142
  }
134
143
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"sourcesContent":["/**\n * Collaborations List Page\n * @module coolandlovely/pages/collaborations\n *\n * Lists brand × creator partnerships (`cooListCollaborations`) with status\n * filter.\n */\n\nimport { useMemo, useState } from 'react';\nimport { Plus, Handshake } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { BrandCreatorAvatars } from '../../components/BrandCreatorAvatars';\nimport { ActorName } from '../../components/ActorName';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useCollaborations, useTr } from '../../hooks';\nimport { formatPrice, formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\nimport type { CooCollaborationStatus } from '../../types';\n\nconst STATUS_ORDER: CooCollaborationStatus[] = [\n 'PROPOSED',\n 'ACCEPTED',\n 'IN_PROGRESS',\n 'PUBLISHED',\n 'DECLINED',\n 'CANCELLED',\n];\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\nexport function CollaborationsListPage() {\n const { navigateTo } = useCoolAndLovely();\n const tr = useTr();\n const [status, setStatus] = useState<CooCollaborationStatus | 'ALL'>('ALL');\n\n const statusOptions = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('coolandlovely.filters.all', 'All') },\n ...STATUS_ORDER.map((value) => ({\n value,\n label: tr(`coolandlovely.status.${value.toLowerCase()}`, formatStatusLabel(value)),\n })),\n ],\n [tr]\n );\n\n const query = useCollaborations({ status: status === 'ALL' ? undefined : status });\n const collaborations = query.data ?? [];\n\n return (\n <PageLayout\n title={tr('coolandlovely.page.collaborationsTitle', 'Collaborations')}\n description={tr(\n 'coolandlovely.page.collaborationsSubtitle',\n 'Brand × creator partnerships with a real lifecycle'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n >\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {statusOptions.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView\n label={tr('coolandlovely.loading.collaborations', 'Loading collaborations…')}\n />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collaborations.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Handshake className=\"h-10 w-10\" />}\n title={tr('coolandlovely.empty.collaborationsTitle', 'No collaborations yet')}\n description={tr(\n 'coolandlovely.empty.collaborationsDescription',\n 'Propose a brand × creator partnership to get started.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collaborations.map((c) => (\n <button\n key={c.id}\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${c.id}`)}\n className=\"flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md\"\n >\n <div className=\"flex items-start gap-3\">\n <BrandCreatorAvatars\n brandLogoFileId={c.brand?.logo?.id}\n brandSeed={c.brandId}\n creatorId={c.creatorId}\n size=\"sm\"\n className=\"shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary\">{c.title}</h3>\n <p className=\"truncate text-xs text-text-secondary\">\n {c.brand?.name ?? tr('coolandlovely.common.brand', 'Brand')} ×{' '}\n <ActorName id={c.creatorId} />\n </p>\n </div>\n <StatusBadge status={c.status} />\n </div>\n {c.brief && (\n <p className=\"mt-3 line-clamp-2 text-sm text-text-secondary\">{c.brief}</p>\n )}\n <div className=\"mt-3 flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"rounded-full bg-bg-sunken px-2 py-0.5\">\n {tr(`coolandlovely.role.${c.role.toLowerCase()}`, titleCase(c.role))}\n </span>\n <span>{formatPrice(c.compensation, c.currency)}</span>\n </div>\n {c.startDate && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {tr('coolandlovely.common.starts', 'Starts')}{' '}\n {formatDate(c.startDate, { hour: undefined, minute: undefined })}\n </p>\n )}\n </button>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,IAAM,IAAyC;CAC7C;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAS,EAAkB,GAAwB;CACjD,OAAO,EAAO,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,UAAU,MAAM,EAAE,YAAY,CAAC;AAC1E;AAEA,SAAgB,IAAyB;CACvC,IAAM,EAAE,kBAAe,EAAiB,GAClC,IAAK,EAAM,GACX,CAAC,GAAQ,KAAa,EAAyC,KAAK,GAEpE,IAAgB,QACd,CACJ;EAAE,OAAO;EAAgB,OAAO,EAAG,6BAA6B,KAAK;CAAE,GACvE,GAAG,EAAa,KAAK,OAAW;EAC9B;EACA,OAAO,EAAG,wBAAwB,EAAM,YAAY,KAAK,EAAkB,CAAK,CAAC;CACnF,EAAE,CACJ,GACA,CAAC,CAAE,CACL,GAEM,IAAQ,EAAkB,EAAE,QAAQ,MAAW,QAAQ,KAAA,IAAY,EAAO,CAAC,GAC3E,IAAiB,EAAM,QAAQ,CAAC;CAEtC,OACE,kBAAC,GAAD;EACE,OAAO,EAAG,0CAA0C,gBAAgB;E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Af,CACE,kBAAC,MAAD;SAAI,WAAU;mBAAsD,EAAE;QAAU,CAAA,GAChF,kBAAC,KAAD;SAAG,WAAU;mBAAb;UACG,EAAE,OAAO,QAAQ,EAAG,8BAA8B,OAAO;UAAE;UAAG;UAC/D,kBAAC,GAAD,EAAW,IAAI,EAAE,UAAY,CAAA;SAC5B;UACA;;OACL,kBAAC,GAAD,EAAa,QAAQ,EAAE,OAAS,CAAA;MAC7B;;KACJ,EAAE,SACD,kBAAC,KAAD;MAAG,WAAU;gBAAiD,EAAE;KAAS,CAAA;KAE3E,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBACb,EAAG,sBAAsB,EAAE,KAAK,YAAY,KAAK,EAAU,EAAE,IAAI,CAAC;MAC/D,CAAA,GACN,kBAAC,QAAD,EAAA,UAAO,EAAY,EAAE,cAAc,EAAE,QAAQ,EAAQ,CAAA,CAClD;;KACJ,EAAE,aACD,kBAAC,KAAD;MAAG,WAAU;gBAAb;OACG,EAAG,+BAA+B,QAAQ;OAAG;OAC7C,EAAW,EAAE,WAAW;QAAE,MAAM,KAAA;QAAW,QAAQ,KAAA;OAAU,CAAC;MAC9D;;IAEC;MArCD,EAAE,EAqCD,CACT;EACE,CAAA,CAEG;;AAEhB"}
1
+ {"version":3,"file":"CollaborationsListPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"sourcesContent":["/**\n * Collaborations List Page\n * @module coolandlovely/pages/collaborations\n *\n * Lists brand × creator partnerships (`cooListCollaborations`) with status\n * filter.\n */\n\nimport { useContextNavigation } from '../../hooks/useContextNavigation';\nimport { useMemo, useState } from 'react';\nimport { Plus, Handshake } from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { BrandCreatorAvatars } from '../../components/BrandCreatorAvatars';\nimport { ActorName } from '../../components/ActorName';\nimport { useCollaborations, useTr } from '../../hooks';\nimport { formatPrice, formatDate, titleCase } from '../../utils/formatters';\nimport { cn } from '../../utils/cn';\nimport type { CooCollaborationStatus } from '../../types';\n\nconst STATUS_ORDER: CooCollaborationStatus[] = [\n 'PROPOSED',\n 'ACCEPTED',\n 'IN_PROGRESS',\n 'PUBLISHED',\n 'DECLINED',\n 'CANCELLED',\n];\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\n\nexport function CollaborationsListPage() {\n const navigateTo = useContextNavigation();\n const tr = useTr();\n const [status, setStatus] = useState<CooCollaborationStatus | 'ALL'>('ALL');\n\n const statusOptions = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('coolandlovely.filters.all', 'All') },\n ...STATUS_ORDER.map((value) => ({\n value,\n label: tr(`coolandlovely.status.${value.toLowerCase()}`, formatStatusLabel(value)),\n })),\n ],\n [tr]\n );\n\n const query = useCollaborations({ status: status === 'ALL' ? undefined : status });\n const collaborations = query.data ?? [];\n\n return (\n <PageLayout\n title={tr('coolandlovely.page.collaborationsTitle', 'Collaborations')}\n description={tr(\n 'coolandlovely.page.collaborationsSubtitle',\n 'Brand × creator partnerships with a real lifecycle'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n >\n <button\n type=\"button\"\n className=\"mb-4 rounded-lg border border-border-seam px-4 py-2 text-sm text-text-primary\"\n onClick={() => navigateTo('/creator-marketplace')}\n >\n {tr('coolandlovely.marketplace.open', 'Open creator marketplace')}\n </button>\n <div className=\"mb-6 flex flex-wrap items-center gap-2\">\n {statusOptions.map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => setStatus(opt.value)}\n className={cn(\n 'rounded-full px-3 py-1.5 text-sm font-medium transition-colors',\n status === opt.value\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-secondary hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n\n {query.isLoading ? (\n <LoadingView\n label={tr('coolandlovely.loading.collaborations', 'Loading collaborations…')}\n />\n ) : query.isError ? (\n <ErrorView onRetry={() => void query.refetch()} />\n ) : collaborations.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Handshake className=\"h-10 w-10\" />}\n title={tr('coolandlovely.empty.collaborationsTitle', 'No collaborations yet')}\n description={tr(\n 'coolandlovely.empty.collaborationsDescription',\n 'Propose a brand × creator partnership to get started.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/collaborations/new')}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text\"\n >\n <Plus className=\"h-4 w-4\" />{' '}\n {tr('coolandlovely.actions.newCollaboration', 'New collaboration')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {collaborations.map((c) => (\n <button\n key={c.id}\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${c.id}`)}\n className=\"flex flex-col rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all hover:border-accent-foreground/20 hover:shadow-md\"\n >\n <div className=\"flex items-start gap-3\">\n <BrandCreatorAvatars\n brandLogoFileId={c.brand?.logo?.id}\n brandSeed={c.brandId}\n creatorId={c.creatorId}\n size=\"sm\"\n className=\"shrink-0\"\n />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary\">{c.title}</h3>\n <p className=\"truncate text-xs text-text-secondary\">\n {c.brand?.name ?? tr('coolandlovely.common.brand', 'Brand')} ×{' '}\n <ActorName id={c.creatorId} />\n </p>\n </div>\n <StatusBadge status={c.status} />\n </div>\n {c.brief && (\n <p className=\"mt-3 line-clamp-2 text-sm text-text-secondary\">{c.brief}</p>\n )}\n <div className=\"mt-3 flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"rounded-full bg-bg-sunken px-2 py-0.5\">\n {tr(`coolandlovely.role.${c.role.toLowerCase()}`, titleCase(c.role))}\n </span>\n <span>{formatPrice(c.compensation, c.currency)}</span>\n </div>\n {c.startDate && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {tr('coolandlovely.common.starts', 'Starts')}{' '}\n {formatDate(c.startDate, { hour: undefined, minute: undefined })}\n </p>\n )}\n </button>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,IAAM,IAAyC;CAC7C;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAS,EAAkB,GAAwB;CACjD,OAAO,EAAO,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,UAAU,MAAM,EAAE,YAAY,CAAC;AAC1E;AAEA,SAAgB,IAAyB;CACvC,IAAM,IAAa,EAAqB,GAClC,IAAK,EAAM,GACX,CAAC,GAAQ,KAAa,EAAyC,KAAK,GAEpE,IAAgB,QACd,CACJ;EAAE,OAAO;EAAgB,OAAO,EAAG,6BAA6B,KAAK;CAAE,GACvE,GAAG,EAAa,KAAK,OAAW;EAC9B;EACA,OAAO,EAAG,wBAAwB,EAAM,YAAY,KAAK,EAAkB,CAAK,CAAC;CACnF,EAAE,CACJ,GACA,CAAC,CAAE,CACL,GAEM,IAAQ,EAAkB,EAAE,QAAQ,MAAW,QAAQ,KAAA,IAAY,EAAO,CAAC,GAC3E,IAAiB,EAAM,QAAQ,CAAC;CAEtC,OACE,kBAAC,GAAD;EACE,OAAO,EAAG,0CAA0C,gBAAgB;EACpE,aAAa,EACX,6CACA,oDACF;EACA,SACE,kBAAC,UAAD;GACE,MAAK;GACL,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X,CAAA;QACD,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAAsD,EAAE;SAAU,CAAA,GAChF,kBAAC,KAAD;UAAG,WAAU;oBAAb;WACG,EAAE,OAAO,QAAQ,EAAG,8BAA8B,OAAO;WAAE;WAAG;WAC/D,kBAAC,GAAD,EAAW,IAAI,EAAE,UAAY,CAAA;UAC5B;WACA;;QACL,kBAAC,GAAD,EAAa,QAAQ,EAAE,OAAS,CAAA;OAC7B;;MACJ,EAAE,SACD,kBAAC,KAAD;OAAG,WAAU;iBAAiD,EAAE;MAAS,CAAA;MAE3E,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAG,sBAAsB,EAAE,KAAK,YAAY,KAAK,EAAU,EAAE,IAAI,CAAC;OAC/D,CAAA,GACN,kBAAC,QAAD,EAAA,UAAO,EAAY,EAAE,cAAc,EAAE,QAAQ,EAAQ,CAAA,CAClD;;MACJ,EAAE,aACD,kBAAC,KAAD;OAAG,WAAU;iBAAb;QACG,EAAG,+BAA+B,QAAQ;QAAG;QAC7C,EAAW,EAAE,WAAW;SAAE,MAAM,KAAA;SAAW,QAAQ,KAAA;QAAU,CAAC;OAC9D;;KAEC;OArCD,EAAE,EAqCD,CACT;GACE,CAAA;EAEG;;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreatorEarningsPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH,wBAAgB,mBAAmB,gCA8QlC"}
1
+ {"version":3,"file":"CreatorEarningsPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH,wBAAgB,mBAAmB,gCAuRlC"}
@@ -1,14 +1,14 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { useTr as i } from "../../hooks/useTr.js";
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { MetricsCard as n } from "../../components/MetricsCard.js";
4
+ import { useTr as r } from "../../hooks/useTr.js";
6
5
  import "../../hooks/index.js";
7
- import { StatusBadge as a } from "../../components/StatusBadge.js";
8
- import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
9
- import { formatDate as c, formatPrice as l } from "../../utils/formatters.js";
10
- import { EmptyState as u } from "../../components/EmptyState.js";
11
- import { TextField as d } from "../../components/Field.js";
6
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
7
+ import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
8
+ import { formatDate as s, formatPrice as c } from "../../utils/formatters.js";
9
+ import { EmptyState as l } from "../../components/EmptyState.js";
10
+ import { TextField as u } from "../../components/Field.js";
11
+ import { useContextNavigation as d } from "../../hooks/useContextNavigation.js";
12
12
  import { useMyCollaborationPayouts as f, useMyCreatorEarnings as p, useMyCreatorEarningsSummary as m, useRequestCreatorPayout as h } from "../../hooks/useCommerceApi.js";
13
13
  import { CreatorAnalyticsSection as g } from "./CreatorAnalyticsSection.js";
14
14
  import { useState as _ } from "react";
@@ -17,49 +17,58 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";
17
17
  import { GlassCard as S } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx
19
19
  function C() {
20
- let C = i(), w = m(), T = p(), E = f(), D = h(), { navigateTo: O } = e(), [k, A] = _(""), j = C("coolandlovely.earnings.title", "Creator earnings");
21
- if (w.isLoading || T.isLoading) return /* @__PURE__ */ b(n, {
20
+ let C = r(), w = m(), T = p(), E = f(), D = h(), O = d(), [k, A] = _(""), j = C("coolandlovely.earnings.title", "Creator earnings");
21
+ if (w.isLoading || T.isLoading) return /* @__PURE__ */ b(t, {
22
22
  title: j,
23
- children: /* @__PURE__ */ b(s, {})
23
+ children: /* @__PURE__ */ b(o, {})
24
24
  });
25
- if (w.isError || T.isError || !w.data || !T.data) return /* @__PURE__ */ b(n, {
25
+ if (w.isError || T.isError || !w.data || !T.data) return /* @__PURE__ */ b(t, {
26
26
  title: j,
27
- children: /* @__PURE__ */ b(o, { onRetry: () => {
27
+ children: /* @__PURE__ */ b(a, { onRetry: () => {
28
28
  w.refetch(), T.refetch();
29
29
  } })
30
30
  });
31
31
  let M = w.data, N = M.currency ?? "USD", P = Number(k), F = M.currency !== null && P > 0 && P <= M.availableAmount;
32
- return /* @__PURE__ */ x(n, {
32
+ return /* @__PURE__ */ x(t, {
33
33
  title: j,
34
34
  description: C("coolandlovely.earnings.description", "You earn {{rate}}% of every piece bought from your looks, and the agreed fee of every collaboration a brand pays. Commissions become available {{days}} days after payment.", {
35
35
  rate: Math.round(M.commissionRate * 100),
36
36
  days: M.holdDays
37
37
  }),
38
38
  children: [
39
+ /* @__PURE__ */ b("div", {
40
+ className: "mb-5",
41
+ children: /* @__PURE__ */ b("button", {
42
+ type: "button",
43
+ className: "rounded-lg border border-border-seam px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken",
44
+ onClick: () => O("/creator-marketplace"),
45
+ children: C("coolandlovely.marketplace.open", "Open creator marketplace")
46
+ })
47
+ }),
39
48
  /* @__PURE__ */ b(g, {}),
40
49
  /* @__PURE__ */ x("div", {
41
50
  className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
42
51
  "data-testid": "earnings-summary",
43
52
  children: [
44
- /* @__PURE__ */ b(r, {
53
+ /* @__PURE__ */ b(n, {
45
54
  icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
46
55
  label: C("coolandlovely.earnings.available", "Available"),
47
- value: l(M.availableAmount, N)
56
+ value: c(M.availableAmount, N)
48
57
  }),
49
- /* @__PURE__ */ b(r, {
58
+ /* @__PURE__ */ b(n, {
50
59
  icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
51
60
  label: C("coolandlovely.earnings.pending", "In return window"),
52
- value: l(M.pendingAmount, N)
61
+ value: c(M.pendingAmount, N)
53
62
  }),
54
- /* @__PURE__ */ b(r, {
63
+ /* @__PURE__ */ b(n, {
55
64
  icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
56
65
  label: C("coolandlovely.earnings.reserved", "Payout requested"),
57
- value: l(M.reservedAmount, N)
66
+ value: c(M.reservedAmount, N)
58
67
  }),
59
- /* @__PURE__ */ b(r, {
68
+ /* @__PURE__ */ b(n, {
60
69
  icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
61
70
  label: C("coolandlovely.earnings.paid", "Paid out"),
62
- value: l(M.paidAmount, N)
71
+ value: c(M.paidAmount, N)
63
72
  })
64
73
  ]
65
74
  }),
@@ -74,7 +83,7 @@ function C() {
74
83
  children: [/* @__PURE__ */ b("h3", {
75
84
  className: "mb-3 text-lg font-semibold text-text-primary",
76
85
  children: C("coolandlovely.earnings.history", "Commission history")
77
- }), T.data.items.length === 0 ? /* @__PURE__ */ b(u, {
86
+ }), T.data.items.length === 0 ? /* @__PURE__ */ b(l, {
78
87
  icon: /* @__PURE__ */ b(y, { className: "h-8 w-8" }),
79
88
  title: C("coolandlovely.earnings.emptyTitle", "No commissions yet"),
80
89
  description: C("coolandlovely.earnings.emptyDescription", "Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.")
@@ -106,24 +115,24 @@ function C() {
106
115
  children: C("coolandlovely.earnings.ledger", "Ledger")
107
116
  })
108
117
  ] })
109
- }), /* @__PURE__ */ b("tbody", { children: T.data.items.map((e) => /* @__PURE__ */ x("tr", {
118
+ }), /* @__PURE__ */ b("tbody", { children: T.data.items.map((t) => /* @__PURE__ */ x("tr", {
110
119
  className: "border-t border-border-seam",
111
120
  children: [
112
121
  /* @__PURE__ */ b("td", {
113
122
  className: "px-4 py-2 font-mono text-text-primary",
114
- children: e.orderNumber ?? "—"
123
+ children: t.orderNumber ?? "—"
115
124
  }),
116
125
  /* @__PURE__ */ b("td", {
117
126
  className: "px-4 py-2 text-right tabular-nums text-text-secondary",
118
- children: l(e.saleAmount, e.currency)
127
+ children: c(t.saleAmount, t.currency)
119
128
  }),
120
129
  /* @__PURE__ */ b("td", {
121
- className: t("px-4 py-2 text-right font-semibold tabular-nums text-text-primary", e.reversalStatus === "REVERSED" && "text-text-secondary line-through"),
122
- children: l(e.amount, e.currency)
130
+ className: e("px-4 py-2 text-right font-semibold tabular-nums text-text-primary", t.reversalStatus === "REVERSED" && "text-text-secondary line-through"),
131
+ children: c(t.amount, t.currency)
123
132
  }),
124
133
  /* @__PURE__ */ b("td", {
125
134
  className: "px-4 py-2 text-text-secondary",
126
- children: c(e.availableAt, {
135
+ children: s(t.availableAt, {
127
136
  hour: void 0,
128
137
  minute: void 0
129
138
  })
@@ -131,10 +140,10 @@ function C() {
131
140
  /* @__PURE__ */ b("td", {
132
141
  className: "px-4 py-2",
133
142
  "data-testid": "earning-ledger-status",
134
- children: /* @__PURE__ */ b(a, { status: e.reversalStatus === "REVERSED" || e.reversalStatus === "NOT_REVERSIBLE" ? e.reversalStatus : e.billingSyncStatus })
143
+ children: /* @__PURE__ */ b(i, { status: t.reversalStatus === "REVERSED" || t.reversalStatus === "NOT_REVERSIBLE" ? t.reversalStatus : t.billingSyncStatus })
135
144
  })
136
145
  ]
137
- }, e.id)) })]
146
+ }, t.id)) })]
138
147
  })
139
148
  })]
140
149
  }), /* @__PURE__ */ x(S, {
@@ -149,13 +158,13 @@ function C() {
149
158
  className: "text-sm text-text-secondary",
150
159
  children: C("coolandlovely.earnings.requestHint", "Payouts are reviewed by the platform and sent to the payout account on your billing profile.")
151
160
  }),
152
- /* @__PURE__ */ b(d, {
161
+ /* @__PURE__ */ b(u, {
153
162
  id: "coo-payout-amount",
154
163
  type: "number",
155
164
  label: C("coolandlovely.earnings.amount", "Amount ({{currency}})", { currency: N }),
156
165
  value: k,
157
166
  onChange: A,
158
- hint: C("coolandlovely.earnings.maxHint", "Up to {{amount}}", { amount: l(M.availableAmount, N) })
167
+ hint: C("coolandlovely.earnings.maxHint", "Up to {{amount}}", { amount: c(M.availableAmount, N) })
159
168
  }),
160
169
  D.error && /* @__PURE__ */ b("p", {
161
170
  className: "text-sm text-status-error-text",
@@ -164,7 +173,7 @@ function C() {
164
173
  D.data && /* @__PURE__ */ b("p", {
165
174
  className: "text-sm text-status-success-text",
166
175
  children: C("coolandlovely.earnings.requested", "Payout of {{amount}} requested ({{status}}).", {
167
- amount: l(D.data.requestedAmount, D.data.currency),
176
+ amount: c(D.data.requestedAmount, D.data.currency),
168
177
  status: D.data.status
169
178
  })
170
179
  }),
@@ -235,22 +244,22 @@ function C() {
235
244
  }),
236
245
  /* @__PURE__ */ b("td", {
237
246
  className: "px-4 py-2 text-right font-semibold tabular-nums text-text-primary",
238
- children: l(e.amount, e.currency)
247
+ children: c(e.amount, e.currency)
239
248
  }),
240
249
  /* @__PURE__ */ b("td", {
241
250
  className: "px-4 py-2",
242
- children: /* @__PURE__ */ b(a, { status: e.status })
251
+ children: /* @__PURE__ */ b(i, { status: e.status })
243
252
  }),
244
253
  /* @__PURE__ */ b("td", {
245
254
  className: "px-4 py-2 text-text-secondary",
246
- children: e.earningAvailableAt ? c(e.earningAvailableAt, {
255
+ children: e.earningAvailableAt ? s(e.earningAvailableAt, {
247
256
  hour: void 0,
248
257
  minute: void 0
249
258
  }) : "—"
250
259
  }),
251
260
  /* @__PURE__ */ b("td", {
252
261
  className: "px-4 py-2",
253
- children: e.earningSyncStatus ? /* @__PURE__ */ b(a, { status: e.earningSyncStatus }) : "—"
262
+ children: e.earningSyncStatus ? /* @__PURE__ */ b(i, { status: e.earningSyncStatus }) : "—"
254
263
  })
255
264
  ]
256
265
  }, e.id)) })]
@@ -1 +1 @@
1
- {"version":3,"file":"CreatorEarningsPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"sourcesContent":["/**\n * Creator Earnings Page (BOFF-3370)\n * @module coolandlovely/pages/commerce\n *\n * A creator's look commissions: every piece bought from one of their published looks earns\n * them a commission once the order is paid. Balances come from global-billing's earnings\n * ledger (`cooMyCreatorEarningsSummary`); a creator can ask for a payout of the available\n * balance (`cooRequestCreatorPayout`), which billing queues for payout review.\n *\n * Collaboration fees (BOFF-9637): when a brand pays the agreed fee of a published collaboration,\n * it lands here too (`cooMyCollaborationPayouts`) and counts towards the same payable balance.\n */\n\nimport { useState } from 'react';\nimport { Loader2, Wallet } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { CreatorAnalyticsSection } from './CreatorAnalyticsSection';\n\nimport { EmptyState } from '../../components/EmptyState';\nimport { TextField } from '../../components/Field';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { useTr } from '../../hooks';\nimport {\n useMyCollaborationPayouts,\n useMyCreatorEarnings,\n useMyCreatorEarningsSummary,\n useRequestCreatorPayout,\n} from '../../hooks/useCommerceApi';\nimport { cn } from '../../utils/cn';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { formatDate, formatPrice } from '../../utils/formatters';\n\nexport function CreatorEarningsPage() {\n const tr = useTr();\n const summary = useMyCreatorEarningsSummary();\n const earnings = useMyCreatorEarnings();\n const fees = useMyCollaborationPayouts();\n const payout = useRequestCreatorPayout();\n const { navigateTo } = useCoolAndLovely();\n const [amount, setAmount] = useState('');\n const title = tr('coolandlovely.earnings.title', 'Creator earnings');\n\n if (summary.isLoading || earnings.isLoading) {\n return (\n <PageLayout title={title}>\n <LoadingView />\n </PageLayout>\n );\n }\n if (summary.isError || earnings.isError || !summary.data || !earnings.data) {\n return (\n <PageLayout title={title}>\n <ErrorView\n onRetry={() => {\n void summary.refetch();\n void earnings.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const s = summary.data;\n const currency = s.currency ?? 'USD';\n const requested = Number(amount);\n const canRequest = s.currency !== null && requested > 0 && requested <= s.availableAmount;\n\n return (\n <PageLayout\n title={title}\n description={tr(\n 'coolandlovely.earnings.description',\n 'You earn {{rate}}% of every piece bought from your looks, and the agreed fee of every collaboration a brand pays. Commissions become available {{days}} days after payment.',\n { rate: Math.round(s.commissionRate * 100), days: s.holdDays }\n )}\n >\n <CreatorAnalyticsSection />\n <div\n className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\"\n data-testid=\"earnings-summary\"\n >\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.available', 'Available')}\n value={formatPrice(s.availableAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.pending', 'In return window')}\n value={formatPrice(s.pendingAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.reserved', 'Payout requested')}\n value={formatPrice(s.reservedAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.paid', 'Paid out')}\n value={formatPrice(s.paidAmount, currency)}\n />\n </div>\n {!s.billingAvailable && (\n <p className=\"mt-3 text-sm text-status-warning-text\">\n {tr(\n 'coolandlovely.earnings.billingUnavailable',\n 'Balances could not be confirmed with billing just now; the figures above come from your commission history.'\n )}\n </p>\n )}\n\n <div className=\"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <section className=\"lg:col-span-2\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.history', 'Commission history')}\n </h3>\n {earnings.data.items.length === 0 ? (\n <EmptyState\n icon={<Wallet className=\"h-8 w-8\" />}\n title={tr('coolandlovely.earnings.emptyTitle', 'No commissions yet')}\n description={tr(\n 'coolandlovely.earnings.emptyDescription',\n 'Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.'\n )}\n />\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.order', 'Order')}</th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.sale', 'Sale')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.commission', 'Commission')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {earnings.data.items.map((earning) => (\n <tr key={earning.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2 font-mono text-text-primary\">\n {earning.orderNumber ?? '—'}\n </td>\n <td className=\"px-4 py-2 text-right tabular-nums text-text-secondary\">\n {formatPrice(earning.saleAmount, earning.currency)}\n </td>\n <td\n className={cn(\n 'px-4 py-2 text-right font-semibold tabular-nums text-text-primary',\n earning.reversalStatus === 'REVERSED' &&\n 'text-text-secondary line-through'\n )}\n >\n {formatPrice(earning.amount, earning.currency)}\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {formatDate(earning.availableAt, { hour: undefined, minute: undefined })}\n </td>\n <td className=\"px-4 py-2\" data-testid=\"earning-ledger-status\">\n {/* A refunded line's commission is reversed (BOFF-9702). */}\n <StatusBadge\n status={\n earning.reversalStatus === 'REVERSED' ||\n earning.reversalStatus === 'NOT_REVERSIBLE'\n ? earning.reversalStatus\n : earning.billingSyncStatus\n }\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n\n <GlassCard treatment=\"glass\" className=\"h-fit space-y-4 p-6\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.requestTitle', 'Request a payout')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'coolandlovely.earnings.requestHint',\n 'Payouts are reviewed by the platform and sent to the payout account on your billing profile.'\n )}\n </p>\n <TextField\n id=\"coo-payout-amount\"\n type=\"number\"\n label={tr('coolandlovely.earnings.amount', 'Amount ({{currency}})', { currency })}\n value={amount}\n onChange={setAmount}\n hint={tr('coolandlovely.earnings.maxHint', 'Up to {{amount}}', {\n amount: formatPrice(s.availableAmount, currency),\n })}\n />\n {payout.error && <p className=\"text-sm text-status-error-text\">{payout.error.message}</p>}\n {payout.data && (\n <p className=\"text-sm text-status-success-text\">\n {tr(\n 'coolandlovely.earnings.requested',\n 'Payout of {{amount}} requested ({{status}}).',\n {\n amount: formatPrice(payout.data.requestedAmount, payout.data.currency),\n status: payout.data.status,\n }\n )}\n </p>\n )}\n <button\n type=\"button\"\n disabled={!canRequest || payout.isPending}\n onClick={() =>\n payout.mutate({ amount: requested, currency }, { onSuccess: () => setAmount('') })\n }\n className=\"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\"\n >\n {payout.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('coolandlovely.earnings.requestButton', 'Request payout')}\n </button>\n </GlassCard>\n </div>\n\n <section className=\"mt-8\" data-testid=\"collaboration-fees\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.feesTitle', 'Collaboration fees')}\n </h3>\n {fees.isError ? (\n <p className=\"text-sm text-status-error-text\">\n {tr('coolandlovely.earnings.feesError', 'Collaboration fees could not be loaded.')}\n </p>\n ) : !fees.data || fees.data.items.length === 0 ? (\n <p className=\"rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary\">\n {fees.isLoading\n ? tr('coolandlovely.earnings.feesLoading', 'Loading collaboration fees…')\n : tr(\n 'coolandlovely.earnings.feesEmpty',\n 'When a brand pays the agreed fee of a published collaboration, it shows up here.'\n )}\n </p>\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.collaboration', 'Collaboration')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.fee', 'Fee')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.brandPayment', 'Brand payment')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {fees.data.items.map((fee) => (\n <tr key={fee.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${fee.collaborationId}`)}\n className=\"text-left font-medium text-text-primary hover:underline\"\n >\n {fee.collaborationTitle ?? '—'}\n </button>\n </td>\n <td className=\"px-4 py-2 text-right font-semibold tabular-nums text-text-primary\">\n {formatPrice(fee.amount, fee.currency)}\n </td>\n <td className=\"px-4 py-2\">\n <StatusBadge status={fee.status} />\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {fee.earningAvailableAt\n ? formatDate(fee.earningAvailableAt, { hour: undefined, minute: undefined })\n : '—'}\n </td>\n <td className=\"px-4 py-2\">\n {fee.earningSyncStatus ? <StatusBadge status={fee.earningSyncStatus} /> : '—'}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,SAAgB,IAAsB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,EAAK,KAAK,MAAM,KAAK,MACpB,kBAAC,MAAD;OAAiB,WAAU;iBAA3B;QACE,kBAAC,MAAD;SAAI,WAAU;mBACZ,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAW,mBAAmB,EAAI,iBAAiB;UAClE,WAAU;oBAET,EAAI,sBAAsB;SACrB,CAAA;QACN,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAY,EAAI,QAAQ,EAAI,QAAQ;QACnC,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACZ,kBAAC,GAAD,EAAa,QAAQ,EAAI,OAAS,CAAA;QAChC,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAI,qBACD,EAAW,EAAI,oBAAoB;UAAE,MAAM,KAAA;UAAW,QAAQ,KAAA;SAAU,CAAC,IACzE;QACF,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAI,oBAAoB,kBAAC,GAAD,EAAa,QAAQ,EAAI,kBAAoB,CAAA,IAAI;QACxE,CAAA;OACF;SAxBK,EAAI,EAwBT,CACL,EACI,CAAA,CACF;;IACJ,CAAA,CAEA;;EACC;;AAEhB"}
1
+ {"version":3,"file":"CreatorEarningsPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"sourcesContent":["/**\n * Creator Earnings Page (BOFF-3370)\n * @module coolandlovely/pages/commerce\n *\n * A creator's look commissions: every piece bought from one of their published looks earns\n * them a commission once the order is paid. Balances come from global-billing's earnings\n * ledger (`cooMyCreatorEarningsSummary`); a creator can ask for a payout of the available\n * balance (`cooRequestCreatorPayout`), which billing queues for payout review.\n *\n * Collaboration fees (BOFF-9637): when a brand pays the agreed fee of a published collaboration,\n * it lands here too (`cooMyCollaborationPayouts`) and counts towards the same payable balance.\n */\n\nimport { useContextNavigation } from '../../hooks/useContextNavigation';\nimport { useState } from 'react';\nimport { Loader2, Wallet } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { CreatorAnalyticsSection } from './CreatorAnalyticsSection';\n\nimport { EmptyState } from '../../components/EmptyState';\nimport { TextField } from '../../components/Field';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { useTr } from '../../hooks';\nimport {\n useMyCollaborationPayouts,\n useMyCreatorEarnings,\n useMyCreatorEarningsSummary,\n useRequestCreatorPayout,\n} from '../../hooks/useCommerceApi';\nimport { cn } from '../../utils/cn';\nimport { formatDate, formatPrice } from '../../utils/formatters';\n\nexport function CreatorEarningsPage() {\n const tr = useTr();\n const summary = useMyCreatorEarningsSummary();\n const earnings = useMyCreatorEarnings();\n const fees = useMyCollaborationPayouts();\n const payout = useRequestCreatorPayout();\n const navigateTo = useContextNavigation();\n const [amount, setAmount] = useState('');\n const title = tr('coolandlovely.earnings.title', 'Creator earnings');\n\n if (summary.isLoading || earnings.isLoading) {\n return (\n <PageLayout title={title}>\n <LoadingView />\n </PageLayout>\n );\n }\n if (summary.isError || earnings.isError || !summary.data || !earnings.data) {\n return (\n <PageLayout title={title}>\n <ErrorView\n onRetry={() => {\n void summary.refetch();\n void earnings.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const s = summary.data;\n const currency = s.currency ?? 'USD';\n const requested = Number(amount);\n const canRequest = s.currency !== null && requested > 0 && requested <= s.availableAmount;\n\n return (\n <PageLayout\n title={title}\n description={tr(\n 'coolandlovely.earnings.description',\n 'You earn {{rate}}% of every piece bought from your looks, and the agreed fee of every collaboration a brand pays. Commissions become available {{days}} days after payment.',\n { rate: Math.round(s.commissionRate * 100), days: s.holdDays }\n )}\n >\n <div className=\"mb-5\">\n <button\n type=\"button\"\n className=\"rounded-lg border border-border-seam px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken\"\n onClick={() => navigateTo('/creator-marketplace')}\n >\n {tr('coolandlovely.marketplace.open', 'Open creator marketplace')}\n </button>\n </div>\n <CreatorAnalyticsSection />\n <div\n className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\"\n data-testid=\"earnings-summary\"\n >\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.available', 'Available')}\n value={formatPrice(s.availableAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.pending', 'In return window')}\n value={formatPrice(s.pendingAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.reserved', 'Payout requested')}\n value={formatPrice(s.reservedAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.paid', 'Paid out')}\n value={formatPrice(s.paidAmount, currency)}\n />\n </div>\n {!s.billingAvailable && (\n <p className=\"mt-3 text-sm text-status-warning-text\">\n {tr(\n 'coolandlovely.earnings.billingUnavailable',\n 'Balances could not be confirmed with billing just now; the figures above come from your commission history.'\n )}\n </p>\n )}\n\n <div className=\"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <section className=\"lg:col-span-2\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.history', 'Commission history')}\n </h3>\n {earnings.data.items.length === 0 ? (\n <EmptyState\n icon={<Wallet className=\"h-8 w-8\" />}\n title={tr('coolandlovely.earnings.emptyTitle', 'No commissions yet')}\n description={tr(\n 'coolandlovely.earnings.emptyDescription',\n 'Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.'\n )}\n />\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.order', 'Order')}</th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.sale', 'Sale')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.commission', 'Commission')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {earnings.data.items.map((earning) => (\n <tr key={earning.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2 font-mono text-text-primary\">\n {earning.orderNumber ?? '—'}\n </td>\n <td className=\"px-4 py-2 text-right tabular-nums text-text-secondary\">\n {formatPrice(earning.saleAmount, earning.currency)}\n </td>\n <td\n className={cn(\n 'px-4 py-2 text-right font-semibold tabular-nums text-text-primary',\n earning.reversalStatus === 'REVERSED' &&\n 'text-text-secondary line-through'\n )}\n >\n {formatPrice(earning.amount, earning.currency)}\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {formatDate(earning.availableAt, { hour: undefined, minute: undefined })}\n </td>\n <td className=\"px-4 py-2\" data-testid=\"earning-ledger-status\">\n {/* A refunded line's commission is reversed (BOFF-9702). */}\n <StatusBadge\n status={\n earning.reversalStatus === 'REVERSED' ||\n earning.reversalStatus === 'NOT_REVERSIBLE'\n ? earning.reversalStatus\n : earning.billingSyncStatus\n }\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n\n <GlassCard treatment=\"glass\" className=\"h-fit space-y-4 p-6\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.requestTitle', 'Request a payout')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'coolandlovely.earnings.requestHint',\n 'Payouts are reviewed by the platform and sent to the payout account on your billing profile.'\n )}\n </p>\n <TextField\n id=\"coo-payout-amount\"\n type=\"number\"\n label={tr('coolandlovely.earnings.amount', 'Amount ({{currency}})', { currency })}\n value={amount}\n onChange={setAmount}\n hint={tr('coolandlovely.earnings.maxHint', 'Up to {{amount}}', {\n amount: formatPrice(s.availableAmount, currency),\n })}\n />\n {payout.error && <p className=\"text-sm text-status-error-text\">{payout.error.message}</p>}\n {payout.data && (\n <p className=\"text-sm text-status-success-text\">\n {tr(\n 'coolandlovely.earnings.requested',\n 'Payout of {{amount}} requested ({{status}}).',\n {\n amount: formatPrice(payout.data.requestedAmount, payout.data.currency),\n status: payout.data.status,\n }\n )}\n </p>\n )}\n <button\n type=\"button\"\n disabled={!canRequest || payout.isPending}\n onClick={() =>\n payout.mutate({ amount: requested, currency }, { onSuccess: () => setAmount('') })\n }\n className=\"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\"\n >\n {payout.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('coolandlovely.earnings.requestButton', 'Request payout')}\n </button>\n </GlassCard>\n </div>\n\n <section className=\"mt-8\" data-testid=\"collaboration-fees\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.feesTitle', 'Collaboration fees')}\n </h3>\n {fees.isError ? (\n <p className=\"text-sm text-status-error-text\">\n {tr('coolandlovely.earnings.feesError', 'Collaboration fees could not be loaded.')}\n </p>\n ) : !fees.data || fees.data.items.length === 0 ? (\n <p className=\"rounded-lg border border-border-seam bg-bg-surface p-4 text-sm text-text-secondary\">\n {fees.isLoading\n ? tr('coolandlovely.earnings.feesLoading', 'Loading collaboration fees…')\n : tr(\n 'coolandlovely.earnings.feesEmpty',\n 'When a brand pays the agreed fee of a published collaboration, it shows up here.'\n )}\n </p>\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.collaboration', 'Collaboration')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.fee', 'Fee')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.brandPayment', 'Brand payment')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {fees.data.items.map((fee) => (\n <tr key={fee.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2\">\n <button\n type=\"button\"\n onClick={() => navigateTo(`/collaborations/${fee.collaborationId}`)}\n className=\"text-left font-medium text-text-primary hover:underline\"\n >\n {fee.collaborationTitle ?? '—'}\n </button>\n </td>\n <td className=\"px-4 py-2 text-right font-semibold tabular-nums text-text-primary\">\n {formatPrice(fee.amount, fee.currency)}\n </td>\n <td className=\"px-4 py-2\">\n <StatusBadge status={fee.status} />\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {fee.earningAvailableAt\n ? formatDate(fee.earningAvailableAt, { hour: undefined, minute: undefined })\n : '—'}\n </td>\n <td className=\"px-4 py-2\">\n {fee.earningSyncStatus ? <StatusBadge status={fee.earningSyncStatus} /> : '—'}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,SAAgB,IAAsB;CACpC,IAAM,IAAK,EAAM,GACX,IAAU,EAA4B,GACtC,IAAW,EAAqB,GAChC,IAAO,EAA0B,GACjC,IAAS,EAAwB,GACjC,IAAa,EAAqB,GAClC,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,IAAQ,EAAG,gCAAgC,kBAAkB;CAEnE,IAAI,EAAQ,aAAa,EAAS,WAChC,OACE,kBAAC,GAAD;EAAmB;YACjB,kBAAC,GAAD,CAAc,CAAA;CACJ,CAAA;CAGhB,IAA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ClE,WAAU;oBAET,EAAI,sBAAsB;SACrB,CAAA;QACN,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAY,EAAI,QAAQ,EAAI,QAAQ;QACnC,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACZ,kBAAC,GAAD,EAAa,QAAQ,EAAI,OAAS,CAAA;QAChC,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAI,qBACD,EAAW,EAAI,oBAAoB;UAAE,MAAM,KAAA;UAAW,QAAQ,KAAA;SAAU,CAAC,IACzE;QACF,CAAA;QACJ,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAI,oBAAoB,kBAAC,GAAD,EAAa,QAAQ,EAAI,kBAAoB,CAAA,IAAI;QACxE,CAAA;OACF;SAxBK,EAAI,EAwBT,CACL,EACI,CAAA,CACF;;IACJ,CAAA,CAEA;;EACC;;AAEhB"}
@@ -0,0 +1,2 @@
1
+ export declare function CreatorMarketplacePage(): import("react").JSX.Element;
2
+ //# sourceMappingURL=CreatorMarketplacePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreatorMarketplacePage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/marketplace/CreatorMarketplacePage.tsx"],"names":[],"mappings":"AAyhCA,wBAAgB,sBAAsB,gCAOrC"}