@burdenoff/microfe-headshotmarketing 2026.801.3 → 2026.829.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.
Files changed (81) hide show
  1. package/dist/generated/wspace-operations.d.ts +44 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +30 -4
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/headshotmarketing/HeadshotMarketingRoot.d.ts.map +1 -1
  6. package/dist/headshotmarketing/HeadshotMarketingRoot.js +43 -49
  7. package/dist/headshotmarketing/HeadshotMarketingRoot.js.map +1 -1
  8. package/dist/headshotmarketing/components/DataTable.d.ts.map +1 -1
  9. package/dist/headshotmarketing/components/DataTable.js +87 -79
  10. package/dist/headshotmarketing/components/DataTable.js.map +1 -1
  11. package/dist/headshotmarketing/components/InfluencerModals.d.ts.map +1 -1
  12. package/dist/headshotmarketing/components/InfluencerModals.js +201 -214
  13. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  14. package/dist/headshotmarketing/components/Pagination.js +23 -23
  15. package/dist/headshotmarketing/components/QueryStateBoundary.js +12 -12
  16. package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
  17. package/dist/headshotmarketing/components/StatusBadge.js +2 -0
  18. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  19. package/dist/headshotmarketing/hooks/index.d.ts +1 -0
  20. package/dist/headshotmarketing/hooks/index.d.ts.map +1 -1
  21. package/dist/headshotmarketing/hooks/index.js +1 -0
  22. package/dist/headshotmarketing/pages/HomePage.js +164 -164
  23. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  24. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +59 -29
  25. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdsPage.js +57 -57
  27. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
  28. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +389 -215
  29. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  30. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +5 -5
  31. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts +26 -0
  32. package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts.map +1 -0
  33. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +215 -0
  34. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -0
  35. package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
  36. package/dist/headshotmarketing/pages/content/AIToolsPage.js +396 -379
  37. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  38. package/dist/headshotmarketing/pages/content/AssetLibraryPage.d.ts.map +1 -1
  39. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +436 -343
  40. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.d.ts.map +1 -1
  42. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +233 -223
  43. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/content/ContentPage.js +4 -4
  45. package/dist/headshotmarketing/pages/crm/ContactsPage.d.ts.map +1 -1
  46. package/dist/headshotmarketing/pages/crm/ContactsPage.js +339 -278
  47. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  48. package/dist/headshotmarketing/pages/crm/CrmPage.d.ts.map +1 -1
  49. package/dist/headshotmarketing/pages/crm/CrmPage.js +118 -112
  50. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts +14 -0
  52. package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts.map +1 -0
  53. package/dist/headshotmarketing/pages/crm/CrmSubNav.js +51 -0
  54. package/dist/headshotmarketing/pages/crm/CrmSubNav.js.map +1 -0
  55. package/dist/headshotmarketing/pages/crm/LeadsPage.d.ts.map +1 -1
  56. package/dist/headshotmarketing/pages/crm/LeadsPage.js +122 -116
  57. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  58. package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
  59. package/dist/headshotmarketing/pages/crm/PipelinePage.js +192 -183
  60. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
  62. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +184 -162
  63. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  64. package/dist/headshotmarketing/pages/influencers/InfluencersPage.d.ts.map +1 -1
  65. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +8 -14
  66. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  67. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
  68. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  69. package/dist/headshotmarketing/types/index.d.ts +9 -4
  70. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  71. package/dist/headshotmarketing/utils/contentMapper.js +1 -1
  72. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  73. package/dist/headshotmarketing/utils/influencerMapper.d.ts +16 -2
  74. package/dist/headshotmarketing/utils/influencerMapper.d.ts.map +1 -1
  75. package/dist/headshotmarketing/utils/influencerMapper.js +56 -40
  76. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  77. package/dist/shared/hooks/useTr.d.ts +17 -0
  78. package/dist/shared/hooks/useTr.d.ts.map +1 -0
  79. package/dist/shared/hooks/useTr.js +14 -0
  80. package/dist/shared/hooks/useTr.js.map +1 -0
  81. package/package.json +2 -2
@@ -8,39 +8,44 @@ import { Area as o } from "../../../node_modules/recharts/es6/cartesian/Area.js"
8
8
  import { XAxis as s } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
9
9
  import { YAxis as c } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
10
10
  import { BarChart as l } from "../../../node_modules/recharts/es6/chart/BarChart.js";
11
- import { AreaChart as u } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
12
- import { cn as d, formatCurrency as f, formatNumber as p, formatPercentage as m } from "../../utils/helpers.js";
13
- import { toCampaignModel as ee } from "../../utils/campaignMapper.js";
14
- import { toAdCampaignModel as h } from "../../utils/adsMapper.js";
15
- import { toCampaignTimeSeries as g, toChannelPerformance as _, toDeviceData as v, toFunnelStages as te, toGeographicData as y } from "../../utils/analyticsMapper.js";
16
- import { PageLayout as b } from "../../components/PageLayout.js";
17
- import { StatCard as x } from "../../components/StatCard.js";
18
- import { DataTable as S } from "../../components/DataTable.js";
19
- import { ChartCard as C } from "../../components/ChartCard.js";
20
- import { QueryStateBoundary as w } from "../../components/QueryStateBoundary.js";
11
+ import { AreaChart as ee } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
12
+ import { cn as te, formatCurrency as u, formatNumber as d, formatPercentage as f } from "../../utils/helpers.js";
13
+ import { toCampaignModel as ne } from "../../utils/campaignMapper.js";
14
+ import { toAdCampaignModel as p } from "../../utils/adsMapper.js";
15
+ import { toCampaignTimeSeries as m, toChannelPerformance as h, toDeviceData as g, toFunnelStages as _, toGeographicData as v } from "../../utils/analyticsMapper.js";
16
+ import { PageLayout as y } from "../../components/PageLayout.js";
17
+ import { StatCard as b } from "../../components/StatCard.js";
18
+ import { DataTable as x } from "../../components/DataTable.js";
19
+ import { ChartCard as S } from "../../components/ChartCard.js";
20
+ import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
21
21
  import "../../components/index.js";
22
- import { useHeadshotmarketingBootstrap as T } from "../../hooks/useHeadshotmarketingBootstrap.js";
23
- import { toSocialAccountModel as ne } from "../../utils/socialMapper.js";
24
- import { useState as re } from "react";
25
- import { ArrowRightLeft as ie, CreditCard as ae, DollarSign as E, Eye as D, Globe as O, Monitor as k, MousePointerClick as A, Percent as j, Smartphone as M, Tablet as N, Target as P, TrendingUp as F } from "lucide-react";
26
- import { jsx as I, jsxs as L } from "react/jsx-runtime";
27
- import { EmphasisPanel as R, NextSteps as z, PagePurpose as B } from "@burdenoff/fe-libs/ui";
22
+ import { useHeadshotmarketingBootstrap as ie } from "../../hooks/useHeadshotmarketingBootstrap.js";
23
+ import { toSocialAccountModel as ae } from "../../utils/socialMapper.js";
24
+ import { useState as oe } from "react";
25
+ import { ArrowRightLeft as se, CreditCard as ce, DollarSign as C, Eye as le, Gauge as ue, Globe as de, Monitor as w, MousePointerClick as T, Percent as E, Smartphone as D, Tablet as O, Target as k, TrendingUp as A, Trophy as j, Wallet as M } from "lucide-react";
26
+ import { jsx as N, jsxs as P } from "react/jsx-runtime";
27
+ import { EmphasisPanel as F, NextSteps as I, PagePurpose as L } from "@burdenoff/fe-libs/ui";
28
28
  //#region src/headshotmarketing/pages/analytics/AnalyticsPage.tsx
29
- var V = [
29
+ var R = [
30
30
  "var(--color-chart-1)",
31
31
  "var(--color-chart-2)",
32
32
  "var(--color-chart-3)",
33
33
  "var(--color-chart-4)",
34
34
  "var(--color-chart-5)",
35
35
  "var(--color-chart-6)"
36
- ], H = () => {
37
- let { navigate: H, basePath: U } = e(), { data: W, loading: G, error: oe, refetch: K } = T(), [q, se] = re("overview"), J = (W?.headshotmarketingCampaigns.items ?? []).map((e) => ee(e)), ce = (W?.headshotmarketingAdCampaigns.items ?? []).map((e) => h(e)), le = (W?.headshotmarketingSocialAccounts.items ?? []).map((e) => ne(e)), ue = g(J), Y = _(J, ce), X = y(Y), Z = v(le), Q = J.reduce((e, t) => (e.impressions += t.metrics.impressions, e.clicks += t.metrics.clicks, e.conversions += t.metrics.conversions, e.revenue += t.metrics.revenue, e.cost += t.metrics.cost, e), {
36
+ ], z = (e) => e.replace(/\b\w/g, (e) => e.toUpperCase()), B = 5, V = () => {
37
+ let { navigate: V, basePath: H } = e(), { data: U, loading: fe, error: pe, refetch: me } = ie(), [W, he] = oe("overview"), G = (U?.headshotmarketingCampaigns.items ?? []).map((e) => ne(e)), ge = (U?.headshotmarketingAdCampaigns.items ?? []).map((e) => p(e)), _e = (U?.headshotmarketingSocialAccounts.items ?? []).map((e) => ae(e)), ve = m(G), K = h(G, ge), q = v(K), J = g(_e), Y = G.reduce((e, t) => (e.impressions += t.metrics.impressions, e.clicks += t.metrics.clicks, e.conversions += t.metrics.conversions, e.revenue += t.metrics.revenue, e.cost += t.metrics.cost, e), {
38
38
  impressions: 0,
39
39
  clicks: 0,
40
40
  conversions: 0,
41
41
  revenue: 0,
42
42
  cost: 0
43
- }), de = Q.impressions > 0 ? Q.clicks / Q.impressions * 100 : 0, fe = Q.clicks > 0 ? Q.cost / Q.clicks : 0, pe = Q.cost > 0 ? Q.revenue / Q.cost : 0, $ = te(Q.impressions, Q.clicks, Q.conversions), me = [
43
+ }), ye = Y.impressions > 0 ? Y.clicks / Y.impressions * 100 : 0, be = Y.clicks > 0 ? Y.cost / Y.clicks : 0, xe = Y.cost > 0 ? Y.revenue / Y.cost : 0, Se = Y.conversions > 0 ? Y.cost / Y.conversions : 0, Ce = Y.clicks > 0 ? Y.conversions / Y.clicks * 100 : 0, X = _(Y.impressions, Y.clicks, Y.conversions), Z = K.map((e) => ({
44
+ channel: z(e.channel),
45
+ revenue: e.revenue,
46
+ cost: e.cost,
47
+ roas: e.roas
48
+ })), Q = [...G].sort((e, t) => t.metrics.revenue - e.metrics.revenue).slice(0, B), $ = [
44
49
  {
45
50
  key: "overview",
46
51
  label: "Overview"
@@ -53,66 +58,68 @@ var V = [
53
58
  key: "audience",
54
59
  label: "Audience"
55
60
  }
56
- ], he = [
61
+ ], we = [
57
62
  {
58
63
  title: "Impressions",
59
- value: p(Q.impressions),
60
- change: 12.4,
61
- icon: /* @__PURE__ */ I(D, { className: "h-4 w-4" })
64
+ value: d(Y.impressions),
65
+ icon: /* @__PURE__ */ N(le, { className: "h-4 w-4" })
62
66
  },
63
67
  {
64
68
  title: "Clicks",
65
- value: p(Q.clicks),
66
- change: 8.7,
67
- icon: /* @__PURE__ */ I(A, { className: "h-4 w-4" })
69
+ value: d(Y.clicks),
70
+ icon: /* @__PURE__ */ N(T, { className: "h-4 w-4" })
68
71
  },
69
72
  {
70
73
  title: "Conversions",
71
- value: p(Q.conversions),
72
- change: 15.2,
73
- icon: /* @__PURE__ */ I(ie, { className: "h-4 w-4" })
74
+ value: d(Y.conversions),
75
+ icon: /* @__PURE__ */ N(se, { className: "h-4 w-4" })
74
76
  },
75
77
  {
76
78
  title: "Revenue",
77
- value: f(Q.revenue),
78
- change: 12.5,
79
- icon: /* @__PURE__ */ I(E, { className: "h-4 w-4" })
79
+ value: u(Y.revenue),
80
+ icon: /* @__PURE__ */ N(C, { className: "h-4 w-4" })
80
81
  },
81
82
  {
82
83
  title: "Cost",
83
- value: f(Q.cost),
84
- change: -3.1,
85
- icon: /* @__PURE__ */ I(ae, { className: "h-4 w-4" })
84
+ value: u(Y.cost),
85
+ icon: /* @__PURE__ */ N(ce, { className: "h-4 w-4" })
86
86
  },
87
87
  {
88
88
  title: "CTR",
89
- value: m(de),
90
- change: 5.4,
91
- icon: /* @__PURE__ */ I(j, { className: "h-4 w-4" })
89
+ value: f(ye),
90
+ icon: /* @__PURE__ */ N(E, { className: "h-4 w-4" })
92
91
  },
93
92
  {
94
93
  title: "CPC",
95
- value: `$${fe.toFixed(2)}`,
96
- change: -8.2,
97
- icon: /* @__PURE__ */ I(P, { className: "h-4 w-4" })
94
+ value: `$${be.toFixed(2)}`,
95
+ icon: /* @__PURE__ */ N(k, { className: "h-4 w-4" })
96
+ },
97
+ {
98
+ title: "CPA",
99
+ value: `$${Se.toFixed(2)}`,
100
+ icon: /* @__PURE__ */ N(M, { className: "h-4 w-4" })
101
+ },
102
+ {
103
+ title: "Conv. Rate",
104
+ value: f(Ce),
105
+ icon: /* @__PURE__ */ N(ue, { className: "h-4 w-4" })
98
106
  },
99
107
  {
100
108
  title: "ROAS",
101
- value: `${pe.toFixed(2)}x`,
102
- change: 11.1,
103
- icon: /* @__PURE__ */ I(F, { className: "h-4 w-4" })
109
+ value: `${xe.toFixed(2)}x`,
110
+ icon: /* @__PURE__ */ N(A, { className: "h-4 w-4" })
104
111
  }
105
- ], ge = [
112
+ ], Te = [
106
113
  {
107
114
  key: "channel",
108
115
  header: "Channel",
109
116
  sortable: !0,
110
- render: (e) => /* @__PURE__ */ L("div", {
117
+ render: (e) => /* @__PURE__ */ P("div", {
111
118
  className: "flex items-center gap-2",
112
- children: [/* @__PURE__ */ I("div", {
119
+ children: [/* @__PURE__ */ N("div", {
113
120
  className: "h-3 w-3 rounded-full",
114
121
  style: { backgroundColor: e.color }
115
- }), /* @__PURE__ */ I("span", {
122
+ }), /* @__PURE__ */ N("span", {
116
123
  className: "font-medium text-text-primary",
117
124
  children: e.channel
118
125
  })]
@@ -122,19 +129,19 @@ var V = [
122
129
  key: "revenue",
123
130
  header: "Revenue",
124
131
  sortable: !0,
125
- render: (e) => f(e.revenue)
132
+ render: (e) => u(e.revenue)
126
133
  },
127
134
  {
128
135
  key: "cost",
129
136
  header: "Cost",
130
137
  sortable: !0,
131
- render: (e) => f(e.cost)
138
+ render: (e) => u(e.cost)
132
139
  },
133
140
  {
134
141
  key: "conversions",
135
142
  header: "Conversions",
136
143
  sortable: !0,
137
- render: (e) => p(e.conversions)
144
+ render: (e) => d(e.conversions)
138
145
  },
139
146
  {
140
147
  key: "roas",
@@ -146,20 +153,20 @@ var V = [
146
153
  key: "impressions",
147
154
  header: "Impressions",
148
155
  sortable: !0,
149
- render: (e) => p(e.impressions)
156
+ render: (e) => d(e.impressions)
150
157
  },
151
158
  {
152
159
  key: "ctr",
153
160
  header: "CTR",
154
161
  sortable: !0,
155
- render: (e) => m(e.ctr)
162
+ render: (e) => f(e.ctr)
156
163
  }
157
- ], _e = [
164
+ ], Ee = [
158
165
  {
159
166
  key: "country",
160
167
  header: "Country",
161
168
  sortable: !0,
162
- render: (e) => /* @__PURE__ */ I("span", {
169
+ render: (e) => /* @__PURE__ */ N("span", {
163
170
  className: "font-medium",
164
171
  children: e.country
165
172
  })
@@ -168,251 +175,418 @@ var V = [
168
175
  key: "revenue",
169
176
  header: "Revenue",
170
177
  sortable: !0,
171
- render: (e) => f(e.revenue)
178
+ render: (e) => u(e.revenue)
172
179
  },
173
180
  {
174
181
  key: "users",
175
182
  header: "Users",
176
183
  sortable: !0,
177
- render: (e) => p(e.users)
184
+ render: (e) => d(e.users)
178
185
  },
179
186
  {
180
187
  key: "conversions",
181
188
  header: "Conversions",
182
189
  sortable: !0,
183
- render: (e) => p(e.conversions)
190
+ render: (e) => d(e.conversions)
184
191
  },
185
192
  {
186
193
  key: "conversionRate",
187
194
  header: "Conv. Rate",
188
195
  sortable: !0,
189
- render: (e) => m(e.conversionRate)
196
+ render: (e) => f(e.conversionRate)
190
197
  }
191
- ], ve = {
192
- Desktop: k,
193
- Mobile: M,
194
- Tablet: N
198
+ ], De = {
199
+ Desktop: w,
200
+ Mobile: D,
201
+ Tablet: O
195
202
  };
196
- return /* @__PURE__ */ L(b, {
203
+ return /* @__PURE__ */ P(y, {
197
204
  title: "Analytics",
198
205
  description: "Comprehensive marketing performance analytics",
199
206
  children: [
200
- /* @__PURE__ */ I(B, { children: "The single source of truth for how your marketing is performing. Track reach, clicks, conversions, revenue and ROAS across every channel, then drill into channel and audience breakdowns to understand what's driving results and where to focus next." }),
201
- /* @__PURE__ */ I(z, {
207
+ /* @__PURE__ */ N(L, { children: "The single source of truth for how your marketing is performing. Track reach, clicks, conversions, revenue and ROAS across every channel, then drill into channel and audience breakdowns to understand what's driving results and where to focus next." }),
208
+ /* @__PURE__ */ N(I, {
202
209
  storageKey: "headshotmarketing-analytics",
203
210
  steps: [
204
211
  {
205
212
  id: "campaigns",
206
213
  label: "Campaign analytics",
207
214
  description: "See which campaigns drive the most return.",
208
- icon: /* @__PURE__ */ I(P, { className: "h-4 w-4" }),
209
- onClick: () => H(U + "/analytics/campaigns")
215
+ icon: /* @__PURE__ */ N(k, { className: "h-4 w-4" }),
216
+ onClick: () => V(H + "/analytics/campaigns")
210
217
  },
211
218
  {
212
219
  id: "ads",
213
220
  label: "Ad analytics",
214
221
  description: "Break down paid spend, clicks and ROAS by platform.",
215
- icon: /* @__PURE__ */ I(F, { className: "h-4 w-4" }),
216
- onClick: () => H(U + "/analytics/ads")
222
+ icon: /* @__PURE__ */ N(A, { className: "h-4 w-4" }),
223
+ onClick: () => V(H + "/analytics/ads")
217
224
  },
218
225
  {
219
226
  id: "reports",
220
227
  label: "Build a report",
221
228
  description: "Assemble and export a shareable report.",
222
- icon: /* @__PURE__ */ I(E, { className: "h-4 w-4" }),
223
- onClick: () => H(U + "/analytics/reports")
229
+ icon: /* @__PURE__ */ N(C, { className: "h-4 w-4" }),
230
+ onClick: () => V(H + "/analytics/reports")
224
231
  }
225
232
  ]
226
233
  }),
227
- /* @__PURE__ */ L(w, {
228
- loading: G,
229
- error: oe,
230
- onRetry: K,
231
- hasData: !!W,
234
+ /* @__PURE__ */ P(re, {
235
+ loading: fe,
236
+ error: pe,
237
+ onRetry: me,
238
+ hasData: !!U,
232
239
  children: [
233
- /* @__PURE__ */ I(R, { children: /* @__PURE__ */ I("div", {
234
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
235
- children: he.map((e) => /* @__PURE__ */ I(x, {
240
+ /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N("div", {
241
+ className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",
242
+ children: we.map((e) => /* @__PURE__ */ N(b, {
236
243
  title: e.title,
237
244
  value: e.value,
238
- change: e.change,
239
- changeLabel: "vs last period",
240
245
  icon: e.icon
241
246
  }, e.title))
242
247
  }) }),
243
- /* @__PURE__ */ I("div", {
248
+ /* @__PURE__ */ N("div", {
244
249
  className: "border-b border-border-subtle",
245
- children: /* @__PURE__ */ I("div", {
250
+ children: /* @__PURE__ */ N("div", {
246
251
  className: "flex flex-nowrap gap-6 overflow-x-auto",
247
- children: me.map((e) => /* @__PURE__ */ I("button", {
248
- onClick: () => se(e.key),
249
- className: d("shrink-0 whitespace-nowrap pb-3 text-sm font-medium transition-colors border-b-2", q === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
252
+ children: $.map((e) => /* @__PURE__ */ N("button", {
253
+ onClick: () => he(e.key),
254
+ className: te("shrink-0 whitespace-nowrap pb-3 text-sm font-medium transition-colors border-b-2", W === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
250
255
  children: e.label
251
256
  }, e.key))
252
257
  })
253
258
  }),
254
- q === "overview" && /* @__PURE__ */ I("div", {
259
+ W === "overview" && /* @__PURE__ */ P("div", {
255
260
  className: "space-y-6",
256
- children: /* @__PURE__ */ L("div", {
257
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
258
- children: [/* @__PURE__ */ I(C, {
259
- title: "Revenue Over Time",
260
- subtitle: "Last 30 days",
261
- children: /* @__PURE__ */ I(r, {
262
- width: "100%",
263
- height: 300,
264
- children: /* @__PURE__ */ L(u, {
265
- data: ue,
266
- children: [
267
- /* @__PURE__ */ I(a, {
268
- strokeDasharray: "3 3",
269
- className: "stroke-border"
270
- }),
271
- /* @__PURE__ */ I(s, {
272
- dataKey: "date",
273
- tick: { fontSize: 12 },
274
- className: "text-text-secondary"
275
- }),
276
- /* @__PURE__ */ I(c, {
277
- tick: { fontSize: 12 },
278
- className: "text-text-secondary"
279
- }),
280
- /* @__PURE__ */ I(n, {}),
281
- /* @__PURE__ */ I(o, {
282
- type: "monotone",
283
- dataKey: "revenue",
284
- stroke: V[0],
285
- fill: V[0],
286
- fillOpacity: .1
287
- }),
288
- /* @__PURE__ */ I(o, {
289
- type: "monotone",
290
- dataKey: "cost",
291
- stroke: V[3],
292
- fill: V[3],
293
- fillOpacity: .1
294
- }),
295
- /* @__PURE__ */ I(t, {})
296
- ]
261
+ children: [
262
+ /* @__PURE__ */ P("div", {
263
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
264
+ children: [/* @__PURE__ */ N(S, {
265
+ title: "Revenue Over Time",
266
+ subtitle: "Last 30 days",
267
+ children: /* @__PURE__ */ N(r, {
268
+ width: "100%",
269
+ height: 300,
270
+ children: /* @__PURE__ */ P(ee, {
271
+ data: ve,
272
+ children: [
273
+ /* @__PURE__ */ N(a, {
274
+ strokeDasharray: "3 3",
275
+ className: "stroke-border"
276
+ }),
277
+ /* @__PURE__ */ N(s, {
278
+ dataKey: "date",
279
+ tick: { fontSize: 12 },
280
+ className: "text-text-secondary"
281
+ }),
282
+ /* @__PURE__ */ N(c, {
283
+ tick: { fontSize: 12 },
284
+ className: "text-text-secondary"
285
+ }),
286
+ /* @__PURE__ */ N(n, {}),
287
+ /* @__PURE__ */ N(o, {
288
+ type: "monotone",
289
+ dataKey: "revenue",
290
+ stroke: R[0],
291
+ fill: R[0],
292
+ fillOpacity: .1
293
+ }),
294
+ /* @__PURE__ */ N(o, {
295
+ type: "monotone",
296
+ dataKey: "cost",
297
+ stroke: R[3],
298
+ fill: R[3],
299
+ fillOpacity: .1
300
+ }),
301
+ /* @__PURE__ */ N(t, {})
302
+ ]
303
+ })
297
304
  })
298
- })
299
- }), /* @__PURE__ */ I(C, {
300
- title: "Conversion Funnel",
301
- subtitle: "Current period",
302
- children: /* @__PURE__ */ I(r, {
303
- width: "100%",
304
- height: 300,
305
- children: /* @__PURE__ */ L(l, {
306
- data: $,
307
- layout: "vertical",
308
- children: [
309
- /* @__PURE__ */ I(a, {
310
- strokeDasharray: "3 3",
311
- className: "stroke-border"
312
- }),
313
- /* @__PURE__ */ I(s, {
314
- type: "number",
315
- tick: { fontSize: 12 },
316
- className: "text-text-secondary"
317
- }),
318
- /* @__PURE__ */ I(c, {
319
- dataKey: "stage",
320
- type: "category",
321
- tick: { fontSize: 12 },
322
- width: 100,
323
- className: "text-text-secondary"
324
- }),
325
- /* @__PURE__ */ I(n, { formatter: (e) => p(e) }),
326
- /* @__PURE__ */ I(i, {
327
- dataKey: "value",
328
- radius: [
329
- 0,
330
- 4,
331
- 4,
332
- 0
333
- ],
334
- children: $.map((e, t) => /* @__PURE__ */ I(i, {
305
+ }), /* @__PURE__ */ N(S, {
306
+ title: "Conversion Funnel",
307
+ subtitle: "Current period",
308
+ children: /* @__PURE__ */ N(r, {
309
+ width: "100%",
310
+ height: 300,
311
+ children: /* @__PURE__ */ P(l, {
312
+ data: X,
313
+ layout: "vertical",
314
+ children: [
315
+ /* @__PURE__ */ N(a, {
316
+ strokeDasharray: "3 3",
317
+ className: "stroke-border"
318
+ }),
319
+ /* @__PURE__ */ N(s, {
320
+ type: "number",
321
+ tick: { fontSize: 12 },
322
+ className: "text-text-secondary"
323
+ }),
324
+ /* @__PURE__ */ N(c, {
325
+ dataKey: "stage",
326
+ type: "category",
327
+ tick: { fontSize: 12 },
328
+ width: 100,
329
+ className: "text-text-secondary"
330
+ }),
331
+ /* @__PURE__ */ N(n, { formatter: (e) => d(e) }),
332
+ /* @__PURE__ */ N(i, {
335
333
  dataKey: "value",
336
- fill: e.color
337
- }, t))
338
- })
339
- ]
334
+ radius: [
335
+ 0,
336
+ 4,
337
+ 4,
338
+ 0
339
+ ],
340
+ children: X.map((e, t) => /* @__PURE__ */ N(i, {
341
+ dataKey: "value",
342
+ fill: e.color
343
+ }, t))
344
+ })
345
+ ]
346
+ })
340
347
  })
341
- })
342
- })]
343
- })
348
+ })]
349
+ }),
350
+ /* @__PURE__ */ P("div", {
351
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
352
+ children: [/* @__PURE__ */ N(S, {
353
+ title: "Revenue by Channel",
354
+ subtitle: "Revenue against spend, per channel",
355
+ children: Z.length === 0 ? /* @__PURE__ */ N("p", {
356
+ className: "py-12 text-center text-sm text-text-secondary",
357
+ children: "No channel performance recorded yet."
358
+ }) : /* @__PURE__ */ N(r, {
359
+ width: "100%",
360
+ height: 300,
361
+ children: /* @__PURE__ */ P(l, {
362
+ data: Z,
363
+ children: [
364
+ /* @__PURE__ */ N(a, {
365
+ strokeDasharray: "3 3",
366
+ className: "stroke-border"
367
+ }),
368
+ /* @__PURE__ */ N(s, {
369
+ dataKey: "channel",
370
+ tick: { fontSize: 12 },
371
+ className: "text-text-secondary"
372
+ }),
373
+ /* @__PURE__ */ N(c, {
374
+ tick: { fontSize: 12 },
375
+ className: "text-text-secondary"
376
+ }),
377
+ /* @__PURE__ */ N(n, { formatter: (e) => u(e) }),
378
+ /* @__PURE__ */ N(t, {}),
379
+ /* @__PURE__ */ N(i, {
380
+ dataKey: "revenue",
381
+ name: "Revenue",
382
+ fill: R[0],
383
+ radius: [
384
+ 4,
385
+ 4,
386
+ 0,
387
+ 0
388
+ ]
389
+ }),
390
+ /* @__PURE__ */ N(i, {
391
+ dataKey: "cost",
392
+ name: "Cost",
393
+ fill: R[3],
394
+ radius: [
395
+ 4,
396
+ 4,
397
+ 0,
398
+ 0
399
+ ]
400
+ })
401
+ ]
402
+ })
403
+ })
404
+ }), /* @__PURE__ */ N(S, {
405
+ title: "ROAS by Channel",
406
+ subtitle: "Return on ad spend, per channel",
407
+ children: Z.length === 0 ? /* @__PURE__ */ N("p", {
408
+ className: "py-12 text-center text-sm text-text-secondary",
409
+ children: "No channel performance recorded yet."
410
+ }) : /* @__PURE__ */ N(r, {
411
+ width: "100%",
412
+ height: 300,
413
+ children: /* @__PURE__ */ P(l, {
414
+ data: Z,
415
+ layout: "vertical",
416
+ children: [
417
+ /* @__PURE__ */ N(a, {
418
+ strokeDasharray: "3 3",
419
+ className: "stroke-border"
420
+ }),
421
+ /* @__PURE__ */ N(s, {
422
+ type: "number",
423
+ tick: { fontSize: 12 },
424
+ className: "text-text-secondary"
425
+ }),
426
+ /* @__PURE__ */ N(c, {
427
+ dataKey: "channel",
428
+ type: "category",
429
+ width: 100,
430
+ tick: { fontSize: 12 },
431
+ className: "text-text-secondary"
432
+ }),
433
+ /* @__PURE__ */ N(n, { formatter: (e) => `${e.toFixed(2)}x` }),
434
+ /* @__PURE__ */ N(i, {
435
+ dataKey: "roas",
436
+ name: "ROAS",
437
+ fill: R[1],
438
+ radius: [
439
+ 0,
440
+ 4,
441
+ 4,
442
+ 0
443
+ ]
444
+ })
445
+ ]
446
+ })
447
+ })
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ P("div", {
451
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
452
+ children: [/* @__PURE__ */ P("div", {
453
+ className: "mb-4 flex items-center gap-2",
454
+ children: [/* @__PURE__ */ N(j, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ N("h3", {
455
+ className: "text-sm font-semibold text-text-primary",
456
+ children: "Top Campaigns"
457
+ })]
458
+ }), Q.length === 0 ? /* @__PURE__ */ N("p", {
459
+ className: "text-sm text-text-secondary",
460
+ children: "No campaigns yet — create one to start tracking revenue."
461
+ }) : /* @__PURE__ */ N("div", {
462
+ className: "overflow-x-auto",
463
+ children: /* @__PURE__ */ P("table", {
464
+ className: "w-full min-w-[420px] text-left text-sm",
465
+ children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ P("tr", {
466
+ className: "border-b border-border-subtle",
467
+ children: [
468
+ /* @__PURE__ */ N("th", {
469
+ className: "w-8 pb-2 text-xs font-medium text-text-secondary",
470
+ children: "#"
471
+ }),
472
+ /* @__PURE__ */ N("th", {
473
+ className: "pb-2 pr-3 text-xs font-medium text-text-secondary",
474
+ children: "Campaign"
475
+ }),
476
+ /* @__PURE__ */ N("th", {
477
+ className: "pb-2 pr-3 text-right text-xs font-medium text-text-secondary",
478
+ children: "Revenue"
479
+ }),
480
+ /* @__PURE__ */ N("th", {
481
+ className: "pb-2 pr-3 text-right text-xs font-medium text-text-secondary",
482
+ children: "Conversions"
483
+ }),
484
+ /* @__PURE__ */ N("th", {
485
+ className: "pb-2 text-right text-xs font-medium text-text-secondary",
486
+ children: "ROAS"
487
+ })
488
+ ]
489
+ }) }), /* @__PURE__ */ N("tbody", { children: Q.map((e, t) => /* @__PURE__ */ P("tr", {
490
+ className: "border-b border-border-subtle/60 last:border-0",
491
+ children: [
492
+ /* @__PURE__ */ N("td", {
493
+ className: "py-2.5 text-xs tabular-nums text-text-secondary",
494
+ children: t + 1
495
+ }),
496
+ /* @__PURE__ */ N("td", {
497
+ className: "py-2.5 pr-3 font-medium text-text-primary",
498
+ children: e.name
499
+ }),
500
+ /* @__PURE__ */ N("td", {
501
+ className: "py-2.5 pr-3 text-right tabular-nums text-text-primary",
502
+ children: u(e.metrics.revenue)
503
+ }),
504
+ /* @__PURE__ */ N("td", {
505
+ className: "py-2.5 pr-3 text-right tabular-nums text-text-secondary",
506
+ children: d(e.metrics.conversions)
507
+ }),
508
+ /* @__PURE__ */ P("td", {
509
+ className: "py-2.5 text-right tabular-nums text-text-secondary",
510
+ children: [e.metrics.roas.toFixed(2), "x"]
511
+ })
512
+ ]
513
+ }, e.id)) })]
514
+ })
515
+ })]
516
+ })
517
+ ]
344
518
  }),
345
- q === "channels" && /* @__PURE__ */ I(S, {
346
- data: Y,
347
- columns: ge,
519
+ W === "channels" && /* @__PURE__ */ N(x, {
520
+ data: K,
521
+ columns: Te,
348
522
  searchable: !0,
349
523
  searchPlaceholder: "Search channels..."
350
524
  }),
351
- q === "audience" && /* @__PURE__ */ L("div", {
525
+ W === "audience" && /* @__PURE__ */ P("div", {
352
526
  className: "space-y-6",
353
- children: [/* @__PURE__ */ L("div", {
527
+ children: [/* @__PURE__ */ P("div", {
354
528
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
355
- children: [/* @__PURE__ */ L("div", {
529
+ children: [/* @__PURE__ */ P("div", {
356
530
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
357
- children: [/* @__PURE__ */ L("div", {
531
+ children: [/* @__PURE__ */ P("div", {
358
532
  className: "flex items-center gap-2 mb-4",
359
- children: [/* @__PURE__ */ I(O, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ I("h3", {
533
+ children: [/* @__PURE__ */ N(de, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ N("h3", {
360
534
  className: "text-sm font-semibold text-text-primary",
361
535
  children: "Top Countries"
362
536
  })]
363
- }), /* @__PURE__ */ I("div", {
537
+ }), /* @__PURE__ */ N("div", {
364
538
  className: "space-y-3",
365
- children: X.map((e) => /* @__PURE__ */ L("div", {
539
+ children: q.map((e) => /* @__PURE__ */ P("div", {
366
540
  className: "flex items-center justify-between",
367
- children: [/* @__PURE__ */ L("div", {
541
+ children: [/* @__PURE__ */ P("div", {
368
542
  className: "flex items-center gap-2",
369
- children: [/* @__PURE__ */ I("span", {
543
+ children: [/* @__PURE__ */ N("span", {
370
544
  className: "text-xs font-mono text-text-secondary w-6",
371
545
  children: e.countryCode
372
- }), /* @__PURE__ */ I("span", {
546
+ }), /* @__PURE__ */ N("span", {
373
547
  className: "text-sm text-text-primary",
374
548
  children: e.country
375
549
  })]
376
- }), /* @__PURE__ */ L("div", {
550
+ }), /* @__PURE__ */ P("div", {
377
551
  className: "flex items-center gap-4",
378
- children: [/* @__PURE__ */ I("span", {
552
+ children: [/* @__PURE__ */ N("span", {
379
553
  className: "text-sm font-medium text-text-primary",
380
- children: f(e.revenue)
381
- }), /* @__PURE__ */ I("div", {
554
+ children: u(e.revenue)
555
+ }), /* @__PURE__ */ N("div", {
382
556
  className: "w-24 h-2 rounded-full bg-bg-sunken overflow-hidden",
383
- children: /* @__PURE__ */ I("div", {
557
+ children: /* @__PURE__ */ N("div", {
384
558
  className: "h-full rounded-full bg-action-primary-bg",
385
- style: { width: `${e.revenue / (X[0]?.revenue || 1) * 100}%` }
559
+ style: { width: `${e.revenue / (q[0]?.revenue || 1) * 100}%` }
386
560
  })
387
561
  })]
388
562
  })]
389
563
  }, e.countryCode))
390
564
  })]
391
- }), /* @__PURE__ */ L("div", {
565
+ }), /* @__PURE__ */ P("div", {
392
566
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
393
567
  children: [
394
- /* @__PURE__ */ I("h3", {
568
+ /* @__PURE__ */ N("h3", {
395
569
  className: "text-sm font-semibold text-text-primary mb-4",
396
570
  children: "Device Breakdown"
397
571
  }),
398
- /* @__PURE__ */ I("div", {
572
+ /* @__PURE__ */ N("div", {
399
573
  className: "space-y-4",
400
- children: Z.devices.map((e) => /* @__PURE__ */ L("div", {
574
+ children: J.devices.map((e) => /* @__PURE__ */ P("div", {
401
575
  className: "flex items-center gap-3",
402
- children: [/* @__PURE__ */ I(ve[e.device] || k, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ L("div", {
576
+ children: [/* @__PURE__ */ N(De[e.device] || w, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ P("div", {
403
577
  className: "flex-1",
404
- children: [/* @__PURE__ */ L("div", {
578
+ children: [/* @__PURE__ */ P("div", {
405
579
  className: "flex items-center justify-between mb-1",
406
- children: [/* @__PURE__ */ I("span", {
580
+ children: [/* @__PURE__ */ N("span", {
407
581
  className: "text-sm text-text-primary",
408
582
  children: e.device
409
- }), /* @__PURE__ */ I("span", {
583
+ }), /* @__PURE__ */ N("span", {
410
584
  className: "text-sm font-medium text-text-primary",
411
- children: m(e.percentage)
585
+ children: f(e.percentage)
412
586
  })]
413
- }), /* @__PURE__ */ I("div", {
587
+ }), /* @__PURE__ */ N("div", {
414
588
  className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
415
- children: /* @__PURE__ */ I("div", {
589
+ children: /* @__PURE__ */ N("div", {
416
590
  className: "h-full rounded-full bg-action-primary-bg",
417
591
  style: { width: `${e.percentage}%` }
418
592
  })
@@ -420,30 +594,30 @@ var V = [
420
594
  })]
421
595
  }, e.device))
422
596
  }),
423
- /* @__PURE__ */ L("div", {
597
+ /* @__PURE__ */ P("div", {
424
598
  className: "mt-6 pt-4 border-t border-border-subtle",
425
- children: [/* @__PURE__ */ I("h4", {
599
+ children: [/* @__PURE__ */ N("h4", {
426
600
  className: "text-sm font-semibold text-text-primary mb-3",
427
601
  children: "Browser Usage"
428
- }), /* @__PURE__ */ I("div", {
602
+ }), /* @__PURE__ */ N("div", {
429
603
  className: "space-y-2",
430
- children: Z.browsers.map((e) => /* @__PURE__ */ L("div", {
604
+ children: J.browsers.map((e) => /* @__PURE__ */ P("div", {
431
605
  className: "flex items-center justify-between text-sm",
432
- children: [/* @__PURE__ */ I("span", {
606
+ children: [/* @__PURE__ */ N("span", {
433
607
  className: "text-text-secondary",
434
608
  children: e.browser
435
- }), /* @__PURE__ */ I("span", {
609
+ }), /* @__PURE__ */ N("span", {
436
610
  className: "font-medium text-text-primary",
437
- children: m(e.percentage)
611
+ children: f(e.percentage)
438
612
  })]
439
613
  }, e.browser))
440
614
  })]
441
615
  })
442
616
  ]
443
617
  })]
444
- }), /* @__PURE__ */ I(S, {
445
- data: X,
446
- columns: _e,
618
+ }), /* @__PURE__ */ N(x, {
619
+ data: q,
620
+ columns: Ee,
447
621
  searchable: !0,
448
622
  searchPlaceholder: "Search countries..."
449
623
  })]
@@ -454,6 +628,6 @@ var V = [
454
628
  });
455
629
  };
456
630
  //#endregion
457
- export { H as AnalyticsPage };
631
+ export { V as AnalyticsPage };
458
632
 
459
633
  //# sourceMappingURL=AnalyticsPage.js.map