@burdenoff/microfe-headshotmarketing 2026.1114.1 → 2026.1114.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 (32) hide show
  1. package/dist/generated/wspace-operations.d.ts +239 -0
  2. package/dist/generated/wspace-operations.js +360 -241
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/headshotmarketing/components/CrmRecordSelection.d.ts +4 -0
  5. package/dist/headshotmarketing/components/CrmRecordSelection.js +93 -0
  6. package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -0
  7. package/dist/headshotmarketing/hooks/useRecordSelection.d.ts +6 -0
  8. package/dist/headshotmarketing/hooks/useRecordSelection.js +14 -0
  9. package/dist/headshotmarketing/hooks/useRecordSelection.js.map +1 -0
  10. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.d.ts +8 -0
  11. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js +25 -0
  12. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js.map +1 -0
  13. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +169 -140
  14. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  15. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +330 -236
  16. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  17. package/dist/headshotmarketing/pages/crm/ContactsPage.js +165 -157
  18. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/crm/LeadsPage.js +119 -113
  20. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/crm/PipelinePage.js +107 -101
  22. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  23. package/dist/headshotmarketing/utils/crmMapper.d.ts +1 -1
  24. package/dist/headshotmarketing/utils/crmMapper.js +1 -1
  25. package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
  26. package/dist/utils/pageContext.d.ts +1 -1
  27. package/dist/utils/pageContext.js +79 -39
  28. package/dist/utils/pageContext.js.map +1 -1
  29. package/dist/utils/recordSelection.d.ts +4 -0
  30. package/dist/utils/recordSelection.js +12 -0
  31. package/dist/utils/recordSelection.js.map +1 -0
  32. package/package.json +1 -1
@@ -1,52 +1,54 @@
1
- import { useHeadshotmarketingAddLandingPageSectionMutation as e, useHeadshotmarketingCreateLandingPageMutation as t, useHeadshotmarketingPublishLandingPageMutation as n, useHeadshotmarketingRemoveLandingPageSectionMutation as r, useHeadshotmarketingReorderLandingPageSectionsMutation as i, useHeadshotmarketingUpdateLandingPageMutation as a, useHeadshotmarketingUpdateLandingPageSectionMutation as o } from "../../../generated/wspace-operations.js";
2
- import { HeadshotmarketingLandingPageSectionType as s } from "../../../generated/wspace-types.js";
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";
3
3
  import "../../components/index.js";
4
- import { cn as c } from "../../utils/helpers.js";
4
+ import { cn as l } from "../../utils/helpers.js";
5
5
  import { PageLayout as ee } from "../../components/PageLayout.js";
6
6
  import { Modal as te } from "../../components/Modal.js";
7
7
  import { QueryStateBoundary as ne } from "../../components/QueryStateBoundary.js";
8
- import { metadataWithoutLayout as re, planSectionSync as ie, sectionFromRow as ae, sectionsFromLegacyLayout as l, sectionsFromRows as u, toBuilderTemplateModel as oe } from "../../utils/builderMapper.js";
9
- import { useHeadshotmarketingBootstrap as se } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
- import { useHeadshotMarketing as ce } from "../../context/HeadshotMarketingContext.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";
11
11
  import "../../hooks/index.js";
12
- import { SECTION_CATALOG as le, SectionThumbnail as ue, defaultConfig as d, sectionLabelFor as de } from "./builderCatalog.js";
12
+ import { SECTION_CATALOG as le, SectionThumbnail as ue, defaultConfig as f, sectionLabelFor as de } from "./builderCatalog.js";
13
13
  import { SectionCanvasBlock as fe } from "./SectionCanvasBlock.js";
14
14
  import { SectionInspector as pe } from "./SectionInspector.js";
15
15
  import { SectionContent as me } from "./SectionContent.js";
16
16
  import { starterContent as he } from "./sectionSchema.js";
17
- import { useEffect as ge, useMemo as _e, useState as f } from "react";
18
- import { ArrowLeft as ve, Edit3 as ye, ExternalLink as p, 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";
19
- import { Fragment as Ae, jsx as m, jsxs as h } from "react/jsx-runtime";
20
- import { PagePurpose as je } from "@burdenoff/fe-libs/ui";
17
+ import { useRecordSelection as p } from "../../hooks/useRecordSelection.js";
18
+ import { useEffect as ge, useLayoutEffect as _e, useMemo as ve, useRef as m, useState as h } from "react";
19
+ import { ArrowLeft as ye, Edit3 as be, ExternalLink as g, Eye as xe, Globe as Se, Layers as Ce, LayoutTemplate as we, Monitor as Te, MousePointerClick as Ee, Plus as De, Save as Oe, Smartphone as ke, Tablet as Ae } from "lucide-react";
20
+ import { useBeforeUnload as je } from "react-router";
21
+ import { Fragment as Me, jsx as _, jsxs as v } from "react/jsx-runtime";
22
+ import { PagePurpose as Ne } from "@burdenoff/fe-libs/ui";
21
23
  // src/headshotmarketing/pages/builder/LandingPageBuilderPage.tsx
22
- var g = "application/x-hm-palette", _ = "application/x-hm-reorder", Me = [
24
+ var y = "application/x-hm-palette", b = "application/x-hm-reorder", Pe = [
23
25
  "header",
24
26
  "hero",
25
27
  "features",
26
28
  "testimonials",
27
29
  "cta",
28
30
  "footer"
29
- ], v = 0;
30
- function Ne() {
31
- return v += 1, `sec-${Date.now().toString(36)}-${v}`;
31
+ ], x = 0;
32
+ function S() {
33
+ return x += 1, `sec-${Date.now().toString(36)}-${x}`;
32
34
  }
33
- function y(e) {
35
+ function C(e) {
34
36
  return {
35
- id: Ne(),
37
+ id: S(),
36
38
  type: e,
37
39
  label: de(e),
38
40
  config: {
39
- ...d(),
41
+ ...f(),
40
42
  ...he(e)
41
43
  }
42
44
  };
43
45
  }
44
- function b(e) {
45
- return Object.values(s).find((t) => t === e) ?? s.Custom;
46
+ function w(e) {
47
+ return Object.values(c).find((t) => t === e) ?? c.Custom;
46
48
  }
47
- function x(e) {
49
+ function Fe(e) {
48
50
  return {
49
- type: b(e.type),
51
+ type: w(e.type),
50
52
  title: e.title,
51
53
  subtitle: e.subtitle,
52
54
  content: e.content,
@@ -54,38 +56,111 @@ function x(e) {
54
56
  metadata: e.metadata
55
57
  };
56
58
  }
57
- function S(e) {
59
+ function Ie(e) {
58
60
  let t = u(e?.sections);
59
61
  return t.length > 0 ? {
60
62
  saved: t,
61
63
  legacy: !1
62
64
  } : {
63
65
  saved: [],
64
- legacy: l(e?.metadata).length > 0
66
+ legacy: oe(e?.metadata).length > 0
65
67
  };
66
68
  }
67
- function Pe(e) {
69
+ function Le(e) {
68
70
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
69
71
  }
70
- var C = () => {
71
- let { navigate: s, basePath: u } = ce(), { data: d, loading: de, error: he, refetch: v } = se(), b = (d?.headshotmarketingLandingPages.items ?? [])[0], [C, { loading: Fe }] = t(), [Ie, { loading: Le }] = a(), [Re, { loading: w }] = n(), [ze] = e(), [Be] = o(), [Ve] = r(), [He] = i(), [Ue, T] = f(!1), [E, We] = f(b?.id ?? null), [D, O] = f(b?.status ?? "DRAFT"), [k, A] = f(b?.publishedUrl ?? null), [j, M] = f(b?.title ?? "Landing Page"), [Ge, Ke] = f(b?.slug ?? ""), [N, qe] = f(b?.templateId ?? null), [Je, Ye] = f("desktop"), [P, F] = f(null), [Xe, I] = f(!1), [L, R] = f(null), [z, B] = f(null), [Ze, V] = f(null), [Qe, H] = f(null), [U, $e] = f(null), et = Ze !== null || Qe !== null, [tt, W] = f(() => S(b).saved), nt = _e(() => {
72
- let { saved: e } = S(b);
72
+ var T = () => {
73
+ let { selectedId: e, invalidSelection: t, selectRecord: n } = p(), { workspaceId: r } = d(), i = ce().data?.headshotmarketingLandingPages.items ?? [], o = a({
74
+ variables: { id: e ?? "" },
75
+ skip: !e,
76
+ fetchPolicy: "network-only"
77
+ }), s = m(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = o.data?.headshotmarketingLandingPage;
78
+ return /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ v("label", {
79
+ className: "block p-4 text-sm text-text-primary",
80
+ children: ["Landing page", /* @__PURE__ */ v("select", {
81
+ "aria-label": "Select landing page",
82
+ value: e ?? "",
83
+ onChange: (e) => n(e.target.value || null),
84
+ className: "ml-3 rounded-md border border-border-subtle bg-bg-surface p-2",
85
+ children: [
86
+ /* @__PURE__ */ _("option", {
87
+ value: "",
88
+ children: "New landing page"
89
+ }),
90
+ e && !i.some((t) => t.id === e) && /* @__PURE__ */ _("option", {
91
+ value: e,
92
+ children: l?.title ?? "Selected landing page"
93
+ }),
94
+ i.map((e) => /* @__PURE__ */ _("option", {
95
+ value: e.id,
96
+ children: e.title
97
+ }, e.id))
98
+ ]
99
+ })]
100
+ }), t || e && !o.loading && (o.error || !l || l.id !== e) ? /* @__PURE__ */ _("p", {
101
+ role: "alert",
102
+ className: "p-4",
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__ */ _("p", {
105
+ role: "status",
106
+ className: "p-4",
107
+ children: "Loading landing page…"
108
+ }) : /* @__PURE__ */ _(Re, {
109
+ landingPage: e ? l : void 0,
110
+ initialDraft: s.current.get(c),
111
+ rememberDraft: (e) => {
112
+ e ? s.current.set(c, e) : s.current.delete(c);
113
+ },
114
+ onCreated: (e) => {
115
+ s.current.delete(c), n(e);
116
+ }
117
+ }, c)] });
118
+ }, Re = ({ landingPage: a, initialDraft: c, rememberDraft: u, onCreated: f }) => {
119
+ let { navigate: de, basePath: he } = d(), { data: p, loading: x, error: w, 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] = h(!1), [D, Ye] = h(c?.landingPageId ?? a?.id ?? null), [O, k] = h(a?.status ?? "DRAFT"), [Xe, A] = h(a?.publishedUrl ?? null), [j, M] = h(c?.pageName ?? a?.title ?? "Landing Page"), [N, Ze] = h(c?.pageSlug ?? a?.slug ?? ""), [P, Qe] = h(c?.templateId ?? a?.templateId ?? null), [$e, et] = h("desktop"), [F, I] = h(null), [tt, L] = h(!1), [R, z] = h(null), [nt, B] = h(null), [rt, V] = h(null), [it, H] = h(null), [U, at] = h(null), ot = rt !== null || it !== null, [st, ct] = h(() => Ie(a).saved), lt = ve(() => {
120
+ let { saved: e } = Ie(a);
73
121
  if (e.length > 0) return e;
74
- let t = l(b?.metadata);
75
- return t.length > 0 ? t : b ? [] : [y("hero")];
76
- }, [b]), [G, K] = f(nt), rt = (d?.headshotmarketingCampaignTemplates.items ?? []).map((e) => oe(e));
77
- ge(() => {
78
- if (!b) return;
79
- We(b.id), O(b.status), A(b.publishedUrl ?? null), M(b.title), Ke(b.slug), qe(b.templateId ?? null);
80
- let { saved: e, legacy: t } = S(b);
81
- W(e), K(t ? l(b.metadata) : e);
82
- }, [b]);
83
- let it = {
122
+ let t = oe(a?.metadata);
123
+ return t.length > 0 ? t : a ? [] : [C("hero")];
124
+ }, [a]), [W, G] = h(c?.sections ?? lt), [ut, dt] = h(() => ({
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 = {
131
+ landingPageId: D,
132
+ pageName: j,
133
+ pageSlug: N,
134
+ templateId: P,
135
+ sections: W
136
+ }, K = JSON.stringify(ft) !== JSON.stringify(ut), pt = m(K ? ft : null), q = m(!1), mt = m(u);
137
+ _e(() => {
138
+ pt.current = K ? {
139
+ landingPageId: D,
140
+ pageName: j,
141
+ pageSlug: N,
142
+ templateId: P,
143
+ sections: W
144
+ } : null, mt.current = u;
145
+ }, [
146
+ D,
147
+ j,
148
+ N,
149
+ P,
150
+ W,
151
+ u,
152
+ K
153
+ ]), ge(() => () => {
154
+ q.current || mt.current(pt.current);
155
+ }, []), je((e) => {
156
+ K && (e.preventDefault(), e.returnValue = "");
157
+ });
158
+ let ht = (p?.headshotmarketingCampaignTemplates.items ?? []).map((e) => se(e)), gt = {
84
159
  desktop: "w-full",
85
160
  tablet: "max-w-[768px]",
86
161
  mobile: "max-w-[390px]"
87
- }, q = _e(() => G.find((e) => e.id === P) ?? null, [G, P]), J = (e, t) => {
88
- K((n) => {
162
+ }, J = ve(() => W.find((e) => e.id === F) ?? null, [W, F]), _t = (e, t) => {
163
+ G((n) => {
89
164
  let r = n.findIndex((t) => t.id === e);
90
165
  if (r === -1) return n;
91
166
  let i = t === "up" ? r - 1 : r + 1;
@@ -93,250 +168,269 @@ var C = () => {
93
168
  let a = [...n];
94
169
  return [a[r], a[i]] = [a[i], a[r]], a;
95
170
  });
96
- }, at = (e) => {
97
- K((t) => t.filter((t) => t.id !== e)), P === e && F(null);
98
- }, ot = (e) => {
99
- K((t) => {
171
+ }, vt = (e) => {
172
+ G((t) => t.filter((t) => t.id !== e)), F === e && I(null);
173
+ }, yt = (e) => {
174
+ G((t) => {
100
175
  let n = t.findIndex((t) => t.id === e);
101
176
  if (n === -1) return t;
102
177
  let r = {
103
178
  ...t[n],
104
- id: Ne(),
179
+ id: S(),
105
180
  label: `${t[n].label} copy`,
106
181
  config: { ...t[n].config }
107
182
  }, i = [...t];
108
- return i.splice(n + 1, 0, r), F(r.id), i;
183
+ return i.splice(n + 1, 0, r), I(r.id), i;
109
184
  });
110
- }, st = (e) => {
111
- let t = y(e);
112
- K((e) => [...e, t]), F(t.id);
113
- }, ct = (e, t) => {
114
- let n = y(e);
115
- K((e) => {
185
+ }, bt = (e) => {
186
+ let t = C(e);
187
+ G((e) => [...e, t]), I(t.id);
188
+ }, xt = (e, t) => {
189
+ let n = C(e);
190
+ G((e) => {
116
191
  let r = [...e];
117
192
  return r.splice(Math.min(Math.max(t, 0), r.length), 0, n), r;
118
- }), F(n.id);
119
- }, lt = (e, t) => {
120
- K((n) => {
193
+ }), I(n.id);
194
+ }, St = (e, t) => {
195
+ G((n) => {
121
196
  let r = n.findIndex((t) => t.id === e);
122
197
  if (r === -1) return n;
123
198
  let i = [...n], [a] = i.splice(r, 1), o = r < t ? t - 1 : t;
124
199
  return i.splice(Math.min(Math.max(o, 0), i.length), 0, a), i;
125
200
  });
126
- }, ut = (e, t) => {
127
- K((n) => n.map((n) => n.id === e ? {
201
+ }, Ct = (e, t) => {
202
+ G((n) => n.map((n) => n.id === e ? {
128
203
  ...n,
129
204
  config: {
130
205
  ...n.config,
131
206
  ...t
132
207
  }
133
208
  } : n));
134
- }, dt = (e, t) => {
135
- K((n) => n.map((n) => n.id === e ? {
209
+ }, wt = (e, t) => {
210
+ G((n) => n.map((n) => n.id === e ? {
136
211
  ...n,
137
212
  label: t
138
213
  } : n));
139
- }, ft = (e) => (t) => {
140
- t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(g, e), H(e), V(null);
141
- }, pt = (e) => (t) => {
142
- t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(_, e), V(e), H(null);
214
+ }, Tt = (e) => (t) => {
215
+ t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(y, e), H(e), V(null);
216
+ }, Et = (e) => (t) => {
217
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(b, e), V(e), H(null);
143
218
  }, Y = () => {
144
- V(null), H(null), $e(null);
219
+ V(null), H(null), at(null);
145
220
  }, X = (e) => (t) => {
146
- let n = t.dataTransfer.types, r = n.includes(_), i = n.includes(g);
147
- (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", $e(e));
221
+ let n = t.dataTransfer.types, r = n.includes(b), i = n.includes(y);
222
+ (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", at(e));
148
223
  }, Z = (e) => (t) => {
149
224
  t.preventDefault();
150
- let n = t.dataTransfer.getData(g), r = t.dataTransfer.getData(_);
151
- n ? ct(n, e) : r && lt(r, e), Y();
152
- }, mt = (e) => {
153
- M(e.name), qe(e.id), K(Me.map((e) => y(e))), F(null), B(`Applied "${e.name}" template — Save to keep it.`);
154
- }, ht = async (e) => {
155
- let t = ie(tt, G), n = /* @__PURE__ */ new Map();
156
- for (let e of t.removeIds) await Ve({ variables: { id: e } });
225
+ let n = t.dataTransfer.getData(y), r = t.dataTransfer.getData(b);
226
+ n ? xt(n, e) : r && St(r, e), Y();
227
+ }, Dt = (e) => {
228
+ M(e.name), Qe(e.id), G(Pe.map((e) => C(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 } });
157
232
  for (let r of t.adds) {
158
- let t = (await ze({ variables: { input: {
233
+ let t = (await We({ variables: { input: {
159
234
  landingPageId: e,
160
235
  sortOrder: r.sortOrder,
161
- ...x(r.input)
236
+ ...Fe(r.input)
162
237
  } } })).data?.headshotmarketingAddLandingPageSection;
163
238
  if (!t) throw Error("Failed to save a section.");
164
239
  n.set(r.localId, t.id);
165
240
  }
166
- for (let e of t.updates) await Be({ variables: {
241
+ for (let e of t.updates) await Ge({ variables: {
167
242
  id: e.id,
168
- input: x(e.input)
243
+ input: Fe(e.input)
169
244
  } });
170
- let r = G.map((e) => ({
245
+ let r = W.map((e) => ({
171
246
  ...e,
172
247
  id: n.get(e.id) ?? e.id
173
248
  }));
174
249
  if (t.reorder) {
175
- let t = (await He({ variables: { input: {
250
+ let t = (await qe({ variables: { input: {
176
251
  landingPageId: e,
177
252
  sectionIds: r.map((e) => e.id)
178
253
  } } })).data?.headshotmarketingReorderLandingPageSections?.sections;
179
- W(t ? t.map((e) => ae(e)) : r);
180
- } else W(r);
181
- K(r), F((e) => e && (n.get(e) ?? e));
182
- }, gt = async () => {
183
- if (!j.trim()) return R("Page name is required."), null;
184
- R(null);
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);
185
260
  try {
186
- if (E) {
261
+ if (D) {
187
262
  let e = {
188
263
  title: j.trim(),
189
- templateId: N ?? void 0,
190
- metadata: re(b?.metadata)
191
- }, t = (await Ie({ variables: {
192
- id: E,
264
+ templateId: P ?? void 0,
265
+ metadata: re(a?.metadata)
266
+ }, t = (await Be({ variables: {
267
+ id: D,
193
268
  input: e
194
269
  } })).data?.headshotmarketingUpdateLandingPage;
195
- return t && (O(t.status), A(t.publishedUrl ?? null)), T(!0), await ht(E), E;
270
+ t && (k(t.status), A(t.publishedUrl ?? null)), E(!0);
271
+ let n = await Ot(D);
272
+ return M(j.trim()), dt({
273
+ landingPageId: D,
274
+ pageName: j.trim(),
275
+ pageSlug: N,
276
+ templateId: P,
277
+ sections: n
278
+ }), D;
196
279
  }
197
280
  let e = {
198
281
  title: j.trim(),
199
- slug: `${Pe(j)}-${Date.now().toString(36)}`,
200
- templateId: N ?? void 0
201
- }, t = (await C({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
202
- return t ? (We(t.id), O(t.status), A(t.publishedUrl ?? null), Ke(t.slug), T(!0), await ht(t.id), t.id) : (R("Failed to create landing page."), null);
282
+ slug: `${Le(j)}-${Date.now().toString(36)}`,
283
+ 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({
289
+ landingPageId: t.id,
290
+ pageName: j.trim(),
291
+ pageSlug: t.slug,
292
+ templateId: P,
293
+ sections: n
294
+ }), t.id;
203
295
  } catch (e) {
204
- return R(e instanceof Error ? e.message : "Failed to save landing page."), null;
296
+ return z(e instanceof Error ? e.message : "Failed to save landing page."), null;
205
297
  } finally {
206
- T(!1);
298
+ E(!1);
207
299
  }
208
- }, _t = async () => {
209
- await gt() && (B("Landing page saved."), v());
210
- }, vt = async () => {
211
- let e = await gt();
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();
212
305
  if (e) try {
213
- let t = (await Re({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
214
- t && (O(t.status), A(t.publishedUrl ?? null), B("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), v();
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();
215
308
  } catch (e) {
216
- R(e instanceof Error ? e.message : "Failed to publish landing page.");
309
+ z(e instanceof Error ? e.message : "Failed to publish landing page.");
217
310
  }
218
- }, Q = Fe || Le || Ue, $ = k && D === "PUBLISHED" ? k : null, yt = $ ?? `/lp/${Ge || Pe(j)}`;
219
- return /* @__PURE__ */ h(ee, {
311
+ }, Q = ze || Ve || Je, $ = Xe && O === "PUBLISHED" ? Xe : null, Mt = $ ?? `/lp/${N || Le(j)}`;
312
+ return /* @__PURE__ */ v(ee, {
220
313
  title: "Landing Page Builder",
221
- actions: /* @__PURE__ */ h("div", {
314
+ actions: /* @__PURE__ */ v("div", {
222
315
  className: "flex flex-wrap items-center gap-2",
223
316
  children: [
224
- /* @__PURE__ */ h("button", {
225
- onClick: () => s(u),
317
+ /* @__PURE__ */ v("button", {
318
+ onClick: () => de(he),
226
319
  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",
227
- children: [/* @__PURE__ */ m(ve, { className: "h-4 w-4" }), "Back"]
320
+ children: [/* @__PURE__ */ _(ye, { className: "h-4 w-4" }), "Back"]
228
321
  }),
229
- $ && /* @__PURE__ */ h("a", {
322
+ $ && /* @__PURE__ */ v("a", {
230
323
  href: $,
231
324
  target: "_blank",
232
325
  rel: "noreferrer",
233
326
  "data-testid": "builder-open-live",
234
327
  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",
235
- children: [/* @__PURE__ */ m(p, { className: "h-4 w-4" }), "View live"]
328
+ children: [/* @__PURE__ */ _(g, { className: "h-4 w-4" }), "View live"]
236
329
  }),
237
- /* @__PURE__ */ h("button", {
238
- onClick: () => I(!0),
330
+ /* @__PURE__ */ v("button", {
331
+ onClick: () => L(!0),
239
332
  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",
240
- children: [/* @__PURE__ */ m(be, { className: "h-4 w-4" }), "Preview"]
333
+ children: [/* @__PURE__ */ _(xe, { className: "h-4 w-4" }), "Preview"]
241
334
  }),
242
- /* @__PURE__ */ h("button", {
243
- onClick: () => void _t(),
335
+ /* @__PURE__ */ v("button", {
336
+ onClick: () => void At(),
244
337
  disabled: Q,
245
338
  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",
246
- children: [/* @__PURE__ */ m(De, { className: "h-4 w-4" }), Q ? "Saving…" : "Save"]
339
+ children: [/* @__PURE__ */ _(Oe, { className: "h-4 w-4" }), Q ? "Saving…" : "Save"]
247
340
  }),
248
- /* @__PURE__ */ h("button", {
249
- onClick: () => void vt(),
250
- disabled: Q || w,
341
+ /* @__PURE__ */ v("button", {
342
+ onClick: () => void jt(),
343
+ disabled: Q || Ue,
251
344
  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",
252
- children: [/* @__PURE__ */ m(xe, { className: "h-4 w-4" }), w ? "Publishing…" : "Publish"]
345
+ children: [/* @__PURE__ */ _(Se, { className: "h-4 w-4" }), Ue ? "Publishing…" : "Publish"]
253
346
  })
254
347
  ]
255
348
  }),
256
349
  children: [
257
- /* @__PURE__ */ m(je, { 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." }),
258
- L && /* @__PURE__ */ m("div", {
350
+ /* @__PURE__ */ _(Ne, { 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__ */ _("div", {
259
352
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
260
- children: L
353
+ children: R
261
354
  }),
262
- z && !L && /* @__PURE__ */ h("div", {
355
+ nt && !R && /* @__PURE__ */ v("div", {
263
356
  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",
264
- children: [/* @__PURE__ */ m("span", { children: z }), $ && /* @__PURE__ */ h("a", {
357
+ children: [/* @__PURE__ */ _("span", { children: nt }), $ && /* @__PURE__ */ v("a", {
265
358
  href: $,
266
359
  target: "_blank",
267
360
  rel: "noreferrer",
268
361
  className: "inline-flex items-center gap-1 font-medium underline",
269
- children: ["View live ", /* @__PURE__ */ m(p, { className: "h-3 w-3" })]
362
+ children: ["View live ", /* @__PURE__ */ _(g, { className: "h-3 w-3" })]
270
363
  })]
271
364
  }),
272
- /* @__PURE__ */ m("div", {
365
+ /* @__PURE__ */ _("div", {
273
366
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
274
- children: /* @__PURE__ */ h("div", {
367
+ children: /* @__PURE__ */ v("div", {
275
368
  className: "flex flex-wrap items-center gap-3",
276
369
  children: [
277
- /* @__PURE__ */ m(ye, { className: "h-4 w-4 text-text-secondary" }),
278
- /* @__PURE__ */ m("input", {
370
+ /* @__PURE__ */ _(be, { className: "h-4 w-4 text-text-secondary" }),
371
+ /* @__PURE__ */ _("input", {
279
372
  type: "text",
373
+ "aria-label": "Page name",
280
374
  value: j,
281
375
  onChange: (e) => M(e.target.value),
282
376
  className: "text-lg font-semibold text-text-primary bg-transparent border-none outline-none flex-1 min-w-[12rem] placeholder:text-text-secondary",
283
377
  placeholder: "Page name"
284
378
  }),
285
- /* @__PURE__ */ h("span", {
379
+ /* @__PURE__ */ v("span", {
286
380
  className: "hidden items-center gap-1.5 text-xs text-text-secondary sm:inline-flex",
287
381
  children: [
288
- /* @__PURE__ */ m(Se, { className: "h-3.5 w-3.5" }),
289
- G.length,
382
+ /* @__PURE__ */ _(Ce, { className: "h-3.5 w-3.5" }),
383
+ W.length,
290
384
  " ",
291
- G.length === 1 ? "section" : "sections"
385
+ W.length === 1 ? "section" : "sections"
292
386
  ]
293
387
  }),
294
- /* @__PURE__ */ m("span", {
295
- className: c("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", D === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
296
- children: D.toLowerCase()
388
+ /* @__PURE__ */ _("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"),
390
+ children: O.toLowerCase()
297
391
  })
298
392
  ]
299
393
  })
300
394
  }),
301
- /* @__PURE__ */ m(ne, {
302
- loading: de,
303
- error: he,
304
- onRetry: v,
305
- hasData: !!d,
306
- children: /* @__PURE__ */ h("div", {
395
+ /* @__PURE__ */ _(ne, {
396
+ loading: x,
397
+ error: w,
398
+ onRetry: T,
399
+ hasData: !!p,
400
+ children: /* @__PURE__ */ v("div", {
307
401
  className: "grid grid-cols-1 gap-4 lg:grid-cols-12",
308
402
  children: [
309
- /* @__PURE__ */ h("aside", {
403
+ /* @__PURE__ */ v("aside", {
310
404
  className: "space-y-4 lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
311
- children: [/* @__PURE__ */ h("div", {
405
+ children: [/* @__PURE__ */ v("div", {
312
406
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
313
407
  children: [
314
- /* @__PURE__ */ h("h4", {
408
+ /* @__PURE__ */ v("h4", {
315
409
  className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
316
- children: [/* @__PURE__ */ m(Se, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
410
+ children: [/* @__PURE__ */ _(Ce, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
317
411
  }),
318
- /* @__PURE__ */ m("p", {
412
+ /* @__PURE__ */ _("p", {
319
413
  className: "mb-3 text-[11px] text-text-secondary",
320
414
  children: "Click to append, or drag onto the canvas."
321
415
  }),
322
- /* @__PURE__ */ m("div", {
416
+ /* @__PURE__ */ _("div", {
323
417
  className: "grid grid-cols-2 gap-2",
324
418
  children: le.map((e) => {
325
419
  let t = e.icon;
326
- return /* @__PURE__ */ h("button", {
420
+ return /* @__PURE__ */ v("button", {
327
421
  type: "button",
328
422
  draggable: !0,
329
- onDragStart: ft(e.type),
423
+ onDragStart: Tt(e.type),
330
424
  onDragEnd: Y,
331
- onClick: () => st(e.type),
425
+ onClick: () => bt(e.type),
332
426
  title: e.description,
333
427
  className: "group flex cursor-grab flex-col gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2 text-left transition-all hover:border-border-strong hover:shadow-pop active:cursor-grabbing",
334
- children: [/* @__PURE__ */ m("div", {
428
+ children: [/* @__PURE__ */ _("div", {
335
429
  className: "h-12 overflow-hidden rounded-md border border-border-subtle/60 bg-bg-sunken/50 p-1.5",
336
- children: /* @__PURE__ */ m(ue, { type: e.type })
337
- }), /* @__PURE__ */ h("div", {
430
+ children: /* @__PURE__ */ _(ue, { type: e.type })
431
+ }), /* @__PURE__ */ v("div", {
338
432
  className: "flex items-center gap-1.5",
339
- children: [/* @__PURE__ */ m(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ m("span", {
433
+ children: [/* @__PURE__ */ _(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ _("span", {
340
434
  className: "text-xs font-medium text-text-primary",
341
435
  children: e.label
342
436
  })]
@@ -345,30 +439,30 @@ var C = () => {
345
439
  })
346
440
  })
347
441
  ]
348
- }), /* @__PURE__ */ h("div", {
442
+ }), /* @__PURE__ */ v("div", {
349
443
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
350
- children: [/* @__PURE__ */ h("h4", {
444
+ children: [/* @__PURE__ */ v("h4", {
351
445
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
352
- children: [/* @__PURE__ */ m(Ce, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
353
- }), /* @__PURE__ */ h("div", {
446
+ children: [/* @__PURE__ */ _(we, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
447
+ }), /* @__PURE__ */ v("div", {
354
448
  className: "space-y-2",
355
- children: [rt.length === 0 && /* @__PURE__ */ m("p", {
449
+ children: [ht.length === 0 && /* @__PURE__ */ _("p", {
356
450
  className: "text-xs text-text-secondary",
357
451
  children: "No templates yet. Create a campaign template to reuse it here."
358
- }), rt.map((e) => /* @__PURE__ */ h("button", {
452
+ }), ht.map((e) => /* @__PURE__ */ v("button", {
359
453
  type: "button",
360
- onClick: () => mt(e),
361
- className: c("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-left transition-colors", N === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
454
+ onClick: () => Dt(e),
455
+ className: l("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-left transition-colors", P === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
362
456
  children: [
363
- /* @__PURE__ */ m("span", {
457
+ /* @__PURE__ */ _("span", {
364
458
  className: "text-sm font-medium text-text-primary",
365
459
  children: e.name
366
460
  }),
367
- e.description && /* @__PURE__ */ m("span", {
461
+ e.description && /* @__PURE__ */ _("span", {
368
462
  className: "mt-0.5 text-[10px] text-text-secondary",
369
463
  children: e.description
370
464
  }),
371
- /* @__PURE__ */ m("span", {
465
+ /* @__PURE__ */ _("span", {
372
466
  className: "mt-1 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] capitalize text-text-secondary",
373
467
  children: e.category
374
468
  })
@@ -377,128 +471,128 @@ var C = () => {
377
471
  })]
378
472
  })]
379
473
  }),
380
- /* @__PURE__ */ h("div", {
474
+ /* @__PURE__ */ v("div", {
381
475
  className: "min-w-0 lg:col-span-6",
382
- children: [/* @__PURE__ */ m("div", {
476
+ children: [/* @__PURE__ */ _("div", {
383
477
  className: "mb-4 flex justify-center",
384
- children: /* @__PURE__ */ m("div", {
478
+ children: /* @__PURE__ */ _("div", {
385
479
  className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
386
480
  children: [
387
481
  {
388
482
  key: "desktop",
389
- icon: we,
483
+ icon: Te,
390
484
  label: "Desktop"
391
485
  },
392
486
  {
393
487
  key: "tablet",
394
- icon: ke,
488
+ icon: Ae,
395
489
  label: "Tablet"
396
490
  },
397
491
  {
398
492
  key: "mobile",
399
- icon: Oe,
493
+ icon: ke,
400
494
  label: "Mobile"
401
495
  }
402
496
  ].map((e) => {
403
- let t = e.icon, n = Je === e.key;
404
- return /* @__PURE__ */ h("button", {
405
- onClick: () => Ye(e.key),
497
+ let t = e.icon, n = $e === e.key;
498
+ return /* @__PURE__ */ v("button", {
499
+ onClick: () => et(e.key),
406
500
  title: e.label,
407
501
  "aria-label": e.label,
408
502
  "aria-pressed": n,
409
- className: c("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"),
410
- children: [/* @__PURE__ */ m(t, { className: "h-4 w-4" }), /* @__PURE__ */ m("span", {
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__ */ _(t, { className: "h-4 w-4" }), /* @__PURE__ */ _("span", {
411
505
  className: "hidden sm:inline",
412
506
  children: e.label
413
507
  })]
414
508
  }, e.key);
415
509
  })
416
510
  })
417
- }), /* @__PURE__ */ h("div", {
418
- className: c("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", it[Je]),
419
- children: [/* @__PURE__ */ h("div", {
511
+ }), /* @__PURE__ */ v("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__ */ v("div", {
420
514
  className: "flex items-center gap-2 border-b border-border-subtle bg-bg-sunken/60 px-4 py-2.5",
421
- children: [/* @__PURE__ */ h("div", {
515
+ children: [/* @__PURE__ */ v("div", {
422
516
  className: "flex gap-1.5",
423
517
  children: [
424
- /* @__PURE__ */ m("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
425
- /* @__PURE__ */ m("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
426
- /* @__PURE__ */ m("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
518
+ /* @__PURE__ */ _("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
519
+ /* @__PURE__ */ _("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
520
+ /* @__PURE__ */ _("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
427
521
  ]
428
- }), /* @__PURE__ */ h("div", {
522
+ }), /* @__PURE__ */ v("div", {
429
523
  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",
430
- children: [/* @__PURE__ */ m(xe, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ m("span", {
524
+ children: [/* @__PURE__ */ _(Se, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ _("span", {
431
525
  className: "truncate",
432
- children: yt
526
+ children: Mt
433
527
  })]
434
528
  })]
435
- }), G.length === 0 ? /* @__PURE__ */ h("div", {
529
+ }), W.length === 0 ? /* @__PURE__ */ v("div", {
436
530
  onDragOver: X(0),
437
531
  onDrop: Z(0),
438
- className: c("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", et ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
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"),
439
533
  children: [
440
- /* @__PURE__ */ m(Ee, { className: "h-6 w-6 text-text-secondary" }),
441
- /* @__PURE__ */ m("p", {
534
+ /* @__PURE__ */ _(De, { className: "h-6 w-6 text-text-secondary" }),
535
+ /* @__PURE__ */ _("p", {
442
536
  className: "text-sm font-medium text-text-primary",
443
537
  children: "Start building your page"
444
538
  }),
445
- /* @__PURE__ */ m("p", {
539
+ /* @__PURE__ */ _("p", {
446
540
  className: "max-w-xs text-xs text-text-secondary",
447
541
  children: "Drag a block from the left, or click one to add it here."
448
542
  })
449
543
  ]
450
- }) : /* @__PURE__ */ h("div", { children: [G.map((e, t) => /* @__PURE__ */ m(fe, {
544
+ }) : /* @__PURE__ */ v("div", { children: [W.map((e, t) => /* @__PURE__ */ _(fe, {
451
545
  section: e,
452
546
  index: t,
453
- total: G.length,
454
- selected: P === e.id,
547
+ total: W.length,
548
+ selected: F === e.id,
455
549
  dropBefore: U === t,
456
- onSelect: () => F(e.id),
457
- onMoveUp: () => J(e.id, "up"),
458
- onMoveDown: () => J(e.id, "down"),
459
- onDuplicate: () => ot(e.id),
460
- onRemove: () => at(e.id),
461
- onHandleDragStart: pt(e.id),
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),
462
556
  onDragEnd: Y,
463
557
  onBlockDragOver: X(t),
464
558
  onBlockDrop: Z(t)
465
- }, e.id)), /* @__PURE__ */ h("div", {
466
- onDragOver: X(G.length),
467
- onDrop: Z(G.length),
468
- className: c("relative border-t border-dashed transition-colors", U === G.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
469
- children: [U === G.length && /* @__PURE__ */ m("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ h("button", {
559
+ }, e.id)), /* @__PURE__ */ v("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__ */ _("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ v("button", {
470
564
  type: "button",
471
- onClick: () => st("features"),
565
+ onClick: () => bt("features"),
472
566
  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",
473
- children: [/* @__PURE__ */ m(Ee, { className: "h-4 w-4" }), "Add section"]
567
+ children: [/* @__PURE__ */ _(De, { className: "h-4 w-4" }), "Add section"]
474
568
  })]
475
569
  })] })]
476
570
  })]
477
571
  }),
478
- /* @__PURE__ */ m("aside", {
572
+ /* @__PURE__ */ _("aside", {
479
573
  className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
480
- children: q ? /* @__PURE__ */ m("div", {
574
+ children: J ? /* @__PURE__ */ _("div", {
481
575
  className: "lg:max-h-[calc(100vh-2rem)]",
482
- children: /* @__PURE__ */ m(pe, {
483
- section: q,
484
- onChangeConfig: (e) => ut(q.id, e),
485
- onChangeLabel: (e) => dt(q.id, e),
486
- onClose: () => F(null),
487
- onDuplicate: () => ot(q.id),
488
- onRemove: () => at(q.id)
576
+ children: /* @__PURE__ */ _(pe, {
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)
489
583
  })
490
- }) : /* @__PURE__ */ h("div", {
584
+ }) : /* @__PURE__ */ v("div", {
491
585
  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",
492
586
  children: [
493
- /* @__PURE__ */ m("span", {
587
+ /* @__PURE__ */ _("span", {
494
588
  className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary",
495
- children: /* @__PURE__ */ m(Te, { className: "h-5 w-5" })
589
+ children: /* @__PURE__ */ _(Ee, { className: "h-5 w-5" })
496
590
  }),
497
- /* @__PURE__ */ m("p", {
591
+ /* @__PURE__ */ _("p", {
498
592
  className: "text-sm font-semibold text-text-primary",
499
593
  children: "No block selected"
500
594
  }),
501
- /* @__PURE__ */ m("p", {
595
+ /* @__PURE__ */ _("p", {
502
596
  className: "text-xs text-text-secondary",
503
597
  children: "Select a block on the canvas to edit its text, colors, spacing and alignment."
504
598
  })
@@ -508,35 +602,35 @@ var C = () => {
508
602
  ]
509
603
  })
510
604
  }),
511
- /* @__PURE__ */ m(te, {
512
- open: Xe,
513
- onClose: () => I(!1),
605
+ /* @__PURE__ */ _(te, {
606
+ open: tt,
607
+ onClose: () => L(!1),
514
608
  title: j || "Landing Page",
515
609
  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.",
516
610
  size: "xl",
517
- footer: /* @__PURE__ */ h(Ae, { children: [$ && /* @__PURE__ */ h("a", {
611
+ footer: /* @__PURE__ */ v(Me, { children: [$ && /* @__PURE__ */ v("a", {
518
612
  href: $,
519
613
  target: "_blank",
520
614
  rel: "noreferrer",
521
615
  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",
522
- children: [/* @__PURE__ */ m(p, { className: "h-4 w-4" }), "Open live page"]
523
- }), /* @__PURE__ */ m("button", {
616
+ children: [/* @__PURE__ */ _(g, { className: "h-4 w-4" }), "Open live page"]
617
+ }), /* @__PURE__ */ _("button", {
524
618
  type: "button",
525
- onClick: () => I(!1),
619
+ onClick: () => L(!1),
526
620
  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",
527
621
  children: "Close"
528
622
  })] }),
529
- children: /* @__PURE__ */ m("div", {
623
+ children: /* @__PURE__ */ _("div", {
530
624
  className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
531
- children: G.length === 0 ? /* @__PURE__ */ m("p", {
625
+ children: W.length === 0 ? /* @__PURE__ */ _("p", {
532
626
  className: "p-8 text-center text-sm text-text-secondary",
533
627
  children: "This page has no sections yet."
534
- }) : G.map((e) => /* @__PURE__ */ m(me, { section: e }, e.id))
628
+ }) : W.map((e) => /* @__PURE__ */ _(me, { section: e }, e.id))
535
629
  })
536
630
  })
537
631
  ]
538
632
  });
539
633
  };
540
- export { C as LandingPageBuilderPage };
634
+ export { T as LandingPageBuilderPage };
541
635
 
542
636
  //# sourceMappingURL=LandingPageBuilderPage.js.map