@burdenoff/microfe-headshotmarketing 2026.704.3 → 2026.704.5

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 (164) hide show
  1. package/dist/generated/wspace-operations.js +118 -111
  2. package/dist/generated/wspace-operations.js.map +1 -1
  3. package/dist/generated/wspace-types.js +27 -19
  4. package/dist/generated/wspace-types.js.map +1 -1
  5. package/dist/headshotmarketing/components/Toast.js +56 -2
  6. package/dist/headshotmarketing/components/Toast.js.map +1 -0
  7. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js +1 -1
  8. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js.map +1 -1
  9. package/dist/headshotmarketing/pages/HomeFunnel.js +54 -0
  10. package/dist/headshotmarketing/pages/HomeFunnel.js.map +1 -0
  11. package/dist/headshotmarketing/pages/HomePage.js +423 -259
  12. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  13. package/dist/headshotmarketing/pages/HomeStatCard.js +79 -0
  14. package/dist/headshotmarketing/pages/HomeStatCard.js.map +1 -0
  15. package/dist/headshotmarketing/pages/ads/AdPlatformChips.js +93 -0
  16. package/dist/headshotmarketing/pages/ads/AdPlatformChips.js.map +1 -0
  17. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +452 -390
  18. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +405 -115
  20. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +566 -346
  22. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  23. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js +107 -0
  24. package/dist/headshotmarketing/pages/automation/WorkflowCanvasNode.js.map +1 -0
  25. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +213 -0
  26. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -0
  27. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +150 -0
  28. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -0
  29. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +380 -371
  30. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +92 -0
  32. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -0
  33. package/dist/headshotmarketing/pages/builder/SectionContent.js +346 -0
  34. package/dist/headshotmarketing/pages/builder/SectionContent.js.map +1 -0
  35. package/dist/headshotmarketing/pages/builder/SectionInspector.js +358 -0
  36. package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -0
  37. package/dist/headshotmarketing/pages/builder/builderCatalog.js +274 -0
  38. package/dist/headshotmarketing/pages/builder/builderCatalog.js.map +1 -0
  39. package/dist/headshotmarketing/pages/content/AIToolsPage.js +479 -193
  40. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +492 -197
  42. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/content/AssetThumbnail.js +37 -0
  44. package/dist/headshotmarketing/pages/content/AssetThumbnail.js.map +1 -0
  45. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +672 -219
  46. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +200 -0
  48. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -0
  49. package/dist/headshotmarketing/pages/content/ContentPage.js +224 -204
  50. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/content/ContentSubNav.js +51 -0
  52. package/dist/headshotmarketing/pages/content/ContentSubNav.js.map +1 -0
  53. package/dist/headshotmarketing/pages/crm/LeadsPage.js +250 -131
  54. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/crm/LeadsWidgets.js +179 -0
  56. package/dist/headshotmarketing/pages/crm/LeadsWidgets.js.map +1 -0
  57. package/dist/headshotmarketing/pages/events/CreateEventPage.js +631 -379
  58. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  59. package/dist/headshotmarketing/pages/events/EventImageUpload.js +123 -0
  60. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -0
  61. package/dist/headshotmarketing/pages/events/EventPagePreview.js +99 -0
  62. package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -0
  63. package/dist/headshotmarketing/pages/events/EventsPage.js +267 -228
  64. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  65. package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js +50 -0
  66. package/dist/headshotmarketing/pages/seo/SeoScoreGauge.js.map +1 -0
  67. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +147 -0
  68. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -0
  69. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +562 -419
  70. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +108 -0
  72. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -0
  73. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +100 -0
  74. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -0
  75. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +315 -250
  76. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js +60 -0
  78. package/dist/headshotmarketing/pages/social-media/socialComposerMeta.js.map +1 -0
  79. package/dist/headshotmarketing/utils/automationMapper.js +1 -1
  80. package/dist/headshotmarketing/utils/automationMapper.js.map +1 -1
  81. package/dist/headshotmarketing/utils/contentMapper.js +4 -24
  82. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  83. package/dist/headshotmarketing/utils/eventsMapper.js +9 -9
  84. package/dist/headshotmarketing/utils/eventsMapper.js.map +1 -1
  85. package/dist/headshotmarketing/utils/helpers.js +7 -4
  86. package/dist/headshotmarketing/utils/helpers.js.map +1 -1
  87. package/dist/headshotmarketing/utils/influencerMapper.js +1 -1
  88. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  89. package/dist/node_modules/lodash/_arrayEach.js +14 -0
  90. package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
  91. package/dist/node_modules/lodash/_assignValue.js +17 -0
  92. package/dist/node_modules/lodash/_assignValue.js.map +1 -0
  93. package/dist/node_modules/lodash/_baseAssign.js +16 -0
  94. package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
  95. package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
  96. package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
  97. package/dist/node_modules/lodash/_baseClone.js +64 -0
  98. package/dist/node_modules/lodash/_baseClone.js.map +1 -0
  99. package/dist/node_modules/lodash/_baseCreate.js +21 -0
  100. package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
  101. package/dist/node_modules/lodash/_baseIsMap.js +16 -0
  102. package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
  103. package/dist/node_modules/lodash/_baseIsSet.js +16 -0
  104. package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
  105. package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
  106. package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
  107. package/dist/node_modules/lodash/_baseUnset.js +26 -0
  108. package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
  109. package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
  110. package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
  111. package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
  112. package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
  113. package/dist/node_modules/lodash/_cloneDataView.js +16 -0
  114. package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
  115. package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
  116. package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
  117. package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
  118. package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
  119. package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
  120. package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
  121. package/dist/node_modules/lodash/_copyArray.js +15 -0
  122. package/dist/node_modules/lodash/_copyArray.js.map +1 -0
  123. package/dist/node_modules/lodash/_copyObject.js +22 -0
  124. package/dist/node_modules/lodash/_copyObject.js.map +1 -0
  125. package/dist/node_modules/lodash/_copySymbols.js +16 -0
  126. package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
  127. package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
  128. package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
  129. package/dist/node_modules/lodash/_customOmitClone.js +15 -0
  130. package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
  131. package/dist/node_modules/lodash/_flatRest.js +17 -0
  132. package/dist/node_modules/lodash/_flatRest.js.map +1 -0
  133. package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
  134. package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
  135. package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
  136. package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
  137. package/dist/node_modules/lodash/_initCloneArray.js +15 -0
  138. package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
  139. package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
  140. package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
  141. package/dist/node_modules/lodash/_initCloneObject.js +17 -0
  142. package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
  143. package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
  144. package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
  145. package/dist/node_modules/lodash/_parent.js +16 -0
  146. package/dist/node_modules/lodash/_parent.js.map +1 -0
  147. package/dist/node_modules/lodash/flatten.js +15 -0
  148. package/dist/node_modules/lodash/flatten.js.map +1 -0
  149. package/dist/node_modules/lodash/isMap.js +14 -0
  150. package/dist/node_modules/lodash/isMap.js.map +1 -0
  151. package/dist/node_modules/lodash/isSet.js +14 -0
  152. package/dist/node_modules/lodash/isSet.js.map +1 -0
  153. package/dist/node_modules/lodash/keysIn.js +17 -0
  154. package/dist/node_modules/lodash/keysIn.js.map +1 -0
  155. package/dist/node_modules/lodash/omit.js +28 -0
  156. package/dist/node_modules/lodash/omit.js.map +1 -0
  157. package/dist/node_modules/recharts/es6/chart/FunnelChart.js +15 -0
  158. package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +1 -0
  159. package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +370 -0
  160. package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +1 -0
  161. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
  162. package/dist/node_modules/recharts/es6/util/FunnelUtils.js +81 -0
  163. package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +1 -0
  164. package/package.json +1 -1
@@ -5,77 +5,81 @@ import { PageLayout as a } from "../../components/PageLayout.js";
5
5
  import { Modal as ee } from "../../components/Modal.js";
6
6
  import { QueryStateBoundary as te } from "../../components/QueryStateBoundary.js";
7
7
  import "../../components/index.js";
8
- import { useHeadshotmarketingBootstrap as o } from "../../hooks/useHeadshotmarketingBootstrap.js";
8
+ import { useHeadshotmarketingBootstrap as ne } from "../../hooks/useHeadshotmarketingBootstrap.js";
9
9
  import "../../hooks/index.js";
10
- import { toBuilderSectionsFromLandingPage as s, toBuilderTemplateModel as ne } from "../../utils/builderMapper.js";
11
- import { useEffect as re, useMemo as ie, useState as c } from "react";
12
- import { ArrowLeft as ae, ChevronDown as oe, ChevronUp as l, Columns as u, Edit3 as d, ExternalLink as f, Eye as se, Globe as ce, GripVertical as le, Image as p, Layout as m, Monitor as ue, MousePointerClick as h, Plus as de, Save as fe, Smartphone as pe, Star as g, Tablet as me, Trash2 as he, Type as _ } from "lucide-react";
13
- import { Fragment as ge, jsx as v, jsxs as y } from "react/jsx-runtime";
14
- import { EmphasisPanel as _e, PagePurpose as b } from "@burdenoff/fe-libs/ui";
10
+ import { toBuilderSectionsFromLandingPage as re, toBuilderTemplateModel as ie } from "../../utils/builderMapper.js";
11
+ import { SECTION_CATALOG as ae, SectionThumbnail as oe, defaultConfig as o, sectionLabelFor as s } from "./builderCatalog.js";
12
+ import { SectionContent as se } from "./SectionContent.js";
13
+ import { SectionCanvasBlock as ce } from "./SectionCanvasBlock.js";
14
+ import { SectionInspector as le } from "./SectionInspector.js";
15
+ import { useEffect as ue, useMemo as c, useState as l } from "react";
16
+ import { ArrowLeft as de, Edit3 as fe, ExternalLink as u, Eye as pe, Globe as me, Layers as he, LayoutTemplate as ge, Monitor as _e, MousePointerClick as ve, Plus as d, Save as ye, Smartphone as be, Tablet as xe } from "lucide-react";
17
+ import { Fragment as Se, jsx as f, jsxs as p } from "react/jsx-runtime";
18
+ import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
15
19
  //#region src/headshotmarketing/pages/builder/LandingPageBuilderPage.tsx
16
- var x = {
17
- header: m,
18
- hero: p,
19
- features: u,
20
- testimonials: g,
21
- cta: h,
22
- footer: m,
23
- pricing: _,
24
- faq: _,
25
- gallery: p,
26
- contact: _
27
- }, ve = [
20
+ var m = "application/x-hm-palette", h = "application/x-hm-reorder", we = [
28
21
  "header",
29
22
  "hero",
30
23
  "features",
31
24
  "testimonials",
32
25
  "cta",
33
26
  "footer"
34
- ];
35
- function ye(e) {
27
+ ], g = 0;
28
+ function _() {
29
+ return g += 1, `sec-${Date.now().toString(36)}-${g}`;
30
+ }
31
+ function v(e) {
32
+ return {
33
+ id: _(),
34
+ type: e,
35
+ label: s(e),
36
+ config: o()
37
+ };
38
+ }
39
+ function y(e) {
36
40
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
37
41
  }
38
- function S(e) {
42
+ function b(e) {
39
43
  return Array.isArray(e) && e.every((e) => typeof e == "object" && !!e && typeof e.type == "string");
40
44
  }
41
- function C(e) {
45
+ function x(e) {
42
46
  let t = e?.builderLayout;
43
- return !S(t) || t.length === 0 ? null : t.map((e, t) => ({
47
+ return !b(t) || t.length === 0 ? null : t.map((e, t) => ({
44
48
  id: typeof e.id == "string" ? e.id : `sec-${t}`,
45
49
  type: e.type,
46
- label: typeof e.label == "string" ? e.label : e.type.charAt(0).toUpperCase() + e.type.slice(1),
50
+ label: typeof e.label == "string" ? e.label : s(e.type),
47
51
  config: typeof e.config == "object" && e.config !== null ? e.config : {}
48
52
  }));
49
53
  }
50
- var w = () => {
51
- let { navigate: u, basePath: p } = r(), { data: h, loading: _, error: S, refetch: w } = o(), T = (h?.headshotmarketingLandingPages.items ?? [])[0], [be, { loading: xe }] = e(), [Se, { loading: Ce }] = n(), [we, { loading: E }] = t(), [D, O] = c(T?.id ?? null), [k, A] = c(T?.status ?? "DRAFT"), [j, M] = c(T?.publishedUrl ?? null), [N, P] = c(T?.title ?? "Landing Page"), [F, I] = c(T?.templateId ?? null), [L, Te] = c("desktop"), [R, z] = c(null), [Ee, B] = c(!1), [V, H] = c(null), [U, W] = c(null), [G, K] = c(ie(() => {
52
- let e = C(T?.metadata);
54
+ var S = () => {
55
+ let { navigate: o, basePath: s } = r(), { data: g, loading: b, error: S, refetch: C } = ne(), w = (g?.headshotmarketingLandingPages.items ?? [])[0], [Te, { loading: Ee }] = e(), [De, { loading: Oe }] = n(), [ke, { loading: T }] = t(), [E, D] = l(w?.id ?? null), [O, k] = l(w?.status ?? "DRAFT"), [A, j] = l(w?.publishedUrl ?? null), [M, N] = l(w?.title ?? "Landing Page"), [Ae, P] = l(w?.slug ?? ""), [F, I] = l(w?.templateId ?? null), [L, je] = l("desktop"), [R, z] = l(null), [Me, B] = l(!1), [V, H] = l(null), [Ne, U] = l(null), [Pe, W] = l(null), [Fe, G] = l(null), [K, Ie] = l(null), Le = Pe !== null || Fe !== null, [q, J] = l(c(() => {
56
+ let e = x(w?.metadata);
53
57
  if (e) return e;
54
- let t = s(T);
58
+ let t = re(w);
55
59
  return t.length > 0 ? t.map((e) => ({ ...e })) : [{
56
60
  id: "default-hero",
57
61
  type: "hero",
58
62
  label: "Hero",
59
63
  config: {}
60
64
  }];
61
- }, [T])), q = (h?.headshotmarketingCampaignTemplates.items ?? []).map((e) => ne(e));
62
- re(() => {
63
- if (!T) return;
64
- O(T.id), A(T.status), M(T.publishedUrl ?? null), P(T.title), I(T.templateId ?? null);
65
- let e = C(T.metadata);
65
+ }, [w])), Re = (g?.headshotmarketingCampaignTemplates.items ?? []).map((e) => ie(e));
66
+ ue(() => {
67
+ if (!w) return;
68
+ D(w.id), k(w.status), j(w.publishedUrl ?? null), N(w.title), P(w.slug), I(w.templateId ?? null);
69
+ let e = x(w.metadata);
66
70
  if (e) {
67
- K(e);
71
+ J(e);
68
72
  return;
69
73
  }
70
- let t = s(T);
71
- t.length > 0 && K(t.map((e) => ({ ...e })));
72
- }, [T]);
73
- let De = {
74
+ let t = re(w);
75
+ t.length > 0 && J(t.map((e) => ({ ...e })));
76
+ }, [w]);
77
+ let ze = {
74
78
  desktop: "w-full",
75
79
  tablet: "max-w-[768px]",
76
- mobile: "max-w-[375px]"
77
- }, J = (e, t) => {
78
- K((n) => {
80
+ mobile: "max-w-[390px]"
81
+ }, Y = c(() => q.find((e) => e.id === R) ?? null, [q, R]), Be = (e, t) => {
82
+ J((n) => {
79
83
  let r = n.findIndex((t) => t.id === e);
80
84
  if (r === -1) return n;
81
85
  let i = t === "up" ? r - 1 : r + 1;
@@ -83,412 +87,417 @@ var w = () => {
83
87
  let a = [...n];
84
88
  return [a[r], a[i]] = [a[i], a[r]], a;
85
89
  });
86
- }, Oe = (e) => {
87
- K((t) => t.filter((t) => t.id !== e)), R === e && z(null);
88
- }, Y = (e) => {
89
- let t = {
90
- id: `sec-${Date.now()}`,
91
- type: e,
92
- label: e.charAt(0).toUpperCase() + e.slice(1),
93
- config: {}
94
- };
95
- K((e) => [...e, t]), z(t.id);
96
- }, ke = (e) => {
97
- P(e.name), I(e.id), K(ve.map((e, t) => ({
98
- id: `sec-${Date.now()}-${t}`,
99
- type: e,
100
- label: e.charAt(0).toUpperCase() + e.slice(1),
101
- config: {}
102
- }))), z(null), W(`Applied "${e.name}" template — Save to keep it.`);
103
- }, Ae = [
104
- "header",
105
- "hero",
106
- "features",
107
- "testimonials",
108
- "cta",
109
- "footer",
110
- "pricing",
111
- "faq",
112
- "gallery",
113
- "contact"
114
- ], X = () => ({
115
- ...T?.metadata ?? {},
116
- builderLayout: G
117
- }), Z = async () => {
118
- if (!N.trim()) return H("Page name is required."), null;
90
+ }, Ve = (e) => {
91
+ J((t) => t.filter((t) => t.id !== e)), R === e && z(null);
92
+ }, He = (e) => {
93
+ J((t) => {
94
+ let n = t.findIndex((t) => t.id === e);
95
+ if (n === -1) return t;
96
+ let r = {
97
+ ...t[n],
98
+ id: _(),
99
+ label: `${t[n].label} copy`,
100
+ config: { ...t[n].config }
101
+ }, i = [...t];
102
+ return i.splice(n + 1, 0, r), z(r.id), i;
103
+ });
104
+ }, Ue = (e) => {
105
+ let t = v(e);
106
+ J((e) => [...e, t]), z(t.id);
107
+ }, We = (e, t) => {
108
+ let n = v(e);
109
+ J((e) => {
110
+ let r = [...e];
111
+ return r.splice(Math.min(Math.max(t, 0), r.length), 0, n), r;
112
+ }), z(n.id);
113
+ }, Ge = (e, t) => {
114
+ J((n) => {
115
+ let r = n.findIndex((t) => t.id === e);
116
+ if (r === -1) return n;
117
+ let i = [...n], [a] = i.splice(r, 1), ee = r < t ? t - 1 : t;
118
+ return i.splice(Math.min(Math.max(ee, 0), i.length), 0, a), i;
119
+ });
120
+ }, Ke = (e, t) => {
121
+ J((n) => n.map((n) => n.id === e ? {
122
+ ...n,
123
+ config: {
124
+ ...n.config,
125
+ ...t
126
+ }
127
+ } : n));
128
+ }, qe = (e, t) => {
129
+ J((n) => n.map((n) => n.id === e ? {
130
+ ...n,
131
+ label: t
132
+ } : n));
133
+ }, Je = (e) => (t) => {
134
+ t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(m, e), G(e), W(null);
135
+ }, Ye = (e) => (t) => {
136
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(h, e), W(e), G(null);
137
+ }, X = () => {
138
+ W(null), G(null), Ie(null);
139
+ }, Z = (e) => (t) => {
140
+ let n = t.dataTransfer.types, r = n.includes(h), i = n.includes(m);
141
+ !r && !i || (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", Ie(e));
142
+ }, Q = (e) => (t) => {
143
+ t.preventDefault();
144
+ let n = t.dataTransfer.getData(m), r = t.dataTransfer.getData(h);
145
+ n ? We(n, e) : r && Ge(r, e), X();
146
+ }, Xe = (e) => {
147
+ N(e.name), I(e.id), J(we.map((e) => v(e))), z(null), U(`Applied "${e.name}" template — Save to keep it.`);
148
+ }, Ze = () => ({
149
+ ...w?.metadata ?? {},
150
+ builderLayout: q
151
+ }), Qe = async () => {
152
+ if (!M.trim()) return H("Page name is required."), null;
119
153
  H(null);
120
154
  try {
121
- if (D) {
122
- let e = (await Se({ variables: {
123
- id: D,
155
+ if (E) {
156
+ let e = (await De({ variables: {
157
+ id: E,
124
158
  input: {
125
- title: N.trim(),
159
+ title: M.trim(),
126
160
  templateId: F ?? void 0,
127
- metadata: X()
161
+ metadata: Ze()
128
162
  }
129
163
  } })).data?.headshotmarketingUpdateLandingPage;
130
- return e && (A(e.status), M(e.publishedUrl ?? null)), D;
164
+ return e && (k(e.status), j(e.publishedUrl ?? null)), E;
131
165
  }
132
- let e = (await be({ variables: { input: {
133
- title: N.trim(),
134
- slug: `${ye(N)}-${Date.now().toString(36)}`,
166
+ let e = (await Te({ variables: { input: {
167
+ title: M.trim(),
168
+ slug: `${y(M)}-${Date.now().toString(36)}`,
135
169
  templateId: F ?? void 0,
136
- metadata: X()
170
+ metadata: Ze()
137
171
  } } })).data?.headshotmarketingCreateLandingPage;
138
- return e ? (O(e.id), A(e.status), M(e.publishedUrl ?? null), e.id) : (H("Failed to create landing page."), null);
172
+ return e ? (D(e.id), k(e.status), j(e.publishedUrl ?? null), P(e.slug), e.id) : (H("Failed to create landing page."), null);
139
173
  } catch (e) {
140
174
  return H(e instanceof Error ? e.message : "Failed to save landing page."), null;
141
175
  }
142
- }, je = async () => {
143
- await Z() && (W("Landing page saved."), w());
144
- }, Me = async () => {
145
- let e = await Z();
176
+ }, $e = async () => {
177
+ await Qe() && (U("Landing page saved."), C());
178
+ }, et = async () => {
179
+ let e = await Qe();
146
180
  if (e) try {
147
- let t = (await we({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
148
- t && (A(t.status), M(t.publishedUrl ?? null), W("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), w();
181
+ let t = (await ke({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
182
+ t && (k(t.status), j(t.publishedUrl ?? null), U("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), C();
149
183
  } catch (e) {
150
184
  H(e instanceof Error ? e.message : "Failed to publish landing page.");
151
185
  }
152
- }, Q = xe || Ce, $ = (e) => e.type === "hero" ? /* @__PURE__ */ y("div", {
153
- className: "rounded-md bg-bg-sunken/50 p-4 text-center",
154
- children: [
155
- /* @__PURE__ */ v("p", {
156
- className: "text-lg font-bold text-text-primary",
157
- children: e.config.headline || "Your Headline Here"
158
- }),
159
- /* @__PURE__ */ v("p", {
160
- className: "text-xs text-text-secondary mt-1",
161
- children: e.config.subheadline || "Subheadline text"
162
- }),
163
- /* @__PURE__ */ v("div", {
164
- className: "mt-2",
165
- children: /* @__PURE__ */ v("span", {
166
- className: "inline-block bg-action-primary-bg text-action-primary-text text-xs px-3 py-1 rounded-md",
167
- children: e.config.cta || "Call to Action"
168
- })
169
- })
170
- ]
171
- }) : e.type === "features" ? /* @__PURE__ */ v("div", {
172
- className: "grid grid-cols-3 gap-2",
173
- children: (e.config.items || [
174
- "Feature 1",
175
- "Feature 2",
176
- "Feature 3"
177
- ]).map((e, t) => /* @__PURE__ */ v("div", {
178
- className: "rounded-md bg-bg-sunken/50 p-2 text-center text-xs text-text-secondary",
179
- children: e
180
- }, t))
181
- }) : e.type === "header" ? /* @__PURE__ */ y("div", {
182
- className: "flex items-center justify-between rounded-md bg-bg-sunken/50 p-2",
183
- children: [
184
- /* @__PURE__ */ v("span", {
185
- className: "text-xs font-medium text-text-secondary",
186
- children: "Logo"
187
- }),
188
- /* @__PURE__ */ y("div", {
189
- className: "flex gap-2 text-xs text-text-secondary",
190
- children: [
191
- /* @__PURE__ */ v("span", { children: "Nav 1" }),
192
- /* @__PURE__ */ v("span", { children: "Nav 2" }),
193
- /* @__PURE__ */ v("span", { children: "Nav 3" })
194
- ]
195
- }),
196
- /* @__PURE__ */ v("span", {
197
- className: "text-xs bg-action-primary-bg/20 text-primary px-2 py-0.5 rounded-md",
198
- children: e.config.cta || "CTA"
199
- })
200
- ]
201
- }) : e.type === "testimonials" ? /* @__PURE__ */ v("div", {
202
- className: "flex gap-2",
203
- children: Array.from({ length: e.config.count || 3 }).map((e, t) => /* @__PURE__ */ y("div", {
204
- className: "flex-1 rounded-md bg-bg-sunken/50 p-2 text-center",
205
- children: [/* @__PURE__ */ v("div", {
206
- className: "flex justify-center gap-0.5 mb-1",
207
- children: [
208
- 1,
209
- 2,
210
- 3,
211
- 4,
212
- 5
213
- ].map((e) => /* @__PURE__ */ v(g, { className: "h-3 w-3 text-status-warning-text fill-[var(--color-status-warning)]" }, e))
214
- }), /* @__PURE__ */ y("p", {
215
- className: "text-[10px] text-text-secondary",
216
- children: ["Testimonial ", t + 1]
217
- })]
218
- }, t))
219
- }) : e.type === "cta" ? /* @__PURE__ */ y("div", {
220
- className: "rounded-md bg-action-primary-bg/10 p-3 text-center",
221
- children: [/* @__PURE__ */ v("p", {
222
- className: "text-sm font-semibold text-text-primary",
223
- children: e.config.headline || "Call to Action"
224
- }), /* @__PURE__ */ v("span", {
225
- className: "inline-block mt-1 bg-action-primary-bg text-action-primary-text text-xs px-3 py-1 rounded-md",
226
- children: e.config.buttonText || "Get Started"
227
- })]
228
- }) : e.type === "footer" ? /* @__PURE__ */ y("div", {
229
- className: "rounded-md bg-bg-sunken/50 p-2 text-center text-xs text-text-secondary",
230
- children: [
231
- "Footer with ",
232
- e.config.columns || 4,
233
- " columns"
234
- ]
235
- }) : /* @__PURE__ */ y("div", {
236
- className: "rounded-md bg-bg-sunken/50 p-3 text-center text-xs text-text-secondary capitalize",
237
- children: [e.type, " section"]
238
- });
239
- return /* @__PURE__ */ y(a, {
186
+ }, $ = Ee || Oe, tt = `/p/${Ae || y(M)}`;
187
+ return /* @__PURE__ */ p(a, {
240
188
  title: "Landing Page Builder",
241
- actions: /* @__PURE__ */ y("div", {
189
+ actions: /* @__PURE__ */ p("div", {
242
190
  className: "flex flex-wrap items-center gap-2",
243
191
  children: [
244
- /* @__PURE__ */ y("button", {
245
- onClick: () => u(p),
192
+ /* @__PURE__ */ p("button", {
193
+ onClick: () => o(s),
246
194
  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",
247
- children: [/* @__PURE__ */ v(ae, { className: "h-4 w-4" }), "Back"]
195
+ children: [/* @__PURE__ */ f(de, { className: "h-4 w-4" }), "Back"]
248
196
  }),
249
- /* @__PURE__ */ y("button", {
197
+ /* @__PURE__ */ p("button", {
250
198
  onClick: () => B(!0),
251
199
  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",
252
- children: [/* @__PURE__ */ v(se, { className: "h-4 w-4" }), "Preview"]
200
+ children: [/* @__PURE__ */ f(pe, { className: "h-4 w-4" }), "Preview"]
253
201
  }),
254
- /* @__PURE__ */ y("button", {
255
- onClick: () => void je(),
256
- disabled: Q,
202
+ /* @__PURE__ */ p("button", {
203
+ onClick: () => void $e(),
204
+ disabled: $,
257
205
  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",
258
- children: [/* @__PURE__ */ v(fe, { className: "h-4 w-4" }), Q ? "Saving…" : "Save"]
206
+ children: [/* @__PURE__ */ f(ye, { className: "h-4 w-4" }), $ ? "Saving…" : "Save"]
259
207
  }),
260
- /* @__PURE__ */ y("button", {
261
- onClick: () => void Me(),
262
- disabled: Q || E,
263
- className: "inline-flex items-center gap-2 rounded-md bg-status-success-text px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-status-success-text/90 disabled:opacity-60",
264
- children: [/* @__PURE__ */ v(ce, { className: "h-4 w-4" }), E ? "Publishing…" : "Publish"]
208
+ /* @__PURE__ */ p("button", {
209
+ onClick: () => void et(),
210
+ disabled: $ || T,
211
+ 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",
212
+ children: [/* @__PURE__ */ f(me, { className: "h-4 w-4" }), T ? "Publishing…" : "Publish"]
265
213
  })
266
214
  ]
267
215
  }),
268
216
  children: [
269
- /* @__PURE__ */ v(b, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
270
- V && /* @__PURE__ */ v("div", {
217
+ /* @__PURE__ */ f(Ce, { 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." }),
218
+ V && /* @__PURE__ */ f("div", {
271
219
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
272
220
  children: V
273
221
  }),
274
- U && !V && /* @__PURE__ */ y("div", {
222
+ Ne && !V && /* @__PURE__ */ p("div", {
275
223
  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",
276
- children: [/* @__PURE__ */ v("span", { children: U }), j && k === "PUBLISHED" && /* @__PURE__ */ y("a", {
277
- href: j,
224
+ children: [/* @__PURE__ */ f("span", { children: Ne }), A && O === "PUBLISHED" && /* @__PURE__ */ p("a", {
225
+ href: A,
278
226
  target: "_blank",
279
227
  rel: "noreferrer",
280
228
  className: "inline-flex items-center gap-1 font-medium underline",
281
- children: ["View live ", /* @__PURE__ */ v(f, { className: "h-3 w-3" })]
229
+ children: ["View live ", /* @__PURE__ */ f(u, { className: "h-3 w-3" })]
282
230
  })]
283
231
  }),
284
- /* @__PURE__ */ v("div", {
232
+ /* @__PURE__ */ f("div", {
285
233
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
286
- children: /* @__PURE__ */ y("div", {
234
+ children: /* @__PURE__ */ p("div", {
287
235
  className: "flex flex-wrap items-center gap-3",
288
236
  children: [
289
- /* @__PURE__ */ v(d, { className: "h-4 w-4 text-text-secondary" }),
290
- /* @__PURE__ */ v("input", {
237
+ /* @__PURE__ */ f(fe, { className: "h-4 w-4 text-text-secondary" }),
238
+ /* @__PURE__ */ f("input", {
291
239
  type: "text",
292
- value: N,
293
- onChange: (e) => P(e.target.value),
240
+ value: M,
241
+ onChange: (e) => N(e.target.value),
294
242
  className: "text-lg font-semibold text-text-primary bg-transparent border-none outline-none flex-1 min-w-[12rem] placeholder:text-text-secondary",
295
243
  placeholder: "Page name"
296
244
  }),
297
- /* @__PURE__ */ v("span", {
298
- className: i("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", k === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
299
- children: k.toLowerCase()
245
+ /* @__PURE__ */ p("span", {
246
+ className: "hidden items-center gap-1.5 text-xs text-text-secondary sm:inline-flex",
247
+ children: [
248
+ /* @__PURE__ */ f(he, { className: "h-3.5 w-3.5" }),
249
+ q.length,
250
+ " ",
251
+ q.length === 1 ? "section" : "sections"
252
+ ]
253
+ }),
254
+ /* @__PURE__ */ f("span", {
255
+ className: i("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"),
256
+ children: O.toLowerCase()
300
257
  })
301
258
  ]
302
259
  })
303
260
  }),
304
- /* @__PURE__ */ v(te, {
305
- loading: _,
261
+ /* @__PURE__ */ f(te, {
262
+ loading: b,
306
263
  error: S,
307
- onRetry: w,
308
- hasData: !!h,
309
- children: /* @__PURE__ */ y("div", {
310
- className: "grid grid-cols-1 lg:grid-cols-4 gap-6",
311
- children: [/* @__PURE__ */ y("div", {
312
- className: "lg:col-span-1 space-y-4",
313
- children: [/* @__PURE__ */ y("div", {
314
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
315
- children: [/* @__PURE__ */ v("h4", {
316
- className: "text-sm font-semibold text-text-primary mb-3",
317
- children: "Templates"
318
- }), /* @__PURE__ */ y("div", {
319
- className: "space-y-2",
320
- children: [q.length === 0 && /* @__PURE__ */ v("p", {
321
- className: "text-xs text-text-secondary",
322
- children: "No templates yet. Create a campaign template to reuse it here."
323
- }), q.map((e) => /* @__PURE__ */ y("button", {
324
- type: "button",
325
- onClick: () => ke(e),
326
- className: i("flex flex-col items-start w-full rounded-md border px-3 py-2.5 text-left transition-colors", F === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
264
+ onRetry: C,
265
+ hasData: !!g,
266
+ children: /* @__PURE__ */ p("div", {
267
+ className: "grid grid-cols-1 gap-4 lg:grid-cols-12",
268
+ children: [
269
+ /* @__PURE__ */ p("aside", {
270
+ className: "space-y-4 lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
271
+ children: [/* @__PURE__ */ p("div", {
272
+ className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
273
+ children: [
274
+ /* @__PURE__ */ p("h4", {
275
+ className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
276
+ children: [/* @__PURE__ */ f(he, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
277
+ }),
278
+ /* @__PURE__ */ f("p", {
279
+ className: "mb-3 text-[11px] text-text-secondary",
280
+ children: "Click to append, or drag onto the canvas."
281
+ }),
282
+ /* @__PURE__ */ f("div", {
283
+ className: "grid grid-cols-2 gap-2",
284
+ children: ae.map((e) => {
285
+ let t = e.icon;
286
+ return /* @__PURE__ */ p("button", {
287
+ type: "button",
288
+ draggable: !0,
289
+ onDragStart: Je(e.type),
290
+ onDragEnd: X,
291
+ onClick: () => Ue(e.type),
292
+ title: e.description,
293
+ 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",
294
+ children: [/* @__PURE__ */ f("div", {
295
+ className: "h-12 overflow-hidden rounded-md border border-border-subtle/60 bg-bg-sunken/50 p-1.5",
296
+ children: /* @__PURE__ */ f(oe, { type: e.type })
297
+ }), /* @__PURE__ */ p("div", {
298
+ className: "flex items-center gap-1.5",
299
+ children: [/* @__PURE__ */ f(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ f("span", {
300
+ className: "text-xs font-medium text-text-primary",
301
+ children: e.label
302
+ })]
303
+ })]
304
+ }, e.type);
305
+ })
306
+ })
307
+ ]
308
+ }), /* @__PURE__ */ p("div", {
309
+ className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
310
+ children: [/* @__PURE__ */ p("h4", {
311
+ className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
312
+ children: [/* @__PURE__ */ f(ge, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
313
+ }), /* @__PURE__ */ p("div", {
314
+ className: "space-y-2",
315
+ children: [Re.length === 0 && /* @__PURE__ */ f("p", {
316
+ className: "text-xs text-text-secondary",
317
+ children: "No templates yet. Create a campaign template to reuse it here."
318
+ }), Re.map((e) => /* @__PURE__ */ p("button", {
319
+ type: "button",
320
+ onClick: () => Xe(e),
321
+ className: i("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-left transition-colors", F === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
322
+ children: [
323
+ /* @__PURE__ */ f("span", {
324
+ className: "text-sm font-medium text-text-primary",
325
+ children: e.name
326
+ }),
327
+ e.description && /* @__PURE__ */ f("span", {
328
+ className: "mt-0.5 text-[10px] text-text-secondary",
329
+ children: e.description
330
+ }),
331
+ /* @__PURE__ */ f("span", {
332
+ className: "mt-1 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] capitalize text-text-secondary",
333
+ children: e.category
334
+ })
335
+ ]
336
+ }, e.id))]
337
+ })]
338
+ })]
339
+ }),
340
+ /* @__PURE__ */ p("div", {
341
+ className: "min-w-0 lg:col-span-6",
342
+ children: [/* @__PURE__ */ f("div", {
343
+ className: "mb-4 flex justify-center",
344
+ children: /* @__PURE__ */ f("div", {
345
+ className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
346
+ children: [
347
+ {
348
+ key: "desktop",
349
+ icon: _e,
350
+ label: "Desktop"
351
+ },
352
+ {
353
+ key: "tablet",
354
+ icon: xe,
355
+ label: "Tablet"
356
+ },
357
+ {
358
+ key: "mobile",
359
+ icon: be,
360
+ label: "Mobile"
361
+ }
362
+ ].map((e) => {
363
+ let t = e.icon, n = L === e.key;
364
+ return /* @__PURE__ */ p("button", {
365
+ onClick: () => je(e.key),
366
+ title: e.label,
367
+ "aria-label": e.label,
368
+ "aria-pressed": n,
369
+ className: i("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"),
370
+ children: [/* @__PURE__ */ f(t, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
371
+ className: "hidden sm:inline",
372
+ children: e.label
373
+ })]
374
+ }, e.key);
375
+ })
376
+ })
377
+ }), /* @__PURE__ */ p("div", {
378
+ className: i("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", ze[L]),
379
+ children: [/* @__PURE__ */ p("div", {
380
+ className: "flex items-center gap-2 border-b border-border-subtle bg-bg-sunken/60 px-4 py-2.5",
381
+ children: [/* @__PURE__ */ p("div", {
382
+ className: "flex gap-1.5",
383
+ children: [
384
+ /* @__PURE__ */ f("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
385
+ /* @__PURE__ */ f("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
386
+ /* @__PURE__ */ f("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
387
+ ]
388
+ }), /* @__PURE__ */ p("div", {
389
+ 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",
390
+ children: [/* @__PURE__ */ f(me, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ f("span", {
391
+ className: "truncate",
392
+ children: tt
393
+ })]
394
+ })]
395
+ }), q.length === 0 ? /* @__PURE__ */ p("div", {
396
+ onDragOver: Z(0),
397
+ onDrop: Q(0),
398
+ className: i("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", Le ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
327
399
  children: [
328
- /* @__PURE__ */ v("span", {
400
+ /* @__PURE__ */ f(d, { className: "h-6 w-6 text-text-secondary" }),
401
+ /* @__PURE__ */ f("p", {
329
402
  className: "text-sm font-medium text-text-primary",
330
- children: e.name
331
- }),
332
- /* @__PURE__ */ v("span", {
333
- className: "text-[10px] text-text-secondary mt-0.5",
334
- children: e.description
403
+ children: "Start building your page"
335
404
  }),
336
- /* @__PURE__ */ v("span", {
337
- className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary mt-1",
338
- children: e.category
405
+ /* @__PURE__ */ f("p", {
406
+ className: "max-w-xs text-xs text-text-secondary",
407
+ children: "Drag a block from the left, or click one to add it here."
339
408
  })
340
409
  ]
341
- }, e.id))]
342
- })]
343
- }), /* @__PURE__ */ y("div", {
344
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
345
- children: [/* @__PURE__ */ v("h4", {
346
- className: "text-sm font-semibold text-text-primary mb-3",
347
- children: "Add Section"
348
- }), /* @__PURE__ */ v("div", {
349
- className: "grid grid-cols-2 gap-2",
350
- children: Ae.map((e) => /* @__PURE__ */ y("button", {
351
- onClick: () => Y(e),
352
- className: "flex flex-col items-center gap-1 rounded-md border border-dashed border-border-subtle p-2 text-xs text-text-secondary hover:border-primary hover:text-primary transition-colors capitalize",
353
- children: [/* @__PURE__ */ v(x[e] || m, { className: "h-4 w-4" }), e]
354
- }, e))
410
+ }) : /* @__PURE__ */ p("div", { children: [q.map((e, t) => /* @__PURE__ */ f(ce, {
411
+ section: e,
412
+ index: t,
413
+ total: q.length,
414
+ selected: R === e.id,
415
+ dropBefore: K === t,
416
+ onSelect: () => z(e.id),
417
+ onMoveUp: () => Be(e.id, "up"),
418
+ onMoveDown: () => Be(e.id, "down"),
419
+ onDuplicate: () => He(e.id),
420
+ onRemove: () => Ve(e.id),
421
+ onHandleDragStart: Ye(e.id),
422
+ onDragEnd: X,
423
+ onBlockDragOver: Z(t),
424
+ onBlockDrop: Q(t)
425
+ }, e.id)), /* @__PURE__ */ p("div", {
426
+ onDragOver: Z(q.length),
427
+ onDrop: Q(q.length),
428
+ className: i("relative border-t border-dashed transition-colors", K === q.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
429
+ children: [K === q.length && /* @__PURE__ */ f("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ p("button", {
430
+ type: "button",
431
+ onClick: () => Ue("features"),
432
+ 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",
433
+ children: [/* @__PURE__ */ f(d, { className: "h-4 w-4" }), "Add section"]
434
+ })]
435
+ })] })]
355
436
  })]
356
- })]
357
- }), /* @__PURE__ */ y("div", {
358
- className: "lg:col-span-3",
359
- children: [/* @__PURE__ */ v("div", {
360
- className: "flex flex-nowrap items-center justify-center gap-2 mb-4 overflow-x-auto",
361
- children: [
362
- {
363
- key: "desktop",
364
- icon: ue,
365
- label: "Desktop"
366
- },
367
- {
368
- key: "tablet",
369
- icon: me,
370
- label: "Tablet"
371
- },
372
- {
373
- key: "mobile",
374
- icon: pe,
375
- label: "Mobile"
376
- }
377
- ].map((e) => {
378
- let t = e.icon;
379
- return /* @__PURE__ */ y("button", {
380
- onClick: () => Te(e.key),
381
- className: i("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors whitespace-nowrap", L === e.key ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
382
- children: [/* @__PURE__ */ v(t, { className: "h-4 w-4" }), e.label]
383
- }, e.key);
384
- })
385
- }), /* @__PURE__ */ v("div", {
386
- className: i("mx-auto transition-all", De[L]),
387
- children: /* @__PURE__ */ y(_e, {
388
- className: "overflow-hidden p-0",
389
- children: [/* @__PURE__ */ v("div", {
390
- className: "divide-y divide-border",
391
- children: G.map((e, t) => {
392
- let n = x[e.type] || m;
393
- return /* @__PURE__ */ y("div", {
394
- onClick: () => z(e.id),
395
- className: i("p-4 cursor-pointer transition-all group", R === e.id ? "bg-action-primary-bg/5 ring-2 ring-inset ring-primary" : "hover:bg-bg-sunken/50"),
396
- children: [/* @__PURE__ */ y("div", {
397
- className: "flex items-center justify-between",
398
- children: [/* @__PURE__ */ y("div", {
399
- className: "flex items-center gap-3",
400
- children: [
401
- /* @__PURE__ */ v(le, { className: "h-4 w-4 text-text-secondary opacity-0 group-hover:opacity-100 transition-opacity cursor-grab" }),
402
- /* @__PURE__ */ v("div", {
403
- className: "p-2 rounded-md bg-bg-sunken",
404
- children: /* @__PURE__ */ v(n, { className: "h-4 w-4 text-text-secondary" })
405
- }),
406
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
407
- className: "text-sm font-medium text-text-primary",
408
- children: e.label
409
- }), /* @__PURE__ */ y("p", {
410
- className: "text-xs text-text-secondary capitalize",
411
- children: [e.type, " section"]
412
- })] })
413
- ]
414
- }), /* @__PURE__ */ y("div", {
415
- className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",
416
- children: [
417
- /* @__PURE__ */ v("button", {
418
- onClick: (t) => {
419
- t.stopPropagation(), J(e.id, "up");
420
- },
421
- disabled: t === 0,
422
- className: i("p-1 rounded-md hover:bg-bg-sunken", t === 0 && "opacity-30 cursor-not-allowed"),
423
- children: /* @__PURE__ */ v(l, { className: "h-4 w-4 text-text-secondary" })
424
- }),
425
- /* @__PURE__ */ v("button", {
426
- onClick: (t) => {
427
- t.stopPropagation(), J(e.id, "down");
428
- },
429
- disabled: t === G.length - 1,
430
- className: i("p-1 rounded-md hover:bg-bg-sunken", t === G.length - 1 && "opacity-30 cursor-not-allowed"),
431
- children: /* @__PURE__ */ v(oe, { className: "h-4 w-4 text-text-secondary" })
432
- }),
433
- /* @__PURE__ */ v("button", {
434
- onClick: (t) => {
435
- t.stopPropagation(), z(e.id);
436
- },
437
- className: "p-1 rounded-md hover:bg-bg-sunken",
438
- children: /* @__PURE__ */ v(d, { className: "h-4 w-4 text-text-secondary" })
439
- }),
440
- /* @__PURE__ */ v("button", {
441
- onClick: (t) => {
442
- t.stopPropagation(), Oe(e.id);
443
- },
444
- className: "p-1 rounded-md hover:bg-bg-sunken text-text-secondary hover:text-status-error-text",
445
- children: /* @__PURE__ */ v(he, { className: "h-4 w-4" })
446
- })
447
- ]
448
- })]
449
- }), /* @__PURE__ */ v("div", {
450
- className: "mt-3 ml-11",
451
- children: $(e)
452
- })]
453
- }, e.id);
437
+ }),
438
+ /* @__PURE__ */ f("aside", {
439
+ className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
440
+ children: Y ? /* @__PURE__ */ f("div", {
441
+ className: "lg:max-h-[calc(100vh-2rem)]",
442
+ children: /* @__PURE__ */ f(le, {
443
+ section: Y,
444
+ onChangeConfig: (e) => Ke(Y.id, e),
445
+ onChangeLabel: (e) => qe(Y.id, e),
446
+ onClose: () => z(null),
447
+ onDuplicate: () => He(Y.id),
448
+ onRemove: () => Ve(Y.id)
449
+ })
450
+ }) : /* @__PURE__ */ p("div", {
451
+ 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",
452
+ children: [
453
+ /* @__PURE__ */ f("span", {
454
+ className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary",
455
+ children: /* @__PURE__ */ f(ve, { className: "h-5 w-5" })
456
+ }),
457
+ /* @__PURE__ */ f("p", {
458
+ className: "text-sm font-semibold text-text-primary",
459
+ children: "No block selected"
460
+ }),
461
+ /* @__PURE__ */ f("p", {
462
+ className: "text-xs text-text-secondary",
463
+ children: "Select a block on the canvas to edit its text, colors, spacing and alignment."
454
464
  })
455
- }), /* @__PURE__ */ y("button", {
456
- onClick: () => Y("features"),
457
- className: "w-full p-4 border-t border-dashed border-border-subtle text-sm text-text-secondary hover:text-primary hover:bg-action-primary-bg/5 transition-colors flex items-center justify-center gap-2",
458
- children: [/* @__PURE__ */ v(de, { className: "h-4 w-4" }), "Add Section"]
459
- })]
465
+ ]
460
466
  })
461
- })]
462
- })]
467
+ })
468
+ ]
463
469
  })
464
470
  }),
465
- /* @__PURE__ */ v(ee, {
466
- open: Ee,
471
+ /* @__PURE__ */ f(ee, {
472
+ open: Me,
467
473
  onClose: () => B(!1),
468
- title: N || "Landing Page",
469
- description: "Preview of your landing page layout.",
474
+ title: M || "Landing Page",
475
+ description: "Preview of your landing page.",
470
476
  size: "xl",
471
- footer: /* @__PURE__ */ y(ge, { children: [j && k === "PUBLISHED" && /* @__PURE__ */ y("a", {
472
- href: j,
477
+ footer: /* @__PURE__ */ p(Se, { children: [A && O === "PUBLISHED" && /* @__PURE__ */ p("a", {
478
+ href: A,
473
479
  target: "_blank",
474
480
  rel: "noreferrer",
475
481
  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",
476
- children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "Open live page"]
477
- }), /* @__PURE__ */ v("button", {
482
+ children: [/* @__PURE__ */ f(u, { className: "h-4 w-4" }), "Open live page"]
483
+ }), /* @__PURE__ */ f("button", {
478
484
  type: "button",
479
485
  onClick: () => B(!1),
480
486
  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",
481
487
  children: "Close"
482
488
  })] }),
483
- children: /* @__PURE__ */ v("div", {
484
- className: "space-y-4",
485
- children: G.map((e) => /* @__PURE__ */ v("div", { children: $(e) }, e.id))
489
+ children: /* @__PURE__ */ f("div", {
490
+ className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
491
+ children: q.length === 0 ? /* @__PURE__ */ f("p", {
492
+ className: "p-8 text-center text-sm text-text-secondary",
493
+ children: "This page has no sections yet."
494
+ }) : q.map((e) => /* @__PURE__ */ f(se, { section: e }, e.id))
486
495
  })
487
496
  })
488
497
  ]
489
498
  });
490
499
  };
491
500
  //#endregion
492
- export { w as LandingPageBuilderPage };
501
+ export { S as LandingPageBuilderPage };
493
502
 
494
503
  //# sourceMappingURL=LandingPageBuilderPage.js.map