@burdenoff/microfe-headshotmarketing 2026.1030.13 → 2026.1101.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 (69) hide show
  1. package/dist/generated/wspace-operations.d.ts +251 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +446 -322
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +4370 -34
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +3 -1
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts +19 -0
  10. package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts.map +1 -0
  11. package/dist/headshotmarketing/components/TrackedLinksPanel.js +246 -0
  12. package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -0
  13. package/dist/headshotmarketing/components/index.d.ts +1 -0
  14. package/dist/headshotmarketing/components/index.d.ts.map +1 -1
  15. package/dist/headshotmarketing/components/index.js +1 -0
  16. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.d.ts.map +1 -1
  17. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +245 -211
  18. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/ads/AdCreativesPage.d.ts.map +1 -1
  20. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +86 -76
  21. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  22. package/dist/headshotmarketing/pages/analytics/AttributionPage.d.ts.map +1 -1
  23. package/dist/headshotmarketing/pages/analytics/AttributionPage.js +249 -244
  24. package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
  25. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts +4 -0
  26. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts.map +1 -0
  27. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +196 -0
  28. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -0
  29. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts +12 -0
  30. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts.map +1 -0
  31. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js +30 -0
  32. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js.map +1 -0
  33. package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
  34. package/dist/headshotmarketing/pages/content/AIToolsPage.js +51 -50
  35. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/content/ContentCreationPage.d.ts.map +1 -1
  37. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +409 -408
  38. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  39. package/dist/headshotmarketing/pages/content/ContentDetailsPage.d.ts.map +1 -1
  40. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +158 -104
  41. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts +5 -0
  43. package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts.map +1 -1
  44. package/dist/headshotmarketing/pages/content/ContentItemActions.js +103 -34
  45. package/dist/headshotmarketing/pages/content/ContentItemActions.js.map +1 -1
  46. package/dist/headshotmarketing/pages/content/ContentLibraryCard.d.ts.map +1 -1
  47. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +102 -102
  48. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  49. package/dist/headshotmarketing/pages/crm/LeadCreateModal.d.ts.map +1 -1
  50. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +150 -76
  51. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  52. package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
  53. package/dist/headshotmarketing/pages/social-media/PostsPage.js +254 -246
  54. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  55. package/dist/headshotmarketing/types/index.d.ts +17 -0
  56. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  57. package/dist/headshotmarketing/utils/contentLibrary.d.ts +6 -0
  58. package/dist/headshotmarketing/utils/contentLibrary.d.ts.map +1 -1
  59. package/dist/headshotmarketing/utils/contentLibrary.js +17 -11
  60. package/dist/headshotmarketing/utils/contentLibrary.js.map +1 -1
  61. package/dist/headshotmarketing/utils/contentMapper.d.ts +13 -1
  62. package/dist/headshotmarketing/utils/contentMapper.d.ts.map +1 -1
  63. package/dist/headshotmarketing/utils/contentMapper.js +26 -13
  64. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  65. package/dist/headshotmarketing/utils/trackedLinks.d.ts +75 -0
  66. package/dist/headshotmarketing/utils/trackedLinks.d.ts.map +1 -0
  67. package/dist/headshotmarketing/utils/trackedLinks.js +99 -0
  68. package/dist/headshotmarketing/utils/trackedLinks.js.map +1 -0
  69. package/package.json +1 -1
@@ -1,148 +1,149 @@
1
1
  import { useDeleteHeadshotmarketingSocialPostMutation as e, useHeadshotmarketingSocialPostsListQuery as t, usePublishHeadshotmarketingSocialPostMutation as n, useRetryHeadshotmarketingSocialPostMutation as ee, useUpdateHeadshotmarketingSocialPostMutation as te } from "../../../generated/wspace-operations.js";
2
2
  import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
3
- import { cn as r, formatDate as i, formatNumber as a, formatPercentage as re } from "../../utils/helpers.js";
4
- import { HeadshotmarketingSocialPostStatus as o } from "../../../generated/wspace-types.js";
5
- import { PageLayout as ie } from "../../components/PageLayout.js";
6
- import { StatCard as s } from "../../components/StatCard.js";
7
- import { StatusBadge as c } from "../../components/StatusBadge.js";
8
- import { EmptyState as ae } from "../../components/EmptyState.js";
9
- import { FilterBar as oe } from "../../components/FilterBar.js";
10
- import { Modal as l } from "../../components/Modal.js";
11
- import { QueryStateBoundary as se } from "../../components/QueryStateBoundary.js";
12
- import { Pagination as ce } from "../../components/Pagination.js";
13
- import { ActionMenu as u } from "../../components/ActionMenu.js";
3
+ import { cn as r, formatDate as re, formatNumber as i, formatPercentage as ie } from "../../utils/helpers.js";
4
+ import { HeadshotmarketingSocialPostStatus as a } from "../../../generated/wspace-types.js";
5
+ import { PageLayout as ae } from "../../components/PageLayout.js";
6
+ import { StatCard as o } from "../../components/StatCard.js";
7
+ import { StatusBadge as s } from "../../components/StatusBadge.js";
8
+ import { EmptyState as oe } from "../../components/EmptyState.js";
9
+ import { FilterBar as se } from "../../components/FilterBar.js";
10
+ import { Modal as c } from "../../components/Modal.js";
11
+ import { QueryStateBoundary as ce } from "../../components/QueryStateBoundary.js";
12
+ import { Pagination as le } from "../../components/Pagination.js";
13
+ import { ActionMenu as l } from "../../components/ActionMenu.js";
14
+ import { TrackedLinksPanel as ue } from "../../components/TrackedLinksPanel.js";
14
15
  import "../../components/index.js";
15
- import { useHeadshotmarketingBootstrap as le } from "../../hooks/useHeadshotmarketingBootstrap.js";
16
- import { usePagination as ue } from "../../hooks/usePagination.js";
17
- import { toSocialPostModel as de } from "../../utils/socialMapper.js";
16
+ import { useHeadshotmarketingBootstrap as de } from "../../hooks/useHeadshotmarketingBootstrap.js";
17
+ import { usePagination as fe } from "../../hooks/usePagination.js";
18
+ import { toSocialPostModel as pe } from "../../utils/socialMapper.js";
18
19
  import "../../hooks/index.js";
19
- import { useEffect as d, useMemo as f, useState as p } from "react";
20
- import { AlertTriangle as fe, ExternalLink as pe, Eye as me, Grid3X3 as he, Heart as ge, List as _e, MessageCircle as ve, Pencil as ye, Plus as m, RotateCcw as h, Send as g, Share2 as be, Trash2 as _ } from "lucide-react";
21
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
22
- import { EmphasisPanel as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
20
+ import { useEffect as me, useMemo as u, useState as d } from "react";
21
+ import { AlertTriangle as he, ExternalLink as f, Eye as ge, Grid3X3 as _e, Heart as ve, List as ye, MessageCircle as p, Pencil as m, Plus as be, RotateCcw as xe, Send as h, Share2 as Se, Trash2 as g } from "lucide-react";
22
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
23
+ import { EmphasisPanel as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
23
24
  //#region src/headshotmarketing/pages/social-media/PostsPage.tsx
24
- var x = {
25
+ var b = {
25
26
  instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
26
27
  facebook: "bg-status-info-bg text-status-info-text",
27
28
  twitter: "bg-status-info-bg text-status-info-text",
28
29
  linkedin: "bg-status-info-bg text-status-info-text",
29
30
  youtube: "bg-status-error-bg text-status-error-text",
30
31
  tiktok: "bg-bg-sunken text-text-secondary"
31
- }, Ce = {
32
- published: o.Published,
33
- scheduled: o.Scheduled,
34
- draft: o.Draft,
35
- failed: o.Failed
32
+ }, Te = {
33
+ published: a.Published,
34
+ scheduled: a.Scheduled,
35
+ draft: a.Draft,
36
+ failed: a.Failed
36
37
  };
37
- function we(e) {
38
- return !e || e.status !== o.Failed ? null : `Publishing failed: ${e.errorMessage ?? "the platform rejected the post."}`;
38
+ function x(e) {
39
+ return !e || e.status !== a.Failed ? null : `Publishing failed: ${e.errorMessage ?? "the platform rejected the post."}`;
39
40
  }
40
- function Te(e) {
41
+ function Ee(e) {
41
42
  return Array.from(new Set(e.match(/#\w+/g) ?? []));
42
43
  }
43
44
  var S = () => {
44
- let { navigate: o, basePath: S } = ne(), { data: C, refetch: Ee } = le(), [w, De] = p(""), [T, Oe] = p("all"), [E, ke] = p("all"), [D, Ae] = p("newest"), [O, je] = p("grid"), [k, Me] = p(null), [Ne, A] = p(!1), [Pe, j] = p(!1), [M, Fe] = p(null), [N, P] = p(""), [F, I] = p(null), [L, R] = p(null), z = ue({ initialPageSize: 12 }), { limit: Ie, offset: Le, setPage: B, setTotal: V } = z, { data: H, loading: U, error: Re, refetch: W } = t({
45
+ let { navigate: a, basePath: S } = ne(), { data: C, refetch: De } = de(), [w, Oe] = d(""), [T, ke] = d("all"), [E, Ae] = d("all"), [D, je] = d("newest"), [O, k] = d("grid"), [A, j] = d(null), [Me, M] = d(!1), [Ne, N] = d(!1), [P, Pe] = d(null), [F, I] = d(""), [Fe, L] = d(null), [R, z] = d(null), B = fe({ initialPageSize: 12 }), { limit: Ie, offset: Le, setPage: V, setTotal: H } = B, { data: U, loading: W, error: Re, refetch: G } = t({
45
46
  variables: {
46
47
  limit: Ie,
47
48
  offset: Le,
48
49
  search: w.trim() || void 0,
49
- status: T === "all" ? void 0 : Ce[T]
50
+ status: T === "all" ? void 0 : Te[T]
50
51
  },
51
52
  notifyOnNetworkStatusChange: !0
52
- }), [ze] = e(), [Be] = n(), [Ve] = ee(), [He, { loading: G }] = te();
53
- d(() => {
54
- B(1);
53
+ }), [ze] = e(), [Be] = n(), [Ve] = ee(), [He, { loading: K }] = te();
54
+ me(() => {
55
+ V(1);
55
56
  }, [
56
57
  w,
57
58
  T,
58
- B
59
- ]), d(() => {
60
- V(H?.headshotmarketingSocialPosts.total ?? 0);
61
- }, [H?.headshotmarketingSocialPosts.total, V]);
62
- let K = f(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [C?.headshotmarketingSocialAccounts.items]), q = f(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.platform === "FACEBOOK" ? "facebook" : e.platform === "INSTAGRAM" ? "instagram" : e.platform === "TWITTER" ? "twitter" : e.platform === "LINKEDIN" ? "linkedin" : e.platform === "TIKTOK" ? "tiktok" : e.platform === "YOUTUBE" ? "youtube" : "instagram"])), [C?.headshotmarketingSocialAccounts.items]), J = f(() => (C?.headshotmarketingSocialPosts.items ?? []).map((e) => de(e, K, q)), [
59
+ V
60
+ ]), me(() => {
61
+ H(U?.headshotmarketingSocialPosts.total ?? 0);
62
+ }, [U?.headshotmarketingSocialPosts.total, H]);
63
+ let q = u(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [C?.headshotmarketingSocialAccounts.items]), J = u(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.platform === "FACEBOOK" ? "facebook" : e.platform === "INSTAGRAM" ? "instagram" : e.platform === "TWITTER" ? "twitter" : e.platform === "LINKEDIN" ? "linkedin" : e.platform === "TIKTOK" ? "tiktok" : e.platform === "YOUTUBE" ? "youtube" : "instagram"])), [C?.headshotmarketingSocialAccounts.items]), Y = u(() => (C?.headshotmarketingSocialPosts.items ?? []).map((e) => pe(e, q, J)), [
63
64
  C?.headshotmarketingSocialPosts.items,
64
- K,
65
- q
66
- ]), Y = f(() => {
67
- let e = (H?.headshotmarketingSocialPosts.items ?? []).map((e) => de(e, K, q));
65
+ q,
66
+ J
67
+ ]), X = u(() => {
68
+ let e = (U?.headshotmarketingSocialPosts.items ?? []).map((e) => pe(e, q, J));
68
69
  return E !== "all" && (e = e.filter((e) => e.platform === E)), [...e].sort((e, t) => D === "newest" ? new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime() : D === "oldest" ? new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime() : D === "engagement" ? t.metrics.engagementRate - e.metrics.engagementRate : 0);
69
70
  }, [
70
- H?.headshotmarketingSocialPosts.items,
71
- K,
71
+ U?.headshotmarketingSocialPosts.items,
72
72
  q,
73
+ J,
73
74
  E,
74
75
  D
75
- ]), X = J.length, Ue = J.filter((e) => e.status === "published").length, We = J.filter((e) => e.status === "scheduled").length, Ge = J.reduce((e, t) => e + t.metrics.likes + t.metrics.comments + t.metrics.shares, 0), Z = J.filter((e) => e.status === "published"), Ke = Z.length > 0 ? Z.reduce((e, t) => e + t.metrics.engagementRate, 0) / Z.length : 0, Q = async () => {
76
- await Promise.all([W(), Ee()]);
77
- }, qe = async (e) => {
76
+ ]), Ue = Y.length, We = Y.filter((e) => e.status === "published").length, Ge = Y.filter((e) => e.status === "scheduled").length, Ke = Y.reduce((e, t) => e + t.metrics.likes + t.metrics.comments + t.metrics.shares, 0), Z = Y.filter((e) => e.status === "published"), qe = Z.length > 0 ? Z.reduce((e, t) => e + t.metrics.engagementRate, 0) / Z.length : 0, Q = async () => {
77
+ await Promise.all([G(), De()]);
78
+ }, Je = async (e) => {
78
79
  if (window.confirm("Delete this post? This cannot be undone.")) {
79
- R(null);
80
+ z(null);
80
81
  try {
81
- await ze({ variables: { id: e.id } }), k?.id === e.id && A(!1), await Q();
82
+ await ze({ variables: { id: e.id } }), A?.id === e.id && M(!1), await Q();
82
83
  } catch (e) {
83
- R(e instanceof Error ? e.message : "Failed to delete post.");
84
+ z(e instanceof Error ? e.message : "Failed to delete post.");
84
85
  }
85
86
  }
86
- }, Je = async (e) => {
87
- R(null);
87
+ }, Ye = async (e) => {
88
+ z(null);
88
89
  try {
89
- let { data: t } = await Be({ variables: { id: e.id } }), n = we(t?.publishHeadshotmarketingSocialPost);
90
- n && R(n), k?.id === e.id && A(!1), await Q();
90
+ let { data: t } = await Be({ variables: { id: e.id } }), n = x(t?.publishHeadshotmarketingSocialPost);
91
+ n && z(n), A?.id === e.id && M(!1), await Q();
91
92
  } catch (e) {
92
- R(e instanceof Error ? e.message : "Failed to publish post.");
93
+ z(e instanceof Error ? e.message : "Failed to publish post.");
93
94
  }
94
- }, Ye = async (e) => {
95
- R(null);
95
+ }, Xe = async (e) => {
96
+ z(null);
96
97
  try {
97
- let { data: t } = await Ve({ variables: { id: e.id } }), n = we(t?.retryHeadshotmarketingSocialPost);
98
- n && R(n), k?.id === e.id && A(!1), await Q();
98
+ let { data: t } = await Ve({ variables: { id: e.id } }), n = x(t?.retryHeadshotmarketingSocialPost);
99
+ n && z(n), A?.id === e.id && M(!1), await Q();
99
100
  } catch (e) {
100
- R(e instanceof Error ? e.message : "Failed to retry post.");
101
+ z(e instanceof Error ? e.message : "Failed to retry post.");
101
102
  }
102
- }, Xe = (e) => {
103
- Fe(e), P(e.content), I(null), A(!1), j(!0);
104
- }, Ze = async () => {
105
- if (!M) return;
106
- let e = N.trim();
103
+ }, Ze = (e) => {
104
+ Pe(e), I(e.content), L(null), M(!1), N(!0);
105
+ }, Qe = async () => {
106
+ if (!P) return;
107
+ let e = F.trim();
107
108
  if (!e) {
108
- I("Post content is required.");
109
+ L("Post content is required.");
109
110
  return;
110
111
  }
111
- I(null);
112
+ L(null);
112
113
  try {
113
114
  await He({ variables: {
114
- id: M.id,
115
+ id: P.id,
115
116
  input: {
116
117
  content: e,
117
- tags: Te(e)
118
+ tags: Ee(e)
118
119
  }
119
- } }), j(!1), await Q();
120
+ } }), N(!1), await Q();
120
121
  } catch (e) {
121
- I(e instanceof Error ? e.message : "Failed to save post.");
122
+ L(e instanceof Error ? e.message : "Failed to save post.");
122
123
  }
123
- }, Qe = (e) => [
124
+ }, $e = (e) => [
124
125
  {
125
126
  key: "edit",
126
127
  label: "Edit",
127
- icon: /* @__PURE__ */ y(ye, { className: "h-4 w-4" }),
128
- onClick: () => Xe(e)
128
+ icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" }),
129
+ onClick: () => Ze(e)
129
130
  },
130
131
  ...e.status === "draft" || e.status === "scheduled" ? [{
131
132
  key: "publish",
132
133
  label: "Publish now",
133
- icon: /* @__PURE__ */ y(g, { className: "h-4 w-4" }),
134
- onClick: () => void Je(e)
134
+ icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" }),
135
+ onClick: () => void Ye(e)
135
136
  }] : [],
136
137
  ...e.status === "failed" ? [{
137
138
  key: "retry",
138
139
  label: "Retry publish",
139
- icon: /* @__PURE__ */ y(h, { className: "h-4 w-4" }),
140
- onClick: () => void Ye(e)
140
+ icon: /* @__PURE__ */ v(xe, { className: "h-4 w-4" }),
141
+ onClick: () => void Xe(e)
141
142
  }] : [],
142
143
  ...e.postUrl ? [{
143
144
  key: "view",
144
145
  label: "View on platform",
145
- icon: /* @__PURE__ */ y(pe, { className: "h-4 w-4" }),
146
+ icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" }),
146
147
  onClick: () => {
147
148
  window.open(e.postUrl ?? "", "_blank", "noopener,noreferrer");
148
149
  }
@@ -150,387 +151,394 @@ var S = () => {
150
151
  {
151
152
  key: "delete",
152
153
  label: "Delete",
153
- icon: /* @__PURE__ */ y(_, { className: "h-4 w-4" }),
154
+ icon: /* @__PURE__ */ v(g, { className: "h-4 w-4" }),
154
155
  danger: !0,
155
- onClick: () => void qe(e)
156
+ onClick: () => void Je(e)
156
157
  }
157
- ], $ = X > 0;
158
- return /* @__PURE__ */ b(ie, {
158
+ ], $ = Ue > 0;
159
+ return /* @__PURE__ */ y(ae, {
159
160
  title: "Posts",
160
161
  description: "Manage all your social media posts",
161
- actions: /* @__PURE__ */ b("button", {
162
- onClick: () => o(S + "/social/compose"),
162
+ actions: /* @__PURE__ */ y("button", {
163
+ onClick: () => a(S + "/social/compose"),
163
164
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
164
- children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), "Create Post"]
165
+ children: [/* @__PURE__ */ v(be, { className: "h-4 w-4" }), "Create Post"]
165
166
  }),
166
167
  children: [
167
- /* @__PURE__ */ y(Se, { children: "Every social post you've drafted, scheduled or published, in one feed. Filter by status or platform, switch between grid and list views, and open any post to see how it performed — so you can learn what resonates and post more of it." }),
168
- /* @__PURE__ */ y(xe, { children: /* @__PURE__ */ b("div", {
168
+ /* @__PURE__ */ v(we, { children: "Every social post you've drafted, scheduled or published, in one feed. Filter by status or platform, switch between grid and list views, and open any post to see how it performed — so you can learn what resonates and post more of it." }),
169
+ /* @__PURE__ */ v(Ce, { children: /* @__PURE__ */ y("div", {
169
170
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
170
171
  children: [
171
- /* @__PURE__ */ y(s, {
172
+ /* @__PURE__ */ v(o, {
172
173
  title: "Total Posts",
173
- value: X,
174
- icon: /* @__PURE__ */ y(ve, { className: "h-4 w-4" })
174
+ value: Ue,
175
+ icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" })
175
176
  }),
176
- /* @__PURE__ */ y(s, {
177
+ /* @__PURE__ */ v(o, {
177
178
  title: "Published",
178
- value: Ue,
179
- icon: /* @__PURE__ */ y(me, { className: "h-4 w-4" })
179
+ value: We,
180
+ icon: /* @__PURE__ */ v(ge, { className: "h-4 w-4" })
180
181
  }),
181
- /* @__PURE__ */ y(s, {
182
+ /* @__PURE__ */ v(o, {
182
183
  title: "Scheduled",
183
- value: We,
184
+ value: Ge,
184
185
  change: 12
185
186
  }),
186
- /* @__PURE__ */ y(s, {
187
+ /* @__PURE__ */ v(o, {
187
188
  title: "Total Engagement",
188
- value: a(Ge),
189
+ value: i(Ke),
189
190
  change: 8.4
190
191
  }),
191
- /* @__PURE__ */ y(s, {
192
+ /* @__PURE__ */ v(o, {
192
193
  title: "Avg Engagement",
193
- value: re(Ke),
194
+ value: ie(qe),
194
195
  change: 1.2
195
196
  })
196
197
  ]
197
198
  }) }),
198
- L && /* @__PURE__ */ y("div", {
199
+ R && /* @__PURE__ */ v("div", {
199
200
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
200
- children: L
201
+ children: R
201
202
  }),
202
- /* @__PURE__ */ y(oe, {
203
+ /* @__PURE__ */ v(se, {
203
204
  searchValue: w,
204
- onSearchChange: De,
205
+ onSearchChange: Oe,
205
206
  searchPlaceholder: "Search posts...",
206
- filters: /* @__PURE__ */ b(v, { children: [
207
- /* @__PURE__ */ b("select", {
207
+ filters: /* @__PURE__ */ y(_, { children: [
208
+ /* @__PURE__ */ y("select", {
208
209
  value: T,
209
- onChange: (e) => Oe(e.target.value),
210
+ onChange: (e) => ke(e.target.value),
210
211
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
211
212
  children: [
212
- /* @__PURE__ */ y("option", {
213
+ /* @__PURE__ */ v("option", {
213
214
  value: "all",
214
215
  children: "All Status"
215
216
  }),
216
- /* @__PURE__ */ y("option", {
217
+ /* @__PURE__ */ v("option", {
217
218
  value: "published",
218
219
  children: "Published"
219
220
  }),
220
- /* @__PURE__ */ y("option", {
221
+ /* @__PURE__ */ v("option", {
221
222
  value: "scheduled",
222
223
  children: "Scheduled"
223
224
  }),
224
- /* @__PURE__ */ y("option", {
225
+ /* @__PURE__ */ v("option", {
225
226
  value: "draft",
226
227
  children: "Draft"
227
228
  }),
228
- /* @__PURE__ */ y("option", {
229
+ /* @__PURE__ */ v("option", {
229
230
  value: "failed",
230
231
  children: "Failed"
231
232
  })
232
233
  ]
233
234
  }),
234
- /* @__PURE__ */ b("select", {
235
+ /* @__PURE__ */ y("select", {
235
236
  value: E,
236
- onChange: (e) => ke(e.target.value),
237
+ onChange: (e) => Ae(e.target.value),
237
238
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
238
239
  children: [
239
- /* @__PURE__ */ y("option", {
240
+ /* @__PURE__ */ v("option", {
240
241
  value: "all",
241
242
  children: "All Platforms"
242
243
  }),
243
- /* @__PURE__ */ y("option", {
244
+ /* @__PURE__ */ v("option", {
244
245
  value: "instagram",
245
246
  children: "Instagram"
246
247
  }),
247
- /* @__PURE__ */ y("option", {
248
+ /* @__PURE__ */ v("option", {
248
249
  value: "facebook",
249
250
  children: "Facebook"
250
251
  }),
251
- /* @__PURE__ */ y("option", {
252
+ /* @__PURE__ */ v("option", {
252
253
  value: "twitter",
253
254
  children: "Twitter"
254
255
  }),
255
- /* @__PURE__ */ y("option", {
256
+ /* @__PURE__ */ v("option", {
256
257
  value: "linkedin",
257
258
  children: "LinkedIn"
258
259
  }),
259
- /* @__PURE__ */ y("option", {
260
+ /* @__PURE__ */ v("option", {
260
261
  value: "tiktok",
261
262
  children: "TikTok"
262
263
  })
263
264
  ]
264
265
  }),
265
- /* @__PURE__ */ b("select", {
266
+ /* @__PURE__ */ y("select", {
266
267
  value: D,
267
- onChange: (e) => Ae(e.target.value),
268
+ onChange: (e) => je(e.target.value),
268
269
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
269
270
  children: [
270
- /* @__PURE__ */ y("option", {
271
+ /* @__PURE__ */ v("option", {
271
272
  value: "newest",
272
273
  children: "Newest"
273
274
  }),
274
- /* @__PURE__ */ y("option", {
275
+ /* @__PURE__ */ v("option", {
275
276
  value: "oldest",
276
277
  children: "Oldest"
277
278
  }),
278
- /* @__PURE__ */ y("option", {
279
+ /* @__PURE__ */ v("option", {
279
280
  value: "engagement",
280
281
  children: "Engagement"
281
282
  })
282
283
  ]
283
284
  })
284
285
  ] }),
285
- actions: /* @__PURE__ */ b("div", {
286
+ actions: /* @__PURE__ */ y("div", {
286
287
  className: "flex rounded-md border border-border-subtle",
287
- children: [/* @__PURE__ */ y("button", {
288
- onClick: () => je("grid"),
288
+ children: [/* @__PURE__ */ v("button", {
289
+ onClick: () => k("grid"),
289
290
  className: r("p-2", O === "grid" ? "bg-foreground text-background" : "text-text-secondary"),
290
291
  "aria-label": "Grid view",
291
- children: /* @__PURE__ */ y(he, { className: "h-4 w-4" })
292
- }), /* @__PURE__ */ y("button", {
293
- onClick: () => je("list"),
292
+ children: /* @__PURE__ */ v(_e, { className: "h-4 w-4" })
293
+ }), /* @__PURE__ */ v("button", {
294
+ onClick: () => k("list"),
294
295
  className: r("p-2", O === "list" ? "bg-foreground text-background" : "text-text-secondary"),
295
296
  "aria-label": "List view",
296
- children: /* @__PURE__ */ y(_e, { className: "h-4 w-4" })
297
+ children: /* @__PURE__ */ v(ye, { className: "h-4 w-4" })
297
298
  })]
298
299
  })
299
300
  }),
300
- /* @__PURE__ */ b(se, {
301
- loading: U,
301
+ /* @__PURE__ */ y(ce, {
302
+ loading: W,
302
303
  error: Re,
303
- onRetry: W,
304
- hasData: !!H,
305
- children: [Y.length === 0 ? /* @__PURE__ */ y(ae, {
304
+ onRetry: G,
305
+ hasData: !!U,
306
+ children: [X.length === 0 ? /* @__PURE__ */ v(oe, {
306
307
  illustration: $ ? "empty-search" : "empty-notifications",
307
308
  title: $ ? "No posts match your filters" : "No posts yet",
308
309
  description: $ ? "Try a different search term, status or platform." : "Compose your first social post to start building your feed.",
309
- action: $ ? void 0 : /* @__PURE__ */ b("button", {
310
- onClick: () => o(S + "/social/compose"),
310
+ action: $ ? void 0 : /* @__PURE__ */ y("button", {
311
+ onClick: () => a(S + "/social/compose"),
311
312
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
312
- children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), "Create Post"]
313
+ children: [/* @__PURE__ */ v(be, { className: "h-4 w-4" }), "Create Post"]
313
314
  })
314
- }) : O === "grid" ? /* @__PURE__ */ y("div", {
315
+ }) : O === "grid" ? /* @__PURE__ */ v("div", {
315
316
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
316
- children: Y.map((e) => /* @__PURE__ */ b("div", {
317
+ children: X.map((e) => /* @__PURE__ */ y("div", {
317
318
  onClick: () => {
318
- Me(e), A(!0);
319
+ j(e), M(!0);
319
320
  },
320
321
  className: "cursor-pointer rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 space-y-3 hover:border-foreground/30 transition-colors",
321
322
  children: [
322
- /* @__PURE__ */ b("div", {
323
+ /* @__PURE__ */ y("div", {
323
324
  className: "flex items-center justify-between",
324
- children: [/* @__PURE__ */ y("span", {
325
- className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", x[e.platform]),
325
+ children: [/* @__PURE__ */ v("span", {
326
+ className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", b[e.platform]),
326
327
  children: e.platform
327
- }), /* @__PURE__ */ b("div", {
328
+ }), /* @__PURE__ */ y("div", {
328
329
  className: "flex items-center gap-1",
329
- children: [/* @__PURE__ */ y(c, { status: e.status }), /* @__PURE__ */ y(u, {
330
+ children: [/* @__PURE__ */ v(s, { status: e.status }), /* @__PURE__ */ v(l, {
330
331
  id: `hm-post-grid-${e.id}`,
331
- items: Qe(e),
332
+ items: $e(e),
332
333
  buttonLabel: "Post actions"
333
334
  })]
334
335
  })]
335
336
  }),
336
- /* @__PURE__ */ y("p", {
337
+ /* @__PURE__ */ v("p", {
337
338
  className: "text-sm text-text-primary line-clamp-3",
338
339
  children: e.content
339
340
  }),
340
- e.status === "failed" && e.errorMessage && /* @__PURE__ */ b("p", {
341
+ e.status === "failed" && e.errorMessage && /* @__PURE__ */ y("p", {
341
342
  className: "flex items-start gap-1.5 text-xs text-status-error-text",
342
343
  "data-testid": "hm-post-error",
343
- children: [/* @__PURE__ */ y(fe, { className: "mt-0.5 h-3 w-3 shrink-0" }), /* @__PURE__ */ y("span", {
344
+ children: [/* @__PURE__ */ v(he, { className: "mt-0.5 h-3 w-3 shrink-0" }), /* @__PURE__ */ v("span", {
344
345
  className: "line-clamp-2",
345
346
  children: e.errorMessage
346
347
  })]
347
348
  }),
348
- /* @__PURE__ */ b("div", {
349
+ /* @__PURE__ */ y("div", {
349
350
  className: "flex items-center justify-between text-xs text-text-secondary",
350
- children: [/* @__PURE__ */ y("span", { children: i(e.createdAt) }), e.status === "published" && /* @__PURE__ */ b("div", {
351
+ children: [/* @__PURE__ */ v("span", { children: re(e.createdAt) }), e.status === "published" && /* @__PURE__ */ y("div", {
351
352
  className: "flex items-center gap-3",
352
353
  children: [
353
- /* @__PURE__ */ b("span", {
354
+ /* @__PURE__ */ y("span", {
354
355
  className: "flex items-center gap-1",
355
- children: [/* @__PURE__ */ y(ge, { className: "h-3 w-3" }), a(e.metrics.likes)]
356
+ children: [/* @__PURE__ */ v(ve, { className: "h-3 w-3" }), i(e.metrics.likes)]
356
357
  }),
357
- /* @__PURE__ */ b("span", {
358
+ /* @__PURE__ */ y("span", {
358
359
  className: "flex items-center gap-1",
359
- children: [/* @__PURE__ */ y(ve, { className: "h-3 w-3" }), a(e.metrics.comments)]
360
+ children: [/* @__PURE__ */ v(p, { className: "h-3 w-3" }), i(e.metrics.comments)]
360
361
  }),
361
- /* @__PURE__ */ b("span", {
362
+ /* @__PURE__ */ y("span", {
362
363
  className: "flex items-center gap-1",
363
- children: [/* @__PURE__ */ y(be, { className: "h-3 w-3" }), a(e.metrics.shares)]
364
+ children: [/* @__PURE__ */ v(Se, { className: "h-3 w-3" }), i(e.metrics.shares)]
364
365
  })
365
366
  ]
366
367
  })]
367
368
  })
368
369
  ]
369
370
  }, e.id))
370
- }) : /* @__PURE__ */ y("div", {
371
+ }) : /* @__PURE__ */ v("div", {
371
372
  className: "space-y-2",
372
- children: Y.map((e) => /* @__PURE__ */ b("div", {
373
+ children: X.map((e) => /* @__PURE__ */ y("div", {
373
374
  onClick: () => {
374
- Me(e), A(!0);
375
+ j(e), M(!0);
375
376
  },
376
377
  className: "cursor-pointer flex flex-wrap items-center gap-4 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:border-foreground/30 transition-colors",
377
378
  children: [
378
- /* @__PURE__ */ y("span", {
379
- className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap", x[e.platform]),
379
+ /* @__PURE__ */ v("span", {
380
+ className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap", b[e.platform]),
380
381
  children: e.platform
381
382
  }),
382
- /* @__PURE__ */ y("p", {
383
+ /* @__PURE__ */ v("p", {
383
384
  className: "text-sm text-text-primary flex-1 min-w-[8rem] truncate",
384
385
  children: e.content
385
386
  }),
386
- /* @__PURE__ */ y(c, { status: e.status }),
387
- e.status === "published" && /* @__PURE__ */ b("div", {
387
+ /* @__PURE__ */ v(s, { status: e.status }),
388
+ e.status === "published" && /* @__PURE__ */ y("div", {
388
389
  className: "flex items-center gap-3 text-xs text-text-secondary",
389
- children: [/* @__PURE__ */ b("span", { children: [a(e.metrics.likes), " likes"] }), /* @__PURE__ */ b("span", { children: [a(e.metrics.reach), " reach"] })]
390
+ children: [/* @__PURE__ */ y("span", { children: [i(e.metrics.likes), " likes"] }), /* @__PURE__ */ y("span", { children: [i(e.metrics.reach), " reach"] })]
390
391
  }),
391
- /* @__PURE__ */ y("span", {
392
+ /* @__PURE__ */ v("span", {
392
393
  className: "text-xs text-text-secondary whitespace-nowrap",
393
- children: i(e.createdAt)
394
+ children: re(e.createdAt)
394
395
  }),
395
- /* @__PURE__ */ y(u, {
396
+ /* @__PURE__ */ v(l, {
396
397
  id: `hm-post-list-${e.id}`,
397
- items: Qe(e),
398
+ items: $e(e),
398
399
  buttonLabel: "Post actions"
399
400
  })
400
401
  ]
401
402
  }, e.id))
402
- }), $ && /* @__PURE__ */ y(ce, {
403
- page: z.page,
404
- pageSize: z.pageSize,
405
- total: z.total,
406
- onPageChange: z.setPage,
407
- onPageSizeChange: z.setPageSize,
408
- disabled: U
403
+ }), $ && /* @__PURE__ */ v(le, {
404
+ page: B.page,
405
+ pageSize: B.pageSize,
406
+ total: B.total,
407
+ onPageChange: B.setPage,
408
+ onPageSizeChange: B.setPageSize,
409
+ disabled: W
409
410
  })]
410
411
  }),
411
- /* @__PURE__ */ y(l, {
412
- open: Ne,
413
- onClose: () => A(!1),
412
+ /* @__PURE__ */ v(c, {
413
+ open: Me,
414
+ onClose: () => M(!1),
414
415
  title: "Post Details",
415
416
  size: "lg",
416
- footer: k ? /* @__PURE__ */ b(v, { children: [
417
- /* @__PURE__ */ b("button", {
417
+ footer: A ? /* @__PURE__ */ y(_, { children: [
418
+ /* @__PURE__ */ y("button", {
418
419
  type: "button",
419
- onClick: () => Xe(k),
420
+ onClick: () => Ze(A),
420
421
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
421
- children: [/* @__PURE__ */ y(ye, { className: "h-4 w-4" }), "Edit"]
422
+ children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), "Edit"]
422
423
  }),
423
- k.status === "failed" && /* @__PURE__ */ b("button", {
424
+ A.status === "failed" && /* @__PURE__ */ y("button", {
424
425
  type: "button",
425
- onClick: () => void Ye(k),
426
+ onClick: () => void Xe(A),
426
427
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
427
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), "Retry publish"]
428
+ children: [/* @__PURE__ */ v(xe, { className: "h-4 w-4" }), "Retry publish"]
428
429
  }),
429
- (k.status === "draft" || k.status === "scheduled") && /* @__PURE__ */ b("button", {
430
+ (A.status === "draft" || A.status === "scheduled") && /* @__PURE__ */ y("button", {
430
431
  type: "button",
431
- onClick: () => void Je(k),
432
+ onClick: () => void Ye(A),
432
433
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
433
- children: [/* @__PURE__ */ y(g, { className: "h-4 w-4" }), "Publish"]
434
+ children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), "Publish"]
434
435
  }),
435
- /* @__PURE__ */ b("button", {
436
+ /* @__PURE__ */ y("button", {
436
437
  type: "button",
437
- onClick: () => void qe(k),
438
+ onClick: () => void Je(A),
438
439
  className: "inline-flex items-center gap-2 rounded-md border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/40",
439
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Delete"]
440
+ children: [/* @__PURE__ */ v(g, { className: "h-4 w-4" }), "Delete"]
440
441
  })
441
442
  ] }) : void 0,
442
- children: k && /* @__PURE__ */ b("div", {
443
+ children: A && /* @__PURE__ */ y("div", {
443
444
  className: "space-y-4",
444
445
  children: [
445
- /* @__PURE__ */ b("div", {
446
+ /* @__PURE__ */ y("div", {
446
447
  className: "flex flex-wrap items-center gap-3",
447
448
  children: [
448
- /* @__PURE__ */ y("span", {
449
- className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", x[k.platform]),
450
- children: k.platform
449
+ /* @__PURE__ */ v("span", {
450
+ className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", b[A.platform]),
451
+ children: A.platform
451
452
  }),
452
- /* @__PURE__ */ y(c, { status: k.status }),
453
- /* @__PURE__ */ b("span", {
453
+ /* @__PURE__ */ v(s, { status: A.status }),
454
+ /* @__PURE__ */ y("span", {
454
455
  className: "text-xs text-text-secondary",
455
- children: ["by ", k.author]
456
+ children: ["by ", A.author]
456
457
  })
457
458
  ]
458
459
  }),
459
- /* @__PURE__ */ y("p", {
460
+ /* @__PURE__ */ v("p", {
460
461
  className: "text-sm text-text-primary whitespace-pre-wrap",
461
- children: k.content
462
+ children: A.content
462
463
  }),
463
- k.status === "scheduled" && k.scheduledAt && /* @__PURE__ */ b("p", {
464
+ A.status === "scheduled" && A.scheduledAt && /* @__PURE__ */ y("p", {
464
465
  className: "text-xs text-text-secondary",
465
466
  children: [
466
467
  "Publishes automatically at",
467
468
  " ",
468
- new Date(k.scheduledAt).toLocaleString()
469
+ new Date(A.scheduledAt).toLocaleString()
469
470
  ]
470
471
  }),
471
- k.status === "failed" && /* @__PURE__ */ b("div", {
472
+ A.status === "failed" && /* @__PURE__ */ y("div", {
472
473
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
473
474
  "data-testid": "hm-post-detail-error",
474
475
  children: [
475
- /* @__PURE__ */ y("p", {
476
+ /* @__PURE__ */ v("p", {
476
477
  className: "font-medium",
477
478
  children: "Publishing failed"
478
479
  }),
479
- /* @__PURE__ */ y("p", {
480
+ /* @__PURE__ */ v("p", {
480
481
  className: "mt-1 break-words",
481
- children: k.errorMessage ?? "The platform rejected the post."
482
+ children: A.errorMessage ?? "The platform rejected the post."
482
483
  }),
483
- (k.deliveryAttempts ?? 0) > 0 && /* @__PURE__ */ b("p", {
484
+ (A.deliveryAttempts ?? 0) > 0 && /* @__PURE__ */ y("p", {
484
485
  className: "mt-1 text-xs",
485
- children: ["Failed attempts: ", k.deliveryAttempts]
486
+ children: ["Failed attempts: ", A.deliveryAttempts]
486
487
  })
487
488
  ]
488
489
  }),
489
- k.postUrl && /* @__PURE__ */ b("a", {
490
- href: k.postUrl,
490
+ A.postUrl && /* @__PURE__ */ y("a", {
491
+ href: A.postUrl,
491
492
  target: "_blank",
492
493
  rel: "noopener noreferrer",
493
494
  className: "inline-flex items-center gap-1.5 text-sm font-medium text-text-primary underline underline-offset-2 hover:text-text-secondary",
494
- children: [/* @__PURE__ */ y(pe, { className: "h-4 w-4" }), "View on platform"]
495
+ children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "View on platform"]
495
496
  }),
496
- k.status === "published" && /* @__PURE__ */ b("div", {
497
+ A.status === "published" && /* @__PURE__ */ y("div", {
497
498
  className: "grid grid-cols-3 gap-4",
498
499
  children: [
499
- /* @__PURE__ */ b("div", {
500
+ /* @__PURE__ */ y("div", {
500
501
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
501
- children: [/* @__PURE__ */ y("p", {
502
+ children: [/* @__PURE__ */ v("p", {
502
503
  className: "text-lg font-bold text-text-primary",
503
- children: a(k.metrics.likes)
504
- }), /* @__PURE__ */ y("p", {
504
+ children: i(A.metrics.likes)
505
+ }), /* @__PURE__ */ v("p", {
505
506
  className: "text-xs text-text-secondary",
506
507
  children: "Likes"
507
508
  })]
508
509
  }),
509
- /* @__PURE__ */ b("div", {
510
+ /* @__PURE__ */ y("div", {
510
511
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
511
- children: [/* @__PURE__ */ y("p", {
512
+ children: [/* @__PURE__ */ v("p", {
512
513
  className: "text-lg font-bold text-text-primary",
513
- children: a(k.metrics.comments)
514
- }), /* @__PURE__ */ y("p", {
514
+ children: i(A.metrics.comments)
515
+ }), /* @__PURE__ */ v("p", {
515
516
  className: "text-xs text-text-secondary",
516
517
  children: "Comments"
517
518
  })]
518
519
  }),
519
- /* @__PURE__ */ b("div", {
520
+ /* @__PURE__ */ y("div", {
520
521
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
521
- children: [/* @__PURE__ */ y("p", {
522
+ children: [/* @__PURE__ */ v("p", {
522
523
  className: "text-lg font-bold text-text-primary",
523
- children: a(k.metrics.reach)
524
- }), /* @__PURE__ */ y("p", {
524
+ children: i(A.metrics.reach)
525
+ }), /* @__PURE__ */ v("p", {
525
526
  className: "text-xs text-text-secondary",
526
527
  children: "Reach"
527
528
  })]
528
529
  })
529
530
  ]
530
531
  }),
531
- /* @__PURE__ */ y("div", {
532
+ /* @__PURE__ */ v(ue, {
533
+ sourceType: "SOCIAL_POST",
534
+ sourceId: A.id,
535
+ title: "Tracked links",
536
+ description: "Links in this post are replaced with tracked URLs when it is published through a connected account, so each click is counted and attributed as a SOCIAL_CLICK touchpoint.",
537
+ emptyMessage: A.status === "published" ? "No tracked links for this post. Posts without links, or published before tracking was enabled, have none." : "Tracked links are created when this post is published."
538
+ }, A.id),
539
+ /* @__PURE__ */ v("div", {
532
540
  className: "flex flex-wrap gap-1",
533
- children: k.tags.map((e) => /* @__PURE__ */ y("span", {
541
+ children: A.tags.map((e) => /* @__PURE__ */ v("span", {
534
542
  className: "rounded-full border border-border-subtle px-2.5 py-0.5 text-xs text-text-secondary",
535
543
  children: e.startsWith("#") ? e : `#${e}`
536
544
  }, e))
@@ -538,32 +546,32 @@ var S = () => {
538
546
  ]
539
547
  })
540
548
  }),
541
- /* @__PURE__ */ y(l, {
542
- open: Pe,
543
- onClose: () => j(!1),
549
+ /* @__PURE__ */ v(c, {
550
+ open: Ne,
551
+ onClose: () => N(!1),
544
552
  title: "Edit Post",
545
553
  description: "Update the caption. Hashtags are re-detected automatically.",
546
554
  size: "lg",
547
- footer: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("button", {
555
+ footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
548
556
  type: "button",
549
- onClick: () => j(!1),
557
+ onClick: () => N(!1),
550
558
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
551
559
  children: "Cancel"
552
- }), /* @__PURE__ */ y("button", {
560
+ }), /* @__PURE__ */ v("button", {
553
561
  type: "button",
554
- onClick: Ze,
555
- disabled: G,
562
+ onClick: Qe,
563
+ disabled: K,
556
564
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
557
- children: G ? "Saving..." : "Save changes"
565
+ children: K ? "Saving..." : "Save changes"
558
566
  })] }),
559
- children: /* @__PURE__ */ b("div", {
567
+ children: /* @__PURE__ */ y("div", {
560
568
  className: "space-y-3",
561
- children: [F && /* @__PURE__ */ y("div", {
569
+ children: [Fe && /* @__PURE__ */ v("div", {
562
570
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
563
- children: F
564
- }), /* @__PURE__ */ y("textarea", {
565
- value: N,
566
- onChange: (e) => P(e.target.value),
571
+ children: Fe
572
+ }), /* @__PURE__ */ v("textarea", {
573
+ value: F,
574
+ onChange: (e) => I(e.target.value),
567
575
  rows: 6,
568
576
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
569
577
  placeholder: "Write your post content..."