@burdenoff/microfe-headshotmarketing 2026.1114.1 → 2026.1115.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.d.ts +239 -0
- package/dist/generated/wspace-operations.js +360 -241
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/headshotmarketing/components/CrmRecordSelection.d.ts +4 -0
- package/dist/headshotmarketing/components/CrmRecordSelection.js +93 -0
- package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.d.ts +6 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.js +14 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.js.map +1 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.d.ts +8 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js +25 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +169 -140
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +330 -236
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +165 -157
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +119 -113
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +107 -101
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/utils/crmMapper.d.ts +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
- package/dist/utils/pageContext.d.ts +1 -1
- package/dist/utils/pageContext.js +79 -39
- package/dist/utils/pageContext.js.map +1 -1
- package/dist/utils/recordSelection.d.ts +4 -0
- package/dist/utils/recordSelection.js +12 -0
- package/dist/utils/recordSelection.js.map +1 -0
- 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,
|
|
2
|
-
import { HeadshotmarketingLandingPageSectionType as
|
|
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
|
|
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
|
|
9
|
-
import { useHeadshotmarketingBootstrap as
|
|
10
|
-
import { useHeadshotMarketing as
|
|
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
|
|
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 {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
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
|
|
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
|
-
],
|
|
30
|
-
function
|
|
31
|
-
return
|
|
31
|
+
], x = 0;
|
|
32
|
+
function S() {
|
|
33
|
+
return x += 1, `sec-${Date.now().toString(36)}-${x}`;
|
|
32
34
|
}
|
|
33
|
-
function
|
|
35
|
+
function C(e) {
|
|
34
36
|
return {
|
|
35
|
-
id:
|
|
37
|
+
id: S(),
|
|
36
38
|
type: e,
|
|
37
39
|
label: de(e),
|
|
38
40
|
config: {
|
|
39
|
-
...
|
|
41
|
+
...f(),
|
|
40
42
|
...he(e)
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
|
-
function
|
|
45
|
-
return Object.values(
|
|
46
|
+
function w(e) {
|
|
47
|
+
return Object.values(c).find((t) => t === e) ?? c.Custom;
|
|
46
48
|
}
|
|
47
|
-
function
|
|
49
|
+
function Fe(e) {
|
|
48
50
|
return {
|
|
49
|
-
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
|
|
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:
|
|
66
|
+
legacy: oe(e?.metadata).length > 0
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function Le(e) {
|
|
68
70
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
|
|
69
71
|
}
|
|
70
|
-
var
|
|
71
|
-
let {
|
|
72
|
-
|
|
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 =
|
|
75
|
-
return t.length > 0 ? t :
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
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
|
-
},
|
|
88
|
-
|
|
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
|
-
},
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
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:
|
|
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),
|
|
183
|
+
return i.splice(n + 1, 0, r), I(r.id), i;
|
|
109
184
|
});
|
|
110
|
-
},
|
|
111
|
-
let t =
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
let n =
|
|
115
|
-
|
|
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
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
|
|
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
|
-
},
|
|
127
|
-
|
|
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
|
-
},
|
|
135
|
-
|
|
209
|
+
}, wt = (e, t) => {
|
|
210
|
+
G((n) => n.map((n) => n.id === e ? {
|
|
136
211
|
...n,
|
|
137
212
|
label: t
|
|
138
213
|
} : n));
|
|
139
|
-
},
|
|
140
|
-
t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(
|
|
141
|
-
},
|
|
142
|
-
t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
|
|
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),
|
|
219
|
+
V(null), H(null), at(null);
|
|
145
220
|
}, X = (e) => (t) => {
|
|
146
|
-
let n = t.dataTransfer.types, r = n.includes(
|
|
147
|
-
(r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy",
|
|
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(
|
|
151
|
-
n ?
|
|
152
|
-
},
|
|
153
|
-
M(e.name),
|
|
154
|
-
},
|
|
155
|
-
let t = ie(
|
|
156
|
-
for (let e of t.removeIds) await
|
|
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
|
|
233
|
+
let t = (await We({ variables: { input: {
|
|
159
234
|
landingPageId: e,
|
|
160
235
|
sortOrder: r.sortOrder,
|
|
161
|
-
...
|
|
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
|
|
241
|
+
for (let e of t.updates) await Ge({ variables: {
|
|
167
242
|
id: e.id,
|
|
168
|
-
input:
|
|
243
|
+
input: Fe(e.input)
|
|
169
244
|
} });
|
|
170
|
-
let r =
|
|
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
|
|
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
|
-
|
|
180
|
-
} else
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
if (!j.trim()) return
|
|
184
|
-
|
|
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 (
|
|
261
|
+
if (D) {
|
|
187
262
|
let e = {
|
|
188
263
|
title: j.trim(),
|
|
189
|
-
templateId:
|
|
190
|
-
metadata: re(
|
|
191
|
-
}, t = (await
|
|
192
|
-
id:
|
|
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
|
-
|
|
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: `${
|
|
200
|
-
templateId:
|
|
201
|
-
}, t = (await
|
|
202
|
-
|
|
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
|
|
296
|
+
return z(e instanceof Error ? e.message : "Failed to save landing page."), null;
|
|
205
297
|
} finally {
|
|
206
|
-
|
|
298
|
+
E(!1);
|
|
207
299
|
}
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
|
214
|
-
t && (
|
|
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
|
-
|
|
309
|
+
z(e instanceof Error ? e.message : "Failed to publish landing page.");
|
|
217
310
|
}
|
|
218
|
-
}, Q =
|
|
219
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
314
|
+
actions: /* @__PURE__ */ v("div", {
|
|
222
315
|
className: "flex flex-wrap items-center gap-2",
|
|
223
316
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
onClick: () =>
|
|
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__ */
|
|
320
|
+
children: [/* @__PURE__ */ _(ye, { className: "h-4 w-4" }), "Back"]
|
|
228
321
|
}),
|
|
229
|
-
$ && /* @__PURE__ */
|
|
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__ */
|
|
328
|
+
children: [/* @__PURE__ */ _(g, { className: "h-4 w-4" }), "View live"]
|
|
236
329
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
onClick: () =>
|
|
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__ */
|
|
333
|
+
children: [/* @__PURE__ */ _(xe, { className: "h-4 w-4" }), "Preview"]
|
|
241
334
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
onClick: () => void
|
|
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__ */
|
|
339
|
+
children: [/* @__PURE__ */ _(Oe, { className: "h-4 w-4" }), Q ? "Saving…" : "Save"]
|
|
247
340
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
onClick: () => void
|
|
250
|
-
disabled: Q ||
|
|
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__ */
|
|
345
|
+
children: [/* @__PURE__ */ _(Se, { className: "h-4 w-4" }), Ue ? "Publishing…" : "Publish"]
|
|
253
346
|
})
|
|
254
347
|
]
|
|
255
348
|
}),
|
|
256
349
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
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:
|
|
353
|
+
children: R
|
|
261
354
|
}),
|
|
262
|
-
|
|
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__ */
|
|
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__ */
|
|
362
|
+
children: ["View live ", /* @__PURE__ */ _(g, { className: "h-3 w-3" })]
|
|
270
363
|
})]
|
|
271
364
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ _("div", {
|
|
273
366
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
274
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ v("div", {
|
|
275
368
|
className: "flex flex-wrap items-center gap-3",
|
|
276
369
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
289
|
-
|
|
382
|
+
/* @__PURE__ */ _(Ce, { className: "h-3.5 w-3.5" }),
|
|
383
|
+
W.length,
|
|
290
384
|
" ",
|
|
291
|
-
|
|
385
|
+
W.length === 1 ? "section" : "sections"
|
|
292
386
|
]
|
|
293
387
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
className:
|
|
296
|
-
children:
|
|
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__ */
|
|
302
|
-
loading:
|
|
303
|
-
error:
|
|
304
|
-
onRetry:
|
|
305
|
-
hasData: !!
|
|
306
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
408
|
+
/* @__PURE__ */ v("h4", {
|
|
315
409
|
className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ _(Ce, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
|
|
317
411
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
420
|
+
return /* @__PURE__ */ v("button", {
|
|
327
421
|
type: "button",
|
|
328
422
|
draggable: !0,
|
|
329
|
-
onDragStart:
|
|
423
|
+
onDragStart: Tt(e.type),
|
|
330
424
|
onDragEnd: Y,
|
|
331
|
-
onClick: () =>
|
|
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__ */
|
|
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__ */
|
|
337
|
-
}), /* @__PURE__ */
|
|
430
|
+
children: /* @__PURE__ */ _(ue, { type: e.type })
|
|
431
|
+
}), /* @__PURE__ */ v("div", {
|
|
338
432
|
className: "flex items-center gap-1.5",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
442
|
+
}), /* @__PURE__ */ v("div", {
|
|
349
443
|
className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
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: [
|
|
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
|
-
}),
|
|
452
|
+
}), ht.map((e) => /* @__PURE__ */ v("button", {
|
|
359
453
|
type: "button",
|
|
360
|
-
onClick: () =>
|
|
361
|
-
className:
|
|
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__ */
|
|
457
|
+
/* @__PURE__ */ _("span", {
|
|
364
458
|
className: "text-sm font-medium text-text-primary",
|
|
365
459
|
children: e.name
|
|
366
460
|
}),
|
|
367
|
-
e.description && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
474
|
+
/* @__PURE__ */ v("div", {
|
|
381
475
|
className: "min-w-0 lg:col-span-6",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ _("div", {
|
|
383
477
|
className: "mb-4 flex justify-center",
|
|
384
|
-
children: /* @__PURE__ */
|
|
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:
|
|
483
|
+
icon: Te,
|
|
390
484
|
label: "Desktop"
|
|
391
485
|
},
|
|
392
486
|
{
|
|
393
487
|
key: "tablet",
|
|
394
|
-
icon:
|
|
488
|
+
icon: Ae,
|
|
395
489
|
label: "Tablet"
|
|
396
490
|
},
|
|
397
491
|
{
|
|
398
492
|
key: "mobile",
|
|
399
|
-
icon:
|
|
493
|
+
icon: ke,
|
|
400
494
|
label: "Mobile"
|
|
401
495
|
}
|
|
402
496
|
].map((e) => {
|
|
403
|
-
let t = e.icon, n =
|
|
404
|
-
return /* @__PURE__ */
|
|
405
|
-
onClick: () =>
|
|
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:
|
|
410
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
418
|
-
className:
|
|
419
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
515
|
+
children: [/* @__PURE__ */ v("div", {
|
|
422
516
|
className: "flex gap-1.5",
|
|
423
517
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
524
|
+
children: [/* @__PURE__ */ _(Se, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ _("span", {
|
|
431
525
|
className: "truncate",
|
|
432
|
-
children:
|
|
526
|
+
children: Mt
|
|
433
527
|
})]
|
|
434
528
|
})]
|
|
435
|
-
}),
|
|
529
|
+
}), W.length === 0 ? /* @__PURE__ */ v("div", {
|
|
436
530
|
onDragOver: X(0),
|
|
437
531
|
onDrop: Z(0),
|
|
438
|
-
className:
|
|
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__ */
|
|
441
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
544
|
+
}) : /* @__PURE__ */ v("div", { children: [W.map((e, t) => /* @__PURE__ */ _(fe, {
|
|
451
545
|
section: e,
|
|
452
546
|
index: t,
|
|
453
|
-
total:
|
|
454
|
-
selected:
|
|
547
|
+
total: W.length,
|
|
548
|
+
selected: F === e.id,
|
|
455
549
|
dropBefore: U === t,
|
|
456
|
-
onSelect: () =>
|
|
457
|
-
onMoveUp: () =>
|
|
458
|
-
onMoveDown: () =>
|
|
459
|
-
onDuplicate: () =>
|
|
460
|
-
onRemove: () =>
|
|
461
|
-
onHandleDragStart:
|
|
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__ */
|
|
466
|
-
onDragOver: X(
|
|
467
|
-
onDrop: Z(
|
|
468
|
-
className:
|
|
469
|
-
children: [U ===
|
|
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: () =>
|
|
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__ */
|
|
567
|
+
children: [/* @__PURE__ */ _(De, { className: "h-4 w-4" }), "Add section"]
|
|
474
568
|
})]
|
|
475
569
|
})] })]
|
|
476
570
|
})]
|
|
477
571
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ _("aside", {
|
|
479
573
|
className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
|
|
480
|
-
children:
|
|
574
|
+
children: J ? /* @__PURE__ */ _("div", {
|
|
481
575
|
className: "lg:max-h-[calc(100vh-2rem)]",
|
|
482
|
-
children: /* @__PURE__ */
|
|
483
|
-
section:
|
|
484
|
-
onChangeConfig: (e) =>
|
|
485
|
-
onChangeLabel: (e) =>
|
|
486
|
-
onClose: () =>
|
|
487
|
-
onDuplicate: () =>
|
|
488
|
-
onRemove: () =>
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
589
|
+
children: /* @__PURE__ */ _(Ee, { className: "h-5 w-5" })
|
|
496
590
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ _("p", {
|
|
498
592
|
className: "text-sm font-semibold text-text-primary",
|
|
499
593
|
children: "No block selected"
|
|
500
594
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
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__ */
|
|
512
|
-
open:
|
|
513
|
-
onClose: () =>
|
|
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__ */
|
|
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__ */
|
|
523
|
-
}), /* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ _(g, { className: "h-4 w-4" }), "Open live page"]
|
|
617
|
+
}), /* @__PURE__ */ _("button", {
|
|
524
618
|
type: "button",
|
|
525
|
-
onClick: () =>
|
|
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__ */
|
|
623
|
+
children: /* @__PURE__ */ _("div", {
|
|
530
624
|
className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
|
|
531
|
-
children:
|
|
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
|
-
}) :
|
|
628
|
+
}) : W.map((e) => /* @__PURE__ */ _(me, { section: e }, e.id))
|
|
535
629
|
})
|
|
536
630
|
})
|
|
537
631
|
]
|
|
538
632
|
});
|
|
539
633
|
};
|
|
540
|
-
export {
|
|
634
|
+
export { T as LandingPageBuilderPage };
|
|
541
635
|
|
|
542
636
|
//# sourceMappingURL=LandingPageBuilderPage.js.map
|