@burdenoff/microfe-headshotmarketing 2026.1202.2 → 2026.1203.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 (53) hide show
  1. package/dist/generated/wspace-operations.d.ts +598 -0
  2. package/dist/generated/wspace-operations.js +728 -443
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +281 -4
  5. package/dist/generated/wspace-types.js +21 -19
  6. package/dist/generated/wspace-types.js.map +1 -1
  7. package/dist/headshotmarketing/components/CrmRecordSelection.js +92 -47
  8. package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
  9. package/dist/headshotmarketing/components/EntityTagPicker.d.ts +9 -0
  10. package/dist/headshotmarketing/components/EntityTagPicker.js +261 -0
  11. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -0
  12. package/dist/headshotmarketing/components/index.d.ts +1 -0
  13. package/dist/headshotmarketing/components/index.js +2 -1
  14. package/dist/headshotmarketing/hooks/useEntityTags.d.ts +31 -0
  15. package/dist/headshotmarketing/hooks/useEntityTags.js +34 -0
  16. package/dist/headshotmarketing/hooks/useEntityTags.js.map +1 -0
  17. package/dist/headshotmarketing/pages/HomePage.js +33 -26
  18. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +182 -174
  20. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/ads/AdsPage.js +0 -8
  22. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +173 -164
  24. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  25. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +0 -4
  26. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  27. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +0 -4
  28. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +0 -4
  30. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/automation/AutomationPage.js +28 -25
  32. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +460 -275
  34. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  35. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +163 -155
  36. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  37. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +2 -0
  38. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  39. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +136 -128
  40. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/content/ContentPage.js +1 -0
  42. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/crm/ContactsPage.js +1 -0
  44. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +430 -253
  46. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +0 -3
  48. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/social-media/PostsPage.js +3 -6
  50. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +0 -8
  52. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  53. package/package.json +1 -1
@@ -1,52 +1,52 @@
1
- import { useHeadshotmarketingAddLandingPageSectionMutation as e, useHeadshotmarketingCreateLandingPageMutation as t, useHeadshotmarketingPublishLandingPageMutation as n, useHeadshotmarketingRemoveLandingPageSectionMutation as r, useHeadshotmarketingReorderLandingPageSectionsMutation as i, useHeadshotmarketingSelectedLandingPageQuery as a, useHeadshotmarketingUpdateLandingPageMutation as o, useHeadshotmarketingUpdateLandingPageSectionMutation as s } from "../../../generated/wspace-operations.js";
2
- import { HeadshotmarketingLandingPageSectionType as c } from "../../../generated/wspace-types.js";
1
+ import { useHeadshotmarketingAddLandingPageSectionMutation as e, useHeadshotmarketingCreateLandingPageMutation as t, useHeadshotmarketingLandingPageSubmissionsQuery as n, useHeadshotmarketingPublishLandingPageMutation as r, useHeadshotmarketingRemoveLandingPageSectionMutation as i, useHeadshotmarketingReorderLandingPageSectionsMutation as a, useHeadshotmarketingSelectedLandingPageQuery as o, useHeadshotmarketingUpdateLandingPageMutation as s, useHeadshotmarketingUpdateLandingPageSectionMutation as c } from "../../../generated/wspace-operations.js";
2
+ import { HeadshotmarketingLandingPageSectionType as l } from "../../../generated/wspace-types.js";
3
3
  import "../../components/index.js";
4
- import { cn as l } from "../../utils/helpers.js";
5
- import { PageLayout as ee } from "../../components/PageLayout.js";
6
- import { Modal as te } from "../../components/Modal.js";
7
- import { QueryStateBoundary as ne } from "../../components/QueryStateBoundary.js";
8
- import { metadataWithoutLayout as re, planSectionSync as ie, sectionFromRow as ae, sectionsFromLegacyLayout as oe, sectionsFromRows as u, toBuilderTemplateModel as se } from "../../utils/builderMapper.js";
9
- import { useHeadshotmarketingBootstrap as ce } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
- import { useHeadshotMarketing as d } from "../../context/HeadshotMarketingContext.js";
4
+ import { cn as u, formatDate as ee, joinPath as te } from "../../utils/helpers.js";
5
+ import { PageLayout as ne } from "../../components/PageLayout.js";
6
+ import { Modal as re } from "../../components/Modal.js";
7
+ import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
8
+ import { metadataWithoutLayout as ae, planSectionSync as oe, sectionFromRow as se, sectionsFromLegacyLayout as ce, sectionsFromRows as d, toBuilderTemplateModel as le } from "../../utils/builderMapper.js";
9
+ import { useHeadshotmarketingBootstrap as ue } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
+ import { useHeadshotMarketing as de } from "../../context/HeadshotMarketingContext.js";
11
11
  import "../../hooks/index.js";
12
- import { SECTION_CATALOG as le, SectionThumbnail as ue, defaultConfig as f, sectionLabelFor as p } from "./builderCatalog.js";
13
- import { SectionCanvasBlock as de } from "./SectionCanvasBlock.js";
14
- import { SectionInspector as fe } from "./SectionInspector.js";
15
- import { SectionContent as pe } from "./SectionContent.js";
16
- import { starterContent as me } from "./sectionSchema.js";
17
- import { useRecordSelection as m } from "../../hooks/useRecordSelection.js";
18
- import { useEffect as he, useLayoutEffect as ge, useMemo as _e, useRef as h, useState as g } from "react";
19
- import { ArrowLeft as ve, Edit3 as ye, ExternalLink as _, Eye as be, Globe as xe, Layers as Se, LayoutTemplate as Ce, Monitor as we, MousePointerClick as Te, Plus as Ee, Save as De, Smartphone as Oe, Tablet as ke } from "lucide-react";
20
- import { useBeforeUnload as Ae } from "react-router";
21
- import { Fragment as je, jsx as v, jsxs as y } from "react/jsx-runtime";
22
- import { PagePurpose as Me, ThemedSelect as Ne } from "@burdenoff/fe-libs/ui";
12
+ import { SECTION_CATALOG as fe, SectionThumbnail as pe, defaultConfig as f, sectionLabelFor as p } from "./builderCatalog.js";
13
+ import { SectionCanvasBlock as me } from "./SectionCanvasBlock.js";
14
+ import { SectionInspector as he } from "./SectionInspector.js";
15
+ import { SectionContent as ge } from "./SectionContent.js";
16
+ import { starterContent as m } from "./sectionSchema.js";
17
+ import { useRecordSelection as _e } from "../../hooks/useRecordSelection.js";
18
+ import { useEffect as ve, useLayoutEffect as ye, useMemo as be, useRef as h, useState as g } from "react";
19
+ import { ArrowLeft as xe, BarChart3 as Se, Edit3 as Ce, ExternalLink as _, Eye as we, Globe as Te, Layers as v, LayoutTemplate as Ee, Monitor as De, MousePointerClick as Oe, Plus as ke, RefreshCw as Ae, Save as je, Smartphone as Me, Tablet as Ne, UserCheck as Pe } from "lucide-react";
20
+ import { useBeforeUnload as Fe } from "react-router";
21
+ import { Fragment as Ie, jsx as y, jsxs as b } from "react/jsx-runtime";
22
+ import { PagePurpose as Le, ThemedSelect as Re } from "@burdenoff/fe-libs/ui";
23
23
  // src/headshotmarketing/pages/builder/LandingPageBuilderPage.tsx
24
- var b = "application/x-hm-palette", x = "application/x-hm-reorder", Pe = [
24
+ var x = "application/x-hm-palette", S = "application/x-hm-reorder", ze = [
25
25
  "header",
26
26
  "hero",
27
27
  "features",
28
28
  "testimonials",
29
29
  "cta",
30
30
  "footer"
31
- ], S = 0;
32
- function C() {
33
- return S += 1, `sec-${Date.now().toString(36)}-${S}`;
31
+ ], C = 0;
32
+ function Be() {
33
+ return C += 1, `sec-${Date.now().toString(36)}-${C}`;
34
34
  }
35
35
  function w(e) {
36
36
  return {
37
- id: C(),
37
+ id: Be(),
38
38
  type: e,
39
39
  label: p(e),
40
40
  config: {
41
41
  ...f(),
42
- ...me(e)
42
+ ...m(e)
43
43
  }
44
44
  };
45
45
  }
46
46
  function T(e) {
47
- return Object.values(c).find((t) => t === e) ?? c.Custom;
47
+ return Object.values(l).find((t) => t === e) ?? l.Custom;
48
48
  }
49
- function Fe(e) {
49
+ function Ve(e) {
50
50
  return {
51
51
  type: T(e.type),
52
52
  title: e.title,
@@ -56,56 +56,56 @@ function Fe(e) {
56
56
  metadata: e.metadata
57
57
  };
58
58
  }
59
- function Ie(e) {
60
- let t = u(e?.sections);
59
+ function He(e) {
60
+ let t = d(e?.sections);
61
61
  return t.length > 0 ? {
62
62
  saved: t,
63
63
  legacy: !1
64
64
  } : {
65
65
  saved: [],
66
- legacy: oe(e?.metadata).length > 0
66
+ legacy: ce(e?.metadata).length > 0
67
67
  };
68
68
  }
69
- function Le(e) {
69
+ function Ue(e) {
70
70
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
71
71
  }
72
- var Re = () => {
73
- let { selectedId: e, invalidSelection: t, selectRecord: n } = m(), { workspaceId: r } = d(), i = ce().data?.headshotmarketingLandingPages.items ?? [], o = a({
72
+ var We = () => {
73
+ let { selectedId: e, invalidSelection: t, selectRecord: n } = _e(), { workspaceId: r } = de(), i = ue().data?.headshotmarketingLandingPages.items ?? [], a = o({
74
74
  variables: { id: e ?? "" },
75
75
  skip: !e,
76
76
  fetchPolicy: "network-only"
77
- }), s = h(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = o.data?.headshotmarketingLandingPage;
78
- return /* @__PURE__ */ y(je, { children: [/* @__PURE__ */ y("label", {
77
+ }), s = h(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = a.data?.headshotmarketingLandingPage;
78
+ return /* @__PURE__ */ b(Ie, { children: [/* @__PURE__ */ b("label", {
79
79
  className: "block p-4 text-sm text-text-primary",
80
- children: ["Landing page", /* @__PURE__ */ y(Ne, {
80
+ children: ["Landing page", /* @__PURE__ */ b(Re, {
81
81
  "aria-label": "Select landing page",
82
82
  value: e ?? "",
83
83
  onChange: (e) => n(e.target.value || null),
84
84
  className: "ms-3 rounded-md border border-border-subtle bg-bg-surface p-2",
85
85
  children: [
86
- /* @__PURE__ */ v("option", {
86
+ /* @__PURE__ */ y("option", {
87
87
  value: "",
88
88
  children: "New landing page"
89
89
  }),
90
- e && !i.some((t) => t.id === e) && /* @__PURE__ */ v("option", {
90
+ e && !i.some((t) => t.id === e) && /* @__PURE__ */ y("option", {
91
91
  value: e,
92
92
  children: l?.title ?? "Selected landing page"
93
93
  }),
94
- i.map((e) => /* @__PURE__ */ v("option", {
94
+ i.map((e) => /* @__PURE__ */ y("option", {
95
95
  value: e.id,
96
96
  children: e.title
97
97
  }, e.id))
98
98
  ]
99
99
  })]
100
- }), t || e && !o.loading && (o.error || !l || l.id !== e) ? /* @__PURE__ */ v("p", {
100
+ }), t || e && !a.loading && (a.error || !l || l.id !== e) ? /* @__PURE__ */ y("p", {
101
101
  role: "alert",
102
102
  className: "p-4",
103
103
  children: "This landing page is unavailable or you do not have access. Choose another page or start a new one."
104
- }) : e && o.loading ? /* @__PURE__ */ v("p", {
104
+ }) : e && a.loading ? /* @__PURE__ */ y("p", {
105
105
  role: "status",
106
106
  className: "p-4",
107
107
  children: "Loading landing page…"
108
- }) : /* @__PURE__ */ v(ze, {
108
+ }) : /* @__PURE__ */ y(Ge, {
109
109
  landingPage: e ? l : void 0,
110
110
  initialDraft: s.current.get(c),
111
111
  rememberDraft: (e) => {
@@ -115,52 +115,62 @@ var Re = () => {
115
115
  s.current.delete(c), n(e);
116
116
  }
117
117
  }, c)] });
118
- }, ze = ({ landingPage: a, initialDraft: c, rememberDraft: u, onCreated: f }) => {
119
- let { navigate: p, basePath: me } = d(), { data: m, loading: Ne, error: S, refetch: T } = ce(), [Re, { loading: ze }] = t(), [Be, { loading: Ve }] = o(), [He, { loading: Ue }] = n(), [We] = e(), [Ge] = s(), [Ke] = r(), [qe] = i(), [Je, E] = g(!1), [D, Ye] = g(c?.landingPageId ?? a?.id ?? null), [O, k] = g(a?.status ?? "DRAFT"), [Xe, A] = g(a?.publishedUrl ?? null), [j, M] = g(c?.pageName ?? a?.title ?? "Landing Page"), [N, Ze] = g(c?.pageSlug ?? a?.slug ?? ""), [P, Qe] = g(c?.templateId ?? a?.templateId ?? null), [$e, et] = g("desktop"), [F, I] = g(null), [tt, L] = g(!1), [R, z] = g(null), [nt, B] = g(null), [rt, V] = g(null), [it, H] = g(null), [U, at] = g(null), ot = rt !== null || it !== null, [st, ct] = g(() => Ie(a).saved), lt = _e(() => {
120
- let { saved: e } = Ie(a);
118
+ }, Ge = ({ landingPage: o, initialDraft: l, rememberDraft: d, onCreated: f }) => {
119
+ let { navigate: p, basePath: m } = de(), { data: _e, loading: Re, error: C, refetch: T } = ue(), [We, { loading: Ge }] = t(), [Ke, { loading: qe }] = s(), [Je, { loading: Ye }] = r(), [Xe] = e(), [Ze] = c(), [Qe] = i(), [$e] = a(), [et, E] = g(!1), [D, tt] = g(l?.landingPageId ?? o?.id ?? null), [O, k] = g(o?.status ?? "DRAFT"), [nt, A] = g(o?.publishedUrl ?? null), [j, M] = g(l?.pageName ?? o?.title ?? "Landing Page"), [N, rt] = g(l?.pageSlug ?? o?.slug ?? ""), [P, it] = g(l?.templateId ?? o?.templateId ?? null), [at, ot] = g("desktop"), [F, st] = g("editor"), [I, L] = g(null), [ct, R] = g(!1), [z, B] = g(null), [lt, V] = g(null), H = n({
120
+ variables: {
121
+ landingPageId: D ?? void 0,
122
+ pagination: {
123
+ limit: 50,
124
+ offset: 0
125
+ }
126
+ },
127
+ skip: !D,
128
+ fetchPolicy: "cache-and-network"
129
+ }), U = H.data?.headshotmarketingLandingPageSubmissions.items ?? [], W = H.data?.headshotmarketingLandingPageSubmissions.total ?? o?.submissionCount ?? o?.conversionCount ?? 0, G = o?.viewCount ?? 0, ut = G > 0 ? `${(W / G * 100).toFixed(1)}%` : "—", [dt, K] = g(null), [ft, q] = g(null), [J, pt] = g(null), mt = dt !== null || ft !== null, [ht, gt] = g(() => He(o).saved), _t = be(() => {
130
+ let { saved: e } = He(o);
121
131
  if (e.length > 0) return e;
122
- let t = oe(a?.metadata);
123
- return t.length > 0 ? t : a ? [] : [w("hero")];
124
- }, [a]), [W, G] = g(c?.sections ?? lt), [ut, dt] = g(() => ({
125
- landingPageId: a?.id ?? null,
126
- pageName: a?.title ?? "Landing Page",
127
- pageSlug: a?.slug ?? "",
128
- templateId: a?.templateId ?? null,
129
- sections: lt
130
- })), ft = {
132
+ let t = ce(o?.metadata);
133
+ return t.length > 0 ? t : o ? [] : [w("hero")];
134
+ }, [o]), [Y, X] = g(l?.sections ?? _t), [vt, yt] = g(() => ({
135
+ landingPageId: o?.id ?? null,
136
+ pageName: o?.title ?? "Landing Page",
137
+ pageSlug: o?.slug ?? "",
138
+ templateId: o?.templateId ?? null,
139
+ sections: _t
140
+ })), bt = {
131
141
  landingPageId: D,
132
142
  pageName: j,
133
143
  pageSlug: N,
134
144
  templateId: P,
135
- sections: W
136
- }, K = JSON.stringify(ft) !== JSON.stringify(ut), pt = h(K ? ft : null), q = h(!1), mt = h(u);
137
- ge(() => {
138
- pt.current = K ? {
145
+ sections: Y
146
+ }, Z = JSON.stringify(bt) !== JSON.stringify(vt), xt = h(Z ? bt : null), St = h(!1), Ct = h(d);
147
+ ye(() => {
148
+ xt.current = Z ? {
139
149
  landingPageId: D,
140
150
  pageName: j,
141
151
  pageSlug: N,
142
152
  templateId: P,
143
- sections: W
144
- } : null, mt.current = u;
153
+ sections: Y
154
+ } : null, Ct.current = d;
145
155
  }, [
146
156
  D,
147
157
  j,
148
158
  N,
149
159
  P,
150
- W,
151
- u,
152
- K
153
- ]), he(() => () => {
154
- q.current || mt.current(pt.current);
155
- }, []), Ae((e) => {
156
- K && (e.preventDefault(), e.returnValue = "");
160
+ Y,
161
+ d,
162
+ Z
163
+ ]), ve(() => () => {
164
+ St.current || Ct.current(xt.current);
165
+ }, []), Fe((e) => {
166
+ Z && (e.preventDefault(), e.returnValue = "");
157
167
  });
158
- let ht = (m?.headshotmarketingCampaignTemplates.items ?? []).map((e) => se(e)), gt = {
168
+ let wt = (_e?.headshotmarketingCampaignTemplates.items ?? []).map((e) => le(e)), Tt = {
159
169
  desktop: "w-full",
160
170
  tablet: "max-w-[768px]",
161
171
  mobile: "max-w-[390px]"
162
- }, J = _e(() => W.find((e) => e.id === F) ?? null, [W, F]), _t = (e, t) => {
163
- G((n) => {
172
+ }, Q = be(() => Y.find((e) => e.id === I) ?? null, [Y, I]), Et = (e, t) => {
173
+ X((n) => {
164
174
  let r = n.findIndex((t) => t.id === e);
165
175
  if (r === -1) return n;
166
176
  let i = t === "up" ? r - 1 : r + 1;
@@ -168,108 +178,108 @@ var Re = () => {
168
178
  let a = [...n];
169
179
  return [a[r], a[i]] = [a[i], a[r]], a;
170
180
  });
171
- }, vt = (e) => {
172
- G((t) => t.filter((t) => t.id !== e)), F === e && I(null);
173
- }, yt = (e) => {
174
- G((t) => {
181
+ }, Dt = (e) => {
182
+ X((t) => t.filter((t) => t.id !== e)), I === e && L(null);
183
+ }, Ot = (e) => {
184
+ X((t) => {
175
185
  let n = t.findIndex((t) => t.id === e);
176
186
  if (n === -1) return t;
177
187
  let r = {
178
188
  ...t[n],
179
- id: C(),
189
+ id: Be(),
180
190
  label: `${t[n].label} copy`,
181
191
  config: { ...t[n].config }
182
192
  }, i = [...t];
183
- return i.splice(n + 1, 0, r), I(r.id), i;
193
+ return i.splice(n + 1, 0, r), L(r.id), i;
184
194
  });
185
- }, bt = (e) => {
195
+ }, kt = (e) => {
186
196
  let t = w(e);
187
- G((e) => [...e, t]), I(t.id);
188
- }, xt = (e, t) => {
197
+ X((e) => [...e, t]), L(t.id);
198
+ }, At = (e, t) => {
189
199
  let n = w(e);
190
- G((e) => {
200
+ X((e) => {
191
201
  let r = [...e];
192
202
  return r.splice(Math.min(Math.max(t, 0), r.length), 0, n), r;
193
- }), I(n.id);
194
- }, St = (e, t) => {
195
- G((n) => {
203
+ }), L(n.id);
204
+ }, jt = (e, t) => {
205
+ X((n) => {
196
206
  let r = n.findIndex((t) => t.id === e);
197
207
  if (r === -1) return n;
198
208
  let i = [...n], [a] = i.splice(r, 1), o = r < t ? t - 1 : t;
199
209
  return i.splice(Math.min(Math.max(o, 0), i.length), 0, a), i;
200
210
  });
201
- }, Ct = (e, t) => {
202
- G((n) => n.map((n) => n.id === e ? {
211
+ }, Mt = (e, t) => {
212
+ X((n) => n.map((n) => n.id === e ? {
203
213
  ...n,
204
214
  config: {
205
215
  ...n.config,
206
216
  ...t
207
217
  }
208
218
  } : n));
209
- }, wt = (e, t) => {
210
- G((n) => n.map((n) => n.id === e ? {
219
+ }, Nt = (e, t) => {
220
+ X((n) => n.map((n) => n.id === e ? {
211
221
  ...n,
212
222
  label: t
213
223
  } : n));
214
- }, Tt = (e) => (t) => {
215
- t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(b, e), H(e), V(null);
216
- }, Et = (e) => (t) => {
217
- t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(x, e), V(e), H(null);
218
- }, Y = () => {
219
- V(null), H(null), at(null);
220
- }, X = (e) => (t) => {
221
- let n = t.dataTransfer.types, r = n.includes(x), i = n.includes(b);
222
- (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", at(e));
223
- }, Z = (e) => (t) => {
224
+ }, Pt = (e) => (t) => {
225
+ t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(x, e), q(e), K(null);
226
+ }, Ft = (e) => (t) => {
227
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(S, e), K(e), q(null);
228
+ }, It = () => {
229
+ K(null), q(null), pt(null);
230
+ }, Lt = (e) => (t) => {
231
+ let n = t.dataTransfer.types, r = n.includes(S), i = n.includes(x);
232
+ (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", pt(e));
233
+ }, Rt = (e) => (t) => {
224
234
  t.preventDefault();
225
- let n = t.dataTransfer.getData(b), r = t.dataTransfer.getData(x);
226
- n ? xt(n, e) : r && St(r, e), Y();
227
- }, Dt = (e) => {
228
- M(e.name), Qe(e.id), G(Pe.map((e) => w(e))), I(null), B(`Applied "${e.name}" template — Save to keep it.`);
229
- }, Ot = async (e) => {
230
- let t = ie(st, W), n = /* @__PURE__ */ new Map();
231
- for (let e of t.removeIds) await Ke({ variables: { id: e } });
235
+ let n = t.dataTransfer.getData(x), r = t.dataTransfer.getData(S);
236
+ n ? At(n, e) : r && jt(r, e), It();
237
+ }, zt = (e) => {
238
+ M(e.name), it(e.id), X(ze.map((e) => w(e))), L(null), V(`Applied "${e.name}" template — Save to keep it.`);
239
+ }, Bt = async (e) => {
240
+ let t = oe(ht, Y), n = /* @__PURE__ */ new Map();
241
+ for (let e of t.removeIds) await Qe({ variables: { id: e } });
232
242
  for (let r of t.adds) {
233
- let t = (await We({ variables: { input: {
243
+ let t = (await Xe({ variables: { input: {
234
244
  landingPageId: e,
235
245
  sortOrder: r.sortOrder,
236
- ...Fe(r.input)
246
+ ...Ve(r.input)
237
247
  } } })).data?.headshotmarketingAddLandingPageSection;
238
248
  if (!t) throw Error("Failed to save a section.");
239
249
  n.set(r.localId, t.id);
240
250
  }
241
- for (let e of t.updates) await Ge({ variables: {
251
+ for (let e of t.updates) await Ze({ variables: {
242
252
  id: e.id,
243
- input: Fe(e.input)
253
+ input: Ve(e.input)
244
254
  } });
245
- let r = W.map((e) => ({
255
+ let r = Y.map((e) => ({
246
256
  ...e,
247
257
  id: n.get(e.id) ?? e.id
248
258
  }));
249
259
  if (t.reorder) {
250
- let t = (await qe({ variables: { input: {
260
+ let t = (await $e({ variables: { input: {
251
261
  landingPageId: e,
252
262
  sectionIds: r.map((e) => e.id)
253
263
  } } })).data?.headshotmarketingReorderLandingPageSections?.sections;
254
- ct(t ? t.map((e) => ae(e)) : r);
255
- } else ct(r);
256
- return G(r), I((e) => e && (n.get(e) ?? e)), r;
257
- }, kt = async () => {
258
- if (!j.trim()) return z("Page name is required."), null;
259
- z(null);
264
+ gt(t ? t.map((e) => se(e)) : r);
265
+ } else gt(r);
266
+ return X(r), L((e) => e && (n.get(e) ?? e)), r;
267
+ }, Vt = async () => {
268
+ if (!j.trim()) return B("Page name is required."), null;
269
+ B(null);
260
270
  try {
261
271
  if (D) {
262
272
  let e = {
263
273
  title: j.trim(),
264
274
  templateId: P ?? void 0,
265
- metadata: re(a?.metadata)
266
- }, t = (await Be({ variables: {
275
+ metadata: ae(o?.metadata)
276
+ }, t = (await Ke({ variables: {
267
277
  id: D,
268
278
  input: e
269
279
  } })).data?.headshotmarketingUpdateLandingPage;
270
280
  t && (k(t.status), A(t.publishedUrl ?? null)), E(!0);
271
- let n = await Ot(D);
272
- return M(j.trim()), dt({
281
+ let n = await Bt(D);
282
+ return M(j.trim()), yt({
273
283
  landingPageId: D,
274
284
  pageName: j.trim(),
275
285
  pageSlug: N,
@@ -279,13 +289,13 @@ var Re = () => {
279
289
  }
280
290
  let e = {
281
291
  title: j.trim(),
282
- slug: `${Le(j)}-${Date.now().toString(36)}`,
292
+ slug: `${Ue(j)}-${Date.now().toString(36)}`,
283
293
  templateId: P ?? void 0
284
- }, t = (await Re({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
285
- if (!t) return z("Failed to create landing page."), null;
286
- Ye(t.id), k(t.status), A(t.publishedUrl ?? null), Ze(t.slug), E(!0);
287
- let n = await Ot(t.id);
288
- return M(j.trim()), dt({
294
+ }, t = (await We({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
295
+ if (!t) return B("Failed to create landing page."), null;
296
+ tt(t.id), k(t.status), A(t.publishedUrl ?? null), rt(t.slug), E(!0);
297
+ let n = await Bt(t.id);
298
+ return M(j.trim()), yt({
289
299
  landingPageId: t.id,
290
300
  pageName: j.trim(),
291
301
  pageSlug: t.slug,
@@ -293,82 +303,82 @@ var Re = () => {
293
303
  sections: n
294
304
  }), t.id;
295
305
  } catch (e) {
296
- return z(e instanceof Error ? e.message : "Failed to save landing page."), null;
306
+ return B(e instanceof Error ? e.message : "Failed to save landing page."), null;
297
307
  } finally {
298
308
  E(!1);
299
309
  }
300
- }, At = async () => {
301
- let e = await kt();
302
- e && (B("Landing page saved."), a || (q.current = !0, f(e)), T());
303
- }, jt = async () => {
304
- let e = await kt();
310
+ }, Ht = async () => {
311
+ let e = await Vt();
312
+ e && (V("Landing page saved."), o || (St.current = !0, f(e)), T());
313
+ }, Ut = async () => {
314
+ let e = await Vt();
305
315
  if (e) try {
306
- let t = (await He({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
307
- t && (k(t.status), A(t.publishedUrl ?? null), B("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), a || (q.current = !0, f(e)), T();
316
+ let t = (await Je({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
317
+ t && (k(t.status), A(t.publishedUrl ?? null), V("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), o || (St.current = !0, f(e)), T();
308
318
  } catch (e) {
309
- z(e instanceof Error ? e.message : "Failed to publish landing page.");
319
+ B(e instanceof Error ? e.message : "Failed to publish landing page.");
310
320
  }
311
- }, Q = ze || Ve || Je, $ = Xe && O === "PUBLISHED" ? Xe : null, Mt = $ ?? `/lp/${N || Le(j)}`;
312
- return /* @__PURE__ */ y(ee, {
321
+ }, Wt = Ge || qe || et, $ = nt && O === "PUBLISHED" ? nt : null, Gt = $ ?? `/lp/${N || Ue(j)}`;
322
+ return /* @__PURE__ */ b(ne, {
313
323
  title: "Landing Page Builder",
314
- actions: /* @__PURE__ */ y("div", {
324
+ actions: /* @__PURE__ */ b("div", {
315
325
  className: "flex flex-wrap items-center gap-2",
316
326
  children: [
317
- /* @__PURE__ */ y("button", {
318
- onClick: () => p(me),
327
+ /* @__PURE__ */ b("button", {
328
+ onClick: () => p(m),
319
329
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
320
- children: [/* @__PURE__ */ v(ve, { className: "h-4 w-4" }), "Back"]
330
+ children: [/* @__PURE__ */ y(xe, { className: "h-4 w-4" }), "Back"]
321
331
  }),
322
- $ && /* @__PURE__ */ y("a", {
332
+ $ && /* @__PURE__ */ b("a", {
323
333
  href: $,
324
334
  target: "_blank",
325
335
  rel: "noreferrer",
326
336
  "data-testid": "builder-open-live",
327
337
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
328
- children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "View live"]
338
+ children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "View live"]
329
339
  }),
330
- /* @__PURE__ */ y("button", {
331
- onClick: () => L(!0),
340
+ /* @__PURE__ */ b("button", {
341
+ onClick: () => R(!0),
332
342
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
333
- children: [/* @__PURE__ */ v(be, { className: "h-4 w-4" }), "Preview"]
343
+ children: [/* @__PURE__ */ y(we, { className: "h-4 w-4" }), "Preview"]
334
344
  }),
335
- /* @__PURE__ */ y("button", {
336
- onClick: () => void At(),
337
- disabled: Q,
345
+ /* @__PURE__ */ b("button", {
346
+ onClick: () => void Ht(),
347
+ disabled: Wt,
338
348
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
339
- children: [/* @__PURE__ */ v(De, { className: "h-4 w-4" }), Q ? "Saving…" : "Save"]
349
+ children: [/* @__PURE__ */ y(je, { className: "h-4 w-4" }), Wt ? "Saving…" : "Save"]
340
350
  }),
341
- /* @__PURE__ */ y("button", {
342
- onClick: () => void jt(),
343
- disabled: Q || Ue,
351
+ /* @__PURE__ */ b("button", {
352
+ onClick: () => void Ut(),
353
+ disabled: Wt || Ye,
344
354
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
345
- children: [/* @__PURE__ */ v(xe, { className: "h-4 w-4" }), Ue ? "Publishing…" : "Publish"]
355
+ children: [/* @__PURE__ */ y(Te, { className: "h-4 w-4" }), Ye ? "Publishing…" : "Publish"]
346
356
  })
347
357
  ]
348
358
  }),
349
359
  children: [
350
- /* @__PURE__ */ v(Me, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), edit the copy and style live, preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
351
- R && /* @__PURE__ */ v("div", {
360
+ /* @__PURE__ */ y(Le, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), edit the copy and style live, preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
361
+ z && /* @__PURE__ */ y("div", {
352
362
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
353
- children: R
363
+ children: z
354
364
  }),
355
- nt && !R && /* @__PURE__ */ y("div", {
365
+ lt && !z && /* @__PURE__ */ b("div", {
356
366
  className: "flex items-center justify-between gap-3 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 px-4 py-3 text-sm text-status-success-text",
357
- children: [/* @__PURE__ */ v("span", { children: nt }), $ && /* @__PURE__ */ y("a", {
367
+ children: [/* @__PURE__ */ y("span", { children: lt }), $ && /* @__PURE__ */ b("a", {
358
368
  href: $,
359
369
  target: "_blank",
360
370
  rel: "noreferrer",
361
371
  className: "inline-flex items-center gap-1 font-medium underline",
362
- children: ["View live ", /* @__PURE__ */ v(_, { className: "h-3 w-3" })]
372
+ children: ["View live ", /* @__PURE__ */ y(_, { className: "h-3 w-3" })]
363
373
  })]
364
374
  }),
365
- /* @__PURE__ */ v("div", {
375
+ /* @__PURE__ */ y("div", {
366
376
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
367
- children: /* @__PURE__ */ y("div", {
377
+ children: /* @__PURE__ */ b("div", {
368
378
  className: "flex flex-wrap items-center gap-3",
369
379
  children: [
370
- /* @__PURE__ */ v(ye, { className: "h-4 w-4 text-text-secondary" }),
371
- /* @__PURE__ */ v("input", {
380
+ /* @__PURE__ */ y(Ce, { className: "h-4 w-4 text-text-secondary" }),
381
+ /* @__PURE__ */ y("input", {
372
382
  type: "text",
373
383
  "aria-label": "Page name",
374
384
  value: j,
@@ -376,61 +386,236 @@ var Re = () => {
376
386
  className: "text-lg font-semibold text-text-primary bg-transparent border-none outline-none flex-1 min-w-[12rem] placeholder:text-text-secondary",
377
387
  placeholder: "Page name"
378
388
  }),
379
- /* @__PURE__ */ y("span", {
389
+ /* @__PURE__ */ b("span", {
380
390
  className: "hidden items-center gap-1.5 text-xs text-text-secondary sm:inline-flex",
381
391
  children: [
382
- /* @__PURE__ */ v(Se, { className: "h-3.5 w-3.5" }),
383
- W.length,
392
+ /* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }),
393
+ Y.length,
384
394
  " ",
385
- W.length === 1 ? "section" : "sections"
395
+ Y.length === 1 ? "section" : "sections"
386
396
  ]
387
397
  }),
388
- /* @__PURE__ */ v("span", {
389
- className: l("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", O === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
398
+ /* @__PURE__ */ b("span", {
399
+ "data-testid": "landing-page-submission-count",
400
+ className: "inline-flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-2.5 py-0.5 text-xs font-medium text-text-primary",
401
+ children: [
402
+ /* @__PURE__ */ y(Pe, { className: "h-3.5 w-3.5 text-primary" }),
403
+ W,
404
+ " ",
405
+ W === 1 ? "submission" : "submissions"
406
+ ]
407
+ }),
408
+ /* @__PURE__ */ y("span", {
409
+ className: u("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", O === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
390
410
  children: O.toLowerCase()
411
+ }),
412
+ /* @__PURE__ */ b("div", {
413
+ role: "tablist",
414
+ "aria-label": "Landing page view",
415
+ className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
416
+ children: [/* @__PURE__ */ b("button", {
417
+ type: "button",
418
+ role: "tab",
419
+ "aria-selected": F === "editor",
420
+ onClick: () => st("editor"),
421
+ className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "editor" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
422
+ children: [/* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }), "Editor"]
423
+ }), /* @__PURE__ */ b("button", {
424
+ type: "button",
425
+ role: "tab",
426
+ "data-testid": "builder-analytics-tab",
427
+ "aria-selected": F === "analytics",
428
+ onClick: () => st("analytics"),
429
+ className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "analytics" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
430
+ children: [
431
+ /* @__PURE__ */ y(Se, { className: "h-3.5 w-3.5" }),
432
+ "Submissions (",
433
+ W,
434
+ ")"
435
+ ]
436
+ })]
391
437
  })
392
438
  ]
393
439
  })
394
440
  }),
395
- /* @__PURE__ */ v(ne, {
396
- loading: Ne,
397
- error: S,
441
+ /* @__PURE__ */ y(ie, {
442
+ loading: Re,
443
+ error: C,
398
444
  onRetry: T,
399
- hasData: !!m,
400
- children: /* @__PURE__ */ y("div", {
445
+ hasData: !!_e,
446
+ children: F === "analytics" ? /* @__PURE__ */ b("div", {
447
+ "data-testid": "landing-page-analytics-panel",
448
+ className: "space-y-4",
449
+ children: [/* @__PURE__ */ b("div", {
450
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
451
+ children: [
452
+ /* @__PURE__ */ b("div", {
453
+ className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
454
+ children: [/* @__PURE__ */ y("p", {
455
+ className: "text-xs font-medium text-text-secondary",
456
+ children: "Form Submissions"
457
+ }), /* @__PURE__ */ y("p", {
458
+ className: "mt-1 text-2xl font-bold text-text-primary",
459
+ children: W
460
+ })]
461
+ }),
462
+ /* @__PURE__ */ b("div", {
463
+ className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
464
+ children: [/* @__PURE__ */ y("p", {
465
+ className: "text-xs font-medium text-text-secondary",
466
+ children: "Page Views"
467
+ }), /* @__PURE__ */ y("p", {
468
+ className: "mt-1 text-2xl font-bold text-text-primary",
469
+ children: G
470
+ })]
471
+ }),
472
+ /* @__PURE__ */ b("div", {
473
+ className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
474
+ children: [/* @__PURE__ */ y("p", {
475
+ className: "text-xs font-medium text-text-secondary",
476
+ children: "Conversion Rate"
477
+ }), /* @__PURE__ */ y("p", {
478
+ className: "mt-1 text-2xl font-bold text-text-primary",
479
+ children: ut
480
+ })]
481
+ })
482
+ ]
483
+ }), /* @__PURE__ */ b("div", {
484
+ className: "rounded-card border border-border-seam bg-gloss-card p-5 shadow-pop",
485
+ children: [/* @__PURE__ */ b("div", {
486
+ className: "mb-4 flex items-center justify-between gap-3",
487
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
488
+ className: "text-sm font-semibold text-text-primary",
489
+ children: "CRM-Wired Form Submissions"
490
+ }), /* @__PURE__ */ y("p", {
491
+ className: "text-xs text-text-secondary",
492
+ children: "Every submission on this published landing page creates or updates a CRM Contact in your workspace."
493
+ })] }), D && /* @__PURE__ */ b("button", {
494
+ type: "button",
495
+ onClick: () => void H.refetch(),
496
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
497
+ children: [/* @__PURE__ */ y(Ae, { className: "h-3.5 w-3.5" }), "Refresh"]
498
+ })]
499
+ }), D ? H.loading && U.length === 0 ? /* @__PURE__ */ y("p", {
500
+ className: "py-6 text-center text-sm text-text-secondary",
501
+ children: "Loading submissions…"
502
+ }) : U.length === 0 ? /* @__PURE__ */ y("p", {
503
+ className: "py-6 text-center text-sm text-text-secondary",
504
+ children: "No form submissions recorded for this landing page yet."
505
+ }) : /* @__PURE__ */ y("div", {
506
+ className: "overflow-x-auto",
507
+ children: /* @__PURE__ */ b("table", {
508
+ className: "w-full text-sm",
509
+ children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
510
+ className: "border-b border-border-subtle text-start text-xs text-text-secondary",
511
+ children: [
512
+ /* @__PURE__ */ y("th", {
513
+ className: "py-2 pe-4 font-medium",
514
+ children: "Contact"
515
+ }),
516
+ /* @__PURE__ */ y("th", {
517
+ className: "py-2 pe-4 font-medium",
518
+ children: "Company"
519
+ }),
520
+ /* @__PURE__ */ y("th", {
521
+ className: "py-2 pe-4 font-medium",
522
+ children: "Source / UTM"
523
+ }),
524
+ /* @__PURE__ */ y("th", {
525
+ className: "py-2 pe-4 font-medium",
526
+ children: "Submitted"
527
+ }),
528
+ /* @__PURE__ */ y("th", {
529
+ className: "py-2 pe-4 font-medium",
530
+ children: "CRM"
531
+ })
532
+ ]
533
+ }) }), /* @__PURE__ */ y("tbody", { children: U.map((e) => {
534
+ let t = [e.firstName, e.lastName].filter(Boolean).join(" "), n = [
535
+ e.utmSource,
536
+ e.utmMedium,
537
+ e.utmCampaign
538
+ ].filter(Boolean).join(" / ");
539
+ return /* @__PURE__ */ b("tr", {
540
+ className: "border-b border-border-subtle/60 last:border-0",
541
+ children: [
542
+ /* @__PURE__ */ b("td", {
543
+ className: "py-2.5 pe-4",
544
+ children: [/* @__PURE__ */ y("p", {
545
+ className: "font-medium text-text-primary",
546
+ children: t || e.email
547
+ }), /* @__PURE__ */ y("p", {
548
+ className: "text-xs text-text-secondary",
549
+ children: e.email
550
+ })]
551
+ }),
552
+ /* @__PURE__ */ y("td", {
553
+ className: "py-2.5 pe-4 text-text-secondary",
554
+ children: e.company || "—"
555
+ }),
556
+ /* @__PURE__ */ y("td", {
557
+ className: "py-2.5 pe-4 text-xs text-text-secondary",
558
+ children: n || "Direct"
559
+ }),
560
+ /* @__PURE__ */ y("td", {
561
+ className: "py-2.5 pe-4 text-xs text-text-secondary",
562
+ children: ee(e.createdAt)
563
+ }),
564
+ /* @__PURE__ */ y("td", {
565
+ className: "py-2.5 pe-4",
566
+ children: e.contactId ? /* @__PURE__ */ y("button", {
567
+ type: "button",
568
+ onClick: () => p(`${te(m, "crm/contacts")}?selected=${encodeURIComponent(e.contactId)}`),
569
+ className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium text-primary hover:bg-bg-sunken",
570
+ children: "View contact"
571
+ }) : /* @__PURE__ */ y("span", {
572
+ className: "text-xs text-text-secondary",
573
+ children: "—"
574
+ })
575
+ })
576
+ ]
577
+ }, e.id);
578
+ }) })]
579
+ })
580
+ }) : /* @__PURE__ */ y("p", {
581
+ className: "py-6 text-center text-sm text-text-secondary",
582
+ children: "Save and publish this landing page to start collecting form submissions into CRM."
583
+ })]
584
+ })]
585
+ }) : /* @__PURE__ */ b("div", {
401
586
  className: "grid grid-cols-1 gap-4 lg:grid-cols-12",
402
587
  children: [
403
- /* @__PURE__ */ y("aside", {
588
+ /* @__PURE__ */ b("aside", {
404
589
  className: "space-y-4 lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
405
- children: [/* @__PURE__ */ y("div", {
590
+ children: [/* @__PURE__ */ b("div", {
406
591
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
407
592
  children: [
408
- /* @__PURE__ */ y("h4", {
593
+ /* @__PURE__ */ b("h4", {
409
594
  className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
410
- children: [/* @__PURE__ */ v(Se, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
595
+ children: [/* @__PURE__ */ y(v, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
411
596
  }),
412
- /* @__PURE__ */ v("p", {
597
+ /* @__PURE__ */ y("p", {
413
598
  className: "mb-3 text-[11px] text-text-secondary",
414
599
  children: "Click to append, or drag onto the canvas."
415
600
  }),
416
- /* @__PURE__ */ v("div", {
601
+ /* @__PURE__ */ y("div", {
417
602
  className: "grid grid-cols-2 gap-2",
418
- children: le.map((e) => {
603
+ children: fe.map((e) => {
419
604
  let t = e.icon;
420
- return /* @__PURE__ */ y("button", {
605
+ return /* @__PURE__ */ b("button", {
421
606
  type: "button",
422
607
  draggable: !0,
423
- onDragStart: Tt(e.type),
424
- onDragEnd: Y,
425
- onClick: () => bt(e.type),
608
+ onDragStart: Pt(e.type),
609
+ onDragEnd: It,
610
+ onClick: () => kt(e.type),
426
611
  title: e.description,
427
612
  className: "group flex cursor-grab flex-col gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2 text-start transition-all hover:border-border-strong hover:shadow-pop active:cursor-grabbing",
428
- children: [/* @__PURE__ */ v("div", {
613
+ children: [/* @__PURE__ */ y("div", {
429
614
  className: "h-12 overflow-hidden rounded-md border border-border-subtle/60 bg-bg-sunken/50 p-1.5",
430
- children: /* @__PURE__ */ v(ue, { type: e.type })
431
- }), /* @__PURE__ */ y("div", {
615
+ children: /* @__PURE__ */ y(pe, { type: e.type })
616
+ }), /* @__PURE__ */ b("div", {
432
617
  className: "flex items-center gap-1.5",
433
- children: [/* @__PURE__ */ v(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ v("span", {
618
+ children: [/* @__PURE__ */ y(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ y("span", {
434
619
  className: "text-xs font-medium text-text-primary",
435
620
  children: e.label
436
621
  })]
@@ -439,30 +624,30 @@ var Re = () => {
439
624
  })
440
625
  })
441
626
  ]
442
- }), /* @__PURE__ */ y("div", {
627
+ }), /* @__PURE__ */ b("div", {
443
628
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
444
- children: [/* @__PURE__ */ y("h4", {
629
+ children: [/* @__PURE__ */ b("h4", {
445
630
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
446
- children: [/* @__PURE__ */ v(Ce, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
447
- }), /* @__PURE__ */ y("div", {
631
+ children: [/* @__PURE__ */ y(Ee, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
632
+ }), /* @__PURE__ */ b("div", {
448
633
  className: "space-y-2",
449
- children: [ht.length === 0 && /* @__PURE__ */ v("p", {
634
+ children: [wt.length === 0 && /* @__PURE__ */ y("p", {
450
635
  className: "text-xs text-text-secondary",
451
636
  children: "No templates yet. Create a campaign template to reuse it here."
452
- }), ht.map((e) => /* @__PURE__ */ y("button", {
637
+ }), wt.map((e) => /* @__PURE__ */ b("button", {
453
638
  type: "button",
454
- onClick: () => Dt(e),
455
- className: l("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-start transition-colors", P === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
639
+ onClick: () => zt(e),
640
+ className: u("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-start transition-colors", P === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
456
641
  children: [
457
- /* @__PURE__ */ v("span", {
642
+ /* @__PURE__ */ y("span", {
458
643
  className: "text-sm font-medium text-text-primary",
459
644
  children: e.name
460
645
  }),
461
- e.description && /* @__PURE__ */ v("span", {
646
+ e.description && /* @__PURE__ */ y("span", {
462
647
  className: "mt-0.5 text-[10px] text-text-secondary",
463
648
  children: e.description
464
649
  }),
465
- /* @__PURE__ */ v("span", {
650
+ /* @__PURE__ */ y("span", {
466
651
  className: "mt-1 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] capitalize text-text-secondary",
467
652
  children: e.category
468
653
  })
@@ -471,128 +656,128 @@ var Re = () => {
471
656
  })]
472
657
  })]
473
658
  }),
474
- /* @__PURE__ */ y("div", {
659
+ /* @__PURE__ */ b("div", {
475
660
  className: "min-w-0 lg:col-span-6",
476
- children: [/* @__PURE__ */ v("div", {
661
+ children: [/* @__PURE__ */ y("div", {
477
662
  className: "mb-4 flex justify-center",
478
- children: /* @__PURE__ */ v("div", {
663
+ children: /* @__PURE__ */ y("div", {
479
664
  className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
480
665
  children: [
481
666
  {
482
667
  key: "desktop",
483
- icon: we,
668
+ icon: De,
484
669
  label: "Desktop"
485
670
  },
486
671
  {
487
672
  key: "tablet",
488
- icon: ke,
673
+ icon: Ne,
489
674
  label: "Tablet"
490
675
  },
491
676
  {
492
677
  key: "mobile",
493
- icon: Oe,
678
+ icon: Me,
494
679
  label: "Mobile"
495
680
  }
496
681
  ].map((e) => {
497
- let t = e.icon, n = $e === e.key;
498
- return /* @__PURE__ */ y("button", {
499
- onClick: () => et(e.key),
682
+ let t = e.icon, n = at === e.key;
683
+ return /* @__PURE__ */ b("button", {
684
+ onClick: () => ot(e.key),
500
685
  title: e.label,
501
686
  "aria-label": e.label,
502
687
  "aria-pressed": n,
503
- className: l("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
504
- children: [/* @__PURE__ */ v(t, { className: "h-4 w-4" }), /* @__PURE__ */ v("span", {
688
+ className: u("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
689
+ children: [/* @__PURE__ */ y(t, { className: "h-4 w-4" }), /* @__PURE__ */ y("span", {
505
690
  className: "hidden sm:inline",
506
691
  children: e.label
507
692
  })]
508
693
  }, e.key);
509
694
  })
510
695
  })
511
- }), /* @__PURE__ */ y("div", {
512
- className: l("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", gt[$e]),
513
- children: [/* @__PURE__ */ y("div", {
696
+ }), /* @__PURE__ */ b("div", {
697
+ className: u("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", Tt[at]),
698
+ children: [/* @__PURE__ */ b("div", {
514
699
  className: "flex items-center gap-2 border-b border-border-subtle bg-bg-sunken/60 px-4 py-2.5",
515
- children: [/* @__PURE__ */ y("div", {
700
+ children: [/* @__PURE__ */ b("div", {
516
701
  className: "flex gap-1.5",
517
702
  children: [
518
- /* @__PURE__ */ v("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
519
- /* @__PURE__ */ v("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
520
- /* @__PURE__ */ v("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
703
+ /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
704
+ /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
705
+ /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
521
706
  ]
522
- }), /* @__PURE__ */ y("div", {
707
+ }), /* @__PURE__ */ b("div", {
523
708
  className: "mx-auto flex max-w-[70%] items-center gap-1.5 truncate rounded-md bg-bg-surface px-3 py-1 text-[11px] text-text-secondary",
524
- children: [/* @__PURE__ */ v(xe, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ v("span", {
709
+ children: [/* @__PURE__ */ y(Te, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ y("span", {
525
710
  className: "truncate",
526
- children: Mt
711
+ children: Gt
527
712
  })]
528
713
  })]
529
- }), W.length === 0 ? /* @__PURE__ */ y("div", {
530
- onDragOver: X(0),
531
- onDrop: Z(0),
532
- className: l("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", ot ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
714
+ }), Y.length === 0 ? /* @__PURE__ */ b("div", {
715
+ onDragOver: Lt(0),
716
+ onDrop: Rt(0),
717
+ className: u("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", mt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
533
718
  children: [
534
- /* @__PURE__ */ v(Ee, { className: "h-6 w-6 text-text-secondary" }),
535
- /* @__PURE__ */ v("p", {
719
+ /* @__PURE__ */ y(ke, { className: "h-6 w-6 text-text-secondary" }),
720
+ /* @__PURE__ */ y("p", {
536
721
  className: "text-sm font-medium text-text-primary",
537
722
  children: "Start building your page"
538
723
  }),
539
- /* @__PURE__ */ v("p", {
724
+ /* @__PURE__ */ y("p", {
540
725
  className: "max-w-xs text-xs text-text-secondary",
541
726
  children: "Drag a block from the left, or click one to add it here."
542
727
  })
543
728
  ]
544
- }) : /* @__PURE__ */ y("div", { children: [W.map((e, t) => /* @__PURE__ */ v(de, {
729
+ }) : /* @__PURE__ */ b("div", { children: [Y.map((e, t) => /* @__PURE__ */ y(me, {
545
730
  section: e,
546
731
  index: t,
547
- total: W.length,
548
- selected: F === e.id,
549
- dropBefore: U === t,
550
- onSelect: () => I(e.id),
551
- onMoveUp: () => _t(e.id, "up"),
552
- onMoveDown: () => _t(e.id, "down"),
553
- onDuplicate: () => yt(e.id),
554
- onRemove: () => vt(e.id),
555
- onHandleDragStart: Et(e.id),
556
- onDragEnd: Y,
557
- onBlockDragOver: X(t),
558
- onBlockDrop: Z(t)
559
- }, e.id)), /* @__PURE__ */ y("div", {
560
- onDragOver: X(W.length),
561
- onDrop: Z(W.length),
562
- className: l("relative border-t border-dashed transition-colors", U === W.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
563
- children: [U === W.length && /* @__PURE__ */ v("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ y("button", {
732
+ total: Y.length,
733
+ selected: I === e.id,
734
+ dropBefore: J === t,
735
+ onSelect: () => L(e.id),
736
+ onMoveUp: () => Et(e.id, "up"),
737
+ onMoveDown: () => Et(e.id, "down"),
738
+ onDuplicate: () => Ot(e.id),
739
+ onRemove: () => Dt(e.id),
740
+ onHandleDragStart: Ft(e.id),
741
+ onDragEnd: It,
742
+ onBlockDragOver: Lt(t),
743
+ onBlockDrop: Rt(t)
744
+ }, e.id)), /* @__PURE__ */ b("div", {
745
+ onDragOver: Lt(Y.length),
746
+ onDrop: Rt(Y.length),
747
+ className: u("relative border-t border-dashed transition-colors", J === Y.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
748
+ children: [J === Y.length && /* @__PURE__ */ y("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ b("button", {
564
749
  type: "button",
565
- onClick: () => bt("features"),
750
+ onClick: () => kt("features"),
566
751
  className: "flex w-full items-center justify-center gap-2 p-4 text-sm text-text-secondary transition-colors hover:bg-action-primary-bg/5 hover:text-primary",
567
- children: [/* @__PURE__ */ v(Ee, { className: "h-4 w-4" }), "Add section"]
752
+ children: [/* @__PURE__ */ y(ke, { className: "h-4 w-4" }), "Add section"]
568
753
  })]
569
754
  })] })]
570
755
  })]
571
756
  }),
572
- /* @__PURE__ */ v("aside", {
757
+ /* @__PURE__ */ y("aside", {
573
758
  className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
574
- children: J ? /* @__PURE__ */ v("div", {
759
+ children: Q ? /* @__PURE__ */ y("div", {
575
760
  className: "lg:max-h-[calc(100vh-2rem)]",
576
- children: /* @__PURE__ */ v(fe, {
577
- section: J,
578
- onChangeConfig: (e) => Ct(J.id, e),
579
- onChangeLabel: (e) => wt(J.id, e),
580
- onClose: () => I(null),
581
- onDuplicate: () => yt(J.id),
582
- onRemove: () => vt(J.id)
761
+ children: /* @__PURE__ */ y(he, {
762
+ section: Q,
763
+ onChangeConfig: (e) => Mt(Q.id, e),
764
+ onChangeLabel: (e) => Nt(Q.id, e),
765
+ onClose: () => L(null),
766
+ onDuplicate: () => Ot(Q.id),
767
+ onRemove: () => Dt(Q.id)
583
768
  })
584
- }) : /* @__PURE__ */ y("div", {
769
+ }) : /* @__PURE__ */ b("div", {
585
770
  className: "flex flex-col items-center justify-center gap-3 rounded-card border border-dashed border-border-subtle bg-bg-surface p-6 text-center",
586
771
  children: [
587
- /* @__PURE__ */ v("span", {
772
+ /* @__PURE__ */ y("span", {
588
773
  className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary",
589
- children: /* @__PURE__ */ v(Te, { className: "h-5 w-5" })
774
+ children: /* @__PURE__ */ y(Oe, { className: "h-5 w-5" })
590
775
  }),
591
- /* @__PURE__ */ v("p", {
776
+ /* @__PURE__ */ y("p", {
592
777
  className: "text-sm font-semibold text-text-primary",
593
778
  children: "No block selected"
594
779
  }),
595
- /* @__PURE__ */ v("p", {
780
+ /* @__PURE__ */ y("p", {
596
781
  className: "text-xs text-text-secondary",
597
782
  children: "Select a block on the canvas to edit its text, colors, spacing and alignment."
598
783
  })
@@ -602,35 +787,35 @@ var Re = () => {
602
787
  ]
603
788
  })
604
789
  }),
605
- /* @__PURE__ */ v(te, {
606
- open: tt,
607
- onClose: () => L(!1),
790
+ /* @__PURE__ */ y(re, {
791
+ open: ct,
792
+ onClose: () => R(!1),
608
793
  title: j || "Landing Page",
609
794
  description: $ ? `Preview of your landing page. Published at ${$} — save and publish again to update it.` : "Preview of your landing page. Publish it to make it public.",
610
795
  size: "xl",
611
- footer: /* @__PURE__ */ y(je, { children: [$ && /* @__PURE__ */ y("a", {
796
+ footer: /* @__PURE__ */ b(Ie, { children: [$ && /* @__PURE__ */ b("a", {
612
797
  href: $,
613
798
  target: "_blank",
614
799
  rel: "noreferrer",
615
800
  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",
616
- children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "Open live page"]
617
- }), /* @__PURE__ */ v("button", {
801
+ children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Open live page"]
802
+ }), /* @__PURE__ */ y("button", {
618
803
  type: "button",
619
- onClick: () => L(!1),
804
+ onClick: () => R(!1),
620
805
  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",
621
806
  children: "Close"
622
807
  })] }),
623
- children: /* @__PURE__ */ v("div", {
808
+ children: /* @__PURE__ */ y("div", {
624
809
  className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
625
- children: W.length === 0 ? /* @__PURE__ */ v("p", {
810
+ children: Y.length === 0 ? /* @__PURE__ */ y("p", {
626
811
  className: "p-8 text-center text-sm text-text-secondary",
627
812
  children: "This page has no sections yet."
628
- }) : W.map((e) => /* @__PURE__ */ v(pe, { section: e }, e.id))
813
+ }) : Y.map((e) => /* @__PURE__ */ y(ge, { section: e }, e.id))
629
814
  })
630
815
  })
631
816
  ]
632
817
  });
633
818
  };
634
- export { Re as LandingPageBuilderPage };
819
+ export { We as LandingPageBuilderPage };
635
820
 
636
821
  //# sourceMappingURL=LandingPageBuilderPage.js.map